dynamic-html-helpers 1.2.4 → 1.2.6

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