@everymatrix/general-icon-progress-ring 1.54.0 → 1.54.4

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.
@@ -0,0 +1,535 @@
1
+ function P() {
2
+ }
3
+ function U(e) {
4
+ return e();
5
+ }
6
+ function J() {
7
+ return /* @__PURE__ */ Object.create(null);
8
+ }
9
+ function O(e) {
10
+ e.forEach(U);
11
+ }
12
+ function q(e) {
13
+ return typeof e == "function";
14
+ }
15
+ function tt(e, t) {
16
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
17
+ }
18
+ function et(e) {
19
+ return Object.keys(e).length === 0;
20
+ }
21
+ function p(e, t) {
22
+ e.appendChild(t);
23
+ }
24
+ function rt(e, t, r) {
25
+ const i = nt(e);
26
+ if (!i.getElementById(t)) {
27
+ const n = b("style");
28
+ n.id = t, n.textContent = r, it(i, n);
29
+ }
30
+ }
31
+ function nt(e) {
32
+ if (!e) return document;
33
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
34
+ return t && /** @type {ShadowRoot} */
35
+ t.host ? (
36
+ /** @type {ShadowRoot} */
37
+ t
38
+ ) : e.ownerDocument;
39
+ }
40
+ function it(e, t) {
41
+ return p(
42
+ /** @type {Document} */
43
+ e.head || e,
44
+ t
45
+ ), t.sheet;
46
+ }
47
+ function K(e, t, r) {
48
+ e.insertBefore(t, r || null);
49
+ }
50
+ function D(e) {
51
+ e.parentNode && e.parentNode.removeChild(e);
52
+ }
53
+ function b(e) {
54
+ return document.createElement(e);
55
+ }
56
+ function N(e) {
57
+ return document.createTextNode(e);
58
+ }
59
+ function st() {
60
+ return N(" ");
61
+ }
62
+ function f(e, t, r) {
63
+ r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
64
+ }
65
+ function ot(e) {
66
+ return Array.from(e.childNodes);
67
+ }
68
+ function ct(e, t) {
69
+ t = "" + t, e.data !== t && (e.data = /** @type {string} */
70
+ t);
71
+ }
72
+ function ut(e) {
73
+ const t = {};
74
+ return e.childNodes.forEach(
75
+ /** @param {Element} node */
76
+ (r) => {
77
+ t[r.slot || "default"] = !0;
78
+ }
79
+ ), t;
80
+ }
81
+ let W;
82
+ function k(e) {
83
+ W = e;
84
+ }
85
+ function lt() {
86
+ if (!W) throw new Error("Function called outside component initialization");
87
+ return W;
88
+ }
89
+ function at(e) {
90
+ lt().$$.on_mount.push(e);
91
+ }
92
+ const m = [], F = [];
93
+ let x = [];
94
+ const Z = [], dt = /* @__PURE__ */ Promise.resolve();
95
+ let I = !1;
96
+ function ft() {
97
+ I || (I = !0, dt.then(y));
98
+ }
99
+ function B(e) {
100
+ x.push(e);
101
+ }
102
+ const j = /* @__PURE__ */ new Set();
103
+ let _ = 0;
104
+ function y() {
105
+ if (_ !== 0)
106
+ return;
107
+ const e = W;
108
+ do {
109
+ try {
110
+ for (; _ < m.length; ) {
111
+ const t = m[_];
112
+ _++, k(t), ht(t.$$);
113
+ }
114
+ } catch (t) {
115
+ throw m.length = 0, _ = 0, t;
116
+ }
117
+ for (k(null), m.length = 0, _ = 0; F.length; ) F.pop()();
118
+ for (let t = 0; t < x.length; t += 1) {
119
+ const r = x[t];
120
+ j.has(r) || (j.add(r), r());
121
+ }
122
+ x.length = 0;
123
+ } while (m.length);
124
+ for (; Z.length; )
125
+ Z.pop()();
126
+ I = !1, j.clear(), k(e);
127
+ }
128
+ function ht(e) {
129
+ if (e.fragment !== null) {
130
+ e.update(), O(e.before_update);
131
+ const t = e.dirty;
132
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(B);
133
+ }
134
+ }
135
+ function $t(e) {
136
+ const t = [], r = [];
137
+ x.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : r.push(i)), r.forEach((i) => i()), x = t;
138
+ }
139
+ const gt = /* @__PURE__ */ new Set();
140
+ function pt(e, t) {
141
+ e && e.i && (gt.delete(e), e.i(t));
142
+ }
143
+ function bt(e, t, r) {
144
+ const { fragment: i, after_update: n } = e.$$;
145
+ i && i.m(t, r), B(() => {
146
+ const s = e.$$.on_mount.map(U).filter(q);
147
+ e.$$.on_destroy ? e.$$.on_destroy.push(...s) : O(s), e.$$.on_mount = [];
148
+ }), n.forEach(B);
149
+ }
150
+ function _t(e, t) {
151
+ const r = e.$$;
152
+ r.fragment !== null && ($t(r.after_update), O(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
153
+ }
154
+ function mt(e, t) {
155
+ e.$$.dirty[0] === -1 && (m.push(e), ft(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
156
+ }
157
+ function yt(e, t, r, i, n, s, u = null, o = [-1]) {
158
+ const l = W;
159
+ k(e);
160
+ const c = e.$$ = {
161
+ fragment: null,
162
+ ctx: [],
163
+ // state
164
+ props: s,
165
+ update: P,
166
+ not_equal: n,
167
+ bound: J(),
168
+ // lifecycle
169
+ on_mount: [],
170
+ on_destroy: [],
171
+ on_disconnect: [],
172
+ before_update: [],
173
+ after_update: [],
174
+ context: new Map(t.context || (l ? l.$$.context : [])),
175
+ // everything else
176
+ callbacks: J(),
177
+ dirty: o,
178
+ skip_bound: !1,
179
+ root: t.target || l.$$.root
180
+ };
181
+ u && u(c.root);
182
+ let h = !1;
183
+ if (c.ctx = r(e, t.props || {}, (d, v, ...w) => {
184
+ const R = w.length ? w[0] : v;
185
+ return c.ctx && n(c.ctx[d], c.ctx[d] = R) && (!c.skip_bound && c.bound[d] && c.bound[d](R), h && mt(e, d)), v;
186
+ }), c.update(), h = !0, O(c.before_update), c.fragment = i(c.ctx), t.target) {
187
+ if (t.hydrate) {
188
+ const d = ot(t.target);
189
+ c.fragment && c.fragment.l(d), d.forEach(D);
190
+ } else
191
+ c.fragment && c.fragment.c();
192
+ t.intro && pt(e.$$.fragment), bt(e, t.target, t.anchor), y();
193
+ }
194
+ k(l);
195
+ }
196
+ let Q;
197
+ typeof HTMLElement == "function" && (Q = class extends HTMLElement {
198
+ /** The Svelte component constructor */
199
+ $$ctor;
200
+ /** Slots */
201
+ $$s;
202
+ /** The Svelte component instance */
203
+ $$c;
204
+ /** Whether or not the custom element is connected */
205
+ $$cn = !1;
206
+ /** Component props data */
207
+ $$d = {};
208
+ /** `true` if currently in the process of reflecting component props back to attributes */
209
+ $$r = !1;
210
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
211
+ $$p_d = {};
212
+ /** @type {Record<string, Function[]>} Event listeners */
213
+ $$l = {};
214
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
215
+ $$l_u = /* @__PURE__ */ new Map();
216
+ constructor(e, t, r) {
217
+ super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
218
+ }
219
+ addEventListener(e, t, r) {
220
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
221
+ const i = this.$$c.$on(e, t);
222
+ this.$$l_u.set(t, i);
223
+ }
224
+ super.addEventListener(e, t, r);
225
+ }
226
+ removeEventListener(e, t, r) {
227
+ if (super.removeEventListener(e, t, r), this.$$c) {
228
+ const i = this.$$l_u.get(t);
229
+ i && (i(), this.$$l_u.delete(t));
230
+ }
231
+ }
232
+ async connectedCallback() {
233
+ if (this.$$cn = !0, !this.$$c) {
234
+ let e = function(n) {
235
+ return () => {
236
+ let s;
237
+ return {
238
+ c: function() {
239
+ s = b("slot"), n !== "default" && f(s, "name", n);
240
+ },
241
+ /**
242
+ * @param {HTMLElement} target
243
+ * @param {HTMLElement} [anchor]
244
+ */
245
+ m: function(l, c) {
246
+ K(l, s, c);
247
+ },
248
+ d: function(l) {
249
+ l && D(s);
250
+ }
251
+ };
252
+ };
253
+ };
254
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
255
+ return;
256
+ const t = {}, r = ut(this);
257
+ for (const n of this.$$s)
258
+ n in r && (t[n] = [e(n)]);
259
+ for (const n of this.attributes) {
260
+ const s = this.$$g_p(n.name);
261
+ s in this.$$d || (this.$$d[s] = C(s, n.value, this.$$p_d, "toProp"));
262
+ }
263
+ for (const n in this.$$p_d)
264
+ !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
265
+ this.$$c = new this.$$ctor({
266
+ target: this.shadowRoot || this,
267
+ props: {
268
+ ...this.$$d,
269
+ $$slots: t,
270
+ $$scope: {
271
+ ctx: []
272
+ }
273
+ }
274
+ });
275
+ const i = () => {
276
+ this.$$r = !0;
277
+ for (const n in this.$$p_d)
278
+ if (this.$$d[n] = this.$$c.$$.ctx[this.$$c.$$.props[n]], this.$$p_d[n].reflect) {
279
+ const s = C(
280
+ n,
281
+ this.$$d[n],
282
+ this.$$p_d,
283
+ "toAttribute"
284
+ );
285
+ s == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, s);
286
+ }
287
+ this.$$r = !1;
288
+ };
289
+ this.$$c.$$.after_update.push(i), i();
290
+ for (const n in this.$$l)
291
+ for (const s of this.$$l[n]) {
292
+ const u = this.$$c.$on(n, s);
293
+ this.$$l_u.set(s, u);
294
+ }
295
+ this.$$l = {};
296
+ }
297
+ }
298
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
299
+ // and setting attributes through setAttribute etc, this is helpful
300
+ attributeChangedCallback(e, t, r) {
301
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = C(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
302
+ }
303
+ disconnectedCallback() {
304
+ this.$$cn = !1, Promise.resolve().then(() => {
305
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
306
+ });
307
+ }
308
+ $$g_p(e) {
309
+ return Object.keys(this.$$p_d).find(
310
+ (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
311
+ ) || e;
312
+ }
313
+ });
314
+ function C(e, t, r, i) {
315
+ const n = r[e]?.type;
316
+ if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
317
+ return t;
318
+ if (i === "toAttribute")
319
+ switch (n) {
320
+ case "Object":
321
+ case "Array":
322
+ return t == null ? null : JSON.stringify(t);
323
+ case "Boolean":
324
+ return t ? "" : null;
325
+ case "Number":
326
+ return t ?? null;
327
+ default:
328
+ return t;
329
+ }
330
+ else
331
+ switch (n) {
332
+ case "Object":
333
+ case "Array":
334
+ return t && JSON.parse(t);
335
+ case "Boolean":
336
+ return t;
337
+ case "Number":
338
+ return t != null ? +t : t;
339
+ default:
340
+ return t;
341
+ }
342
+ }
343
+ function xt(e, t, r, i, n, s) {
344
+ let u = class extends Q {
345
+ constructor() {
346
+ super(e, r, n), this.$$p_d = t;
347
+ }
348
+ static get observedAttributes() {
349
+ return Object.keys(t).map(
350
+ (o) => (t[o].attribute || o).toLowerCase()
351
+ );
352
+ }
353
+ };
354
+ return Object.keys(t).forEach((o) => {
355
+ Object.defineProperty(u.prototype, o, {
356
+ get() {
357
+ return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
358
+ },
359
+ set(l) {
360
+ l = C(o, l, t), this.$$d[o] = l, this.$$c?.$set({ [o]: l });
361
+ }
362
+ });
363
+ }), i.forEach((o) => {
364
+ Object.defineProperty(u.prototype, o, {
365
+ get() {
366
+ return this.$$c?.[o];
367
+ }
368
+ });
369
+ }), e.element = /** @type {any} */
370
+ u, u;
371
+ }
372
+ class vt {
373
+ /**
374
+ * ### PRIVATE API
375
+ *
376
+ * Do not use, may change at any time
377
+ *
378
+ * @type {any}
379
+ */
380
+ $$ = void 0;
381
+ /**
382
+ * ### PRIVATE API
383
+ *
384
+ * Do not use, may change at any time
385
+ *
386
+ * @type {any}
387
+ */
388
+ $$set = void 0;
389
+ /** @returns {void} */
390
+ $destroy() {
391
+ _t(this, 1), this.$destroy = P;
392
+ }
393
+ /**
394
+ * @template {Extract<keyof Events, string>} K
395
+ * @param {K} type
396
+ * @param {((e: Events[K]) => void) | null | undefined} callback
397
+ * @returns {() => void}
398
+ */
399
+ $on(t, r) {
400
+ if (!q(r))
401
+ return P;
402
+ const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
403
+ return i.push(r), () => {
404
+ const n = i.indexOf(r);
405
+ n !== -1 && i.splice(n, 1);
406
+ };
407
+ }
408
+ /**
409
+ * @param {Partial<Props>} props
410
+ * @returns {void}
411
+ */
412
+ $set(t) {
413
+ this.$$set && !et(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
414
+ }
415
+ }
416
+ const wt = "4";
417
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(wt);
418
+ function Rt(e) {
419
+ rt(e, "svelte-1s0yc9b", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-ring{background:var(--emw--color-black, #000000);color:var(--emw--color-white, #FFFFFF)}.Progress{margin:auto;width:var(--progressRingWidth);height:var(--progressRingWidth);position:relative}.Progress .InnerSection{position:absolute;width:var(--innerSectionWidth);height:var(--innerSectionWidth);background-color:white;border-radius:50%;left:var(--innerSectionLeft, 1rem);top:var(--innerSectionLeft, 1rem);line-height:var(--innerSectionWidth);text-align:center}.Progress .InnerSection .Percent{background-color:var(--progresscolor);border-radius:50%;width:var(--percentSectionWidth);height:var(--percentSectionWidth);position:absolute;left:var(--percentSectionLeft, 0.1rem);top:var(--percentSectionLeft, 0.1rem)}.Left,.Right{width:var(--leftRotateSectionWidth);height:var(--progressRingWidth);overflow:hidden;position:relative;float:left;background-color:#F2F4F6}.Left{border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth)}.Right{border-radius:0;border-top-right-radius:var(--progressRingWidth);border-bottom-right-radius:var(--progressRingWidth)}.Left:after,.Right:after{content:"";position:absolute;display:block;width:var(--leftRotateSectionAfterWidth);height:var(--progressRingWidth, 8em);background-color:white;border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth);background-color:var(--progresscolor);transition-property:transform;transition-duration:1.1s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.5s}.Right:after{content:"";position:absolute;display:block;border-radius:0;border-top-right-radius:var(--widthInPx);border-bottom-right-radius:var(--widthInPx)}.Left:after{transform-origin:right center;transform:rotateZ(var(--leftRotateDeg, 180deg))}.Right:after{transform-origin:left center;transform:rotateZ(var(--rightRotateDeg, 0deg))}');
420
+ }
421
+ function St(e) {
422
+ let t, r, i, n, s, u, o, l;
423
+ return {
424
+ c() {
425
+ t = b("div"), r = b("div"), i = b("div"), n = st(), s = b("div"), u = b("div"), o = N(
426
+ /*currentstep*/
427
+ e[0]
428
+ ), l = N("%"), f(r, "class", "Left"), f(r, "part", "Progress Left"), f(i, "class", "Right"), f(i, "part", "Progress Right"), f(u, "class", "Percent"), f(u, "part", "Progress Percent"), f(s, "class", "InnerSection"), f(s, "part", "Progress InnerSection"), f(t, "class", "general-icon-progress-ring Progress"), f(t, "part", "ProgressRing");
429
+ },
430
+ m(c, h) {
431
+ K(c, t, h), p(t, r), p(t, i), p(t, n), p(t, s), p(s, u), p(u, o), p(u, l), e[5](t);
432
+ },
433
+ p(c, [h]) {
434
+ h & /*currentstep*/
435
+ 1 && ct(
436
+ o,
437
+ /*currentstep*/
438
+ c[0]
439
+ );
440
+ },
441
+ i: P,
442
+ o: P,
443
+ d(c) {
444
+ c && D(t), e[5](null);
445
+ }
446
+ };
447
+ }
448
+ function kt(e, t, r) {
449
+ let { currentstep: i = 0 } = t, { livecolor: n = "#00AEEF" } = t, { expiredcolor: s = "#C4C4C4" } = t, { status: u = "true" } = t, o = 100, l, c, h, d, v, w, R, M, V, z, S, E, $, A;
450
+ const H = (a, g) => {
451
+ for (const L in g)
452
+ a.style.setProperty(`--${L}`, g[L]);
453
+ }, T = (a, g) => (H(a, g), {
454
+ update(L) {
455
+ H(a, L);
456
+ }
457
+ }), X = () => {
458
+ u == "true" ? A = n : A = s, l = o * 0.74, c = (o - l) / 2, h = o * 0.7, d = `${o}px`, v = `${l}px`, w = `${c}px`, R = `${h}px`, M = `${(l - h) / 2}px`, V = `${o / 2}px`, z = `${o / 2 + 1}px`, T($, {
459
+ progressRingWidth: d,
460
+ innerSectionWidth: v,
461
+ innerSectionLeft: w,
462
+ progresscolor: A,
463
+ percentSectionWidth: R,
464
+ percentSectionLeft: M,
465
+ leftRotateSectionWidth: V,
466
+ leftRotateSectionAfterWidth: z
467
+ });
468
+ }, G = () => {
469
+ $ && (S = "0deg", E = "0deg", i > 100 ? (r(0, i = 100), S = "360deg") : i >= 50 ? (S = `${(i - 50) / 50 * 180 + 180}deg`, E = "0deg") : (S = "180deg", E = `${i / 50 * 180 - 180}deg`), T($, { rightRotateDeg: E, leftRotateDeg: S }));
470
+ };
471
+ at(() => {
472
+ if ($.offsetWidth == 0)
473
+ return;
474
+ let a = $.offsetWidth, g = $.offsetHeight;
475
+ o = a > g && a * g > 0 ? g || 100 : a || 100, X();
476
+ });
477
+ function Y(a) {
478
+ F[a ? "unshift" : "push"](() => {
479
+ $ = a, r(1, $);
480
+ });
481
+ }
482
+ return e.$$set = (a) => {
483
+ "currentstep" in a && r(0, i = a.currentstep), "livecolor" in a && r(2, n = a.livecolor), "expiredcolor" in a && r(3, s = a.expiredcolor), "status" in a && r(4, u = a.status);
484
+ }, e.$$.update = () => {
485
+ e.$$.dirty & /*currentstep*/
486
+ 1 && i && G(), e.$$.dirty & /*status*/
487
+ 16 && u && G();
488
+ }, [i, $, n, s, u, Y];
489
+ }
490
+ class Pt extends vt {
491
+ constructor(t) {
492
+ super(), yt(
493
+ this,
494
+ t,
495
+ kt,
496
+ St,
497
+ tt,
498
+ {
499
+ currentstep: 0,
500
+ livecolor: 2,
501
+ expiredcolor: 3,
502
+ status: 4
503
+ },
504
+ Rt
505
+ );
506
+ }
507
+ get currentstep() {
508
+ return this.$$.ctx[0];
509
+ }
510
+ set currentstep(t) {
511
+ this.$$set({ currentstep: t }), y();
512
+ }
513
+ get livecolor() {
514
+ return this.$$.ctx[2];
515
+ }
516
+ set livecolor(t) {
517
+ this.$$set({ livecolor: t }), y();
518
+ }
519
+ get expiredcolor() {
520
+ return this.$$.ctx[3];
521
+ }
522
+ set expiredcolor(t) {
523
+ this.$$set({ expiredcolor: t }), y();
524
+ }
525
+ get status() {
526
+ return this.$$.ctx[4];
527
+ }
528
+ set status(t) {
529
+ this.$$set({ status: t }), y();
530
+ }
531
+ }
532
+ xt(Pt, { currentstep: {}, livecolor: {}, expiredcolor: {}, status: {} }, [], [], !0);
533
+ export {
534
+ Pt as G
535
+ };
@@ -0,0 +1,14 @@
1
+ import { G as s } from "../components/GeneralIconProgressRing-m3Lpgh7f.js";
2
+ function r(n) {
3
+ return function(...t) {
4
+ try {
5
+ return n.apply(this, t);
6
+ } catch (e) {
7
+ if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw e;
10
+ }
11
+ };
12
+ }
13
+ customElements.define = r(customElements.define);
14
+ !customElements.get("general-icon-progress-ring") && customElements.define("general-icon-progress-ring", s.element);
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@everymatrix/general-icon-progress-ring",
3
- "version": "1.54.0",
3
+ "version": "1.54.4",
4
4
  "type": "module",
5
- "main": "es2015/general-icon-progress-ring.cjs",
6
- "module": "es2015/general-icon-progress-ring.js",
5
+ "main": "esnext/general-icon-progress-ring.js",
6
+ "module": "esnext/general-icon-progress-ring.js",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./es2015/general-icon-progress-ring.js",
10
- "require": "./es2015/general-icon-progress-ring.cjs"
9
+ "import": "./esnext/general-icon-progress-ring.js"
11
10
  },
12
- "./es2015/general-icon-progress-ring.cjs": "./es2015/general-icon-progress-ring.cjs"
11
+ "./es2015/general-icon-progress-ring.cjs": "./es2015/general-icon-progress-ring.cjs",
12
+ "./es2015/general-icon-progress-ring.js": "./es2015/general-icon-progress-ring.js"
13
13
  },
14
14
  "files": [
15
+ "components/",
15
16
  "es2015/",
16
- "components",
17
- "stencil"
17
+ "stencil",
18
+ "angular",
19
+ "esnext/"
18
20
  ],
19
21
  "publishConfig": {
20
22
  "access": "public"
@@ -1 +0,0 @@
1
- "use strict";var ct=Object.defineProperty,ut=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var dt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable;var N=(e,t,r)=>t in e?ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))dt.call(t,r)&&N(e,r,t[r]);if(U)for(var r of U(t))at.call(t,r)&&N(e,r,t[r]);return e},K=(e,t)=>ut(e,lt(t));var f=(e,t,r)=>N(e,typeof t!="symbol"?t+"":t,r);var Q=(e,t,r)=>new Promise((i,s)=>{var n=l=>{try{u(r.next(l))}catch(c){s(c)}},o=l=>{try{u(r.throw(l))}catch(c){s(c)}},u=l=>l.done?i(l.value):Promise.resolve(l.value).then(n,o);u((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function W(){}function tt(e){return e()}function X(){return Object.create(null)}function j(e){e.forEach(tt)}function et(e){return typeof e=="function"}function ft(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function ht(e){return Object.keys(e).length===0}function b(e,t){e.appendChild(t)}function $t(e,t,r){const i=gt(e);if(!i.getElementById(t)){const s=_("style");s.id=t,s.textContent=r,pt(i,s)}}function gt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function pt(e,t){return b(e.head||e,t),t.sheet}function rt(e,t,r){e.insertBefore(t,r||null)}function V(e){e.parentNode&&e.parentNode.removeChild(e)}function _(e){return document.createElement(e)}function I(e){return document.createTextNode(e)}function bt(){return I(" ")}function $(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function _t(e){return Array.from(e.childNodes)}function mt(e,t){t=""+t,e.data!==t&&(e.data=t)}function yt(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}let E;function k(e){E=e}function vt(){if(!E)throw new Error("Function called outside component initialization");return E}function xt(e){vt().$$.on_mount.push(e)}const y=[],B=[];let x=[];const Y=[],wt=Promise.resolve();let D=!1;function Rt(){D||(D=!0,wt.then(v))}function M(e){x.push(e)}const F=new Set;let m=0;function v(){if(m!==0)return;const e=E;do{try{for(;m<y.length;){const t=y[m];m++,k(t),St(t.$$)}}catch(t){throw y.length=0,m=0,t}for(k(null),y.length=0,m=0;B.length;)B.pop()();for(let t=0;t<x.length;t+=1){const r=x[t];F.has(r)||(F.add(r),r())}x.length=0}while(y.length);for(;Y.length;)Y.pop()();D=!1,F.clear(),k(e)}function St(e){if(e.fragment!==null){e.update(),j(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(M)}}function Pt(e){const t=[],r=[];x.forEach(i=>e.indexOf(i)===-1?t.push(i):r.push(i)),r.forEach(i=>i()),x=t}const kt=new Set;function Wt(e,t){e&&e.i&&(kt.delete(e),e.i(t))}function Et(e,t,r){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,r),M(()=>{const n=e.$$.on_mount.map(tt).filter(et);e.$$.on_destroy?e.$$.on_destroy.push(...n):j(n),e.$$.on_mount=[]}),s.forEach(M)}function Lt(e,t){const r=e.$$;r.fragment!==null&&(Pt(r.after_update),j(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function Ot(e,t){e.$$.dirty[0]===-1&&(y.push(e),Rt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ct(e,t,r,i,s,n,o=null,u=[-1]){const l=E;k(e);const c=e.$$={fragment:null,ctx:[],props:n,update:W,not_equal:s,bound:X(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:X(),dirty:u,skip_bound:!1,root:t.target||l.$$.root};o&&o(c.root);let a=!1;if(c.ctx=r(e,t.props||{},(h,w,...R)=>{const S=R.length?R[0]:w;return c.ctx&&s(c.ctx[h],c.ctx[h]=S)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](S),a&&Ot(e,h)),w}),c.update(),a=!0,j(c.before_update),c.fragment=i(c.ctx),t.target){if(t.hydrate){const h=_t(t.target);c.fragment&&c.fragment.l(h),h.forEach(V)}else c.fragment&&c.fragment.c();t.intro&&Wt(e.$$.fragment),Et(e,t.target,t.anchor),v()}k(l)}let nt;typeof HTMLElement=="function"&&(nt=class extends HTMLElement{constructor(t,r,i){super();f(this,"$$ctor");f(this,"$$s");f(this,"$$c");f(this,"$$cn",!1);f(this,"$$d",{});f(this,"$$r",!1);f(this,"$$p_d",{});f(this,"$$l",{});f(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const s=this.$$c.$on(t,r);this.$$l_u.set(r,s)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const s=this.$$l_u.get(r);s&&(s(),this.$$l_u.delete(r))}}connectedCallback(){return Q(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(n){return()=>{let o;return{c:function(){o=_("slot"),n!=="default"&&$(o,"name",n)},m:function(c,a){rt(c,o,a)},d:function(c){c&&V(o)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=yt(this);for(const n of this.$$s)n in i&&(r[n]=[t(n)]);for(const n of this.attributes){const o=this.$$g_p(n.name);o in this.$$d||(this.$$d[o]=C(o,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:K(q({},this.$$d),{$$slots:r,$$scope:{ctx:[]}})});const s=()=>{this.$$r=!0;for(const n in this.$$p_d)if(this.$$d[n]=this.$$c.$$.ctx[this.$$c.$$.props[n]],this.$$p_d[n].reflect){const o=C(n,this.$$d[n],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,o)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const n in this.$$l)for(const o of this.$$l[n]){const u=this.$$c.$on(n,o);this.$$l_u.set(o,u)}this.$$l={}}})}attributeChangedCallback(t,r,i){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=C(t,i,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function C(e,t,r,i){var n;const s=(n=r[e])==null?void 0:n.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function jt(e,t,r,i,s,n){let o=class extends nt{constructor(){super(e,r,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(o.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(l){var c;l=C(u,l,t),this.$$d[u]=l,(c=this.$$c)==null||c.$set({[u]:l})}})}),i.forEach(u=>{Object.defineProperty(o.prototype,u,{get(){var l;return(l=this.$$c)==null?void 0:l[u]}})}),e.element=o,o}class At{constructor(){f(this,"$$");f(this,"$$set")}$destroy(){Lt(this,1),this.$destroy=W}$on(t,r){if(!et(r))return W;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(r),()=>{const s=i.indexOf(r);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!ht(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nt="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Nt);function Ft(e){$t(e,"svelte-1s0yc9b",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-ring{background:var(--emw--color-black, #000000);color:var(--emw--color-white, #FFFFFF)}.Progress{margin:auto;width:var(--progressRingWidth);height:var(--progressRingWidth);position:relative}.Progress .InnerSection{position:absolute;width:var(--innerSectionWidth);height:var(--innerSectionWidth);background-color:white;border-radius:50%;left:var(--innerSectionLeft, 1rem);top:var(--innerSectionLeft, 1rem);line-height:var(--innerSectionWidth);text-align:center}.Progress .InnerSection .Percent{background-color:var(--progresscolor);border-radius:50%;width:var(--percentSectionWidth);height:var(--percentSectionWidth);position:absolute;left:var(--percentSectionLeft, 0.1rem);top:var(--percentSectionLeft, 0.1rem)}.Left,.Right{width:var(--leftRotateSectionWidth);height:var(--progressRingWidth);overflow:hidden;position:relative;float:left;background-color:#F2F4F6}.Left{border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth)}.Right{border-radius:0;border-top-right-radius:var(--progressRingWidth);border-bottom-right-radius:var(--progressRingWidth)}.Left:after,.Right:after{content:"";position:absolute;display:block;width:var(--leftRotateSectionAfterWidth);height:var(--progressRingWidth, 8em);background-color:white;border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth);background-color:var(--progresscolor);transition-property:transform;transition-duration:1.1s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.5s}.Right:after{content:"";position:absolute;display:block;border-radius:0;border-top-right-radius:var(--widthInPx);border-bottom-right-radius:var(--widthInPx)}.Left:after{transform-origin:right center;transform:rotateZ(var(--leftRotateDeg, 180deg))}.Right:after{transform-origin:left center;transform:rotateZ(var(--rightRotateDeg, 0deg))}')}function It(e){let t,r,i,s,n,o,u,l;return{c(){t=_("div"),r=_("div"),i=_("div"),s=bt(),n=_("div"),o=_("div"),u=I(e[0]),l=I("%"),$(r,"class","Left"),$(r,"part","Progress Left"),$(i,"class","Right"),$(i,"part","Progress Right"),$(o,"class","Percent"),$(o,"part","Progress Percent"),$(n,"class","InnerSection"),$(n,"part","Progress InnerSection"),$(t,"class","general-icon-progress-ring Progress"),$(t,"part","ProgressRing")},m(c,a){rt(c,t,a),b(t,r),b(t,i),b(t,s),b(t,n),b(n,o),b(o,u),b(o,l),e[5](t)},p(c,[a]){a&1&&mt(u,c[0])},i:W,o:W,d(c){c&&V(t),e[5](null)}}}function Bt(e,t,r){let{currentstep:i=0}=t,{livecolor:s="#00AEEF"}=t,{expiredcolor:n="#C4C4C4"}=t,{status:o="true"}=t,u=100,l,c,a,h,w,R,S,T,z,H,P,L,g,A;const J=(d,p)=>{for(const O in p)d.style.setProperty(`--${O}`,p[O])},Z=(d,p)=>(J(d,p),{update(O){J(d,O)}}),st=()=>{o=="true"?A=s:A=n,l=u*.74,c=(u-l)/2,a=u*.7,h=`${u}px`,w=`${l}px`,R=`${c}px`,S=`${a}px`,T=`${(l-a)/2}px`,z=`${u/2}px`,H=`${u/2+1}px`,Z(g,{progressRingWidth:h,innerSectionWidth:w,innerSectionLeft:R,progresscolor:A,percentSectionWidth:S,percentSectionLeft:T,leftRotateSectionWidth:z,leftRotateSectionAfterWidth:H})},G=()=>{g&&(P="0deg",L="0deg",i>100?(r(0,i=100),P="360deg"):i>=50?(P=`${(i-50)/50*180+180}deg`,L="0deg"):(P="180deg",L=`${i/50*180-180}deg`),Z(g,{rightRotateDeg:L,leftRotateDeg:P}))};xt(()=>{if(g.offsetWidth==0)return;let d=g.offsetWidth,p=g.offsetHeight;u=d>p&&d*p>0?p||100:d||100,st()});function ot(d){B[d?"unshift":"push"](()=>{g=d,r(1,g)})}return e.$$set=d=>{"currentstep"in d&&r(0,i=d.currentstep),"livecolor"in d&&r(2,s=d.livecolor),"expiredcolor"in d&&r(3,n=d.expiredcolor),"status"in d&&r(4,o=d.status)},e.$$.update=()=>{e.$$.dirty&1&&i&&G(),e.$$.dirty&16&&o&&G()},[i,g,s,n,o,ot]}class it extends At{constructor(t){super(),Ct(this,t,Bt,It,ft,{currentstep:0,livecolor:2,expiredcolor:3,status:4},Ft)}get currentstep(){return this.$$.ctx[0]}set currentstep(t){this.$$set({currentstep:t}),v()}get livecolor(){return this.$$.ctx[2]}set livecolor(t){this.$$set({livecolor:t}),v()}get expiredcolor(){return this.$$.ctx[3]}set expiredcolor(t){this.$$set({expiredcolor:t}),v()}get status(){return this.$$.ctx[4]}set status(t){this.$$set({status:t}),v()}}jt(it,{currentstep:{},livecolor:{},expiredcolor:{},status:{}},[],[],!0);exports.default=it;
@@ -1,572 +0,0 @@
1
- var ot = Object.defineProperty, ct = Object.defineProperties;
2
- var ut = Object.getOwnPropertyDescriptors;
3
- var U = Object.getOwnPropertySymbols;
4
- var lt = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable;
5
- var N = (e, t, r) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, q = (e, t) => {
6
- for (var r in t || (t = {}))
7
- lt.call(t, r) && N(e, r, t[r]);
8
- if (U)
9
- for (var r of U(t))
10
- at.call(t, r) && N(e, r, t[r]);
11
- return e;
12
- }, K = (e, t) => ct(e, ut(t));
13
- var f = (e, t, r) => N(e, typeof t != "symbol" ? t + "" : t, r);
14
- var Q = (e, t, r) => new Promise((i, s) => {
15
- var n = (l) => {
16
- try {
17
- u(r.next(l));
18
- } catch (c) {
19
- s(c);
20
- }
21
- }, o = (l) => {
22
- try {
23
- u(r.throw(l));
24
- } catch (c) {
25
- s(c);
26
- }
27
- }, u = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(n, o);
28
- u((r = r.apply(e, t)).next());
29
- });
30
- function W() {
31
- }
32
- function tt(e) {
33
- return e();
34
- }
35
- function X() {
36
- return /* @__PURE__ */ Object.create(null);
37
- }
38
- function A(e) {
39
- e.forEach(tt);
40
- }
41
- function et(e) {
42
- return typeof e == "function";
43
- }
44
- function dt(e, t) {
45
- return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
- }
47
- function ft(e) {
48
- return Object.keys(e).length === 0;
49
- }
50
- function b(e, t) {
51
- e.appendChild(t);
52
- }
53
- function ht(e, t, r) {
54
- const i = $t(e);
55
- if (!i.getElementById(t)) {
56
- const s = _("style");
57
- s.id = t, s.textContent = r, gt(i, s);
58
- }
59
- }
60
- function $t(e) {
61
- if (!e) return document;
62
- const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
63
- return t && /** @type {ShadowRoot} */
64
- t.host ? (
65
- /** @type {ShadowRoot} */
66
- t
67
- ) : e.ownerDocument;
68
- }
69
- function gt(e, t) {
70
- return b(
71
- /** @type {Document} */
72
- e.head || e,
73
- t
74
- ), t.sheet;
75
- }
76
- function rt(e, t, r) {
77
- e.insertBefore(t, r || null);
78
- }
79
- function V(e) {
80
- e.parentNode && e.parentNode.removeChild(e);
81
- }
82
- function _(e) {
83
- return document.createElement(e);
84
- }
85
- function I(e) {
86
- return document.createTextNode(e);
87
- }
88
- function pt() {
89
- return I(" ");
90
- }
91
- function $(e, t, r) {
92
- r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
93
- }
94
- function bt(e) {
95
- return Array.from(e.childNodes);
96
- }
97
- function _t(e, t) {
98
- t = "" + t, e.data !== t && (e.data = /** @type {string} */
99
- t);
100
- }
101
- function mt(e) {
102
- const t = {};
103
- return e.childNodes.forEach(
104
- /** @param {Element} node */
105
- (r) => {
106
- t[r.slot || "default"] = !0;
107
- }
108
- ), t;
109
- }
110
- let E;
111
- function P(e) {
112
- E = e;
113
- }
114
- function yt() {
115
- if (!E) throw new Error("Function called outside component initialization");
116
- return E;
117
- }
118
- function xt(e) {
119
- yt().$$.on_mount.push(e);
120
- }
121
- const y = [], B = [];
122
- let v = [];
123
- const Y = [], vt = /* @__PURE__ */ Promise.resolve();
124
- let D = !1;
125
- function wt() {
126
- D || (D = !0, vt.then(x));
127
- }
128
- function M(e) {
129
- v.push(e);
130
- }
131
- const F = /* @__PURE__ */ new Set();
132
- let m = 0;
133
- function x() {
134
- if (m !== 0)
135
- return;
136
- const e = E;
137
- do {
138
- try {
139
- for (; m < y.length; ) {
140
- const t = y[m];
141
- m++, P(t), Rt(t.$$);
142
- }
143
- } catch (t) {
144
- throw y.length = 0, m = 0, t;
145
- }
146
- for (P(null), y.length = 0, m = 0; B.length; ) B.pop()();
147
- for (let t = 0; t < v.length; t += 1) {
148
- const r = v[t];
149
- F.has(r) || (F.add(r), r());
150
- }
151
- v.length = 0;
152
- } while (y.length);
153
- for (; Y.length; )
154
- Y.pop()();
155
- D = !1, F.clear(), P(e);
156
- }
157
- function Rt(e) {
158
- if (e.fragment !== null) {
159
- e.update(), A(e.before_update);
160
- const t = e.dirty;
161
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(M);
162
- }
163
- }
164
- function St(e) {
165
- const t = [], r = [];
166
- v.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : r.push(i)), r.forEach((i) => i()), v = t;
167
- }
168
- const kt = /* @__PURE__ */ new Set();
169
- function Pt(e, t) {
170
- e && e.i && (kt.delete(e), e.i(t));
171
- }
172
- function Wt(e, t, r) {
173
- const { fragment: i, after_update: s } = e.$$;
174
- i && i.m(t, r), M(() => {
175
- const n = e.$$.on_mount.map(tt).filter(et);
176
- e.$$.on_destroy ? e.$$.on_destroy.push(...n) : A(n), e.$$.on_mount = [];
177
- }), s.forEach(M);
178
- }
179
- function Et(e, t) {
180
- const r = e.$$;
181
- r.fragment !== null && (St(r.after_update), A(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
182
- }
183
- function Lt(e, t) {
184
- e.$$.dirty[0] === -1 && (y.push(e), wt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
185
- }
186
- function Ct(e, t, r, i, s, n, o = null, u = [-1]) {
187
- const l = E;
188
- P(e);
189
- const c = e.$$ = {
190
- fragment: null,
191
- ctx: [],
192
- // state
193
- props: n,
194
- update: W,
195
- not_equal: s,
196
- bound: X(),
197
- // lifecycle
198
- on_mount: [],
199
- on_destroy: [],
200
- on_disconnect: [],
201
- before_update: [],
202
- after_update: [],
203
- context: new Map(t.context || (l ? l.$$.context : [])),
204
- // everything else
205
- callbacks: X(),
206
- dirty: u,
207
- skip_bound: !1,
208
- root: t.target || l.$$.root
209
- };
210
- o && o(c.root);
211
- let d = !1;
212
- if (c.ctx = r(e, t.props || {}, (h, w, ...R) => {
213
- const S = R.length ? R[0] : w;
214
- return c.ctx && s(c.ctx[h], c.ctx[h] = S) && (!c.skip_bound && c.bound[h] && c.bound[h](S), d && Lt(e, h)), w;
215
- }), c.update(), d = !0, A(c.before_update), c.fragment = i(c.ctx), t.target) {
216
- if (t.hydrate) {
217
- const h = bt(t.target);
218
- c.fragment && c.fragment.l(h), h.forEach(V);
219
- } else
220
- c.fragment && c.fragment.c();
221
- t.intro && Pt(e.$$.fragment), Wt(e, t.target, t.anchor), x();
222
- }
223
- P(l);
224
- }
225
- let nt;
226
- typeof HTMLElement == "function" && (nt = class extends HTMLElement {
227
- constructor(t, r, i) {
228
- super();
229
- /** The Svelte component constructor */
230
- f(this, "$$ctor");
231
- /** Slots */
232
- f(this, "$$s");
233
- /** The Svelte component instance */
234
- f(this, "$$c");
235
- /** Whether or not the custom element is connected */
236
- f(this, "$$cn", !1);
237
- /** Component props data */
238
- f(this, "$$d", {});
239
- /** `true` if currently in the process of reflecting component props back to attributes */
240
- f(this, "$$r", !1);
241
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
242
- f(this, "$$p_d", {});
243
- /** @type {Record<string, Function[]>} Event listeners */
244
- f(this, "$$l", {});
245
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
246
- f(this, "$$l_u", /* @__PURE__ */ new Map());
247
- this.$$ctor = t, this.$$s = r, i && this.attachShadow({ mode: "open" });
248
- }
249
- addEventListener(t, r, i) {
250
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
251
- const s = this.$$c.$on(t, r);
252
- this.$$l_u.set(r, s);
253
- }
254
- super.addEventListener(t, r, i);
255
- }
256
- removeEventListener(t, r, i) {
257
- if (super.removeEventListener(t, r, i), this.$$c) {
258
- const s = this.$$l_u.get(r);
259
- s && (s(), this.$$l_u.delete(r));
260
- }
261
- }
262
- connectedCallback() {
263
- return Q(this, null, function* () {
264
- if (this.$$cn = !0, !this.$$c) {
265
- let t = function(n) {
266
- return () => {
267
- let o;
268
- return {
269
- c: function() {
270
- o = _("slot"), n !== "default" && $(o, "name", n);
271
- },
272
- /**
273
- * @param {HTMLElement} target
274
- * @param {HTMLElement} [anchor]
275
- */
276
- m: function(c, d) {
277
- rt(c, o, d);
278
- },
279
- d: function(c) {
280
- c && V(o);
281
- }
282
- };
283
- };
284
- };
285
- if (yield Promise.resolve(), !this.$$cn || this.$$c)
286
- return;
287
- const r = {}, i = mt(this);
288
- for (const n of this.$$s)
289
- n in i && (r[n] = [t(n)]);
290
- for (const n of this.attributes) {
291
- const o = this.$$g_p(n.name);
292
- o in this.$$d || (this.$$d[o] = O(o, n.value, this.$$p_d, "toProp"));
293
- }
294
- for (const n in this.$$p_d)
295
- !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
296
- this.$$c = new this.$$ctor({
297
- target: this.shadowRoot || this,
298
- props: K(q({}, this.$$d), {
299
- $$slots: r,
300
- $$scope: {
301
- ctx: []
302
- }
303
- })
304
- });
305
- const s = () => {
306
- this.$$r = !0;
307
- for (const n in this.$$p_d)
308
- if (this.$$d[n] = this.$$c.$$.ctx[this.$$c.$$.props[n]], this.$$p_d[n].reflect) {
309
- const o = O(
310
- n,
311
- this.$$d[n],
312
- this.$$p_d,
313
- "toAttribute"
314
- );
315
- o == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, o);
316
- }
317
- this.$$r = !1;
318
- };
319
- this.$$c.$$.after_update.push(s), s();
320
- for (const n in this.$$l)
321
- for (const o of this.$$l[n]) {
322
- const u = this.$$c.$on(n, o);
323
- this.$$l_u.set(o, u);
324
- }
325
- this.$$l = {};
326
- }
327
- });
328
- }
329
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
330
- // and setting attributes through setAttribute etc, this is helpful
331
- attributeChangedCallback(t, r, i) {
332
- var s;
333
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = O(t, i, this.$$p_d, "toProp"), (s = this.$$c) == null || s.$set({ [t]: this.$$d[t] }));
334
- }
335
- disconnectedCallback() {
336
- this.$$cn = !1, Promise.resolve().then(() => {
337
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
338
- });
339
- }
340
- $$g_p(t) {
341
- return Object.keys(this.$$p_d).find(
342
- (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
343
- ) || t;
344
- }
345
- });
346
- function O(e, t, r, i) {
347
- var n;
348
- const s = (n = r[e]) == null ? void 0 : n.type;
349
- if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
350
- return t;
351
- if (i === "toAttribute")
352
- switch (s) {
353
- case "Object":
354
- case "Array":
355
- return t == null ? null : JSON.stringify(t);
356
- case "Boolean":
357
- return t ? "" : null;
358
- case "Number":
359
- return t == null ? null : t;
360
- default:
361
- return t;
362
- }
363
- else
364
- switch (s) {
365
- case "Object":
366
- case "Array":
367
- return t && JSON.parse(t);
368
- case "Boolean":
369
- return t;
370
- case "Number":
371
- return t != null ? +t : t;
372
- default:
373
- return t;
374
- }
375
- }
376
- function Ot(e, t, r, i, s, n) {
377
- let o = class extends nt {
378
- constructor() {
379
- super(e, r, s), this.$$p_d = t;
380
- }
381
- static get observedAttributes() {
382
- return Object.keys(t).map(
383
- (u) => (t[u].attribute || u).toLowerCase()
384
- );
385
- }
386
- };
387
- return Object.keys(t).forEach((u) => {
388
- Object.defineProperty(o.prototype, u, {
389
- get() {
390
- return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
391
- },
392
- set(l) {
393
- var c;
394
- l = O(u, l, t), this.$$d[u] = l, (c = this.$$c) == null || c.$set({ [u]: l });
395
- }
396
- });
397
- }), i.forEach((u) => {
398
- Object.defineProperty(o.prototype, u, {
399
- get() {
400
- var l;
401
- return (l = this.$$c) == null ? void 0 : l[u];
402
- }
403
- });
404
- }), e.element = /** @type {any} */
405
- o, o;
406
- }
407
- class At {
408
- constructor() {
409
- /**
410
- * ### PRIVATE API
411
- *
412
- * Do not use, may change at any time
413
- *
414
- * @type {any}
415
- */
416
- f(this, "$$");
417
- /**
418
- * ### PRIVATE API
419
- *
420
- * Do not use, may change at any time
421
- *
422
- * @type {any}
423
- */
424
- f(this, "$$set");
425
- }
426
- /** @returns {void} */
427
- $destroy() {
428
- Et(this, 1), this.$destroy = W;
429
- }
430
- /**
431
- * @template {Extract<keyof Events, string>} K
432
- * @param {K} type
433
- * @param {((e: Events[K]) => void) | null | undefined} callback
434
- * @returns {() => void}
435
- */
436
- $on(t, r) {
437
- if (!et(r))
438
- return W;
439
- const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
440
- return i.push(r), () => {
441
- const s = i.indexOf(r);
442
- s !== -1 && i.splice(s, 1);
443
- };
444
- }
445
- /**
446
- * @param {Partial<Props>} props
447
- * @returns {void}
448
- */
449
- $set(t) {
450
- this.$$set && !ft(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
451
- }
452
- }
453
- const jt = "4";
454
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(jt);
455
- function Nt(e) {
456
- ht(e, "svelte-1s0yc9b", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-ring{background:var(--emw--color-black, #000000);color:var(--emw--color-white, #FFFFFF)}.Progress{margin:auto;width:var(--progressRingWidth);height:var(--progressRingWidth);position:relative}.Progress .InnerSection{position:absolute;width:var(--innerSectionWidth);height:var(--innerSectionWidth);background-color:white;border-radius:50%;left:var(--innerSectionLeft, 1rem);top:var(--innerSectionLeft, 1rem);line-height:var(--innerSectionWidth);text-align:center}.Progress .InnerSection .Percent{background-color:var(--progresscolor);border-radius:50%;width:var(--percentSectionWidth);height:var(--percentSectionWidth);position:absolute;left:var(--percentSectionLeft, 0.1rem);top:var(--percentSectionLeft, 0.1rem)}.Left,.Right{width:var(--leftRotateSectionWidth);height:var(--progressRingWidth);overflow:hidden;position:relative;float:left;background-color:#F2F4F6}.Left{border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth)}.Right{border-radius:0;border-top-right-radius:var(--progressRingWidth);border-bottom-right-radius:var(--progressRingWidth)}.Left:after,.Right:after{content:"";position:absolute;display:block;width:var(--leftRotateSectionAfterWidth);height:var(--progressRingWidth, 8em);background-color:white;border-radius:0;border-top-left-radius:var(--progressRingWidth);border-bottom-left-radius:var(--progressRingWidth);background-color:var(--progresscolor);transition-property:transform;transition-duration:1.1s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.5s}.Right:after{content:"";position:absolute;display:block;border-radius:0;border-top-right-radius:var(--widthInPx);border-bottom-right-radius:var(--widthInPx)}.Left:after{transform-origin:right center;transform:rotateZ(var(--leftRotateDeg, 180deg))}.Right:after{transform-origin:left center;transform:rotateZ(var(--rightRotateDeg, 0deg))}');
457
- }
458
- function Ft(e) {
459
- let t, r, i, s, n, o, u, l;
460
- return {
461
- c() {
462
- t = _("div"), r = _("div"), i = _("div"), s = pt(), n = _("div"), o = _("div"), u = I(
463
- /*currentstep*/
464
- e[0]
465
- ), l = I("%"), $(r, "class", "Left"), $(r, "part", "Progress Left"), $(i, "class", "Right"), $(i, "part", "Progress Right"), $(o, "class", "Percent"), $(o, "part", "Progress Percent"), $(n, "class", "InnerSection"), $(n, "part", "Progress InnerSection"), $(t, "class", "general-icon-progress-ring Progress"), $(t, "part", "ProgressRing");
466
- },
467
- m(c, d) {
468
- rt(c, t, d), b(t, r), b(t, i), b(t, s), b(t, n), b(n, o), b(o, u), b(o, l), e[5](t);
469
- },
470
- p(c, [d]) {
471
- d & /*currentstep*/
472
- 1 && _t(
473
- u,
474
- /*currentstep*/
475
- c[0]
476
- );
477
- },
478
- i: W,
479
- o: W,
480
- d(c) {
481
- c && V(t), e[5](null);
482
- }
483
- };
484
- }
485
- function It(e, t, r) {
486
- let { currentstep: i = 0 } = t, { livecolor: s = "#00AEEF" } = t, { expiredcolor: n = "#C4C4C4" } = t, { status: o = "true" } = t, u = 100, l, c, d, h, w, R, S, z, H, T, k, L, g, j;
487
- const J = (a, p) => {
488
- for (const C in p)
489
- a.style.setProperty(`--${C}`, p[C]);
490
- }, Z = (a, p) => (J(a, p), {
491
- update(C) {
492
- J(a, C);
493
- }
494
- }), it = () => {
495
- o == "true" ? j = s : j = n, l = u * 0.74, c = (u - l) / 2, d = u * 0.7, h = `${u}px`, w = `${l}px`, R = `${c}px`, S = `${d}px`, z = `${(l - d) / 2}px`, H = `${u / 2}px`, T = `${u / 2 + 1}px`, Z(g, {
496
- progressRingWidth: h,
497
- innerSectionWidth: w,
498
- innerSectionLeft: R,
499
- progresscolor: j,
500
- percentSectionWidth: S,
501
- percentSectionLeft: z,
502
- leftRotateSectionWidth: H,
503
- leftRotateSectionAfterWidth: T
504
- });
505
- }, G = () => {
506
- g && (k = "0deg", L = "0deg", i > 100 ? (r(0, i = 100), k = "360deg") : i >= 50 ? (k = `${(i - 50) / 50 * 180 + 180}deg`, L = "0deg") : (k = "180deg", L = `${i / 50 * 180 - 180}deg`), Z(g, { rightRotateDeg: L, leftRotateDeg: k }));
507
- };
508
- xt(() => {
509
- if (g.offsetWidth == 0)
510
- return;
511
- let a = g.offsetWidth, p = g.offsetHeight;
512
- u = a > p && a * p > 0 ? p || 100 : a || 100, it();
513
- });
514
- function st(a) {
515
- B[a ? "unshift" : "push"](() => {
516
- g = a, r(1, g);
517
- });
518
- }
519
- return e.$$set = (a) => {
520
- "currentstep" in a && r(0, i = a.currentstep), "livecolor" in a && r(2, s = a.livecolor), "expiredcolor" in a && r(3, n = a.expiredcolor), "status" in a && r(4, o = a.status);
521
- }, e.$$.update = () => {
522
- e.$$.dirty & /*currentstep*/
523
- 1 && i && G(), e.$$.dirty & /*status*/
524
- 16 && o && G();
525
- }, [i, g, s, n, o, st];
526
- }
527
- class Bt extends At {
528
- constructor(t) {
529
- super(), Ct(
530
- this,
531
- t,
532
- It,
533
- Ft,
534
- dt,
535
- {
536
- currentstep: 0,
537
- livecolor: 2,
538
- expiredcolor: 3,
539
- status: 4
540
- },
541
- Nt
542
- );
543
- }
544
- get currentstep() {
545
- return this.$$.ctx[0];
546
- }
547
- set currentstep(t) {
548
- this.$$set({ currentstep: t }), x();
549
- }
550
- get livecolor() {
551
- return this.$$.ctx[2];
552
- }
553
- set livecolor(t) {
554
- this.$$set({ livecolor: t }), x();
555
- }
556
- get expiredcolor() {
557
- return this.$$.ctx[3];
558
- }
559
- set expiredcolor(t) {
560
- this.$$set({ expiredcolor: t }), x();
561
- }
562
- get status() {
563
- return this.$$.ctx[4];
564
- }
565
- set status(t) {
566
- this.$$set({ status: t }), x();
567
- }
568
- }
569
- Ot(Bt, { currentstep: {}, livecolor: {}, expiredcolor: {}, status: {} }, [], [], !0);
570
- export {
571
- Bt as default
572
- };
@@ -1 +0,0 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/GeneralIconProgressRing-BLkFby8H.cjs")).then(({default:t})=>{!customElements.get("general-icon-progress-ring")&&customElements.define("general-icon-progress-ring",t.element)})}
@@ -1,16 +0,0 @@
1
- if (typeof window != "undefined") {
2
- let n = function(t) {
3
- return function(...s) {
4
- try {
5
- return t.apply(this, s);
6
- } catch (e) {
7
- if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
- return !1;
9
- throw e;
10
- }
11
- };
12
- };
13
- customElements.define = n(customElements.define), import("../components/GeneralIconProgressRing-Bu9F9qGg.js").then(({ default: t }) => {
14
- !customElements.get("general-icon-progress-ring") && customElements.define("general-icon-progress-ring", t.element);
15
- });
16
- }