dynamic-html-helpers 1.4.5 → 1.4.7
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.
|
@@ -30,9 +30,9 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
|
-
var { IS: u, maybe:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType:
|
|
33
|
+
var { IS: u, maybe: F, $Wrap: gr, isNothing: ot, xProxy: Pe, addSymbolicExtensions: pr } = it({ useSymbolicExtensions: false });
|
|
34
|
+
function it(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = st(b2, e);
|
|
36
36
|
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: a, xProxy: f2, addSymbolicExtensions: y };
|
|
37
37
|
function b2(m, ...h2) {
|
|
38
38
|
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
@@ -40,13 +40,13 @@ var HTMLHelpers = (() => {
|
|
|
40
40
|
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
41
41
|
return r(m, h2[0]);
|
|
42
42
|
default:
|
|
43
|
-
return h2.length > 1 ? n(g2, ...h2) :
|
|
43
|
+
return h2.length > 1 ? n(g2, ...h2) : S2(m, ...h2);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } =
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy:
|
|
47
|
+
function st(t, e) {
|
|
48
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = at(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
49
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
50
50
|
function b2(o) {
|
|
51
51
|
return o?.[Symbol.proxy] ?? t(o);
|
|
52
52
|
}
|
|
@@ -70,7 +70,7 @@ var HTMLHelpers = (() => {
|
|
|
70
70
|
return s = s?.constructor !== Array ? [s] : s, l = l?.constructor !== Array ? [l] : l, t(o, ...s) && !t(o, ...l);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function at() {
|
|
74
74
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
75
75
|
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
76
76
|
function r(o, s) {
|
|
@@ -88,7 +88,7 @@ var HTMLHelpers = (() => {
|
|
|
88
88
|
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
89
89
|
}
|
|
90
90
|
function i(o) {
|
|
91
|
-
return (
|
|
91
|
+
return (ot(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
92
92
|
}
|
|
93
93
|
function a(o, s) {
|
|
94
94
|
return Proxy = new o(o, { construct(l, p2) {
|
|
@@ -105,12 +105,12 @@ var HTMLHelpers = (() => {
|
|
|
105
105
|
Proxy = a(o, Symbol.proxy);
|
|
106
106
|
} };
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function S2(o, ...s) {
|
|
109
109
|
let l = s.length < 1, p2 = o == null;
|
|
110
|
-
return { noInput: p2, noShouldbe: l, compareTo: !l && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) ||
|
|
110
|
+
return { noInput: p2, noShouldbe: l, compareTo: !l && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || F({ trial: (E3) => String(o) === e.NAN }), isInfinity: F({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !l && c(s[0]) };
|
|
111
111
|
}
|
|
112
112
|
function y(o, ...s) {
|
|
113
|
-
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR:
|
|
113
|
+
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR: N2, isNaN: fe2, isInfinity: de2, shouldBeFirstElementIsNothing: me2 } = S2(o, ...s);
|
|
114
114
|
switch (s = s.length && s[0], true) {
|
|
115
115
|
case me2:
|
|
116
116
|
return String(o) === String(E3);
|
|
@@ -122,10 +122,10 @@ var HTMLHelpers = (() => {
|
|
|
122
122
|
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
123
|
case l:
|
|
124
124
|
return p2 ? String(o) : String(E3) === String(o);
|
|
125
|
-
case
|
|
126
|
-
return p2 ? e.BOOLEAN :
|
|
125
|
+
case N2 === Boolean:
|
|
126
|
+
return p2 ? e.BOOLEAN : N2 === s;
|
|
127
127
|
default:
|
|
128
|
-
return d(o, s, p2, x2(o,
|
|
128
|
+
return d(o, s, p2, x2(o, N2));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
function x2(o, s) {
|
|
@@ -156,7 +156,7 @@ var HTMLHelpers = (() => {
|
|
|
156
156
|
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
157
157
|
}
|
|
158
158
|
function m(o, s, l) {
|
|
159
|
-
return
|
|
159
|
+
return F({ trial: (p2) => o instanceof s }) || s === l || s === Object.getPrototypeOf(l) || `${s?.name}` === l?.name;
|
|
160
160
|
}
|
|
161
161
|
function h2(o, s) {
|
|
162
162
|
return function(l) {
|
|
@@ -190,99 +190,99 @@ var HTMLHelpers = (() => {
|
|
|
190
190
|
return l = s ? l || u(o, 1 / 0) || u(o, NaN) : l, l;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
function
|
|
193
|
+
var Oe = ct();
|
|
194
|
+
var R = lt();
|
|
195
|
+
var J = ut();
|
|
196
|
+
function lt() {
|
|
197
197
|
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(",")) };
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function ut() {
|
|
200
200
|
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 };
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ct() {
|
|
203
203
|
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;}}"];
|
|
204
204
|
}
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
function
|
|
205
|
+
var He = { html: "innerHTML", text: "textContent", class: "className" };
|
|
206
|
+
var U = ft();
|
|
207
|
+
function ft() {
|
|
208
208
|
let t = { get(e, r) {
|
|
209
209
|
let n = String(r)?.toLowerCase();
|
|
210
210
|
switch (true) {
|
|
211
211
|
case n in e:
|
|
212
212
|
return e[n];
|
|
213
|
-
case
|
|
214
|
-
return
|
|
213
|
+
case xt(n):
|
|
214
|
+
return Me(e, n, r);
|
|
215
215
|
default:
|
|
216
|
-
return
|
|
216
|
+
return Me(e, n, r, true);
|
|
217
217
|
}
|
|
218
218
|
}, enumerable: false, configurable: false };
|
|
219
219
|
return new Proxy({}, t);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Me(t, e, r, n = false) {
|
|
222
222
|
return Object.defineProperty(t, e, { get() {
|
|
223
|
-
return n ? (i) =>
|
|
223
|
+
return n ? (i) => ht(r) : Et(e);
|
|
224
224
|
} }), t[e];
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
return e = e?.isJQx && e.first() || e,
|
|
226
|
+
function dt(t, e, r) {
|
|
227
|
+
return e = e?.isJQx && e.first() || e, F({ trial: (n) => St(e) ? t.append(e) : De(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} (for root ${t}) not created, reason
|
|
228
228
|
`, n) });
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
let n =
|
|
232
|
-
return r?.forEach((i) =>
|
|
230
|
+
function mt(t, e, ...r) {
|
|
231
|
+
let n = gt(e, t);
|
|
232
|
+
return r?.forEach((i) => dt(n, i, t)), n;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
switch (t = ge(e) ?
|
|
234
|
+
function gt(t, e) {
|
|
235
|
+
switch (t = ge(e) ? bt(t) : t?.isJQx ? t.first() : t, true) {
|
|
236
236
|
case u(t, String):
|
|
237
|
-
return
|
|
237
|
+
return Q(e, De(t, e) ? { html: t } : { text: t });
|
|
238
238
|
case u(t, Node):
|
|
239
|
-
return
|
|
239
|
+
return yt(e, t);
|
|
240
240
|
default:
|
|
241
|
-
return
|
|
241
|
+
return Q(e, t);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function pt(t) {
|
|
245
245
|
return delete t.data, Object.keys(t).length < 1 || Object.keys(t).forEach((e) => {
|
|
246
246
|
let r = e.toLowerCase();
|
|
247
|
-
r in
|
|
247
|
+
r in He && (t[He[r]] = t[e], delete t[e]);
|
|
248
248
|
}), t;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
let r =
|
|
250
|
+
function yt(t, e) {
|
|
251
|
+
let r = Q(t);
|
|
252
252
|
return r.append(e), r;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
e =
|
|
256
|
-
let r = Object.entries(e.data ?? {}), n = Object.assign(ge(t) ? new Comment(e?.text) : document.createElement(t),
|
|
254
|
+
function Q(t, e = {}) {
|
|
255
|
+
e = Ie(e, {});
|
|
256
|
+
let r = Object.entries(e.data ?? {}), n = Object.assign(ge(t) ? new Comment(e?.text) : document.createElement(t), pt(e));
|
|
257
257
|
return r.length && r.forEach(([i, a]) => n.dataset[i] = String(a)), n;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Ie(t, e) {
|
|
260
260
|
return e ? u(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy], defaultValue: e }) : u(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy] });
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
return
|
|
262
|
+
function bt(t) {
|
|
263
|
+
return Ie(t) ? t?.text ?? t?.textContent ?? "" : String(t);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
return
|
|
265
|
+
function ht(t) {
|
|
266
|
+
return Q("b", { style: "color:red", text: `'${t}' is not a valid HTML-tag` });
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function De(t, e) {
|
|
269
269
|
return !ge(e) && u(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function St(t) {
|
|
272
272
|
return t?.constructor === Comment || t?.constructor === CharacterData;
|
|
273
273
|
}
|
|
274
274
|
function ge(t) {
|
|
275
275
|
return t?.constructor === Comment || /comment/i.test(t);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return !u(
|
|
277
|
+
function xt(t) {
|
|
278
|
+
return !u(Q(t), HTMLUnknownElement);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return (e, ...r) =>
|
|
280
|
+
function Et(t) {
|
|
281
|
+
return (e, ...r) => mt(t, e, ...r);
|
|
282
282
|
}
|
|
283
|
-
var { IS:
|
|
284
|
-
function
|
|
285
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType:
|
|
283
|
+
var { IS: j, maybe: pe, $Wrap: xr, isNothing: vt, xProxy: Er, addSymbolicExtensions: vr } = wt({ useSymbolicExtensions: false });
|
|
284
|
+
function wt(t = {}) {
|
|
285
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: a, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = Lt(b2, e);
|
|
286
286
|
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: a, xProxy: f2, addSymbolicExtensions: y };
|
|
287
287
|
function b2(m, ...h2) {
|
|
288
288
|
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
@@ -290,13 +290,13 @@ var HTMLHelpers = (() => {
|
|
|
290
290
|
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
291
291
|
return r(m, h2[0]);
|
|
292
292
|
default:
|
|
293
|
-
return h2.length > 1 ? n(g2, ...h2) :
|
|
293
|
+
return h2.length > 1 ? n(g2, ...h2) : S2(m, ...h2);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } =
|
|
299
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy:
|
|
297
|
+
function Lt(t, e) {
|
|
298
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: a, determineType: f2 } = At(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
299
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: a, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
300
300
|
function b2(o) {
|
|
301
301
|
return o?.[Symbol.proxy] ?? t(o);
|
|
302
302
|
}
|
|
@@ -320,7 +320,7 @@ var HTMLHelpers = (() => {
|
|
|
320
320
|
return s = s?.constructor !== Array ? [s] : s, l = l?.constructor !== Array ? [l] : l, t(o, ...s) && !t(o, ...l);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function At() {
|
|
324
324
|
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
325
325
|
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
326
326
|
function r(o, s) {
|
|
@@ -338,7 +338,7 @@ var HTMLHelpers = (() => {
|
|
|
338
338
|
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
339
339
|
}
|
|
340
340
|
function i(o) {
|
|
341
|
-
return (
|
|
341
|
+
return (vt(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
342
342
|
}
|
|
343
343
|
function a(o, s) {
|
|
344
344
|
return Proxy = new o(o, { construct(l, p2) {
|
|
@@ -355,12 +355,12 @@ var HTMLHelpers = (() => {
|
|
|
355
355
|
Proxy = a(o, Symbol.proxy);
|
|
356
356
|
} };
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function S2(o, ...s) {
|
|
359
359
|
let l = s.length < 1, p2 = o == null;
|
|
360
360
|
return { noInput: p2, noShouldbe: l, compareTo: !l && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || pe({ trial: (E3) => String(o) === e.NAN }), isInfinity: pe({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !l && c(s[0]) };
|
|
361
361
|
}
|
|
362
362
|
function y(o, ...s) {
|
|
363
|
-
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR:
|
|
363
|
+
let { noInput: l, noShouldbe: p2, compareTo: E3, inputCTOR: N2, isNaN: fe2, isInfinity: de2, shouldBeFirstElementIsNothing: me2 } = S2(o, ...s);
|
|
364
364
|
switch (s = s.length && s[0], true) {
|
|
365
365
|
case me2:
|
|
366
366
|
return String(o) === String(E3);
|
|
@@ -372,10 +372,10 @@ var HTMLHelpers = (() => {
|
|
|
372
372
|
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
373
373
|
case l:
|
|
374
374
|
return p2 ? String(o) : String(E3) === String(o);
|
|
375
|
-
case
|
|
376
|
-
return p2 ? e.BOOLEAN :
|
|
375
|
+
case N2 === Boolean:
|
|
376
|
+
return p2 ? e.BOOLEAN : N2 === s;
|
|
377
377
|
default:
|
|
378
|
-
return d(o, s, p2, x2(o,
|
|
378
|
+
return d(o, s, p2, x2(o, N2));
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
function x2(o, s) {
|
|
@@ -437,48 +437,48 @@ var HTMLHelpers = (() => {
|
|
|
437
437
|
}
|
|
438
438
|
function c(o, s = false) {
|
|
439
439
|
let l = o == null;
|
|
440
|
-
return l = s ? l ||
|
|
440
|
+
return l = s ? l || j(o, 1 / 0) || j(o, NaN) : l, l;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
445
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet: a, removeRules: f2, consider:
|
|
443
|
+
var k = Ct;
|
|
444
|
+
function Ct({ styleSheet: t, createWithId: e } = {}) {
|
|
445
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: i, sheet: a, removeRules: f2, consider: S2, currentSheetID: y } = Nt({ styleSheet: t, createWithId: e });
|
|
446
446
|
function x2(g2, c) {
|
|
447
447
|
if (g2 && c.removeProperties) {
|
|
448
|
-
Object.keys(c.removeProperties).forEach((o) => g2.style.removeProperty(
|
|
448
|
+
Object.keys(c.removeProperties).forEach((o) => g2.style.removeProperty(Re(o)));
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
451
|
Object.entries(c).forEach(([o, s]) => {
|
|
452
|
-
o =
|
|
452
|
+
o = Re(o.trim()), s = s.trim();
|
|
453
453
|
let l;
|
|
454
454
|
if (/!important/.test(s) && (s = s.slice(0, s.indexOf("!important")).trim(), l = "important"), !CSS.supports(o, s)) return console.error(`StylingFactory ${y} error: '${o}' with value '${s}' not supported (yet)`);
|
|
455
|
-
|
|
455
|
+
je(() => g2.style.setProperty(o, s, l), `StylingFactory ${y} (setRule4Selector) failed`);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
function d(g2, c, o = a) {
|
|
459
|
-
if (g2 = g2?.trim?.(), !
|
|
459
|
+
if (g2 = g2?.trim?.(), !j(g2, String) || !g2.length || /[;,]$/g.test(g2)) return console.error(`StylingFactory ${y} (setRules): [${g2 || "[no selector given]"}] is not a valid selector`);
|
|
460
460
|
if (c.removeRule) return f2(g2);
|
|
461
461
|
let s = n(g2, true), l = s || o.cssRules[o.insertRule(`${g2} {}`, o.cssRules.length || 0)];
|
|
462
|
-
return
|
|
462
|
+
return S2(() => x2(l, c), g2, s);
|
|
463
463
|
}
|
|
464
464
|
function b2(g2) {
|
|
465
465
|
let c = g2.trim().split(/{/, 2), o = c.shift().trim();
|
|
466
|
-
if (!
|
|
467
|
-
let s =
|
|
468
|
-
return
|
|
466
|
+
if (!j(o, String) || !o?.trim()?.length) return console.error(`StylingFactory ${y} (doParse): no (valid) selector could be extracted from rule ${ye(g2)}`);
|
|
467
|
+
let s = Mt(c.shift());
|
|
468
|
+
return je(() => d(o, s), `StylingFactory ${y} (setRules) failed`);
|
|
469
469
|
}
|
|
470
470
|
function m(g2) {
|
|
471
471
|
let c = r(g2);
|
|
472
472
|
return c.done ? c.existing : b2(g2);
|
|
473
473
|
}
|
|
474
474
|
function h2(g2, c) {
|
|
475
|
-
return g2.trim().startsWith("@media") ? m(
|
|
475
|
+
return g2.trim().startsWith("@media") ? m(Tt(g2, c)) : d(g2, c);
|
|
476
476
|
}
|
|
477
477
|
return function(g2, c = {}) {
|
|
478
478
|
return i(g2, c) && (Object.keys(c).length ? h2(g2, c) : m(g2));
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Nt({ styleSheet: t, createWithId: e }) {
|
|
482
482
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
483
483
|
t = e ? i(e) : t;
|
|
484
484
|
function i(m) {
|
|
@@ -492,17 +492,17 @@ var HTMLHelpers = (() => {
|
|
|
492
492
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
493
493
|
}
|
|
494
494
|
function f2(m, h2) {
|
|
495
|
-
return [...t.rules].find((g2) => h2 ?
|
|
495
|
+
return [...t.rules].find((g2) => h2 ? Je(g2.selectorText || "", m) : Pt`${$t(m)}${[..."gim"]}`.test(g2.cssText));
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function S2(m) {
|
|
498
498
|
return /^@charset|@import|namespace/i.test(m.trim()) ? a(m) : m.match(/}/g)?.length > 1 ? { existing: d(m, 1), done: true } : { done: false };
|
|
499
499
|
}
|
|
500
500
|
function y(m) {
|
|
501
|
-
let h2 = [...t.cssRules].reduce((c, o, s) =>
|
|
501
|
+
let h2 = [...t.cssRules].reduce((c, o, s) => Je(o.selectorText || "", m) && c.concat(s) || c, []), g2 = h2.length;
|
|
502
502
|
return h2.forEach((c) => t.deleteRule(c)), g2 > 0 ? console.info(`\u2714 Removed ${g2} instance${g2 > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
503
503
|
}
|
|
504
504
|
function x2(m, h2) {
|
|
505
|
-
return m &&
|
|
505
|
+
return m && j(m, String) && m.trim().length > 0 && j(h2, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
506
506
|
}
|
|
507
507
|
function d(m) {
|
|
508
508
|
m = m.trim();
|
|
@@ -526,70 +526,70 @@ Rule: ${ye(h2)}
|
|
|
526
526
|
${r}`), g2;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
return { sheet: t, removeRules: y, tryParseAtOrNestedRules:
|
|
529
|
+
return { sheet: t, removeRules: y, tryParseAtOrNestedRules: S2, ruleExists: f2, checkParams: x2, tryParse: d, consider: b2, currentSheetID: n };
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
531
|
+
function Tt(t, e) {
|
|
532
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${Ft(n)}`)}`;
|
|
533
533
|
}
|
|
534
534
|
function ye(t) {
|
|
535
535
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
536
536
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Ft(t) {
|
|
539
539
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
540
540
|
`);
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function $t(t) {
|
|
543
543
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Pt(t, ...e) {
|
|
546
546
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
547
547
|
return new RegExp((e.length && t.raw.reduce((n, i, a) => n.concat(e[a - 1] || "").concat(i), "") || t.raw.join("")).split(`
|
|
548
548
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Re(t) {
|
|
551
551
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function je(t, e) {
|
|
554
554
|
try {
|
|
555
555
|
return t();
|
|
556
556
|
} catch (r) {
|
|
557
557
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Ot(t) {
|
|
561
561
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
562
562
|
`).replaceAll("\\3b", ";").split(`
|
|
563
563
|
`);
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Ht(t) {
|
|
566
566
|
return t.reduce((e, r) => {
|
|
567
567
|
let [n, i] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
568
568
|
return n && i ? { ...e, [n]: i } : e;
|
|
569
569
|
}, {});
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
571
|
+
function Mt(t) {
|
|
572
|
+
return Ht(Ot(t));
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function Je(t, e) {
|
|
575
575
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
576
576
|
}
|
|
577
577
|
var be = false;
|
|
578
|
-
var
|
|
579
|
-
var $ = { tagsRaw:
|
|
578
|
+
var It = { on: () => be = true, off: () => be = false };
|
|
579
|
+
var $ = { tagsRaw: J, allowUnknownHtmlTags: It, isAllowed(t) {
|
|
580
580
|
if (be) return true;
|
|
581
581
|
let e = u(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
582
|
-
return e === "#text" || !!
|
|
583
|
-
}, allowTag: (t) =>
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
function
|
|
587
|
-
if (
|
|
582
|
+
return e === "#text" || !!J[e];
|
|
583
|
+
}, allowTag: (t) => J[t.toLowerCase()] = true, prohibitTag: (t) => J[t.toLowerCase()] = false };
|
|
584
|
+
var Dt = true;
|
|
585
|
+
var X = { 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 };
|
|
586
|
+
function Rt(t) {
|
|
587
|
+
if (Dt && Object.keys(t.removed).length) {
|
|
588
588
|
let e = Object.entries(t.removed).reduce((r, [n, i]) => [...r, `${O(n)} => ${i}`], []).join("\\000A");
|
|
589
589
|
w.error(`JQx: HTML creation error(s): ${e}`);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function jt(t) {
|
|
593
593
|
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"];
|
|
594
594
|
return /-/.test(e) && !r.find((n) => n === e) || $.isAllowed(e);
|
|
595
595
|
}
|
|
@@ -597,26 +597,26 @@ ${r}`), g2;
|
|
|
597
597
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
598
598
|
return u(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
599
599
|
if (r?.children?.length && M(r), r?.attributes) {
|
|
600
|
-
let i = u(r, SVGElement) ?
|
|
600
|
+
let i = u(r, SVGElement) ? R.svg : R.html;
|
|
601
601
|
[...(r ?? { attributes: [] }).attributes].forEach((a) => {
|
|
602
|
-
let f2 = a.name.trim().toLowerCase(),
|
|
602
|
+
let f2 = a.name.trim().toLowerCase(), S2 = a.value.trim().toLowerCase().replace(X.whiteSpace, ""), y = f2 === "href" ? !X.validURL.test(S2) : X.notAllowedValues.test(S2), x2 = f2.startsWith("data") ? !X.data.test(f2) : !!i[f2];
|
|
603
603
|
if (y || x2) {
|
|
604
|
-
let d =
|
|
604
|
+
let d = G(a.value || "none", 60);
|
|
605
605
|
d += d.length === 60 ? "..." : "", e.removed[`${a.name}`] = `attribute/property/value not allowed, removed. Value: ${d}`, r.removeAttribute(a.name);
|
|
606
606
|
}
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
|
-
if (!(
|
|
610
|
-
let i = (r?.outerHTML || r?.textContent).trim(), a =
|
|
609
|
+
if (!(jt(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
610
|
+
let i = (r?.outerHTML || r?.textContent).trim(), a = G(i, 60) ?? "EMPTY";
|
|
611
611
|
a += a.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${a}`, r.remove();
|
|
612
612
|
}
|
|
613
|
-
}),
|
|
613
|
+
}), Rt(e), t;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function Jt(t) {
|
|
616
616
|
let e = document.createElement("div");
|
|
617
|
-
return e.insertAdjacentHTML(
|
|
617
|
+
return e.insertAdjacentHTML(A.end, t), e.childNodes.length ? M(e) : void 0;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Qt(t, e, r) {
|
|
620
620
|
switch (true) {
|
|
621
621
|
case u(t, Comment):
|
|
622
622
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
@@ -626,31 +626,31 @@ ${r}`), g2;
|
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
function I(t = [], e = document.body, r =
|
|
630
|
-
return r = r ||
|
|
631
|
-
let a = P(i) &&
|
|
629
|
+
function I(t = [], e = document.body, r = A.BeforeEnd) {
|
|
630
|
+
return r = r || A.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, i) => {
|
|
631
|
+
let a = P(i) && kt(i, e, r);
|
|
632
632
|
return a ? [...n, a] : n;
|
|
633
633
|
}, []);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return r = r ||
|
|
635
|
+
function kt(t, e = document.body, r = A.BeforeEnd) {
|
|
636
|
+
return r = r || A.BeforeEnd, e = e?.isJQx ? e?.[0] : e, u(t, Comment, Text) ? Qt(t, e, r) : u(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function T(t) {
|
|
639
639
|
if (u(t, Text, Comment)) return t;
|
|
640
640
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
641
641
|
if (r?.length && (r = r.length > 1 ? r.filter((i) => i.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
|
|
642
642
|
if (r || u(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
643
|
-
let n =
|
|
644
|
-
return n.childNodes.length < 1 ?
|
|
643
|
+
let n = Jt(t);
|
|
644
|
+
return n.childNodes.length < 1 ? T(`<span data-jqxcreationerror="1">${Z(t, 60)}</span>`) : n.children[0];
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function K(t) {
|
|
647
647
|
if (t.node("#jqxPopup")) return;
|
|
648
|
-
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...
|
|
648
|
+
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Oe);
|
|
649
649
|
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], i = {};
|
|
650
650
|
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: a, remove: f2, removeModal: b2 });
|
|
651
651
|
function a(c) {
|
|
652
652
|
if (n.open) switch (true) {
|
|
653
|
-
case
|
|
653
|
+
case S2(c):
|
|
654
654
|
return;
|
|
655
655
|
default:
|
|
656
656
|
return f2(), setTimeout(() => a(c), 200);
|
|
@@ -662,7 +662,7 @@ ${r}`), g2;
|
|
|
662
662
|
function f2() {
|
|
663
663
|
return i.modal ? g2(i.warnMessage) : x2();
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function S2(c) {
|
|
666
666
|
for (let [o, s] of Object.entries(i)) if (s !== c[o]) return false;
|
|
667
667
|
return true;
|
|
668
668
|
}
|
|
@@ -700,7 +700,7 @@ ${r}`), g2;
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function q(t) {
|
|
704
704
|
let e = {}, r = "anonymous_";
|
|
705
705
|
function n(d) {
|
|
706
706
|
if (d) {
|
|
@@ -728,24 +728,24 @@ ${r}`), g2;
|
|
|
728
728
|
function f2(d) {
|
|
729
729
|
return e[d] = e[d] || {}, e[d];
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function S2(d, b2) {
|
|
732
732
|
return Object.entries(f2(d)).find(([m]) => m === b2);
|
|
733
733
|
}
|
|
734
734
|
function y(d, b2) {
|
|
735
|
-
let m =
|
|
736
|
-
m && (i(m[1]), delete e[d][b2], delete
|
|
735
|
+
let m = S2(d, b2);
|
|
736
|
+
m && (i(m[1]), delete e[d][b2], delete ee[b2], w.warn(`Removed listener [${b2}] for event type [${d}].`));
|
|
737
737
|
}
|
|
738
738
|
function x2(d) {
|
|
739
739
|
let { type: b2, handler: m, name: h2, capture: g2, once: c, selector: o, node: s, about: l } = d;
|
|
740
740
|
e[b2] = e[b2] || {};
|
|
741
741
|
let p2 = he(h2 || m.name), E3 = m;
|
|
742
742
|
if (s instanceof HTMLElement) {
|
|
743
|
-
let
|
|
744
|
-
s.dataset.hid =
|
|
743
|
+
let N2 = s.dataset.hid || p2;
|
|
744
|
+
s.dataset.hid = N2, o = `[data-hid=${N2}]`;
|
|
745
745
|
}
|
|
746
746
|
switch (true) {
|
|
747
747
|
case !e[b2][p2]:
|
|
748
|
-
return w.log(`JQx: created listener for event type ${b2}, with handler name ${p2}`), e[b2][p2] = { name: p2, handler: a(m, o, c, p2), capture:
|
|
748
|
+
return w.log(`JQx: created listener for event type ${b2}, with handler name ${p2}`), e[b2][p2] = { name: p2, handler: a(m, o, c, p2), capture: Qe(b2, g2), once: !!c, type: b2, initialHandler: E3, selector: !!o && o || false, about: !!l && l || false, unListen() {
|
|
749
749
|
y(b2, p2);
|
|
750
750
|
} }, e[b2][p2];
|
|
751
751
|
default:
|
|
@@ -765,24 +765,24 @@ ${r}`), g2;
|
|
|
765
765
|
return Object.freeze({ ...e });
|
|
766
766
|
} };
|
|
767
767
|
}
|
|
768
|
-
var w =
|
|
769
|
-
var
|
|
770
|
-
var
|
|
768
|
+
var w = zt();
|
|
769
|
+
var Bt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
770
|
+
var A = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
771
771
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
772
772
|
} }));
|
|
773
|
-
var
|
|
773
|
+
var Wt = [...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}`));
|
|
774
774
|
var xe = Object.freeze({ get(t, e) {
|
|
775
|
-
return t[
|
|
775
|
+
return t[z(e)] || t[e];
|
|
776
776
|
}, enumerable: false, configurable: false });
|
|
777
|
-
var
|
|
778
|
-
|
|
777
|
+
var ee = {};
|
|
778
|
+
Pe.custom();
|
|
779
779
|
function Ee() {
|
|
780
780
|
let t = setTimeout(() => {
|
|
781
781
|
});
|
|
782
782
|
for (; t >= 0; ) clearTimeout(t--);
|
|
783
783
|
}
|
|
784
784
|
function he(t) {
|
|
785
|
-
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() :
|
|
785
|
+
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : ke();
|
|
786
786
|
}
|
|
787
787
|
function ve(t) {
|
|
788
788
|
let e = !!t.node && !u(t, Text, Comment);
|
|
@@ -794,29 +794,29 @@ ${r}`), g2;
|
|
|
794
794
|
return "";
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function ke(t) {
|
|
798
798
|
let e = `anonymous_${Math.random().toString(36).slice(2)}`;
|
|
799
|
-
return
|
|
800
|
-
}
|
|
801
|
-
function ke(t, e) {
|
|
802
|
-
return !!Wt.find((r) => r === t) || !!e;
|
|
799
|
+
return ee[e] ? ke() : (ee[e] = e, e);
|
|
803
800
|
}
|
|
804
|
-
function
|
|
805
|
-
return
|
|
801
|
+
function Qe(t, e) {
|
|
802
|
+
return !!Bt.find((r) => r === t) || !!e;
|
|
806
803
|
}
|
|
807
804
|
function ne(t) {
|
|
805
|
+
return t.startsWith("data") || R.html.find((e) => t.toLowerCase() === e);
|
|
806
|
+
}
|
|
807
|
+
function oe(t) {
|
|
808
808
|
return t && (t.textContent = "");
|
|
809
809
|
}
|
|
810
|
-
function
|
|
811
|
-
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ?
|
|
810
|
+
function B(t, e = 0, r = true) {
|
|
811
|
+
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? B(t, e, r) : e;
|
|
812
812
|
}
|
|
813
813
|
function L(t, e = 1) {
|
|
814
814
|
return e = u(e, Number) && e || 1, u(t, String) && t.length >= e;
|
|
815
815
|
}
|
|
816
|
-
function X(t, e = 120) {
|
|
817
|
-
return G(t, e).replace(/</g, "<");
|
|
818
|
-
}
|
|
819
816
|
function G(t, e = 120) {
|
|
817
|
+
return Z(t, e).replace(/</g, "<");
|
|
818
|
+
}
|
|
819
|
+
function Z(t, e = 120) {
|
|
820
820
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
821
821
|
}
|
|
822
822
|
function O(t) {
|
|
@@ -831,7 +831,7 @@ ${r}`), g2;
|
|
|
831
831
|
function Se(t) {
|
|
832
832
|
return u(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function zt() {
|
|
835
835
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
836
836
|
return t = true, n;
|
|
837
837
|
}, get off() {
|
|
@@ -850,15 +850,15 @@ ${r}`), g2;
|
|
|
850
850
|
e = false;
|
|
851
851
|
}
|
|
852
852
|
function f2(...x2) {
|
|
853
|
-
return r.unshift(...x2.map((d) => `${
|
|
853
|
+
return r.unshift(...x2.map((d) => `${re()} \u2A3B ${Se(d)}`)), console.error(r.slice(0, x2.length).join(`
|
|
854
854
|
`)), n;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
857
|
-
return r.unshift(...x2.map((d) => `${
|
|
856
|
+
function S2(...x2) {
|
|
857
|
+
return r.unshift(...x2.map((d) => `${re()} \u26A0 ${Se(d)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
858
858
|
`)), n;
|
|
859
859
|
}
|
|
860
860
|
function y(...x2) {
|
|
861
|
-
let d = x2.map((b2) => `${
|
|
861
|
+
let d = x2.map((b2) => `${re()} \u2714 ${Se(b2)}`);
|
|
862
862
|
switch (!e && r.unshift(...d), t) {
|
|
863
863
|
case true:
|
|
864
864
|
console.log(d.join(`
|
|
@@ -867,69 +867,71 @@ ${r}`), g2;
|
|
|
867
867
|
return n;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
return Object.defineProperties(n, { log: { value: y, enumerable: false }, error: { value: f2, enumerable: false }, warn: { value:
|
|
870
|
+
return Object.defineProperties(n, { log: { value: y, enumerable: false }, error: { value: f2, enumerable: false }, warn: { value: S2, enumerable: false } }), Object.freeze(n);
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
return ((t) => `[${
|
|
872
|
+
function re() {
|
|
873
|
+
return ((t) => `[${te(t.getHours())}:${te(t.getMinutes())}:${te(t.getSeconds())}.${te(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
874
874
|
}
|
|
875
875
|
function we(t, e) {
|
|
876
876
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
877
|
-
if (r =
|
|
878
|
-
u(n, String) &&
|
|
877
|
+
if (r = C(r), r.startsWith("data")) return ie(t, n);
|
|
878
|
+
u(n, String) && ne(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
if (t && u(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${
|
|
881
|
+
function ie(t, e) {
|
|
882
|
+
if (t && u(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${C(r)}`, n);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
return t ? u(t, Proxy) ? [t.EL] : u(t, NodeList) ? [...t] : P(t) ? [t] :
|
|
884
|
+
function se(t) {
|
|
885
|
+
return t ? u(t, Proxy) ? [t.EL] : u(t, NodeList) ? [...t] : P(t) ? [t] : _(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
886
886
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
887
|
+
function D(t, e, r = true, ...n) {
|
|
888
|
+
if (t.is.empty) return w.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."), t;
|
|
889
|
+
if (n = n.map((a) => a.isJQx ? a.node : u(a, String) ? e(a).node ?? a : a), n.find((a) => !u(a, String, Element))) {
|
|
890
|
+
let a = r ? "after" : "before";
|
|
891
|
+
return w.log(`[JQx instance].[${a}(Me)]: invalid/-sufficient input.`), t;
|
|
892
|
+
}
|
|
893
|
+
return t.node[r ? "after" : "before"](...n), t;
|
|
892
894
|
}
|
|
893
895
|
function P(t) {
|
|
894
896
|
return u(t, Text, HTMLElement, Comment);
|
|
895
897
|
}
|
|
896
|
-
function
|
|
898
|
+
function W(t, e) {
|
|
897
899
|
if (u(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
898
900
|
let i;
|
|
899
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), i = "important"), t.style.setProperty(
|
|
901
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), i = "important"), t.style.setProperty(C(r), n, i);
|
|
900
902
|
}
|
|
901
903
|
}
|
|
902
904
|
function H(t) {
|
|
903
905
|
let e = t.cloneNode(true);
|
|
904
906
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
905
907
|
}
|
|
906
|
-
function
|
|
908
|
+
function Be(t) {
|
|
907
909
|
if (!u(t, HTMLElement)) return;
|
|
908
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"), a = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1,
|
|
909
|
-
return !(a ||
|
|
910
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), i = !![e.display, r.display].includes("none"), a = !!t.hidden, f2 = parseInt(r.height) < 1 || parseInt(r.width) < 1, S2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, y = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
911
|
+
return !(a || S2 || y || i || n || f2);
|
|
910
912
|
}
|
|
911
|
-
function
|
|
913
|
+
function We(t) {
|
|
912
914
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
913
915
|
}
|
|
914
|
-
function
|
|
915
|
-
return t?.filter((e) => e).reduce((e, r) => e.concat(
|
|
916
|
+
function ze(t) {
|
|
917
|
+
return t?.filter((e) => e).reduce((e, r) => e.concat(Ce(r) ? `<!--${r.data}-->` : le(r) ? r.textContent : r.outerHTML), "");
|
|
916
918
|
}
|
|
917
|
-
function
|
|
919
|
+
function te(t, e = 2) {
|
|
918
920
|
return `${t}`.padStart(e, "0");
|
|
919
921
|
}
|
|
920
|
-
function
|
|
922
|
+
function Ye(t, e = 0) {
|
|
921
923
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
922
924
|
}
|
|
923
925
|
function ae() {
|
|
924
|
-
return `_${
|
|
926
|
+
return `_${Yt(Wt).slice(0, 8).join("")}`;
|
|
925
927
|
}
|
|
926
|
-
function
|
|
928
|
+
function Le(t) {
|
|
927
929
|
return t = u(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, u(t, Array) ? t : u(t, String) && t?.trim().toLowerCase() || "";
|
|
928
930
|
}
|
|
929
|
-
function
|
|
931
|
+
function _e(t) {
|
|
930
932
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
931
933
|
}
|
|
932
|
-
function
|
|
934
|
+
function Ae(t, e) {
|
|
933
935
|
switch (t = String(t).trim(), true) {
|
|
934
936
|
case /^(0|false|f)$/i.test(t):
|
|
935
937
|
return false;
|
|
@@ -939,50 +941,50 @@ ${r}`), g2;
|
|
|
939
941
|
return e;
|
|
940
942
|
}
|
|
941
943
|
}
|
|
942
|
-
function
|
|
944
|
+
function Yt(t) {
|
|
943
945
|
let e = t.length;
|
|
944
946
|
for (; e--; ) {
|
|
945
|
-
let r =
|
|
947
|
+
let r = Ye(e);
|
|
946
948
|
[t[e], t[r]] = [t[r], t[e]];
|
|
947
949
|
}
|
|
948
950
|
return t;
|
|
949
951
|
}
|
|
950
|
-
function
|
|
951
|
-
return u(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${
|
|
952
|
+
function z(t) {
|
|
953
|
+
return u(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${_t(e)}` || e).join("") : t;
|
|
952
954
|
}
|
|
953
|
-
function
|
|
955
|
+
function C(t) {
|
|
954
956
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
955
957
|
}
|
|
956
|
-
function
|
|
958
|
+
function _t([t, ...e]) {
|
|
957
959
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
958
960
|
}
|
|
959
961
|
function le(t) {
|
|
960
962
|
return u(t, Comment, Text);
|
|
961
963
|
}
|
|
962
|
-
function
|
|
964
|
+
function Ce(t) {
|
|
963
965
|
u(t, Comment);
|
|
964
966
|
}
|
|
965
|
-
function
|
|
967
|
+
function Ve(t) {
|
|
966
968
|
return u(t, Text);
|
|
967
969
|
}
|
|
968
|
-
function
|
|
970
|
+
function Y(t) {
|
|
969
971
|
return u(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
970
972
|
}
|
|
971
|
-
function
|
|
973
|
+
function _(t) {
|
|
972
974
|
return u(t, Array) && !t?.find((e) => !P(e));
|
|
973
975
|
}
|
|
974
976
|
function ue(t) {
|
|
975
|
-
return u(t, Array) && !t?.find((e) => !
|
|
977
|
+
return u(t, Array) && !t?.find((e) => !Y(e));
|
|
976
978
|
}
|
|
977
979
|
function v(t, e) {
|
|
978
980
|
let r = t.collection.filter((n) => !le(n));
|
|
979
981
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
980
982
|
return t;
|
|
981
983
|
}
|
|
982
|
-
function
|
|
984
|
+
function Ue(t) {
|
|
983
985
|
return t.node ? u(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
984
986
|
}
|
|
985
|
-
function
|
|
987
|
+
function Ne(t, e, r) {
|
|
986
988
|
let n = e !== document.body && u(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
987
989
|
try {
|
|
988
990
|
r.collection = [...n.querySelectorAll(t)];
|
|
@@ -990,23 +992,23 @@ ${r}`), g2;
|
|
|
990
992
|
w.warn(`JQx: Invalid CSS querySelector. [${u(t, String) ? t : "Not a string!"}]`);
|
|
991
993
|
}
|
|
992
994
|
}
|
|
993
|
-
function
|
|
994
|
-
return { isCommentOrTextNode: le, isNode: P, isComment:
|
|
995
|
+
function Xe() {
|
|
996
|
+
return { isCommentOrTextNode: le, isNode: P, isComment: Ce, isText: Ve, isHtmlString: Y, isArrayOfHtmlElements: _, isArrayOfHtmlStrings: ue, ElemArray2HtmlString: ze, input2Collection: se, setCollectionFromCssSelector: Ne, cssRuleEdit: k({ createWithId: "JQxStylesheet" }) };
|
|
995
997
|
}
|
|
996
|
-
function
|
|
998
|
+
function Ge() {
|
|
997
999
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
998
1000
|
return (r) => {
|
|
999
1001
|
let n = r.node;
|
|
1000
1002
|
return u(n, Node) ? Object.freeze({ get writable() {
|
|
1001
|
-
return
|
|
1003
|
+
return We(n);
|
|
1002
1004
|
}, get modal() {
|
|
1003
|
-
return
|
|
1005
|
+
return _e(n);
|
|
1004
1006
|
}, get inDOM() {
|
|
1005
1007
|
return n.isConnected;
|
|
1006
1008
|
}, get open() {
|
|
1007
1009
|
return n.open ?? false;
|
|
1008
1010
|
}, get visible() {
|
|
1009
|
-
return
|
|
1011
|
+
return Be(n);
|
|
1010
1012
|
}, get disabled() {
|
|
1011
1013
|
return n.hasAttribute("readonly") || n.hasAttribute("disabled");
|
|
1012
1014
|
}, get empty() {
|
|
@@ -1016,16 +1018,16 @@ ${r}`), g2;
|
|
|
1016
1018
|
} }) : e;
|
|
1017
1019
|
};
|
|
1018
1020
|
}
|
|
1019
|
-
function
|
|
1021
|
+
function Ze(t, e, r, n) {
|
|
1020
1022
|
r && u(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
1021
1023
|
let i;
|
|
1022
1024
|
e.className && (i = e.className, delete e.className), i = [...t.classList].find((f2) => f2.startsWith("JQxClass-") || i && f2 === i) || i || `JQxClass-${ae().slice(1)}`, n.editCssRule(`.${i}`, e), t.classList.add(i);
|
|
1023
1025
|
}
|
|
1024
|
-
var
|
|
1025
|
-
function
|
|
1026
|
-
return { factoryExtensions:
|
|
1026
|
+
var Vt = Ge();
|
|
1027
|
+
function Ke(t) {
|
|
1028
|
+
return { factoryExtensions: Ut(t), instanceExtensions: Xt(t) };
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1030
|
+
function Ut(t) {
|
|
1029
1031
|
return { data(e) {
|
|
1030
1032
|
return { get all() {
|
|
1031
1033
|
return new Proxy(e[0]?.dataset ?? {}, xe);
|
|
@@ -1038,12 +1040,12 @@ ${r}`), g2;
|
|
|
1038
1040
|
if (!e.is.empty && u(r, Object)) for (let [n, i] of Object.entries(r)) e.setData({ [n]: i });
|
|
1039
1041
|
return e;
|
|
1040
1042
|
}, remove(r) {
|
|
1041
|
-
return e[0]?.removeAttribute(`data-${
|
|
1043
|
+
return e[0]?.removeAttribute(`data-${C(r)}`), e;
|
|
1042
1044
|
} };
|
|
1043
1045
|
}, dimensions(e) {
|
|
1044
1046
|
if (e.is.empty) return w.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1045
1047
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1046
|
-
return n.scrollTopDistance =
|
|
1048
|
+
return n.scrollTopDistance = B(r, 0), n.scrollLeftDistance = B(r, 0, false), n;
|
|
1047
1049
|
}, node(e) {
|
|
1048
1050
|
return e[0];
|
|
1049
1051
|
}, HTML(e) {
|
|
@@ -1063,7 +1065,7 @@ ${r}`), g2;
|
|
|
1063
1065
|
return r = u(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1064
1066
|
} };
|
|
1065
1067
|
}, is(e) {
|
|
1066
|
-
return
|
|
1068
|
+
return Vt(e);
|
|
1067
1069
|
}, length(e) {
|
|
1068
1070
|
return e.collection.length;
|
|
1069
1071
|
}, outerHtml(e) {
|
|
@@ -1086,7 +1088,7 @@ ${r}`), g2;
|
|
|
1086
1088
|
}, inSheet(r) {
|
|
1087
1089
|
return e.css(r);
|
|
1088
1090
|
}, valueOf(r) {
|
|
1089
|
-
return e.is.empty ? void 0 : getComputedStyle(e[0])[
|
|
1091
|
+
return e.is.empty ? void 0 : getComputedStyle(e[0])[C(r)];
|
|
1090
1092
|
}, nwRule(r) {
|
|
1091
1093
|
return e.Style.byRule({ rules: r });
|
|
1092
1094
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
@@ -1096,25 +1098,22 @@ ${r}`), g2;
|
|
|
1096
1098
|
} };
|
|
1097
1099
|
} };
|
|
1098
1100
|
}
|
|
1099
|
-
function
|
|
1101
|
+
function Xt(t) {
|
|
1100
1102
|
return { addClass(e, ...r) {
|
|
1101
1103
|
return v(e, (n) => n && r.forEach((i) => n.classList.add(i)));
|
|
1102
|
-
}, after(e, r) {
|
|
1103
|
-
return
|
|
1104
|
-
}, afterMe(e, r) {
|
|
1105
|
-
return
|
|
1106
|
-
}, andThen(e, r
|
|
1107
|
-
|
|
1108
|
-
r = r?.isJQx ? r : u(r, Node) ? t.virtual(r) : t.virtual(F(r));
|
|
1109
|
-
let [i, a, f2] = n ? [0, "before", r.collection.concat(e.collection)] : [e.collection.length - 1, "after", e.collection.concat(r.collection)];
|
|
1110
|
-
return e[i][a](...r.collection), e.collection = f2, e;
|
|
1104
|
+
}, after(e, ...r) {
|
|
1105
|
+
return D(e, t, true, ...r);
|
|
1106
|
+
}, afterMe(e, ...r) {
|
|
1107
|
+
return D(e, t, true, ...r);
|
|
1108
|
+
}, andThen(e, ...r) {
|
|
1109
|
+
return D(e, t, true, ...r);
|
|
1111
1110
|
}, append(e, ...r) {
|
|
1112
1111
|
if (e.is.empty || r.length < 1) return e;
|
|
1113
1112
|
let n = e.length === 1;
|
|
1114
1113
|
for (let i of r) {
|
|
1115
1114
|
if (!i.isJQx && L(i)) {
|
|
1116
|
-
let a = i.trim(),
|
|
1117
|
-
v(e, (y) => y.append(n ?
|
|
1115
|
+
let a = i.trim(), S2 = !/^<(.+)[^>]+>$/m.test(a) ? t.text(i) : T(i);
|
|
1116
|
+
v(e, (y) => y.append(n ? S2 : H(S2)));
|
|
1118
1117
|
}
|
|
1119
1118
|
P(i) && v(e, (a) => a.append(n ? i : H(i))), i.isJQx && !i.is.empty && v(e, (a) => i.collection.forEach((f2) => a.append(n ? f2 : H(f2))));
|
|
1120
1119
|
}
|
|
@@ -1128,8 +1127,8 @@ ${r}`), g2;
|
|
|
1128
1127
|
}
|
|
1129
1128
|
}, attr(e, r, n) {
|
|
1130
1129
|
if (!e.node || u(e.node, Text, Comment)) return e;
|
|
1131
|
-
if (!n && L(r)) return r =
|
|
1132
|
-
if (L(r) && n) switch (r =
|
|
1130
|
+
if (!n && L(r)) return r = C(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1131
|
+
if (L(r) && n) switch (r = C(r), true) {
|
|
1133
1132
|
case r.startsWith("data-"):
|
|
1134
1133
|
r = { data: { [r.replace("data-", "")]: n } };
|
|
1135
1134
|
break;
|
|
@@ -1137,12 +1136,12 @@ ${r}`), g2;
|
|
|
1137
1136
|
r = { [r]: n };
|
|
1138
1137
|
}
|
|
1139
1138
|
return u(r, Object) && !e.is.empty && we(e.node, r), e;
|
|
1140
|
-
}, before(e, r) {
|
|
1141
|
-
return e
|
|
1142
|
-
}, beforeMe(e, r) {
|
|
1143
|
-
|
|
1139
|
+
}, before(e, ...r) {
|
|
1140
|
+
return D(e, t, false, ...r);
|
|
1141
|
+
}, beforeMe(e, ...r) {
|
|
1142
|
+
D(e, t, false, ...r);
|
|
1144
1143
|
}, clear(e) {
|
|
1145
|
-
return v(e,
|
|
1144
|
+
return v(e, oe);
|
|
1146
1145
|
}, closest(e, r) {
|
|
1147
1146
|
let n = L(r) ? e.node?.closest(r) : void 0;
|
|
1148
1147
|
return n ? t(n) : e;
|
|
@@ -1150,7 +1149,7 @@ ${r}`), g2;
|
|
|
1150
1149
|
let { node: n } = e;
|
|
1151
1150
|
return n && getComputedStyle(n)[r];
|
|
1152
1151
|
}, css(e, r, n) {
|
|
1153
|
-
return v(e, (i) =>
|
|
1152
|
+
return v(e, (i) => Ze(i, r, n, t));
|
|
1154
1153
|
}, duplicate(e, r = false, n = document.body) {
|
|
1155
1154
|
switch (true) {
|
|
1156
1155
|
case e.is.empty:
|
|
@@ -1164,7 +1163,7 @@ ${r}`), g2;
|
|
|
1164
1163
|
}, each(e, r) {
|
|
1165
1164
|
return v(e, r);
|
|
1166
1165
|
}, empty(e) {
|
|
1167
|
-
return v(e,
|
|
1166
|
+
return v(e, oe);
|
|
1168
1167
|
}, find(e, r) {
|
|
1169
1168
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1170
1169
|
}, find$(e, r) {
|
|
@@ -1178,7 +1177,7 @@ ${r}`), g2;
|
|
|
1178
1177
|
}, hasClass(e, ...r) {
|
|
1179
1178
|
return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
|
|
1180
1179
|
}, hide(e) {
|
|
1181
|
-
return v(e, (r) =>
|
|
1180
|
+
return v(e, (r) => W(r, { display: "none !important" }));
|
|
1182
1181
|
}, html(e, r, n) {
|
|
1183
1182
|
switch (true) {
|
|
1184
1183
|
case (e.is.empty && !L(r)):
|
|
@@ -1186,16 +1185,16 @@ ${r}`), g2;
|
|
|
1186
1185
|
case !L(r):
|
|
1187
1186
|
return e.node?.getHTML() ?? "";
|
|
1188
1187
|
default:
|
|
1189
|
-
let i =
|
|
1188
|
+
let i = T(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
|
|
1190
1189
|
return v(e, (f2) => (f2.textContent = n ? f2.textContent : "", f2.insertAdjacentHTML(t.at.end, i.getHTML())));
|
|
1191
1190
|
}
|
|
1192
1191
|
}, htmlFor(e, r, n = "", i = false) {
|
|
1193
1192
|
if (e.is.empty || !L(r) || !L(n)) return e;
|
|
1194
1193
|
let a = e.find$(r);
|
|
1195
1194
|
if (a.length < 1) return e;
|
|
1196
|
-
let f2 =
|
|
1197
|
-
return a.each((
|
|
1198
|
-
i || (
|
|
1195
|
+
let f2 = T(`<span>${n}</span>`);
|
|
1196
|
+
return a.each((S2) => {
|
|
1197
|
+
i || (S2.textContent = ""), S2.insertAdjacentHTML(t.at.end, f2?.getHTML());
|
|
1199
1198
|
}), e;
|
|
1200
1199
|
}, isEmpty(e) {
|
|
1201
1200
|
return !e.node;
|
|
@@ -1221,8 +1220,8 @@ ${r}`), g2;
|
|
|
1221
1220
|
for (let i of r) {
|
|
1222
1221
|
if (L(i)) {
|
|
1223
1222
|
i = i.trim();
|
|
1224
|
-
let f2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(i) :
|
|
1225
|
-
f2 = n ? f2 : H(f2), v(e, (
|
|
1223
|
+
let f2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(i) : T(i);
|
|
1224
|
+
f2 = n ? f2 : H(f2), v(e, (S2) => S2.prepend(f2.cloneNode(true)));
|
|
1226
1225
|
}
|
|
1227
1226
|
P(i) && v(e, (a) => a.prepend(n ? i : H(i))), i.isJQx && !i.is.empty && (i.collection.length > 1 && i.collection.reverse(), v(e, (a) => v(i, (f2) => a.prepend(n ? f2 : H(f2)))), i.collection.reverse());
|
|
1228
1227
|
}
|
|
@@ -1238,7 +1237,7 @@ ${r}`), g2;
|
|
|
1238
1237
|
if (u(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1239
1238
|
let i = u(r, Object) ? r : { [r]: n };
|
|
1240
1239
|
for (let [a, f2] of Object.entries(i)) {
|
|
1241
|
-
if (a = a.trim(), f2 && !
|
|
1240
|
+
if (a = a.trim(), f2 && !ne(a) || !f2) return false;
|
|
1242
1241
|
if (a.toLowerCase() === "id") return e[0].id = f2;
|
|
1243
1242
|
v(e, (y) => {
|
|
1244
1243
|
if (a.startsWith("data")) return y.dataset[a.slice(a.indexOf("-") + 1)] = f2;
|
|
@@ -1275,9 +1274,9 @@ ${r}`), g2;
|
|
|
1275
1274
|
}, replaceWith(e, r) {
|
|
1276
1275
|
return r = u(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1277
1276
|
}, setData(e, r) {
|
|
1278
|
-
return v(e, (n) =>
|
|
1277
|
+
return v(e, (n) => ie(n, r));
|
|
1279
1278
|
}, show(e) {
|
|
1280
|
-
return v(e, (r) =>
|
|
1279
|
+
return v(e, (r) => W(r, { display: "revert-layer !important" }));
|
|
1281
1280
|
}, single(e, r) {
|
|
1282
1281
|
let n = e.collection.length > 0;
|
|
1283
1282
|
switch (r = r ?? 0, true) {
|
|
@@ -1292,7 +1291,7 @@ ${r}`), g2;
|
|
|
1292
1291
|
}
|
|
1293
1292
|
}, style(e, r, n) {
|
|
1294
1293
|
return v(e, (a) => {
|
|
1295
|
-
n && u(r, String) && (r = { [r]: n || "none" }),
|
|
1294
|
+
n && u(r, String) && (r = { [r]: n || "none" }), W(a, r);
|
|
1296
1295
|
});
|
|
1297
1296
|
}, text(e, r, n = false) {
|
|
1298
1297
|
switch (true) {
|
|
@@ -1303,7 +1302,7 @@ ${r}`), g2;
|
|
|
1303
1302
|
default:
|
|
1304
1303
|
return v(e, (i) => i.textContent = n ? i.textContent + r : r);
|
|
1305
1304
|
}
|
|
1306
|
-
}, toDOM(e, r = document.body, n =
|
|
1305
|
+
}, toDOM(e, r = document.body, n = A.BeforeEnd) {
|
|
1307
1306
|
return e.isVirtual = false, I(e.collection, r, n), e;
|
|
1308
1307
|
}, toggleClass(e, r) {
|
|
1309
1308
|
return v(e, (n) => n.classList.toggle(r));
|
|
@@ -1324,16 +1323,16 @@ ${r}`), g2;
|
|
|
1324
1323
|
}
|
|
1325
1324
|
} };
|
|
1326
1325
|
}
|
|
1327
|
-
var
|
|
1326
|
+
var Te;
|
|
1328
1327
|
var ce;
|
|
1329
|
-
var { isComment: en, isText: tn, isHtmlString: rn, isArrayOfHtmlElements: nn, isArrayOfHtmlStrings: on, ElemArray2HtmlString: sn, cssRuleEdit:
|
|
1330
|
-
function
|
|
1331
|
-
return { ...
|
|
1328
|
+
var { isComment: en, isText: tn, isHtmlString: rn, isArrayOfHtmlElements: nn, isArrayOfHtmlStrings: on, ElemArray2HtmlString: sn, cssRuleEdit: Fe, addFn: Gt } = Zt();
|
|
1329
|
+
function Zt() {
|
|
1330
|
+
return { ...Xe(), addFn: Kt };
|
|
1332
1331
|
}
|
|
1333
|
-
function
|
|
1332
|
+
function Kt(t, e) {
|
|
1334
1333
|
return t = t?.trim(), !L(t) || !u(e, Function) ? w.error("JQx.fn: method invalid parameter(s)") : (ce[t] = (r, ...n) => e(r, ...n), w.log(`JQx: added extension function [${t}]`));
|
|
1335
1334
|
}
|
|
1336
|
-
function
|
|
1335
|
+
function qt(t) {
|
|
1337
1336
|
return function(e, r, n) {
|
|
1338
1337
|
if (e = e?.trim(), !L(e) || !u(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1339
1338
|
let i = n ? { get() {
|
|
@@ -1349,55 +1348,55 @@ ${r}`), g2;
|
|
|
1349
1348
|
return w.log(`JQx: added static extension function [${e}]`);
|
|
1350
1349
|
};
|
|
1351
1350
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return new Proxy(t, Object.freeze({ get: (e, r) =>
|
|
1351
|
+
function V(t) {
|
|
1352
|
+
return new Proxy(t, Object.freeze({ get: (e, r) => er(e, r, t) }));
|
|
1354
1353
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return (...r) => u(t, Function) && t(
|
|
1354
|
+
function qe(t, e) {
|
|
1355
|
+
return (...r) => u(t, Function) && t(V(e), ...r);
|
|
1357
1356
|
}
|
|
1358
|
-
function
|
|
1357
|
+
function er(t, e, r) {
|
|
1359
1358
|
switch (true) {
|
|
1360
1359
|
case u(e, Symbol):
|
|
1361
|
-
return
|
|
1360
|
+
return F({ trial: () => t[e], whenError: () => t });
|
|
1362
1361
|
case u(+e, Number):
|
|
1363
1362
|
return t.collection?.[e] || void 0;
|
|
1364
|
-
case e in
|
|
1365
|
-
return
|
|
1363
|
+
case e in Te:
|
|
1364
|
+
return qe(Te[e], r)();
|
|
1366
1365
|
case e in ce:
|
|
1367
|
-
return
|
|
1366
|
+
return qe(ce[e], r);
|
|
1368
1367
|
default:
|
|
1369
1368
|
return t[e];
|
|
1370
1369
|
}
|
|
1371
1370
|
}
|
|
1372
|
-
function
|
|
1373
|
-
let e =
|
|
1371
|
+
function rt(t) {
|
|
1372
|
+
let e = ir(t);
|
|
1374
1373
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1375
1374
|
return t;
|
|
1376
1375
|
}
|
|
1377
|
-
function
|
|
1376
|
+
function tr(t) {
|
|
1378
1377
|
return { allow(e) {
|
|
1379
1378
|
let r = /-/.test(e), n = r && e;
|
|
1380
|
-
e = r ?
|
|
1379
|
+
e = r ? z(e) : e.toLowerCase(), $.allowTag(e), Object.defineProperties(t, $e(e, true, t, n));
|
|
1381
1380
|
}, prohibit(e) {
|
|
1382
|
-
e = e.toLowerCase(), $.prohibitTag(e), Object.defineProperties(t,
|
|
1381
|
+
e = e.toLowerCase(), $.prohibitTag(e), Object.defineProperties(t, $e(e, false, t));
|
|
1383
1382
|
} };
|
|
1384
1383
|
}
|
|
1385
|
-
function
|
|
1384
|
+
function et(...t) {
|
|
1386
1385
|
if (t.length === 1) {
|
|
1387
1386
|
let e = String(t.shift().trim());
|
|
1388
1387
|
t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
|
|
1389
1388
|
}
|
|
1390
|
-
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r))
|
|
1389
|
+
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) Fe(e, { removeRule: 1 });
|
|
1391
1390
|
}
|
|
1392
|
-
function
|
|
1391
|
+
function rr(t) {
|
|
1393
1392
|
return function(e, r, n) {
|
|
1394
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(
|
|
1393
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(A).find((a) => n === a);
|
|
1395
1394
|
let i = t(e, document.createElement("br"));
|
|
1396
1395
|
if (r && !u(r, HTMLBRElement)) for (let a of i.collection) n ? r.insertAdjacentElement(n, a) : r.append(a);
|
|
1397
1396
|
return i;
|
|
1398
1397
|
};
|
|
1399
1398
|
}
|
|
1400
|
-
function
|
|
1399
|
+
function nr(...t) {
|
|
1401
1400
|
let e = {};
|
|
1402
1401
|
for (let r of t) {
|
|
1403
1402
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
@@ -1405,71 +1404,71 @@ ${r}`), g2;
|
|
|
1405
1404
|
}
|
|
1406
1405
|
return e;
|
|
1407
1406
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return t =
|
|
1407
|
+
function or(t, e, r, n) {
|
|
1408
|
+
return t = C(n || t.toLowerCase()), { get() {
|
|
1410
1409
|
return (...i) => {
|
|
1411
|
-
let a = e && r.virtual(M(
|
|
1412
|
-
return w.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${
|
|
1410
|
+
let a = e && r.virtual(M(U[t](...i))) || void 0, S2 = !u(a?.node, Comment, Text, void 0) ? ve(a) : "";
|
|
1411
|
+
return w.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), a;
|
|
1413
1412
|
};
|
|
1414
1413
|
}, enumerable: false, configurable: true };
|
|
1415
1414
|
}
|
|
1416
|
-
function
|
|
1415
|
+
function $e(t, e, r, n) {
|
|
1417
1416
|
t = t.toLowerCase();
|
|
1418
|
-
let i =
|
|
1419
|
-
return n ? { [n]: i, [
|
|
1417
|
+
let i = or(t, e, r, n);
|
|
1418
|
+
return n ? { [n]: i, [z(n)]: i } : { [t]: i, [t.toUpperCase()]: i };
|
|
1420
1419
|
}
|
|
1421
|
-
function
|
|
1422
|
-
return
|
|
1420
|
+
function ir(t) {
|
|
1421
|
+
return nr(Object.entries($.tagsRaw).reduce(sr(t), {}), dr(t));
|
|
1423
1422
|
}
|
|
1424
|
-
function
|
|
1423
|
+
function sr(t) {
|
|
1425
1424
|
return function(e, [r, n]) {
|
|
1426
|
-
return Object.defineProperties(e,
|
|
1425
|
+
return Object.defineProperties(e, $e(r, n, t)), e;
|
|
1427
1426
|
};
|
|
1428
1427
|
}
|
|
1429
|
-
function
|
|
1428
|
+
function ar(t) {
|
|
1430
1429
|
return function(e, r, ...n) {
|
|
1431
1430
|
u(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1432
1431
|
};
|
|
1433
1432
|
}
|
|
1434
|
-
function
|
|
1433
|
+
function lr(t) {
|
|
1435
1434
|
return function(e) {
|
|
1436
|
-
let { type: r, types: n, origin: i, selector: a, handler: f2, handlers:
|
|
1437
|
-
f2 =
|
|
1438
|
-
let h2 =
|
|
1435
|
+
let { type: r, types: n, origin: i, selector: a, handler: f2, handlers: S2, node: y, name: x2, capture: d, once: b2, about: m } = e;
|
|
1436
|
+
f2 = S2 || f2, r = n || r, a = i || a;
|
|
1437
|
+
let h2 = Le(r), g2 = x2;
|
|
1439
1438
|
f2 = u(f2, Function) ? [f2] : f2;
|
|
1440
1439
|
let c = { type: h2, selector: a || i, capture: d, name: g2, once: b2, node: y, about: m };
|
|
1441
1440
|
switch (true) {
|
|
1442
1441
|
case (u(h2, Array) && h2.length > 0):
|
|
1443
|
-
for (let o of h2) c.type = o,
|
|
1442
|
+
for (let o of h2) c.type = o, tt(f2, c, t);
|
|
1444
1443
|
break;
|
|
1445
1444
|
default:
|
|
1446
|
-
return
|
|
1445
|
+
return tt(f2, c, t);
|
|
1447
1446
|
}
|
|
1448
1447
|
};
|
|
1449
1448
|
}
|
|
1450
|
-
function
|
|
1449
|
+
function tt(t, e, r) {
|
|
1451
1450
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1452
1451
|
}
|
|
1453
|
-
function
|
|
1452
|
+
function ur(t) {
|
|
1454
1453
|
return function(e, r) {
|
|
1455
1454
|
return r = L(r) && r, e = L(e) && e, r && e && t.listenerStore[e][r];
|
|
1456
1455
|
};
|
|
1457
1456
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return t.activePopup || Object.defineProperty(t, "activePopup", { value:
|
|
1457
|
+
function cr(t) {
|
|
1458
|
+
return t.activePopup || Object.defineProperty(t, "activePopup", { value: K(t), enumerable: false }), t.activePopup;
|
|
1460
1459
|
}
|
|
1461
|
-
function
|
|
1462
|
-
let e = (d, b2) =>
|
|
1463
|
-
return
|
|
1460
|
+
function fr(t) {
|
|
1461
|
+
let e = (d, b2) => Fe(d, b2), r = function(d) {
|
|
1462
|
+
return k({ createWithId: d || `jqx${ae()}` });
|
|
1464
1463
|
}, n = function(...d) {
|
|
1465
|
-
for (let b2 of d)
|
|
1466
|
-
}, i =
|
|
1464
|
+
for (let b2 of d) Fe(b2);
|
|
1465
|
+
}, i = tr(t), a = q(t), f2 = lr(a);
|
|
1467
1466
|
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: i, handle: f2, capturedHandling: f2, log: (...d) => w.on.log(...d).off, warn: (...d) => w.on.warn(...d).off, error: (...d) => w.on.error(...d).off, handlerWrapper: a };
|
|
1468
1467
|
}
|
|
1469
|
-
function
|
|
1470
|
-
let { factoryExtensions: e, instanceExtensions: r } =
|
|
1471
|
-
|
|
1472
|
-
let { editCssRule: n, createStyle: i, editCssRules: a, allowProhibit: f2, handle:
|
|
1468
|
+
function dr(t) {
|
|
1469
|
+
let { factoryExtensions: e, instanceExtensions: r } = Ke(t);
|
|
1470
|
+
Te = e, ce = r;
|
|
1471
|
+
let { editCssRule: n, createStyle: i, editCssRules: a, allowProhibit: f2, handle: S2, capturedHandling: y, log: x2, warn: d, error: b2, handlerWrapper: m } = fr(t), h2 = ur(t), g2 = qt(t);
|
|
1473
1472
|
return { log: x2, warn: d, error: b2, editCssRules: a, createStyle: i, editStylesheet: i, editCssRule: n, escHtml: O, logger: w, text(c, o = false) {
|
|
1474
1473
|
return o ? t.comment(c) : document.createTextNode(c);
|
|
1475
1474
|
}, node(c, o = document) {
|
|
@@ -1481,21 +1480,21 @@ ${r}`), g2;
|
|
|
1481
1480
|
return g2(c, o, s);
|
|
1482
1481
|
};
|
|
1483
1482
|
}, get toBool() {
|
|
1484
|
-
return
|
|
1483
|
+
return Ae;
|
|
1485
1484
|
}, get getNamedListener() {
|
|
1486
1485
|
return h2;
|
|
1487
1486
|
}, get virtual() {
|
|
1488
|
-
return
|
|
1487
|
+
return rr(t);
|
|
1489
1488
|
}, get allowTag() {
|
|
1490
1489
|
return f2.allow;
|
|
1491
1490
|
}, get prohibitTag() {
|
|
1492
1491
|
return f2.prohibit;
|
|
1493
1492
|
}, get removeCssRule() {
|
|
1494
|
-
return
|
|
1493
|
+
return et;
|
|
1495
1494
|
}, get removeCssRules() {
|
|
1496
|
-
return
|
|
1495
|
+
return et;
|
|
1497
1496
|
}, get delegate() {
|
|
1498
|
-
return
|
|
1497
|
+
return ar(y);
|
|
1499
1498
|
}, get delegateCaptured() {
|
|
1500
1499
|
return y;
|
|
1501
1500
|
}, get handle() {
|
|
@@ -1503,57 +1502,57 @@ ${r}`), g2;
|
|
|
1503
1502
|
}, get listen() {
|
|
1504
1503
|
return m.listen;
|
|
1505
1504
|
}, get at() {
|
|
1506
|
-
return
|
|
1505
|
+
return A;
|
|
1507
1506
|
}, get setStyle() {
|
|
1508
1507
|
return n;
|
|
1509
1508
|
}, get fn() {
|
|
1510
|
-
return
|
|
1509
|
+
return Gt;
|
|
1511
1510
|
}, get lenient() {
|
|
1512
1511
|
return $.allowUnknownHtmlTags;
|
|
1513
1512
|
}, get IS() {
|
|
1514
1513
|
return u;
|
|
1515
1514
|
}, get Popup() {
|
|
1516
|
-
return
|
|
1515
|
+
return cr(t);
|
|
1517
1516
|
}, get listenerStore() {
|
|
1518
1517
|
return m.ListenerStore;
|
|
1519
1518
|
} };
|
|
1520
1519
|
}
|
|
1521
|
-
var
|
|
1522
|
-
function
|
|
1523
|
-
return function(e, r, n =
|
|
1520
|
+
var nt = rt(mr());
|
|
1521
|
+
function mr() {
|
|
1522
|
+
return function(e, r, n = A.BeforeEnd) {
|
|
1524
1523
|
if (e?.isJQx) return e;
|
|
1525
1524
|
let i = u(r, HTMLBRElement);
|
|
1526
|
-
r = (!i && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(
|
|
1527
|
-
let a =
|
|
1525
|
+
r = (!i && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(A).find((d) => n === d) ? n : void 0;
|
|
1526
|
+
let a = Y(e), S2 = !a && ue(e) || a, y = { collection: se(e) ?? [], isVirtual: i, isJQx: true }, x2 = _(y.collection);
|
|
1528
1527
|
if (y.collection.length && x2) return i || y.collection.forEach((d) => {
|
|
1529
1528
|
r.contains(d) || I([d], r, n);
|
|
1530
|
-
}),
|
|
1531
|
-
if (
|
|
1532
|
-
if ([e].flat().forEach((d) => y.collection.push(
|
|
1529
|
+
}), V(y);
|
|
1530
|
+
if (S2) {
|
|
1531
|
+
if ([e].flat().forEach((d) => y.collection.push(T(d))), y.collection.length > 0) {
|
|
1533
1532
|
let d = y.collection.filter((g2) => g2?.dataset?.jqxcreationerror);
|
|
1534
1533
|
y.collection = y.collection.filter((g2) => !g2?.dataset?.jqxcreationerror);
|
|
1535
1534
|
let m = y.collection.map((g2) => `${String(g2.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1536
|
-
y =
|
|
1537
|
-
let h2 = y.collection.length > 0 ?
|
|
1535
|
+
y = V(y);
|
|
1536
|
+
let h2 = y.collection.length > 0 ? Ue(y) : "sanitized: no elements remaining";
|
|
1538
1537
|
w.log(`JQx: created ${y.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${h2}`), y.isVirtual || I(y.collection, r, n);
|
|
1539
1538
|
}
|
|
1540
1539
|
return y;
|
|
1541
1540
|
}
|
|
1542
|
-
return
|
|
1541
|
+
return Ne(e, r, y), V(y);
|
|
1543
1542
|
};
|
|
1544
1543
|
}
|
|
1545
|
-
var dn =
|
|
1544
|
+
var dn = nt;
|
|
1546
1545
|
|
|
1547
1546
|
// ../Resource/Externals/ticktock.min.js
|
|
1548
|
-
var
|
|
1549
|
-
function
|
|
1550
|
-
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"], a = { fixed: { MM: { month: n }, M: { month: t }, m: { month: r }, mm: { month: e }, yyyy: { year: r }, yy: { year: e }, WD: { weekday: n }, wd: { weekday: t }, d: { day: r }, dd: { day: e }, h: { hour: r }, hh: { hour: e }, mi: { minute: r }, mmi: { minute: e }, s: { second: r }, ss: { second: e }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (
|
|
1551
|
-
let y =
|
|
1552
|
-
return a.dynamic[y] && a.dynamic[y](
|
|
1547
|
+
var M2 = ke2();
|
|
1548
|
+
function ke2() {
|
|
1549
|
+
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"], a = { fixed: { MM: { month: n }, M: { month: t }, m: { month: r }, mm: { month: e }, yyyy: { year: r }, yy: { year: e }, WD: { weekday: n }, wd: { weekday: t }, d: { day: r }, dd: { day: e }, h: { hour: r }, hh: { hour: e }, mi: { minute: r }, mmi: { minute: e }, s: { second: r }, ss: { second: e }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (l) => ({ timeZoneName: l.slice(4) }), hrc: (l) => ({ hourCycle: `h${l.slice(4)}` }), ds: (l) => ({ dateStyle: l.slice(3) }), ts: (l) => ({ timeStyle: l.slice(3) }), tz: (l) => ({ timeZone: l.slice(3) }), e: (l) => ({ era: l.slice(2) }), l: (l) => ({ locale: l.slice(2) }) } }, o = { ...a, retrieveDyn(l) {
|
|
1550
|
+
let y = l?.slice(0, l.indexOf(":"));
|
|
1551
|
+
return a.dynamic[y] && a.dynamic[y](l);
|
|
1553
1552
|
}, get re() {
|
|
1554
1553
|
return new RegExp(`\\b(${Object.keys(a.fixed).join("|")})\\b`, "g");
|
|
1555
|
-
} }, s = (
|
|
1556
|
-
let h2 = ` ${
|
|
1554
|
+
} }, s = (l = "dtf", y = 0) => {
|
|
1555
|
+
let h2 = ` ${l.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, D2 = l.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1557
1556
|
return { get texts() {
|
|
1558
1557
|
return D2;
|
|
1559
1558
|
}, formatString(d) {
|
|
@@ -1564,51 +1563,51 @@ ${r}`), g2;
|
|
|
1564
1563
|
return h2;
|
|
1565
1564
|
}, get units() {
|
|
1566
1565
|
return h2.match(o.re) || [];
|
|
1567
|
-
}, finalize(d = "",
|
|
1568
|
-
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/,
|
|
1566
|
+
}, finalize(d = "", Z2 = "", b2 = "", $3 = "") {
|
|
1567
|
+
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, b2).replace(/dp\b|~dp\b/, Z2).replace(/yn\b/, $3).replace(/\[(\d+?)]/g, (w3, Fe2) => D2[Fe2].trim()).trim();
|
|
1569
1568
|
} };
|
|
1570
|
-
}, u2 = (
|
|
1571
|
-
let D2 = c(...u2(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(
|
|
1569
|
+
}, u2 = (l) => l.replace(/\s+/g, ""), c = (...l) => l?.reduce((y, h2) => ({ ...y, ...o.retrieveDyn(h2) || o.fixed[h2] }), o.fixed.dl), i = (l, y, h2) => {
|
|
1570
|
+
let D2 = c(...u2(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(l);
|
|
1572
1571
|
return y.finalize(d);
|
|
1573
|
-
}, m = (
|
|
1574
|
-
let D2 = c(...y.units.concat(u2(h2).split(",")).flat()), d = { ...o.fixed },
|
|
1575
|
-
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy =
|
|
1572
|
+
}, m = (l, y, h2, D2) => l.toLocaleString(y, { timeZone: h2, month: D2 ? t : n }), T3 = (l, y, h2) => {
|
|
1573
|
+
let D2 = c(...y.units.concat(u2(h2).split(",")).flat()), d = { ...o.fixed }, Z2 = ($3, w3) => D2[$3] === "numeric" && w3.startsWith("0") ? w3.slice(1) : w3, b2 = Intl.DateTimeFormat(D2.locale, D2).formatToParts(l).reduce(($3, w3) => w3.type === "literal" && /[ ,/-]/.test(w3.value) ? $3 : { ...$3, [w3.type]: Z2(w3.type, w3.value) }, {});
|
|
1574
|
+
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = b2.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($3) => /^(M|MM)$/.test($3) ? m(l, D2.locale, D2.timeZone, /^M$/.test($3)) : b2[Object.keys(d[$3]).shift()] || $3), y.finalize(void 0, b2.dayPeriod, b2.era, b2.yearName);
|
|
1576
1575
|
};
|
|
1577
|
-
return (
|
|
1576
|
+
return (l, y, h2 = "l:default") => /ds:|ts:/.test(h2) ? i(l, s(void 0), h2) : T3(l, s(y || void 0), h2);
|
|
1578
1577
|
}
|
|
1579
|
-
var
|
|
1578
|
+
var le2 = Ce2;
|
|
1580
1579
|
function Ce2() {
|
|
1581
1580
|
let e = (t, a) => {
|
|
1582
1581
|
let o = isNaN(new Date(t)), s = isNaN(new Date(a));
|
|
1583
1582
|
if (s) {
|
|
1584
|
-
let [u2, c,
|
|
1585
|
-
return { error: true, message: u2, full: c, clean:
|
|
1583
|
+
let [u2, c, i] = Array(3).fill("end date not valid");
|
|
1584
|
+
return { error: true, message: u2, full: c, clean: i };
|
|
1586
1585
|
}
|
|
1587
1586
|
if (o) {
|
|
1588
|
-
let [u2, c,
|
|
1589
|
-
return { error: true, message: u2, full: c, clean:
|
|
1587
|
+
let [u2, c, i] = Array(3).fill("start date not valid");
|
|
1588
|
+
return { error: true, message: u2, full: c, clean: i };
|
|
1590
1589
|
}
|
|
1591
1590
|
if (o && !s) {
|
|
1592
|
-
let [u2, c,
|
|
1593
|
-
return { error: true, message: u2, full: c, clean:
|
|
1591
|
+
let [u2, c, i] = Array(3).fill("start- and/or end date are not valid");
|
|
1592
|
+
return { error: true, message: u2, full: c, clean: i };
|
|
1594
1593
|
}
|
|
1595
1594
|
return { error: false };
|
|
1596
1595
|
}, r = n();
|
|
1597
1596
|
return function({ start: t, end: a, diffs: o = {} } = {}) {
|
|
1598
1597
|
let s = e(t, a), u2 = a > t ? "+" : "-";
|
|
1599
1598
|
if (s.error) return s;
|
|
1600
|
-
let c = Math.abs(t - a),
|
|
1601
|
-
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T3, days:
|
|
1602
|
-
let
|
|
1603
|
-
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${
|
|
1599
|
+
let c = Math.abs(t - a), i = new Date(c), m = i.getUTCFullYear() - 1970, T3 = i.getUTCMonth(), l = i.getUTCDate() - 1, y = l % 7, h2 = Math.floor(l / 7), D2 = i.getUTCHours(), d = i.getUTCMinutes(), Z2 = i.getUTCSeconds(), b2 = i.getUTCMilliseconds(), $3 = Math.floor(c / 864e5);
|
|
1600
|
+
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: m, months: T3, days: l, hours: D2, minutes: d, seconds: Z2, milliseconds: b2, diffInDays: $3 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1601
|
+
let w3 = D2 + d + Z2 > 0 ? "T" : "";
|
|
1602
|
+
return o.clean !== "Dates are equal" && (o.sign = u2, o.jsPeriod = `${u2}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${l > 0 ? `${l}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`), o;
|
|
1604
1603
|
};
|
|
1605
1604
|
function n() {
|
|
1606
|
-
let t = (...
|
|
1607
|
-
return t(({ values:
|
|
1605
|
+
let t = (...i) => (m) => i.reduce((T3, l) => l(T3), m), a = (i, m) => i === 1 ? m.slice(0, -1) : m;
|
|
1606
|
+
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([i, m]) => m ? i : i.filter(([, T3]) => m ? +T3 : T3 > 0), (i) => i.reduce((m, [T3, l]) => [...m, `${l} ${a(l, T3)}`], []), (i) => i.length < 1 ? "Dates are equal" : `${i.slice(0, -1).join(", ")}${i.length > 1 ? " and " : ""}${i.slice(-1).shift()}`);
|
|
1608
1607
|
}
|
|
1609
1608
|
}
|
|
1610
|
-
var ie2 =
|
|
1611
|
-
function
|
|
1609
|
+
var ie2 = Ae2;
|
|
1610
|
+
function Ae2() {
|
|
1612
1611
|
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) {
|
|
1613
1612
|
let a = t.length === 1;
|
|
1614
1613
|
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) {
|
|
@@ -1629,38 +1628,44 @@ ${r}`), g2;
|
|
|
1629
1628
|
}), t;
|
|
1630
1629
|
};
|
|
1631
1630
|
}
|
|
1632
|
-
var
|
|
1633
|
-
var
|
|
1634
|
-
var
|
|
1635
|
-
var
|
|
1636
|
-
var
|
|
1637
|
-
function q2(e,
|
|
1638
|
-
|
|
1631
|
+
var ge2 = le2();
|
|
1632
|
+
var ye2 = Ye2();
|
|
1633
|
+
var N = ie2();
|
|
1634
|
+
var We2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1635
|
+
var he2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
1636
|
+
function q2(e, r = false) {
|
|
1637
|
+
let n = e.month + 1, t = e.month;
|
|
1638
|
+
if (e.month += r ? -1 : 1, !r && e.month >= n) for (; e.month > n; ) e.dateNr -= 1;
|
|
1639
|
+
if (r && e.month === t) for (; e.month >= t; ) e.dateNr -= 1;
|
|
1640
|
+
return e;
|
|
1639
1641
|
}
|
|
1640
|
-
function
|
|
1641
|
-
|
|
1642
|
+
function H2(e, ...r) {
|
|
1643
|
+
return N(e, ...r), e;
|
|
1644
|
+
}
|
|
1645
|
+
function De2(e, r = false) {
|
|
1646
|
+
let n = Q2(e.clone, { sunday: r }), t = [n];
|
|
1642
1647
|
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a, o) => n.clone.addDays(o + 1))) };
|
|
1643
1648
|
}
|
|
1644
1649
|
function W2(e, { start: r, end: n, future: t, past: a, include: o = { start: false, end: false } } = {}) {
|
|
1645
1650
|
let s = e.clone.UTC;
|
|
1646
1651
|
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.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);
|
|
1647
1652
|
}
|
|
1648
|
-
function
|
|
1649
|
-
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : g.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = g),
|
|
1653
|
+
function _2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
|
|
1654
|
+
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : g.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = g), M2(e, n, t)) : Ue2(e, n, t);
|
|
1650
1655
|
}
|
|
1651
|
-
function
|
|
1656
|
+
function Ue2(e, r, n) {
|
|
1652
1657
|
let t = e.clone.relocate(g);
|
|
1653
|
-
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions,
|
|
1658
|
+
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, M2(t, r, n);
|
|
1654
1659
|
}
|
|
1655
|
-
function
|
|
1656
|
-
let n =
|
|
1660
|
+
function Te2(e, r) {
|
|
1661
|
+
let n = ge2({ start: e, end: r || e });
|
|
1657
1662
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1658
1663
|
}
|
|
1659
|
-
function _2(e, r = false) {
|
|
1660
|
-
let { locale: n, timeZone: t } = r ? e.localeInfo : g, a = ae2(n, t), o = e.format("MM|WD", a).split("|");
|
|
1661
|
-
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: oe2(n), monthNames: Y2(n) };
|
|
1662
|
-
}
|
|
1663
1664
|
function G2(e, r = false) {
|
|
1665
|
+
let { locale: n, timeZone: t } = r ? e.localeInfo : g, a = se2(n, t), o = e.format("MM|WD", a).split("|");
|
|
1666
|
+
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: ae2(n), monthNames: Y2(n) };
|
|
1667
|
+
}
|
|
1668
|
+
function B2(e, r = false) {
|
|
1664
1669
|
let [n, t, a, o] = U2(e, r), u2 = { values4Timezone: r ? g.timeZone : e.timeZone, hours: n, minutes: t, seconds: a, milliseconds: o };
|
|
1665
1670
|
return Object.freeze(u2);
|
|
1666
1671
|
}
|
|
@@ -1668,87 +1673,87 @@ ${r}`), g2;
|
|
|
1668
1673
|
let t = `l:en-CA,${r ? `tz:${g.timeZone}` : `tz:${e.timeZone}`},hrc:23,ts:medium`;
|
|
1669
1674
|
return e.format("", t).split(/:/).map(Number).concat(e.getMilliseconds());
|
|
1670
1675
|
}
|
|
1671
|
-
function
|
|
1676
|
+
function J2(e, r) {
|
|
1672
1677
|
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t, a, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
|
|
1673
1678
|
a -= 1;
|
|
1674
1679
|
let s = r ? g.timeZone : e.timeZone;
|
|
1675
1680
|
return Object.freeze({ values4Timezone: s, year: t, month: a, date: o });
|
|
1676
1681
|
}
|
|
1677
|
-
function
|
|
1682
|
+
function K2(e, r = true) {
|
|
1678
1683
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
|
|
1679
1684
|
let n = e.format("yyyy-m-d", e.localeInfo.formatOptions).split(/-/).map(Number);
|
|
1680
1685
|
return n[1] -= 1, n;
|
|
1681
1686
|
}
|
|
1682
|
-
function
|
|
1683
|
-
let r = new Intl.Locale(e.
|
|
1684
|
-
return n = n === 7 ? 0 : n,
|
|
1687
|
+
function Le2(e) {
|
|
1688
|
+
let r = new Intl.Locale(e.locale), n = r.weekInfo ? r.weekInfo.firstDay : r.getWeekInfo ? r.getWeekInfo().firstDay : 1;
|
|
1689
|
+
return n = n === 7 ? 0 : n, he2[n];
|
|
1685
1690
|
}
|
|
1686
|
-
function
|
|
1687
|
-
let n = r ? "sunday" :
|
|
1691
|
+
function Q2(e, { sunday: r = false } = {}) {
|
|
1692
|
+
let n = r ? "sunday" : Le2(e);
|
|
1688
1693
|
return x(e, { day: n, preserveTodayWhenEqual: true });
|
|
1689
1694
|
}
|
|
1690
|
-
function
|
|
1695
|
+
function xe2(e, r) {
|
|
1691
1696
|
let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
|
|
1692
1697
|
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);
|
|
1693
1698
|
}
|
|
1694
|
-
function
|
|
1695
|
-
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(
|
|
1696
|
-
let n =
|
|
1699
|
+
function R2({ start: e, end: r } = {}) {
|
|
1700
|
+
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(fe(e, e.timeZone), { timeZone: e.timeZone }), r = f(fe(r, r.timeZone), { timeZone: r.timeZone });
|
|
1701
|
+
let n = ge2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = xe2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((i) => Math.abs(i)), [u2, c] = [`${o} ${C2(o, "hour")}`, `${s} ${C2(s, "minute")}`];
|
|
1697
1702
|
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u2}${s > 0 ? ` and ${c}` : ""} ${a} ${r.timeZone}`, n;
|
|
1698
1703
|
}
|
|
1699
|
-
function
|
|
1704
|
+
function X2(e, r) {
|
|
1700
1705
|
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : f(e.value, { timeZone: r.timeZone || g.timeZone });
|
|
1701
|
-
let t =
|
|
1702
|
-
return { fromTZ: e.timeZone, toTZ: r.timeZone, offset: o, offsetText: `${r.timeZone} ${
|
|
1706
|
+
let t = R2({ start: e.clone, end: r }), o = `${t.sign}${ce2(t.hours)}:${ce2(t.minutes)}`;
|
|
1707
|
+
return { fromTZ: e.timeZone, toTZ: r.timeZone, offset: o, offsetText: `${r.timeZone} ${je2(o)} ${e.timeZone}` };
|
|
1703
1708
|
}
|
|
1704
|
-
function
|
|
1709
|
+
function ce2(e, r = 2) {
|
|
1705
1710
|
return `${e}`.padStart(r, "0");
|
|
1706
1711
|
}
|
|
1707
|
-
function
|
|
1712
|
+
function C2(e, r) {
|
|
1708
1713
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1709
1714
|
}
|
|
1710
|
-
function
|
|
1715
|
+
function je2(e) {
|
|
1711
1716
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1712
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r, a =
|
|
1717
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = C2(n, "hour"), o = C2(t, "minute"), s = e.startsWith("+");
|
|
1713
1718
|
return t > 0 ? `${n} ${a} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a} ${s ? "ahead of" : "behind"}`;
|
|
1714
1719
|
}
|
|
1715
|
-
function
|
|
1720
|
+
function me(e, r, n) {
|
|
1716
1721
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1717
1722
|
}
|
|
1718
|
-
function
|
|
1719
|
-
if (r) return t ?
|
|
1723
|
+
function pe2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1724
|
+
if (r) return t ? me(e, r, $D.localeInformation.formatOptions) : me(e, r, n);
|
|
1720
1725
|
let a = e.clone.relocate({ locale: "en" }), o = t ? g.formatOptions : a.localeInfo.formatOptions, u2 = `wd M dd yyyy hh:mmi:ss ${a.format("tz", o + ",tzn:longOffset").replace(":", "")} (tz)`;
|
|
1721
1726
|
return a.format(u2, o + ",tzn:long, hrc:23");
|
|
1722
1727
|
}
|
|
1723
|
-
function
|
|
1728
|
+
function ee2(e, r = false) {
|
|
1724
1729
|
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : g.timeZone, weekday: "short" });
|
|
1725
|
-
return
|
|
1730
|
+
return ye2(n.format(e));
|
|
1726
1731
|
}
|
|
1727
|
-
function
|
|
1728
|
-
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u2 = n, c = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`),
|
|
1729
|
-
return n.timeZone !== r.timeZone && (m.locales.remote = { locale: u2.locale, timeZone: u2.timeZone }, m.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr:
|
|
1732
|
+
function $e2(e) {
|
|
1733
|
+
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u2 = n, c = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), i = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), m = { 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 } };
|
|
1734
|
+
return n.timeZone !== r.timeZone && (m.locales.remote = { locale: u2.locale, timeZone: u2.timeZone }, m.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: ee2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: c, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, m.offset.fromUserTime = o.offsetText), m;
|
|
1730
1735
|
}
|
|
1731
|
-
function
|
|
1736
|
+
function O2(e, r = true) {
|
|
1732
1737
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
|
|
1733
1738
|
let n = e.format("yyyy-m-d-hh-mmi-ss", `${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());
|
|
1734
1739
|
return n[1] -= 1, n;
|
|
1735
1740
|
}
|
|
1736
|
-
function
|
|
1741
|
+
function te2(e) {
|
|
1737
1742
|
return new Date(e.year, e.month + 1, 0, 0, 0, 0).getDate();
|
|
1738
1743
|
}
|
|
1739
1744
|
function L2(e, r) {
|
|
1740
1745
|
r = p({ locale: r || e.localeInfo.locale }).locale;
|
|
1741
1746
|
let n = e.clone.relocate({ locale: r });
|
|
1742
|
-
return n.date = { date: 1 }, [n].concat([...Array(
|
|
1747
|
+
return n.date = { date: 1 }, [n].concat([...Array(te2(n) - 1)].map((t, a) => n.clone.add(`${a + 1} days`)));
|
|
1743
1748
|
}
|
|
1744
1749
|
function x(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
|
|
1745
1750
|
r = r?.toLowerCase() || "-";
|
|
1746
|
-
let a =
|
|
1751
|
+
let a = ye2(r);
|
|
1747
1752
|
if (a < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1748
1753
|
let o = n ? 1 : -1, s = f(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1749
|
-
return t && a === s.day ? s :
|
|
1754
|
+
return t && a === s.day ? s : Pe2(s.addDays(n ? 1 : -1), a, o);
|
|
1750
1755
|
}
|
|
1751
|
-
function
|
|
1756
|
+
function Pe2(e, r, n) {
|
|
1752
1757
|
function t(a) {
|
|
1753
1758
|
switch (true) {
|
|
1754
1759
|
case a.day === r:
|
|
@@ -1763,27 +1768,27 @@ ${r}`), g2;
|
|
|
1763
1768
|
let { locale: t, timeZone: a } = e.localeInfo;
|
|
1764
1769
|
return r ? new Date(e).toLocaleDateString(t, { timeZone: a }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a }) : new Date(e).toLocaleString(t, { timeZone: a });
|
|
1765
1770
|
}
|
|
1766
|
-
function
|
|
1771
|
+
function fe(e, r) {
|
|
1767
1772
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
1768
1773
|
return new Date(new Date(e).toLocaleString("en", n));
|
|
1769
1774
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return
|
|
1775
|
+
function v2(e, { year: r, month: n, date: t } = {}) {
|
|
1776
|
+
return S(r) && e.setFullYear(parseInt(r)), S(t) && e.setDate(parseInt(t)), S(n) && e.setMonth(parseInt(n)), e;
|
|
1772
1777
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1778
|
+
function I2(e, { hours: r, minutes: n, seconds: t, milliseconds: a } = {}) {
|
|
1779
|
+
return S(r) && e.setHours(parseInt(r)), S(n) && e.setMinutes(parseInt(n)), S(t) && e.setSeconds(parseInt(t)), S(a) && e.setMilliseconds(parseInt(a)), e;
|
|
1775
1780
|
}
|
|
1776
|
-
function
|
|
1781
|
+
function we2(e) {
|
|
1777
1782
|
return e?.constructor === Date || e?.value;
|
|
1778
1783
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return
|
|
1784
|
+
function re2(e, r) {
|
|
1785
|
+
return we2(r) ? f(r?.value || r, e.localeInfo) : f.from(...e.dateTimeValues).relocate(e.localeInfo);
|
|
1781
1786
|
}
|
|
1782
|
-
function
|
|
1787
|
+
function Ye2() {
|
|
1783
1788
|
return function(e) {
|
|
1784
1789
|
e = `${e}`.toLowerCase();
|
|
1785
|
-
let r =
|
|
1786
|
-
return r < 0 ?
|
|
1790
|
+
let r = We2.indexOf(e);
|
|
1791
|
+
return r < 0 ? he2.indexOf(e) : r;
|
|
1787
1792
|
};
|
|
1788
1793
|
}
|
|
1789
1794
|
function A2(e) {
|
|
@@ -1793,12 +1798,12 @@ ${r}`), g2;
|
|
|
1793
1798
|
function Se2(e) {
|
|
1794
1799
|
return e.time = { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }, e;
|
|
1795
1800
|
}
|
|
1796
|
-
function
|
|
1801
|
+
function de(e, r) {
|
|
1797
1802
|
return Intl.DateTimeFormat("en-CA", { timeZone: r, timeZoneName: "long" }).format(e).split(/,/)[1].trim();
|
|
1798
1803
|
}
|
|
1799
1804
|
function j2(e, r) {
|
|
1800
1805
|
r = r || e?.timeZone || g.timeZone, e = e?.value ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r });
|
|
1801
|
-
let n = e.year || e.getFullYear(), t =
|
|
1806
|
+
let n = e.year || e.getFullYear(), t = de(new Date(n, 0, 1), r), a = de(new Date(n, 5, 1), r);
|
|
1802
1807
|
return t !== a;
|
|
1803
1808
|
}
|
|
1804
1809
|
function P2(e, r) {
|
|
@@ -1807,14 +1812,14 @@ ${r}`), g2;
|
|
|
1807
1812
|
function Ze2(e, { locale: r, timeZone: n, l: t, tz: a } = {}) {
|
|
1808
1813
|
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone: a || n || e.tz || e.timeZone }), e;
|
|
1809
1814
|
}
|
|
1810
|
-
function
|
|
1811
|
-
return
|
|
1815
|
+
function be2(e, r) {
|
|
1816
|
+
return we2(r) && (e = f(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
1812
1817
|
}
|
|
1813
|
-
function
|
|
1814
|
-
let n =
|
|
1815
|
-
return n === 1 ?
|
|
1818
|
+
function k2(e, r) {
|
|
1819
|
+
let n = oe2(new Date(e, 11, r || 31));
|
|
1820
|
+
return n === 1 ? k2(e, (r || 31) - 1) : n;
|
|
1816
1821
|
}
|
|
1817
|
-
function
|
|
1822
|
+
function ne2(e, r) {
|
|
1818
1823
|
let n = e.month;
|
|
1819
1824
|
switch (true) {
|
|
1820
1825
|
case n < 3:
|
|
@@ -1829,34 +1834,34 @@ ${r}`), g2;
|
|
|
1829
1834
|
return "unknown";
|
|
1830
1835
|
}
|
|
1831
1836
|
}
|
|
1832
|
-
function
|
|
1837
|
+
function oe2(e) {
|
|
1833
1838
|
let r = new Date(e), n = (r.getDay() + 6) % 7;
|
|
1834
1839
|
r.setDate(r.getDate() - n + 3);
|
|
1835
1840
|
let t = r.valueOf();
|
|
1836
1841
|
return r.setMonth(0, 1), r.getDay() !== 4 && r.setMonth(0, 1 + (4 - r.getDay() + 7) % 7), 1 + Math.ceil((t - r) / 6048e5);
|
|
1837
1842
|
}
|
|
1838
|
-
var E =
|
|
1839
|
-
function
|
|
1843
|
+
var E = Ee2;
|
|
1844
|
+
function Ee2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1840
1845
|
let t, a = { add(...o) {
|
|
1841
|
-
return
|
|
1846
|
+
return H2(t, ...o);
|
|
1842
1847
|
}, between({ start: o, end: s, include: u2 } = {}) {
|
|
1843
1848
|
return W2(t, { start: o, end: s, include: u2 });
|
|
1844
1849
|
}, cloneWith(o) {
|
|
1845
|
-
return
|
|
1850
|
+
return re2(t, o);
|
|
1846
1851
|
}, daysUntil(o) {
|
|
1847
|
-
return
|
|
1852
|
+
return Te2(t, o);
|
|
1848
1853
|
}, differenceTo(o) {
|
|
1849
|
-
return
|
|
1854
|
+
return R2({ start: t, end: o });
|
|
1850
1855
|
}, differenceUntil(o) {
|
|
1851
1856
|
return t.differenceTo(o).clean;
|
|
1852
1857
|
}, firstWeekday({ sunday: o = false, midnight: s = false } = {}) {
|
|
1853
|
-
return
|
|
1858
|
+
return Q2(t, { sunday: o, midnight: s });
|
|
1854
1859
|
}, format(o, s) {
|
|
1855
|
-
return
|
|
1860
|
+
return _2(t, { formatStr: o, moreOptions: s });
|
|
1856
1861
|
}, fullMonth(o) {
|
|
1857
1862
|
return L2(t, o);
|
|
1858
1863
|
}, fullWeek(o = false) {
|
|
1859
|
-
return
|
|
1864
|
+
return De2(t, !!o);
|
|
1860
1865
|
}, isFuture(o) {
|
|
1861
1866
|
return W2(t, { start: t, end: o, future: true });
|
|
1862
1867
|
}, isPast(o) {
|
|
@@ -1864,69 +1869,69 @@ ${r}`), g2;
|
|
|
1864
1869
|
}, next(o, s) {
|
|
1865
1870
|
return x(t, { day: o, next: true, preserveTodayWhenEqual: !!s });
|
|
1866
1871
|
}, offsetFrom(o) {
|
|
1867
|
-
return
|
|
1872
|
+
return X2(t, o);
|
|
1868
1873
|
}, previous(o, s) {
|
|
1869
1874
|
return x(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
|
|
1870
1875
|
}, relocate({ locale: o, timeZone: s, l: u2, tz: c } = {}) {
|
|
1871
1876
|
return Ze2(t, { locale: o, timeZone: s, l: u2, tz: c });
|
|
1872
1877
|
}, revalue(o) {
|
|
1873
|
-
return t =
|
|
1878
|
+
return t = be2(t, o), t;
|
|
1874
1879
|
}, setDateValues({ year: o, month: s, date: u2 } = {}) {
|
|
1875
|
-
return
|
|
1880
|
+
return v2(t, { year: o, month: s, date: u2 });
|
|
1876
1881
|
}, setTimeValues({ hours: o, minutes: s, seconds: u2, milliseconds: c } = {}) {
|
|
1877
|
-
return
|
|
1882
|
+
return I2(t, { hours: o, minutes: s, seconds: u2, milliseconds: c });
|
|
1878
1883
|
}, subtract(...o) {
|
|
1879
|
-
return
|
|
1884
|
+
return H2(t, "subtract," + o.join(","));
|
|
1880
1885
|
}, toArray(o = false) {
|
|
1881
|
-
return
|
|
1886
|
+
return O2(t, o);
|
|
1882
1887
|
}, toString({ template: o, formatOptions: s, local: u2 } = {}) {
|
|
1883
|
-
return
|
|
1888
|
+
return pe2(t, { withFormat: o, withFormatOptions: s, local: u2 });
|
|
1884
1889
|
}, values(o = false) {
|
|
1885
1890
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1886
1891
|
}, zoneFormat(o, s) {
|
|
1887
|
-
return
|
|
1892
|
+
return _2(t, { zoneTime: true, formatStr: o, moreOptions: s });
|
|
1888
1893
|
}, set date({ year: o, month: s, date: u2 }) {
|
|
1889
|
-
|
|
1894
|
+
v2(t, { year: o, month: s, date: u2 });
|
|
1890
1895
|
}, set dateNr(o) {
|
|
1891
|
-
|
|
1896
|
+
v2(t, { date: o });
|
|
1892
1897
|
}, set hours(o) {
|
|
1893
|
-
|
|
1898
|
+
I2(t, { hours: o });
|
|
1894
1899
|
}, set localeInfo({ locale: o, timeZone: s, l: u2, tz: c }) {
|
|
1895
|
-
e =
|
|
1900
|
+
e = z2({ locale: o, timeZone: s, l: u2, tz: c });
|
|
1896
1901
|
}, set milliseconds(o) {
|
|
1897
|
-
|
|
1902
|
+
I2(t, { milliseconds: `${o}` });
|
|
1898
1903
|
}, set minutes(o) {
|
|
1899
|
-
|
|
1904
|
+
I2(t, { minutes: o });
|
|
1900
1905
|
}, set month(o) {
|
|
1901
|
-
|
|
1906
|
+
v2(t, { month: o });
|
|
1902
1907
|
}, set seconds(o) {
|
|
1903
|
-
|
|
1908
|
+
I2(t, { seconds: o });
|
|
1904
1909
|
}, set time({ hours: o, minutes: s, seconds: u2, milliseconds: c }) {
|
|
1905
|
-
|
|
1910
|
+
I2(t, { hours: o, minutes: s, seconds: u2, milliseconds: c });
|
|
1906
1911
|
}, set year(o) {
|
|
1907
|
-
|
|
1912
|
+
v2(t, { year: o });
|
|
1908
1913
|
}, get age() {
|
|
1909
1914
|
return t.differenceTo(/* @__PURE__ */ new Date()).years;
|
|
1910
1915
|
}, get ageFull() {
|
|
1911
1916
|
return t.differenceTo(/* @__PURE__ */ new Date()).clean;
|
|
1912
1917
|
}, get clone() {
|
|
1913
|
-
return
|
|
1918
|
+
return re2(t);
|
|
1914
1919
|
}, get date() {
|
|
1915
|
-
return
|
|
1920
|
+
return J2(t, true);
|
|
1916
1921
|
}, get dateNr() {
|
|
1917
1922
|
return t.date.date;
|
|
1918
1923
|
}, get dateTime() {
|
|
1919
1924
|
return { ...t.date, ...t.time };
|
|
1920
1925
|
}, get dateTimeValues() {
|
|
1921
|
-
return
|
|
1926
|
+
return O2(t, true);
|
|
1922
1927
|
}, get dateValues() {
|
|
1923
|
-
return
|
|
1928
|
+
return K2(t, true);
|
|
1924
1929
|
}, get day() {
|
|
1925
1930
|
return t.getDay();
|
|
1926
1931
|
}, get dayName() {
|
|
1927
1932
|
return t.names.dayName;
|
|
1928
1933
|
}, get daysThisMonth() {
|
|
1929
|
-
return
|
|
1934
|
+
return te2(t);
|
|
1930
1935
|
}, get DSTActive() {
|
|
1931
1936
|
return P2(t);
|
|
1932
1937
|
}, get hasDST() {
|
|
@@ -1934,7 +1939,7 @@ ${r}`), g2;
|
|
|
1934
1939
|
}, get hours() {
|
|
1935
1940
|
return t.time.hours;
|
|
1936
1941
|
}, get info() {
|
|
1937
|
-
return
|
|
1942
|
+
return $e2(t);
|
|
1938
1943
|
}, get isLeapYear() {
|
|
1939
1944
|
return new Date(t.getFullYear(), 2, 0).getDate() === 29;
|
|
1940
1945
|
}, get ISO() {
|
|
@@ -1944,7 +1949,7 @@ ${r}`), g2;
|
|
|
1944
1949
|
}, get localDate() {
|
|
1945
1950
|
return F2(t, { dateOnly: true });
|
|
1946
1951
|
}, get locale() {
|
|
1947
|
-
return (e ||
|
|
1952
|
+
return (e || z2()).locale;
|
|
1948
1953
|
}, get localeInfo() {
|
|
1949
1954
|
return e;
|
|
1950
1955
|
}, get localeString() {
|
|
@@ -1960,21 +1965,21 @@ ${r}`), g2;
|
|
|
1960
1965
|
}, get monthName() {
|
|
1961
1966
|
return t.names.monthName;
|
|
1962
1967
|
}, get names() {
|
|
1963
|
-
return
|
|
1968
|
+
return G2(t);
|
|
1964
1969
|
}, get quarter() {
|
|
1965
|
-
return
|
|
1970
|
+
return ne2(t);
|
|
1966
1971
|
}, get quarterNr() {
|
|
1967
|
-
return
|
|
1972
|
+
return ne2(t, true);
|
|
1968
1973
|
}, get removeTime() {
|
|
1969
1974
|
return Se2(t);
|
|
1970
1975
|
}, get seconds() {
|
|
1971
1976
|
return t.time.seconds;
|
|
1972
1977
|
}, get time() {
|
|
1973
|
-
return
|
|
1978
|
+
return B2(t, true);
|
|
1974
1979
|
}, get timeValues() {
|
|
1975
1980
|
return U2(t, true);
|
|
1976
1981
|
}, get timeZone() {
|
|
1977
|
-
return (e ||
|
|
1982
|
+
return (e || z2()).timeZone;
|
|
1978
1983
|
}, get unixEpochTimestamp() {
|
|
1979
1984
|
return Math.floor(+t / 1e3);
|
|
1980
1985
|
}, get userLocaleInfo() {
|
|
@@ -1982,27 +1987,27 @@ ${r}`), g2;
|
|
|
1982
1987
|
}, get UTC() {
|
|
1983
1988
|
return t.clone.relocate({ locale: t.locale, timeZone: "UTC" });
|
|
1984
1989
|
}, get UTCOffset() {
|
|
1985
|
-
return
|
|
1990
|
+
return X2(t, "UTC");
|
|
1986
1991
|
}, get value() {
|
|
1987
1992
|
return new Date(t);
|
|
1988
1993
|
}, get weeknr() {
|
|
1989
|
-
return
|
|
1994
|
+
return oe2(t);
|
|
1990
1995
|
}, get weeksInYear() {
|
|
1991
|
-
return
|
|
1996
|
+
return k2(t.year, 31);
|
|
1992
1997
|
}, get year() {
|
|
1993
1998
|
return t.date.year;
|
|
1994
1999
|
}, get zoneDate() {
|
|
1995
|
-
return
|
|
2000
|
+
return J2(t, false);
|
|
1996
2001
|
}, get zoneDateNr() {
|
|
1997
2002
|
return t.zoneDate.date;
|
|
1998
2003
|
}, get zoneDateTime() {
|
|
1999
2004
|
return { ...t.zoneDate, ...t.zoneTime };
|
|
2000
2005
|
}, get zoneDateTimeValues() {
|
|
2001
|
-
return
|
|
2006
|
+
return O2(t, false);
|
|
2002
2007
|
}, get zoneDateValues() {
|
|
2003
|
-
return
|
|
2008
|
+
return K2(t, false);
|
|
2004
2009
|
}, get zoneDay() {
|
|
2005
|
-
return
|
|
2010
|
+
return ee2(t, true);
|
|
2006
2011
|
}, get zoneDayname() {
|
|
2007
2012
|
return t.zoneNames.dayName;
|
|
2008
2013
|
}, get zoneHours() {
|
|
@@ -2014,11 +2019,11 @@ ${r}`), g2;
|
|
|
2014
2019
|
}, get zoneMonthname() {
|
|
2015
2020
|
return t.zoneNames.monthName;
|
|
2016
2021
|
}, get zoneNames() {
|
|
2017
|
-
return
|
|
2022
|
+
return G2(t, true);
|
|
2018
2023
|
}, get zoneSeconds() {
|
|
2019
2024
|
return t.zoneTime.seconds;
|
|
2020
2025
|
}, get zoneTime() {
|
|
2021
|
-
return
|
|
2026
|
+
return B2(t);
|
|
2022
2027
|
}, get zoneTimeValues() {
|
|
2023
2028
|
return U2(t);
|
|
2024
2029
|
}, get zoneYear() {
|
|
@@ -2026,27 +2031,27 @@ ${r}`), g2;
|
|
|
2026
2031
|
}, get zoneValues() {
|
|
2027
2032
|
return t.zoneDateTime;
|
|
2028
2033
|
}, get zoneArray() {
|
|
2029
|
-
return
|
|
2034
|
+
return O2(t, false);
|
|
2030
2035
|
} };
|
|
2031
|
-
return !e && !n ? a : (a.localeInfo = e ||
|
|
2036
|
+
return !e && !n ? a : (a.localeInfo = e || z2(), t = new Proxy(n, Ve2(a)), Object.entries(Object.getOwnPropertyDescriptors(ue2(t, r))).forEach(([o, s]) => Object.defineProperty(a, o, s)), Object.freeze(t));
|
|
2032
2037
|
}
|
|
2033
|
-
function
|
|
2038
|
+
function Ve2(e) {
|
|
2034
2039
|
return { get(r, n) {
|
|
2035
2040
|
return n !== "toString" && n in r ? r[n].bind(r) : Reflect.get(e, n);
|
|
2036
2041
|
}, set(r, n, t) {
|
|
2037
2042
|
return n in e && Reflect.set(e, n, t);
|
|
2038
2043
|
} };
|
|
2039
2044
|
}
|
|
2040
|
-
var g =
|
|
2041
|
-
var
|
|
2042
|
-
function
|
|
2045
|
+
var g = Me2(Intl.DateTimeFormat().resolvedOptions());
|
|
2046
|
+
var qe2 = Object.getOwnPropertyNames(Date.prototype).filter((e) => e.startsWith("set")).reduce((e, r) => [...e, { native: r, syn: "change" + r.slice(3) }], []);
|
|
2047
|
+
function ae2(e = "en-GB") {
|
|
2043
2048
|
return e = p({ 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" })) };
|
|
2044
2049
|
}
|
|
2045
2050
|
function Y2(e = "en") {
|
|
2046
2051
|
return e = p({ 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" })) };
|
|
2047
2052
|
}
|
|
2048
|
-
function
|
|
2049
|
-
e =
|
|
2053
|
+
function He2({ year: e, locale: r } = {}) {
|
|
2054
|
+
e = S(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
|
|
2050
2055
|
let n = { year: e, calendar: {} }, t = Y2().long.map((a) => a.toLowerCase());
|
|
2051
2056
|
for (let a = 0; a < 12; a += 1) {
|
|
2052
2057
|
let o = f.from(e, a, 1);
|
|
@@ -2054,49 +2059,49 @@ ${r}`), g2;
|
|
|
2054
2059
|
}
|
|
2055
2060
|
return n;
|
|
2056
2061
|
}
|
|
2057
|
-
function
|
|
2058
|
-
e =
|
|
2062
|
+
function _e2({ year: e, monthNr: r, locale: n = "en-CA" } = {}) {
|
|
2063
|
+
e = S(r) && parseInt(e) || -1, r = S(r) && parseInt(r) || (/* @__PURE__ */ new Date()).getFullYear();
|
|
2059
2064
|
let t = r >= 1 && r <= 12;
|
|
2060
2065
|
return n = p({ locale: n }).locale, r = t ? r - 1 : void 0, t ? f.from(e, r, 1).relocate({ locale: n }).fullMonth(n) : "MonthNr should be a specific number (1 = january - 12 = december)";
|
|
2061
2066
|
}
|
|
2062
|
-
function
|
|
2063
|
-
let r =
|
|
2067
|
+
function Me2(e) {
|
|
2068
|
+
let r = se2(e.locale, e.timeZone), n = new Intl.Locale(e.locale);
|
|
2064
2069
|
return e.weekInfo = n.getWeekInfo ? n.getWeekInfo() : null, Object.defineProperty(e, "formatOptions", { value: r, enumerable: false });
|
|
2065
2070
|
}
|
|
2066
|
-
function
|
|
2071
|
+
function se2(e, r) {
|
|
2067
2072
|
return [`${e && !(Array.isArray(e) && e.length < 1) ? `l:${e}` : ""}`, `${r ? `tz:${r}` : ""}`].filter((n) => n).join(",");
|
|
2068
2073
|
}
|
|
2069
2074
|
function p({ locale: e, timeZone: r, l: n, tz: t } = {}) {
|
|
2070
|
-
return r = r || t, e = e || n, e =
|
|
2075
|
+
return r = r || t, e = e || n, e = Ie2({ trial: function() {
|
|
2071
2076
|
return Intl.DateTimeFormat(e, { timeZone: g.timeZone }).resolvedOptions().locale;
|
|
2072
2077
|
}, onError: function() {
|
|
2073
2078
|
return console.warn(`Intl locale "${e}" best fit impossible, using "${g.locale}"`), g.locale;
|
|
2074
|
-
} }), r =
|
|
2079
|
+
} }), r = Ie2({ trial: function() {
|
|
2075
2080
|
return Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions().timeZone;
|
|
2076
2081
|
}, onError: function() {
|
|
2077
2082
|
return console.warn(`timeZone "${r}" not valid. Using "${g.timeZone}"`), g.timeZone;
|
|
2078
|
-
} }),
|
|
2083
|
+
} }), Me2(Intl.DateTimeFormat(e, { timeZone: r }).resolvedOptions());
|
|
2079
2084
|
}
|
|
2080
|
-
function
|
|
2085
|
+
function z2({ locale: e, timeZone: r, l: n, tz: t } = {}) {
|
|
2081
2086
|
return p({ locale: e, timeZone: r, l: n, tz: t }, true);
|
|
2082
2087
|
}
|
|
2083
|
-
function
|
|
2084
|
-
return !Number.isNaN(+e) && e?.constructor === Date
|
|
2088
|
+
function Ne2(e) {
|
|
2089
|
+
return !Number.isNaN(+e) && e?.constructor === Date ? e : /* @__PURE__ */ new Date();
|
|
2085
2090
|
}
|
|
2086
|
-
function
|
|
2091
|
+
function ve2(e) {
|
|
2087
2092
|
let r = /* @__PURE__ */ new Date();
|
|
2088
2093
|
switch (true) {
|
|
2089
|
-
case e
|
|
2090
|
-
return
|
|
2094
|
+
case (typeof e == "string" || typeof e == "number"):
|
|
2095
|
+
return Ne2(new Date(e));
|
|
2091
2096
|
case (Array.isArray(e) && e.map(Number).length === e.length):
|
|
2092
2097
|
return e.length === 1 ? new Date(e[0], 0, 1) : new Date(...e);
|
|
2093
2098
|
case e?.constructor === Date:
|
|
2094
|
-
return
|
|
2099
|
+
return Ne2(e);
|
|
2095
2100
|
default:
|
|
2096
2101
|
return r;
|
|
2097
2102
|
}
|
|
2098
2103
|
}
|
|
2099
|
-
function
|
|
2104
|
+
function Ie2({ trial: e, onError: r = () => {
|
|
2100
2105
|
} } = {}) {
|
|
2101
2106
|
if (e?.constructor === Function) try {
|
|
2102
2107
|
return e();
|
|
@@ -2104,17 +2109,17 @@ ${r}`), g2;
|
|
|
2104
2109
|
return r?.constructor === Function ? r(n) : void 0;
|
|
2105
2110
|
}
|
|
2106
2111
|
}
|
|
2107
|
-
function
|
|
2108
|
-
let t = { timeZone: p({ timeZone: r }).timeZone }, a = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a), u2 = s.differenceTo(o), c = o.offsetFrom(s).offset, [
|
|
2112
|
+
function Ge2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2113
|
+
let t = { timeZone: p({ timeZone: r }).timeZone }, a = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a), u2 = s.differenceTo(o), c = o.offsetFrom(s).offset, [i, m] = A2(c, true), T3 = s.clone.add(`${i} hours, ${m} minutes`), y = u2.equalDates ? "No difference" : `Time offset ${c}: ${a.timeZone} is ${u2.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2109
2114
|
return { remoteTimezone: t.timeZone, userTimezone: a.timeZone, timeDifference: y, result: { [t.timeZone.replace(/\//, "_")]: f(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a.timeZone.replace(/\//, "_")]: T3.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2110
2115
|
}
|
|
2111
|
-
function
|
|
2116
|
+
function S(e) {
|
|
2112
2117
|
return !Number.isNaN(parseInt(e));
|
|
2113
2118
|
}
|
|
2114
2119
|
function V2(e, r, n) {
|
|
2115
|
-
return e?.constructor === Number ?
|
|
2120
|
+
return e?.constructor === Number ? N(r, `${e} ${n}`) : r;
|
|
2116
2121
|
}
|
|
2117
|
-
function
|
|
2122
|
+
function Be2(e) {
|
|
2118
2123
|
let r = { addYears(n = 1) {
|
|
2119
2124
|
return V2(n, e, "years");
|
|
2120
2125
|
}, addMonths(n = 1) {
|
|
@@ -2124,29 +2129,29 @@ ${r}`), g2;
|
|
|
2124
2129
|
}, addDays(n = 1) {
|
|
2125
2130
|
return V2(n, e, "days");
|
|
2126
2131
|
}, get nextYear() {
|
|
2127
|
-
return
|
|
2132
|
+
return N(e, "1 year");
|
|
2128
2133
|
}, get nextWeek() {
|
|
2129
|
-
return
|
|
2134
|
+
return N(e, "7 days");
|
|
2130
2135
|
}, get previousWeek() {
|
|
2131
|
-
return
|
|
2136
|
+
return N(e, "-7 days");
|
|
2132
2137
|
}, get previousYear() {
|
|
2133
|
-
return
|
|
2138
|
+
return N(e, "-1 year");
|
|
2134
2139
|
}, get nextMonth() {
|
|
2135
|
-
return
|
|
2140
|
+
return q2(e);
|
|
2136
2141
|
}, get previousMonth() {
|
|
2137
|
-
return
|
|
2142
|
+
return q2(e, true);
|
|
2138
2143
|
}, get tomorrow() {
|
|
2139
|
-
return
|
|
2144
|
+
return N(e, "1 day");
|
|
2140
2145
|
}, get yesterday() {
|
|
2141
|
-
return
|
|
2146
|
+
return N(e, "-1 day");
|
|
2142
2147
|
} };
|
|
2143
|
-
for (let n of
|
|
2148
|
+
for (let n of qe2) r[n.syn] = function(...t) {
|
|
2144
2149
|
return e[n.native](...t), e;
|
|
2145
2150
|
};
|
|
2146
2151
|
return r;
|
|
2147
2152
|
}
|
|
2148
|
-
function
|
|
2149
|
-
let n =
|
|
2153
|
+
function ue2(e, r) {
|
|
2154
|
+
let n = Be2(e);
|
|
2150
2155
|
for (let [t, a] of Object.entries(r || {})) {
|
|
2151
2156
|
let o = a.enumerable, s = a.isGetter ? { get() {
|
|
2152
2157
|
return a.method(e);
|
|
@@ -2163,15 +2168,15 @@ ${r}`), g2;
|
|
|
2163
2168
|
} }, localeInformation: { get() {
|
|
2164
2169
|
return p();
|
|
2165
2170
|
} }, localWeekdaynames: { value(n) {
|
|
2166
|
-
return
|
|
2171
|
+
return ae2(n);
|
|
2167
2172
|
} }, localMonthnames: { value(n) {
|
|
2168
2173
|
return Y2(n);
|
|
2169
2174
|
} }, daysInMonth: { value(n, t = false) {
|
|
2170
|
-
return n =
|
|
2171
|
-
} }, yearCalendar: { value:
|
|
2175
|
+
return n = S(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))`;
|
|
2176
|
+
} }, yearCalendar: { value: He2 }, monthCalendar: { value: _e2 }, from: { value(...n) {
|
|
2172
2177
|
return e(n);
|
|
2173
2178
|
} }, fromUxTS: { value(n, t) {
|
|
2174
|
-
n =
|
|
2179
|
+
n = S(n) ? parseInt(n) * 1e3 : void 0;
|
|
2175
2180
|
let a = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
2176
2181
|
return f(a, t || g);
|
|
2177
2182
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
@@ -2180,27 +2185,27 @@ ${r}`), g2;
|
|
|
2180
2185
|
return P2(n, t);
|
|
2181
2186
|
} }, values: { value({ date: n, timeZone: t } = {}) {
|
|
2182
2187
|
n = n || n?.value || /* @__PURE__ */ new Date();
|
|
2183
|
-
let a =
|
|
2188
|
+
let a = M2(n, "yyyy-m-d-h-mi-s", p({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
|
|
2184
2189
|
return a[1] -= 1, a;
|
|
2185
2190
|
} }, format: { value({ date: n, template: t, timeZone: a, locale: o, opts: s } = {}) {
|
|
2186
2191
|
n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
|
|
2187
2192
|
let u2 = p({ timeZone: a, locale: o }).formatOptions;
|
|
2188
|
-
return u2 += s ? `,${s}` : "",
|
|
2193
|
+
return u2 += s ? `,${s}` : "", M2(n, t, u2);
|
|
2189
2194
|
} }, addCustom: { value({ name: n, method: t, enumerable: a = false, isGetter: o = false } = {}) {
|
|
2190
2195
|
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a, isGetter: o });
|
|
2191
|
-
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value:
|
|
2192
|
-
return
|
|
2196
|
+
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value: Ge2 }, weeksInYear: { value(n) {
|
|
2197
|
+
return k2(n, 31);
|
|
2193
2198
|
} }, keys: { get() {
|
|
2194
2199
|
let n = Object.fromEntries(Object.entries(r).filter(([a, o]) => o.enumerable === true));
|
|
2195
|
-
return [...Object.keys(E()), ...Object.keys(
|
|
2200
|
+
return [...Object.keys(E()), ...Object.keys(ue2()), ...Object.keys(n)].sort((a, o) => a.localeCompare(o));
|
|
2196
2201
|
} } }), e;
|
|
2197
2202
|
}
|
|
2198
2203
|
var Oe2 = {};
|
|
2199
|
-
var f = ze2(
|
|
2200
|
-
function
|
|
2204
|
+
var f = ze2(Je2, Oe2);
|
|
2205
|
+
function Je2(e, r) {
|
|
2201
2206
|
if (e?.localeInfo) return e.clone;
|
|
2202
2207
|
let n = e?.locale || e?.timeZone || e?.tz || e?.l;
|
|
2203
|
-
return E({ localeInfo: p(n ? e : r), dateValue: new Date(n ? Date.now() :
|
|
2208
|
+
return E({ localeInfo: p(n ? e : r), dateValue: new Date(n ? Date.now() : ve2(e)), customMethods: Oe2 });
|
|
2204
2209
|
}
|
|
2205
2210
|
|
|
2206
2211
|
// ../Resource/Externals/REHelper.js
|
|
@@ -2212,7 +2217,7 @@ ${r}`), g2;
|
|
|
2212
2217
|
);
|
|
2213
2218
|
}
|
|
2214
2219
|
function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
|
|
2215
|
-
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a,
|
|
2220
|
+
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a, v3, i) => a.concat(cleanedArgs[i - 1] || ``).concat(v3), ``);
|
|
2216
2221
|
}
|
|
2217
2222
|
function maybeFlags(...args) {
|
|
2218
2223
|
const flags = cleanupFlags(getFlags(args.at(-1)));
|
|
@@ -2303,21 +2308,21 @@ ${r}`), g2;
|
|
|
2303
2308
|
// ../Resource/Externals/splat.min.js
|
|
2304
2309
|
var { IS: b, maybe: E2, $Wrap: X3, isNothing: j3, xProxy: h, addSymbolicExtensions: T2 } = Y3({ useSymbolicExtensions: false });
|
|
2305
2310
|
function Y3(i = {}) {
|
|
2306
|
-
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType:
|
|
2307
|
-
return a && y(), { IS: e, maybe:
|
|
2311
|
+
let { useSymbolicExtensions: a } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType: N2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 } = _3(e, a);
|
|
2312
|
+
return a && y(), { IS: e, maybe: S2, $Wrap: O3, isNothing: d, xProxy: x2, addSymbolicExtensions: y };
|
|
2308
2313
|
function e(c, ...u2) {
|
|
2309
2314
|
let l = typeof c == "symbol" ? Symbol.isSymbol : c;
|
|
2310
2315
|
switch (true) {
|
|
2311
|
-
case !!
|
|
2316
|
+
case !!S2({ trial: (f2) => "isTypes" in (u2?.[0] ?? {}) }):
|
|
2312
2317
|
return m(c, u2[0]);
|
|
2313
2318
|
default:
|
|
2314
|
-
return u2.length > 1 ? g2(l, ...u2) :
|
|
2319
|
+
return u2.length > 1 ? g2(l, ...u2) : N2(c, ...u2);
|
|
2315
2320
|
}
|
|
2316
2321
|
}
|
|
2317
2322
|
}
|
|
2318
2323
|
function _3(i, a) {
|
|
2319
|
-
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } =
|
|
2320
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy:
|
|
2324
|
+
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N2, addSymbolicExtensions: y } = m(i, e, a), [S2, O3] = [g2(), P3(i, e)];
|
|
2325
|
+
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u2, isExcept: f2, verifyNothingness: d, xProxy: N2, determineType: x2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 });
|
|
2321
2326
|
function e(r) {
|
|
2322
2327
|
return r?.[Symbol.proxy] ?? i(r);
|
|
2323
2328
|
}
|
|
@@ -2341,7 +2346,7 @@ ${r}`), g2;
|
|
|
2341
2346
|
return t = t?.constructor !== Array ? [t] : t, n = n?.constructor !== Array ? [n] : n, i(r, ...t) && !i(r, ...n);
|
|
2342
2347
|
}
|
|
2343
2348
|
}
|
|
2344
|
-
function
|
|
2349
|
+
function w2() {
|
|
2345
2350
|
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, a = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
2346
2351
|
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u2, verifyNothingness: f2, determineType: y });
|
|
2347
2352
|
function m(r, t) {
|
|
@@ -2376,12 +2381,12 @@ ${r}`), g2;
|
|
|
2376
2381
|
Proxy = d(r, Symbol.proxy);
|
|
2377
2382
|
} };
|
|
2378
2383
|
}
|
|
2379
|
-
function
|
|
2384
|
+
function N2(r, ...t) {
|
|
2380
2385
|
let n = t.length < 1, o = r == null;
|
|
2381
2386
|
return { noInput: o, noShouldbe: n, compareTo: !n && t[0], inputCTOR: !o && (r?.constructor || Object.getPrototypeOf(r)?.constructor), isNaN: Number.isNaN(r) || E2({ trial: (s) => String(r) === a.NAN }), isInfinity: E2({ trial: (s) => String(r) }) === a.INFINITY, shouldBeFirstElementIsNothing: !n && f2(t[0]) };
|
|
2382
2387
|
}
|
|
2383
2388
|
function y(r, ...t) {
|
|
2384
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity:
|
|
2389
|
+
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F3, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } = N2(r, ...t);
|
|
2385
2390
|
switch (t = t.length && t[0], true) {
|
|
2386
2391
|
case p2:
|
|
2387
2392
|
return String(r) === String(s);
|
|
@@ -2389,17 +2394,17 @@ ${r}`), g2;
|
|
|
2389
2394
|
return r[Symbol.proxy];
|
|
2390
2395
|
case F3:
|
|
2391
2396
|
return o ? a.NAN : String(s) === String(r);
|
|
2392
|
-
case
|
|
2397
|
+
case v3:
|
|
2393
2398
|
return o ? a.INFINITY : String(s) === String(r);
|
|
2394
2399
|
case n:
|
|
2395
2400
|
return o ? String(r) : String(s) === String(r);
|
|
2396
2401
|
case A3 === Boolean:
|
|
2397
2402
|
return o ? a.BOOLEAN : A3 === t;
|
|
2398
2403
|
default:
|
|
2399
|
-
return O3(r, t, o,
|
|
2404
|
+
return O3(r, t, o, S2(r, A3));
|
|
2400
2405
|
}
|
|
2401
2406
|
}
|
|
2402
|
-
function
|
|
2407
|
+
function S2(r, t) {
|
|
2403
2408
|
switch (true) {
|
|
2404
2409
|
case r === 0:
|
|
2405
2410
|
return Number;
|
|
@@ -2461,12 +2466,12 @@ ${r}`), g2;
|
|
|
2461
2466
|
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2462
2467
|
}
|
|
2463
2468
|
}
|
|
2464
|
-
var
|
|
2469
|
+
var C3 = I3();
|
|
2465
2470
|
var $2 = I3("");
|
|
2466
2471
|
function I3(i, a = {}) {
|
|
2467
2472
|
let { useSymbolicExtensions: m } = a;
|
|
2468
2473
|
return i = b(i, String, Number) ? String(i) : void 0, m && L3(), function(e, ...c) {
|
|
2469
|
-
return O3(e,
|
|
2474
|
+
return O3(e, S2(c));
|
|
2470
2475
|
};
|
|
2471
2476
|
function g2(e, c) {
|
|
2472
2477
|
return c && b(i, String, Number) ? String(i) : `{${e}}`;
|
|
@@ -2484,7 +2489,7 @@ ${r}`), g2;
|
|
|
2484
2489
|
function x2(e, c) {
|
|
2485
2490
|
return e.replace(/\{(?<key>[a-z_\d]+)}/gim, d(c));
|
|
2486
2491
|
}
|
|
2487
|
-
function
|
|
2492
|
+
function N2(e) {
|
|
2488
2493
|
let c = [];
|
|
2489
2494
|
return Object.entries(e).forEach(([u2, l]) => {
|
|
2490
2495
|
l.forEach((f2, r) => (c[r] ??= {}, c[r][u2] = f2));
|
|
@@ -2493,8 +2498,8 @@ ${r}`), g2;
|
|
|
2493
2498
|
function y(e) {
|
|
2494
2499
|
return e.length === 1 && Object.values(e[0]).every(Array.isArray);
|
|
2495
2500
|
}
|
|
2496
|
-
function
|
|
2497
|
-
return y(e) ?
|
|
2501
|
+
function S2(e) {
|
|
2502
|
+
return y(e) ? N2(e[0]) : e;
|
|
2498
2503
|
}
|
|
2499
2504
|
function O3(e, c) {
|
|
2500
2505
|
let u2 = c?.length ? c.filter((l) => b(l, Object)).map((l, f2) => x2(e, { ...l, index: f2 + 1 })).join("") : e;
|
|
@@ -2503,7 +2508,7 @@ ${r}`), g2;
|
|
|
2503
2508
|
}
|
|
2504
2509
|
function L3() {
|
|
2505
2510
|
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...i) {
|
|
2506
|
-
return
|
|
2511
|
+
return C3(this, ...i);
|
|
2507
2512
|
} }, [Symbol.for("interpolate$")]: { value(...i) {
|
|
2508
2513
|
return $2(this, ...i);
|
|
2509
2514
|
} } }), [Symbol.for("interpolate"), Symbol.for("interpolate$")];
|
|
@@ -2512,7 +2517,7 @@ ${r}`), g2;
|
|
|
2512
2517
|
// ../index.js
|
|
2513
2518
|
setDefaultStyling();
|
|
2514
2519
|
fixSBLinks2TopProblem();
|
|
2515
|
-
var splatModule = { interpolate:
|
|
2520
|
+
var splatModule = { interpolate: C3, interpolateClear: $2, addSymbolicStringExtensions: L3 };
|
|
2516
2521
|
function fixSBLinks2TopProblem() {
|
|
2517
2522
|
/stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
|
|
2518
2523
|
document.addEventListener(`click`, (evt) => {
|