dynamic-html-helpers 1.2.3 → 1.2.5

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,2519 @@
1
+ // generated by ESbuild
2
+ "use strict";
3
+ var HTMLHelpers = (() => {
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // ../index.js
23
+ var index_exports = {};
24
+ __export(index_exports, {
25
+ $: () => fn,
26
+ $D: () => m,
27
+ logFactory: () => logFactory,
28
+ regexhelper: () => RegexpCreator_default,
29
+ splat: () => interpolateDefault
30
+ });
31
+
32
+ // ../node_modules/jqx-es/Bundle/jqx.min.js
33
+ var { IS: a, maybe: B, $Wrap: dr, xProxy: mr, isNothing: gr } = at();
34
+ function at() {
35
+ Symbol.proxy = Symbol.for("toa.proxy"), Symbol.is = Symbol.for("toa.is"), Symbol.type = Symbol.for("toa.type"), Symbol.isSymbol = Symbol.for("toa.isASymbol"), c();
36
+ let t = h(), [e, r] = [p(), A2()];
37
+ return r.custom(), { IS: n, maybe: t, $Wrap: e, isNothing: d, xProxy: r };
38
+ function n(i, ...l) {
39
+ if (t({ trial: (m2) => "isTypes" in (l?.[0] ?? {}) })) {
40
+ let m2 = l[0];
41
+ return "defaultValue" in m2 ? S(i, m2) : "notTypes" in m2 ? g2(i, m2) : n(i, ...[m2.isTypes].flat());
42
+ }
43
+ let u = typeof i == "symbol" ? Symbol.isSymbol : i;
44
+ return l.length > 1 ? E2(u, ...l) : s(i, ...l);
45
+ }
46
+ function o(i) {
47
+ return i?.[Symbol.proxy] ?? n(i);
48
+ }
49
+ function s(i, ...l) {
50
+ let { noInput: u, noShouldbe: m2, compareTo: w2, inputCTOR: H2, isNaN: R2, isInfinity: j2, shouldBeFirstElementIsNothing: J2 } = x2(i, ...l);
51
+ switch (l = l.length && l[0], true) {
52
+ case J2:
53
+ return String(i) === String(w2);
54
+ case (i?.[Symbol.proxy] && m2):
55
+ return i[Symbol.proxy];
56
+ case R2:
57
+ return m2 ? "NaN" : t({ trial: (Q2) => String(w2) }) === String(i);
58
+ case j2:
59
+ return m2 ? "Infinity" : t({ trial: (Q2) => String(w2) }) === String(i);
60
+ case u:
61
+ return m2 ? String(i) : String(w2) === String(i);
62
+ case H2 === Boolean:
63
+ return l ? H2 === l : "Boolean";
64
+ default:
65
+ return b2(i, l, m2, f2(i, H2));
66
+ }
67
+ }
68
+ function f2(i, l) {
69
+ return i === 0 ? Number : i === "" ? String : i ? l : { name: String(i) };
70
+ }
71
+ function x2(i, ...l) {
72
+ let u = l.length < 1, m2 = !u && l[0], w2 = !u && d(l[0]), H2 = i == null, R2 = !H2 && Object.getPrototypeOf(i)?.constructor, j2 = Number.isNaN(i) || t({ trial: (Q2) => String(i) === "NaN" }), J2 = t({ trial: (Q2) => String(i) }) === "Infinity";
73
+ return { noInput: H2, noShouldbe: u, compareTo: m2, inputCTOR: R2, isNaN: j2, isInfinity: J2, shouldBeFirstElementIsNothing: w2 };
74
+ }
75
+ function b2(i, l, u, m2) {
76
+ switch (true) {
77
+ case (!u && l === i || i?.[Symbol.proxy] && l === Proxy):
78
+ return true;
79
+ case t({ trial: (w2) => String(l) }) === "NaN":
80
+ return String(i) === "NaN";
81
+ case (i?.[Symbol.toStringTag] && n(l, String)):
82
+ return String(l) === i[Symbol.toStringTag];
83
+ default:
84
+ return l ? t({ trial: (w2) => i instanceof l }) || l === m2 || l === Object.getPrototypeOf(m2) || `${l?.name}` === m2?.name : i?.[Symbol.toStringTag] && `[object ${i?.[Symbol.toStringTag]}]` || m2?.name || String(m2);
85
+ }
86
+ }
87
+ function E2(i, ...l) {
88
+ return l.some((u) => n(i, u));
89
+ }
90
+ function d(i, l = false) {
91
+ let u = i == null;
92
+ return u = l ? u || n(i, 1 / 0) || n(i, NaN) : u, u;
93
+ }
94
+ function h() {
95
+ let i = (l, u) => l?.constructor === Function ? l(u) : void 0;
96
+ return function({ trial: l, whenError: u = () => {
97
+ } } = {}) {
98
+ try {
99
+ return i(l);
100
+ } catch (m2) {
101
+ return i(u, m2);
102
+ }
103
+ };
104
+ }
105
+ function p() {
106
+ return function(i) {
107
+ return Object.freeze({ get value() {
108
+ return i;
109
+ }, get [Symbol.type]() {
110
+ return o(i);
111
+ }, get type() {
112
+ return o(i);
113
+ }, [Symbol.is](...l) {
114
+ return n(i, ...l);
115
+ }, is(...l) {
116
+ return n(i, ...l);
117
+ } });
118
+ };
119
+ }
120
+ function S(i, { defaultValue: l, isTypes: u = [void 0], notTypes: m2 } = {}) {
121
+ return u = u?.constructor !== Array ? [u] : u, m2 = m2 && m2?.constructor !== Array ? [m2] : [], m2.length < 1 ? n(i, ...u) ? i : l : g2(i, { isTypes: u, notTypes: m2 }) ? i : l;
122
+ }
123
+ function g2(i, { isTypes: l = [void 0], notTypes: u = [void 0] } = {}) {
124
+ return l = l?.constructor !== Array ? [l] : l, u = u?.constructor !== Array ? [u] : u, n(i, ...l) && !n(i, ...u);
125
+ }
126
+ function c() {
127
+ Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is] || (Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
128
+ return o(this);
129
+ }, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...i) {
130
+ return n(this, ...i);
131
+ }, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(i) {
132
+ return o(i);
133
+ }, enumerable: false, configurable: false }, [Symbol.is]: { value: function(i, ...l) {
134
+ return n(i, ...l);
135
+ }, enumerable: false, configurable: false } }));
136
+ }
137
+ function y2(i) {
138
+ let l = String(Object.getPrototypeOf(i)?.constructor);
139
+ return l.slice(l.indexOf("ion") + 3, l.indexOf("(")).trim();
140
+ }
141
+ function v2(i) {
142
+ let l = i.set;
143
+ return i.set = (u, m2, w2) => m2 === Symbol.proxy ? u[m2] = w2 : l(u, m2, w2), i;
144
+ }
145
+ function A2() {
146
+ let i = Proxy;
147
+ return { native() {
148
+ Proxy = i;
149
+ }, custom() {
150
+ Proxy = new i(i, { construct(l, u) {
151
+ for (let w2 of u) w2.set && (w2 = v2(w2));
152
+ let m2 = new l(...u);
153
+ return m2[Symbol.proxy] = `Proxy (${y2(u[0])})`, m2;
154
+ } });
155
+ } };
156
+ }
157
+ }
158
+ var Ie = ft();
159
+ var W = ut();
160
+ var V = ct();
161
+ function ut() {
162
+ return { html: Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")), svg: Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(",")) };
163
+ }
164
+ function ct() {
165
+ return { a: true, area: true, audio: false, br: true, base: true, body: true, button: true, canvas: true, comment: true, dl: true, data: true, datalist: true, div: true, em: true, embed: false, fieldset: true, font: true, footer: true, form: false, hr: true, head: true, header: true, output: true, iframe: false, frameset: false, img: true, input: true, li: true, label: true, legend: true, link: true, map: true, mark: true, menu: true, media: true, meta: true, nav: true, meter: true, ol: true, object: false, optgroup: true, option: true, p: true, param: true, picture: true, pre: true, progress: false, quote: true, script: false, select: true, source: true, span: true, style: true, caption: true, td: true, col: true, table: true, tr: true, template: false, textarea: true, time: true, title: true, track: true, details: true, ul: true, video: true, del: true, ins: true, slot: true, blockquote: true, svg: true, dialog: true, summary: true, main: true, address: true, colgroup: true, tbody: true, tfoot: true, thead: true, th: true, dd: true, dt: true, figcaption: true, figure: true, i: true, b: true, code: true, h1: true, h2: true, h3: true, h4: true, abbr: true, bdo: true, dfn: true, kbd: true, q: true, rb: true, rp: true, rt: true, ruby: true, s: true, strike: true, samp: true, small: true, strong: true, sup: true, sub: true, u: true, var: true, wbr: true, nobr: true, tt: true, noscript: true };
166
+ }
167
+ function ft() {
168
+ return ["::backdrop{background-color:grey;opacity:0.2;}", `#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`, "@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}", "@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}", "@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}", "@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"];
169
+ }
170
+ var Re = { html: "innerHTML", text: "textContent", class: "className" };
171
+ var ee = dt();
172
+ function dt() {
173
+ let t = { get(e, r) {
174
+ let n = String(r)?.toLowerCase();
175
+ switch (true) {
176
+ case n in e:
177
+ return e[n];
178
+ case vt(n):
179
+ return je(e, n, r);
180
+ default:
181
+ return je(e, n, r, true);
182
+ }
183
+ }, enumerable: false, configurable: false };
184
+ return new Proxy({}, t);
185
+ }
186
+ function je(t, e, r, n = false) {
187
+ return Object.defineProperty(t, e, { get() {
188
+ return n ? (o) => St(r) : wt(e);
189
+ } }), t[e];
190
+ }
191
+ function mt(t, e, r) {
192
+ return e = e?.isJQx && e.first() || e, B({ trial: (n) => xt(e) ? t.append(e) : Qe(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} (for root ${t}) not created, reason
193
+ `, n) });
194
+ }
195
+ function gt(t, e, ...r) {
196
+ let n = pt(e, t);
197
+ return r?.forEach((o) => mt(n, o, t)), n;
198
+ }
199
+ function pt(t, e) {
200
+ switch (t = xe(e) ? ht(t) : t?.isJQx ? t.first() : t, true) {
201
+ case a(t, String):
202
+ return _(e, Qe(t, e) ? { html: t } : { text: t });
203
+ case a(t, Node):
204
+ return bt(e, t);
205
+ default:
206
+ return _(e, t);
207
+ }
208
+ }
209
+ function yt(t) {
210
+ return delete t.data, Object.keys(t).length < 1 || Object.keys(t).forEach((e) => {
211
+ let r = e.toLowerCase();
212
+ r in Re && (t[Re[r]] = t[e], delete t[e]);
213
+ }), t;
214
+ }
215
+ function bt(t, e) {
216
+ let r = _(t);
217
+ return r.append(e), r;
218
+ }
219
+ function _(t, e = {}) {
220
+ e = Je(e, {});
221
+ let r = Object.entries(e.data ?? {}), n = Object.assign(xe(t) ? new Comment(e?.text) : document.createElement(t), yt(e));
222
+ return r.length && r.forEach(([o, s]) => n.dataset[o] = String(s)), n;
223
+ }
224
+ function Je(t, e) {
225
+ return e ? a(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy], defaultValue: e }) : a(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy] });
226
+ }
227
+ function ht(t) {
228
+ return Je(t) ? t?.text ?? t?.textContent ?? "" : String(t);
229
+ }
230
+ function St(t) {
231
+ return _("b", { style: "color:red", text: `'${t}' is not a valid HTML-tag` });
232
+ }
233
+ function Qe(t, e) {
234
+ return !xe(e) && a(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
235
+ }
236
+ function xt(t) {
237
+ return t?.constructor === Comment || t?.constructor === CharacterData;
238
+ }
239
+ function xe(t) {
240
+ return t?.constructor === Comment || /comment/i.test(t);
241
+ }
242
+ function vt(t) {
243
+ return !a(_(t), HTMLUnknownElement);
244
+ }
245
+ function wt(t) {
246
+ return (e, ...r) => gt(t, e, ...r);
247
+ }
248
+ var { IS: te, maybe: Sr, $Wrap: xr, xProxy: vr, isNothing: wr } = Et();
249
+ function Et() {
250
+ Symbol.proxy = Symbol.for("toa.proxy"), Symbol.is = Symbol.for("toa.is"), Symbol.type = Symbol.for("toa.type"), Symbol.isSymbol = Symbol.for("toa.isASymbol"), c();
251
+ let t = h(), [e, r] = [p(), A2()];
252
+ return r.custom(), { IS: n, maybe: t, $Wrap: e, isNothing: d, xProxy: r };
253
+ function n(i, ...l) {
254
+ if (t({ trial: (m2) => "isTypes" in (l?.[0] ?? {}) })) {
255
+ let m2 = l[0];
256
+ return "defaultValue" in m2 ? S(i, m2) : "notTypes" in m2 ? g2(i, m2) : n(i, ...[m2.isTypes].flat());
257
+ }
258
+ let u = typeof i == "symbol" ? Symbol.isSymbol : i;
259
+ return l.length > 1 ? E2(u, ...l) : s(i, ...l);
260
+ }
261
+ function o(i) {
262
+ return i?.[Symbol.proxy] ?? n(i);
263
+ }
264
+ function s(i, ...l) {
265
+ let { noInput: u, noShouldbe: m2, compareTo: w2, inputCTOR: H2, isNaN: R2, isInfinity: j2, shouldBeFirstElementIsNothing: J2 } = x2(i, ...l);
266
+ switch (l = l.length && l[0], true) {
267
+ case J2:
268
+ return String(i) === String(w2);
269
+ case (i?.[Symbol.proxy] && m2):
270
+ return i[Symbol.proxy];
271
+ case R2:
272
+ return m2 ? "NaN" : t({ trial: (Q2) => String(w2) }) === String(i);
273
+ case j2:
274
+ return m2 ? "Infinity" : t({ trial: (Q2) => String(w2) }) === String(i);
275
+ case u:
276
+ return m2 ? String(i) : String(w2) === String(i);
277
+ case H2 === Boolean:
278
+ return l ? H2 === l : "Boolean";
279
+ default:
280
+ return b2(i, l, m2, f2(i, H2));
281
+ }
282
+ }
283
+ function f2(i, l) {
284
+ return i === 0 ? Number : i === "" ? String : i ? l : { name: String(i) };
285
+ }
286
+ function x2(i, ...l) {
287
+ let u = l.length < 1, m2 = !u && l[0], w2 = !u && d(l[0]), H2 = i == null, R2 = !H2 && Object.getPrototypeOf(i)?.constructor, j2 = t({ trial: (Q2) => String(i) }) === "NaN", J2 = t({ trial: (Q2) => String(i) }) === "Infinity";
288
+ return { noInput: H2, noShouldbe: u, compareTo: m2, inputCTOR: R2, isNaN: j2, isInfinity: J2, shouldBeFirstElementIsNothing: w2 };
289
+ }
290
+ function b2(i, l, u, m2) {
291
+ switch (true) {
292
+ case (!u && l === i || i?.[Symbol.proxy] && l === Proxy):
293
+ return true;
294
+ case t({ trial: (w2) => String(l) }) === "NaN":
295
+ return String(i) === "NaN";
296
+ case (i?.[Symbol.toStringTag] && n(l, String)):
297
+ return String(l) === i[Symbol.toStringTag];
298
+ default:
299
+ return l ? t({ trial: (w2) => i instanceof l }) || l === m2 || l === Object.getPrototypeOf(m2) || `${l?.name}` === m2?.name : i?.[Symbol.toStringTag] && `[object ${i?.[Symbol.toStringTag]}]` || m2?.name || String(m2);
300
+ }
301
+ }
302
+ function E2(i, ...l) {
303
+ return l.some((u) => n(i, u));
304
+ }
305
+ function d(i, l = false) {
306
+ let u = i == null;
307
+ return u = l ? u || n(i, 1 / 0) || n(i, NaN) : u, u;
308
+ }
309
+ function h() {
310
+ let i = (l, u) => l?.constructor === Function ? l(u) : void 0;
311
+ return function({ trial: l, whenError: u = () => {
312
+ } } = {}) {
313
+ try {
314
+ return i(l);
315
+ } catch (m2) {
316
+ return i(u, m2);
317
+ }
318
+ };
319
+ }
320
+ function p() {
321
+ return function(i) {
322
+ return Object.freeze({ get value() {
323
+ return i;
324
+ }, get [Symbol.type]() {
325
+ return o(i);
326
+ }, get type() {
327
+ return o(i);
328
+ }, [Symbol.is](...l) {
329
+ return n(i, ...l);
330
+ }, is(...l) {
331
+ return n(i, ...l);
332
+ } });
333
+ };
334
+ }
335
+ function S(i, { defaultValue: l, isTypes: u = [void 0], notTypes: m2 } = {}) {
336
+ return u = u?.constructor !== Array ? [u] : u, m2 = m2 && m2?.constructor !== Array ? [m2] : [], m2.length < 1 ? n(i, ...u) ? i : l : g2(i, { isTypes: u, notTypes: m2 }) ? i : l;
337
+ }
338
+ function g2(i, { isTypes: l = [void 0], notTypes: u = [void 0] } = {}) {
339
+ return l = l?.constructor !== Array ? [l] : l, u = u?.constructor !== Array ? [u] : u, n(i, ...l) && !n(i, ...u);
340
+ }
341
+ function c() {
342
+ Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is] || (Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
343
+ return o(this);
344
+ }, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...i) {
345
+ return n(this, ...i);
346
+ }, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(i) {
347
+ return o(i);
348
+ }, enumerable: false, configurable: false }, [Symbol.is]: { value: function(i, ...l) {
349
+ return n(i, ...l);
350
+ }, enumerable: false, configurable: false } }));
351
+ }
352
+ function y2(i) {
353
+ let l = String(Object.getPrototypeOf(i)?.constructor);
354
+ return l.slice(l.indexOf("ion") + 3, l.indexOf("(")).trim();
355
+ }
356
+ function v2(i) {
357
+ let l = i.set;
358
+ return i.set = (u, m2, w2) => m2 === Symbol.proxy ? u[m2] = w2 : l(u, m2, w2), i;
359
+ }
360
+ function A2() {
361
+ let i = Proxy;
362
+ return { native() {
363
+ Proxy = i;
364
+ }, custom() {
365
+ Proxy = new i(i, { construct(l, u) {
366
+ for (let w2 of u) w2.set && (w2 = v2(w2));
367
+ let m2 = new l(...u);
368
+ return m2[Symbol.proxy] = `Proxy (${y2(u[0])})`, m2;
369
+ } });
370
+ } };
371
+ }
372
+ }
373
+ var U = Lt;
374
+ function Lt({ styleSheet: t, createWithId: e } = {}) {
375
+ let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: s, removeRules: f2, consider: x2, currentSheetID: b2 } = Ct({ styleSheet: t, createWithId: e });
376
+ function E2(g2, c) {
377
+ if (g2 && c.removeProperties) {
378
+ Object.keys(c.removeProperties).forEach((y2) => g2.style.removeProperty(ke(y2)));
379
+ return;
380
+ }
381
+ Object.entries(c).forEach(([y2, v2]) => {
382
+ y2 = ke(y2.trim()), v2 = v2.trim();
383
+ let A2;
384
+ if (/!important/.test(v2) && (v2 = v2.slice(0, v2.indexOf("!important")).trim(), A2 = "important"), !CSS.supports(y2, v2)) return console.error(`StylingFactory ${b2} error: '${y2}' with value '${v2}' not supported (yet)`);
385
+ ze(() => g2.style.setProperty(y2, v2, A2), `StylingFactory ${b2} (setRule4Selector) failed`);
386
+ });
387
+ }
388
+ function d(g2, c, y2 = s) {
389
+ if (g2 = g2?.trim?.(), !te(g2, String) || !g2.length || /[;,]$/g.test(g2)) return console.error(`StylingFactory ${b2} (setRules): [${g2 || "[no selector given]"}] is not a valid selector`);
390
+ if (c.removeRule) return f2(g2);
391
+ let v2 = n(g2, true), A2 = v2 || y2.cssRules[y2.insertRule(`${g2} {}`, y2.cssRules.length || 0)];
392
+ return x2(() => E2(A2, c), g2, v2);
393
+ }
394
+ function h(g2) {
395
+ let c = g2.trim().split(/{/, 2), y2 = c.shift().trim();
396
+ if (!te(y2, String) || !y2?.trim()?.length) return console.error(`StylingFactory ${b2} (doParse): no (valid) selector could be extracted from rule ${ve(g2)}`);
397
+ let v2 = Pt(c.shift());
398
+ return ze(() => d(y2, v2), `StylingFactory ${b2} (setRules) failed`);
399
+ }
400
+ function p(g2) {
401
+ let c = r(g2);
402
+ return c.done ? c.existing : h(g2);
403
+ }
404
+ function S(g2, c) {
405
+ return g2.trim().startsWith("@media") ? p(Tt(g2, c)) : d(g2, c);
406
+ }
407
+ return function(g2, c = {}) {
408
+ return o(g2, c) && (Object.keys(c).length ? S(g2, c) : p(g2));
409
+ };
410
+ }
411
+ function Ct({ styleSheet: t, createWithId: e }) {
412
+ let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
413
+ t = e ? o(e) : t;
414
+ function o(p) {
415
+ let S = document.querySelector(`#${p}`)?.sheet;
416
+ if (S) return S;
417
+ let g2 = Object.assign(document.createElement("style"), { id: p });
418
+ return document.head.insertAdjacentElement("beforeend", g2), g2.sheet;
419
+ }
420
+ function s(p) {
421
+ return console.error(`StylingFactory ${n} [rule: ${p}]
422
+ => @charset, @namespace and @import are not supported here`), { done: true };
423
+ }
424
+ function f2(p, S) {
425
+ return [...t.rules].find((g2) => S ? Be(g2.selectorText || "", p) : At`${Ft(p)}${[..."gim"]}`.test(g2.cssText));
426
+ }
427
+ function x2(p) {
428
+ return /^@charset|@import|namespace/i.test(p.trim()) ? s(p) : p.match(/}/g)?.length > 1 ? { existing: d(p, 1), done: true } : { done: false };
429
+ }
430
+ function b2(p) {
431
+ let S = [...t.cssRules].reduce((c, y2, v2) => Be(y2.selectorText || "", p) && c.concat(v2) || c, []), g2 = S.length;
432
+ return S.forEach((c) => t.deleteRule(c)), g2 > 0 ? console.info(`\u2714 Removed ${g2} instance${g2 > 1 ? "s" : ""} of selector ${p} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${p} does not exist in ${n.slice(4)}`);
433
+ }
434
+ function E2(p, S) {
435
+ return p && te(p, String) && p.trim().length > 0 && te(S, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
436
+ }
437
+ function d(p) {
438
+ p = p.trim();
439
+ let S = p.slice(0, p.indexOf("{")).trim(), g2 = !!f2(S);
440
+ try {
441
+ return t.insertRule(`${p}`, t.cssRules.length), g2;
442
+ } catch (c) {
443
+ return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
444
+ ${c.message}
445
+ Rule: ${ve(p)}
446
+ ${r}`), g2;
447
+ }
448
+ }
449
+ function h(p, S, g2) {
450
+ try {
451
+ return p(), g2;
452
+ } catch (c) {
453
+ return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
454
+ ${c.message}
455
+ Rule: ${ve(S)}
456
+ ${r}`), g2;
457
+ }
458
+ }
459
+ return { sheet: t, removeRules: b2, tryParseAtOrNestedRules: x2, ruleExists: f2, checkParams: E2, tryParse: d, consider: h, currentSheetID: n };
460
+ }
461
+ function Tt(t, e) {
462
+ return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${$t(n)}`)}`;
463
+ }
464
+ function ve(t) {
465
+ let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
466
+ return t.length > e.length ? `${e.trim()}...truncated` : e;
467
+ }
468
+ function $t(t) {
469
+ return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
470
+ `);
471
+ }
472
+ function Ft(t) {
473
+ return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
474
+ }
475
+ function At(t, ...e) {
476
+ let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
477
+ return new RegExp((e.length && t.raw.reduce((n, o, s) => n.concat(e[s - 1] || "").concat(o), "") || t.raw.join("")).split(`
478
+ `).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
479
+ }
480
+ function ke(t) {
481
+ return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
482
+ }
483
+ function ze(t, e) {
484
+ try {
485
+ return t();
486
+ } catch (r) {
487
+ console.error(`${e || "an error occured"}: ${r.message}`);
488
+ }
489
+ }
490
+ function Ht(t) {
491
+ return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
492
+ `).replaceAll("\\3b", ";").split(`
493
+ `);
494
+ }
495
+ function Nt(t) {
496
+ return t.reduce((e, r) => {
497
+ let [n, o] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
498
+ return n && o ? { ...e, [n]: o } : e;
499
+ }, {});
500
+ }
501
+ function Pt(t) {
502
+ return Nt(Ht(t));
503
+ }
504
+ function Be(t, e) {
505
+ return t?.replace("::", ":") === e?.replace("::", ":");
506
+ }
507
+ var we = false;
508
+ var Mt = { on: () => we = true, off: () => we = false };
509
+ var M = { tagsRaw: V, allowUnknownHtmlTags: Mt, isAllowed(t) {
510
+ if (we) return true;
511
+ let e = a(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
512
+ return e === "#text" || !!V[e];
513
+ }, allowTag: (t) => V[t.toLowerCase()] = true, prohibitTag: (t) => V[t.toLowerCase()] = false };
514
+ var Ot = true;
515
+ var re = { data: /data-[\-\w.\p{L}]/ui, validURL: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, whiteSpace: /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, notAllowedValues: /^javascript|injected|noreferrer|alert|DataURL/gi };
516
+ function Dt(t) {
517
+ if (Ot && Object.keys(t.removed).length) {
518
+ let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${D(n)} => ${o}`], []).join("\\000A");
519
+ C.error(`JQx: HTML creation error(s): ${e}`);
520
+ }
521
+ }
522
+ function It(t) {
523
+ let e = t.nodeName.toLowerCase(), r = ["annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph"];
524
+ return /-/.test(e) && !r.find((n) => n === e) || M.isAllowed(e);
525
+ }
526
+ function k(t) {
527
+ let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
528
+ return a(t, HTMLElement) && [...t.childNodes].forEach((r) => {
529
+ if (r?.children?.length && k(r), r?.attributes) {
530
+ let o = a(r, SVGElement) ? W.svg : W.html;
531
+ [...(r ?? { attributes: [] }).attributes].forEach((s) => {
532
+ let f2 = s.name.trim().toLowerCase(), x2 = s.value.trim().toLowerCase().replace(re.whiteSpace, ""), b2 = f2 === "href" ? !re.validURL.test(x2) : re.notAllowedValues.test(x2), E2 = f2.startsWith("data") ? !re.data.test(f2) : !!o[f2];
533
+ if (b2 || E2) {
534
+ let d = ne(s.value || "none", 60);
535
+ d += d.length === 60 ? "..." : "", e.removed[`${s.name}`] = `attribute/property/value not allowed, removed. Value: ${d}`, r.removeAttribute(s.name);
536
+ }
537
+ });
538
+ }
539
+ if (!(It(r) || r.constructor === CharacterData || r.constructor === Comment)) {
540
+ let o = (r?.outerHTML || r?.textContent).trim(), s = ne(o, 60) ?? "EMPTY";
541
+ s += s.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${s}`, r.remove();
542
+ }
543
+ }), Dt(e), t;
544
+ }
545
+ function Rt(t) {
546
+ let e = document.createElement("div");
547
+ return e.insertAdjacentHTML(F.end, t), e.childNodes.length ? k(e) : void 0;
548
+ }
549
+ function jt(t, e, r) {
550
+ switch (true) {
551
+ case a(t, Comment):
552
+ return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
553
+ case a(t, Text):
554
+ return e.insertAdjacentText(r, t.data || t.textContent);
555
+ default:
556
+ return;
557
+ }
558
+ }
559
+ function z(t = [], e = document.body, r = F.BeforeEnd) {
560
+ return r = r || F.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, o) => {
561
+ let s = O(o) && Jt(o, e, r);
562
+ return s ? [...n, s] : n;
563
+ }, []);
564
+ }
565
+ function Jt(t, e = document.body, r = F.BeforeEnd) {
566
+ return r = r || F.BeforeEnd, e = e?.isJQx ? e?.[0] : e, a(t, Comment, Text) ? jt(t, e, r) : a(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
567
+ }
568
+ function N(t) {
569
+ if (a(t, Text, Comment)) return t;
570
+ let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
571
+ if (r?.length && (r = r.length > 1 ? r.filter((o) => o.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
572
+ if (r || a(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
573
+ let n = Rt(t);
574
+ return n.childNodes.length < 1 ? N(`<span data-jqxcreationerror="1">${oe(t, 60)}</span>`) : n.children[0];
575
+ }
576
+ function ie(t) {
577
+ if (t.node("#jqxPopup")) return;
578
+ t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Ie);
579
+ let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], o = {};
580
+ return t.handle({ type: "click, cancel", handlers: p, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: s, remove: f2, removeModal: h });
581
+ function s(c) {
582
+ if (n.open) switch (true) {
583
+ case x2(c):
584
+ return;
585
+ default:
586
+ return f2(), setTimeout(() => s(c), 200);
587
+ }
588
+ o = { ...c };
589
+ let { content: y2 } = o;
590
+ return t.IS(y2, String, HTMLElement) || y2?.isJQx ? b2() : true;
591
+ }
592
+ function f2() {
593
+ return o.modal ? g2(o.warnMessage) : E2();
594
+ }
595
+ function x2(c) {
596
+ for (let [y2, v2] of Object.entries(o)) if (v2 !== c[y2]) return false;
597
+ return true;
598
+ }
599
+ function b2() {
600
+ r.clear();
601
+ let { content: c, modal: y2, closeAfter: v2 } = o;
602
+ y2 = t.IS(y2, Boolean) ? y2 : false;
603
+ let A2 = y2 ? "" : t.div({ id: "closeHandleIcon" });
604
+ r.append(A2, t.IS(c, String) ? t.div(c) : c), n.showModal(), !y2 && t.IS(v2, Number) && S(f2, v2);
605
+ }
606
+ function E2() {
607
+ if (n.close(o.returnValue), d(), t.IS(o.callback, Function)) return e.push(setTimeout(() => o.callback(o.returnValue), 200));
608
+ o = {};
609
+ }
610
+ function d() {
611
+ e.forEach((c) => clearTimeout(c)), e = [];
612
+ }
613
+ function h({ callback: c, value: y2 } = {}) {
614
+ o.returnValue = y2, o.modal = false, o.callback = c || o.callback, f2();
615
+ }
616
+ function p({ evt: c }) {
617
+ if (!(Object.keys(o).length < 1 || !n.open) && (c.type === "cancel" && o.modal && c.preventDefault(), c.target.closest("#closeHandleIcon") || !c.target.closest("#jqxPopupContent"))) return o.activeTimer && clearTimeout(o.activeTimer), f2();
618
+ }
619
+ function S(c, y2) {
620
+ t.IS(c, Function) && t.IS(y2, Number) && y2 > 0 && (d(), e.push(setTimeout(c, y2 * 1e3)));
621
+ }
622
+ function g2(c) {
623
+ if (!t.IS(c, String, HTMLElement, Proxy)) return;
624
+ let y2 = r.find$(".warn");
625
+ switch (true) {
626
+ case y2.is.empty:
627
+ y2 = t.div({ class: "warn" }, c);
628
+ default:
629
+ r.append(y2.addClass("active")), S(() => r.find$(".warn").removeClass("active"), 2);
630
+ }
631
+ }
632
+ }
633
+ function le(t) {
634
+ let e = {}, r = "anonymous_";
635
+ function n(d) {
636
+ if (d) {
637
+ let { handler: h, capture: p, type: S } = d;
638
+ document.addEventListener(S, h, { capture: p });
639
+ }
640
+ }
641
+ function o(d) {
642
+ if (d) {
643
+ let { type: h, handler: p, capture: S } = d;
644
+ document.removeEventListener(h, p, { capture: S });
645
+ }
646
+ }
647
+ function s(d, h, p, S) {
648
+ return function(g2) {
649
+ if (!T(h)) return d({ evt: g2 });
650
+ let c = g2.target.closest(h);
651
+ if (c) {
652
+ let y2 = t(c);
653
+ d({ self: y2, me: y2, evt: g2 }), p && b2(g2.type, S);
654
+ }
655
+ return true;
656
+ };
657
+ }
658
+ function f2(d) {
659
+ return e[d] = e[d] || {}, e[d];
660
+ }
661
+ function x2(d, h) {
662
+ return Object.entries(f2(d)).find(([p]) => p === h);
663
+ }
664
+ function b2(d, h) {
665
+ let p = x2(d, h);
666
+ p && (o(p[1]), delete e[d][h], delete se[h], C.warn(`Removed listener [${h}] for event type [${d}].`));
667
+ }
668
+ function E2(d) {
669
+ let { type: h, handler: p, name: S, capture: g2, once: c, selector: y2, node: v2, about: A2 } = d;
670
+ e[h] = e[h] || {};
671
+ let i = Ee(S || p.name), l = p;
672
+ if (v2 instanceof HTMLElement) {
673
+ let u = v2.dataset.hid || i;
674
+ v2.dataset.hid = u, y2 = `[data-hid=${u}]`;
675
+ }
676
+ switch (true) {
677
+ case !e[h][i]:
678
+ return C.log(`JQx: created listener for event type ${h}, with handler name ${i}`), e[h][i] = { name: i, handler: s(p, y2, c, i), capture: We(h, g2), once: !!c, type: h, initialHandler: l, selector: !!y2 && y2 || false, about: !!A2 && A2 || false, unListen() {
679
+ b2(h, i);
680
+ } }, e[h][i];
681
+ default:
682
+ return console.warn(`The listener [${i}] for [${h}] exists, it is not re-assigned.`);
683
+ }
684
+ }
685
+ return { remove(...d) {
686
+ return b2(...d);
687
+ }, listen: function(d) {
688
+ let { type: h, handler: p } = d;
689
+ if (!T(h) || !a(p, Function)) return;
690
+ let S = E2(d);
691
+ if (S) return n(S), { type: h, name: S.name, unListen() {
692
+ b2(h, S.name);
693
+ } };
694
+ }, get ListenerStore() {
695
+ return Object.freeze({ ...e });
696
+ } };
697
+ }
698
+ var C = zt();
699
+ var Qt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
700
+ var F = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
701
+ return t[String(e).toLowerCase()] ?? t[e];
702
+ } }));
703
+ var kt = [...Array(26)].map((t, e) => String.fromCharCode(e + 65)).concat([...Array(26)].map((t, e) => String.fromCharCode(e + 97))).concat([...Array(10)].map((t, e) => `${e}`));
704
+ var Ce = Object.freeze({ get(t, e) {
705
+ return t[Y(e)] || t[e];
706
+ }, enumerable: false, configurable: false });
707
+ var se = {};
708
+ function Te() {
709
+ let t = setTimeout(() => {
710
+ });
711
+ for (; t >= 0; ) clearTimeout(t--);
712
+ }
713
+ function Ee(t) {
714
+ return T(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : Ve();
715
+ }
716
+ function $e(t) {
717
+ let e = !!t.node && !a(t, Text, Comment);
718
+ switch (true) {
719
+ case e:
720
+ let r = t.node.dataset ? Object.keys(t.node.dataset).map((s) => `[data-${s}]`) : [], o = [t.attr("id") && `#${t?.attr("id")}` || void 0, t.attr("class") && t?.attr("class").split(" ").map((s) => `.${s}`).join(", ") || void 0, r.length > 0 && r.join(", ") || void 0].filter((s) => !!s).join(", ") || [];
721
+ return o.length ? `(${o})` : "";
722
+ default:
723
+ return "";
724
+ }
725
+ }
726
+ function Ve(t) {
727
+ let e = `anonymous_${Math.random().toString(36).slice(2)}`;
728
+ return se[e] ? Ve() : (se[e] = e, e);
729
+ }
730
+ function We(t, e) {
731
+ return !!Qt.find((r) => r === t) || !!e;
732
+ }
733
+ function ce(t) {
734
+ return t.startsWith("data") || W.html.find((e) => t.toLowerCase() === e);
735
+ }
736
+ function fe(t) {
737
+ return t && (t.textContent = "");
738
+ }
739
+ function G(t, e = 0, r = true) {
740
+ return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? G(t, e, r) : e;
741
+ }
742
+ function T(t, e = 1) {
743
+ return e = a(e, Number) && e || 1, a(t, String) && t.length >= e;
744
+ }
745
+ function ne(t, e = 120) {
746
+ return oe(t, e).replace(/&lt;/g, "<");
747
+ }
748
+ function oe(t, e = 120) {
749
+ return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "&lt;").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " &hellip;" : "").trim();
750
+ }
751
+ function D(t) {
752
+ switch (true) {
753
+ case a(t, String):
754
+ let e = document.createElement("div");
755
+ return e.append(t), e.innerHTML;
756
+ default:
757
+ return t;
758
+ }
759
+ }
760
+ function Le(t) {
761
+ return a(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
762
+ }
763
+ function zt() {
764
+ let [t, e] = [false, true], r = [], n = { get on() {
765
+ return t = true, n;
766
+ }, get off() {
767
+ return t = false, n;
768
+ }, get disable() {
769
+ return e = true, n;
770
+ }, get enable() {
771
+ return e = false, n;
772
+ }, get backLog() {
773
+ return r;
774
+ } };
775
+ function o() {
776
+ e = true;
777
+ }
778
+ function s() {
779
+ e = false;
780
+ }
781
+ function f2(...E2) {
782
+ return r.unshift(...E2.map((d) => `${ue()} \u2A3B ${Le(d)}`)), console.error(r.slice(0, E2.length).join(`
783
+ `)), n;
784
+ }
785
+ function x2(...E2) {
786
+ return r.unshift(...E2.map((d) => `${ue()} \u26A0 ${Le(d)}`)), console.warn(r.slice(0, E2.length).join(`
787
+ `)), n;
788
+ }
789
+ function b2(...E2) {
790
+ let d = E2.map((h) => `${ue()} \u2714 ${Le(h)}`);
791
+ switch (!e && r.unshift(...d), t) {
792
+ case true:
793
+ console.log(d.join(`
794
+ `));
795
+ default:
796
+ return n;
797
+ }
798
+ }
799
+ return Object.defineProperties(n, { log: { value: b2, enumerable: false }, error: { value: f2, enumerable: false }, warn: { value: x2, enumerable: false } }), Object.freeze(n);
800
+ }
801
+ function ue() {
802
+ return ((t) => `[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
803
+ }
804
+ function Fe(t, e) {
805
+ if (t) for (let [r, n] of Object.entries(e)) {
806
+ if (r = P(r), r.startsWith("data")) return de(t, n);
807
+ a(n, String) && ce(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
808
+ }
809
+ }
810
+ function de(t, e) {
811
+ if (t && a(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${P(r)}`, n);
812
+ }
813
+ function me(t) {
814
+ return t ? a(t, Proxy) ? [t.EL] : a(t, NodeList) ? [...t] : O(t) ? [t] : K(t) ? t : t.isJQx ? t.collection : void 0 : [];
815
+ }
816
+ function ge(t, e) {
817
+ return t.andThen(e);
818
+ }
819
+ function pe(t, e) {
820
+ return t.andThen(e, true);
821
+ }
822
+ function O(t) {
823
+ return a(t, Text, HTMLElement, Comment);
824
+ }
825
+ function Z(t, e) {
826
+ if (a(e, Object)) for (let [r, n] of Object.entries(e)) {
827
+ let o;
828
+ /!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty(P(r), n, o);
829
+ }
830
+ }
831
+ function I(t) {
832
+ let e = t.cloneNode(true);
833
+ return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
834
+ }
835
+ function _e(t) {
836
+ if (!a(t, HTMLElement)) return;
837
+ let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), s = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1, x2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, b2 = +r.opacity == 0 || +(e.opacity || 1) == 0;
838
+ return !(s || x2 || b2 || o || n || f2);
839
+ }
840
+ function Ue(t) {
841
+ return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
842
+ }
843
+ function Ge(t) {
844
+ return t?.filter((e) => e).reduce((e, r) => e.concat(Ne(r) ? `<!--${r.data}-->` : be(r) ? r.textContent : r.outerHTML), "");
845
+ }
846
+ function ae(t, e = 2) {
847
+ return `${t}`.padStart(e, "0");
848
+ }
849
+ function Ze(t, e = 0) {
850
+ return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
851
+ }
852
+ function ye() {
853
+ return `_${Bt(kt).slice(0, 8).join("")}`;
854
+ }
855
+ function Ae(t) {
856
+ return t = a(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, a(t, Array) ? t : a(t, String) && t?.trim().toLowerCase() || "";
857
+ }
858
+ function Ye(t) {
859
+ return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
860
+ }
861
+ function He(t, e) {
862
+ switch (t = String(t).trim(), true) {
863
+ case /^(0|false|f)$/i.test(t):
864
+ return false;
865
+ case /^(1|true|t)$/i.test(t):
866
+ return true;
867
+ default:
868
+ return e;
869
+ }
870
+ }
871
+ function Bt(t) {
872
+ let e = t.length;
873
+ for (; e--; ) {
874
+ let r = Ze(e);
875
+ [t[e], t[r]] = [t[r], t[e]];
876
+ }
877
+ return t;
878
+ }
879
+ function Y(t) {
880
+ return a(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${Wt(e)}` || e).join("") : t;
881
+ }
882
+ function P(t) {
883
+ return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
884
+ }
885
+ function Wt([t, ...e]) {
886
+ return `${t.toUpperCase()}${e.join("")}`;
887
+ }
888
+ function be(t) {
889
+ return a(t, Comment, Text);
890
+ }
891
+ function Ne(t) {
892
+ a(t, Comment);
893
+ }
894
+ function Xe(t) {
895
+ return a(t, Text);
896
+ }
897
+ function X(t) {
898
+ return a(t, String) && /^<|>$/.test(`${t}`.trim());
899
+ }
900
+ function K(t) {
901
+ return a(t, Array) && !t?.find((e) => !O(e));
902
+ }
903
+ function he(t) {
904
+ return a(t, Array) && !t?.find((e) => !X(e));
905
+ }
906
+ function L(t, e) {
907
+ let r = t.collection.filter((n) => !be(n));
908
+ for (let n = 0; n < r.length; n += 1) e(r[n], n);
909
+ return t;
910
+ }
911
+ function Ke(t) {
912
+ return t.node ? a(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
913
+ }
914
+ function Pe(t, e, r) {
915
+ let n = e !== document.body && a(t, String) && t.toLowerCase() !== "body" ? e : document;
916
+ try {
917
+ r.collection = [...n.querySelectorAll(t)];
918
+ } catch {
919
+ C.warn(`JQx: Invalid CSS querySelector. [${a(t, String) ? t : "Not a string!"}]`);
920
+ }
921
+ }
922
+ function qe() {
923
+ return { isCommentOrTextNode: be, isNode: O, isComment: Ne, isText: Xe, isHtmlString: X, isArrayOfHtmlElements: K, isArrayOfHtmlStrings: he, ElemArray2HtmlString: Ge, input2Collection: me, setCollectionFromCssSelector: Pe, cssRuleEdit: U({ createWithId: "JQxStylesheet" }) };
924
+ }
925
+ function et() {
926
+ let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
927
+ return (r) => {
928
+ let n = r.node;
929
+ return a(n, Node) ? Object.freeze({ get writable() {
930
+ return Ue(n);
931
+ }, get modal() {
932
+ return Ye(n);
933
+ }, get inDOM() {
934
+ return n.isConnected;
935
+ }, get open() {
936
+ return n.open ?? false;
937
+ }, get visible() {
938
+ return _e(n);
939
+ }, get disabled() {
940
+ return n.hasAttribute("readonly") || n.hasAttribute("disabled");
941
+ }, get empty() {
942
+ return r.collection.length < 1;
943
+ }, get virtual() {
944
+ return r.isVirtual;
945
+ } }) : e;
946
+ };
947
+ }
948
+ function tt(t, e, r, n) {
949
+ r && a(e, String) && (e = { [e]: r === "-" ? "" : r });
950
+ let o;
951
+ e.className && (o = e.className, delete e.className), o = [...t.classList].find((f2) => f2.startsWith("JQxClass-") || o && f2 === o) || o || `JQxClass-${ye().slice(1)}`, n.editCssRule(`.${o}`, e), t.classList.add(o);
952
+ }
953
+ var Vt = et();
954
+ function rt(t) {
955
+ return { factoryExtensions: _t(t), instanceExtensions: Ut(t) };
956
+ }
957
+ function _t(t) {
958
+ return { data(e) {
959
+ return { get all() {
960
+ return new Proxy(e[0]?.dataset ?? {}, Ce);
961
+ }, set(r = {}) {
962
+ if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
963
+ return e;
964
+ }, get(r, n) {
965
+ return e.data.all[r] ?? n;
966
+ }, add(r = {}) {
967
+ if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
968
+ return e;
969
+ }, remove(r) {
970
+ return e[0]?.removeAttribute(`data-${P(r)}`), e;
971
+ } };
972
+ }, dimensions(e) {
973
+ if (e.is.empty) return C.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
974
+ let { node: r } = e, n = r.getBoundingClientRect().toJSON();
975
+ return n.scrollTopDistance = G(r, 0), n.scrollLeftDistance = G(r, 0, false), n;
976
+ }, node(e) {
977
+ return e[0];
978
+ }, HTML(e) {
979
+ return { get(r, n) {
980
+ if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
981
+ let o = r ? e.outerHtml : e.html();
982
+ return n ? D(o) : o;
983
+ }, set(r, n = false, o = false) {
984
+ r = r.isJQx ? r.HTML.get(1) : r;
985
+ let s = a(r, String);
986
+ return r = s && o ? D(r) : r, s && (r || "").trim().length && e.html(r, n), e;
987
+ }, replace(r, n = false) {
988
+ return e.HTML.set(r, false, n);
989
+ }, append(r, n = false) {
990
+ return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r, true, n);
991
+ }, insert(r, n = false) {
992
+ return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
993
+ } };
994
+ }, is(e) {
995
+ return Vt(e);
996
+ }, length(e) {
997
+ return e.collection.length;
998
+ }, outerHtml(e) {
999
+ return (e.first() || { outerHTML: void 0 }).outerHTML;
1000
+ }, parent(e) {
1001
+ let r = t(e[0]?.parentNode);
1002
+ return r.is.empty ? e : r;
1003
+ }, render(e) {
1004
+ switch (true) {
1005
+ case !e.is.empty:
1006
+ return e.toDOM();
1007
+ default:
1008
+ return t.logger.warn("[JQx.render]: empty collection"), e;
1009
+ }
1010
+ }, Style(e) {
1011
+ return { get computed() {
1012
+ return e.is.empty ? {} : getComputedStyle(e[0]);
1013
+ }, inline(r) {
1014
+ return e.style(r);
1015
+ }, inSheet(r) {
1016
+ return e.css(r);
1017
+ }, valueOf(r) {
1018
+ return e.is.empty ? void 0 : getComputedStyle(e[0])[P(r)];
1019
+ }, nwRule(r) {
1020
+ return e.Style.byRule({ rules: r });
1021
+ }, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
1022
+ let s = a(n, String) && !r.length ? n.split("{")[0].trim() : "";
1023
+ if (n = n && a(n, String) ? [n] : n, r = r && a(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let f2 of r) e.addClass(f2);
1024
+ return s?.startsWith(".") && e.addClass(s.slice(1)), s?.startsWith("#") && !e.attr("id") && e.prop({ id: s.slice(1) }), e;
1025
+ } };
1026
+ } };
1027
+ }
1028
+ function Ut(t) {
1029
+ return { addClass(e, ...r) {
1030
+ return L(e, (n) => n && r.forEach((o) => n.classList.add(o)));
1031
+ }, after: ge, afterMe: ge, andThen(e, r, n = false) {
1032
+ if (!r || !a(r, String, Node, Proxy)) return C.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."), e;
1033
+ r = r?.isJQx ? r : a(r, Node) ? t.virtual(r) : t.virtual(N(r));
1034
+ let [o, s, f2] = n ? [0, "before", r.collection.concat(e.collection)] : [e.collection.length - 1, "after", e.collection.concat(r.collection)];
1035
+ return e[o][s](...r.collection), e.collection = f2, e;
1036
+ }, append(e, ...r) {
1037
+ if (e.is.empty || r.length < 1) return e;
1038
+ let n = e.length === 1;
1039
+ for (let o of r) {
1040
+ if (!o.isJQx && T(o)) {
1041
+ let s = o.trim(), x2 = !/^<(.+)[^>]+>$/m.test(s) ? t.text(o) : N(o);
1042
+ L(e, (b2) => b2.append(n ? x2 : I(x2)));
1043
+ }
1044
+ O(o) && L(e, (s) => s.append(n ? o : I(o))), o.isJQx && !o.is.empty && L(e, (s) => o.collection.forEach((f2) => s.append(n ? f2 : I(f2))));
1045
+ }
1046
+ return e;
1047
+ }, appendTo(e, r) {
1048
+ switch (true) {
1049
+ case (!r.isJQx && !a(r, HTMLElement)):
1050
+ return $.warn("[JQx instance].appendTo: invalid input"), e;
1051
+ default:
1052
+ return (r.isJQx ? r : t(r)).append(e), e;
1053
+ }
1054
+ }, attr(e, r, n) {
1055
+ if (!e.node || a(e.node, Text, Comment)) return e;
1056
+ if (!n && T(r)) return r = P(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
1057
+ if (T(r) && n) switch (r = P(r), true) {
1058
+ case r.startsWith("data-"):
1059
+ r = { data: { [r.replace("data-", "")]: n } };
1060
+ break;
1061
+ default:
1062
+ r = { [r]: n };
1063
+ }
1064
+ return a(r, Object) && !e.is.empty && Fe(e.node, r), e;
1065
+ }, before: pe, beforeMe: pe, clear(e) {
1066
+ return L(e, fe);
1067
+ }, closest(e, r) {
1068
+ let n = T(r) ? e.node?.closest(r) : void 0;
1069
+ return n ? t(n) : e;
1070
+ }, computedStyle(e, r) {
1071
+ let { node: n } = e;
1072
+ return n && getComputedStyle(n)[r];
1073
+ }, css(e, r, n) {
1074
+ return L(e, (o) => tt(o, r, n, t));
1075
+ }, duplicate(e, r = false, n = document.body) {
1076
+ switch (true) {
1077
+ case e.is.empty:
1078
+ return C.error("Duplicating an empty JQx instance is not possible"), e;
1079
+ default:
1080
+ let o = e.collection[0].cloneNode(true);
1081
+ return o.childNodes.forEach((s) => {
1082
+ s.removeAttribute && s?.removeAttribute("id");
1083
+ }), r ? t(o).toDOM(n) : t.virtual(o);
1084
+ }
1085
+ }, each(e, r) {
1086
+ return L(e, r);
1087
+ }, empty(e) {
1088
+ return L(e, fe);
1089
+ }, find(e, r) {
1090
+ return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
1091
+ }, find$(e, r) {
1092
+ return e.collection.length > 0 ? t(r, e) : e;
1093
+ }, first(e, r = false) {
1094
+ return e.collection.length > 0 ? r ? e.single() : e.collection[0] : void 0;
1095
+ }, first$(e, r) {
1096
+ return e.single(r);
1097
+ }, getData(e, r, n) {
1098
+ return e.node?.dataset?.[r] || n;
1099
+ }, hasClass(e, ...r) {
1100
+ return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
1101
+ }, hide(e) {
1102
+ return L(e, (r) => Z(r, { display: "none !important" }));
1103
+ }, html(e, r, n) {
1104
+ switch (true) {
1105
+ case (e.is.empty && !T(r)):
1106
+ return "";
1107
+ case !T(r):
1108
+ return e.node?.getHTML() ?? "";
1109
+ default:
1110
+ let o = N(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
1111
+ return L(e, (f2) => (f2.textContent = n ? f2.textContent : "", f2.insertAdjacentHTML(t.at.end, o.getHTML())));
1112
+ }
1113
+ }, htmlFor(e, r, n = "", o = false) {
1114
+ if (e.is.empty || !T(r) || !T(n)) return e;
1115
+ let s = e.find$(r);
1116
+ if (s.length < 1) return e;
1117
+ let f2 = N(`<span>${n}</span>`);
1118
+ return s.each((x2) => {
1119
+ o || (x2.textContent = ""), x2.insertAdjacentHTML(t.at.end, f2?.getHTML());
1120
+ }), e;
1121
+ }, isEmpty(e) {
1122
+ return !e.node;
1123
+ }, nth$(e, r) {
1124
+ return e.single(r);
1125
+ }, on(e, r, ...n) {
1126
+ switch (true) {
1127
+ case (e.is.empty || !a(r, String, Array) || !T(r) || n.length < 1):
1128
+ return e;
1129
+ default:
1130
+ return t.handle({ type: r, node: e.node, handler: n }), e;
1131
+ }
1132
+ }, once(e, r, ...n) {
1133
+ switch (true) {
1134
+ case (e.is.empty || !a(r, String, Array) || !T(r) || n.length < 1):
1135
+ return e;
1136
+ default:
1137
+ return t.handle({ type: r, once: true, node: e.node, handler: n }), e;
1138
+ }
1139
+ }, prepend(e, ...r) {
1140
+ if (e.is.empty || !r) return;
1141
+ let n = e.length === 1;
1142
+ for (let o of r) {
1143
+ if (T(o)) {
1144
+ o = o.trim();
1145
+ let f2 = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) : N(o);
1146
+ f2 = n ? f2 : I(f2), L(e, (x2) => x2.prepend(f2.cloneNode(true)));
1147
+ }
1148
+ O(o) && L(e, (s) => s.prepend(n ? o : I(o))), o.isJQx && !o.is.empty && (o.collection.length > 1 && o.collection.reverse(), L(e, (s) => L(o, (f2) => s.prepend(n ? f2 : I(f2)))), o.collection.reverse());
1149
+ }
1150
+ return e;
1151
+ }, prependTo(e, r) {
1152
+ return r.isJQx || (r = t.virtual(r)), r.prepend(e), e;
1153
+ }, prop(e, r, n) {
1154
+ if (a(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
1155
+ let o = a(r, Object) ? r : { [r]: n };
1156
+ for (let [s, f2] of Object.entries(o)) {
1157
+ if (s = s.trim(), f2 && !ce(s) || !f2) return false;
1158
+ if (s.toLowerCase() === "id") return e[0].id = f2;
1159
+ L(e, (b2) => {
1160
+ if (s.startsWith("data")) return b2.dataset[s.slice(s.indexOf("-") + 1)] = f2;
1161
+ b2[s] = f2;
1162
+ });
1163
+ }
1164
+ return e;
1165
+ }, remove(e, r) {
1166
+ let n = (s) => s.remove(), o = () => e.collection = e.collection.filter((s) => document.documentElement.contains(s));
1167
+ if (r) {
1168
+ let s = e.find$(r);
1169
+ return s.is.empty || (L(s, n), o()), e;
1170
+ }
1171
+ return L(e, n), o(), e;
1172
+ }, rmAttr(e, ...r) {
1173
+ for (let n of r) e.node.removeAttribute(n);
1174
+ return e;
1175
+ }, removeClass(e, ...r) {
1176
+ return L(e, (n) => {
1177
+ if (n) for (let o of r) n.classList.remove(o);
1178
+ });
1179
+ }, renderTo(e, r, n) {
1180
+ return r = a(r, HTMLElement) || r.isJQx ? r : document.body, n = a(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
1181
+ }, replace(e, r, n) {
1182
+ let o = e.node;
1183
+ return !r || !a(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || a(n, NodeList)) && (n = n[0]), o && r && (r = a(r, String) ? o.querySelectorAll(r) : r.isJQx ? r.collection : r, a(r, HTMLElement, NodeList, Array) && a(n, HTMLElement) && (a(r, HTMLElement) ? [r] : [...r]).forEach((s) => s.replaceWith(n.cloneNode(true)))), e);
1184
+ }, replaceClass(e, r, ...n) {
1185
+ return L(e, (o) => {
1186
+ o.classList.remove(r);
1187
+ for (let s of n) o.classList.add(s);
1188
+ });
1189
+ }, replaceMe(e, r) {
1190
+ return e.replaceWith(r);
1191
+ }, replaceWith(e, r) {
1192
+ return r = a(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
1193
+ }, setData(e, r) {
1194
+ return L(e, (n) => de(n, r));
1195
+ }, show(e) {
1196
+ return L(e, (r) => Z(r, { display: "revert-layer !important" }));
1197
+ }, single(e, r) {
1198
+ let n = e.collection.length > 0;
1199
+ switch (r = r ?? 0, true) {
1200
+ case (n && a(r, String)):
1201
+ return e.find$(r);
1202
+ case (n && a(r, Number)):
1203
+ return t(e.collection[r]);
1204
+ case n:
1205
+ return e.collection[0];
1206
+ default:
1207
+ return e;
1208
+ }
1209
+ }, style(e, r, n) {
1210
+ return L(e, (s) => {
1211
+ n && a(r, String) && (r = { [r]: n || "none" }), Z(s, r);
1212
+ });
1213
+ }, text(e, r, n = false) {
1214
+ switch (true) {
1215
+ case e.isEmpty():
1216
+ return e;
1217
+ case !a(r, String):
1218
+ return e.node.textContent;
1219
+ default:
1220
+ return L(e, (o) => o.textContent = n ? o.textContent + r : r);
1221
+ }
1222
+ }, toDOM(e, r = document.body, n = F.BeforeEnd) {
1223
+ return e.isVirtual = false, z(e.collection, r, n), e;
1224
+ }, toggleClass(e, r) {
1225
+ return L(e, (n) => n.classList.toggle(r));
1226
+ }, toNodeList(e) {
1227
+ return [...e.collection].map((r) => document.importNode(r, true));
1228
+ }, trigger(e, r, n, o) {
1229
+ n = a(n, Function) ? n : Event, o = a(o, Object) ? { ...o, bubbles: o.bubbles ?? true } : { bubbles: true };
1230
+ let s = new n(r, o);
1231
+ return e.is.empty || e.each((f2) => f2.dispatchEvent(s)), e;
1232
+ }, val(e, r) {
1233
+ switch (true) {
1234
+ case (e.is.empty || !a(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
1235
+ return e;
1236
+ case !a(r, String):
1237
+ return e.node.value;
1238
+ default:
1239
+ return e.node.value = a(r, String) ? r : "", e;
1240
+ }
1241
+ } };
1242
+ }
1243
+ var Me;
1244
+ var Se;
1245
+ var { isComment: qr, isText: en, isHtmlString: tn, isArrayOfHtmlElements: rn, isArrayOfHtmlStrings: nn, ElemArray2HtmlString: on, cssRuleEdit: Oe, addFn: Gt } = Zt();
1246
+ function Zt() {
1247
+ return { ...qe(), addFn: Yt };
1248
+ }
1249
+ function Yt(t, e) {
1250
+ return t = t?.trim(), !T(t) || !a(e, Function) ? C.error("JQx.fn: method invalid parameter(s)") : Se[t] = (r, ...n) => e(r, ...n);
1251
+ }
1252
+ function Xt(t) {
1253
+ return function(e, r, n) {
1254
+ if (e = e?.trim(), !T(e) || !a(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
1255
+ let o = n ? { get() {
1256
+ return r();
1257
+ } } : { value(...s) {
1258
+ return r(...s);
1259
+ } };
1260
+ try {
1261
+ Object.defineProperty(t, e, o);
1262
+ } catch {
1263
+ return t.warn(`JQx.staticFn: extension [${e}] already exists`);
1264
+ }
1265
+ return C.log(`JQx: added static extension function [${e}]`);
1266
+ };
1267
+ }
1268
+ function q(t) {
1269
+ return new Proxy(t, Object.freeze({ get: (e, r) => Kt(e, r, t) }));
1270
+ }
1271
+ function nt(t, e) {
1272
+ return (...r) => a(t, Function) && t(q(e), ...r);
1273
+ }
1274
+ function Kt(t, e, r) {
1275
+ switch (true) {
1276
+ case a(e, Symbol):
1277
+ return B({ trial: () => t[e], whenError: () => t });
1278
+ case a(+e, Number):
1279
+ return t.collection?.[e] || void 0;
1280
+ case e in Me:
1281
+ return nt(Me[e], r)();
1282
+ case e in Se:
1283
+ return nt(Se[e], r);
1284
+ default:
1285
+ return t[e];
1286
+ }
1287
+ }
1288
+ function lt(t) {
1289
+ let e = nr(t);
1290
+ for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
1291
+ return t;
1292
+ }
1293
+ function qt(t) {
1294
+ return { allow(e) {
1295
+ let r = /-/.test(e), n = r && e;
1296
+ e = r ? Y(e) : e.toLowerCase(), M.allowTag(e), Object.defineProperties(t, De(e, true, t, n));
1297
+ }, prohibit(e) {
1298
+ e = e.toLowerCase(), M.prohibitTag(e), Object.defineProperties(t, De(e, false, t));
1299
+ } };
1300
+ }
1301
+ function ot(...t) {
1302
+ if (t.length === 1) {
1303
+ let e = String(t.shift().trim());
1304
+ t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
1305
+ }
1306
+ for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) Oe(e, { removeRule: 1 });
1307
+ }
1308
+ function er(t) {
1309
+ return function(e, r, n) {
1310
+ r = r?.isJQx ? r?.[0] : r, n = n && Object.values(F).find((s) => n === s);
1311
+ let o = t(e, document.createElement("br"));
1312
+ if (r && !a(r, HTMLBRElement)) for (let s of o.collection) n ? r.insertAdjacentElement(n, s) : r.append(s);
1313
+ return o;
1314
+ };
1315
+ }
1316
+ function tr(...t) {
1317
+ let e = {};
1318
+ for (let r of t) {
1319
+ let n = Object.getOwnPropertyDescriptors(r);
1320
+ for (let [o, s] of Object.entries(n)) !(o in e) && Object.defineProperty(e, o, { ...s, enumerable: false });
1321
+ }
1322
+ return e;
1323
+ }
1324
+ function rr(t, e, r, n) {
1325
+ return t = P(n || t.toLowerCase()), { get() {
1326
+ return (...o) => {
1327
+ let s = e && r.virtual(k(ee[t](...o))) || void 0, x2 = !a(s?.node, Comment, Text, void 0) ? $e(s) : "";
1328
+ return C.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${x2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), s;
1329
+ };
1330
+ }, enumerable: false, configurable: true };
1331
+ }
1332
+ function De(t, e, r, n) {
1333
+ t = t.toLowerCase();
1334
+ let o = rr(t, e, r, n);
1335
+ return n ? { [n]: o, [Y(n)]: o } : { [t]: o, [t.toUpperCase()]: o };
1336
+ }
1337
+ function nr(t) {
1338
+ return tr(Object.entries(M.tagsRaw).reduce(or(t), {}), cr(t));
1339
+ }
1340
+ function or(t) {
1341
+ return function(e, [r, n]) {
1342
+ return Object.defineProperties(e, De(r, n, t)), e;
1343
+ };
1344
+ }
1345
+ function ir(t) {
1346
+ return function(e, r, ...n) {
1347
+ a(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
1348
+ };
1349
+ }
1350
+ function lr(t) {
1351
+ return function(e) {
1352
+ let { type: r, types: n, origin: o, selector: s, handler: f2, handlers: x2, node: b2, name: E2, capture: d, once: h, about: p } = e;
1353
+ f2 = x2 || f2, r = n || r, s = o || s;
1354
+ let S = Ae(r), g2 = E2;
1355
+ f2 = a(f2, Function) ? [f2] : f2;
1356
+ let c = { type: S, selector: s || o, capture: d, name: g2, once: h, node: b2, about: p };
1357
+ switch (true) {
1358
+ case (a(S, Array) && S.length > 0):
1359
+ for (let y2 of S) c.type = y2, it(f2, c, t);
1360
+ break;
1361
+ default:
1362
+ return it(f2, c, t);
1363
+ }
1364
+ };
1365
+ }
1366
+ function it(t, e, r) {
1367
+ for (let n of t) r.listen({ ...e, handler: n });
1368
+ }
1369
+ function sr(t) {
1370
+ return function(e, r) {
1371
+ return r = T(r) && r, e = T(e) && e, r && e && t.listenerStore[e][r];
1372
+ };
1373
+ }
1374
+ function ar(t) {
1375
+ return t.activePopup || Object.defineProperty(t, "activePopup", { value: ie(t), enumerable: false }), t.activePopup;
1376
+ }
1377
+ function ur(t) {
1378
+ let e = (d, h) => Oe(d, h), r = function(d) {
1379
+ return U({ createWithId: d || `jqx${ye()}` });
1380
+ }, n = function(...d) {
1381
+ for (let h of d) Oe(h);
1382
+ }, o = qt(t), s = le(t), f2 = lr(s);
1383
+ return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: f2, capturedHandling: f2, log: (...d) => C.on.log(...d).off, warn: (...d) => C.on.warn(...d).off, error: (...d) => C.on.error(...d).off, handlerWrapper: s };
1384
+ }
1385
+ function cr(t) {
1386
+ let { factoryExtensions: e, instanceExtensions: r } = rt(t);
1387
+ Me = e, Se = r;
1388
+ let { editCssRule: n, createStyle: o, editCssRules: s, allowProhibit: f2, handle: x2, capturedHandling: b2, log: E2, warn: d, error: h, handlerWrapper: p } = ur(t), S = sr(t), g2 = Xt(t);
1389
+ return { log: E2, warn: d, error: h, editCssRules: s, createStyle: o, editStylesheet: o, editCssRule: n, escHtml: D, logger: C, text(c, y2 = false) {
1390
+ return y2 ? t.comment(c) : document.createTextNode(c);
1391
+ }, node(c, y2 = document) {
1392
+ return y2.querySelector(c, y2);
1393
+ }, nodes(c, y2 = document) {
1394
+ return [...y2.querySelectorAll(c, y2)];
1395
+ }, clearAllTimers: Te, get staticFn() {
1396
+ return function(c, y2, v2) {
1397
+ return g2(c, y2, v2);
1398
+ };
1399
+ }, get toBool() {
1400
+ return He;
1401
+ }, get getNamedListener() {
1402
+ return S;
1403
+ }, get virtual() {
1404
+ return er(t);
1405
+ }, get allowTag() {
1406
+ return f2.allow;
1407
+ }, get prohibitTag() {
1408
+ return f2.prohibit;
1409
+ }, get removeCssRule() {
1410
+ return ot;
1411
+ }, get removeCssRules() {
1412
+ return ot;
1413
+ }, get delegate() {
1414
+ return ir(b2);
1415
+ }, get delegateCaptured() {
1416
+ return b2;
1417
+ }, get handle() {
1418
+ return b2;
1419
+ }, get listen() {
1420
+ return p.listen;
1421
+ }, get at() {
1422
+ return F;
1423
+ }, get setStyle() {
1424
+ return n;
1425
+ }, get fn() {
1426
+ return Gt;
1427
+ }, get lenient() {
1428
+ return M.allowUnknownHtmlTags;
1429
+ }, get IS() {
1430
+ return a;
1431
+ }, get Popup() {
1432
+ return ar(t);
1433
+ }, get listenerStore() {
1434
+ return p.ListenerStore;
1435
+ } };
1436
+ }
1437
+ var st = lt(fr());
1438
+ function fr() {
1439
+ return function(e, r, n = F.BeforeEnd) {
1440
+ if (e?.isJQx) return e;
1441
+ let o = a(r, HTMLBRElement);
1442
+ r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(F).find((d) => n === d) ? n : void 0;
1443
+ let s = X(e), x2 = !s && he(e) || s, b2 = { collection: me(e) ?? [], isVirtual: o, isJQx: true }, E2 = K(b2.collection);
1444
+ if (b2.collection.length && E2) return o || b2.collection.forEach((d) => {
1445
+ r.contains(d) || z([d], r, n);
1446
+ }), q(b2);
1447
+ if (x2) {
1448
+ if ([e].flat().forEach((d) => b2.collection.push(N(d))), b2.collection.length > 0) {
1449
+ let d = b2.collection.filter((g2) => g2?.dataset?.jqxcreationerror);
1450
+ b2.collection = b2.collection.filter((g2) => !g2?.dataset?.jqxcreationerror);
1451
+ let p = b2.collection.map((g2) => `${String(g2.constructor).split(/function|\(/)[1].trim()}`).length > 1;
1452
+ b2 = q(b2);
1453
+ let S = b2.collection.length > 0 ? Ke(b2) : "sanitized: no elements remaining";
1454
+ C.log(`JQx: created ${b2.isVirtual ? "(virtual)" : ""} instance from ${p ? "array of " : ""}HTML string${p ? "s" : ""} ${S}`), b2.isVirtual || z(b2.collection, r, n);
1455
+ }
1456
+ return b2;
1457
+ }
1458
+ return Pe(e, r, b2), q(b2);
1459
+ };
1460
+ }
1461
+ var fn = st;
1462
+
1463
+ // ../node_modules/ticktock-es/Bundle/index.min.js
1464
+ var [Z2, w, q2, H] = ["2-digit", "numeric", "long", "short"];
1465
+ var C2 = { fixed: { MM: { month: q2 }, M: { month: H }, m: { month: w }, mm: { month: Z2 }, yyyy: { year: w }, yy: { year: Z2 }, WD: { weekday: q2 }, wd: { weekday: H }, d: { day: w }, dd: { day: Z2 }, h: { hour: w }, hh: { hour: Z2 }, mi: { minute: w }, mmi: { minute: Z2 }, s: { second: w }, ss: { second: Z2 }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (e) => ({ timeZoneName: e.slice(4) }), hrc: (e) => ({ hourCycle: `h${e.slice(4)}` }), ds: (e) => ({ dateStyle: e.slice(3) }), ts: (e) => ({ timeStyle: e.slice(3) }), tz: (e) => ({ timeZone: e.slice(3) }), e: (e) => ({ era: e.slice(2) }), l: (e) => ({ locale: e.slice(2) }) } };
1466
+ var b = { ...C2, retrieveDynamic(e) {
1467
+ let r = e?.slice(0, e?.indexOf(":"));
1468
+ return C2.dynamic[r] && C2.dynamic[r](e);
1469
+ }, get re() {
1470
+ return new RegExp(`\\b(${Object.keys(C2.fixed).join("|")})\\b`, "g");
1471
+ } };
1472
+ var v = xe2;
1473
+ function xe2(e, r, n = "l:default") {
1474
+ return /ds:|ts:/.test(n) ? Pe2(e, me2(void 0), n) : Ee2(e, me2(r || void 0), n);
1475
+ }
1476
+ function me2(e = "dtf") {
1477
+ let r = ` ${e.replace(/[{}]/g, "").trim()} `, n = e.match(/(?<=\{)(.+?)(?=})/g) || [];
1478
+ return { set formatStr(t) {
1479
+ r = t;
1480
+ }, get formatStr() {
1481
+ return r;
1482
+ }, get units() {
1483
+ return r.match(b.re) || [];
1484
+ }, finalize(t = "", a2 = "", o = "", s = "") {
1485
+ return r.replace(/~([\d+]?)/g, "$1").replace(/dtf/, t).replace(/era/, o).replace(/dp\b|~dp\b/, a2).replace(/yn\b/, s).replace(/\[(\d+?)]/g, (u, l) => n[l].trim()).trim();
1486
+ } };
1487
+ }
1488
+ function fe2(...e) {
1489
+ return e?.reduce((r, n) => ({ ...r, ...b.retrieveDynamic(n) || b.fixed[n] }), b.fixed.dl);
1490
+ }
1491
+ function Pe2(e, r, n) {
1492
+ let t = fe2(...de2(n).split(",")), a2 = Intl.DateTimeFormat(t.locale, t).format(e);
1493
+ return r.finalize(a2);
1494
+ }
1495
+ function Ye2(e, r) {
1496
+ return e === "numeric" && r.startsWith("0") ? r.slice(1) : r;
1497
+ }
1498
+ function Ee2(e, r, n) {
1499
+ let t = fe2(...r.units.concat(de2(n).split(",")).flat()), a2 = { ...b.fixed }, o = Intl.DateTimeFormat(t.locale, t).formatToParts(e).reduce((s, u) => u.type === "literal" && /[ ,/-]/.test(u.value) ? s : { ...s, [u.type]: Ye2(t[u.type], u.value) }, {});
1500
+ return a2.ms = t.fractionalSecondDigits ? a2.msp : a2.ms, a2.yyyy = o.relatedYear ? a2.ry : a2.yyyy, r.formatStr = r.formatStr.replace(b.re, (s) => /^(M|MM)$/.test(s) ? Ve2(e, t.locale, t.timeZone, /^M$/.test(s)) : o[Object.keys(a2[s]).shift()] || s), r.finalize(void 0, o.dayPeriod, o.era, o.yearName);
1501
+ }
1502
+ function Ve2(e, r, n, t) {
1503
+ return e.toLocaleString(r, { timeZone: n, month: t ? H : q2 });
1504
+ }
1505
+ function de2(e) {
1506
+ return e.replace(/\s+/g, "");
1507
+ }
1508
+ var ge2 = qe2;
1509
+ function qe2() {
1510
+ let e = (t, a2) => {
1511
+ let o = isNaN(new Date(t)), s = isNaN(new Date(a2));
1512
+ if (s) {
1513
+ let [u, l, i] = Array(3).fill("end date not valid");
1514
+ return { error: true, message: u, full: l, clean: i };
1515
+ }
1516
+ if (o) {
1517
+ let [u, l, i] = Array(3).fill("start date not valid");
1518
+ return { error: true, message: u, full: l, clean: i };
1519
+ }
1520
+ if (o && !s) {
1521
+ let [u, l, i] = Array(3).fill("start- and/or end date are not valid");
1522
+ return { error: true, message: u, full: l, clean: i };
1523
+ }
1524
+ return { error: false };
1525
+ }, r = n();
1526
+ return function({ start: t, end: a2, diffs: o = {} } = {}) {
1527
+ let s = e(t, a2), u = a2 > t ? "+" : "-";
1528
+ if (s.error) return s;
1529
+ let l = Math.abs(t - a2), i = new Date(l), c = i.getUTCFullYear() - 1970, d = i.getUTCMonth(), h = i.getUTCDate() - 1, F2 = h % 7, le2 = Math.floor(h / 7), p = i.getUTCHours(), $2 = i.getUTCMinutes(), S = i.getUTCSeconds(), Le2 = i.getUTCMilliseconds(), je2 = Math.floor(l / 864e5);
1530
+ o = { ...o, fromUTC: t, toUTC: a2, sign: "", years: c, months: d, days: h, hours: p, minutes: $2, seconds: S, milliseconds: Le2, diffInDays: je2 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
1531
+ let ce2 = p + $2 + S > 0 ? "T" : "";
1532
+ return o.clean !== "Dates are equal" && (o.sign = u, o.jsPeriod = `${u}P${c > 0 ? `${c}Y` : ""}${d > 0 ? `${d}M` : ""}${le2 > 0 ? `${le2}W` : ""}${F2 > 0 ? `${F2}D` : ""}${ce2}${p > 0 ? `${p}H` : ""}${$2 > 0 ? `${$2}M` : ""}${S > 0 ? `${S}S` : ""}`, o.ISOPeriod = `P${c > 0 ? `${c}Y` : ""}${d > 0 ? `${d}M` : ""}${h > 0 ? `${h}D` : ""}${ce2}${p > 0 ? `${p}H` : ""}${$2 > 0 ? `${$2}M` : ""}${S > 0 ? `${S}S` : ""}`), o;
1533
+ };
1534
+ function n() {
1535
+ let t = (...i) => (c) => i.reduce((d, h) => h(d), c), a2 = (i, c) => i === 1 ? c.slice(0, -1) : c;
1536
+ return t(({ values: i, full: c }) => [Object.entries(i).filter(([d]) => /^(years|month|days|hours|minutes|seconds)/i.test(d)), c], ([i, c]) => c ? i : i.filter(([, d]) => c ? +d : d > 0), (i) => i.reduce((c, [d, h]) => [...c, `${h} ${a2(h, d)}`], []), (i) => i.length < 1 ? "Dates are equal" : `${i.slice(0, -1).join(", ")}${i.length > 1 ? " and " : ""}${i.slice(-1).shift()}`);
1537
+ }
1538
+ }
1539
+ var ye2 = He2;
1540
+ function He2() {
1541
+ let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [a2, o]) => ({ ...t, [a2]: o, [`${a2}s`]: o }), {}), r = false, n = function(...t) {
1542
+ let a2 = t.length === 1;
1543
+ return r = t[0].trim().startsWith("subtract,"), r && (t = a2 ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a2 && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
1544
+ if (!o) return false;
1545
+ let s = o.toLowerCase().split(/ {1,}/);
1546
+ return s.length < 2 ? false : s.map((u) => {
1547
+ u = `${u}`.trim().replace(/[^a-z0-9-+]/g, "");
1548
+ let l = parseInt(u, 10);
1549
+ return Number.isNaN(l) ? u : r ? -l : +l;
1550
+ });
1551
+ }).filter((o) => o);
1552
+ };
1553
+ return function(t, ...a2) {
1554
+ if (a2.length < 1) return t;
1555
+ let o = n(...a2);
1556
+ return o.length && o.forEach(([s, u]) => {
1557
+ u = u, u = e[u], s && u && t[`set${u}`](t[`get${u}`]() + s);
1558
+ }), t;
1559
+ };
1560
+ }
1561
+ var $e2 = ge2();
1562
+ var Se2 = Re2();
1563
+ var D2 = ye2();
1564
+ var Ge2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
1565
+ var Ze2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
1566
+ function G2(e, ...r) {
1567
+ return D2(e, ...r), e;
1568
+ }
1569
+ function we2(e, r = false) {
1570
+ let n = R(e.clone, { sunday: r }), t = [n];
1571
+ return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a2, o) => n.clone.addDays(o + 1))) };
1572
+ }
1573
+ function W2(e, { start: r, end: n, future: t, past: a2, include: o = { start: false, end: false } } = {}) {
1574
+ let s = e.clone.UTC;
1575
+ return r = r?.value || r?.constructor === Date ? m(r?.value || r).UTC : m.now.UTC, n = n && n?.value || n?.constructor === Date ? m(n?.value || n).UTC : m.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n : a2 ? r < n : (o.start ? +s >= +r : +s > +r) && (o.end ? +s <= +n : +s < +n);
1576
+ }
1577
+ function _2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
1578
+ return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : f.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = f), v(e, n, t)) : _e2(e, n, t);
1579
+ }
1580
+ function _e2(e, r, n) {
1581
+ let t = e.clone.relocate(f);
1582
+ return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, v(t, r, n);
1583
+ }
1584
+ function be2(e, r) {
1585
+ let n = $e2({ start: e, end: r || e });
1586
+ return parseInt(`${n.sign}${n.diffInDays}`);
1587
+ }
1588
+ function B2(e, r = false) {
1589
+ let { locale: n, timeZone: t } = r ? e.localeInfo : f, a2 = ue2(n, t), o = e.format("MM|WD", a2).split("|");
1590
+ return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: se2(n), monthNames: Y2(n) };
1591
+ }
1592
+ function J(e, r = false) {
1593
+ let [n, t, a2, o] = U2(e, r), u = { values4Timezone: r ? f.timeZone : e.timeZone, hours: n, minutes: t, seconds: a2, milliseconds: o };
1594
+ return Object.freeze(u);
1595
+ }
1596
+ function U2(e, r = false) {
1597
+ let t = `l:en-CA,${r ? `tz:${f.timeZone}` : `tz:${e.timeZone}`},hrc:23,ts:medium`;
1598
+ return e.format("", t).split(/:/).map(Number).concat(e.getMilliseconds());
1599
+ }
1600
+ function K2(e, r) {
1601
+ let n = r ? `tz:${f.timeZone}` : `,tz:${e.timeZone}`, [t, a2, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
1602
+ a2 -= 1;
1603
+ let s = r ? f.timeZone : e.timeZone;
1604
+ return Object.freeze({ values4Timezone: s, year: t, month: a2, date: o });
1605
+ }
1606
+ function Q(e, r = true) {
1607
+ if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
1608
+ let n = e.format("yyyy-m-d", e.localeInfo.formatOptions).split(/-/).map(Number);
1609
+ return n[1] -= 1, n;
1610
+ }
1611
+ function Be2(e) {
1612
+ let r = new Intl.Locale(e.localeInfo.locale), n = r.getWeekInfo && r.getWeekInfo().firstDay || 1;
1613
+ return n = n === 7 ? 0 : n, Ze2[n];
1614
+ }
1615
+ function R(e, { sunday: r = false } = {}) {
1616
+ let n = r ? "sunday" : Be2(e);
1617
+ return j(e, { day: n, preserveTodayWhenEqual: true });
1618
+ }
1619
+ function Je2(e, r) {
1620
+ let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
1621
+ return n = A(n.slice(0, 3) + ":" + n.slice(-2), true), t = A(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((a2) => n[0] < 0 ? -a2 : a2);
1622
+ }
1623
+ function X2({ start: e, end: r } = {}) {
1624
+ r || (r = e.clone), r?.clone || (r = m(r, { timeZone: e.timeZone })), e = m(Te2(e, e.timeZone), { timeZone: e.timeZone }), r = m(Te2(r, r.timeZone), { timeZone: r.timeZone });
1625
+ let n = $e2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Je2(r, e), a2 = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((i) => Math.abs(i)), [u, l] = [`${o} ${k2(o, "hour")}`, `${s} ${k2(s, "minute")}`];
1626
+ return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u}${s > 0 ? ` and ${l}` : ""} ${a2} ${r.timeZone}`, n;
1627
+ }
1628
+ function ee2(e, r) {
1629
+ r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : m(e.value, { timeZone: r.timeZone || f.timeZone });
1630
+ let t = X2({ start: e.clone, end: r }), o = `${t.sign}${he2(t.hours)}:${he2(t.minutes)}`;
1631
+ return { fromTZ: e.timeZone, toTZ: r.timeZone, offset: o, offsetText: `${r.timeZone} ${Ke2(o)} ${e.timeZone}` };
1632
+ }
1633
+ function he2(e, r = 2) {
1634
+ return `${e}`.padStart(r, "0");
1635
+ }
1636
+ function k2(e, r) {
1637
+ return `${r}${e > 1 || e === 0 ? "s" : ""}`;
1638
+ }
1639
+ function Ke2(e) {
1640
+ if (/00:00/.test(e)) return "no time diffence to";
1641
+ let r = e.slice(1).split(":").map(Number), [n, t] = r, a2 = k2(n, "hour"), o = k2(t, "minute"), s = e.startsWith("+");
1642
+ return t > 0 ? `${n} ${a2} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a2} ${s ? "ahead of" : "behind"}`;
1643
+ }
1644
+ function De2(e, r, n) {
1645
+ return e.clone.format(r, n || e.localeInfo.formatOptions);
1646
+ }
1647
+ function ve2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
1648
+ if (r) return t ? De2(e, r, $D.localeInformation.formatOptions) : De2(e, r, n);
1649
+ let a2 = e.clone.relocate({ locale: "en" }), o = t ? f.formatOptions : a2.localeInfo.formatOptions, u = `wd M dd yyyy hh:mmi:ss ${a2.format("tz", o + ",tzn:longOffset").replace(":", "")} (tz)`;
1650
+ return a2.format(u, o + ",tzn:long, hrc:23");
1651
+ }
1652
+ function te2(e, r = false) {
1653
+ let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : f.timeZone, weekday: "short" });
1654
+ return Se2(n.format(e));
1655
+ }
1656
+ function Ne2(e) {
1657
+ let r = f, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a2 = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u = n, l = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), i = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), c = { note: "'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance", locales: { user: { locale: s.locale, timeZone: s.timeZone } }, dateTime: { user: { ...e.dateTime, monthName: t.monthName, weekdayNr: t.day, weekdayName: t.dayName, dayPeriodTime: i, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a2.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
1658
+ return n.timeZone !== r.timeZone && (c.locales.remote = { locale: u.locale, timeZone: u.timeZone }, c.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: te2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: l, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, c.offset.fromUserTime = o.offsetText), c;
1659
+ }
1660
+ function z2(e, r = true) {
1661
+ if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
1662
+ let n = e.format("yyyy-m-d-hh-mmi-ss", `${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());
1663
+ return n[1] -= 1, n;
1664
+ }
1665
+ function re2(e) {
1666
+ return new Date(e.year, e.month + 1, 0, 0, 0, 0).getDate();
1667
+ }
1668
+ function L2(e, r) {
1669
+ r = g({ locale: r || e.localeInfo.locale }).locale;
1670
+ let n = e.clone.relocate({ locale: r });
1671
+ return n.date = { date: 1 }, [n].concat([...Array(re2(n) - 1)].map((t, a2) => n.clone.add(`${a2 + 1} days`)));
1672
+ }
1673
+ function j(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
1674
+ r = r?.toLowerCase() || "-";
1675
+ let a2 = Se2(r);
1676
+ if (a2 < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
1677
+ let o = n ? 1 : -1, s = m(new Date(...e.dateTimeValues), e.localeInfo);
1678
+ return t && a2 === s.day ? s : Qe2(s.addDays(n ? 1 : -1), a2, o);
1679
+ }
1680
+ function Qe2(e, r, n) {
1681
+ function t(a2) {
1682
+ switch (true) {
1683
+ case a2.day === r:
1684
+ return a2;
1685
+ default:
1686
+ return t(a2.add(`${n} days`));
1687
+ }
1688
+ }
1689
+ return t(e);
1690
+ }
1691
+ function O2(e, { dateOnly: r = false, timeOnly: n = false } = {}) {
1692
+ let { locale: t, timeZone: a2 } = e.localeInfo;
1693
+ return r ? new Date(e).toLocaleDateString(t, { timeZone: a2 }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a2 }) : new Date(e).toLocaleString(t, { timeZone: a2 });
1694
+ }
1695
+ function Te2(e, r) {
1696
+ let n = { timeZone: r, hourCycle: "h23" };
1697
+ return new Date(new Date(e).toLocaleString("en", n));
1698
+ }
1699
+ function N2(e, { year: r, month: n, date: t } = {}) {
1700
+ return y(r) && e.setFullYear(parseInt(r)), y(t) && e.setDate(parseInt(t)), y(n) && e.setMonth(parseInt(n)), e;
1701
+ }
1702
+ function T2(e, { hours: r, minutes: n, seconds: t, milliseconds: a2 } = {}) {
1703
+ return y(r) && e.setHours(parseInt(r)), y(n) && e.setMinutes(parseInt(n)), y(t) && e.setSeconds(parseInt(t)), y(a2) && e.setMilliseconds(parseInt(a2)), e;
1704
+ }
1705
+ function Ie2(e) {
1706
+ return e?.constructor === Date || e?.value;
1707
+ }
1708
+ function ne2(e, r) {
1709
+ return Ie2(r) ? m(r?.value || r, e.localeInfo) : m.from(...e.dateTimeValues).relocate(e.localeInfo);
1710
+ }
1711
+ function Re2() {
1712
+ return function(e) {
1713
+ e = `${e}`.toLowerCase();
1714
+ let r = Ge2.indexOf(e);
1715
+ return r < 0 ? Ze2.indexOf(e) : r;
1716
+ };
1717
+ }
1718
+ function A(e) {
1719
+ let r = e.slice(1).split(/[-:]/).map(Number), n = e.startsWith("-");
1720
+ return r = r.map((t) => n ? -t : t), r;
1721
+ }
1722
+ function ze2(e) {
1723
+ return e.time = { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }, e;
1724
+ }
1725
+ function pe2(e, r) {
1726
+ return Intl.DateTimeFormat("en-CA", { timeZone: r, timeZoneName: "long" }).format(e).split(/,/)[1].trim();
1727
+ }
1728
+ function x(e, r) {
1729
+ r = r || e?.timeZone || f.timeZone, e = e?.value ? e : e?.constructor === Date ? m(e, { timeZone: r }) : m({ timeZone: r });
1730
+ let n = e.year || e.getFullYear(), t = pe2(new Date(n, 0, 1), r), a2 = pe2(new Date(n, 5, 1), r);
1731
+ return t !== a2;
1732
+ }
1733
+ function P2(e, r) {
1734
+ return r = r || e?.timeZone || f.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? m(e, { timeZone: r }) : m({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
1735
+ }
1736
+ function Oe2(e, { locale: r, timeZone: n, l: t, tz: a2 } = {}) {
1737
+ return e.localeInfo = g({ locale: t || r || e.l || e.locale, timeZone: a2 || n || e.tz || e.timeZone }), e;
1738
+ }
1739
+ function Me2(e, r) {
1740
+ return Ie2(r) && (e = m(r.value || r, r.localeInfo || e.localeInfo)), e;
1741
+ }
1742
+ function M2(e, r) {
1743
+ let n = ae2(new Date(e, 11, r || 31));
1744
+ return n === 1 ? M2(e, (r || 31) - 1) : n;
1745
+ }
1746
+ function oe2(e, r) {
1747
+ let n = e.month;
1748
+ switch (true) {
1749
+ case n < 3:
1750
+ return r ? 1 : "First";
1751
+ case n < 6:
1752
+ return r ? 2 : "Second";
1753
+ case n < 9:
1754
+ return r ? 3 : "Third";
1755
+ case n < 12:
1756
+ return r ? 4 : "Fourth";
1757
+ default:
1758
+ return "unknown";
1759
+ }
1760
+ }
1761
+ function ae2(e) {
1762
+ let r = new Date(e), n = (r.getDay() + 6) % 7;
1763
+ r.setDate(r.getDate() - n + 3);
1764
+ let t = r.valueOf();
1765
+ return r.setMonth(0, 1), r.getDay() !== 4 && r.setMonth(0, 1 + (4 - r.getDay() + 7) % 7), 1 + Math.ceil((t - r) / 6048e5);
1766
+ }
1767
+ var E = Xe2;
1768
+ function Xe2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
1769
+ let t, a2 = { add(...o) {
1770
+ return G2(t, ...o);
1771
+ }, between({ start: o, end: s, include: u } = {}) {
1772
+ return W2(t, { start: o, end: s, include: u });
1773
+ }, cloneWith(o) {
1774
+ return ne2(t, o);
1775
+ }, daysUntil(o) {
1776
+ return be2(t, o);
1777
+ }, differenceTo(o) {
1778
+ return X2({ start: t, end: o });
1779
+ }, differenceUntil(o) {
1780
+ return t.differenceTo(o).clean;
1781
+ }, firstWeekday({ sunday: o = false, midnight: s = false } = {}) {
1782
+ return R(t, { sunday: o, midnight: s });
1783
+ }, format(o, s) {
1784
+ return _2(t, { formatStr: o, moreOptions: s });
1785
+ }, fullMonth(o) {
1786
+ return L2(t, o);
1787
+ }, fullWeek(o = false) {
1788
+ return we2(t, !!o);
1789
+ }, isFuture(o) {
1790
+ return W2(t, { start: t, end: o, future: true });
1791
+ }, isPast(o) {
1792
+ return W2(t, { start: t, end: o, past: true });
1793
+ }, next(o, s) {
1794
+ return j(t, { day: o, next: true, preserveTodayWhenEqual: !!s });
1795
+ }, offsetFrom(o) {
1796
+ return ee2(t, o);
1797
+ }, previous(o, s) {
1798
+ return j(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
1799
+ }, relocate({ locale: o, timeZone: s, l: u, tz: l } = {}) {
1800
+ return Oe2(t, { locale: o, timeZone: s, l: u, tz: l });
1801
+ }, revalue(o) {
1802
+ return t = Me2(t, o), t;
1803
+ }, setDateValues({ year: o, month: s, date: u } = {}) {
1804
+ return N2(t, { year: o, month: s, date: u });
1805
+ }, setTimeValues({ hours: o, minutes: s, seconds: u, milliseconds: l } = {}) {
1806
+ return T2(t, { hours: o, minutes: s, seconds: u, milliseconds: l });
1807
+ }, subtract(...o) {
1808
+ return G2(t, "subtract," + o.join(","));
1809
+ }, toArray(o = false) {
1810
+ return z2(t, o);
1811
+ }, toString({ template: o, formatOptions: s, local: u } = {}) {
1812
+ return ve2(t, { withFormat: o, withFormatOptions: s, local: u });
1813
+ }, values(o = false) {
1814
+ return o ? t.dateTime : t.zoneDateTime;
1815
+ }, zoneFormat(o, s) {
1816
+ return _2(t, { zoneTime: true, formatStr: o, moreOptions: s });
1817
+ }, set date({ year: o, month: s, date: u }) {
1818
+ N2(t, { year: o, month: s, date: u });
1819
+ }, set dateNr(o) {
1820
+ N2(t, { date: o });
1821
+ }, set hours(o) {
1822
+ T2(t, { hours: o });
1823
+ }, set localeInfo({ locale: o, timeZone: s, l: u, tz: l }) {
1824
+ e = I2({ locale: o, timeZone: s, l: u, tz: l });
1825
+ }, set milliseconds(o) {
1826
+ T2(t, { milliseconds: `${o}` });
1827
+ }, set minutes(o) {
1828
+ T2(t, { minutes: o });
1829
+ }, set month(o) {
1830
+ N2(t, { month: o });
1831
+ }, set seconds(o) {
1832
+ T2(t, { seconds: o });
1833
+ }, set time({ hours: o, minutes: s, seconds: u, milliseconds: l }) {
1834
+ T2(t, { hours: o, minutes: s, seconds: u, milliseconds: l });
1835
+ }, set year(o) {
1836
+ N2(t, { year: o });
1837
+ }, get age() {
1838
+ return t.differenceTo(/* @__PURE__ */ new Date()).years;
1839
+ }, get ageFull() {
1840
+ return t.differenceTo(/* @__PURE__ */ new Date()).clean;
1841
+ }, get clone() {
1842
+ return ne2(t);
1843
+ }, get date() {
1844
+ return K2(t, true);
1845
+ }, get dateNr() {
1846
+ return t.date.date;
1847
+ }, get dateTime() {
1848
+ return { ...t.date, ...t.time };
1849
+ }, get dateTimeValues() {
1850
+ return z2(t, true);
1851
+ }, get dateValues() {
1852
+ return Q(t, true);
1853
+ }, get day() {
1854
+ return t.getDay();
1855
+ }, get dayName() {
1856
+ return t.names.dayName;
1857
+ }, get daysThisMonth() {
1858
+ return re2(t);
1859
+ }, get DSTActive() {
1860
+ return P2(t);
1861
+ }, get hasDST() {
1862
+ return x(t);
1863
+ }, get hours() {
1864
+ return t.time.hours;
1865
+ }, get info() {
1866
+ return Ne2(t);
1867
+ }, get isLeapYear() {
1868
+ return new Date(t.getFullYear(), 2, 0).getDate() === 29;
1869
+ }, get ISO() {
1870
+ return t.toISOString();
1871
+ }, get local() {
1872
+ return O2(t);
1873
+ }, get localDate() {
1874
+ return O2(t, { dateOnly: true });
1875
+ }, get locale() {
1876
+ return (e || I2()).locale;
1877
+ }, get localeInfo() {
1878
+ return e;
1879
+ }, get localeString() {
1880
+ return O2(t);
1881
+ }, get localTime() {
1882
+ return O2(t, { timeOnly: true });
1883
+ }, get milliseconds() {
1884
+ return t.getMilliseconds();
1885
+ }, get minutes() {
1886
+ return t.time.minutes;
1887
+ }, get month() {
1888
+ return t.date.month;
1889
+ }, get monthName() {
1890
+ return t.names.monthName;
1891
+ }, get names() {
1892
+ return B2(t);
1893
+ }, get quarter() {
1894
+ return oe2(t);
1895
+ }, get quarterNr() {
1896
+ return oe2(t, true);
1897
+ }, get removeTime() {
1898
+ return ze2(t);
1899
+ }, get seconds() {
1900
+ return t.time.seconds;
1901
+ }, get time() {
1902
+ return J(t, true);
1903
+ }, get timeValues() {
1904
+ return U2(t, true);
1905
+ }, get timeZone() {
1906
+ return (e || I2()).timeZone;
1907
+ }, get unixEpochTimestamp() {
1908
+ return Math.floor(+t / 1e3);
1909
+ }, get userLocaleInfo() {
1910
+ return f;
1911
+ }, get UTC() {
1912
+ return t.clone.relocate({ locale: t.locale, timeZone: "UTC" });
1913
+ }, get UTCOffset() {
1914
+ return ee2(t, "UTC");
1915
+ }, get value() {
1916
+ return new Date(t);
1917
+ }, get weeknr() {
1918
+ return ae2(t);
1919
+ }, get weeksInYear() {
1920
+ return M2(t.year, 31);
1921
+ }, get year() {
1922
+ return t.date.year;
1923
+ }, get zoneDate() {
1924
+ return K2(t, false);
1925
+ }, get zoneDateNr() {
1926
+ return t.zoneDate.date;
1927
+ }, get zoneDateTime() {
1928
+ return { ...t.zoneDate, ...t.zoneTime };
1929
+ }, get zoneDateTimeValues() {
1930
+ return z2(t, false);
1931
+ }, get zoneDateValues() {
1932
+ return Q(t, false);
1933
+ }, get zoneDay() {
1934
+ return te2(t, true);
1935
+ }, get zoneDayname() {
1936
+ return t.zoneNames.dayName;
1937
+ }, get zoneHours() {
1938
+ return t.zoneTime.hours;
1939
+ }, get zoneMinutes() {
1940
+ return t.zoneTime.minutes;
1941
+ }, get zoneMonth() {
1942
+ return t.zoneDate.month;
1943
+ }, get zoneMonthname() {
1944
+ return t.zoneNames.monthName;
1945
+ }, get zoneNames() {
1946
+ return B2(t, true);
1947
+ }, get zoneSeconds() {
1948
+ return t.zoneTime.seconds;
1949
+ }, get zoneTime() {
1950
+ return J(t);
1951
+ }, get zoneTimeValues() {
1952
+ return U2(t);
1953
+ }, get zoneYear() {
1954
+ return t.zoneDate.year;
1955
+ }, get zoneValues() {
1956
+ return t.zoneDateTime;
1957
+ }, get zoneArray() {
1958
+ return z2(t, false);
1959
+ } };
1960
+ return !e && !n ? a2 : (a2.localeInfo = e || I2(), t = new Proxy(n, et2(a2)), Object.entries(Object.getOwnPropertyDescriptors(ie2(t, r))).forEach(([o, s]) => Object.defineProperty(a2, o, s)), Object.freeze(t));
1961
+ }
1962
+ function et2(e) {
1963
+ return { get(r, n) {
1964
+ return n !== "toString" && n in r ? r[n].bind(r) : Reflect.get(e, n);
1965
+ }, set(r, n, t) {
1966
+ return n in e && Reflect.set(e, n, t);
1967
+ } };
1968
+ }
1969
+ var f = ke2(Intl.DateTimeFormat().resolvedOptions());
1970
+ var tt2 = Object.getOwnPropertyNames(Date.prototype).filter((e) => e.startsWith("set")).reduce((e, r) => [...e, { native: r, syn: "change" + r.slice(3) }], []);
1971
+ function se2(e = "en-GB") {
1972
+ return e = g({ locale: e }).locale, { long: [...Array(7).keys()].map((r) => new Date(Date.UTC(1970, 0, 4 + r)).toLocaleDateString(e, { timeZone: "Etc/UTC", weekday: "long" })), short: [...Array(7).keys()].map((r) => new Date(Date.UTC(1970, 0, 4 + r)).toLocaleDateString(e, { timeZone: "Etc/UTC", weekday: "short" })) };
1973
+ }
1974
+ function Y2(e = "en") {
1975
+ return e = g({ locale: e }).locale, { long: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "long" })), short: [...Array(12).keys()].map((r) => new Date(Date.UTC(1970, r, 1)).toLocaleDateString(e, { timeZone: "Etc/UTC", month: "short" })) };
1976
+ }
1977
+ function rt2({ year: e, locale: r } = {}) {
1978
+ e = y(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
1979
+ let n = { year: e, calendar: {} }, t = Y2().long.map((a2) => a2.toLowerCase());
1980
+ for (let a2 = 0; a2 < 12; a2 += 1) {
1981
+ let o = m.from(e, a2, 1);
1982
+ n.calendar[t[a2]] = L2(o, r);
1983
+ }
1984
+ return n;
1985
+ }
1986
+ function nt2({ year: e, monthNr: r, locale: n = "en-CA" } = {}) {
1987
+ e = y(r) && parseInt(e) || -1, r = y(r) && parseInt(r) || (/* @__PURE__ */ new Date()).getFullYear();
1988
+ let t = r >= 1 && r <= 12;
1989
+ return n = g({ locale: n }).locale, r = t ? r - 1 : void 0, t ? m.from(e, r, 1).relocate({ locale: n }).fullMonth(n) : "MonthNr should be a specific number (1 = january - 12 = december)";
1990
+ }
1991
+ function ke2(e) {
1992
+ let r = ue2(e.locale, e.timeZone), n = new Intl.Locale(e.locale);
1993
+ return e.weekInfo = n.getWeekInfo ? n.getWeekInfo() : null, Object.defineProperty(e, "formatOptions", { value: r, enumerable: false });
1994
+ }
1995
+ function ue2(e, r) {
1996
+ return [`${e && !(Array.isArray(e) && e.length < 1) ? `l:${e}` : ""}`, `${r ? `tz:${r}` : ""}`].filter((n) => n).join(",");
1997
+ }
1998
+ function g({ locale: e, timeZone: r, l: n, tz: t } = {}) {
1999
+ return r = r || t, e = e || n, e = Ce2({ trial: function() {
2000
+ return Intl.DateTimeFormat(e, { timeZone: f.timeZone }).resolvedOptions().locale;
2001
+ }, onError: function() {
2002
+ return console.warn(`Intl locale "${e}" best fit impossible, using "${f.locale}"`), f.locale;
2003
+ } }), r = Ce2({ trial: function() {
2004
+ return Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions().timeZone;
2005
+ }, onError: function() {
2006
+ return console.warn(`timeZone "${r}" not valid. Using "${f.timeZone}"`), f.timeZone;
2007
+ } }), ke2(Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions());
2008
+ }
2009
+ function I2({ locale: e, timeZone: r, l: n, tz: t } = {}) {
2010
+ return g({ locale: e, timeZone: r, l: n, tz: t }, true);
2011
+ }
2012
+ function Fe2(e) {
2013
+ return !Number.isNaN(+e) && e?.constructor === Date && !e?.toISOString?.().startsWith("1970-01-01T00:00:00") ? e : /* @__PURE__ */ new Date();
2014
+ }
2015
+ function Ae2(e) {
2016
+ let r = /* @__PURE__ */ new Date();
2017
+ switch (true) {
2018
+ case e?.constructor === String:
2019
+ return Fe2(new Date(e));
2020
+ case (Array.isArray(e) && e.map(Number).length === e.length):
2021
+ return e.length === 1 ? new Date(e[0], 0, 1) : new Date(...e);
2022
+ case e?.constructor === Date:
2023
+ return Fe2(e);
2024
+ default:
2025
+ return r;
2026
+ }
2027
+ }
2028
+ function Ce2({ trial: e, onError: r = () => {
2029
+ } } = {}) {
2030
+ if (e?.constructor === Function) try {
2031
+ return e();
2032
+ } catch (n) {
2033
+ return r?.constructor === Function ? r(n) : void 0;
2034
+ }
2035
+ }
2036
+ function ot2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
2037
+ let t = { timeZone: g({ timeZone: r }).timeZone }, a2 = { timeZone: g({ timeZone: n || "" }).timeZone }, o = m(e, t), s = m(e, a2), u = s.differenceTo(o), l = o.offsetFrom(s).offset, [i, c] = A(l, true), d = s.clone.add(`${i} hours, ${c} minutes`), F2 = u.equalDates ? "No difference" : `Time offset ${l}: ${a2.timeZone} is ${u.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
2038
+ return { remoteTimezone: t.timeZone, userTimezone: a2.timeZone, timeDifference: F2, result: { [t.timeZone.replace(/\//, "_")]: m(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a2.timeZone.replace(/\//, "_")]: d.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
2039
+ }
2040
+ function y(e) {
2041
+ return !Number.isNaN(parseInt(e));
2042
+ }
2043
+ function V2(e, r, n) {
2044
+ return e?.constructor === Number ? D2(r, `${e} ${n}`) : r;
2045
+ }
2046
+ function at2(e) {
2047
+ let r = { addYears(n = 1) {
2048
+ return V2(n, e, "years");
2049
+ }, addMonths(n = 1) {
2050
+ return V2(n, e, "months");
2051
+ }, addWeeks(n = 1) {
2052
+ return n = n?.constructor === Number ? n * 7 : 1, V2(n, e, "days");
2053
+ }, addDays(n = 1) {
2054
+ return V2(n, e, "days");
2055
+ }, get nextYear() {
2056
+ return D2(e, "1 year");
2057
+ }, get nextWeek() {
2058
+ return D2(e, "7 days");
2059
+ }, get previousWeek() {
2060
+ return D2(e, "-7 days");
2061
+ }, get previousYear() {
2062
+ return D2(e, "-1 year");
2063
+ }, get nextMonth() {
2064
+ return D2(e, "1 month");
2065
+ }, get previousMonth() {
2066
+ return D2(e, "-1 month");
2067
+ }, get tomorrow() {
2068
+ return D2(e, "1 day");
2069
+ }, get yesterday() {
2070
+ return D2(e, "-1 day");
2071
+ } };
2072
+ for (let n of tt2) r[n.syn] = function(...t) {
2073
+ return e[n.native](...t), e;
2074
+ };
2075
+ return r;
2076
+ }
2077
+ function ie2(e, r) {
2078
+ let n = at2(e);
2079
+ for (let [t, a2] of Object.entries(r || {})) {
2080
+ let o = a2.enumerable, s = a2.isGetter ? { get() {
2081
+ return a2.method(e);
2082
+ }, enumerable: o } : { value(...u) {
2083
+ return a2.method(e, ...u);
2084
+ }, enumerable: o };
2085
+ Object.defineProperty(n, t, s);
2086
+ }
2087
+ return n;
2088
+ }
2089
+ function We2(e, r) {
2090
+ return Object.defineProperties(e, { now: { get() {
2091
+ return e(/* @__PURE__ */ new Date());
2092
+ } }, localeInformation: { get() {
2093
+ return g();
2094
+ } }, localWeekdaynames: { value(n) {
2095
+ return se2(n);
2096
+ } }, localMonthnames: { value(n) {
2097
+ return Y2(n);
2098
+ } }, daysInMonth: { value(n, t = false) {
2099
+ return n = y(n) ? parseInt(n) : 0, n >= 1 && n <= 12 ? new Date(t ? 2e3 : 2005, n, 0).getDate() : `${n} should be a Number between (1 (january) - 12 (december))`;
2100
+ } }, yearCalendar: { value: rt2 }, monthCalendar: { value: nt2 }, from: { value(...n) {
2101
+ return e(n);
2102
+ } }, fromUxTS: { value(n, t) {
2103
+ n = y(n) ? parseInt(n) * 1e3 : void 0;
2104
+ let a2 = n ? new Date(n) : /* @__PURE__ */ new Date();
2105
+ return m(a2, t || f);
2106
+ } }, hasDST: { value({ date: n, timeZone: t } = {}) {
2107
+ return x(n, t);
2108
+ } }, DSTActive: { value({ date: n, timeZone: t } = {}) {
2109
+ return P2(n, t);
2110
+ } }, values: { value({ date: n, timeZone: t } = {}) {
2111
+ n = n || n?.value || /* @__PURE__ */ new Date();
2112
+ let a2 = v(n, "yyyy-m-d-h-mi-s", g({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
2113
+ return a2[1] -= 1, a2;
2114
+ } }, format: { value({ date: n, template: t, timeZone: a2, locale: o, opts: s } = {}) {
2115
+ n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
2116
+ let u = g({ timeZone: a2, locale: o }).formatOptions;
2117
+ return u += s ? `,${s}` : "", v(n, t, u);
2118
+ } }, addCustom: { value({ name: n, method: t, enumerable: a2 = false, isGetter: o = false } = {}) {
2119
+ n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a2, isGetter: o });
2120
+ } }, validateLocaleInformation: { value: g }, timeAcrossZones: { value: ot2 }, weeksInYear: { value(n) {
2121
+ return M2(n, 31);
2122
+ } }, keys: { get() {
2123
+ let n = Object.fromEntries(Object.entries(r).filter(([a2, o]) => o.enumerable === true));
2124
+ return [...Object.keys(E()), ...Object.keys(ie2()), ...Object.keys(n)].sort((a2, o) => a2.localeCompare(o));
2125
+ } } }), e;
2126
+ }
2127
+ var Ue2 = {};
2128
+ var m = We2(st2, Ue2);
2129
+ function st2(e, r) {
2130
+ if (e?.localeInfo) return e.clone;
2131
+ let n = e?.locale || e?.timeZone || e?.tz || e?.l;
2132
+ return E({ localeInfo: g(n ? e : r), dateValue: new Date(n ? Date.now() : Ae2(e)), customMethods: Ue2 });
2133
+ }
2134
+
2135
+ // ../node_modules/jsregexphelper/RegexpCreator.js
2136
+ var RegexpCreator_default = Object.defineProperties(instanceCreator, { escape: { value: escape4RE, enumerable: true } });
2137
+ function instanceCreator(regExStr, ...args) {
2138
+ const { flags, cleanedArgs } = maybeFlags(...args);
2139
+ return createInstance(
2140
+ new RegExp(cleanup(createRegExpStringFromInput(regExStr, ...cleanedArgs)), flags)
2141
+ );
2142
+ }
2143
+ function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
2144
+ return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a2, v2, i) => a2.concat(cleanedArgs[i - 1] || ``).concat(v2), ``);
2145
+ }
2146
+ function maybeFlags(...args) {
2147
+ const flags = cleanupFlags(getFlags(args.at(-1)));
2148
+ return { flags, cleanedArgs: hasLength(flags) ? args.slice(0, -1) : args };
2149
+ }
2150
+ function getFlags(maybeFlags2) {
2151
+ return isOfType(maybeFlags2, Array) ? maybeFlags2.join(``) : ``;
2152
+ }
2153
+ function createInstance(regExp) {
2154
+ const instance = new Proxy(Object.defineProperties({}, {
2155
+ re: { get() {
2156
+ return regExp;
2157
+ }, enumerable: false },
2158
+ toString: { value: () => regExp.toString(), enumerable: false },
2159
+ valueOf: { value: () => regExp, enumerable: false },
2160
+ flags: { value(flags) {
2161
+ regExp = modifyFlags(flags, regExp);
2162
+ return instance;
2163
+ }, enumerable: false },
2164
+ clone: { get() {
2165
+ return clone(instance);
2166
+ }, enumerable: false }
2167
+ }), getterTrap(regExp));
2168
+ return instance;
2169
+ }
2170
+ function hasLength(variable) {
2171
+ return variable?.length > 0;
2172
+ }
2173
+ function isOfType(any, CTOR) {
2174
+ return any?.constructor === CTOR;
2175
+ }
2176
+ function maybeProp(target, key, regExp) {
2177
+ const fromRegExp = Reflect.get(regExp, key);
2178
+ return {
2179
+ fromInstance: Reflect.get(target, key),
2180
+ fromRegExpMethod: isOfType(fromRegExp, Function) ? fromRegExp.bind(target.re) : target.re[key]
2181
+ };
2182
+ }
2183
+ function getterTrap(regExp) {
2184
+ return {
2185
+ get(target, key) {
2186
+ const { fromInstance, fromRegExpMethod } = maybeProp(target, key, regExp);
2187
+ switch (true) {
2188
+ case !!fromInstance:
2189
+ return fromInstance;
2190
+ default:
2191
+ return fromRegExpMethod;
2192
+ }
2193
+ }
2194
+ };
2195
+ }
2196
+ function clone(instance) {
2197
+ const source = instance.re.source;
2198
+ const flags = hasLength(instance.re.flags) ? [...instance.re.flags] : [];
2199
+ return instanceCreator`${source} ${flags}`;
2200
+ }
2201
+ function cleanupFlags(flags, currentFlags) {
2202
+ currentFlags = (currentFlags ?? ``).replace(/^-r\|/, ``);
2203
+ flags = currentFlags.concat(isOfType(flags, String) && hasLength(flags) ? flags : ``);
2204
+ return [.../* @__PURE__ */ new Set([...flags])].join(``).replace(/[^dgimsuvy]/g, ``);
2205
+ }
2206
+ function modifyFlags(flags, regExp) {
2207
+ switch (true) {
2208
+ case (!isOfType(flags, String) || !hasLength(flags)):
2209
+ return regExp;
2210
+ case flags === `-r`:
2211
+ return regExp = new RegExp(regExp.source);
2212
+ case flags.startsWith(`-r|`):
2213
+ return regExp = new RegExp(regExp.source, cleanupFlags(flags));
2214
+ default:
2215
+ return regExp = new RegExp(regExp.source, cleanupFlags(regExp.flags, flags));
2216
+ }
2217
+ }
2218
+ function escape4RE(string2Escape) {
2219
+ switch (true) {
2220
+ case (string2Escape?.constructor !== String || !hasLength(string2Escape)):
2221
+ return ``;
2222
+ case !!RegExp.escape:
2223
+ return RegExp.escape(string2Escape);
2224
+ default:
2225
+ return (`\\x${string2Escape.at(0)}` + string2Escape.slice(1).replace(/\p{S}|\p{P}/gu, (a2) => `\\${a2}`)).replace(/ |\\x /g, `\\x20`);
2226
+ }
2227
+ }
2228
+ function cleanup(str) {
2229
+ return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a2, b2) => String.fromCharCode(+b2) ?? a2);
2230
+ }
2231
+
2232
+ // ../node_modules/splat-es/toaFactory.js
2233
+ var { IS } = TOAFactory();
2234
+ var toaFactory_default = IS;
2235
+ function TOAFactory() {
2236
+ Symbol.proxy = Symbol.for(`toa.proxy`);
2237
+ Symbol.is = Symbol.for(`toa.is`);
2238
+ Symbol.type = Symbol.for(`toa.type`);
2239
+ Symbol.isSymbol = Symbol.for(`toa.isASymbol`);
2240
+ addSymbols2Anything();
2241
+ const maybe = maybeFactory();
2242
+ const [$Wrap, xProxy] = [WrapAnyFactory(), setProxyFactory()];
2243
+ xProxy.custom();
2244
+ return { IS: IS2, maybe, $Wrap, isNothing, xProxy };
2245
+ function IS2(anything, ...shouldBe) {
2246
+ if (maybe({ trial: (_3) => `isTypes` in (shouldBe?.[0] ?? {}) })) {
2247
+ const isTypeObj = shouldBe[0];
2248
+ return `defaultValue` in isTypeObj ? isOrDefault(anything, isTypeObj) : `notTypes` in isTypeObj ? isExcept(anything, isTypeObj) : IS2(anything, ...[isTypeObj.isTypes].flat());
2249
+ }
2250
+ const input = typeof anything === `symbol` ? Symbol.isSymbol : anything;
2251
+ return shouldBe.length > 1 ? ISOneOf(input, ...shouldBe) : determineType(anything, ...shouldBe);
2252
+ }
2253
+ function typeOf(anything) {
2254
+ return anything?.[Symbol.proxy] ?? IS2(anything);
2255
+ }
2256
+ function determineType(input, ...shouldBe) {
2257
+ let {
2258
+ noInput,
2259
+ noShouldbe,
2260
+ compareTo,
2261
+ inputCTOR,
2262
+ isNaN: isNaN2,
2263
+ isInfinity,
2264
+ shouldBeFirstElementIsNothing
2265
+ } = processInput(input, ...shouldBe);
2266
+ shouldBe = shouldBe.length && shouldBe[0];
2267
+ switch (true) {
2268
+ case shouldBeFirstElementIsNothing:
2269
+ return String(input) === String(compareTo);
2270
+ case (input?.[Symbol.proxy] && noShouldbe):
2271
+ return input[Symbol.proxy];
2272
+ case isNaN2:
2273
+ return noShouldbe ? `NaN` : maybe({ trial: (_3) => String(compareTo) }) === String(input);
2274
+ case isInfinity:
2275
+ return noShouldbe ? `Infinity` : maybe({ trial: (_3) => String(compareTo) }) === String(input);
2276
+ case noInput:
2277
+ return noShouldbe ? String(input) : String(compareTo) === String(input);
2278
+ case inputCTOR === Boolean:
2279
+ return !shouldBe ? `Boolean` : inputCTOR === shouldBe;
2280
+ default:
2281
+ return getResult(input, shouldBe, noShouldbe, getMe(input, inputCTOR));
2282
+ }
2283
+ }
2284
+ function getMe(input, inputCTOR) {
2285
+ return input === 0 ? Number : input === `` ? String : !input ? { name: String(input) } : inputCTOR;
2286
+ }
2287
+ function processInput(input, ...shouldBe) {
2288
+ const noShouldbe = shouldBe.length < 1;
2289
+ const compareTo = !noShouldbe && shouldBe[0];
2290
+ const shouldBeFirstElementIsNothing = !noShouldbe && isNothing(shouldBe[0]);
2291
+ const noInput = input === void 0 || input === null;
2292
+ const inputCTOR = !noInput && Object.getPrototypeOf(input)?.constructor;
2293
+ const isNaN2 = Number.isNaN(input) || maybe({ trial: (_3) => String(input) === `NaN` });
2294
+ const isInfinity = maybe({ trial: (_3) => String(input) }) === `Infinity`;
2295
+ return { noInput, noShouldbe, compareTo, inputCTOR, isNaN: isNaN2, isInfinity, shouldBeFirstElementIsNothing };
2296
+ }
2297
+ function getResult(input, compareWith, noShouldbe, me3) {
2298
+ switch (true) {
2299
+ case (!noShouldbe && compareWith === input || input?.[Symbol.proxy] && compareWith === Proxy):
2300
+ return true;
2301
+ case maybe({ trial: (_3) => String(compareWith) }) === `NaN`:
2302
+ return String(input) === `NaN`;
2303
+ case (input?.[Symbol.toStringTag] && IS2(compareWith, String)):
2304
+ return String(compareWith) === input[Symbol.toStringTag];
2305
+ default:
2306
+ return compareWith ? maybe({ trial: (_3) => input instanceof compareWith }) || compareWith === me3 || compareWith === Object.getPrototypeOf(me3) || `${compareWith?.name}` === me3?.name : input?.[Symbol.toStringTag] && `[object ${input?.[Symbol.toStringTag]}]` || me3?.name || String(me3);
2307
+ }
2308
+ }
2309
+ function ISOneOf(obj, ...params) {
2310
+ return params.some((param) => IS2(obj, param));
2311
+ }
2312
+ function isNothing(maybeNothing, all = false) {
2313
+ let nada = maybeNothing === null || maybeNothing === void 0;
2314
+ nada = all ? nada || IS2(maybeNothing, Infinity) || IS2(maybeNothing, NaN) : nada;
2315
+ return nada;
2316
+ }
2317
+ function maybeFactory() {
2318
+ const tryFn = (maybeFn, maybeError) => maybeFn?.constructor === Function ? maybeFn(maybeError) : void 0;
2319
+ return function({ trial, whenError = () => void 0 } = {}) {
2320
+ try {
2321
+ return tryFn(trial);
2322
+ } catch (err) {
2323
+ return tryFn(whenError, err);
2324
+ }
2325
+ };
2326
+ }
2327
+ function WrapAnyFactory() {
2328
+ return function(someObj) {
2329
+ return Object.freeze({
2330
+ get value() {
2331
+ return someObj;
2332
+ },
2333
+ get [Symbol.type]() {
2334
+ return typeOf(someObj);
2335
+ },
2336
+ get type() {
2337
+ return typeOf(someObj);
2338
+ },
2339
+ [Symbol.is](...args) {
2340
+ return IS2(someObj, ...args);
2341
+ },
2342
+ is(...args) {
2343
+ return IS2(someObj, ...args);
2344
+ }
2345
+ });
2346
+ };
2347
+ }
2348
+ function isOrDefault(input, { defaultValue, isTypes = [void 0], notTypes } = {}) {
2349
+ isTypes = isTypes?.constructor !== Array ? [isTypes] : isTypes;
2350
+ notTypes = notTypes && notTypes?.constructor !== Array ? [notTypes] : [];
2351
+ return notTypes.length < 1 ? IS2(input, ...isTypes) ? input : defaultValue : isExcept(input, { isTypes, notTypes }) ? input : defaultValue;
2352
+ }
2353
+ function isExcept(input, { isTypes = [void 0], notTypes = [void 0] } = {}) {
2354
+ isTypes = isTypes?.constructor !== Array ? [isTypes] : isTypes;
2355
+ notTypes = notTypes?.constructor !== Array ? [notTypes] : notTypes;
2356
+ return IS2(input, ...isTypes) && !IS2(input, ...notTypes);
2357
+ }
2358
+ function addSymbols2Anything() {
2359
+ if (!Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]) {
2360
+ Object.defineProperties(Object.prototype, {
2361
+ [Symbol.type]: { get() {
2362
+ return typeOf(this);
2363
+ }, enumerable: false, configurable: false },
2364
+ [Symbol.is]: { value: function(...args) {
2365
+ return IS2(this, ...args);
2366
+ }, enumerable: false, configurable: false }
2367
+ });
2368
+ Object.defineProperties(Object, {
2369
+ [Symbol.type]: { value(obj) {
2370
+ return typeOf(obj);
2371
+ }, enumerable: false, configurable: false },
2372
+ [Symbol.is]: { value: function(obj, ...args) {
2373
+ return IS2(obj, ...args);
2374
+ }, enumerable: false, configurable: false }
2375
+ });
2376
+ }
2377
+ }
2378
+ function ctor2String(obj) {
2379
+ const str = String(Object.getPrototypeOf(obj)?.constructor);
2380
+ return str.slice(str.indexOf(`ion`) + 3, str.indexOf(`(`)).trim();
2381
+ }
2382
+ function modifySetter(setterMethod2Modify) {
2383
+ const oldSetter = setterMethod2Modify.set;
2384
+ setterMethod2Modify.set = (target, key, value) => {
2385
+ if (key === Symbol.proxy) {
2386
+ return target[key] = value;
2387
+ }
2388
+ return oldSetter(target, key, value);
2389
+ };
2390
+ return setterMethod2Modify;
2391
+ }
2392
+ function setProxyFactory() {
2393
+ const nativeProxy = Proxy;
2394
+ return {
2395
+ native() {
2396
+ Proxy = nativeProxy;
2397
+ },
2398
+ custom() {
2399
+ Proxy = new nativeProxy(nativeProxy, {
2400
+ construct(target, args) {
2401
+ for (let item of args) {
2402
+ if (item.set) {
2403
+ item = modifySetter(item);
2404
+ }
2405
+ }
2406
+ const wrappedProxy = new target(...args);
2407
+ wrappedProxy[Symbol.proxy] = `Proxy (${ctor2String(args[0])})`;
2408
+ return wrappedProxy;
2409
+ }
2410
+ });
2411
+ }
2412
+ };
2413
+ }
2414
+ }
2415
+
2416
+ // ../node_modules/splat-es/index.js
2417
+ var interpolateDefault = interpolateFactory(void 0);
2418
+ var interpolateClear = interpolateFactory("");
2419
+ Object.defineProperties(String.prototype, {
2420
+ [Symbol.for(`interpolate`)]: { value(...args) {
2421
+ return interpolateDefault(this, ...args);
2422
+ } },
2423
+ [Symbol.for(`interpolate$`)]: { value(...args) {
2424
+ return interpolateClear(this, ...args);
2425
+ } }
2426
+ });
2427
+ function interpolateFactory(defaultReplacer) {
2428
+ defaultReplacer = toaFactory_default(defaultReplacer, String, Number) ? String(defaultReplacer) : void 0;
2429
+ return function(str, ...tokens) {
2430
+ return interpolate(str, processTokens(tokens));
2431
+ };
2432
+ function invalidate(key, keyExists) {
2433
+ if (keyExists && toaFactory_default(defaultReplacer, String, Number)) {
2434
+ return String(defaultReplacer);
2435
+ }
2436
+ return `{${key}}`;
2437
+ }
2438
+ function replacement(key, token) {
2439
+ const isValid = key in token;
2440
+ return isValid && toaFactory_default(token[key], String, Number) ? String(token[key]) : invalidate(key, isValid);
2441
+ }
2442
+ function getReplacerLambda(token) {
2443
+ return (...args) => {
2444
+ const replacementObject = args.find((a2) => a2.key);
2445
+ return replacement(replacementObject ? replacementObject.key : `_`, token);
2446
+ };
2447
+ }
2448
+ function replace(str, token) {
2449
+ return str.replace(/\{(?<key>[a-z_\d]+)}/gim, getReplacerLambda(token));
2450
+ }
2451
+ function convertTokensFromArrayValues(tokenObject) {
2452
+ const converted = [];
2453
+ Object.entries(tokenObject).forEach(([key, value]) => {
2454
+ value.forEach((v2, i) => (converted[i] ??= {}, converted[i][key] = v2));
2455
+ });
2456
+ return converted;
2457
+ }
2458
+ function isMultiLineWithArrays(tokens) {
2459
+ return tokens.length === 1 && Object.values(tokens[0]).every(Array.isArray);
2460
+ }
2461
+ function processTokens(tokens) {
2462
+ return isMultiLineWithArrays(tokens) ? convertTokensFromArrayValues(tokens[0]) : tokens;
2463
+ }
2464
+ function interpolate(str, tokens) {
2465
+ const injected = !tokens?.length ? str : tokens.filter((token) => toaFactory_default(token, Object)).map((token, i) => replace(str, { ...token, index: i + 1 })).join(``);
2466
+ return toaFactory_default(defaultReplacer, void 0) ? injected : injected.replace(/\{[a-z_\d].+\}/gim, String(defaultReplacer));
2467
+ }
2468
+ }
2469
+
2470
+ // ../index.js
2471
+ setDefaultStyling();
2472
+ fixSBLinks2TopProblem();
2473
+ function fixSBLinks2TopProblem() {
2474
+ /stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
2475
+ document.addEventListener(`click`, (evt) => {
2476
+ if (evt.target.href) {
2477
+ const ref = evt.target;
2478
+ if (ref.dataset.top || ref.classList.contains(`internalLink`) || ref.target === `_top`) {
2479
+ return top.location.href = ref.href;
2480
+ }
2481
+ }
2482
+ return true;
2483
+ });
2484
+ }
2485
+ function logFactory(formatJSON = true) {
2486
+ const logContainer = fn(`<ul id="log2screen">`).first();
2487
+ function logItem(top2 = false) {
2488
+ const where2PutIt = top2 ? fn.at.start : fn.at.end;
2489
+ return (content) => {
2490
+ if (content?.isJQx) {
2491
+ return fn.li(
2492
+ content.data.get(`header`) ? { class: `head` } : ``,
2493
+ content
2494
+ ).renderTo(logContainer, where2PutIt);
2495
+ }
2496
+ content = !fn.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
2497
+ const isHead = content.startsWith(`!!`);
2498
+ content = isHead ? content.slice(2) : content;
2499
+ fn.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
2500
+ };
2501
+ }
2502
+ const [logLamda, logTopLambda] = [logItem(), logItem(true)];
2503
+ return {
2504
+ log: (...txt) => txt.forEach(logLamda),
2505
+ logTop: (...txt) => txt.forEach(logTopLambda)
2506
+ };
2507
+ }
2508
+ function tryJSON(content, formatted) {
2509
+ try {
2510
+ return formatted ? `<pre>${JSON.stringify(content, null, 2)}</pre>` : JSON.stringify(content);
2511
+ } catch (err) {
2512
+ return `Some [Object object] can not be converted to JSON`;
2513
+ }
2514
+ }
2515
+ function setDefaultStyling() {
2516
+ fn.editCssRules(`body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}`, `li::marker{vertical-align:top;}`, `code{color:green;background-color:#eee;padding:2px;font-family:monospace;}`, `code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}`, `h3{marginTop:1.5rem;}`, `.thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}`, `a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}`, `.cmmt{color:#888;}`, `.hidden{display:none;}`, `.attention{color:red; font-size:1.2em; font-weight:bold;}`, `#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}`, `#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}`, `.err{fontStyle:italic; color:red; }`, `a{text-decoration:none; font-weight:bold;}`, `a:hover{text-decoration:underline;}`, `a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}`, `a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`, `a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`);
2517
+ }
2518
+ return __toCommonJS(index_exports);
2519
+ })();