dynamic-html-helpers 1.2.7 → 1.2.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.
- package/Bundle/htmlhelpers.min.js +13 -13
- package/Bundle/htmlhelpers.script.js +704 -704
- package/Bundle/htmlhelpers.script.min.js +13 -13
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ var HTMLHelpers = (() => {
|
|
|
22
22
|
// ../index.js
|
|
23
23
|
var index_exports = {};
|
|
24
24
|
__export(index_exports, {
|
|
25
|
-
$: () =>
|
|
25
|
+
$: () => pn,
|
|
26
26
|
$D: () => m,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => RegexpCreator_default,
|
|
@@ -30,194 +30,194 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../node_modules/jqx-es/Bundle/jqx.min.js
|
|
33
|
-
var { IS:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { xProxy: r, addSymbolicExtensions: n } =
|
|
33
|
+
var { IS: s, maybe: W, $Wrap: pr, isNothing: yr, xProxy: br, addSymbolicExtensions: hr } = ct({ useSymbolicExtensions: false });
|
|
34
|
+
function ct(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { xProxy: r, addSymbolicExtensions: n } = ft(a, f2, e), o = C2(), [i] = [N2()];
|
|
36
36
|
return r.custom(), e && n(), { IS: a, maybe: o, $Wrap: i, isNothing: b2, xProxy: r, addSymbolicExtensions: n };
|
|
37
|
-
function a(
|
|
38
|
-
let
|
|
37
|
+
function a(l, ...d) {
|
|
38
|
+
let v2 = typeof l == "symbol" ? Symbol.isSymbol : l;
|
|
39
39
|
switch (true) {
|
|
40
|
-
case !!o({ trial: (
|
|
41
|
-
return
|
|
40
|
+
case !!o({ trial: (L2) => "isTypes" in (d?.[0] ?? {}) }):
|
|
41
|
+
return w2(l, d[0]);
|
|
42
42
|
default:
|
|
43
|
-
return d.length > 1 ?
|
|
43
|
+
return d.length > 1 ? m2(v2, ...d) : E2(l, ...d);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function w2(l, d) {
|
|
47
47
|
switch (true) {
|
|
48
48
|
case "defaultValue" in d:
|
|
49
|
-
return u(
|
|
49
|
+
return u(l, d);
|
|
50
50
|
case "notTypes" in d:
|
|
51
|
-
return
|
|
51
|
+
return y2(l, d);
|
|
52
52
|
default:
|
|
53
|
-
return a(
|
|
53
|
+
return a(l, ...[d.isTypes].flat());
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function f2(l) {
|
|
57
|
+
return l?.[Symbol.proxy] ?? a(l);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let { noInput:
|
|
59
|
+
function E2(l, ...d) {
|
|
60
|
+
let { noInput: v2, noShouldbe: L2, compareTo: O2, inputCTOR: J2, isNaN: B2, isInfinity: at2, shouldBeFirstElementIsNothing: ut } = c(l, ...d);
|
|
61
61
|
switch (d = d.length && d[0], true) {
|
|
62
|
-
case ct:
|
|
63
|
-
return String(s) === String(M2);
|
|
64
|
-
case (s?.[Symbol.proxy] && T2):
|
|
65
|
-
return s[Symbol.proxy];
|
|
66
|
-
case at2:
|
|
67
|
-
return T2 ? "NaN" : String(M2) === String(s);
|
|
68
62
|
case ut:
|
|
69
|
-
return
|
|
70
|
-
case
|
|
71
|
-
return
|
|
72
|
-
case
|
|
73
|
-
return
|
|
63
|
+
return String(l) === String(O2);
|
|
64
|
+
case (l?.[Symbol.proxy] && L2):
|
|
65
|
+
return l[Symbol.proxy];
|
|
66
|
+
case B2:
|
|
67
|
+
return L2 ? "NaN" : String(O2) === String(l);
|
|
68
|
+
case at2:
|
|
69
|
+
return L2 ? "Infinity" : String(O2) === String(l);
|
|
70
|
+
case v2:
|
|
71
|
+
return L2 ? String(l) : String(O2) === String(l);
|
|
72
|
+
case J2 === Boolean:
|
|
73
|
+
return d ? J2 === d : "Boolean";
|
|
74
74
|
default:
|
|
75
|
-
return
|
|
75
|
+
return g2(l, d, L2, h(l, J2));
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let
|
|
80
|
-
return { noInput:
|
|
78
|
+
function c(l, ...d) {
|
|
79
|
+
let v2 = d.length < 1, L2 = l == null;
|
|
80
|
+
return { noInput: L2, noShouldbe: v2, compareTo: !v2 && d[0], inputCTOR: !L2 && Object.getPrototypeOf(l)?.constructor, isNaN: Number.isNaN(l) || o({ trial: (O2) => String(l) === "NaN" }), isInfinity: o({ trial: (O2) => String(l) }) === "Infinity", shouldBeFirstElementIsNothing: !v2 && b2(d[0]) };
|
|
81
81
|
}
|
|
82
|
-
function h(
|
|
82
|
+
function h(l, d) {
|
|
83
83
|
switch (true) {
|
|
84
|
-
case
|
|
84
|
+
case l === 0:
|
|
85
85
|
return Number;
|
|
86
|
-
case
|
|
86
|
+
case l === "":
|
|
87
87
|
return String;
|
|
88
|
-
case !
|
|
89
|
-
return { name: String(
|
|
88
|
+
case !l:
|
|
89
|
+
return { name: String(l) };
|
|
90
90
|
default:
|
|
91
91
|
return d;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function g2(l, d, v2, L2) {
|
|
95
95
|
switch (true) {
|
|
96
|
-
case (!
|
|
96
|
+
case (!v2 && d === l || l?.[Symbol.proxy] && d === Proxy):
|
|
97
97
|
return true;
|
|
98
98
|
case String(d) === "NaN":
|
|
99
|
-
return String(
|
|
100
|
-
case (
|
|
101
|
-
return String(d) ===
|
|
99
|
+
return String(l) === "NaN";
|
|
100
|
+
case (l?.[Symbol.toStringTag] && a(d, String)):
|
|
101
|
+
return String(d) === l[Symbol.toStringTag];
|
|
102
102
|
default:
|
|
103
|
-
return d ?
|
|
103
|
+
return d ? p(l, d, L2) : S(l, L2);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
106
|
+
function S(l, d) {
|
|
107
|
+
return l?.[Symbol.toStringTag] && `[object ${l?.[Symbol.toStringTag]}]` || d?.name || String(d);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
return o({ trial: (
|
|
109
|
+
function p(l, d, v2) {
|
|
110
|
+
return o({ trial: (L2) => l instanceof d }) || d === v2 || d === Object.getPrototypeOf(v2) || `${d?.name}` === v2?.name;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return d.some((
|
|
112
|
+
function m2(l, ...d) {
|
|
113
|
+
return d.some((v2) => a(l, v2));
|
|
114
114
|
}
|
|
115
|
-
function b2(
|
|
116
|
-
let
|
|
117
|
-
return
|
|
115
|
+
function b2(l, d = false) {
|
|
116
|
+
let v2 = l == null;
|
|
117
|
+
return v2 = d ? v2 || a(l, 1 / 0) || a(l, NaN) : v2, v2;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
let
|
|
119
|
+
function C2() {
|
|
120
|
+
let l = (d) => {
|
|
121
121
|
};
|
|
122
|
-
return function({ trial: d, whenError:
|
|
122
|
+
return function({ trial: d, whenError: v2 = l } = {}) {
|
|
123
123
|
try {
|
|
124
124
|
return d();
|
|
125
|
-
} catch (
|
|
126
|
-
return
|
|
125
|
+
} catch (L2) {
|
|
126
|
+
return v2(L2);
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return function(
|
|
130
|
+
function N2() {
|
|
131
|
+
return function(l) {
|
|
132
132
|
return Object.freeze({ get value() {
|
|
133
|
-
return
|
|
133
|
+
return l;
|
|
134
134
|
}, get [Symbol.type]() {
|
|
135
|
-
return
|
|
135
|
+
return f2(l);
|
|
136
136
|
}, get type() {
|
|
137
|
-
return
|
|
137
|
+
return f2(l);
|
|
138
138
|
}, [Symbol.is](...d) {
|
|
139
|
-
return a(
|
|
139
|
+
return a(l, ...d);
|
|
140
140
|
}, is(...d) {
|
|
141
|
-
return a(
|
|
141
|
+
return a(l, ...d);
|
|
142
142
|
} });
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function u(
|
|
146
|
-
return
|
|
145
|
+
function u(l, { defaultValue: d, isTypes: v2 = [void 0], notTypes: L2 } = {}) {
|
|
146
|
+
return v2 = v2?.constructor !== Array ? [v2] : v2, L2 = L2 && L2?.constructor !== Array ? [L2] : [], L2.length < 1 ? a(l, ...v2) ? l : d : y2(l, { isTypes: v2, notTypes: L2 }) ? l : d;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return d = d?.constructor !== Array ? [d] : d,
|
|
148
|
+
function y2(l, { isTypes: d = [void 0], notTypes: v2 = [void 0] } = {}) {
|
|
149
|
+
return d = d?.constructor !== Array ? [d] : d, v2 = v2?.constructor !== Array ? [v2] : v2, a(l, ...d) && !a(l, ...v2);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function x2() {
|
|
152
152
|
Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is] || (Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
153
|
-
return
|
|
154
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...
|
|
155
|
-
return a(this, ...
|
|
156
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
157
|
-
return
|
|
158
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
159
|
-
return a(
|
|
153
|
+
return f2(this);
|
|
154
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...l) {
|
|
155
|
+
return a(this, ...l);
|
|
156
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(l) {
|
|
157
|
+
return f2(l);
|
|
158
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(l, ...d) {
|
|
159
|
+
return a(l, ...d);
|
|
160
160
|
}, enumerable: false, configurable: false } }));
|
|
161
161
|
}
|
|
162
|
-
function E2(s) {
|
|
163
|
-
let d = s.set;
|
|
164
|
-
return s.set = (w2, T2, M2) => T2 === Symbol.proxy ? w2[T2] = M2 : d(w2, T2, M2), s;
|
|
165
|
-
}
|
|
166
162
|
}
|
|
167
|
-
function
|
|
168
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for("toa.isASymbol")), { xProxy:
|
|
163
|
+
function ft(t, e, r) {
|
|
164
|
+
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for("toa.isASymbol")), { xProxy: w2(), addSymbolicExtensions: n };
|
|
169
165
|
function n() {
|
|
170
166
|
Symbol.is || (Symbol.is = Symbol.for("toa.is"), Symbol.type = Symbol.for("toa.type")), Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is] || (Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
171
167
|
return e(this);
|
|
172
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...
|
|
173
|
-
return t(this, ...
|
|
174
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
175
|
-
return e(
|
|
176
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
177
|
-
return t(
|
|
168
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...f2) {
|
|
169
|
+
return t(this, ...f2);
|
|
170
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(f2) {
|
|
171
|
+
return e(f2);
|
|
172
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(f2, ...E2) {
|
|
173
|
+
return t(f2, ...E2);
|
|
178
174
|
}, enumerable: false, configurable: false } }));
|
|
179
175
|
}
|
|
180
|
-
function o(
|
|
181
|
-
|
|
176
|
+
function o(f2) {
|
|
177
|
+
let E2 = f2.set;
|
|
178
|
+
return f2.set = (c, h, g2) => h === Symbol.proxy ? c[h] = g2 : E2(c, h, g2), f2;
|
|
182
179
|
}
|
|
183
|
-
function i(
|
|
184
|
-
return
|
|
185
|
-
Proxy = new S(S, { construct(p, C2) {
|
|
186
|
-
for (let h of C2) h.set && (h = modifySetter(h));
|
|
187
|
-
let f2 = new p(...C2);
|
|
188
|
-
return f2[Symbol.proxy] = `Proxy (${o(C2[0])})`, f2;
|
|
189
|
-
} });
|
|
190
|
-
};
|
|
180
|
+
function i(f2) {
|
|
181
|
+
return Object.getPrototypeOf(f2)?.constructor?.name || "Object";
|
|
191
182
|
}
|
|
192
|
-
function a() {
|
|
183
|
+
function a(f2) {
|
|
184
|
+
return Proxy = new f2(f2, { construct(E2, c) {
|
|
185
|
+
for (let g2 of c) g2.set && (g2 = o(g2));
|
|
186
|
+
let h = new E2(...c);
|
|
187
|
+
return h[Symbol.proxy] = `Proxy (${i(c[0])})`, h;
|
|
188
|
+
} }), Proxy;
|
|
189
|
+
}
|
|
190
|
+
function w2() {
|
|
193
191
|
Symbol.proxy || (Symbol.proxy = Symbol.for("toa.proxy"));
|
|
194
|
-
let
|
|
192
|
+
let f2 = Proxy;
|
|
195
193
|
return { native() {
|
|
196
|
-
Proxy =
|
|
197
|
-
}, custom
|
|
194
|
+
Proxy = f2;
|
|
195
|
+
}, custom() {
|
|
196
|
+
Proxy = a(f2);
|
|
197
|
+
} };
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var Ie =
|
|
201
|
-
var
|
|
202
|
-
var V =
|
|
203
|
-
function
|
|
200
|
+
var Ie = gt();
|
|
201
|
+
var z = dt();
|
|
202
|
+
var V = mt();
|
|
203
|
+
function dt() {
|
|
204
204
|
return { html: Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")), svg: Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(",")) };
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function mt() {
|
|
207
207
|
return { a: true, area: true, audio: false, br: true, base: true, body: true, button: true, canvas: true, comment: true, dl: true, data: true, datalist: true, div: true, em: true, embed: false, fieldset: true, font: true, footer: true, form: false, hr: true, head: true, header: true, output: true, iframe: false, frameset: false, img: true, input: true, li: true, label: true, legend: true, link: true, map: true, mark: true, menu: true, media: true, meta: true, nav: true, meter: true, ol: true, object: false, optgroup: true, option: true, p: true, param: true, picture: true, pre: true, progress: false, quote: true, script: false, select: true, source: true, span: true, style: true, caption: true, td: true, col: true, table: true, tr: true, template: false, textarea: true, time: true, title: true, track: true, details: true, ul: true, video: true, del: true, ins: true, slot: true, blockquote: true, svg: true, dialog: true, summary: true, main: true, address: true, colgroup: true, tbody: true, tfoot: true, thead: true, th: true, dd: true, dt: true, figcaption: true, figure: true, i: true, b: true, code: true, h1: true, h2: true, h3: true, h4: true, abbr: true, bdo: true, dfn: true, kbd: true, q: true, rb: true, rp: true, rt: true, ruby: true, s: true, strike: true, samp: true, small: true, strong: true, sup: true, sub: true, u: true, var: true, wbr: true, nobr: true, tt: true, noscript: true };
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function gt() {
|
|
210
210
|
return ["::backdrop{background-color:grey;opacity:0.2;}", `#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`, "@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}", "@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}", "@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}", "@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"];
|
|
211
211
|
}
|
|
212
212
|
var je = { html: "innerHTML", text: "textContent", class: "className" };
|
|
213
|
-
var ee =
|
|
214
|
-
function
|
|
213
|
+
var ee = pt();
|
|
214
|
+
function pt() {
|
|
215
215
|
let t = { get(e, r) {
|
|
216
216
|
let n = String(r)?.toLowerCase();
|
|
217
217
|
switch (true) {
|
|
218
218
|
case n in e:
|
|
219
219
|
return e[n];
|
|
220
|
-
case
|
|
220
|
+
case Ct(n):
|
|
221
221
|
return Re(e, n, r);
|
|
222
222
|
default:
|
|
223
223
|
return Re(e, n, r, true);
|
|
@@ -227,139 +227,139 @@ var HTMLHelpers = (() => {
|
|
|
227
227
|
}
|
|
228
228
|
function Re(t, e, r, n = false) {
|
|
229
229
|
return Object.defineProperty(t, e, { get() {
|
|
230
|
-
return n ? (o) =>
|
|
230
|
+
return n ? (o) => wt(r) : Lt(e);
|
|
231
231
|
} }), t[e];
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return e = e?.isJQx && e.first() || e,
|
|
233
|
+
function yt(t, e, r) {
|
|
234
|
+
return e = e?.isJQx && e.first() || e, W({ trial: (n) => Et(e) ? t.append(e) : Qe(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} (for root ${t}) not created, reason
|
|
235
235
|
`, n) });
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
let n =
|
|
239
|
-
return r?.forEach((o) =>
|
|
237
|
+
function bt(t, e, ...r) {
|
|
238
|
+
let n = ht(e, t);
|
|
239
|
+
return r?.forEach((o) => yt(n, o, t)), n;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
switch (t = xe(e) ?
|
|
243
|
-
case
|
|
241
|
+
function ht(t, e) {
|
|
242
|
+
switch (t = xe(e) ? vt(t) : t?.isJQx ? t.first() : t, true) {
|
|
243
|
+
case s(t, String):
|
|
244
244
|
return U(e, Qe(t, e) ? { html: t } : { text: t });
|
|
245
|
-
case
|
|
246
|
-
return
|
|
245
|
+
case s(t, Node):
|
|
246
|
+
return xt(e, t);
|
|
247
247
|
default:
|
|
248
248
|
return U(e, t);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function St(t) {
|
|
252
252
|
return delete t.data, Object.keys(t).length < 1 || Object.keys(t).forEach((e) => {
|
|
253
253
|
let r = e.toLowerCase();
|
|
254
254
|
r in je && (t[je[r]] = t[e], delete t[e]);
|
|
255
255
|
}), t;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function xt(t, e) {
|
|
258
258
|
let r = U(t);
|
|
259
259
|
return r.append(e), r;
|
|
260
260
|
}
|
|
261
261
|
function U(t, e = {}) {
|
|
262
262
|
e = Je(e, {});
|
|
263
|
-
let r = Object.entries(e.data ?? {}), n = Object.assign(xe(t) ? new Comment(e?.text) : document.createElement(t),
|
|
263
|
+
let r = Object.entries(e.data ?? {}), n = Object.assign(xe(t) ? new Comment(e?.text) : document.createElement(t), St(e));
|
|
264
264
|
return r.length && r.forEach(([o, i]) => n.dataset[o] = String(i)), n;
|
|
265
265
|
}
|
|
266
266
|
function Je(t, e) {
|
|
267
|
-
return e ?
|
|
267
|
+
return e ? s(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy], defaultValue: e }) : s(t, { isTypes: Object, notTypes: [Array, null, NaN, Proxy] });
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function vt(t) {
|
|
270
270
|
return Je(t) ? t?.text ?? t?.textContent ?? "" : String(t);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function wt(t) {
|
|
273
273
|
return U("b", { style: "color:red", text: `'${t}' is not a valid HTML-tag` });
|
|
274
274
|
}
|
|
275
275
|
function Qe(t, e) {
|
|
276
|
-
return !xe(e) &&
|
|
276
|
+
return !xe(e) && s(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Et(t) {
|
|
279
279
|
return t?.constructor === Comment || t?.constructor === CharacterData;
|
|
280
280
|
}
|
|
281
281
|
function xe(t) {
|
|
282
282
|
return t?.constructor === Comment || /comment/i.test(t);
|
|
283
283
|
}
|
|
284
|
+
function Ct(t) {
|
|
285
|
+
return !s(U(t), HTMLUnknownElement);
|
|
286
|
+
}
|
|
284
287
|
function Lt(t) {
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if (t({ trial: (E2) => "isTypes" in (g2?.[0] ?? {}) })) {
|
|
297
|
-
let E2 = g2[0];
|
|
298
|
-
return "defaultValue" in E2 ? x2(u, E2) : "notTypes" in E2 ? m2(u, E2) : n(u, ...[E2.isTypes].flat());
|
|
288
|
+
return (e, ...r) => bt(t, e, ...r);
|
|
289
|
+
}
|
|
290
|
+
var { IS: te, maybe: Er, $Wrap: Cr, xProxy: Lr, isNothing: Tr } = Tt();
|
|
291
|
+
function Tt() {
|
|
292
|
+
Symbol.proxy = Symbol.for("toa.proxy"), Symbol.is = Symbol.for("toa.is"), Symbol.type = Symbol.for("toa.type"), Symbol.isSymbol = Symbol.for("toa.isASymbol"), m2();
|
|
293
|
+
let t = h(), [e, r] = [g2(), N2()];
|
|
294
|
+
return r.custom(), { IS: n, maybe: t, $Wrap: e, isNothing: c, xProxy: r };
|
|
295
|
+
function n(u, ...y2) {
|
|
296
|
+
if (t({ trial: (l) => "isTypes" in (y2?.[0] ?? {}) })) {
|
|
297
|
+
let l = y2[0];
|
|
298
|
+
return "defaultValue" in l ? S(u, l) : "notTypes" in l ? p(u, l) : n(u, ...[l.isTypes].flat());
|
|
299
299
|
}
|
|
300
|
-
let
|
|
301
|
-
return
|
|
300
|
+
let x2 = typeof u == "symbol" ? Symbol.isSymbol : u;
|
|
301
|
+
return y2.length > 1 ? E2(x2, ...y2) : i(u, ...y2);
|
|
302
302
|
}
|
|
303
303
|
function o(u) {
|
|
304
304
|
return u?.[Symbol.proxy] ?? n(u);
|
|
305
305
|
}
|
|
306
|
-
function i(u, ...
|
|
307
|
-
let { noInput:
|
|
308
|
-
switch (
|
|
309
|
-
case
|
|
310
|
-
return String(u) === String(
|
|
311
|
-
case (u?.[Symbol.proxy] &&
|
|
306
|
+
function i(u, ...y2) {
|
|
307
|
+
let { noInput: x2, noShouldbe: l, compareTo: d, inputCTOR: v2, isNaN: L2, isInfinity: O2, shouldBeFirstElementIsNothing: J2 } = w2(u, ...y2);
|
|
308
|
+
switch (y2 = y2.length && y2[0], true) {
|
|
309
|
+
case J2:
|
|
310
|
+
return String(u) === String(d);
|
|
311
|
+
case (u?.[Symbol.proxy] && l):
|
|
312
312
|
return u[Symbol.proxy];
|
|
313
|
-
case
|
|
314
|
-
return
|
|
315
|
-
case
|
|
316
|
-
return
|
|
317
|
-
case
|
|
318
|
-
return
|
|
319
|
-
case
|
|
320
|
-
return
|
|
313
|
+
case L2:
|
|
314
|
+
return l ? "NaN" : t({ trial: (B2) => String(d) }) === String(u);
|
|
315
|
+
case O2:
|
|
316
|
+
return l ? "Infinity" : t({ trial: (B2) => String(d) }) === String(u);
|
|
317
|
+
case x2:
|
|
318
|
+
return l ? String(u) : String(d) === String(u);
|
|
319
|
+
case v2 === Boolean:
|
|
320
|
+
return y2 ? v2 === y2 : "Boolean";
|
|
321
321
|
default:
|
|
322
|
-
return
|
|
322
|
+
return f2(u, y2, l, a(u, v2));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function a(u,
|
|
326
|
-
return u === 0 ? Number : u === "" ? String : u ?
|
|
325
|
+
function a(u, y2) {
|
|
326
|
+
return u === 0 ? Number : u === "" ? String : u ? y2 : { name: String(u) };
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
let
|
|
330
|
-
return { noInput:
|
|
328
|
+
function w2(u, ...y2) {
|
|
329
|
+
let x2 = y2.length < 1, l = !x2 && y2[0], d = !x2 && c(y2[0]), v2 = u == null, L2 = !v2 && Object.getPrototypeOf(u)?.constructor, O2 = t({ trial: (B2) => String(u) }) === "NaN", J2 = t({ trial: (B2) => String(u) }) === "Infinity";
|
|
330
|
+
return { noInput: v2, noShouldbe: x2, compareTo: l, inputCTOR: L2, isNaN: O2, isInfinity: J2, shouldBeFirstElementIsNothing: d };
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function f2(u, y2, x2, l) {
|
|
333
333
|
switch (true) {
|
|
334
|
-
case (!
|
|
334
|
+
case (!x2 && y2 === u || u?.[Symbol.proxy] && y2 === Proxy):
|
|
335
335
|
return true;
|
|
336
|
-
case t({ trial: (
|
|
336
|
+
case t({ trial: (d) => String(y2) }) === "NaN":
|
|
337
337
|
return String(u) === "NaN";
|
|
338
|
-
case (u?.[Symbol.toStringTag] && n(
|
|
339
|
-
return String(
|
|
338
|
+
case (u?.[Symbol.toStringTag] && n(y2, String)):
|
|
339
|
+
return String(y2) === u[Symbol.toStringTag];
|
|
340
340
|
default:
|
|
341
|
-
return
|
|
341
|
+
return y2 ? t({ trial: (d) => u instanceof y2 }) || y2 === l || y2 === Object.getPrototypeOf(l) || `${y2?.name}` === l?.name : u?.[Symbol.toStringTag] && `[object ${u?.[Symbol.toStringTag]}]` || l?.name || String(l);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
344
|
+
function E2(u, ...y2) {
|
|
345
|
+
return y2.some((x2) => n(u, x2));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
let
|
|
349
|
-
return
|
|
347
|
+
function c(u, y2 = false) {
|
|
348
|
+
let x2 = u == null;
|
|
349
|
+
return x2 = y2 ? x2 || n(u, 1 / 0) || n(u, NaN) : x2, x2;
|
|
350
350
|
}
|
|
351
351
|
function h() {
|
|
352
|
-
let u = (
|
|
353
|
-
return function({ trial:
|
|
352
|
+
let u = (y2, x2) => y2?.constructor === Function ? y2(x2) : void 0;
|
|
353
|
+
return function({ trial: y2, whenError: x2 = () => {
|
|
354
354
|
} } = {}) {
|
|
355
355
|
try {
|
|
356
|
-
return u(
|
|
357
|
-
} catch (
|
|
358
|
-
return u(
|
|
356
|
+
return u(y2);
|
|
357
|
+
} catch (l) {
|
|
358
|
+
return u(x2, l);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function g2() {
|
|
363
363
|
return function(u) {
|
|
364
364
|
return Object.freeze({ get value() {
|
|
365
365
|
return u;
|
|
@@ -367,154 +367,154 @@ var HTMLHelpers = (() => {
|
|
|
367
367
|
return o(u);
|
|
368
368
|
}, get type() {
|
|
369
369
|
return o(u);
|
|
370
|
-
}, [Symbol.is](...
|
|
371
|
-
return n(u, ...
|
|
372
|
-
}, is(...
|
|
373
|
-
return n(u, ...
|
|
370
|
+
}, [Symbol.is](...y2) {
|
|
371
|
+
return n(u, ...y2);
|
|
372
|
+
}, is(...y2) {
|
|
373
|
+
return n(u, ...y2);
|
|
374
374
|
} });
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
return
|
|
377
|
+
function S(u, { defaultValue: y2, isTypes: x2 = [void 0], notTypes: l } = {}) {
|
|
378
|
+
return x2 = x2?.constructor !== Array ? [x2] : x2, l = l && l?.constructor !== Array ? [l] : [], l.length < 1 ? n(u, ...x2) ? u : y2 : p(u, { isTypes: x2, notTypes: l }) ? u : y2;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function p(u, { isTypes: y2 = [void 0], notTypes: x2 = [void 0] } = {}) {
|
|
381
|
+
return y2 = y2?.constructor !== Array ? [y2] : y2, x2 = x2?.constructor !== Array ? [x2] : x2, n(u, ...y2) && !n(u, ...x2);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function m2() {
|
|
384
384
|
Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is] || (Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
385
385
|
return o(this);
|
|
386
386
|
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...u) {
|
|
387
387
|
return n(this, ...u);
|
|
388
388
|
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(u) {
|
|
389
389
|
return o(u);
|
|
390
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(u, ...
|
|
391
|
-
return n(u, ...
|
|
390
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(u, ...y2) {
|
|
391
|
+
return n(u, ...y2);
|
|
392
392
|
}, enumerable: false, configurable: false } }));
|
|
393
393
|
}
|
|
394
394
|
function b2(u) {
|
|
395
|
-
let
|
|
396
|
-
return
|
|
395
|
+
let y2 = String(Object.getPrototypeOf(u)?.constructor);
|
|
396
|
+
return y2.slice(y2.indexOf("ion") + 3, y2.indexOf("(")).trim();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
let
|
|
400
|
-
return u.set = (
|
|
398
|
+
function C2(u) {
|
|
399
|
+
let y2 = u.set;
|
|
400
|
+
return u.set = (x2, l, d) => l === Symbol.proxy ? x2[l] = d : y2(x2, l, d), u;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function N2() {
|
|
403
403
|
let u = Proxy;
|
|
404
404
|
return { native() {
|
|
405
405
|
Proxy = u;
|
|
406
406
|
}, custom() {
|
|
407
|
-
Proxy = new u(u, { construct(
|
|
408
|
-
for (let
|
|
409
|
-
let
|
|
410
|
-
return
|
|
407
|
+
Proxy = new u(u, { construct(y2, x2) {
|
|
408
|
+
for (let d of x2) d.set && (d = C2(d));
|
|
409
|
+
let l = new y2(...x2);
|
|
410
|
+
return l[Symbol.proxy] = `Proxy (${b2(x2[0])})`, l;
|
|
411
411
|
} });
|
|
412
412
|
} };
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var _ =
|
|
416
|
-
function
|
|
417
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: i, removeRules: a, consider:
|
|
418
|
-
function
|
|
419
|
-
if (
|
|
420
|
-
Object.keys(
|
|
415
|
+
var _ = $t;
|
|
416
|
+
function $t({ styleSheet: t, createWithId: e } = {}) {
|
|
417
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: i, removeRules: a, consider: w2, currentSheetID: f2 } = Ft({ styleSheet: t, createWithId: e });
|
|
418
|
+
function E2(p, m2) {
|
|
419
|
+
if (p && m2.removeProperties) {
|
|
420
|
+
Object.keys(m2.removeProperties).forEach((b2) => p.style.removeProperty(ke(b2)));
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
Object.entries(
|
|
424
|
-
b2 = ke(b2.trim()),
|
|
425
|
-
let
|
|
426
|
-
if (/!important/.test(
|
|
427
|
-
We(() =>
|
|
423
|
+
Object.entries(m2).forEach(([b2, C2]) => {
|
|
424
|
+
b2 = ke(b2.trim()), C2 = C2.trim();
|
|
425
|
+
let N2;
|
|
426
|
+
if (/!important/.test(C2) && (C2 = C2.slice(0, C2.indexOf("!important")).trim(), N2 = "important"), !CSS.supports(b2, C2)) return console.error(`StylingFactory ${f2} error: '${b2}' with value '${C2}' not supported (yet)`);
|
|
427
|
+
We(() => p.style.setProperty(b2, C2, N2), `StylingFactory ${f2} (setRule4Selector) failed`);
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
if (
|
|
432
|
-
if (
|
|
433
|
-
let
|
|
434
|
-
return
|
|
430
|
+
function c(p, m2, b2 = i) {
|
|
431
|
+
if (p = p?.trim?.(), !te(p, String) || !p.length || /[;,]$/g.test(p)) return console.error(`StylingFactory ${f2} (setRules): [${p || "[no selector given]"}] is not a valid selector`);
|
|
432
|
+
if (m2.removeRule) return a(p);
|
|
433
|
+
let C2 = n(p, true), N2 = C2 || b2.cssRules[b2.insertRule(`${p} {}`, b2.cssRules.length || 0)];
|
|
434
|
+
return w2(() => E2(N2, m2), p, C2);
|
|
435
435
|
}
|
|
436
|
-
function h(
|
|
437
|
-
let
|
|
438
|
-
if (!te(b2, String) || !b2?.trim()?.length) return console.error(`StylingFactory ${
|
|
439
|
-
let
|
|
440
|
-
return We(() =>
|
|
436
|
+
function h(p) {
|
|
437
|
+
let m2 = p.trim().split(/{/, 2), b2 = m2.shift().trim();
|
|
438
|
+
if (!te(b2, String) || !b2?.trim()?.length) return console.error(`StylingFactory ${f2} (doParse): no (valid) selector could be extracted from rule ${ve(p)}`);
|
|
439
|
+
let C2 = Dt(m2.shift());
|
|
440
|
+
return We(() => c(b2, C2), `StylingFactory ${f2} (setRules) failed`);
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
let
|
|
444
|
-
return
|
|
442
|
+
function g2(p) {
|
|
443
|
+
let m2 = r(p);
|
|
444
|
+
return m2.done ? m2.existing : h(p);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
return
|
|
446
|
+
function S(p, m2) {
|
|
447
|
+
return p.trim().startsWith("@media") ? g2(At(p, m2)) : c(p, m2);
|
|
448
448
|
}
|
|
449
|
-
return function(
|
|
450
|
-
return o(
|
|
449
|
+
return function(p, m2 = {}) {
|
|
450
|
+
return o(p, m2) && (Object.keys(m2).length ? S(p, m2) : g2(p));
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Ft({ styleSheet: t, createWithId: e }) {
|
|
454
454
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
455
455
|
t = e ? o(e) : t;
|
|
456
|
-
function o(
|
|
457
|
-
let
|
|
458
|
-
if (
|
|
459
|
-
let
|
|
460
|
-
return document.head.insertAdjacentElement("beforeend",
|
|
461
|
-
}
|
|
462
|
-
function i(
|
|
463
|
-
return console.error(`StylingFactory ${n} [rule: ${
|
|
456
|
+
function o(g2) {
|
|
457
|
+
let S = document.querySelector(`#${g2}`)?.sheet;
|
|
458
|
+
if (S) return S;
|
|
459
|
+
let p = Object.assign(document.createElement("style"), { id: g2 });
|
|
460
|
+
return document.head.insertAdjacentElement("beforeend", p), p.sheet;
|
|
461
|
+
}
|
|
462
|
+
function i(g2) {
|
|
463
|
+
return console.error(`StylingFactory ${n} [rule: ${g2}]
|
|
464
464
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
465
465
|
}
|
|
466
|
-
function a(
|
|
467
|
-
return [...t.rules].find((
|
|
466
|
+
function a(g2, S) {
|
|
467
|
+
return [...t.rules].find((p) => S ? ze(p.selectorText || "", g2) : Pt`${Nt(g2)}${[..."gim"]}`.test(p.cssText));
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
return /^@charset|@import|namespace/i.test(
|
|
469
|
+
function w2(g2) {
|
|
470
|
+
return /^@charset|@import|namespace/i.test(g2.trim()) ? i(g2) : g2.match(/}/g)?.length > 1 ? { existing: c(g2, 1), done: true } : { done: false };
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
let
|
|
474
|
-
return
|
|
472
|
+
function f2(g2) {
|
|
473
|
+
let S = [...t.cssRules].reduce((m2, b2, C2) => ze(b2.selectorText || "", g2) && m2.concat(C2) || m2, []), p = S.length;
|
|
474
|
+
return S.forEach((m2) => t.deleteRule(m2)), p > 0 ? console.info(`\u2714 Removed ${p} instance${p > 1 ? "s" : ""} of selector ${g2} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${g2} does not exist in ${n.slice(4)}`);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
return
|
|
476
|
+
function E2(g2, S) {
|
|
477
|
+
return g2 && te(g2, String) && g2.trim().length > 0 && te(S, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
|
|
481
|
-
let
|
|
479
|
+
function c(g2) {
|
|
480
|
+
g2 = g2.trim();
|
|
481
|
+
let S = g2.slice(0, g2.indexOf("{")).trim(), p = !!a(S);
|
|
482
482
|
try {
|
|
483
|
-
return t.insertRule(`${
|
|
484
|
-
} catch (
|
|
485
|
-
return console.error(`StylingFactory ${n} (tryParse) ${
|
|
486
|
-
${
|
|
487
|
-
Rule: ${ve(
|
|
488
|
-
${r}`),
|
|
483
|
+
return t.insertRule(`${g2}`, t.cssRules.length), p;
|
|
484
|
+
} catch (m2) {
|
|
485
|
+
return console.error(`StylingFactory ${n} (tryParse) ${m2.name} Error:
|
|
486
|
+
${m2.message}
|
|
487
|
+
Rule: ${ve(g2)}
|
|
488
|
+
${r}`), p;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
function h(
|
|
491
|
+
function h(g2, S, p) {
|
|
492
492
|
try {
|
|
493
|
-
return
|
|
494
|
-
} catch (
|
|
495
|
-
return console.error(`StylingFactory ${n} (tryAddOrModify) ${
|
|
496
|
-
${
|
|
497
|
-
Rule: ${ve(
|
|
498
|
-
${r}`),
|
|
493
|
+
return g2(), p;
|
|
494
|
+
} catch (m2) {
|
|
495
|
+
return console.error(`StylingFactory ${n} (tryAddOrModify) ${m2.name} Error:
|
|
496
|
+
${m2.message}
|
|
497
|
+
Rule: ${ve(S)}
|
|
498
|
+
${r}`), p;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
return { sheet: t, removeRules:
|
|
501
|
+
return { sheet: t, removeRules: f2, tryParseAtOrNestedRules: w2, ruleExists: a, checkParams: E2, tryParse: c, consider: h, currentSheetID: n };
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
503
|
+
function At(t, e) {
|
|
504
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${Ht(n)}`)}`;
|
|
505
505
|
}
|
|
506
506
|
function ve(t) {
|
|
507
507
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
508
508
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Ht(t) {
|
|
511
511
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
512
512
|
`);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Nt(t) {
|
|
515
515
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Pt(t, ...e) {
|
|
518
518
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
519
519
|
return new RegExp((e.length && t.raw.reduce((n, o, i) => n.concat(e[i - 1] || "").concat(o), "") || t.raw.join("")).split(`
|
|
520
520
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
@@ -529,220 +529,220 @@ ${r}`), m2;
|
|
|
529
529
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function Mt(t) {
|
|
533
533
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
534
534
|
`).replaceAll("\\3b", ";").split(`
|
|
535
535
|
`);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Ot(t) {
|
|
538
538
|
return t.reduce((e, r) => {
|
|
539
539
|
let [n, o] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
540
540
|
return n && o ? { ...e, [n]: o } : e;
|
|
541
541
|
}, {});
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
543
|
+
function Dt(t) {
|
|
544
|
+
return Ot(Mt(t));
|
|
545
545
|
}
|
|
546
546
|
function ze(t, e) {
|
|
547
547
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
548
548
|
}
|
|
549
549
|
var we = false;
|
|
550
|
-
var
|
|
551
|
-
var
|
|
550
|
+
var It = { on: () => we = true, off: () => we = false };
|
|
551
|
+
var D = { tagsRaw: V, allowUnknownHtmlTags: It, isAllowed(t) {
|
|
552
552
|
if (we) return true;
|
|
553
|
-
let e =
|
|
553
|
+
let e = s(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
554
554
|
return e === "#text" || !!V[e];
|
|
555
555
|
}, allowTag: (t) => V[t.toLowerCase()] = true, prohibitTag: (t) => V[t.toLowerCase()] = false };
|
|
556
|
-
var
|
|
556
|
+
var jt = true;
|
|
557
557
|
var re = { data: /data-[\-\w.\p{L}]/ui, validURL: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, whiteSpace: /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, notAllowedValues: /^javascript|injected|noreferrer|alert|DataURL/gi };
|
|
558
|
-
function
|
|
559
|
-
if (
|
|
560
|
-
let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${
|
|
561
|
-
|
|
558
|
+
function Rt(t) {
|
|
559
|
+
if (jt && Object.keys(t.removed).length) {
|
|
560
|
+
let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${j(n)} => ${o}`], []).join("\\000A");
|
|
561
|
+
F.error(`JQx: HTML creation error(s): ${e}`);
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Jt(t) {
|
|
565
565
|
let e = t.nodeName.toLowerCase(), r = ["annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph"];
|
|
566
|
-
return /-/.test(e) && !r.find((n) => n === e) ||
|
|
566
|
+
return /-/.test(e) && !r.find((n) => n === e) || D.isAllowed(e);
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function Q(t) {
|
|
569
569
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
570
|
-
return
|
|
571
|
-
if (r?.children?.length &&
|
|
572
|
-
let o =
|
|
570
|
+
return s(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
571
|
+
if (r?.children?.length && Q(r), r?.attributes) {
|
|
572
|
+
let o = s(r, SVGElement) ? z.svg : z.html;
|
|
573
573
|
[...(r ?? { attributes: [] }).attributes].forEach((i) => {
|
|
574
|
-
let a = i.name.trim().toLowerCase(),
|
|
575
|
-
if (
|
|
576
|
-
let
|
|
577
|
-
|
|
574
|
+
let a = i.name.trim().toLowerCase(), w2 = i.value.trim().toLowerCase().replace(re.whiteSpace, ""), f2 = a === "href" ? !re.validURL.test(w2) : re.notAllowedValues.test(w2), E2 = a.startsWith("data") ? !re.data.test(a) : !!o[a];
|
|
575
|
+
if (f2 || E2) {
|
|
576
|
+
let c = ne(i.value || "none", 60);
|
|
577
|
+
c += c.length === 60 ? "..." : "", e.removed[`${i.name}`] = `attribute/property/value not allowed, removed. Value: ${c}`, r.removeAttribute(i.name);
|
|
578
578
|
}
|
|
579
579
|
});
|
|
580
580
|
}
|
|
581
|
-
if (!(
|
|
581
|
+
if (!(Jt(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
582
582
|
let o = (r?.outerHTML || r?.textContent).trim(), i = ne(o, 60) ?? "EMPTY";
|
|
583
583
|
i += i.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${i}`, r.remove();
|
|
584
584
|
}
|
|
585
|
-
}),
|
|
585
|
+
}), Rt(e), t;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Qt(t) {
|
|
588
588
|
let e = document.createElement("div");
|
|
589
|
-
return e.insertAdjacentHTML(
|
|
589
|
+
return e.insertAdjacentHTML(H.end, t), e.childNodes.length ? Q(e) : void 0;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function kt(t, e, r) {
|
|
592
592
|
switch (true) {
|
|
593
|
-
case
|
|
593
|
+
case s(t, Comment):
|
|
594
594
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
595
|
-
case
|
|
595
|
+
case s(t, Text):
|
|
596
596
|
return e.insertAdjacentText(r, t.data || t.textContent);
|
|
597
597
|
default:
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return r = r ||
|
|
603
|
-
let i =
|
|
601
|
+
function k(t = [], e = document.body, r = H.BeforeEnd) {
|
|
602
|
+
return r = r || H.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, o) => {
|
|
603
|
+
let i = I(o) && Wt(o, e, r);
|
|
604
604
|
return i ? [...n, i] : n;
|
|
605
605
|
}, []);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return r = r ||
|
|
607
|
+
function Wt(t, e = document.body, r = H.BeforeEnd) {
|
|
608
|
+
return r = r || H.BeforeEnd, e = e?.isJQx ? e?.[0] : e, s(t, Comment, Text) ? kt(t, e, r) : s(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
if (
|
|
610
|
+
function P(t) {
|
|
611
|
+
if (s(t, Text, Comment)) return t;
|
|
612
612
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
613
613
|
if (r?.length && (r = r.length > 1 ? r.filter((o) => o.length).shift() : void 0), e.startsWith("<!--") && e.endsWith("-->")) return document.createComment(t.replace(/<!--|-->$/g, ""));
|
|
614
|
-
if (r ||
|
|
615
|
-
let n =
|
|
616
|
-
return n.childNodes.length < 1 ?
|
|
614
|
+
if (r || s(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
615
|
+
let n = Qt(t);
|
|
616
|
+
return n.childNodes.length < 1 ? P(`<span data-jqxcreationerror="1">${oe(t, 60)}</span>`) : n.children[0];
|
|
617
617
|
}
|
|
618
618
|
function ie(t) {
|
|
619
619
|
if (t.node("#jqxPopup")) return;
|
|
620
620
|
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Ie);
|
|
621
621
|
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], o = {};
|
|
622
|
-
return t.handle({ type: "click, cancel", handlers:
|
|
623
|
-
function i(
|
|
622
|
+
return t.handle({ type: "click, cancel", handlers: g2, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: i, remove: a, removeModal: h });
|
|
623
|
+
function i(m2) {
|
|
624
624
|
if (n.open) switch (true) {
|
|
625
|
-
case
|
|
625
|
+
case w2(m2):
|
|
626
626
|
return;
|
|
627
627
|
default:
|
|
628
|
-
return a(), setTimeout(() => i(
|
|
628
|
+
return a(), setTimeout(() => i(m2), 200);
|
|
629
629
|
}
|
|
630
|
-
o = { ...
|
|
630
|
+
o = { ...m2 };
|
|
631
631
|
let { content: b2 } = o;
|
|
632
|
-
return t.IS(b2, String, HTMLElement) || b2?.isJQx ?
|
|
632
|
+
return t.IS(b2, String, HTMLElement) || b2?.isJQx ? f2() : true;
|
|
633
633
|
}
|
|
634
634
|
function a() {
|
|
635
|
-
return o.modal ?
|
|
635
|
+
return o.modal ? p(o.warnMessage) : E2();
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
for (let [b2,
|
|
637
|
+
function w2(m2) {
|
|
638
|
+
for (let [b2, C2] of Object.entries(o)) if (C2 !== m2[b2]) return false;
|
|
639
639
|
return true;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function f2() {
|
|
642
642
|
r.clear();
|
|
643
|
-
let { content:
|
|
643
|
+
let { content: m2, modal: b2, closeAfter: C2 } = o;
|
|
644
644
|
b2 = t.IS(b2, Boolean) ? b2 : false;
|
|
645
|
-
let
|
|
646
|
-
r.append(
|
|
645
|
+
let N2 = b2 ? "" : t.div({ id: "closeHandleIcon" });
|
|
646
|
+
r.append(N2, t.IS(m2, String) ? t.div(m2) : m2), n.showModal(), !b2 && t.IS(C2, Number) && S(a, C2);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
if (n.close(o.returnValue),
|
|
648
|
+
function E2() {
|
|
649
|
+
if (n.close(o.returnValue), c(), t.IS(o.callback, Function)) return e.push(setTimeout(() => o.callback(o.returnValue), 200));
|
|
650
650
|
o = {};
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
e.forEach((
|
|
652
|
+
function c() {
|
|
653
|
+
e.forEach((m2) => clearTimeout(m2)), e = [];
|
|
654
654
|
}
|
|
655
|
-
function h({ callback:
|
|
656
|
-
o.returnValue = b2, o.modal = false, o.callback =
|
|
655
|
+
function h({ callback: m2, value: b2 } = {}) {
|
|
656
|
+
o.returnValue = b2, o.modal = false, o.callback = m2 || o.callback, a();
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
if (!(Object.keys(o).length < 1 || !n.open) && (
|
|
658
|
+
function g2({ evt: m2 }) {
|
|
659
|
+
if (!(Object.keys(o).length < 1 || !n.open) && (m2.type === "cancel" && o.modal && m2.preventDefault(), m2.target.closest("#closeHandleIcon") || !m2.target.closest("#jqxPopupContent"))) return o.activeTimer && clearTimeout(o.activeTimer), a();
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
t.IS(
|
|
661
|
+
function S(m2, b2) {
|
|
662
|
+
t.IS(m2, Function) && t.IS(b2, Number) && b2 > 0 && (c(), e.push(setTimeout(m2, b2 * 1e3)));
|
|
663
663
|
}
|
|
664
|
-
function m2
|
|
665
|
-
if (!t.IS(
|
|
664
|
+
function p(m2) {
|
|
665
|
+
if (!t.IS(m2, String, HTMLElement, Proxy)) return;
|
|
666
666
|
let b2 = r.find$(".warn");
|
|
667
667
|
switch (true) {
|
|
668
668
|
case b2.is.empty:
|
|
669
|
-
b2 = t.div({ class: "warn" },
|
|
669
|
+
b2 = t.div({ class: "warn" }, m2);
|
|
670
670
|
default:
|
|
671
|
-
r.append(b2.addClass("active")),
|
|
671
|
+
r.append(b2.addClass("active")), S(() => r.find$(".warn").removeClass("active"), 2);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
function le(t) {
|
|
676
676
|
let e = {}, r = "anonymous_";
|
|
677
|
-
function n(
|
|
678
|
-
if (
|
|
679
|
-
let { handler: h, capture:
|
|
680
|
-
document.addEventListener(
|
|
677
|
+
function n(c) {
|
|
678
|
+
if (c) {
|
|
679
|
+
let { handler: h, capture: g2, type: S } = c;
|
|
680
|
+
document.addEventListener(S, h, { capture: g2 });
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function o(
|
|
684
|
-
if (
|
|
685
|
-
let { type: h, handler:
|
|
686
|
-
document.removeEventListener(h,
|
|
683
|
+
function o(c) {
|
|
684
|
+
if (c) {
|
|
685
|
+
let { type: h, handler: g2, capture: S } = c;
|
|
686
|
+
document.removeEventListener(h, g2, { capture: S });
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
-
function i(
|
|
690
|
-
return function(
|
|
691
|
-
if (!
|
|
692
|
-
let
|
|
693
|
-
if (
|
|
694
|
-
let b2 = t(
|
|
695
|
-
|
|
689
|
+
function i(c, h, g2, S) {
|
|
690
|
+
return function(p) {
|
|
691
|
+
if (!A(h)) return c({ evt: p });
|
|
692
|
+
let m2 = p.target.closest(h);
|
|
693
|
+
if (m2) {
|
|
694
|
+
let b2 = t(m2);
|
|
695
|
+
c({ self: b2, me: b2, evt: p }), g2 && f2(p.type, S);
|
|
696
696
|
}
|
|
697
697
|
return true;
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
function a(
|
|
701
|
-
return e[
|
|
700
|
+
function a(c) {
|
|
701
|
+
return e[c] = e[c] || {}, e[c];
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return Object.entries(a(
|
|
703
|
+
function w2(c, h) {
|
|
704
|
+
return Object.entries(a(c)).find(([g2]) => g2 === h);
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
let
|
|
708
|
-
|
|
706
|
+
function f2(c, h) {
|
|
707
|
+
let g2 = w2(c, h);
|
|
708
|
+
g2 && (o(g2[1]), delete e[c][h], delete se[h], F.warn(`Removed listener [${h}] for event type [${c}].`));
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
let { type: h, handler:
|
|
710
|
+
function E2(c) {
|
|
711
|
+
let { type: h, handler: g2, name: S, capture: p, once: m2, selector: b2, node: C2, about: N2 } = c;
|
|
712
712
|
e[h] = e[h] || {};
|
|
713
|
-
let u = Ee(
|
|
714
|
-
if (
|
|
715
|
-
let
|
|
716
|
-
|
|
713
|
+
let u = Ee(S || g2.name), y2 = g2;
|
|
714
|
+
if (C2 instanceof HTMLElement) {
|
|
715
|
+
let x2 = C2.dataset.hid || u;
|
|
716
|
+
C2.dataset.hid = x2, b2 = `[data-hid=${x2}]`;
|
|
717
717
|
}
|
|
718
718
|
switch (true) {
|
|
719
719
|
case !e[h][u]:
|
|
720
|
-
return
|
|
721
|
-
|
|
720
|
+
return F.log(`JQx: created listener for event type ${h}, with handler name ${u}`), e[h][u] = { name: u, handler: i(g2, b2, m2, u), capture: Be(h, p), once: !!m2, type: h, initialHandler: y2, selector: !!b2 && b2 || false, about: !!N2 && N2 || false, unListen() {
|
|
721
|
+
f2(h, u);
|
|
722
722
|
} }, e[h][u];
|
|
723
723
|
default:
|
|
724
724
|
return console.warn(`The listener [${u}] for [${h}] exists, it is not re-assigned.`);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
return { remove(...
|
|
728
|
-
return
|
|
729
|
-
}, listen: function(
|
|
730
|
-
let { type: h, handler:
|
|
731
|
-
if (!
|
|
732
|
-
let
|
|
733
|
-
if (
|
|
734
|
-
|
|
727
|
+
return { remove(...c) {
|
|
728
|
+
return f2(...c);
|
|
729
|
+
}, listen: function(c) {
|
|
730
|
+
let { type: h, handler: g2 } = c;
|
|
731
|
+
if (!A(h) || !s(g2, Function)) return;
|
|
732
|
+
let S = E2(c);
|
|
733
|
+
if (S) return n(S), { type: h, name: S.name, unListen() {
|
|
734
|
+
f2(h, S.name);
|
|
735
735
|
} };
|
|
736
736
|
}, get ListenerStore() {
|
|
737
737
|
return Object.freeze({ ...e });
|
|
738
738
|
} };
|
|
739
739
|
}
|
|
740
|
-
var
|
|
741
|
-
var
|
|
742
|
-
var
|
|
740
|
+
var F = Vt();
|
|
741
|
+
var zt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
742
|
+
var H = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
743
743
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
744
744
|
} }));
|
|
745
|
-
var
|
|
745
|
+
var Bt = [...Array(26)].map((t, e) => String.fromCharCode(e + 65)).concat([...Array(26)].map((t, e) => String.fromCharCode(e + 97))).concat([...Array(10)].map((t, e) => `${e}`));
|
|
746
746
|
var Le = Object.freeze({ get(t, e) {
|
|
747
747
|
return t[Y(e)] || t[e];
|
|
748
748
|
}, enumerable: false, configurable: false });
|
|
@@ -753,10 +753,10 @@ ${r}`), m2;
|
|
|
753
753
|
for (; t >= 0; ) clearTimeout(t--);
|
|
754
754
|
}
|
|
755
755
|
function Ee(t) {
|
|
756
|
-
return
|
|
756
|
+
return A(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : Ve();
|
|
757
757
|
}
|
|
758
758
|
function $e(t) {
|
|
759
|
-
let e = !!t.node && !
|
|
759
|
+
let e = !!t.node && !s(t, Text, Comment);
|
|
760
760
|
switch (true) {
|
|
761
761
|
case e:
|
|
762
762
|
let r = t.node.dataset ? Object.keys(t.node.dataset).map((i) => `[data-${i}]`) : [], o = [t.attr("id") && `#${t?.attr("id")}` || void 0, t.attr("class") && t?.attr("class").split(" ").map((i) => `.${i}`).join(", ") || void 0, r.length > 0 && r.join(", ") || void 0].filter((i) => !!i).join(", ") || [];
|
|
@@ -770,10 +770,10 @@ ${r}`), m2;
|
|
|
770
770
|
return se[e] ? Ve() : (se[e] = e, e);
|
|
771
771
|
}
|
|
772
772
|
function Be(t, e) {
|
|
773
|
-
return !!
|
|
773
|
+
return !!zt.find((r) => r === t) || !!e;
|
|
774
774
|
}
|
|
775
775
|
function ce(t) {
|
|
776
|
-
return t.startsWith("data") ||
|
|
776
|
+
return t.startsWith("data") || z.html.find((e) => t.toLowerCase() === e);
|
|
777
777
|
}
|
|
778
778
|
function fe(t) {
|
|
779
779
|
return t && (t.textContent = "");
|
|
@@ -781,8 +781,8 @@ ${r}`), m2;
|
|
|
781
781
|
function G(t, e = 0, r = true) {
|
|
782
782
|
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? G(t, e, r) : e;
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
return e =
|
|
784
|
+
function A(t, e = 1) {
|
|
785
|
+
return e = s(e, Number) && e || 1, s(t, String) && t.length >= e;
|
|
786
786
|
}
|
|
787
787
|
function ne(t, e = 120) {
|
|
788
788
|
return oe(t, e).replace(/</g, "<");
|
|
@@ -790,9 +790,9 @@ ${r}`), m2;
|
|
|
790
790
|
function oe(t, e = 120) {
|
|
791
791
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function j(t) {
|
|
794
794
|
switch (true) {
|
|
795
|
-
case
|
|
795
|
+
case s(t, String):
|
|
796
796
|
let e = document.createElement("div");
|
|
797
797
|
return e.append(t), e.innerHTML;
|
|
798
798
|
default:
|
|
@@ -800,9 +800,9 @@ ${r}`), m2;
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
function Ce(t) {
|
|
803
|
-
return
|
|
803
|
+
return s(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Vt() {
|
|
806
806
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
807
807
|
return t = true, n;
|
|
808
808
|
}, get off() {
|
|
@@ -820,40 +820,40 @@ ${r}`), m2;
|
|
|
820
820
|
function i() {
|
|
821
821
|
e = false;
|
|
822
822
|
}
|
|
823
|
-
function a(...
|
|
824
|
-
return r.unshift(...
|
|
823
|
+
function a(...E2) {
|
|
824
|
+
return r.unshift(...E2.map((c) => `${ue()} \u2A3B ${Ce(c)}`)), console.error(r.slice(0, E2.length).join(`
|
|
825
825
|
`)), n;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
return r.unshift(...
|
|
827
|
+
function w2(...E2) {
|
|
828
|
+
return r.unshift(...E2.map((c) => `${ue()} \u26A0 ${Ce(c)}`)), console.warn(r.slice(0, E2.length).join(`
|
|
829
829
|
`)), n;
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
let
|
|
833
|
-
switch (!e && r.unshift(...
|
|
831
|
+
function f2(...E2) {
|
|
832
|
+
let c = E2.map((h) => `${ue()} \u2714 ${Ce(h)}`);
|
|
833
|
+
switch (!e && r.unshift(...c), t) {
|
|
834
834
|
case true:
|
|
835
|
-
console.log(
|
|
835
|
+
console.log(c.join(`
|
|
836
836
|
`));
|
|
837
837
|
default:
|
|
838
838
|
return n;
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
return Object.defineProperties(n, { log: { value:
|
|
841
|
+
return Object.defineProperties(n, { log: { value: f2, enumerable: false }, error: { value: a, enumerable: false }, warn: { value: w2, enumerable: false } }), Object.freeze(n);
|
|
842
842
|
}
|
|
843
843
|
function ue() {
|
|
844
844
|
return ((t) => `[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
845
845
|
}
|
|
846
846
|
function Fe(t, e) {
|
|
847
847
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
848
|
-
if (r =
|
|
849
|
-
|
|
848
|
+
if (r = M(r), r.startsWith("data")) return de(t, n);
|
|
849
|
+
s(n, String) && ce(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
function de(t, e) {
|
|
853
|
-
if (t &&
|
|
853
|
+
if (t && s(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${M(r)}`, n);
|
|
854
854
|
}
|
|
855
855
|
function me(t) {
|
|
856
|
-
return t ?
|
|
856
|
+
return t ? s(t, Proxy) ? [t.EL] : s(t, NodeList) ? [...t] : I(t) ? [t] : K(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
857
857
|
}
|
|
858
858
|
function ge(t, e) {
|
|
859
859
|
return t.andThen(e);
|
|
@@ -861,23 +861,23 @@ ${r}`), m2;
|
|
|
861
861
|
function pe(t, e) {
|
|
862
862
|
return t.andThen(e, true);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
865
|
-
return
|
|
864
|
+
function I(t) {
|
|
865
|
+
return s(t, Text, HTMLElement, Comment);
|
|
866
866
|
}
|
|
867
867
|
function Z(t, e) {
|
|
868
|
-
if (
|
|
868
|
+
if (s(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
869
869
|
let o;
|
|
870
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty(
|
|
870
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty(M(r), n, o);
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function R(t) {
|
|
874
874
|
let e = t.cloneNode(true);
|
|
875
875
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
876
876
|
}
|
|
877
877
|
function Ue(t) {
|
|
878
|
-
if (!
|
|
879
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), i = !!t.hidden, a = parseInt(r.height) < 1 || parseInt(r.width) < 1,
|
|
880
|
-
return !(i ||
|
|
878
|
+
if (!s(t, HTMLElement)) return;
|
|
879
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), i = !!t.hidden, a = parseInt(r.height) < 1 || parseInt(r.width) < 1, w2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, f2 = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
880
|
+
return !(i || w2 || f2 || o || n || a);
|
|
881
881
|
}
|
|
882
882
|
function _e(t) {
|
|
883
883
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
@@ -892,10 +892,10 @@ ${r}`), m2;
|
|
|
892
892
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
893
893
|
}
|
|
894
894
|
function ye() {
|
|
895
|
-
return `_${
|
|
895
|
+
return `_${Ut(Bt).slice(0, 8).join("")}`;
|
|
896
896
|
}
|
|
897
897
|
function Ae(t) {
|
|
898
|
-
return t =
|
|
898
|
+
return t = s(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, s(t, Array) ? t : s(t, String) && t?.trim().toLowerCase() || "";
|
|
899
899
|
}
|
|
900
900
|
function Ye(t) {
|
|
901
901
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
@@ -910,7 +910,7 @@ ${r}`), m2;
|
|
|
910
910
|
return e;
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Ut(t) {
|
|
914
914
|
let e = t.length;
|
|
915
915
|
for (; e--; ) {
|
|
916
916
|
let r = Ze(e);
|
|
@@ -919,56 +919,56 @@ ${r}`), m2;
|
|
|
919
919
|
return t;
|
|
920
920
|
}
|
|
921
921
|
function Y(t) {
|
|
922
|
-
return
|
|
922
|
+
return s(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${_t(e)}` || e).join("") : t;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function M(t) {
|
|
925
925
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function _t([t, ...e]) {
|
|
928
928
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
929
929
|
}
|
|
930
930
|
function be(t) {
|
|
931
|
-
return
|
|
931
|
+
return s(t, Comment, Text);
|
|
932
932
|
}
|
|
933
933
|
function Ne(t) {
|
|
934
|
-
|
|
934
|
+
s(t, Comment);
|
|
935
935
|
}
|
|
936
936
|
function Xe(t) {
|
|
937
|
-
return
|
|
937
|
+
return s(t, Text);
|
|
938
938
|
}
|
|
939
939
|
function X(t) {
|
|
940
|
-
return
|
|
940
|
+
return s(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
941
941
|
}
|
|
942
942
|
function K(t) {
|
|
943
|
-
return
|
|
943
|
+
return s(t, Array) && !t?.find((e) => !I(e));
|
|
944
944
|
}
|
|
945
945
|
function he(t) {
|
|
946
|
-
return
|
|
946
|
+
return s(t, Array) && !t?.find((e) => !X(e));
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function T(t, e) {
|
|
949
949
|
let r = t.collection.filter((n) => !be(n));
|
|
950
950
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
951
951
|
return t;
|
|
952
952
|
}
|
|
953
953
|
function Ke(t) {
|
|
954
|
-
return t.node ?
|
|
954
|
+
return t.node ? s(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
955
955
|
}
|
|
956
956
|
function Pe(t, e, r) {
|
|
957
|
-
let n = e !== document.body &&
|
|
957
|
+
let n = e !== document.body && s(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
958
958
|
try {
|
|
959
959
|
r.collection = [...n.querySelectorAll(t)];
|
|
960
960
|
} catch {
|
|
961
|
-
|
|
961
|
+
F.warn(`JQx: Invalid CSS querySelector. [${s(t, String) ? t : "Not a string!"}]`);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
964
|
function qe() {
|
|
965
|
-
return { isCommentOrTextNode: be, isNode:
|
|
965
|
+
return { isCommentOrTextNode: be, isNode: I, isComment: Ne, isText: Xe, isHtmlString: X, isArrayOfHtmlElements: K, isArrayOfHtmlStrings: he, ElemArray2HtmlString: Ge, input2Collection: me, setCollectionFromCssSelector: Pe, cssRuleEdit: _({ createWithId: "JQxStylesheet" }) };
|
|
966
966
|
}
|
|
967
967
|
function et() {
|
|
968
968
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
969
969
|
return (r) => {
|
|
970
970
|
let n = r.node;
|
|
971
|
-
return
|
|
971
|
+
return s(n, Node) ? Object.freeze({ get writable() {
|
|
972
972
|
return _e(n);
|
|
973
973
|
}, get modal() {
|
|
974
974
|
return Ye(n);
|
|
@@ -988,31 +988,31 @@ ${r}`), m2;
|
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
990
|
function tt(t, e, r, n) {
|
|
991
|
-
r &&
|
|
991
|
+
r && s(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
992
992
|
let o;
|
|
993
993
|
e.className && (o = e.className, delete e.className), o = [...t.classList].find((a) => a.startsWith("JQxClass-") || o && a === o) || o || `JQxClass-${ye().slice(1)}`, n.editCssRule(`.${o}`, e), t.classList.add(o);
|
|
994
994
|
}
|
|
995
|
-
var
|
|
995
|
+
var Gt = et();
|
|
996
996
|
function rt(t) {
|
|
997
|
-
return { factoryExtensions:
|
|
997
|
+
return { factoryExtensions: Zt(t), instanceExtensions: Yt(t) };
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function Zt(t) {
|
|
1000
1000
|
return { data(e) {
|
|
1001
1001
|
return { get all() {
|
|
1002
1002
|
return new Proxy(e[0]?.dataset ?? {}, Le);
|
|
1003
1003
|
}, set(r = {}) {
|
|
1004
|
-
if (!e.is.empty &&
|
|
1004
|
+
if (!e.is.empty && s(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1005
1005
|
return e;
|
|
1006
1006
|
}, get(r, n) {
|
|
1007
1007
|
return e.data.all[r] ?? n;
|
|
1008
1008
|
}, add(r = {}) {
|
|
1009
|
-
if (!e.is.empty &&
|
|
1009
|
+
if (!e.is.empty && s(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1010
1010
|
return e;
|
|
1011
1011
|
}, remove(r) {
|
|
1012
|
-
return e[0]?.removeAttribute(`data-${
|
|
1012
|
+
return e[0]?.removeAttribute(`data-${M(r)}`), e;
|
|
1013
1013
|
} };
|
|
1014
1014
|
}, dimensions(e) {
|
|
1015
|
-
if (e.is.empty) return
|
|
1015
|
+
if (e.is.empty) return F.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1016
1016
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1017
1017
|
return n.scrollTopDistance = G(r, 0), n.scrollLeftDistance = G(r, 0, false), n;
|
|
1018
1018
|
}, node(e) {
|
|
@@ -1021,20 +1021,20 @@ ${r}`), m2;
|
|
|
1021
1021
|
return { get(r, n) {
|
|
1022
1022
|
if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
|
|
1023
1023
|
let o = r ? e.outerHtml : e.html();
|
|
1024
|
-
return n ?
|
|
1024
|
+
return n ? j(o) : o;
|
|
1025
1025
|
}, set(r, n = false, o = false) {
|
|
1026
1026
|
r = r.isJQx ? r.HTML.get(1) : r;
|
|
1027
|
-
let i =
|
|
1028
|
-
return r = i && o ?
|
|
1027
|
+
let i = s(r, String);
|
|
1028
|
+
return r = i && o ? j(r) : r, i && (r || "").trim().length && e.html(r, n), e;
|
|
1029
1029
|
}, replace(r, n = false) {
|
|
1030
1030
|
return e.HTML.set(r, false, n);
|
|
1031
1031
|
}, append(r, n = false) {
|
|
1032
|
-
return r =
|
|
1032
|
+
return r = s(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r, true, n);
|
|
1033
1033
|
}, insert(r, n = false) {
|
|
1034
|
-
return r =
|
|
1034
|
+
return r = s(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1035
1035
|
} };
|
|
1036
1036
|
}, is(e) {
|
|
1037
|
-
return
|
|
1037
|
+
return Gt(e);
|
|
1038
1038
|
}, length(e) {
|
|
1039
1039
|
return e.collection.length;
|
|
1040
1040
|
}, outerHtml(e) {
|
|
@@ -1057,67 +1057,67 @@ ${r}`), m2;
|
|
|
1057
1057
|
}, inSheet(r) {
|
|
1058
1058
|
return e.css(r);
|
|
1059
1059
|
}, valueOf(r) {
|
|
1060
|
-
return e.is.empty ? void 0 : getComputedStyle(e[0])[
|
|
1060
|
+
return e.is.empty ? void 0 : getComputedStyle(e[0])[M(r)];
|
|
1061
1061
|
}, nwRule(r) {
|
|
1062
1062
|
return e.Style.byRule({ rules: r });
|
|
1063
1063
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
1064
|
-
let i =
|
|
1065
|
-
if (n = n &&
|
|
1064
|
+
let i = s(n, String) && !r.length ? n.split("{")[0].trim() : "";
|
|
1065
|
+
if (n = n && s(n, String) ? [n] : n, r = r && s(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let a of r) e.addClass(a);
|
|
1066
1066
|
return i?.startsWith(".") && e.addClass(i.slice(1)), i?.startsWith("#") && !e.attr("id") && e.prop({ id: i.slice(1) }), e;
|
|
1067
1067
|
} };
|
|
1068
1068
|
} };
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Yt(t) {
|
|
1071
1071
|
return { addClass(e, ...r) {
|
|
1072
|
-
return
|
|
1072
|
+
return T(e, (n) => n && r.forEach((o) => n.classList.add(o)));
|
|
1073
1073
|
}, after: ge, afterMe: ge, andThen(e, r, n = false) {
|
|
1074
|
-
if (!r || !
|
|
1075
|
-
r = r?.isJQx ? r :
|
|
1074
|
+
if (!r || !s(r, String, Node, Proxy)) return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."), e;
|
|
1075
|
+
r = r?.isJQx ? r : s(r, Node) ? t.virtual(r) : t.virtual(P(r));
|
|
1076
1076
|
let [o, i, a] = n ? [0, "before", r.collection.concat(e.collection)] : [e.collection.length - 1, "after", e.collection.concat(r.collection)];
|
|
1077
1077
|
return e[o][i](...r.collection), e.collection = a, e;
|
|
1078
1078
|
}, append(e, ...r) {
|
|
1079
1079
|
if (e.is.empty || r.length < 1) return e;
|
|
1080
1080
|
let n = e.length === 1;
|
|
1081
1081
|
for (let o of r) {
|
|
1082
|
-
if (!o.isJQx &&
|
|
1083
|
-
let i = o.trim(),
|
|
1084
|
-
|
|
1082
|
+
if (!o.isJQx && A(o)) {
|
|
1083
|
+
let i = o.trim(), w2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(o) : P(o);
|
|
1084
|
+
T(e, (f2) => f2.append(n ? w2 : R(w2)));
|
|
1085
1085
|
}
|
|
1086
|
-
|
|
1086
|
+
I(o) && T(e, (i) => i.append(n ? o : R(o))), o.isJQx && !o.is.empty && T(e, (i) => o.collection.forEach((a) => i.append(n ? a : R(a))));
|
|
1087
1087
|
}
|
|
1088
1088
|
return e;
|
|
1089
1089
|
}, appendTo(e, r) {
|
|
1090
1090
|
switch (true) {
|
|
1091
|
-
case (!r.isJQx && !
|
|
1091
|
+
case (!r.isJQx && !s(r, HTMLElement)):
|
|
1092
1092
|
return $.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1093
1093
|
default:
|
|
1094
1094
|
return (r.isJQx ? r : t(r)).append(e), e;
|
|
1095
1095
|
}
|
|
1096
1096
|
}, attr(e, r, n) {
|
|
1097
|
-
if (!e.node ||
|
|
1098
|
-
if (!n &&
|
|
1099
|
-
if (
|
|
1097
|
+
if (!e.node || s(e.node, Text, Comment)) return e;
|
|
1098
|
+
if (!n && A(r)) return r = M(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1099
|
+
if (A(r) && n) switch (r = M(r), true) {
|
|
1100
1100
|
case r.startsWith("data-"):
|
|
1101
1101
|
r = { data: { [r.replace("data-", "")]: n } };
|
|
1102
1102
|
break;
|
|
1103
1103
|
default:
|
|
1104
1104
|
r = { [r]: n };
|
|
1105
1105
|
}
|
|
1106
|
-
return
|
|
1106
|
+
return s(r, Object) && !e.is.empty && Fe(e.node, r), e;
|
|
1107
1107
|
}, before: pe, beforeMe: pe, clear(e) {
|
|
1108
|
-
return
|
|
1108
|
+
return T(e, fe);
|
|
1109
1109
|
}, closest(e, r) {
|
|
1110
|
-
let n =
|
|
1110
|
+
let n = A(r) ? e.node?.closest(r) : void 0;
|
|
1111
1111
|
return n ? t(n) : e;
|
|
1112
1112
|
}, computedStyle(e, r) {
|
|
1113
1113
|
let { node: n } = e;
|
|
1114
1114
|
return n && getComputedStyle(n)[r];
|
|
1115
1115
|
}, css(e, r, n) {
|
|
1116
|
-
return
|
|
1116
|
+
return T(e, (o) => tt(o, r, n, t));
|
|
1117
1117
|
}, duplicate(e, r = false, n = document.body) {
|
|
1118
1118
|
switch (true) {
|
|
1119
1119
|
case e.is.empty:
|
|
1120
|
-
return
|
|
1120
|
+
return F.error("Duplicating an empty JQx instance is not possible"), e;
|
|
1121
1121
|
default:
|
|
1122
1122
|
let o = e.collection[0].cloneNode(true);
|
|
1123
1123
|
return o.childNodes.forEach((i) => {
|
|
@@ -1125,9 +1125,9 @@ ${r}`), m2;
|
|
|
1125
1125
|
}), r ? t(o).toDOM(n) : t.virtual(o);
|
|
1126
1126
|
}
|
|
1127
1127
|
}, each(e, r) {
|
|
1128
|
-
return
|
|
1128
|
+
return T(e, r);
|
|
1129
1129
|
}, empty(e) {
|
|
1130
|
-
return
|
|
1130
|
+
return T(e, fe);
|
|
1131
1131
|
}, find(e, r) {
|
|
1132
1132
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1133
1133
|
}, find$(e, r) {
|
|
@@ -1141,24 +1141,24 @@ ${r}`), m2;
|
|
|
1141
1141
|
}, hasClass(e, ...r) {
|
|
1142
1142
|
return e.is.empty || !e.node.classList.length ? false : r.find((n) => e.node.classList.contains(n)) && true || false;
|
|
1143
1143
|
}, hide(e) {
|
|
1144
|
-
return
|
|
1144
|
+
return T(e, (r) => Z(r, { display: "none !important" }));
|
|
1145
1145
|
}, html(e, r, n) {
|
|
1146
1146
|
switch (true) {
|
|
1147
|
-
case (e.is.empty && !
|
|
1147
|
+
case (e.is.empty && !A(r)):
|
|
1148
1148
|
return "";
|
|
1149
|
-
case !
|
|
1149
|
+
case !A(r):
|
|
1150
1150
|
return e.node?.getHTML() ?? "";
|
|
1151
1151
|
default:
|
|
1152
|
-
let o =
|
|
1153
|
-
return
|
|
1152
|
+
let o = P(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
|
|
1153
|
+
return T(e, (a) => (a.textContent = n ? a.textContent : "", a.insertAdjacentHTML(t.at.end, o.getHTML())));
|
|
1154
1154
|
}
|
|
1155
1155
|
}, htmlFor(e, r, n = "", o = false) {
|
|
1156
|
-
if (e.is.empty || !
|
|
1156
|
+
if (e.is.empty || !A(r) || !A(n)) return e;
|
|
1157
1157
|
let i = e.find$(r);
|
|
1158
1158
|
if (i.length < 1) return e;
|
|
1159
|
-
let a =
|
|
1160
|
-
return i.each((
|
|
1161
|
-
o || (
|
|
1159
|
+
let a = P(`<span>${n}</span>`);
|
|
1160
|
+
return i.each((w2) => {
|
|
1161
|
+
o || (w2.textContent = ""), w2.insertAdjacentHTML(t.at.end, a?.getHTML());
|
|
1162
1162
|
}), e;
|
|
1163
1163
|
}, isEmpty(e) {
|
|
1164
1164
|
return !e.node;
|
|
@@ -1166,14 +1166,14 @@ ${r}`), m2;
|
|
|
1166
1166
|
return e.single(r);
|
|
1167
1167
|
}, on(e, r, ...n) {
|
|
1168
1168
|
switch (true) {
|
|
1169
|
-
case (e.is.empty || !
|
|
1169
|
+
case (e.is.empty || !s(r, String, Array) || !A(r) || n.length < 1):
|
|
1170
1170
|
return e;
|
|
1171
1171
|
default:
|
|
1172
1172
|
return t.handle({ type: r, node: e.node, handler: n }), e;
|
|
1173
1173
|
}
|
|
1174
1174
|
}, once(e, r, ...n) {
|
|
1175
1175
|
switch (true) {
|
|
1176
|
-
case (e.is.empty || !
|
|
1176
|
+
case (e.is.empty || !s(r, String, Array) || !A(r) || n.length < 1):
|
|
1177
1177
|
return e;
|
|
1178
1178
|
default:
|
|
1179
1179
|
return t.handle({ type: r, once: true, node: e.node, handler: n }), e;
|
|
@@ -1182,25 +1182,25 @@ ${r}`), m2;
|
|
|
1182
1182
|
if (e.is.empty || !r) return;
|
|
1183
1183
|
let n = e.length === 1;
|
|
1184
1184
|
for (let o of r) {
|
|
1185
|
-
if (
|
|
1185
|
+
if (A(o)) {
|
|
1186
1186
|
o = o.trim();
|
|
1187
|
-
let a = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) :
|
|
1188
|
-
a = n ? a :
|
|
1187
|
+
let a = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) : P(o);
|
|
1188
|
+
a = n ? a : R(a), T(e, (w2) => w2.prepend(a.cloneNode(true)));
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
I(o) && T(e, (i) => i.prepend(n ? o : R(o))), o.isJQx && !o.is.empty && (o.collection.length > 1 && o.collection.reverse(), T(e, (i) => T(o, (a) => i.prepend(n ? a : R(a)))), o.collection.reverse());
|
|
1191
1191
|
}
|
|
1192
1192
|
return e;
|
|
1193
1193
|
}, prependTo(e, r) {
|
|
1194
1194
|
return r.isJQx || (r = t.virtual(r)), r.prepend(e), e;
|
|
1195
1195
|
}, prop(e, r, n) {
|
|
1196
|
-
if (
|
|
1197
|
-
let o =
|
|
1196
|
+
if (s(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1197
|
+
let o = s(r, Object) ? r : { [r]: n };
|
|
1198
1198
|
for (let [i, a] of Object.entries(o)) {
|
|
1199
1199
|
if (i = i.trim(), a && !ce(i) || !a) return false;
|
|
1200
1200
|
if (i.toLowerCase() === "id") return e[0].id = a;
|
|
1201
|
-
|
|
1202
|
-
if (i.startsWith("data")) return
|
|
1203
|
-
|
|
1201
|
+
T(e, (f2) => {
|
|
1202
|
+
if (i.startsWith("data")) return f2.dataset[i.slice(i.indexOf("-") + 1)] = a;
|
|
1203
|
+
f2[i] = a;
|
|
1204
1204
|
});
|
|
1205
1205
|
}
|
|
1206
1206
|
return e;
|
|
@@ -1208,40 +1208,40 @@ ${r}`), m2;
|
|
|
1208
1208
|
let n = (i) => i.remove(), o = () => e.collection = e.collection.filter((i) => document.documentElement.contains(i));
|
|
1209
1209
|
if (r) {
|
|
1210
1210
|
let i = e.find$(r);
|
|
1211
|
-
return i.is.empty || (
|
|
1211
|
+
return i.is.empty || (T(i, n), o()), e;
|
|
1212
1212
|
}
|
|
1213
|
-
return
|
|
1213
|
+
return T(e, n), o(), e;
|
|
1214
1214
|
}, rmAttr(e, ...r) {
|
|
1215
1215
|
for (let n of r) e.node.removeAttribute(n);
|
|
1216
1216
|
return e;
|
|
1217
1217
|
}, removeClass(e, ...r) {
|
|
1218
|
-
return
|
|
1218
|
+
return T(e, (n) => {
|
|
1219
1219
|
if (n) for (let o of r) n.classList.remove(o);
|
|
1220
1220
|
});
|
|
1221
1221
|
}, renderTo(e, r, n) {
|
|
1222
|
-
return r =
|
|
1222
|
+
return r = s(r, HTMLElement) || r.isJQx ? r : document.body, n = s(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
|
|
1223
1223
|
}, replace(e, r, n) {
|
|
1224
1224
|
let o = e.node;
|
|
1225
|
-
return !r || !
|
|
1225
|
+
return !r || !s(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || s(n, NodeList)) && (n = n[0]), o && r && (r = s(r, String) ? o.querySelectorAll(r) : r.isJQx ? r.collection : r, s(r, HTMLElement, NodeList, Array) && s(n, HTMLElement) && (s(r, HTMLElement) ? [r] : [...r]).forEach((i) => i.replaceWith(n.cloneNode(true)))), e);
|
|
1226
1226
|
}, replaceClass(e, r, ...n) {
|
|
1227
|
-
return
|
|
1227
|
+
return T(e, (o) => {
|
|
1228
1228
|
o.classList.remove(r);
|
|
1229
1229
|
for (let i of n) o.classList.add(i);
|
|
1230
1230
|
});
|
|
1231
1231
|
}, replaceMe(e, r) {
|
|
1232
1232
|
return e.replaceWith(r);
|
|
1233
1233
|
}, replaceWith(e, r) {
|
|
1234
|
-
return r =
|
|
1234
|
+
return r = s(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1235
1235
|
}, setData(e, r) {
|
|
1236
|
-
return
|
|
1236
|
+
return T(e, (n) => de(n, r));
|
|
1237
1237
|
}, show(e) {
|
|
1238
|
-
return
|
|
1238
|
+
return T(e, (r) => Z(r, { display: "revert-layer !important" }));
|
|
1239
1239
|
}, single(e, r) {
|
|
1240
1240
|
let n = e.collection.length > 0;
|
|
1241
1241
|
switch (r = r ?? 0, true) {
|
|
1242
|
-
case (n &&
|
|
1242
|
+
case (n && s(r, String)):
|
|
1243
1243
|
return e.find$(r);
|
|
1244
|
-
case (n &&
|
|
1244
|
+
case (n && s(r, Number)):
|
|
1245
1245
|
return t(e.collection[r]);
|
|
1246
1246
|
case n:
|
|
1247
1247
|
return e.collection[0];
|
|
@@ -1249,51 +1249,51 @@ ${r}`), m2;
|
|
|
1249
1249
|
return e;
|
|
1250
1250
|
}
|
|
1251
1251
|
}, style(e, r, n) {
|
|
1252
|
-
return
|
|
1253
|
-
n &&
|
|
1252
|
+
return T(e, (i) => {
|
|
1253
|
+
n && s(r, String) && (r = { [r]: n || "none" }), Z(i, r);
|
|
1254
1254
|
});
|
|
1255
1255
|
}, text(e, r, n = false) {
|
|
1256
1256
|
switch (true) {
|
|
1257
1257
|
case e.isEmpty():
|
|
1258
1258
|
return e;
|
|
1259
|
-
case !
|
|
1259
|
+
case !s(r, String):
|
|
1260
1260
|
return e.node.textContent;
|
|
1261
1261
|
default:
|
|
1262
|
-
return
|
|
1262
|
+
return T(e, (o) => o.textContent = n ? o.textContent + r : r);
|
|
1263
1263
|
}
|
|
1264
|
-
}, toDOM(e, r = document.body, n =
|
|
1265
|
-
return e.isVirtual = false,
|
|
1264
|
+
}, toDOM(e, r = document.body, n = H.BeforeEnd) {
|
|
1265
|
+
return e.isVirtual = false, k(e.collection, r, n), e;
|
|
1266
1266
|
}, toggleClass(e, r) {
|
|
1267
|
-
return
|
|
1267
|
+
return T(e, (n) => n.classList.toggle(r));
|
|
1268
1268
|
}, toNodeList(e) {
|
|
1269
1269
|
return [...e.collection].map((r) => document.importNode(r, true));
|
|
1270
1270
|
}, trigger(e, r, n, o) {
|
|
1271
|
-
n =
|
|
1271
|
+
n = s(n, Function) ? n : Event, o = s(o, Object) ? { ...o, bubbles: o.bubbles ?? true } : { bubbles: true };
|
|
1272
1272
|
let i = new n(r, o);
|
|
1273
1273
|
return e.is.empty || e.each((a) => a.dispatchEvent(i)), e;
|
|
1274
1274
|
}, val(e, r) {
|
|
1275
1275
|
switch (true) {
|
|
1276
|
-
case (e.is.empty || !
|
|
1276
|
+
case (e.is.empty || !s(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
|
|
1277
1277
|
return e;
|
|
1278
|
-
case !
|
|
1278
|
+
case !s(r, String):
|
|
1279
1279
|
return e.node.value;
|
|
1280
1280
|
default:
|
|
1281
|
-
return e.node.value =
|
|
1281
|
+
return e.node.value = s(r, String) ? r : "", e;
|
|
1282
1282
|
}
|
|
1283
1283
|
} };
|
|
1284
1284
|
}
|
|
1285
1285
|
var Me;
|
|
1286
1286
|
var Se;
|
|
1287
|
-
var { isComment:
|
|
1288
|
-
function
|
|
1289
|
-
return { ...qe(), addFn:
|
|
1287
|
+
var { isComment: nn, isText: on, isHtmlString: ln, isArrayOfHtmlElements: sn, isArrayOfHtmlStrings: an, ElemArray2HtmlString: un, cssRuleEdit: Oe, addFn: Xt } = Kt();
|
|
1288
|
+
function Kt() {
|
|
1289
|
+
return { ...qe(), addFn: qt };
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return t = t?.trim(), !
|
|
1291
|
+
function qt(t, e) {
|
|
1292
|
+
return t = t?.trim(), !A(t) || !s(e, Function) ? F.error("JQx.fn: method invalid parameter(s)") : Se[t] = (r, ...n) => e(r, ...n);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function er(t) {
|
|
1295
1295
|
return function(e, r, n) {
|
|
1296
|
-
if (e = e?.trim(), !
|
|
1296
|
+
if (e = e?.trim(), !A(e) || !s(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1297
1297
|
let o = n ? { get() {
|
|
1298
1298
|
return r();
|
|
1299
1299
|
} } : { value(...i) {
|
|
@@ -1304,20 +1304,20 @@ ${r}`), m2;
|
|
|
1304
1304
|
} catch {
|
|
1305
1305
|
return t.warn(`JQx.staticFn: extension [${e}] already exists`);
|
|
1306
1306
|
}
|
|
1307
|
-
return
|
|
1307
|
+
return F.log(`JQx: added static extension function [${e}]`);
|
|
1308
1308
|
};
|
|
1309
1309
|
}
|
|
1310
1310
|
function q(t) {
|
|
1311
|
-
return new Proxy(t, Object.freeze({ get: (e, r) =>
|
|
1311
|
+
return new Proxy(t, Object.freeze({ get: (e, r) => tr(e, r, t) }));
|
|
1312
1312
|
}
|
|
1313
1313
|
function nt(t, e) {
|
|
1314
|
-
return (...r) =>
|
|
1314
|
+
return (...r) => s(t, Function) && t(q(e), ...r);
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function tr(t, e, r) {
|
|
1317
1317
|
switch (true) {
|
|
1318
|
-
case
|
|
1319
|
-
return
|
|
1320
|
-
case
|
|
1318
|
+
case s(e, Symbol):
|
|
1319
|
+
return W({ trial: () => t[e], whenError: () => t });
|
|
1320
|
+
case s(+e, Number):
|
|
1321
1321
|
return t.collection?.[e] || void 0;
|
|
1322
1322
|
case e in Me:
|
|
1323
1323
|
return nt(Me[e], r)();
|
|
@@ -1328,16 +1328,16 @@ ${r}`), m2;
|
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
1330
|
function lt(t) {
|
|
1331
|
-
let e =
|
|
1331
|
+
let e = lr(t);
|
|
1332
1332
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1333
1333
|
return t;
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function rr(t) {
|
|
1336
1336
|
return { allow(e) {
|
|
1337
1337
|
let r = /-/.test(e), n = r && e;
|
|
1338
|
-
e = r ? Y(e) : e.toLowerCase(),
|
|
1338
|
+
e = r ? Y(e) : e.toLowerCase(), D.allowTag(e), Object.defineProperties(t, De(e, true, t, n));
|
|
1339
1339
|
}, prohibit(e) {
|
|
1340
|
-
e = e.toLowerCase(),
|
|
1340
|
+
e = e.toLowerCase(), D.prohibitTag(e), Object.defineProperties(t, De(e, false, t));
|
|
1341
1341
|
} };
|
|
1342
1342
|
}
|
|
1343
1343
|
function ot(...t) {
|
|
@@ -1347,15 +1347,15 @@ ${r}`), m2;
|
|
|
1347
1347
|
}
|
|
1348
1348
|
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) Oe(e, { removeRule: 1 });
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function nr(t) {
|
|
1351
1351
|
return function(e, r, n) {
|
|
1352
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(
|
|
1352
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(H).find((i) => n === i);
|
|
1353
1353
|
let o = t(e, document.createElement("br"));
|
|
1354
|
-
if (r && !
|
|
1354
|
+
if (r && !s(r, HTMLBRElement)) for (let i of o.collection) n ? r.insertAdjacentElement(n, i) : r.append(i);
|
|
1355
1355
|
return o;
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function or(...t) {
|
|
1359
1359
|
let e = {};
|
|
1360
1360
|
for (let r of t) {
|
|
1361
1361
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
@@ -1363,87 +1363,87 @@ ${r}`), m2;
|
|
|
1363
1363
|
}
|
|
1364
1364
|
return e;
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return t =
|
|
1366
|
+
function ir(t, e, r, n) {
|
|
1367
|
+
return t = M(n || t.toLowerCase()), { get() {
|
|
1368
1368
|
return (...o) => {
|
|
1369
|
-
let i = e && r.virtual(
|
|
1370
|
-
return
|
|
1369
|
+
let i = e && r.virtual(Q(ee[t](...o))) || void 0, w2 = !s(i?.node, Comment, Text, void 0) ? $e(i) : "";
|
|
1370
|
+
return F.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${w2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), i;
|
|
1371
1371
|
};
|
|
1372
1372
|
}, enumerable: false, configurable: true };
|
|
1373
1373
|
}
|
|
1374
1374
|
function De(t, e, r, n) {
|
|
1375
1375
|
t = t.toLowerCase();
|
|
1376
|
-
let o =
|
|
1376
|
+
let o = ir(t, e, r, n);
|
|
1377
1377
|
return n ? { [n]: o, [Y(n)]: o } : { [t]: o, [t.toUpperCase()]: o };
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return
|
|
1379
|
+
function lr(t) {
|
|
1380
|
+
return or(Object.entries(D.tagsRaw).reduce(sr(t), {}), mr(t));
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function sr(t) {
|
|
1383
1383
|
return function(e, [r, n]) {
|
|
1384
1384
|
return Object.defineProperties(e, De(r, n, t)), e;
|
|
1385
1385
|
};
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function ar(t) {
|
|
1388
1388
|
return function(e, r, ...n) {
|
|
1389
|
-
|
|
1389
|
+
s(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1390
1390
|
};
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function ur(t) {
|
|
1393
1393
|
return function(e) {
|
|
1394
|
-
let { type: r, types: n, origin: o, selector: i, handler: a, handlers:
|
|
1395
|
-
a =
|
|
1396
|
-
let
|
|
1397
|
-
a =
|
|
1398
|
-
let
|
|
1394
|
+
let { type: r, types: n, origin: o, selector: i, handler: a, handlers: w2, node: f2, name: E2, capture: c, once: h, about: g2 } = e;
|
|
1395
|
+
a = w2 || a, r = n || r, i = o || i;
|
|
1396
|
+
let S = Ae(r), p = E2;
|
|
1397
|
+
a = s(a, Function) ? [a] : a;
|
|
1398
|
+
let m2 = { type: S, selector: i || o, capture: c, name: p, once: h, node: f2, about: g2 };
|
|
1399
1399
|
switch (true) {
|
|
1400
|
-
case (
|
|
1401
|
-
for (let b2 of
|
|
1400
|
+
case (s(S, Array) && S.length > 0):
|
|
1401
|
+
for (let b2 of S) m2.type = b2, it(a, m2, t);
|
|
1402
1402
|
break;
|
|
1403
1403
|
default:
|
|
1404
|
-
return it(a,
|
|
1404
|
+
return it(a, m2, t);
|
|
1405
1405
|
}
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
1408
|
function it(t, e, r) {
|
|
1409
1409
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function cr(t) {
|
|
1412
1412
|
return function(e, r) {
|
|
1413
|
-
return r =
|
|
1413
|
+
return r = A(r) && r, e = A(e) && e, r && e && t.listenerStore[e][r];
|
|
1414
1414
|
};
|
|
1415
1415
|
}
|
|
1416
|
-
function
|
|
1416
|
+
function fr(t) {
|
|
1417
1417
|
return t.activePopup || Object.defineProperty(t, "activePopup", { value: ie(t), enumerable: false }), t.activePopup;
|
|
1418
1418
|
}
|
|
1419
|
+
function dr(t) {
|
|
1420
|
+
let e = (c, h) => Oe(c, h), r = function(c) {
|
|
1421
|
+
return _({ createWithId: c || `jqx${ye()}` });
|
|
1422
|
+
}, n = function(...c) {
|
|
1423
|
+
for (let h of c) Oe(h);
|
|
1424
|
+
}, o = rr(t), i = le(t), a = ur(i);
|
|
1425
|
+
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: a, capturedHandling: a, log: (...c) => F.on.log(...c).off, warn: (...c) => F.on.warn(...c).off, error: (...c) => F.on.error(...c).off, handlerWrapper: i };
|
|
1426
|
+
}
|
|
1419
1427
|
function mr(t) {
|
|
1420
|
-
let e = (f2, h) => Oe(f2, h), r = function(f2) {
|
|
1421
|
-
return _({ createWithId: f2 || `jqx${ye()}` });
|
|
1422
|
-
}, n = function(...f2) {
|
|
1423
|
-
for (let h of f2) Oe(h);
|
|
1424
|
-
}, o = nr(t), i = le(t), a = cr(i);
|
|
1425
|
-
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: a, capturedHandling: a, log: (...f2) => A.on.log(...f2).off, warn: (...f2) => A.on.warn(...f2).off, error: (...f2) => A.on.error(...f2).off, handlerWrapper: i };
|
|
1426
|
-
}
|
|
1427
|
-
function gr(t) {
|
|
1428
1428
|
let { factoryExtensions: e, instanceExtensions: r } = rt(t);
|
|
1429
1429
|
Me = e, Se = r;
|
|
1430
|
-
let { editCssRule: n, createStyle: o, editCssRules: i, allowProhibit: a, handle:
|
|
1431
|
-
return { log:
|
|
1432
|
-
return b2 ? t.comment(
|
|
1433
|
-
}, node(
|
|
1434
|
-
return b2.querySelector(
|
|
1435
|
-
}, nodes(
|
|
1436
|
-
return [...b2.querySelectorAll(
|
|
1430
|
+
let { editCssRule: n, createStyle: o, editCssRules: i, allowProhibit: a, handle: w2, capturedHandling: f2, log: E2, warn: c, error: h, handlerWrapper: g2 } = dr(t), S = cr(t), p = er(t);
|
|
1431
|
+
return { log: E2, warn: c, error: h, editCssRules: i, createStyle: o, editStylesheet: o, editCssRule: n, escHtml: j, logger: F, text(m2, b2 = false) {
|
|
1432
|
+
return b2 ? t.comment(m2) : document.createTextNode(m2);
|
|
1433
|
+
}, node(m2, b2 = document) {
|
|
1434
|
+
return b2.querySelector(m2, b2);
|
|
1435
|
+
}, nodes(m2, b2 = document) {
|
|
1436
|
+
return [...b2.querySelectorAll(m2, b2)];
|
|
1437
1437
|
}, clearAllTimers: Te, get staticFn() {
|
|
1438
|
-
return function(
|
|
1439
|
-
return m2
|
|
1438
|
+
return function(m2, b2, C2) {
|
|
1439
|
+
return p(m2, b2, C2);
|
|
1440
1440
|
};
|
|
1441
1441
|
}, get toBool() {
|
|
1442
1442
|
return He;
|
|
1443
1443
|
}, get getNamedListener() {
|
|
1444
|
-
return
|
|
1444
|
+
return S;
|
|
1445
1445
|
}, get virtual() {
|
|
1446
|
-
return
|
|
1446
|
+
return nr(t);
|
|
1447
1447
|
}, get allowTag() {
|
|
1448
1448
|
return a.allow;
|
|
1449
1449
|
}, get prohibitTag() {
|
|
@@ -1453,54 +1453,54 @@ ${r}`), m2;
|
|
|
1453
1453
|
}, get removeCssRules() {
|
|
1454
1454
|
return ot;
|
|
1455
1455
|
}, get delegate() {
|
|
1456
|
-
return
|
|
1456
|
+
return ar(f2);
|
|
1457
1457
|
}, get delegateCaptured() {
|
|
1458
|
-
return
|
|
1458
|
+
return f2;
|
|
1459
1459
|
}, get handle() {
|
|
1460
|
-
return
|
|
1460
|
+
return f2;
|
|
1461
1461
|
}, get listen() {
|
|
1462
|
-
return
|
|
1462
|
+
return g2.listen;
|
|
1463
1463
|
}, get at() {
|
|
1464
|
-
return
|
|
1464
|
+
return H;
|
|
1465
1465
|
}, get setStyle() {
|
|
1466
1466
|
return n;
|
|
1467
1467
|
}, get fn() {
|
|
1468
|
-
return
|
|
1468
|
+
return Xt;
|
|
1469
1469
|
}, get lenient() {
|
|
1470
|
-
return
|
|
1470
|
+
return D.allowUnknownHtmlTags;
|
|
1471
1471
|
}, get IS() {
|
|
1472
|
-
return
|
|
1472
|
+
return s;
|
|
1473
1473
|
}, get Popup() {
|
|
1474
|
-
return
|
|
1474
|
+
return fr(t);
|
|
1475
1475
|
}, get listenerStore() {
|
|
1476
|
-
return
|
|
1476
|
+
return g2.ListenerStore;
|
|
1477
1477
|
} };
|
|
1478
1478
|
}
|
|
1479
|
-
var st = lt(
|
|
1480
|
-
function
|
|
1481
|
-
return function(e, r, n =
|
|
1479
|
+
var st = lt(gr());
|
|
1480
|
+
function gr() {
|
|
1481
|
+
return function(e, r, n = H.BeforeEnd) {
|
|
1482
1482
|
if (e?.isJQx) return e;
|
|
1483
|
-
let o =
|
|
1484
|
-
r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(
|
|
1485
|
-
let i = X(e),
|
|
1486
|
-
if (
|
|
1487
|
-
r.contains(
|
|
1488
|
-
}), q(
|
|
1489
|
-
if (
|
|
1490
|
-
if ([e].flat().forEach((
|
|
1491
|
-
let
|
|
1492
|
-
|
|
1493
|
-
let
|
|
1494
|
-
|
|
1495
|
-
let
|
|
1496
|
-
|
|
1483
|
+
let o = s(r, HTMLBRElement);
|
|
1484
|
+
r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(H).find((c) => n === c) ? n : void 0;
|
|
1485
|
+
let i = X(e), w2 = !i && he(e) || i, f2 = { collection: me(e) ?? [], isVirtual: o, isJQx: true }, E2 = K(f2.collection);
|
|
1486
|
+
if (f2.collection.length && E2) return o || f2.collection.forEach((c) => {
|
|
1487
|
+
r.contains(c) || k([c], r, n);
|
|
1488
|
+
}), q(f2);
|
|
1489
|
+
if (w2) {
|
|
1490
|
+
if ([e].flat().forEach((c) => f2.collection.push(P(c))), f2.collection.length > 0) {
|
|
1491
|
+
let c = f2.collection.filter((p) => p?.dataset?.jqxcreationerror);
|
|
1492
|
+
f2.collection = f2.collection.filter((p) => !p?.dataset?.jqxcreationerror);
|
|
1493
|
+
let g2 = f2.collection.map((p) => `${String(p.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1494
|
+
f2 = q(f2);
|
|
1495
|
+
let S = f2.collection.length > 0 ? Ke(f2) : "sanitized: no elements remaining";
|
|
1496
|
+
F.log(`JQx: created ${f2.isVirtual ? "(virtual)" : ""} instance from ${g2 ? "array of " : ""}HTML string${g2 ? "s" : ""} ${S}`), f2.isVirtual || k(f2.collection, r, n);
|
|
1497
1497
|
}
|
|
1498
|
-
return
|
|
1498
|
+
return f2;
|
|
1499
1499
|
}
|
|
1500
|
-
return Pe(e, r,
|
|
1500
|
+
return Pe(e, r, f2), q(f2);
|
|
1501
1501
|
};
|
|
1502
1502
|
}
|
|
1503
|
-
var
|
|
1503
|
+
var pn = st;
|
|
1504
1504
|
|
|
1505
1505
|
// ../node_modules/ticktock-es/Bundle/index.min.js
|
|
1506
1506
|
var [Z2, w, q2, H2] = ["2-digit", "numeric", "long", "short"];
|
|
@@ -1523,8 +1523,8 @@ ${r}`), m2;
|
|
|
1523
1523
|
return r;
|
|
1524
1524
|
}, get units() {
|
|
1525
1525
|
return r.match(b.re) || [];
|
|
1526
|
-
}, finalize(t = "", a = "", o = "",
|
|
1527
|
-
return r.replace(/~([\d+]?)/g, "$1").replace(/dtf/, t).replace(/era/, o).replace(/dp\b|~dp\b/, a).replace(/yn\b/,
|
|
1526
|
+
}, finalize(t = "", a = "", o = "", s2 = "") {
|
|
1527
|
+
return r.replace(/~([\d+]?)/g, "$1").replace(/dtf/, t).replace(/era/, o).replace(/dp\b|~dp\b/, a).replace(/yn\b/, s2).replace(/\[(\d+?)]/g, (u, l) => n[l].trim()).trim();
|
|
1528
1528
|
} };
|
|
1529
1529
|
}
|
|
1530
1530
|
function fe2(...e) {
|
|
@@ -1538,8 +1538,8 @@ ${r}`), m2;
|
|
|
1538
1538
|
return e === "numeric" && r.startsWith("0") ? r.slice(1) : r;
|
|
1539
1539
|
}
|
|
1540
1540
|
function Ee2(e, r, n) {
|
|
1541
|
-
let t = fe2(...r.units.concat(de2(n).split(",")).flat()), a = { ...b.fixed }, o = Intl.DateTimeFormat(t.locale, t).formatToParts(e).reduce((
|
|
1542
|
-
return a.ms = t.fractionalSecondDigits ? a.msp : a.ms, a.yyyy = o.relatedYear ? a.ry : a.yyyy, r.formatStr = r.formatStr.replace(b.re, (
|
|
1541
|
+
let t = fe2(...r.units.concat(de2(n).split(",")).flat()), a = { ...b.fixed }, o = Intl.DateTimeFormat(t.locale, t).formatToParts(e).reduce((s2, u) => u.type === "literal" && /[ ,/-]/.test(u.value) ? s2 : { ...s2, [u.type]: Ye2(t[u.type], u.value) }, {});
|
|
1542
|
+
return a.ms = t.fractionalSecondDigits ? a.msp : a.ms, a.yyyy = o.relatedYear ? a.ry : a.yyyy, r.formatStr = r.formatStr.replace(b.re, (s2) => /^(M|MM)$/.test(s2) ? Ve2(e, t.locale, t.timeZone, /^M$/.test(s2)) : o[Object.keys(a[s2]).shift()] || s2), r.finalize(void 0, o.dayPeriod, o.era, o.yearName);
|
|
1543
1543
|
}
|
|
1544
1544
|
function Ve2(e, r, n, t) {
|
|
1545
1545
|
return e.toLocaleString(r, { timeZone: n, month: t ? H2 : q2 });
|
|
@@ -1550,25 +1550,25 @@ ${r}`), m2;
|
|
|
1550
1550
|
var ge2 = qe2;
|
|
1551
1551
|
function qe2() {
|
|
1552
1552
|
let e = (t, a) => {
|
|
1553
|
-
let o = isNaN(new Date(t)),
|
|
1554
|
-
if (
|
|
1555
|
-
let [u,
|
|
1556
|
-
return { error: true, message: u, full:
|
|
1553
|
+
let o = isNaN(new Date(t)), s2 = isNaN(new Date(a));
|
|
1554
|
+
if (s2) {
|
|
1555
|
+
let [u, l, i] = Array(3).fill("end date not valid");
|
|
1556
|
+
return { error: true, message: u, full: l, clean: i };
|
|
1557
1557
|
}
|
|
1558
1558
|
if (o) {
|
|
1559
|
-
let [u,
|
|
1560
|
-
return { error: true, message: u, full:
|
|
1559
|
+
let [u, l, i] = Array(3).fill("start date not valid");
|
|
1560
|
+
return { error: true, message: u, full: l, clean: i };
|
|
1561
1561
|
}
|
|
1562
|
-
if (o && !
|
|
1563
|
-
let [u,
|
|
1564
|
-
return { error: true, message: u, full:
|
|
1562
|
+
if (o && !s2) {
|
|
1563
|
+
let [u, l, i] = Array(3).fill("start- and/or end date are not valid");
|
|
1564
|
+
return { error: true, message: u, full: l, clean: i };
|
|
1565
1565
|
}
|
|
1566
1566
|
return { error: false };
|
|
1567
1567
|
}, r = n();
|
|
1568
1568
|
return function({ start: t, end: a, diffs: o = {} } = {}) {
|
|
1569
|
-
let
|
|
1570
|
-
if (
|
|
1571
|
-
let
|
|
1569
|
+
let s2 = e(t, a), u = a > t ? "+" : "-";
|
|
1570
|
+
if (s2.error) return s2;
|
|
1571
|
+
let l = Math.abs(t - a), i = new Date(l), c = i.getUTCFullYear() - 1970, d = i.getUTCMonth(), h = i.getUTCDate() - 1, F2 = h % 7, le2 = Math.floor(h / 7), p = i.getUTCHours(), $2 = i.getUTCMinutes(), S = i.getUTCSeconds(), Le2 = i.getUTCMilliseconds(), je2 = Math.floor(l / 864e5);
|
|
1572
1572
|
o = { ...o, fromUTC: t, toUTC: a, sign: "", years: c, months: d, days: h, hours: p, minutes: $2, seconds: S, milliseconds: Le2, diffInDays: je2 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1573
1573
|
let ce2 = p + $2 + S > 0 ? "T" : "";
|
|
1574
1574
|
return o.clean !== "Dates are equal" && (o.sign = u, o.jsPeriod = `${u}P${c > 0 ? `${c}Y` : ""}${d > 0 ? `${d}M` : ""}${le2 > 0 ? `${le2}W` : ""}${F2 > 0 ? `${F2}D` : ""}${ce2}${p > 0 ? `${p}H` : ""}${$2 > 0 ? `${$2}M` : ""}${S > 0 ? `${S}S` : ""}`, o.ISOPeriod = `P${c > 0 ? `${c}Y` : ""}${d > 0 ? `${d}M` : ""}${h > 0 ? `${h}D` : ""}${ce2}${p > 0 ? `${p}H` : ""}${$2 > 0 ? `${$2}M` : ""}${S > 0 ? `${S}S` : ""}`), o;
|
|
@@ -1584,19 +1584,19 @@ ${r}`), m2;
|
|
|
1584
1584
|
let a = t.length === 1;
|
|
1585
1585
|
return r = t[0].trim().startsWith("subtract,"), r && (t = a ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
|
|
1586
1586
|
if (!o) return false;
|
|
1587
|
-
let
|
|
1588
|
-
return
|
|
1587
|
+
let s2 = o.toLowerCase().split(/ {1,}/);
|
|
1588
|
+
return s2.length < 2 ? false : s2.map((u) => {
|
|
1589
1589
|
u = `${u}`.trim().replace(/[^a-z0-9-+]/g, "");
|
|
1590
|
-
let
|
|
1591
|
-
return Number.isNaN(
|
|
1590
|
+
let l = parseInt(u, 10);
|
|
1591
|
+
return Number.isNaN(l) ? u : r ? -l : +l;
|
|
1592
1592
|
});
|
|
1593
1593
|
}).filter((o) => o);
|
|
1594
1594
|
};
|
|
1595
1595
|
return function(t, ...a) {
|
|
1596
1596
|
if (a.length < 1) return t;
|
|
1597
1597
|
let o = n(...a);
|
|
1598
|
-
return o.length && o.forEach(([
|
|
1599
|
-
u = u, u = e[u],
|
|
1598
|
+
return o.length && o.forEach(([s2, u]) => {
|
|
1599
|
+
u = u, u = e[u], s2 && u && t[`set${u}`](t[`get${u}`]() + s2);
|
|
1600
1600
|
}), t;
|
|
1601
1601
|
};
|
|
1602
1602
|
}
|
|
@@ -1613,8 +1613,8 @@ ${r}`), m2;
|
|
|
1613
1613
|
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a, o) => n.clone.addDays(o + 1))) };
|
|
1614
1614
|
}
|
|
1615
1615
|
function W2(e, { start: r, end: n, future: t, past: a, include: o = { start: false, end: false } } = {}) {
|
|
1616
|
-
let
|
|
1617
|
-
return r = r?.value || r?.constructor === Date ? m(r?.value || r).UTC : m.now.UTC, n = n && n?.value || n?.constructor === Date ? m(n?.value || n).UTC : m.now.UTC,
|
|
1616
|
+
let s2 = e.clone.UTC;
|
|
1617
|
+
return r = r?.value || r?.constructor === Date ? m(r?.value || r).UTC : m.now.UTC, n = n && n?.value || n?.constructor === Date ? m(n?.value || n).UTC : m.now.UTC, s2.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n : a ? r < n : (o.start ? +s2 >= +r : +s2 > +r) && (o.end ? +s2 <= +n : +s2 < +n);
|
|
1618
1618
|
}
|
|
1619
1619
|
function _2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
|
|
1620
1620
|
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : f.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = f), v(e, n, t)) : _e2(e, n, t);
|
|
@@ -1627,11 +1627,11 @@ ${r}`), m2;
|
|
|
1627
1627
|
let n = $e2({ start: e, end: r || e });
|
|
1628
1628
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function B(e, r = false) {
|
|
1631
1631
|
let { locale: n, timeZone: t } = r ? e.localeInfo : f, a = ue2(n, t), o = e.format("MM|WD", a).split("|");
|
|
1632
1632
|
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: se2(n), monthNames: Y2(n) };
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function J(e, r = false) {
|
|
1635
1635
|
let [n, t, a, o] = U2(e, r), u = { values4Timezone: r ? f.timeZone : e.timeZone, hours: n, minutes: t, seconds: a, milliseconds: o };
|
|
1636
1636
|
return Object.freeze(u);
|
|
1637
1637
|
}
|
|
@@ -1642,10 +1642,10 @@ ${r}`), m2;
|
|
|
1642
1642
|
function K2(e, r) {
|
|
1643
1643
|
let n = r ? `tz:${f.timeZone}` : `,tz:${e.timeZone}`, [t, a, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
|
|
1644
1644
|
a -= 1;
|
|
1645
|
-
let
|
|
1646
|
-
return Object.freeze({ values4Timezone:
|
|
1645
|
+
let s2 = r ? f.timeZone : e.timeZone;
|
|
1646
|
+
return Object.freeze({ values4Timezone: s2, year: t, month: a, date: o });
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1648
|
+
function Q2(e, r = true) {
|
|
1649
1649
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
|
|
1650
1650
|
let n = e.format("yyyy-m-d", e.localeInfo.formatOptions).split(/-/).map(Number);
|
|
1651
1651
|
return n[1] -= 1, n;
|
|
@@ -1664,8 +1664,8 @@ ${r}`), m2;
|
|
|
1664
1664
|
}
|
|
1665
1665
|
function X2({ start: e, end: r } = {}) {
|
|
1666
1666
|
r || (r = e.clone), r?.clone || (r = m(r, { timeZone: e.timeZone })), e = m(Te2(e, e.timeZone), { timeZone: e.timeZone }), r = m(Te2(r, r.timeZone), { timeZone: r.timeZone });
|
|
1667
|
-
let n = $e2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Je2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o,
|
|
1668
|
-
return n.timeZonesOffsetDifference = n.sign.length < 1 || o +
|
|
1667
|
+
let n = $e2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = Je2(r, e), a = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s2] = t.map((i) => Math.abs(i)), [u, l] = [`${o} ${k2(o, "hour")}`, `${s2} ${k2(s2, "minute")}`];
|
|
1668
|
+
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s2 === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u}${s2 > 0 ? ` and ${l}` : ""} ${a} ${r.timeZone}`, n;
|
|
1669
1669
|
}
|
|
1670
1670
|
function ee2(e, r) {
|
|
1671
1671
|
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : m(e.value, { timeZone: r.timeZone || f.timeZone });
|
|
@@ -1680,8 +1680,8 @@ ${r}`), m2;
|
|
|
1680
1680
|
}
|
|
1681
1681
|
function Ke2(e) {
|
|
1682
1682
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1683
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = k2(n, "hour"), o = k2(t, "minute"),
|
|
1684
|
-
return t > 0 ? `${n} ${a} and ${t} ${o} ${
|
|
1683
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a = k2(n, "hour"), o = k2(t, "minute"), s2 = e.startsWith("+");
|
|
1684
|
+
return t > 0 ? `${n} ${a} and ${t} ${o} ${s2 ? "ahead of" : "behind"}` : `${n} ${a} ${s2 ? "ahead of" : "behind"}`;
|
|
1685
1685
|
}
|
|
1686
1686
|
function De2(e, r, n) {
|
|
1687
1687
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
@@ -1696,8 +1696,8 @@ ${r}`), m2;
|
|
|
1696
1696
|
return Se2(n.format(e));
|
|
1697
1697
|
}
|
|
1698
1698
|
function Ne2(e) {
|
|
1699
|
-
let r = f, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a = e.offsetFrom(t), o = t.offsetFrom(e),
|
|
1700
|
-
return n.timeZone !== r.timeZone && (c.locales.remote = { locale: u.locale, timeZone: u.timeZone }, c.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: te2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime:
|
|
1699
|
+
let r = f, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a = e.offsetFrom(t), o = t.offsetFrom(e), s2 = r, u = n, l = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), i = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), c = { note: "'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance", locales: { user: { locale: s2.locale, timeZone: s2.timeZone } }, dateTime: { user: { ...e.dateTime, monthName: t.monthName, weekdayNr: t.day, weekdayName: t.dayName, dayPeriodTime: i, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
|
|
1700
|
+
return n.timeZone !== r.timeZone && (c.locales.remote = { locale: u.locale, timeZone: u.timeZone }, c.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: te2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: l, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, c.offset.fromUserTime = o.offsetText), c;
|
|
1701
1701
|
}
|
|
1702
1702
|
function z2(e, r = true) {
|
|
1703
1703
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
|
|
@@ -1716,8 +1716,8 @@ ${r}`), m2;
|
|
|
1716
1716
|
r = r?.toLowerCase() || "-";
|
|
1717
1717
|
let a = Se2(r);
|
|
1718
1718
|
if (a < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1719
|
-
let o = n ? 1 : -1,
|
|
1720
|
-
return t && a ===
|
|
1719
|
+
let o = n ? 1 : -1, s2 = m(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1720
|
+
return t && a === s2.day ? s2 : Qe2(s2.addDays(n ? 1 : -1), a, o);
|
|
1721
1721
|
}
|
|
1722
1722
|
function Qe2(e, r, n) {
|
|
1723
1723
|
function t(a) {
|
|
@@ -1730,7 +1730,7 @@ ${r}`), m2;
|
|
|
1730
1730
|
}
|
|
1731
1731
|
return t(e);
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1733
|
+
function O(e, { dateOnly: r = false, timeOnly: n = false } = {}) {
|
|
1734
1734
|
let { locale: t, timeZone: a } = e.localeInfo;
|
|
1735
1735
|
return r ? new Date(e).toLocaleDateString(t, { timeZone: a }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a }) : new Date(e).toLocaleString(t, { timeZone: a });
|
|
1736
1736
|
}
|
|
@@ -1738,10 +1738,10 @@ ${r}`), m2;
|
|
|
1738
1738
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
1739
1739
|
return new Date(new Date(e).toLocaleString("en", n));
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function N(e, { year: r, month: n, date: t } = {}) {
|
|
1742
1742
|
return y(r) && e.setFullYear(parseInt(r)), y(t) && e.setDate(parseInt(t)), y(n) && e.setMonth(parseInt(n)), e;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function T2(e, { hours: r, minutes: n, seconds: t, milliseconds: a } = {}) {
|
|
1745
1745
|
return y(r) && e.setHours(parseInt(r)), y(n) && e.setMinutes(parseInt(n)), y(t) && e.setSeconds(parseInt(t)), y(a) && e.setMilliseconds(parseInt(a)), e;
|
|
1746
1746
|
}
|
|
1747
1747
|
function Ie2(e) {
|
|
@@ -1772,7 +1772,7 @@ ${r}`), m2;
|
|
|
1772
1772
|
let n = e.year || e.getFullYear(), t = pe2(new Date(n, 0, 1), r), a = pe2(new Date(n, 5, 1), r);
|
|
1773
1773
|
return t !== a;
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function P2(e, r) {
|
|
1776
1776
|
return r = r || e?.timeZone || f.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? m(e, { timeZone: r }) : m({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
|
|
1777
1777
|
}
|
|
1778
1778
|
function Oe2(e, { locale: r, timeZone: n, l: t, tz: a } = {}) {
|
|
@@ -1781,9 +1781,9 @@ ${r}`), m2;
|
|
|
1781
1781
|
function Me2(e, r) {
|
|
1782
1782
|
return Ie2(r) && (e = m(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function M2(e, r) {
|
|
1785
1785
|
let n = ae2(new Date(e, 11, r || 31));
|
|
1786
|
-
return n === 1 ?
|
|
1786
|
+
return n === 1 ? M2(e, (r || 31) - 1) : n;
|
|
1787
1787
|
}
|
|
1788
1788
|
function oe2(e, r) {
|
|
1789
1789
|
let n = e.month;
|
|
@@ -1810,8 +1810,8 @@ ${r}`), m2;
|
|
|
1810
1810
|
function Xe2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1811
1811
|
let t, a = { add(...o) {
|
|
1812
1812
|
return G2(t, ...o);
|
|
1813
|
-
}, between({ start: o, end:
|
|
1814
|
-
return W2(t, { start: o, end:
|
|
1813
|
+
}, between({ start: o, end: s2, include: u } = {}) {
|
|
1814
|
+
return W2(t, { start: o, end: s2, include: u });
|
|
1815
1815
|
}, cloneWith(o) {
|
|
1816
1816
|
return ne2(t, o);
|
|
1817
1817
|
}, daysUntil(o) {
|
|
@@ -1820,10 +1820,10 @@ ${r}`), m2;
|
|
|
1820
1820
|
return X2({ start: t, end: o });
|
|
1821
1821
|
}, differenceUntil(o) {
|
|
1822
1822
|
return t.differenceTo(o).clean;
|
|
1823
|
-
}, firstWeekday({ sunday: o = false, midnight:
|
|
1824
|
-
return R2(t, { sunday: o, midnight:
|
|
1825
|
-
}, format(o,
|
|
1826
|
-
return _2(t, { formatStr: o, moreOptions:
|
|
1823
|
+
}, firstWeekday({ sunday: o = false, midnight: s2 = false } = {}) {
|
|
1824
|
+
return R2(t, { sunday: o, midnight: s2 });
|
|
1825
|
+
}, format(o, s2) {
|
|
1826
|
+
return _2(t, { formatStr: o, moreOptions: s2 });
|
|
1827
1827
|
}, fullMonth(o) {
|
|
1828
1828
|
return L(t, o);
|
|
1829
1829
|
}, fullWeek(o = false) {
|
|
@@ -1832,50 +1832,50 @@ ${r}`), m2;
|
|
|
1832
1832
|
return W2(t, { start: t, end: o, future: true });
|
|
1833
1833
|
}, isPast(o) {
|
|
1834
1834
|
return W2(t, { start: t, end: o, past: true });
|
|
1835
|
-
}, next(o,
|
|
1836
|
-
return j2(t, { day: o, next: true, preserveTodayWhenEqual: !!
|
|
1835
|
+
}, next(o, s2) {
|
|
1836
|
+
return j2(t, { day: o, next: true, preserveTodayWhenEqual: !!s2 });
|
|
1837
1837
|
}, offsetFrom(o) {
|
|
1838
1838
|
return ee2(t, o);
|
|
1839
|
-
}, previous(o,
|
|
1840
|
-
return j2(t, { day: o, next: false, preserveTodayWhenEqual: !!
|
|
1841
|
-
}, relocate({ locale: o, timeZone:
|
|
1842
|
-
return Oe2(t, { locale: o, timeZone:
|
|
1839
|
+
}, previous(o, s2) {
|
|
1840
|
+
return j2(t, { day: o, next: false, preserveTodayWhenEqual: !!s2 });
|
|
1841
|
+
}, relocate({ locale: o, timeZone: s2, l: u, tz: l } = {}) {
|
|
1842
|
+
return Oe2(t, { locale: o, timeZone: s2, l: u, tz: l });
|
|
1843
1843
|
}, revalue(o) {
|
|
1844
1844
|
return t = Me2(t, o), t;
|
|
1845
|
-
}, setDateValues({ year: o, month:
|
|
1846
|
-
return
|
|
1847
|
-
}, setTimeValues({ hours: o, minutes:
|
|
1848
|
-
return
|
|
1845
|
+
}, setDateValues({ year: o, month: s2, date: u } = {}) {
|
|
1846
|
+
return N(t, { year: o, month: s2, date: u });
|
|
1847
|
+
}, setTimeValues({ hours: o, minutes: s2, seconds: u, milliseconds: l } = {}) {
|
|
1848
|
+
return T2(t, { hours: o, minutes: s2, seconds: u, milliseconds: l });
|
|
1849
1849
|
}, subtract(...o) {
|
|
1850
1850
|
return G2(t, "subtract," + o.join(","));
|
|
1851
1851
|
}, toArray(o = false) {
|
|
1852
1852
|
return z2(t, o);
|
|
1853
|
-
}, toString({ template: o, formatOptions:
|
|
1854
|
-
return ve2(t, { withFormat: o, withFormatOptions:
|
|
1853
|
+
}, toString({ template: o, formatOptions: s2, local: u } = {}) {
|
|
1854
|
+
return ve2(t, { withFormat: o, withFormatOptions: s2, local: u });
|
|
1855
1855
|
}, values(o = false) {
|
|
1856
1856
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1857
|
-
}, zoneFormat(o,
|
|
1858
|
-
return _2(t, { zoneTime: true, formatStr: o, moreOptions:
|
|
1859
|
-
}, set date({ year: o, month:
|
|
1860
|
-
|
|
1857
|
+
}, zoneFormat(o, s2) {
|
|
1858
|
+
return _2(t, { zoneTime: true, formatStr: o, moreOptions: s2 });
|
|
1859
|
+
}, set date({ year: o, month: s2, date: u }) {
|
|
1860
|
+
N(t, { year: o, month: s2, date: u });
|
|
1861
1861
|
}, set dateNr(o) {
|
|
1862
|
-
|
|
1862
|
+
N(t, { date: o });
|
|
1863
1863
|
}, set hours(o) {
|
|
1864
|
-
|
|
1865
|
-
}, set localeInfo({ locale: o, timeZone:
|
|
1866
|
-
e = I2({ locale: o, timeZone:
|
|
1864
|
+
T2(t, { hours: o });
|
|
1865
|
+
}, set localeInfo({ locale: o, timeZone: s2, l: u, tz: l }) {
|
|
1866
|
+
e = I2({ locale: o, timeZone: s2, l: u, tz: l });
|
|
1867
1867
|
}, set milliseconds(o) {
|
|
1868
|
-
|
|
1868
|
+
T2(t, { milliseconds: `${o}` });
|
|
1869
1869
|
}, set minutes(o) {
|
|
1870
|
-
|
|
1870
|
+
T2(t, { minutes: o });
|
|
1871
1871
|
}, set month(o) {
|
|
1872
|
-
|
|
1872
|
+
N(t, { month: o });
|
|
1873
1873
|
}, set seconds(o) {
|
|
1874
|
-
|
|
1875
|
-
}, set time({ hours: o, minutes:
|
|
1876
|
-
|
|
1874
|
+
T2(t, { seconds: o });
|
|
1875
|
+
}, set time({ hours: o, minutes: s2, seconds: u, milliseconds: l }) {
|
|
1876
|
+
T2(t, { hours: o, minutes: s2, seconds: u, milliseconds: l });
|
|
1877
1877
|
}, set year(o) {
|
|
1878
|
-
|
|
1878
|
+
N(t, { year: o });
|
|
1879
1879
|
}, get age() {
|
|
1880
1880
|
return t.differenceTo(/* @__PURE__ */ new Date()).years;
|
|
1881
1881
|
}, get ageFull() {
|
|
@@ -1891,7 +1891,7 @@ ${r}`), m2;
|
|
|
1891
1891
|
}, get dateTimeValues() {
|
|
1892
1892
|
return z2(t, true);
|
|
1893
1893
|
}, get dateValues() {
|
|
1894
|
-
return
|
|
1894
|
+
return Q2(t, true);
|
|
1895
1895
|
}, get day() {
|
|
1896
1896
|
return t.getDay();
|
|
1897
1897
|
}, get dayName() {
|
|
@@ -1899,7 +1899,7 @@ ${r}`), m2;
|
|
|
1899
1899
|
}, get daysThisMonth() {
|
|
1900
1900
|
return re2(t);
|
|
1901
1901
|
}, get DSTActive() {
|
|
1902
|
-
return
|
|
1902
|
+
return P2(t);
|
|
1903
1903
|
}, get hasDST() {
|
|
1904
1904
|
return x(t);
|
|
1905
1905
|
}, get hours() {
|
|
@@ -1911,17 +1911,17 @@ ${r}`), m2;
|
|
|
1911
1911
|
}, get ISO() {
|
|
1912
1912
|
return t.toISOString();
|
|
1913
1913
|
}, get local() {
|
|
1914
|
-
return
|
|
1914
|
+
return O(t);
|
|
1915
1915
|
}, get localDate() {
|
|
1916
|
-
return
|
|
1916
|
+
return O(t, { dateOnly: true });
|
|
1917
1917
|
}, get locale() {
|
|
1918
1918
|
return (e || I2()).locale;
|
|
1919
1919
|
}, get localeInfo() {
|
|
1920
1920
|
return e;
|
|
1921
1921
|
}, get localeString() {
|
|
1922
|
-
return
|
|
1922
|
+
return O(t);
|
|
1923
1923
|
}, get localTime() {
|
|
1924
|
-
return
|
|
1924
|
+
return O(t, { timeOnly: true });
|
|
1925
1925
|
}, get milliseconds() {
|
|
1926
1926
|
return t.getMilliseconds();
|
|
1927
1927
|
}, get minutes() {
|
|
@@ -1931,7 +1931,7 @@ ${r}`), m2;
|
|
|
1931
1931
|
}, get monthName() {
|
|
1932
1932
|
return t.names.monthName;
|
|
1933
1933
|
}, get names() {
|
|
1934
|
-
return
|
|
1934
|
+
return B(t);
|
|
1935
1935
|
}, get quarter() {
|
|
1936
1936
|
return oe2(t);
|
|
1937
1937
|
}, get quarterNr() {
|
|
@@ -1941,7 +1941,7 @@ ${r}`), m2;
|
|
|
1941
1941
|
}, get seconds() {
|
|
1942
1942
|
return t.time.seconds;
|
|
1943
1943
|
}, get time() {
|
|
1944
|
-
return
|
|
1944
|
+
return J(t, true);
|
|
1945
1945
|
}, get timeValues() {
|
|
1946
1946
|
return U2(t, true);
|
|
1947
1947
|
}, get timeZone() {
|
|
@@ -1959,7 +1959,7 @@ ${r}`), m2;
|
|
|
1959
1959
|
}, get weeknr() {
|
|
1960
1960
|
return ae2(t);
|
|
1961
1961
|
}, get weeksInYear() {
|
|
1962
|
-
return
|
|
1962
|
+
return M2(t.year, 31);
|
|
1963
1963
|
}, get year() {
|
|
1964
1964
|
return t.date.year;
|
|
1965
1965
|
}, get zoneDate() {
|
|
@@ -1971,7 +1971,7 @@ ${r}`), m2;
|
|
|
1971
1971
|
}, get zoneDateTimeValues() {
|
|
1972
1972
|
return z2(t, false);
|
|
1973
1973
|
}, get zoneDateValues() {
|
|
1974
|
-
return
|
|
1974
|
+
return Q2(t, false);
|
|
1975
1975
|
}, get zoneDay() {
|
|
1976
1976
|
return te2(t, true);
|
|
1977
1977
|
}, get zoneDayname() {
|
|
@@ -1985,11 +1985,11 @@ ${r}`), m2;
|
|
|
1985
1985
|
}, get zoneMonthname() {
|
|
1986
1986
|
return t.zoneNames.monthName;
|
|
1987
1987
|
}, get zoneNames() {
|
|
1988
|
-
return
|
|
1988
|
+
return B(t, true);
|
|
1989
1989
|
}, get zoneSeconds() {
|
|
1990
1990
|
return t.zoneTime.seconds;
|
|
1991
1991
|
}, get zoneTime() {
|
|
1992
|
-
return
|
|
1992
|
+
return J(t);
|
|
1993
1993
|
}, get zoneTimeValues() {
|
|
1994
1994
|
return U2(t);
|
|
1995
1995
|
}, get zoneYear() {
|
|
@@ -1999,7 +1999,7 @@ ${r}`), m2;
|
|
|
1999
1999
|
}, get zoneArray() {
|
|
2000
2000
|
return z2(t, false);
|
|
2001
2001
|
} };
|
|
2002
|
-
return !e && !n ? a : (a.localeInfo = e || I2(), t = new Proxy(n, et2(a)), Object.entries(Object.getOwnPropertyDescriptors(ie2(t, r))).forEach(([o,
|
|
2002
|
+
return !e && !n ? a : (a.localeInfo = e || I2(), t = new Proxy(n, et2(a)), Object.entries(Object.getOwnPropertyDescriptors(ie2(t, r))).forEach(([o, s2]) => Object.defineProperty(a, o, s2)), Object.freeze(t));
|
|
2003
2003
|
}
|
|
2004
2004
|
function et2(e) {
|
|
2005
2005
|
return { get(r, n) {
|
|
@@ -2076,7 +2076,7 @@ ${r}`), m2;
|
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
2078
2078
|
function ot2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2079
|
-
let t = { timeZone: g({ timeZone: r }).timeZone }, a = { timeZone: g({ timeZone: n || "" }).timeZone }, o = m(e, t),
|
|
2079
|
+
let t = { timeZone: g({ timeZone: r }).timeZone }, a = { timeZone: g({ timeZone: n || "" }).timeZone }, o = m(e, t), s2 = m(e, a), u = s2.differenceTo(o), l = o.offsetFrom(s2).offset, [i, c] = A2(l, true), d = s2.clone.add(`${i} hours, ${c} minutes`), F2 = u.equalDates ? "No difference" : `Time offset ${l}: ${a.timeZone} is ${u.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2080
2080
|
return { remoteTimezone: t.timeZone, userTimezone: a.timeZone, timeDifference: F2, result: { [t.timeZone.replace(/\//, "_")]: m(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a.timeZone.replace(/\//, "_")]: d.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2081
2081
|
}
|
|
2082
2082
|
function y(e) {
|
|
@@ -2119,12 +2119,12 @@ ${r}`), m2;
|
|
|
2119
2119
|
function ie2(e, r) {
|
|
2120
2120
|
let n = at(e);
|
|
2121
2121
|
for (let [t, a] of Object.entries(r || {})) {
|
|
2122
|
-
let o = a.enumerable,
|
|
2122
|
+
let o = a.enumerable, s2 = a.isGetter ? { get() {
|
|
2123
2123
|
return a.method(e);
|
|
2124
2124
|
}, enumerable: o } : { value(...u) {
|
|
2125
2125
|
return a.method(e, ...u);
|
|
2126
2126
|
}, enumerable: o };
|
|
2127
|
-
Object.defineProperty(n, t,
|
|
2127
|
+
Object.defineProperty(n, t, s2);
|
|
2128
2128
|
}
|
|
2129
2129
|
return n;
|
|
2130
2130
|
}
|
|
@@ -2148,19 +2148,19 @@ ${r}`), m2;
|
|
|
2148
2148
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
2149
2149
|
return x(n, t);
|
|
2150
2150
|
} }, DSTActive: { value({ date: n, timeZone: t } = {}) {
|
|
2151
|
-
return
|
|
2151
|
+
return P2(n, t);
|
|
2152
2152
|
} }, values: { value({ date: n, timeZone: t } = {}) {
|
|
2153
2153
|
n = n || n?.value || /* @__PURE__ */ new Date();
|
|
2154
2154
|
let a = v(n, "yyyy-m-d-h-mi-s", g({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
|
|
2155
2155
|
return a[1] -= 1, a;
|
|
2156
|
-
} }, format: { value({ date: n, template: t, timeZone: a, locale: o, opts:
|
|
2156
|
+
} }, format: { value({ date: n, template: t, timeZone: a, locale: o, opts: s2 } = {}) {
|
|
2157
2157
|
n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
|
|
2158
2158
|
let u = g({ timeZone: a, locale: o }).formatOptions;
|
|
2159
|
-
return u +=
|
|
2159
|
+
return u += s2 ? `,${s2}` : "", v(n, t, u);
|
|
2160
2160
|
} }, addCustom: { value({ name: n, method: t, enumerable: a = false, isGetter: o = false } = {}) {
|
|
2161
2161
|
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a, isGetter: o });
|
|
2162
2162
|
} }, validateLocaleInformation: { value: g }, timeAcrossZones: { value: ot2 }, weeksInYear: { value(n) {
|
|
2163
|
-
return
|
|
2163
|
+
return M2(n, 31);
|
|
2164
2164
|
} }, keys: { get() {
|
|
2165
2165
|
let n = Object.fromEntries(Object.entries(r).filter(([a, o]) => o.enumerable === true));
|
|
2166
2166
|
return [...Object.keys(E()), ...Object.keys(ie2()), ...Object.keys(n)].sort((a, o) => a.localeCompare(o));
|
|
@@ -2421,7 +2421,7 @@ ${r}`), m2;
|
|
|
2421
2421
|
const str = String(Object.getPrototypeOf(obj)?.constructor);
|
|
2422
2422
|
return str.slice(str.indexOf(`ion`) + 3, str.indexOf(`(`)).trim();
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function modifySetter(setterMethod2Modify) {
|
|
2425
2425
|
const oldSetter = setterMethod2Modify.set;
|
|
2426
2426
|
setterMethod2Modify.set = (target, key, value) => {
|
|
2427
2427
|
if (key === Symbol.proxy) {
|
|
@@ -2442,7 +2442,7 @@ ${r}`), m2;
|
|
|
2442
2442
|
construct(target, args) {
|
|
2443
2443
|
for (let item of args) {
|
|
2444
2444
|
if (item.set) {
|
|
2445
|
-
item =
|
|
2445
|
+
item = modifySetter(item);
|
|
2446
2446
|
}
|
|
2447
2447
|
}
|
|
2448
2448
|
const wrappedProxy = new target(...args);
|
|
@@ -2525,20 +2525,20 @@ ${r}`), m2;
|
|
|
2525
2525
|
});
|
|
2526
2526
|
}
|
|
2527
2527
|
function logFactory(formatJSON = true) {
|
|
2528
|
-
const logContainer =
|
|
2528
|
+
const logContainer = pn(`<ul id="log2screen">`).first();
|
|
2529
2529
|
function logItem(top2 = false) {
|
|
2530
|
-
const where2PutIt = top2 ?
|
|
2530
|
+
const where2PutIt = top2 ? pn.at.start : pn.at.end;
|
|
2531
2531
|
return (content) => {
|
|
2532
2532
|
if (content?.isJQx) {
|
|
2533
|
-
return
|
|
2533
|
+
return pn.li(
|
|
2534
2534
|
content.data.get(`header`) ? { class: `head` } : ``,
|
|
2535
2535
|
content
|
|
2536
2536
|
).renderTo(logContainer, where2PutIt);
|
|
2537
2537
|
}
|
|
2538
|
-
content = !
|
|
2538
|
+
content = !pn.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2539
2539
|
const isHead = content.startsWith(`!!`);
|
|
2540
2540
|
content = isHead ? content.slice(2) : content;
|
|
2541
|
-
|
|
2541
|
+
pn.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
|
|
2542
2542
|
};
|
|
2543
2543
|
}
|
|
2544
2544
|
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
@@ -2555,7 +2555,7 @@ ${r}`), m2;
|
|
|
2555
2555
|
}
|
|
2556
2556
|
}
|
|
2557
2557
|
function setDefaultStyling() {
|
|
2558
|
-
|
|
2558
|
+
pn.editCssRules(`body{font:normal 14px/17px system-ui,sans-serif;margin:1rem;}`, `li::marker{vertical-align:top;}`, `code{color:green;background-color:#eee;padding:2px;font-family:monospace;}`, `code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}`, `h3{marginTop:1.5rem;}`, `.thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}`, `a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}`, `.cmmt{color:#888;}`, `.hidden{display:none;}`, `.attention{color:red; font-size:1.2em; font-weight:bold;}`, `#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}`, `#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}`, `.err{fontStyle:italic; color:red; }`, `a{text-decoration:none; font-weight:bold;}`, `a:hover{text-decoration:underline;}`, `a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}`, `a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`, `a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`);
|
|
2559
2559
|
}
|
|
2560
2560
|
return __toCommonJS(index_exports);
|
|
2561
2561
|
})();
|