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