@digipair/skill-web-heygen 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js ADDED
@@ -0,0 +1,1948 @@
1
+ function __decorate(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ }
7
+ function __metadata(metadataKey, metadataValue) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
9
+ }
10
+ typeof SuppressedError === "function" ? SuppressedError : function _SuppressedError(error, suppressed, message) {
11
+ var e = new Error(message);
12
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
13
+ };
14
+
15
+ /**
16
+ * @license
17
+ * Copyright 2019 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */ function _class_call_check$3(instance, Constructor) {
20
+ if (!(instance instanceof Constructor)) {
21
+ throw new TypeError("Cannot call a class as a function");
22
+ }
23
+ }
24
+ function _defineProperties$3(target, props) {
25
+ for(var i = 0; i < props.length; i++){
26
+ var descriptor = props[i];
27
+ descriptor.enumerable = descriptor.enumerable || false;
28
+ descriptor.configurable = true;
29
+ if ("value" in descriptor) descriptor.writable = true;
30
+ Object.defineProperty(target, descriptor.key, descriptor);
31
+ }
32
+ }
33
+ function _create_class$3(Constructor, protoProps, staticProps) {
34
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
35
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
36
+ return Constructor;
37
+ }
38
+ function _instanceof(left, right) {
39
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
40
+ return !!right[Symbol.hasInstance](left);
41
+ } else {
42
+ return left instanceof right;
43
+ }
44
+ }
45
+ var t$2 = globalThis, e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$2 = new WeakMap;
46
+ var n$2 = /*#__PURE__*/ function() {
47
+ function n(t, e, o) {
48
+ _class_call_check$3(this, n);
49
+ if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
50
+ this.cssText = t, this.t = e;
51
+ }
52
+ _create_class$3(n, [
53
+ {
54
+ key: "styleSheet",
55
+ get: function get() {
56
+ var t = this.o;
57
+ var s = this.t;
58
+ if (e$4 && void 0 === t) {
59
+ var e1 = void 0 !== s && 1 === s.length;
60
+ e1 && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet).replaceSync(this.cssText), e1 && o$2.set(s, t));
61
+ }
62
+ return t;
63
+ }
64
+ },
65
+ {
66
+ key: "toString",
67
+ value: function toString() {
68
+ return this.cssText;
69
+ }
70
+ }
71
+ ]);
72
+ return n;
73
+ }();
74
+ var r$3 = function(t) {
75
+ return new n$2("string" == typeof t ? t : t + "", void 0, s$2);
76
+ }, S$1 = function(s, o) {
77
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
78
+ if (e$4) s.adoptedStyleSheets = o.map(function(t) {
79
+ return _instanceof(t, CSSStyleSheet) ? t : t.styleSheet;
80
+ });
81
+ else try {
82
+ for(var _iterator = o[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
83
+ var e1 = _step.value;
84
+ var _$o = document.createElement("style"), n = t$2.litNonce;
85
+ void 0 !== n && _$o.setAttribute("nonce", n), _$o.textContent = e1.cssText, s.appendChild(_$o);
86
+ }
87
+ } catch (err) {
88
+ _didIteratorError = true;
89
+ _iteratorError = err;
90
+ } finally{
91
+ try {
92
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
93
+ _iterator.return();
94
+ }
95
+ } finally{
96
+ if (_didIteratorError) {
97
+ throw _iteratorError;
98
+ }
99
+ }
100
+ }
101
+ }, c$2 = e$4 ? function(t) {
102
+ return t;
103
+ } : function(t) {
104
+ return _instanceof(t, CSSStyleSheet) ? function(t) {
105
+ var e = "";
106
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
107
+ try {
108
+ for(var _iterator = t.cssRules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
109
+ var s = _step.value;
110
+ e += s.cssText;
111
+ }
112
+ } catch (err) {
113
+ _didIteratorError = true;
114
+ _iteratorError = err;
115
+ } finally{
116
+ try {
117
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
118
+ _iterator.return();
119
+ }
120
+ } finally{
121
+ if (_didIteratorError) {
122
+ throw _iteratorError;
123
+ }
124
+ }
125
+ }
126
+ return r$3(e);
127
+ }(t) : t;
128
+ };
129
+
130
+ function _array_like_to_array$1(arr, len) {
131
+ if (len == null || len > arr.length) len = arr.length;
132
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
133
+ return arr2;
134
+ }
135
+ function _array_with_holes$1(arr) {
136
+ if (Array.isArray(arr)) return arr;
137
+ }
138
+ function _array_without_holes$1(arr) {
139
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
140
+ }
141
+ function _assert_this_initialized$2(self) {
142
+ if (self === void 0) {
143
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
144
+ }
145
+ return self;
146
+ }
147
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
148
+ try {
149
+ var info = gen[key](arg);
150
+ var value = info.value;
151
+ } catch (error) {
152
+ reject(error);
153
+ return;
154
+ }
155
+ if (info.done) {
156
+ resolve(value);
157
+ } else {
158
+ Promise.resolve(value).then(_next, _throw);
159
+ }
160
+ }
161
+ function _async_to_generator(fn) {
162
+ return function() {
163
+ var self = this, args = arguments;
164
+ return new Promise(function(resolve, reject) {
165
+ var gen = fn.apply(self, args);
166
+ function _next(value) {
167
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
168
+ }
169
+ function _throw(err) {
170
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
171
+ }
172
+ _next(undefined);
173
+ });
174
+ };
175
+ }
176
+ function _class_call_check$2(instance, Constructor) {
177
+ if (!(instance instanceof Constructor)) {
178
+ throw new TypeError("Cannot call a class as a function");
179
+ }
180
+ }
181
+ function _construct(Parent, args, Class) {
182
+ if (_is_native_reflect_construct$2()) {
183
+ _construct = Reflect.construct;
184
+ } else {
185
+ _construct = function construct(Parent, args, Class) {
186
+ var a = [
187
+ null
188
+ ];
189
+ a.push.apply(a, args);
190
+ var Constructor = Function.bind.apply(Parent, a);
191
+ var instance = new Constructor();
192
+ if (Class) _set_prototype_of$2(instance, Class.prototype);
193
+ return instance;
194
+ };
195
+ }
196
+ return _construct.apply(null, arguments);
197
+ }
198
+ function _defineProperties$2(target, props) {
199
+ for(var i = 0; i < props.length; i++){
200
+ var descriptor = props[i];
201
+ descriptor.enumerable = descriptor.enumerable || false;
202
+ descriptor.configurable = true;
203
+ if ("value" in descriptor) descriptor.writable = true;
204
+ Object.defineProperty(target, descriptor.key, descriptor);
205
+ }
206
+ }
207
+ function _create_class$2(Constructor, protoProps, staticProps) {
208
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
209
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
210
+ return Constructor;
211
+ }
212
+ function _get_prototype_of$2(o) {
213
+ _get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
214
+ return o.__proto__ || Object.getPrototypeOf(o);
215
+ };
216
+ return _get_prototype_of$2(o);
217
+ }
218
+ function _inherits$2(subClass, superClass) {
219
+ if (typeof superClass !== "function" && superClass !== null) {
220
+ throw new TypeError("Super expression must either be null or a function");
221
+ }
222
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
223
+ constructor: {
224
+ value: subClass,
225
+ writable: true,
226
+ configurable: true
227
+ }
228
+ });
229
+ if (superClass) _set_prototype_of$2(subClass, superClass);
230
+ }
231
+ function _is_native_function(fn) {
232
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
233
+ }
234
+ function _iterable_to_array$1(iter) {
235
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
236
+ }
237
+ function _iterable_to_array_limit$1(arr, i) {
238
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
239
+ if (_i == null) return;
240
+ var _arr = [];
241
+ var _n = true;
242
+ var _d = false;
243
+ var _s, _e;
244
+ try {
245
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
246
+ _arr.push(_s.value);
247
+ if (i && _arr.length === i) break;
248
+ }
249
+ } catch (err) {
250
+ _d = true;
251
+ _e = err;
252
+ } finally{
253
+ try {
254
+ if (!_n && _i["return"] != null) _i["return"]();
255
+ } finally{
256
+ if (_d) throw _e;
257
+ }
258
+ }
259
+ return _arr;
260
+ }
261
+ function _non_iterable_rest$1() {
262
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
263
+ }
264
+ function _non_iterable_spread$1() {
265
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
266
+ }
267
+ function _possible_constructor_return$2(self, call) {
268
+ if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
269
+ return call;
270
+ }
271
+ return _assert_this_initialized$2(self);
272
+ }
273
+ function _set_prototype_of$2(o, p) {
274
+ _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
275
+ o.__proto__ = p;
276
+ return o;
277
+ };
278
+ return _set_prototype_of$2(o, p);
279
+ }
280
+ function _sliced_to_array$1(arr, i) {
281
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
282
+ }
283
+ function _to_consumable_array$1(arr) {
284
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
285
+ }
286
+ function _type_of$2(obj) {
287
+ "@swc/helpers - typeof";
288
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
289
+ }
290
+ function _unsupported_iterable_to_array$1(o, minLen) {
291
+ if (!o) return;
292
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
293
+ var n = Object.prototype.toString.call(o).slice(8, -1);
294
+ if (n === "Object" && o.constructor) n = o.constructor.name;
295
+ if (n === "Map" || n === "Set") return Array.from(n);
296
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
297
+ }
298
+ function _wrap_native_super(Class) {
299
+ var _cache = typeof Map === "function" ? new Map() : undefined;
300
+ _wrap_native_super = function wrapNativeSuper(Class) {
301
+ if (Class === null || !_is_native_function(Class)) return Class;
302
+ if (typeof Class !== "function") {
303
+ throw new TypeError("Super expression must either be null or a function");
304
+ }
305
+ if (typeof _cache !== "undefined") {
306
+ if (_cache.has(Class)) return _cache.get(Class);
307
+ _cache.set(Class, Wrapper);
308
+ }
309
+ function Wrapper() {
310
+ return _construct(Class, arguments, _get_prototype_of$2(this).constructor);
311
+ }
312
+ Wrapper.prototype = Object.create(Class.prototype, {
313
+ constructor: {
314
+ value: Wrapper,
315
+ enumerable: false,
316
+ writable: true,
317
+ configurable: true
318
+ }
319
+ });
320
+ return _set_prototype_of$2(Wrapper, Class);
321
+ };
322
+ return _wrap_native_super(Class);
323
+ }
324
+ function _is_native_reflect_construct$2() {
325
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
326
+ if (Reflect.construct.sham) return false;
327
+ if (typeof Proxy === "function") return true;
328
+ try {
329
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
330
+ return true;
331
+ } catch (e) {
332
+ return false;
333
+ }
334
+ }
335
+ function _create_super$2(Derived) {
336
+ var hasNativeReflectConstruct = _is_native_reflect_construct$2();
337
+ return function _createSuperInternal() {
338
+ var Super = _get_prototype_of$2(Derived), result;
339
+ if (hasNativeReflectConstruct) {
340
+ var NewTarget = _get_prototype_of$2(this).constructor;
341
+ result = Reflect.construct(Super, arguments, NewTarget);
342
+ } else {
343
+ result = Super.apply(this, arguments);
344
+ }
345
+ return _possible_constructor_return$2(this, result);
346
+ };
347
+ }
348
+ function _ts_generator(thisArg, body) {
349
+ var f, y, t, g, _ = {
350
+ label: 0,
351
+ sent: function() {
352
+ if (t[0] & 1) throw t[1];
353
+ return t[1];
354
+ },
355
+ trys: [],
356
+ ops: []
357
+ };
358
+ return g = {
359
+ next: verb(0),
360
+ "throw": verb(1),
361
+ "return": verb(2)
362
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
363
+ return this;
364
+ }), g;
365
+ function verb(n) {
366
+ return function(v) {
367
+ return step([
368
+ n,
369
+ v
370
+ ]);
371
+ };
372
+ }
373
+ function step(op) {
374
+ if (f) throw new TypeError("Generator is already executing.");
375
+ while(_)try {
376
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
377
+ if (y = 0, t) op = [
378
+ op[0] & 2,
379
+ t.value
380
+ ];
381
+ switch(op[0]){
382
+ case 0:
383
+ case 1:
384
+ t = op;
385
+ break;
386
+ case 4:
387
+ _.label++;
388
+ return {
389
+ value: op[1],
390
+ done: false
391
+ };
392
+ case 5:
393
+ _.label++;
394
+ y = op[1];
395
+ op = [
396
+ 0
397
+ ];
398
+ continue;
399
+ case 7:
400
+ op = _.ops.pop();
401
+ _.trys.pop();
402
+ continue;
403
+ default:
404
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
405
+ _ = 0;
406
+ continue;
407
+ }
408
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
409
+ _.label = op[1];
410
+ break;
411
+ }
412
+ if (op[0] === 6 && _.label < t[1]) {
413
+ _.label = t[1];
414
+ t = op;
415
+ break;
416
+ }
417
+ if (t && _.label < t[2]) {
418
+ _.label = t[2];
419
+ _.ops.push(op);
420
+ break;
421
+ }
422
+ if (t[2]) _.ops.pop();
423
+ _.trys.pop();
424
+ continue;
425
+ }
426
+ op = body.call(thisArg, _);
427
+ } catch (e) {
428
+ op = [
429
+ 6,
430
+ e
431
+ ];
432
+ y = 0;
433
+ } finally{
434
+ f = t = 0;
435
+ }
436
+ if (op[0] & 5) throw op[1];
437
+ return {
438
+ value: op[0] ? op[1] : void 0,
439
+ done: true
440
+ };
441
+ }
442
+ }
443
+ var _Symbol, _a, _a1;
444
+ /**
445
+ * @license
446
+ * Copyright 2017 Google LLC
447
+ * SPDX-License-Identifier: BSD-3-Clause
448
+ */ var i$1 = Object.is, e$3 = Object.defineProperty, r$2 = Object.getOwnPropertyDescriptor, h$1 = Object.getOwnPropertyNames, o$1 = Object.getOwnPropertySymbols, n$1 = Object.getPrototypeOf, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = function(t, s) {
449
+ return t;
450
+ }, u$1 = {
451
+ toAttribute: function toAttribute(t, s) {
452
+ switch(s){
453
+ case Boolean:
454
+ t = t ? l$1 : null;
455
+ break;
456
+ case Object:
457
+ case Array:
458
+ t = null == t ? t : JSON.stringify(t);
459
+ }
460
+ return t;
461
+ },
462
+ fromAttribute: function fromAttribute(t, s) {
463
+ var i = t;
464
+ switch(s){
465
+ case Boolean:
466
+ i = null !== t;
467
+ break;
468
+ case Number:
469
+ i = null === t ? null : Number(t);
470
+ break;
471
+ case Object:
472
+ case Array:
473
+ try {
474
+ i = JSON.parse(t);
475
+ } catch (t) {
476
+ i = null;
477
+ }
478
+ }
479
+ return i;
480
+ }
481
+ }, f$1 = function(t, s) {
482
+ return !i$1(t, s);
483
+ }, y$1 = {
484
+ attribute: !0,
485
+ type: String,
486
+ converter: u$1,
487
+ reflect: !1,
488
+ hasChanged: f$1
489
+ };
490
+ var _metadata, _litPropertyMetadata;
491
+ (_metadata = (_Symbol = Symbol).metadata) !== null && _metadata !== void 0 ? _metadata : _Symbol.metadata = Symbol("metadata"), (_litPropertyMetadata = (_a = a$1).litPropertyMetadata) !== null && _litPropertyMetadata !== void 0 ? _litPropertyMetadata : _a.litPropertyMetadata = new WeakMap;
492
+ var b = /*#__PURE__*/ function(HTMLElement1) {
493
+ _inherits$2(b, HTMLElement1);
494
+ var _super = _create_super$2(b);
495
+ function b() {
496
+ _class_call_check$2(this, b);
497
+ var _this;
498
+ _this = _super.call(this), _this._$Ep = void 0, _this.isUpdatePending = !1, _this.hasUpdated = !1, _this._$Em = null, _this._$Ev();
499
+ return _possible_constructor_return$2(_this);
500
+ }
501
+ _create_class$2(b, [
502
+ {
503
+ key: "_$Ev",
504
+ value: function _$Ev() {
505
+ var _this = this;
506
+ var _this_constructor_l;
507
+ this._$ES = new Promise(function(t) {
508
+ return _this.enableUpdating = t;
509
+ }), this._$AL = new Map, this._$E_(), this.requestUpdate(), (_this_constructor_l = this.constructor.l) === null || _this_constructor_l === void 0 ? void 0 : _this_constructor_l.forEach(function(t) {
510
+ return t(_this);
511
+ });
512
+ }
513
+ },
514
+ {
515
+ key: "addController",
516
+ value: function addController(t) {
517
+ var _t_hostConnected;
518
+ var _this__$EO;
519
+ ((_this__$EO = this._$EO) !== null && _this__$EO !== void 0 ? _this__$EO : this._$EO = new Set).add(t), void 0 !== this.renderRoot && this.isConnected && ((_t_hostConnected = t.hostConnected) === null || _t_hostConnected === void 0 ? void 0 : _t_hostConnected.call(t));
520
+ }
521
+ },
522
+ {
523
+ key: "removeController",
524
+ value: function removeController(t) {
525
+ var _this__$EO;
526
+ (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.delete(t);
527
+ }
528
+ },
529
+ {
530
+ key: "_$E_",
531
+ value: function _$E_() {
532
+ var t = new Map, s = this.constructor.elementProperties;
533
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
534
+ try {
535
+ for(var _iterator = s.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
536
+ var i = _step.value;
537
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
538
+ }
539
+ } catch (err) {
540
+ _didIteratorError = true;
541
+ _iteratorError = err;
542
+ } finally{
543
+ try {
544
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
545
+ _iterator.return();
546
+ }
547
+ } finally{
548
+ if (_didIteratorError) {
549
+ throw _iteratorError;
550
+ }
551
+ }
552
+ }
553
+ t.size > 0 && (this._$Ep = t);
554
+ }
555
+ },
556
+ {
557
+ key: "createRenderRoot",
558
+ value: function createRenderRoot() {
559
+ var _this_shadowRoot;
560
+ var t = (_this_shadowRoot = this.shadowRoot) !== null && _this_shadowRoot !== void 0 ? _this_shadowRoot : this.attachShadow(this.constructor.shadowRootOptions);
561
+ return S$1(t, this.constructor.elementStyles), t;
562
+ }
563
+ },
564
+ {
565
+ key: "connectedCallback",
566
+ value: function connectedCallback() {
567
+ var _this__$EO;
568
+ var _this_renderRoot;
569
+ (_this_renderRoot = this.renderRoot) !== null && _this_renderRoot !== void 0 ? _this_renderRoot : this.renderRoot = this.createRenderRoot(), this.enableUpdating(!0), (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
570
+ var _t_hostConnected;
571
+ return (_t_hostConnected = t.hostConnected) === null || _t_hostConnected === void 0 ? void 0 : _t_hostConnected.call(t);
572
+ });
573
+ }
574
+ },
575
+ {
576
+ key: "enableUpdating",
577
+ value: function enableUpdating(t) {}
578
+ },
579
+ {
580
+ key: "disconnectedCallback",
581
+ value: function disconnectedCallback() {
582
+ var _this__$EO;
583
+ (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
584
+ var _t_hostDisconnected;
585
+ return (_t_hostDisconnected = t.hostDisconnected) === null || _t_hostDisconnected === void 0 ? void 0 : _t_hostDisconnected.call(t);
586
+ });
587
+ }
588
+ },
589
+ {
590
+ key: "attributeChangedCallback",
591
+ value: function attributeChangedCallback(t, s, i) {
592
+ this._$AK(t, i);
593
+ }
594
+ },
595
+ {
596
+ key: "_$EC",
597
+ value: function _$EC(t, s) {
598
+ var i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
599
+ if (void 0 !== e && !0 === i.reflect) {
600
+ var _i_converter;
601
+ var r = (void 0 !== ((_i_converter = i.converter) === null || _i_converter === void 0 ? void 0 : _i_converter.toAttribute) ? i.converter : u$1).toAttribute(s, i.type);
602
+ this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
603
+ }
604
+ }
605
+ },
606
+ {
607
+ key: "_$AK",
608
+ value: function _$AK(t, s) {
609
+ var i = this.constructor, e = i._$Eh.get(t);
610
+ if (void 0 !== e && this._$Em !== e) {
611
+ var _t_converter;
612
+ var _$t = i.getPropertyOptions(e), r = "function" == typeof _$t.converter ? {
613
+ fromAttribute: _$t.converter
614
+ } : void 0 !== ((_t_converter = _$t.converter) === null || _t_converter === void 0 ? void 0 : _t_converter.fromAttribute) ? _$t.converter : u$1;
615
+ this._$Em = e, this[e] = r.fromAttribute(s, _$t.type), this._$Em = null;
616
+ }
617
+ }
618
+ },
619
+ {
620
+ key: "requestUpdate",
621
+ value: function requestUpdate(t, s, i) {
622
+ if (void 0 !== t) {
623
+ var _i_hasChanged;
624
+ if (i !== null && i !== void 0 ? i : i = this.constructor.getPropertyOptions(t), !((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(this[t], s)) return;
625
+ this.P(t, s, i);
626
+ }
627
+ !1 === this.isUpdatePending && (this._$ES = this._$ET());
628
+ }
629
+ },
630
+ {
631
+ key: "P",
632
+ value: function P(t, s, i) {
633
+ var _this__$Ej;
634
+ this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && ((_this__$Ej = this._$Ej) !== null && _this__$Ej !== void 0 ? _this__$Ej : this._$Ej = new Set).add(t);
635
+ }
636
+ },
637
+ {
638
+ key: "_$ET",
639
+ value: function _$ET() {
640
+ var _this = this;
641
+ return _async_to_generator(function() {
642
+ var t, _$t, _tmp;
643
+ return _ts_generator(this, function(_state) {
644
+ switch(_state.label){
645
+ case 0:
646
+ _this.isUpdatePending = !0;
647
+ _state.label = 1;
648
+ case 1:
649
+ _state.trys.push([
650
+ 1,
651
+ 3,
652
+ ,
653
+ 4
654
+ ]);
655
+ return [
656
+ 4,
657
+ _this._$ES
658
+ ];
659
+ case 2:
660
+ _state.sent();
661
+ return [
662
+ 3,
663
+ 4
664
+ ];
665
+ case 3:
666
+ t = _state.sent();
667
+ Promise.reject(t);
668
+ return [
669
+ 3,
670
+ 4
671
+ ];
672
+ case 4:
673
+ _$t = _this.scheduleUpdate();
674
+ _tmp = null != _$t;
675
+ if (!_tmp) return [
676
+ 3,
677
+ 6
678
+ ];
679
+ return [
680
+ 4,
681
+ _$t
682
+ ];
683
+ case 5:
684
+ _tmp = _state.sent();
685
+ _state.label = 6;
686
+ case 6:
687
+ return [
688
+ 2,
689
+ (!_this.isUpdatePending)
690
+ ];
691
+ }
692
+ });
693
+ })();
694
+ }
695
+ },
696
+ {
697
+ key: "scheduleUpdate",
698
+ value: function scheduleUpdate() {
699
+ return this.performUpdate();
700
+ }
701
+ },
702
+ {
703
+ key: "performUpdate",
704
+ value: function performUpdate() {
705
+ if (!this.isUpdatePending) return;
706
+ if (!this.hasUpdated) {
707
+ var _this_renderRoot;
708
+ if ((_this_renderRoot = this.renderRoot) !== null && _this_renderRoot !== void 0 ? _this_renderRoot : this.renderRoot = this.createRenderRoot(), this._$Ep) {
709
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
710
+ try {
711
+ for(var _iterator = this._$Ep[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
712
+ var _step_value = _sliced_to_array$1(_step.value, 2), t = _step_value[0], _$s = _step_value[1];
713
+ this[t] = _$s;
714
+ }
715
+ } catch (err) {
716
+ _didIteratorError = true;
717
+ _iteratorError = err;
718
+ } finally{
719
+ try {
720
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
721
+ _iterator.return();
722
+ }
723
+ } finally{
724
+ if (_didIteratorError) {
725
+ throw _iteratorError;
726
+ }
727
+ }
728
+ }
729
+ this._$Ep = void 0;
730
+ }
731
+ var t1 = this.constructor.elementProperties;
732
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
733
+ if (t1.size > 0) try {
734
+ for(var _iterator1 = t1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
735
+ var _step_value1 = _sliced_to_array$1(_step1.value, 2), _$s1 = _step_value1[0], i = _step_value1[1];
736
+ !0 !== i.wrapped || this._$AL.has(_$s1) || void 0 === this[_$s1] || this.P(_$s1, this[_$s1], i);
737
+ }
738
+ } catch (err) {
739
+ _didIteratorError1 = true;
740
+ _iteratorError1 = err;
741
+ } finally{
742
+ try {
743
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
744
+ _iterator1.return();
745
+ }
746
+ } finally{
747
+ if (_didIteratorError1) {
748
+ throw _iteratorError1;
749
+ }
750
+ }
751
+ }
752
+ }
753
+ var t2 = !1;
754
+ var _$s2 = this._$AL;
755
+ try {
756
+ var _this__$EO;
757
+ t2 = this.shouldUpdate(_$s2), t2 ? (this.willUpdate(_$s2), (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
758
+ var _t_hostUpdate;
759
+ return (_t_hostUpdate = t.hostUpdate) === null || _t_hostUpdate === void 0 ? void 0 : _t_hostUpdate.call(t);
760
+ }), this.update(_$s2)) : this._$EU();
761
+ } catch (s) {
762
+ throw t2 = !1, this._$EU(), s;
763
+ }
764
+ t2 && this._$AE(_$s2);
765
+ }
766
+ },
767
+ {
768
+ key: "willUpdate",
769
+ value: function willUpdate(t) {}
770
+ },
771
+ {
772
+ key: "_$AE",
773
+ value: function _$AE(t) {
774
+ var _this__$EO;
775
+ (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
776
+ var _t_hostUpdated;
777
+ return (_t_hostUpdated = t.hostUpdated) === null || _t_hostUpdated === void 0 ? void 0 : _t_hostUpdated.call(t);
778
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
779
+ }
780
+ },
781
+ {
782
+ key: "_$EU",
783
+ value: function _$EU() {
784
+ this._$AL = new Map, this.isUpdatePending = !1;
785
+ }
786
+ },
787
+ {
788
+ key: "updateComplete",
789
+ get: function get() {
790
+ return this.getUpdateComplete();
791
+ }
792
+ },
793
+ {
794
+ key: "getUpdateComplete",
795
+ value: function getUpdateComplete() {
796
+ return this._$ES;
797
+ }
798
+ },
799
+ {
800
+ key: "shouldUpdate",
801
+ value: function shouldUpdate(t) {
802
+ return !0;
803
+ }
804
+ },
805
+ {
806
+ key: "update",
807
+ value: function update(t) {
808
+ var _this = this;
809
+ this._$Ej && (this._$Ej = this._$Ej.forEach(function(t) {
810
+ return _this._$EC(t, _this[t]);
811
+ })), this._$EU();
812
+ }
813
+ },
814
+ {
815
+ key: "updated",
816
+ value: function updated(t) {}
817
+ },
818
+ {
819
+ key: "firstUpdated",
820
+ value: function firstUpdated(t) {}
821
+ }
822
+ ], [
823
+ {
824
+ key: "addInitializer",
825
+ value: function addInitializer(t) {
826
+ var _this_l;
827
+ this._$Ei(), ((_this_l = this.l) !== null && _this_l !== void 0 ? _this_l : this.l = []).push(t);
828
+ }
829
+ },
830
+ {
831
+ key: "observedAttributes",
832
+ get: function get() {
833
+ return this.finalize(), this._$Eh && _to_consumable_array$1(this._$Eh.keys());
834
+ }
835
+ },
836
+ {
837
+ key: "createProperty",
838
+ value: function createProperty(t) {
839
+ var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : y$1;
840
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
841
+ var i = Symbol(), r = this.getPropertyDescriptor(t, i, s);
842
+ void 0 !== r && e$3(this.prototype, t, r);
843
+ }
844
+ }
845
+ },
846
+ {
847
+ key: "getPropertyDescriptor",
848
+ value: function getPropertyDescriptor(t, s, i) {
849
+ var _r;
850
+ var _ref = (_r = r$2(this.prototype, t)) !== null && _r !== void 0 ? _r : {
851
+ get: function get() {
852
+ return this[s];
853
+ },
854
+ set: function set(t) {
855
+ this[s] = t;
856
+ }
857
+ }, e = _ref.get, h = _ref.set;
858
+ return {
859
+ get: function get() {
860
+ return e === null || e === void 0 ? void 0 : e.call(this);
861
+ },
862
+ set: function set(s) {
863
+ var r = e === null || e === void 0 ? void 0 : e.call(this);
864
+ h.call(this, s), this.requestUpdate(t, r, i);
865
+ },
866
+ configurable: !0,
867
+ enumerable: !0
868
+ };
869
+ }
870
+ },
871
+ {
872
+ key: "getPropertyOptions",
873
+ value: function getPropertyOptions(t) {
874
+ var _this_elementProperties_get;
875
+ return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : y$1;
876
+ }
877
+ },
878
+ {
879
+ key: "_$Ei",
880
+ value: function _$Ei() {
881
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
882
+ var t = n$1(this);
883
+ t.finalize(), void 0 !== t.l && (this.l = _to_consumable_array$1(t.l)), this.elementProperties = new Map(t.elementProperties);
884
+ }
885
+ },
886
+ {
887
+ key: "finalize",
888
+ value: function finalize() {
889
+ if (this.hasOwnProperty(d$1("finalized"))) return;
890
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
891
+ var t = this.properties, s = _to_consumable_array$1(h$1(t)).concat(_to_consumable_array$1(o$1(t)));
892
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
893
+ try {
894
+ for(var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
895
+ var i = _step.value;
896
+ this.createProperty(i, t[i]);
897
+ }
898
+ } catch (err) {
899
+ _didIteratorError = true;
900
+ _iteratorError = err;
901
+ } finally{
902
+ try {
903
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
904
+ _iterator.return();
905
+ }
906
+ } finally{
907
+ if (_didIteratorError) {
908
+ throw _iteratorError;
909
+ }
910
+ }
911
+ }
912
+ }
913
+ var t1 = this[Symbol.metadata];
914
+ if (null !== t1) {
915
+ var s1 = litPropertyMetadata.get(t1);
916
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
917
+ if (void 0 !== s1) try {
918
+ for(var _iterator1 = s1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
919
+ var _step_value = _sliced_to_array$1(_step1.value, 2), t2 = _step_value[0], i1 = _step_value[1];
920
+ this.elementProperties.set(t2, i1);
921
+ }
922
+ } catch (err) {
923
+ _didIteratorError1 = true;
924
+ _iteratorError1 = err;
925
+ } finally{
926
+ try {
927
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
928
+ _iterator1.return();
929
+ }
930
+ } finally{
931
+ if (_didIteratorError1) {
932
+ throw _iteratorError1;
933
+ }
934
+ }
935
+ }
936
+ }
937
+ this._$Eh = new Map;
938
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
939
+ try {
940
+ for(var _iterator2 = this.elementProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
941
+ var _step_value1 = _sliced_to_array$1(_step2.value, 2), t3 = _step_value1[0], s2 = _step_value1[1];
942
+ var i2 = this._$Eu(t3, s2);
943
+ void 0 !== i2 && this._$Eh.set(i2, t3);
944
+ }
945
+ } catch (err) {
946
+ _didIteratorError2 = true;
947
+ _iteratorError2 = err;
948
+ } finally{
949
+ try {
950
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
951
+ _iterator2.return();
952
+ }
953
+ } finally{
954
+ if (_didIteratorError2) {
955
+ throw _iteratorError2;
956
+ }
957
+ }
958
+ }
959
+ this.elementStyles = this.finalizeStyles(this.styles);
960
+ }
961
+ },
962
+ {
963
+ key: "finalizeStyles",
964
+ value: function finalizeStyles(s) {
965
+ var i = [];
966
+ if (Array.isArray(s)) {
967
+ var e = new Set(s.flat(1 / 0).reverse());
968
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
969
+ try {
970
+ for(var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
971
+ var _$s = _step.value;
972
+ i.unshift(c$2(_$s));
973
+ }
974
+ } catch (err) {
975
+ _didIteratorError = true;
976
+ _iteratorError = err;
977
+ } finally{
978
+ try {
979
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
980
+ _iterator.return();
981
+ }
982
+ } finally{
983
+ if (_didIteratorError) {
984
+ throw _iteratorError;
985
+ }
986
+ }
987
+ }
988
+ } else void 0 !== s && i.push(c$2(s));
989
+ return i;
990
+ }
991
+ },
992
+ {
993
+ key: "_$Eu",
994
+ value: function _$Eu(t, s) {
995
+ var i = s.attribute;
996
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
997
+ }
998
+ }
999
+ ]);
1000
+ return b;
1001
+ }(_wrap_native_super(HTMLElement));
1002
+ var _reactiveElementVersions;
1003
+ b.elementStyles = [], b.shadowRootOptions = {
1004
+ mode: "open"
1005
+ }, b[d$1("elementProperties")] = new Map, b[d$1("finalized")] = new Map, p$1 === null || p$1 === void 0 ? void 0 : p$1({
1006
+ ReactiveElement: b
1007
+ }), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.0.4");
1008
+
1009
+ /**
1010
+ * @license
1011
+ * Copyright 2017 Google LLC
1012
+ * SPDX-License-Identifier: BSD-3-Clause
1013
+ */ function _array_like_to_array(arr, len) {
1014
+ if (len == null || len > arr.length) len = arr.length;
1015
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1016
+ return arr2;
1017
+ }
1018
+ function _array_with_holes(arr) {
1019
+ if (Array.isArray(arr)) return arr;
1020
+ }
1021
+ function _array_without_holes(arr) {
1022
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
1023
+ }
1024
+ function _assert_this_initialized$1(self) {
1025
+ if (self === void 0) {
1026
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1027
+ }
1028
+ return self;
1029
+ }
1030
+ function _class_call_check$1(instance, Constructor) {
1031
+ if (!(instance instanceof Constructor)) {
1032
+ throw new TypeError("Cannot call a class as a function");
1033
+ }
1034
+ }
1035
+ function _defineProperties$1(target, props) {
1036
+ for(var i = 0; i < props.length; i++){
1037
+ var descriptor = props[i];
1038
+ descriptor.enumerable = descriptor.enumerable || false;
1039
+ descriptor.configurable = true;
1040
+ if ("value" in descriptor) descriptor.writable = true;
1041
+ Object.defineProperty(target, descriptor.key, descriptor);
1042
+ }
1043
+ }
1044
+ function _create_class$1(Constructor, protoProps, staticProps) {
1045
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
1046
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
1047
+ return Constructor;
1048
+ }
1049
+ function _get_prototype_of$1(o) {
1050
+ _get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1051
+ return o.__proto__ || Object.getPrototypeOf(o);
1052
+ };
1053
+ return _get_prototype_of$1(o);
1054
+ }
1055
+ function _inherits$1(subClass, superClass) {
1056
+ if (typeof superClass !== "function" && superClass !== null) {
1057
+ throw new TypeError("Super expression must either be null or a function");
1058
+ }
1059
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1060
+ constructor: {
1061
+ value: subClass,
1062
+ writable: true,
1063
+ configurable: true
1064
+ }
1065
+ });
1066
+ if (superClass) _set_prototype_of$1(subClass, superClass);
1067
+ }
1068
+ function _iterable_to_array(iter) {
1069
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1070
+ }
1071
+ function _iterable_to_array_limit(arr, i) {
1072
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1073
+ if (_i == null) return;
1074
+ var _arr = [];
1075
+ var _n = true;
1076
+ var _d = false;
1077
+ var _s, _e;
1078
+ try {
1079
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1080
+ _arr.push(_s.value);
1081
+ if (i && _arr.length === i) break;
1082
+ }
1083
+ } catch (err) {
1084
+ _d = true;
1085
+ _e = err;
1086
+ } finally{
1087
+ try {
1088
+ if (!_n && _i["return"] != null) _i["return"]();
1089
+ } finally{
1090
+ if (_d) throw _e;
1091
+ }
1092
+ }
1093
+ return _arr;
1094
+ }
1095
+ function _non_iterable_rest() {
1096
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1097
+ }
1098
+ function _non_iterable_spread() {
1099
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1100
+ }
1101
+ function _possible_constructor_return$1(self, call) {
1102
+ if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
1103
+ return call;
1104
+ }
1105
+ return _assert_this_initialized$1(self);
1106
+ }
1107
+ function _set_prototype_of$1(o, p) {
1108
+ _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1109
+ o.__proto__ = p;
1110
+ return o;
1111
+ };
1112
+ return _set_prototype_of$1(o, p);
1113
+ }
1114
+ function _sliced_to_array(arr, i) {
1115
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1116
+ }
1117
+ function _to_consumable_array(arr) {
1118
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1119
+ }
1120
+ function _type_of$1(obj) {
1121
+ "@swc/helpers - typeof";
1122
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1123
+ }
1124
+ function _unsupported_iterable_to_array(o, minLen) {
1125
+ if (!o) return;
1126
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1127
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1128
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1129
+ if (n === "Map" || n === "Set") return Array.from(n);
1130
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1131
+ }
1132
+ function _is_native_reflect_construct$1() {
1133
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1134
+ if (Reflect.construct.sham) return false;
1135
+ if (typeof Proxy === "function") return true;
1136
+ try {
1137
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1138
+ return true;
1139
+ } catch (e) {
1140
+ return false;
1141
+ }
1142
+ }
1143
+ function _create_super$1(Derived) {
1144
+ var hasNativeReflectConstruct = _is_native_reflect_construct$1();
1145
+ return function _createSuperInternal() {
1146
+ var Super = _get_prototype_of$1(Derived), result;
1147
+ if (hasNativeReflectConstruct) {
1148
+ var NewTarget = _get_prototype_of$1(this).constructor;
1149
+ result = Reflect.construct(Super, arguments, NewTarget);
1150
+ } else {
1151
+ result = Super.apply(this, arguments);
1152
+ }
1153
+ return _possible_constructor_return$1(this, result);
1154
+ };
1155
+ }
1156
+ var _t;
1157
+ var t$1 = globalThis, i = t$1.trustedTypes, s$1 = i ? i.createPolicy("lit-html", {
1158
+ createHTML: function(t) {
1159
+ return t;
1160
+ }
1161
+ }) : void 0, e$2 = "$lit$", h = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o = "?" + h, n = "<".concat(o, ">"), r$1 = document, l = function() {
1162
+ return r$1.createComment("");
1163
+ }, c = function(t) {
1164
+ return null === t || "object" != typeof t && "function" != typeof t;
1165
+ }, a = Array.isArray, u = function(t) {
1166
+ return a(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
1167
+ }, d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(">|".concat(d, "(?:([^\\s\"'>=/]+)(").concat(d, "*=").concat(d, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = function(t) {
1168
+ return function(i) {
1169
+ for(var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
1170
+ s[_key - 1] = arguments[_key];
1171
+ }
1172
+ return {
1173
+ _$litType$: t,
1174
+ strings: i,
1175
+ values: s
1176
+ };
1177
+ };
1178
+ }, x = y(1), w = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), A = new WeakMap, E = r$1.createTreeWalker(r$1, 129);
1179
+ function C(t, i) {
1180
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1181
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
1182
+ }
1183
+ var P = function(t, i) {
1184
+ var s = t.length - 1, o = [];
1185
+ var r, l = 2 === i ? "<svg>" : "", c = f;
1186
+ for(var _$i = 0; _$i < s; _$i++){
1187
+ var s1 = t[_$i];
1188
+ var a = void 0, u = void 0, d = -1, y = 0;
1189
+ for(; y < s1.length && (c.lastIndex = y, u = c.exec(s1), null !== u);)y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r !== null && r !== void 0 ? r : f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
1190
+ var x = c === m && t[_$i + 1].startsWith("/>") ? " " : "";
1191
+ l += c === f ? s1 + n : d >= 0 ? (o.push(a), s1.slice(0, d) + e$2 + s1.slice(d) + h + x) : s1 + h + (-2 === d ? _$i : x);
1192
+ }
1193
+ return [
1194
+ C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")),
1195
+ o
1196
+ ];
1197
+ };
1198
+ var V = /*#__PURE__*/ function() {
1199
+ function V(param, n) {
1200
+ var t = param.strings, s = param._$litType$;
1201
+ _class_call_check$1(this, V);
1202
+ var r;
1203
+ this.parts = [];
1204
+ var c = 0, a = 0;
1205
+ var u = t.length - 1, d = this.parts, _P = _sliced_to_array(P(t, s), 2), f = _P[0], v = _P[1];
1206
+ if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
1207
+ var _t;
1208
+ var t1 = this.el.content.firstChild;
1209
+ (_t = t1).replaceWith.apply(_t, _to_consumable_array(t1.childNodes));
1210
+ }
1211
+ for(; null !== (r = E.nextNode()) && d.length < u;){
1212
+ if (1 === r.nodeType) {
1213
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1214
+ if (r.hasAttributes()) try {
1215
+ for(var _iterator = r.getAttributeNames()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1216
+ var t2 = _step.value;
1217
+ if (t2.endsWith(e$2)) {
1218
+ var i1 = v[a++], s1 = r.getAttribute(t2).split(h), e1 = /([.?@])?(.*)/.exec(i1);
1219
+ d.push({
1220
+ type: 1,
1221
+ index: c,
1222
+ name: e1[2],
1223
+ strings: s1,
1224
+ ctor: "." === e1[1] ? k : "?" === e1[1] ? H : "@" === e1[1] ? I : R
1225
+ }), r.removeAttribute(t2);
1226
+ } else t2.startsWith(h) && (d.push({
1227
+ type: 6,
1228
+ index: c
1229
+ }), r.removeAttribute(t2));
1230
+ }
1231
+ } catch (err) {
1232
+ _didIteratorError = true;
1233
+ _iteratorError = err;
1234
+ } finally{
1235
+ try {
1236
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1237
+ _iterator.return();
1238
+ }
1239
+ } finally{
1240
+ if (_didIteratorError) {
1241
+ throw _iteratorError;
1242
+ }
1243
+ }
1244
+ }
1245
+ if ($.test(r.tagName)) {
1246
+ var t3 = r.textContent.split(h), s2 = t3.length - 1;
1247
+ if (s2 > 0) {
1248
+ r.textContent = i ? i.emptyScript : "";
1249
+ for(var i2 = 0; i2 < s2; i2++)r.append(t3[i2], l()), E.nextNode(), d.push({
1250
+ type: 2,
1251
+ index: ++c
1252
+ });
1253
+ r.append(t3[s2], l());
1254
+ }
1255
+ }
1256
+ } else if (8 === r.nodeType) if (r.data === o) d.push({
1257
+ type: 2,
1258
+ index: c
1259
+ });
1260
+ else {
1261
+ var t4 = -1;
1262
+ for(; -1 !== (t4 = r.data.indexOf(h, t4 + 1));)d.push({
1263
+ type: 7,
1264
+ index: c
1265
+ }), t4 += h.length - 1;
1266
+ }
1267
+ c++;
1268
+ }
1269
+ }
1270
+ _create_class$1(V, null, [
1271
+ {
1272
+ key: "createElement",
1273
+ value: function createElement(t, i) {
1274
+ var s = r$1.createElement("template");
1275
+ return s.innerHTML = t, s;
1276
+ }
1277
+ }
1278
+ ]);
1279
+ return V;
1280
+ }();
1281
+ function N(t, i) {
1282
+ var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, e = arguments.length > 3 ? arguments[3] : void 0;
1283
+ var _s__$Co, _h__$AO;
1284
+ var _s;
1285
+ if (i === w) return i;
1286
+ var h = void 0 !== e ? (_s__$Co = s._$Co) === null || _s__$Co === void 0 ? void 0 : _s__$Co[e] : s._$Cl;
1287
+ var o = c(i) ? void 0 : i._$litDirective$;
1288
+ var __$Co;
1289
+ return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, !1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = N(t, h._$AS(t, i.values), h, e)), i;
1290
+ }
1291
+ var S = /*#__PURE__*/ function() {
1292
+ function S(t, i) {
1293
+ _class_call_check$1(this, S);
1294
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1295
+ }
1296
+ _create_class$1(S, [
1297
+ {
1298
+ key: "parentNode",
1299
+ get: function get() {
1300
+ return this._$AM.parentNode;
1301
+ }
1302
+ },
1303
+ {
1304
+ key: "_$AU",
1305
+ get: function get() {
1306
+ return this._$AM._$AU;
1307
+ }
1308
+ },
1309
+ {
1310
+ key: "u",
1311
+ value: function u(t) {
1312
+ var _t_creationScope;
1313
+ var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$1).importNode(i, !0);
1314
+ E.currentNode = e;
1315
+ var h = E.nextNode(), o = 0, n = 0, l = s[0];
1316
+ for(; void 0 !== l;){
1317
+ if (o === l.index) {
1318
+ var i1 = void 0;
1319
+ 2 === l.type ? i1 = new M(h, h.nextSibling, this, t) : 1 === l.type ? i1 = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i1 = new L(h, this, t)), this._$AV.push(i1), l = s[++n];
1320
+ }
1321
+ o !== (l === null || l === void 0 ? void 0 : l.index) && (h = E.nextNode(), o++);
1322
+ }
1323
+ return E.currentNode = r$1, e;
1324
+ }
1325
+ },
1326
+ {
1327
+ key: "p",
1328
+ value: function p(t) {
1329
+ var i = 0;
1330
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1331
+ try {
1332
+ for(var _iterator = this._$AV[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1333
+ var s = _step.value;
1334
+ void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
1335
+ }
1336
+ } catch (err) {
1337
+ _didIteratorError = true;
1338
+ _iteratorError = err;
1339
+ } finally{
1340
+ try {
1341
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1342
+ _iterator.return();
1343
+ }
1344
+ } finally{
1345
+ if (_didIteratorError) {
1346
+ throw _iteratorError;
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1351
+ }
1352
+ ]);
1353
+ return S;
1354
+ }();
1355
+ var M = /*#__PURE__*/ function() {
1356
+ function M(t, i, s, e) {
1357
+ _class_call_check$1(this, M);
1358
+ var _e_isConnected;
1359
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : !0;
1360
+ }
1361
+ _create_class$1(M, [
1362
+ {
1363
+ key: "_$AU",
1364
+ get: function get() {
1365
+ var _this__$AM;
1366
+ var _this__$AM__$AU;
1367
+ return (_this__$AM__$AU = (_this__$AM = this._$AM) === null || _this__$AM === void 0 ? void 0 : _this__$AM._$AU) !== null && _this__$AM__$AU !== void 0 ? _this__$AM__$AU : this._$Cv;
1368
+ }
1369
+ },
1370
+ {
1371
+ key: "parentNode",
1372
+ get: function get() {
1373
+ var t = this._$AA.parentNode;
1374
+ var i = this._$AM;
1375
+ return void 0 !== i && 11 === (t === null || t === void 0 ? void 0 : t.nodeType) && (t = i.parentNode), t;
1376
+ }
1377
+ },
1378
+ {
1379
+ key: "startNode",
1380
+ get: function get() {
1381
+ return this._$AA;
1382
+ }
1383
+ },
1384
+ {
1385
+ key: "endNode",
1386
+ get: function get() {
1387
+ return this._$AB;
1388
+ }
1389
+ },
1390
+ {
1391
+ key: "_$AI",
1392
+ value: function _$AI(t) {
1393
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1394
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
1395
+ }
1396
+ },
1397
+ {
1398
+ key: "S",
1399
+ value: function S(t) {
1400
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
1401
+ }
1402
+ },
1403
+ {
1404
+ key: "T",
1405
+ value: function T(t) {
1406
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
1407
+ }
1408
+ },
1409
+ {
1410
+ key: "_",
1411
+ value: function _(t) {
1412
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
1413
+ }
1414
+ },
1415
+ {
1416
+ key: "$",
1417
+ value: function $(t) {
1418
+ var _this__$AH;
1419
+ var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
1420
+ if (((_this__$AH = this._$AH) === null || _this__$AH === void 0 ? void 0 : _this__$AH._$AD) === e) this._$AH.p(i);
1421
+ else {
1422
+ var _$t = new S(e, this), s1 = _$t.u(this.options);
1423
+ _$t.p(i), this.T(s1), this._$AH = _$t;
1424
+ }
1425
+ }
1426
+ },
1427
+ {
1428
+ key: "_$AC",
1429
+ value: function _$AC(t) {
1430
+ var i = A.get(t.strings);
1431
+ return void 0 === i && A.set(t.strings, i = new V(t)), i;
1432
+ }
1433
+ },
1434
+ {
1435
+ key: "k",
1436
+ value: function k(t) {
1437
+ a(this._$AH) || (this._$AH = [], this._$AR());
1438
+ var i = this._$AH;
1439
+ var s, e = 0;
1440
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1441
+ try {
1442
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1443
+ var h = _step.value;
1444
+ e === i.length ? i.push(s = new M(this.S(l()), this.S(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
1445
+ }
1446
+ } catch (err) {
1447
+ _didIteratorError = true;
1448
+ _iteratorError = err;
1449
+ } finally{
1450
+ try {
1451
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1452
+ _iterator.return();
1453
+ }
1454
+ } finally{
1455
+ if (_didIteratorError) {
1456
+ throw _iteratorError;
1457
+ }
1458
+ }
1459
+ }
1460
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1461
+ }
1462
+ },
1463
+ {
1464
+ key: "_$AR",
1465
+ value: function _$AR() {
1466
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, i = arguments.length > 1 ? arguments[1] : void 0;
1467
+ var _this__$AP, _this;
1468
+ for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, !1, !0, i); t && t !== this._$AB;){
1469
+ var i1 = t.nextSibling;
1470
+ t.remove(), t = i1;
1471
+ }
1472
+ }
1473
+ },
1474
+ {
1475
+ key: "setConnected",
1476
+ value: function setConnected(t) {
1477
+ var _this__$AP, _this;
1478
+ void 0 === this._$AM && (this._$Cv = t, (_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, t));
1479
+ }
1480
+ }
1481
+ ]);
1482
+ return M;
1483
+ }();
1484
+ var R = /*#__PURE__*/ function() {
1485
+ function R(t, i, s, e, h) {
1486
+ _class_call_check$1(this, R);
1487
+ this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = T;
1488
+ }
1489
+ _create_class$1(R, [
1490
+ {
1491
+ key: "tagName",
1492
+ get: function get() {
1493
+ return this.element.tagName;
1494
+ }
1495
+ },
1496
+ {
1497
+ key: "_$AU",
1498
+ get: function get() {
1499
+ return this._$AM._$AU;
1500
+ }
1501
+ },
1502
+ {
1503
+ key: "_$AI",
1504
+ value: function _$AI(t) {
1505
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this, s = arguments.length > 2 ? arguments[2] : void 0, e = arguments.length > 3 ? arguments[3] : void 0;
1506
+ var h = this.strings;
1507
+ var o = !1;
1508
+ if (void 0 === h) t = N(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== w, o && (this._$AH = t);
1509
+ else {
1510
+ var e1 = t;
1511
+ var n, r;
1512
+ for(t = h[0], n = 0; n < h.length - 1; n++)r = N(this, e1[s + n], i, n), r === w && (r = this._$AH[n]), o || (o = !c(r) || r !== this._$AH[n]), r === T ? t = T : t !== T && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
1513
+ }
1514
+ o && !e && this.j(t);
1515
+ }
1516
+ },
1517
+ {
1518
+ key: "j",
1519
+ value: function j(t) {
1520
+ t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
1521
+ }
1522
+ }
1523
+ ]);
1524
+ return R;
1525
+ }();
1526
+ var k = /*#__PURE__*/ function(R) {
1527
+ _inherits$1(k, R);
1528
+ var _super = _create_super$1(k);
1529
+ function k() {
1530
+ _class_call_check$1(this, k);
1531
+ var _this;
1532
+ _this = _super.call.apply(_super, [
1533
+ this
1534
+ ].concat(Array.prototype.slice.call(arguments))), _this.type = 3;
1535
+ return _possible_constructor_return$1(_this);
1536
+ }
1537
+ _create_class$1(k, [
1538
+ {
1539
+ key: "j",
1540
+ value: function j(t) {
1541
+ this.element[this.name] = t === T ? void 0 : t;
1542
+ }
1543
+ }
1544
+ ]);
1545
+ return k;
1546
+ }(R);
1547
+ var H = /*#__PURE__*/ function(R) {
1548
+ _inherits$1(H, R);
1549
+ var _super = _create_super$1(H);
1550
+ function H() {
1551
+ _class_call_check$1(this, H);
1552
+ var _this;
1553
+ _this = _super.call.apply(_super, [
1554
+ this
1555
+ ].concat(Array.prototype.slice.call(arguments))), _this.type = 4;
1556
+ return _possible_constructor_return$1(_this);
1557
+ }
1558
+ _create_class$1(H, [
1559
+ {
1560
+ key: "j",
1561
+ value: function j(t) {
1562
+ this.element.toggleAttribute(this.name, !!t && t !== T);
1563
+ }
1564
+ }
1565
+ ]);
1566
+ return H;
1567
+ }(R);
1568
+ var I = /*#__PURE__*/ function(R) {
1569
+ _inherits$1(I, R);
1570
+ var _super = _create_super$1(I);
1571
+ function I(t, i, s, e, h) {
1572
+ _class_call_check$1(this, I);
1573
+ var _this;
1574
+ _this = _super.call(this, t, i, s, e, h), _this.type = 5;
1575
+ return _possible_constructor_return$1(_this);
1576
+ }
1577
+ _create_class$1(I, [
1578
+ {
1579
+ key: "_$AI",
1580
+ value: function _$AI(t) {
1581
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1582
+ var _N;
1583
+ if ((t = (_N = N(this, t, i, 0)) !== null && _N !== void 0 ? _N : T) === w) return;
1584
+ var s = this._$AH, e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== T && (s === T || e);
1585
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1586
+ }
1587
+ },
1588
+ {
1589
+ key: "handleEvent",
1590
+ value: function handleEvent(t) {
1591
+ var _this_options;
1592
+ var _this_options_host;
1593
+ "function" == typeof this._$AH ? this._$AH.call((_this_options_host = (_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.host) !== null && _this_options_host !== void 0 ? _this_options_host : this.element, t) : this._$AH.handleEvent(t);
1594
+ }
1595
+ }
1596
+ ]);
1597
+ return I;
1598
+ }(R);
1599
+ var L = /*#__PURE__*/ function() {
1600
+ function L(t, i, s) {
1601
+ _class_call_check$1(this, L);
1602
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1603
+ }
1604
+ _create_class$1(L, [
1605
+ {
1606
+ key: "_$AU",
1607
+ get: function get() {
1608
+ return this._$AM._$AU;
1609
+ }
1610
+ },
1611
+ {
1612
+ key: "_$AI",
1613
+ value: function _$AI(t) {
1614
+ N(this, t);
1615
+ }
1616
+ }
1617
+ ]);
1618
+ return L;
1619
+ }();
1620
+ var Z = t$1.litHtmlPolyfillSupport;
1621
+ var _litHtmlVersions;
1622
+ Z === null || Z === void 0 ? void 0 : Z(V, M), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.1.4");
1623
+ var j = function(t, i, s) {
1624
+ var _s_renderBefore;
1625
+ var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
1626
+ var h = e._$litPart$;
1627
+ if (void 0 === h) {
1628
+ var _s_renderBefore1;
1629
+ var _$t = (_s_renderBefore1 = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore1 !== void 0 ? _s_renderBefore1 : null;
1630
+ e._$litPart$ = h = new M(i.insertBefore(l(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
1631
+ }
1632
+ return h._$AI(t), h;
1633
+ };
1634
+
1635
+ function _assert_this_initialized(self) {
1636
+ if (self === void 0) {
1637
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1638
+ }
1639
+ return self;
1640
+ }
1641
+ function _class_call_check(instance, Constructor) {
1642
+ if (!(instance instanceof Constructor)) {
1643
+ throw new TypeError("Cannot call a class as a function");
1644
+ }
1645
+ }
1646
+ function _defineProperties(target, props) {
1647
+ for(var i = 0; i < props.length; i++){
1648
+ var descriptor = props[i];
1649
+ descriptor.enumerable = descriptor.enumerable || false;
1650
+ descriptor.configurable = true;
1651
+ if ("value" in descriptor) descriptor.writable = true;
1652
+ Object.defineProperty(target, descriptor.key, descriptor);
1653
+ }
1654
+ }
1655
+ function _create_class(Constructor, protoProps, staticProps) {
1656
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1657
+ if (staticProps) _defineProperties(Constructor, staticProps);
1658
+ return Constructor;
1659
+ }
1660
+ function _get(target, property, receiver) {
1661
+ if (typeof Reflect !== "undefined" && Reflect.get) {
1662
+ _get = Reflect.get;
1663
+ } else {
1664
+ _get = function get(target, property, receiver) {
1665
+ var base = _super_prop_base(target, property);
1666
+ if (!base) return;
1667
+ var desc = Object.getOwnPropertyDescriptor(base, property);
1668
+ if (desc.get) {
1669
+ return desc.get.call(receiver || target);
1670
+ }
1671
+ return desc.value;
1672
+ };
1673
+ }
1674
+ return _get(target, property, receiver || target);
1675
+ }
1676
+ function _get_prototype_of(o) {
1677
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1678
+ return o.__proto__ || Object.getPrototypeOf(o);
1679
+ };
1680
+ return _get_prototype_of(o);
1681
+ }
1682
+ function _inherits(subClass, superClass) {
1683
+ if (typeof superClass !== "function" && superClass !== null) {
1684
+ throw new TypeError("Super expression must either be null or a function");
1685
+ }
1686
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1687
+ constructor: {
1688
+ value: subClass,
1689
+ writable: true,
1690
+ configurable: true
1691
+ }
1692
+ });
1693
+ if (superClass) _set_prototype_of(subClass, superClass);
1694
+ }
1695
+ function _possible_constructor_return(self, call) {
1696
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
1697
+ return call;
1698
+ }
1699
+ return _assert_this_initialized(self);
1700
+ }
1701
+ function _set_prototype_of(o, p) {
1702
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1703
+ o.__proto__ = p;
1704
+ return o;
1705
+ };
1706
+ return _set_prototype_of(o, p);
1707
+ }
1708
+ function _super_prop_base(object, property) {
1709
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
1710
+ object = _get_prototype_of(object);
1711
+ if (object === null) break;
1712
+ }
1713
+ return object;
1714
+ }
1715
+ function _type_of(obj) {
1716
+ "@swc/helpers - typeof";
1717
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1718
+ }
1719
+ function _is_native_reflect_construct() {
1720
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1721
+ if (Reflect.construct.sham) return false;
1722
+ if (typeof Proxy === "function") return true;
1723
+ try {
1724
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1725
+ return true;
1726
+ } catch (e) {
1727
+ return false;
1728
+ }
1729
+ }
1730
+ function _create_super(Derived) {
1731
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
1732
+ return function _createSuperInternal() {
1733
+ var Super = _get_prototype_of(Derived), result;
1734
+ if (hasNativeReflectConstruct) {
1735
+ var NewTarget = _get_prototype_of(this).constructor;
1736
+ result = Reflect.construct(Super, arguments, NewTarget);
1737
+ } else {
1738
+ result = Super.apply(this, arguments);
1739
+ }
1740
+ return _possible_constructor_return(this, result);
1741
+ };
1742
+ }
1743
+ var _globalThis_litElementHydrateSupport, _globalThis;
1744
+ var _globalThis1;
1745
+ /**
1746
+ * @license
1747
+ * Copyright 2017 Google LLC
1748
+ * SPDX-License-Identifier: BSD-3-Clause
1749
+ */ var s = /*#__PURE__*/ function(t) {
1750
+ _inherits(s, t);
1751
+ var _super = _create_super(s);
1752
+ function s() {
1753
+ _class_call_check(this, s);
1754
+ var _this;
1755
+ _this = _super.call.apply(_super, [
1756
+ this
1757
+ ].concat(Array.prototype.slice.call(arguments))), _this.renderOptions = {
1758
+ host: _assert_this_initialized(_this)
1759
+ }, _this._$Do = void 0;
1760
+ return _possible_constructor_return(_this);
1761
+ }
1762
+ _create_class(s, [
1763
+ {
1764
+ key: "createRenderRoot",
1765
+ value: function createRenderRoot() {
1766
+ var _this_renderOptions;
1767
+ var _$t = _get(_get_prototype_of(s.prototype), "createRenderRoot", this).call(this);
1768
+ var _renderBefore;
1769
+ return (_renderBefore = (_this_renderOptions = this.renderOptions).renderBefore) !== null && _renderBefore !== void 0 ? _renderBefore : _this_renderOptions.renderBefore = _$t.firstChild, _$t;
1770
+ }
1771
+ },
1772
+ {
1773
+ key: "update",
1774
+ value: function update(t) {
1775
+ var i = this.render();
1776
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(s.prototype), "update", this).call(this, t), this._$Do = j(i, this.renderRoot, this.renderOptions);
1777
+ }
1778
+ },
1779
+ {
1780
+ key: "connectedCallback",
1781
+ value: function connectedCallback() {
1782
+ var _this__$Do;
1783
+ _get(_get_prototype_of(s.prototype), "connectedCallback", this).call(this), (_this__$Do = this._$Do) === null || _this__$Do === void 0 ? void 0 : _this__$Do.setConnected(!0);
1784
+ }
1785
+ },
1786
+ {
1787
+ key: "disconnectedCallback",
1788
+ value: function disconnectedCallback() {
1789
+ var _this__$Do;
1790
+ _get(_get_prototype_of(s.prototype), "disconnectedCallback", this).call(this), (_this__$Do = this._$Do) === null || _this__$Do === void 0 ? void 0 : _this__$Do.setConnected(!1);
1791
+ }
1792
+ },
1793
+ {
1794
+ key: "render",
1795
+ value: function render() {
1796
+ return w;
1797
+ }
1798
+ }
1799
+ ]);
1800
+ return s;
1801
+ }(b);
1802
+ s._$litElement$ = !0, s["finalized"] = !0, (_globalThis_litElementHydrateSupport = (_globalThis = globalThis).litElementHydrateSupport) === null || _globalThis_litElementHydrateSupport === void 0 ? void 0 : _globalThis_litElementHydrateSupport.call(_globalThis, {
1803
+ LitElement: s
1804
+ });
1805
+ var r = globalThis.litElementPolyfillSupport;
1806
+ r === null || r === void 0 ? void 0 : r({
1807
+ LitElement: s
1808
+ });
1809
+ var _litElementVersions;
1810
+ ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.6");
1811
+
1812
+ /**
1813
+ * @license
1814
+ * Copyright 2017 Google LLC
1815
+ * SPDX-License-Identifier: BSD-3-Clause
1816
+ */ var t = function(t) {
1817
+ return function(e, o) {
1818
+ void 0 !== o ? o.addInitializer(function() {
1819
+ customElements.define(t, e);
1820
+ }) : customElements.define(t, e);
1821
+ };
1822
+ };
1823
+
1824
+ /**
1825
+ * @license
1826
+ * Copyright 2017 Google LLC
1827
+ * SPDX-License-Identifier: BSD-3-Clause
1828
+ */ var e$1 = function(e, t, c) {
1829
+ return c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c;
1830
+ };
1831
+
1832
+ /**
1833
+ * @license
1834
+ * Copyright 2017 Google LLC
1835
+ * SPDX-License-Identifier: BSD-3-Clause
1836
+ */ function e(e, r) {
1837
+ return function(n, s, i) {
1838
+ var o = function(t) {
1839
+ var _t_renderRoot;
1840
+ var _t_renderRoot_querySelector;
1841
+ return (_t_renderRoot_querySelector = (_t_renderRoot = t.renderRoot) === null || _t_renderRoot === void 0 ? void 0 : _t_renderRoot.querySelector(e)) !== null && _t_renderRoot_querySelector !== void 0 ? _t_renderRoot_querySelector : null;
1842
+ };
1843
+ if (r) {
1844
+ var _ref = "object" == typeof s ? n : i !== null && i !== void 0 ? i : function() {
1845
+ var _$t = Symbol();
1846
+ return {
1847
+ get: function get() {
1848
+ return this[_$t];
1849
+ },
1850
+ set: function set(e) {
1851
+ this[_$t] = e;
1852
+ }
1853
+ };
1854
+ }(), e1 = _ref.get, _$r = _ref.set;
1855
+ return e$1(n, s, {
1856
+ get: function get() {
1857
+ var _$t = e1.call(this);
1858
+ return void 0 === _$t && (_$t = o(this), (null !== _$t || this.hasUpdated) && _$r.call(this, _$t)), _$t;
1859
+ }
1860
+ });
1861
+ }
1862
+ return e$1(n, s, {
1863
+ get: function get() {
1864
+ return o(this);
1865
+ }
1866
+ });
1867
+ };
1868
+ }
1869
+
1870
+ class Heygen extends s {
1871
+ updateStatus(status, data) {
1872
+ this.dispatchEvent(new CustomEvent('status', {
1873
+ detail: {
1874
+ status,
1875
+ data
1876
+ }
1877
+ }));
1878
+ }
1879
+ async start(sessionInfo) {
1880
+ this.updateStatus('SESSION_CREATING');
1881
+ // call the new interface to get the server's offer SDP and ICE server to create a new RTCPeerConnection
1882
+ const { sdp: serverSdp, ice_servers2: iceServers } = sessionInfo;
1883
+ // Create a new RTCPeerConnection
1884
+ this.peerConnection = new RTCPeerConnection({
1885
+ iceServers: iceServers
1886
+ });
1887
+ // When audio and video streams are received, display them in the video element
1888
+ this.peerConnection.ontrack = (event)=>{
1889
+ if (event.track.kind === 'audio' || event.track.kind === 'video') {
1890
+ this.mediaElement.srcObject = event.streams[0];
1891
+ }
1892
+ };
1893
+ // When receiving a message, display it in the status element
1894
+ this.peerConnection.ondatachannel = (event)=>{
1895
+ const dataChannel = event.channel;
1896
+ dataChannel.onmessage = (message)=>{
1897
+ this.dispatchEvent(new CustomEvent('message', {
1898
+ detail: {
1899
+ message: message.data
1900
+ }
1901
+ }));
1902
+ };
1903
+ };
1904
+ // Set server's SDP as remote description
1905
+ const remoteDescription = new RTCSessionDescription(serverSdp);
1906
+ await this.peerConnection.setRemoteDescription(remoteDescription);
1907
+ this.updateStatus('SESSION_CREATED');
1908
+ // Create and set local SDP description
1909
+ const localDescription = await this.peerConnection.createAnswer();
1910
+ await this.peerConnection.setLocalDescription(localDescription);
1911
+ // When ICE candidate is available, send to the server
1912
+ this.peerConnection.onicecandidate = ({ candidate })=>{
1913
+ if (candidate) {
1914
+ this.dispatchEvent(new CustomEvent('icecandidate', {
1915
+ detail: {
1916
+ sessionId: sessionInfo.session_id,
1917
+ candidate: candidate.toJSON()
1918
+ }
1919
+ }));
1920
+ }
1921
+ };
1922
+ // When ICE connection state changes, display the new state
1923
+ this.peerConnection.oniceconnectionstatechange = (event)=>{
1924
+ this.updateStatus('ICE_CONNECTION_STATE_CHANGED', this.peerConnection.iceConnectionState);
1925
+ };
1926
+ var receivers = this.peerConnection.getReceivers();
1927
+ receivers.forEach((receiver)=>{
1928
+ receiver.jitterBufferTarget = 500;
1929
+ });
1930
+ this.updateStatus('SESSION_STARTED');
1931
+ }
1932
+ async stop() {
1933
+ this.peerConnection.close();
1934
+ this.updateStatus('SESSION_STOPPED');
1935
+ }
1936
+ render() {
1937
+ return x` <video autoplay></video> `;
1938
+ }
1939
+ }
1940
+ __decorate([
1941
+ e('video'),
1942
+ __metadata("design:type", typeof HTMLVideoElement === "undefined" ? Object : HTMLVideoElement)
1943
+ ], Heygen.prototype, "mediaElement", void 0);
1944
+ Heygen = __decorate([
1945
+ t('digipair-heygen')
1946
+ ], Heygen);
1947
+
1948
+ export { Heygen };