dynamic-html-helpers 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- var{IS:b,maybe:B,$Wrap:So,isNothing:Ht,xProxy:Wt,addSymbolicExtensions:xo}=Jt({useSymbolicExtensions:!1});function Jt(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:i,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Bt(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Bt(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:i,verifyNothingness:a,determineType:s}=Yt(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),i(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(o){return o?.[Symbol.proxy]??e(o)}function c(o,l){switch(!0){case"defaultValue"in l:return p(o,l);case"notTypes"in l:return d(o,l);default:return e(o,...[l.isTypes].flat())}}function h(o,...l){return l.some(u=>e(o,u))}function p(o,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(o,...u)?o:l:d(o,{isTypes:u,notTypes:f})?o:l}function d(o,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(o,...l)&&!e(o,...u)}}function Yt(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(o,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return o(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return o(u,...f)},enumerable:!1,configurable:!1}}))}function r(o,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(o,l)}}function i(o){return(Ht(o,!0)?{name:"unknown"}:Object.getPrototypeOf(o)?.constructor).name}function a(o,l){return Proxy=new o(o,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${i(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o,Symbol.proxy)}}}function m(o,...l){let u=l.length<1,f=o==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||B({trial:v=>String(o)===t.NAN}),isInfinity:B({trial:v=>String(o)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(o,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:N,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(o,...l);switch(l=l.length&&l[0],!0){case J:return String(o)===String(v);case(o?.[Symbol.proxy]&&f):return o[Symbol.proxy];case H:return f?t.NAN:String(v)===String(o);case W:return f?t.INFINITY:String(v)===String(o);case u:return f?String(o):String(v)===String(o);case N===Boolean:return f?t.BOOLEAN:N===l;default:return S(o,l,f,x(o,N))}}function x(o,l){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return l}}function S(o,l,u,f){switch(!0){case(!u&&l===o||o?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(o)===t.NAN;case(o?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===o[Symbol.toStringTag];default:return l?c(o,l,f):y(o,f)}}function y(o,l){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(o,l,u){return B({trial:f=>o instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(o,l){return function(u){let f={get value(){return u},is(...v){return o(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return o(u,...v)}}}),Object.freeze(f)}}function p(){let o=l=>{};return function({trial:l,whenError:u=o}={}){try{return l()}catch(f){return u(f)}}}function d(o,l=!1){let u=o==null;return u=l?u||b(o,1/0)||b(o,NaN):u,u}}var Qt=Vt(),me=Ut(),q=qt();function Ut(){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(","))}}function qt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function Vt(){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;}}"]}var Fe={html:"innerHTML",text:"textContent",class:"className"},_t=Xt();function Xt(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case ln(r):return Ze(t,r,n);default:return Ze(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Ze(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?i=>on(n):sn(t)}}),e[t]}function Gt(e,t,n){return t=t?.isJQx&&t.first()||t,B({trial:r=>an(t)?e.append(t):Ve(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
- `,r)})}function Kt(e,t,...n){let r=en(t,e);return n?.forEach(i=>Gt(r,i,e)),r}function en(e,t){switch(e=xe(t)?rn(e):e?.isJQx?e.first():e,!0){case b(e,String):return Y(t,Ve(e,t)?{html:e}:{text:e});case b(e,Node):return nn(t,e);default:return Y(t,e)}}function tn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in Fe&&(e[Fe[n]]=e[t],delete e[t])}),e}function nn(e,t){let n=Y(e);return n.append(t),n}function Y(e,t={}){t=qe(t,{});let n=Object.entries(t.data??{}),r=Object.assign(xe(e)?new Comment(t?.text):document.createElement(e),tn(t));return n.length&&n.forEach(([i,a])=>r.dataset[i]=String(a)),r}function qe(e,t){return t?b(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):b(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function rn(e){return qe(e)?e?.text??e?.textContent??"":String(e)}function on(e){return Y("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function Ve(e,t){return!xe(t)&&b(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function an(e){return e?.constructor===Comment||e?.constructor===CharacterData}function xe(e){return e?.constructor===Comment||/comment/i.test(e)}function ln(e){return!b(Y(e),HTMLUnknownElement)}function sn(e){return(t,...n)=>Kt(e,t,...n)}var{IS:F,maybe:le,$Wrap:vo,isNothing:un,xProxy:To,addSymbolicExtensions:wo}=cn({useSymbolicExtensions:!1});function cn(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:i,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=mn(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function mn(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:i,verifyNothingness:a,determineType:s}=dn(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),i(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(o){return o?.[Symbol.proxy]??e(o)}function c(o,l){switch(!0){case"defaultValue"in l:return p(o,l);case"notTypes"in l:return d(o,l);default:return e(o,...[l.isTypes].flat())}}function h(o,...l){return l.some(u=>e(o,u))}function p(o,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(o,...u)?o:l:d(o,{isTypes:u,notTypes:f})?o:l}function d(o,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(o,...l)&&!e(o,...u)}}function dn(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(o,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return o(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return o(u,...f)},enumerable:!1,configurable:!1}}))}function r(o,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(o,l)}}function i(o){return(un(o,!0)?{name:"unknown"}:Object.getPrototypeOf(o)?.constructor).name}function a(o,l){return Proxy=new o(o,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${i(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o,Symbol.proxy)}}}function m(o,...l){let u=l.length<1,f=o==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||le({trial:v=>String(o)===t.NAN}),isInfinity:le({trial:v=>String(o)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(o,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:N,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(o,...l);switch(l=l.length&&l[0],!0){case J:return String(o)===String(v);case(o?.[Symbol.proxy]&&f):return o[Symbol.proxy];case H:return f?t.NAN:String(v)===String(o);case W:return f?t.INFINITY:String(v)===String(o);case u:return f?String(o):String(v)===String(o);case N===Boolean:return f?t.BOOLEAN:N===l;default:return S(o,l,f,x(o,N))}}function x(o,l){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return l}}function S(o,l,u,f){switch(!0){case(!u&&l===o||o?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(o)===t.NAN;case(o?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===o[Symbol.toStringTag];default:return l?c(o,l,f):y(o,f)}}function y(o,l){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(o,l,u){return le({trial:f=>o instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(o,l){return function(u){let f={get value(){return u},is(...v){return o(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return o(u,...v)}}}),Object.freeze(f)}}function p(){let o=l=>{};return function({trial:l,whenError:u=o}={}){try{return l()}catch(f){return u(f)}}}function d(o,l=!1){let u=o==null;return u=l?u||F(o,1/0)||F(o,NaN):u,u}}var _e=fn;function fn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:i,sheet:a,removeRules:s,consider:m,currentSheetID:g}=yn({styleSheet:e,createWithId:t});function x(p,d){if(p&&d.removeProperties){Object.keys(d.removeProperties).forEach(o=>p.style.removeProperty(ze(o)));return}Object.entries(d).forEach(([o,l])=>{o=ze(o.trim()),l=l.trim();let u;if(/!important/.test(l)&&(l=l.slice(0,l.indexOf("!important")).trim(),u="important"),!CSS.supports(o,l))return console.error(`StylingFactory ${g} error: '${o}' with value '${l}' not supported (yet)`);Re(()=>p.style.setProperty(o,l,u),`StylingFactory ${g} (setRule4Selector) failed`)})}function S(p,d,o=a){if(p=p?.trim?.(),!F(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${g} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(d.removeRule)return s(p);let l=r(p,!0),u=l||o.cssRules[o.insertRule(`${p} {}`,o.cssRules.length||0)];return m(()=>x(u,d),p,l)}function y(p){let d=p.trim().split(/{/,2),o=d.shift().trim();if(!F(o,String)||!o?.trim()?.length)return console.error(`StylingFactory ${g} (doParse): no (valid) selector could be extracted from rule ${de(p)}`);let l=vn(d.shift());return Re(()=>S(o,l),`StylingFactory ${g} (setRules) failed`)}function c(p){let d=n(p);return d.done?d.existing:y(p)}function h(p,d){return p.trim().startsWith("@media")?c(pn(p,d)):S(p,d)}return function(p,d={}){return i(p,d)&&(Object.keys(d).length?h(p,d):c(p))}}function yn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?i(t):e;function i(c){let h=document.querySelector(`#${c}`)?.sheet;if(h)return h;let p=Object.assign(document.createElement("style"),{id:c});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function a(c){return console.error(`StylingFactory ${r} [rule: ${c}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function s(c,h){return[...e.rules].find(p=>h?He(p.selectorText||"",c):bn`${hn(c)}${[..."gim"]}`.test(p.cssText))}function m(c){return/^@charset|@import|namespace/i.test(c.trim())?a(c):c.match(/}/g)?.length>1?{existing:S(c,1),done:!0}:{done:!1}}function g(c){let h=[...e.cssRules].reduce((d,o,l)=>He(o.selectorText||"",c)&&d.concat(l)||d,[]),p=h.length;return h.forEach(d=>e.deleteRule(d)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${c} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${c} does not exist in ${r.slice(4)}`)}function x(c,h){return c&&F(c,String)&&c.trim().length>0&&F(h,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function S(c){c=c.trim();let h=c.slice(0,c.indexOf("{")).trim(),p=!!s(h);try{return e.insertRule(`${c}`,e.cssRules.length),p}catch(d){return console.error(`StylingFactory ${r} (tryParse) ${d.name} Error:
1
+ var{IS:b,maybe:Q,$Wrap:So,isNothing:Wt,xProxy:Jt,addSymbolicExtensions:xo}=Bt({useSymbolicExtensions:!1});function Bt(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Qt(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Qt(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=Yt(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function Yt(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(Wt(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||Q({trial:v=>String(i)===t.NAN}),isInfinity:Q({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:D,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case D===Boolean:return f?t.BOOLEAN:D===l;default:return S(i,l,f,x(i,D))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return Q({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||b(i,1/0)||b(i,NaN):u,u}}var Ut=_t(),de=qt(),V=Vt();function qt(){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(","))}}function Vt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function _t(){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;}}"]}var Ze={html:"innerHTML",text:"textContent",class:"className"},Xt=Gt();function Gt(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case sn(r):return ze(t,r,n);default:return ze(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function ze(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>an(n):un(t)}}),e[t]}function Kt(e,t,n){return t=t?.isJQx&&t.first()||t,Q({trial:r=>ln(t)?e.append(t):Ve(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
2
+ `,r)})}function en(e,t,...n){let r=tn(t,e);return n?.forEach(o=>Kt(r,o,e)),r}function tn(e,t){switch(e=ve(t)?on(e):e?.isJQx?e.first():e,!0){case b(e,String):return Y(t,Ve(e,t)?{html:e}:{text:e});case b(e,Node):return rn(t,e);default:return Y(t,e)}}function nn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in Ze&&(e[Ze[n]]=e[t],delete e[t])}),e}function rn(e,t){let n=Y(e);return n.append(t),n}function Y(e,t={}){t=qe(t,{});let n=Object.entries(t.data??{}),r=Object.assign(ve(e)?new Comment(t?.text):document.createElement(e),nn(t));return n.length&&n.forEach(([o,a])=>r.dataset[o]=String(a)),r}function qe(e,t){return t?b(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):b(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function on(e){return qe(e)?e?.text??e?.textContent??"":String(e)}function an(e){return Y("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function Ve(e,t){return!ve(t)&&b(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function ln(e){return e?.constructor===Comment||e?.constructor===CharacterData}function ve(e){return e?.constructor===Comment||/comment/i.test(e)}function sn(e){return!b(Y(e),HTMLUnknownElement)}function un(e){return(t,...n)=>en(e,t,...n)}var{IS:F,maybe:se,$Wrap:vo,isNothing:cn,xProxy:To,addSymbolicExtensions:wo}=mn({useSymbolicExtensions:!1});function mn(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=dn(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function dn(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=fn(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function fn(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(cn(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||se({trial:v=>String(i)===t.NAN}),isInfinity:se({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:D,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case D===Boolean:return f?t.BOOLEAN:D===l;default:return S(i,l,f,x(i,D))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return se({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||F(i,1/0)||F(i,NaN):u,u}}var _e=yn;function yn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:a,removeRules:s,consider:m,currentSheetID:g}=pn({styleSheet:e,createWithId:t});function x(p,d){if(p&&d.removeProperties){Object.keys(d.removeProperties).forEach(i=>p.style.removeProperty(Re(i)));return}Object.entries(d).forEach(([i,l])=>{i=Re(i.trim()),l=l.trim();let u;if(/!important/.test(l)&&(l=l.slice(0,l.indexOf("!important")).trim(),u="important"),!CSS.supports(i,l))return console.error(`StylingFactory ${g} error: '${i}' with value '${l}' not supported (yet)`);He(()=>p.style.setProperty(i,l,u),`StylingFactory ${g} (setRule4Selector) failed`)})}function S(p,d,i=a){if(p=p?.trim?.(),!F(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${g} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(d.removeRule)return s(p);let l=r(p,!0),u=l||i.cssRules[i.insertRule(`${p} {}`,i.cssRules.length||0)];return m(()=>x(u,d),p,l)}function y(p){let d=p.trim().split(/{/,2),i=d.shift().trim();if(!F(i,String)||!i?.trim()?.length)return console.error(`StylingFactory ${g} (doParse): no (valid) selector could be extracted from rule ${fe(p)}`);let l=Tn(d.shift());return He(()=>S(i,l),`StylingFactory ${g} (setRules) failed`)}function c(p){let d=n(p);return d.done?d.existing:y(p)}function h(p,d){return p.trim().startsWith("@media")?c(gn(p,d)):S(p,d)}return function(p,d={}){return o(p,d)&&(Object.keys(d).length?h(p,d):c(p))}}function pn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(c){let h=document.querySelector(`#${c}`)?.sheet;if(h)return h;let p=Object.assign(document.createElement("style"),{id:c});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function a(c){return console.error(`StylingFactory ${r} [rule: ${c}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function s(c,h){return[...e.rules].find(p=>h?We(p.selectorText||"",c):Sn`${bn(c)}${[..."gim"]}`.test(p.cssText))}function m(c){return/^@charset|@import|namespace/i.test(c.trim())?a(c):c.match(/}/g)?.length>1?{existing:S(c,1),done:!0}:{done:!1}}function g(c){let h=[...e.cssRules].reduce((d,i,l)=>We(i.selectorText||"",c)&&d.concat(l)||d,[]),p=h.length;return h.forEach(d=>e.deleteRule(d)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${c} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${c} does not exist in ${r.slice(4)}`)}function x(c,h){return c&&F(c,String)&&c.trim().length>0&&F(h,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function S(c){c=c.trim();let h=c.slice(0,c.indexOf("{")).trim(),p=!!s(h);try{return e.insertRule(`${c}`,e.cssRules.length),p}catch(d){return console.error(`StylingFactory ${r} (tryParse) ${d.name} Error:
4
4
  ${d.message}
5
- Rule: ${de(c)}
5
+ Rule: ${fe(c)}
6
6
  ${n}`),p}}function y(c,h,p){try{return c(),p}catch(d){return console.error(`StylingFactory ${r} (tryAddOrModify) ${d.name} Error:
7
7
  ${d.message}
8
- Rule: ${de(h)}
9
- ${n}`),p}}return{sheet:e,removeRules:g,tryParseAtOrNestedRules:m,ruleExists:s,checkParams:x,tryParse:S,consider:y,currentSheetID:r}}function pn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${gn(r)}`)}`}function de(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function gn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
- `)}function hn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function bn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,i,a)=>r.concat(t[a-1]||"").concat(i),"")||e.raw.join("")).split(`
11
- `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function ze(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Re(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function Sn(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
8
+ Rule: ${fe(h)}
9
+ ${n}`),p}}return{sheet:e,removeRules:g,tryParseAtOrNestedRules:m,ruleExists:s,checkParams:x,tryParse:S,consider:y,currentSheetID:r}}function gn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${hn(r)}`)}`}function fe(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function hn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
+ `)}function bn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function Sn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,a)=>r.concat(t[a-1]||"").concat(o),"")||e.raw.join("")).split(`
11
+ `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function Re(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function He(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function xn(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function xn(e){return e.reduce((t,n)=>{let[r,i]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&i?{...t,[r]:i}:t},{})}function vn(e){return xn(Sn(e))}function He(e,t){return e?.replace("::",":")===t?.replace("::",":")}var fe=!1,Tn={on:()=>fe=!0,off:()=>fe=!1},Q={tagsRaw:q,allowUnknownHtmlTags:Tn,isAllowed(e){if(fe)return!0;let t=b(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!q[t]},allowTag:e=>q[e.toLowerCase()]=!0,prohibitTag:e=>q[e.toLowerCase()]=!1},wn=!0,V={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};function On(e){if(wn&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,i])=>[...n,`${G(r)} => ${i}`],[]).join("\\000A");E.error(`JQx: HTML creation error(s): ${t}`)}}function $n(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||Q.isAllowed(t)}function ve(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return b(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&ve(n),n?.attributes){let r=b(n,SVGElement)?me.svg:me.html;[...(n??{attributes:[]}).attributes].forEach(i=>{let a=i.name.trim().toLowerCase(),s=i.value.trim().toLowerCase().replace(V.whiteSpace,""),m=a==="href"?!V.validURL.test(s):V.notAllowedValues.test(s),g=a.startsWith("data")?!V.data.test(a):!!r[a];if(m||g){let x=Je(i.value||"none",60);x+=x.length===60?"...":"",t.removed[`${i.name}`]=`attribute/property/value not allowed, removed. Value: ${x}`,n.removeAttribute(i.name)}})}if(!($n(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),i=Je(r,60)??"EMPTY";i+=i.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${i}`,n.remove()}}),On(t),e}function Nn(e){let t=document.createElement("div");return t.insertAdjacentHTML(I.end,e),t.childNodes.length?ve(t):void 0}function En(e,t,n){switch(!0){case b(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case b(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function ye(e=[],t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,i)=>{let a=Z(i)&&jn(i,t,n);return a?[...r,a]:r},[])}function jn(e,t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t?.[0]:t,b(e,Comment,Text)?En(e,t,n):b(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function L(e){if(b(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(i=>i.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||b(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Nn(e);return r.childNodes.length<1?L(`<span data-jqxcreationerror="1">${Ke(e,60)}</span>`):r.children[0]}function Dn(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...Qt);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],i={};return e.handle({type:"click, cancel",handlers:c,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:s,removeModal:y});function a(d){if(r.open)switch(!0){case m(d):return;default:return s(),setTimeout(()=>a(d),200)}i={...d};let{content:o}=i;return e.IS(o,String,HTMLElement)||o?.isJQx?g():!0}function s(){return i.modal?p(i.warnMessage):x()}function m(d){for(let[o,l]of Object.entries(i))if(l!==d[o])return!1;return!0}function g(){n.clear();let{content:d,modal:o,closeAfter:l}=i;o=e.IS(o,Boolean)?o:!1;let u=o?"":e.div({id:"closeHandleIcon"});n.append(u,e.IS(d,String)?e.div(d):d),r.showModal(),!o&&e.IS(l,Number)&&h(s,l)}function x(){if(r.close(i.returnValue),S(),e.IS(i.callback,Function))return t.push(setTimeout(()=>i.callback(i.returnValue),200));i={}}function S(){t.forEach(d=>clearTimeout(d)),t=[]}function y({callback:d,value:o}={}){i.returnValue=o,i.modal=!1,i.callback=d||i.callback,s()}function c({evt:d}){if(!(Object.keys(i).length<1||!r.open)&&(d.type==="cancel"&&i.modal&&d.preventDefault(),d.target.closest("#closeHandleIcon")||!d.target.closest("#jqxPopupContent")))return i.activeTimer&&clearTimeout(i.activeTimer),s()}function h(d,o){e.IS(d,Function)&&e.IS(o,Number)&&o>0&&(S(),t.push(setTimeout(d,o*1e3)))}function p(d){if(!e.IS(d,String,HTMLElement,Proxy))return;let o=n.find$(".warn");switch(!0){case o.is.empty:o=e.div({class:"warn"},d);default:n.append(o.addClass("active")),h(()=>n.find$(".warn").removeClass("active"),2)}}}function In(e){let t={},n="anonymous_";function r(S){if(S){let{handler:y,capture:c,type:h}=S;document.addEventListener(h,y,{capture:c})}}function i(S){if(S){let{type:y,handler:c,capture:h}=S;document.removeEventListener(y,c,{capture:h})}}function a(S,y,c,h){return function(p){if(!$(y))return S({evt:p});let d=p.target.closest(y);if(d){let o=e(d);S({self:o,me:o,evt:p}),c&&g(p.type,h)}return!0}}function s(S){return t[S]=t[S]||{},t[S]}function m(S,y){return Object.entries(s(S)).find(([c])=>c===y)}function g(S,y){let c=m(S,y);c&&(i(c[1]),delete t[S][y],delete pe[y],E.warn(`Removed listener [${y}] for event type [${S}].`))}function x(S){let{type:y,handler:c,name:h,capture:p,once:d,selector:o,node:l,about:u}=S;t[y]=t[y]||{};let f=kn(h||c.name),v=c;if(l instanceof HTMLElement){let N=l.dataset.hid||f;l.dataset.hid=N,o=`[data-hid=${N}]`}switch(!0){case!t[y][f]:return E.log(`JQx: created listener for event type ${y}, with handler name ${f}`),t[y][f]={name:f,handler:a(c,o,d,f),capture:Fn(y,p),once:!!d,type:y,initialHandler:v,selector:!!o&&o||!1,about:!!u&&u||!1,unListen(){g(y,f)}},t[y][f];default:return console.warn(`The listener [${f}] for [${y}] exists, it is not re-assigned.`)}}return{remove(...S){return g(...S)},listen:function(S){let{type:y,handler:c}=S;if(!$(y)||!b(c,Function))return;let h=x(S);if(h)return r(h),{type:y,name:h.name,unListen(){g(y,h.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var E=Zn(),Cn=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],I=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(e,t){return e[String(t).toLowerCase()]??e[t]}})),An=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Pn=Object.freeze({get(e,t){return e[Te(t)]||e[t]},enumerable:!1,configurable:!1}),pe={};Wt.custom();function Ln(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function kn(e){return $(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():Xe()}function Mn(e){let t=!!e.node&&!b(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(i=>`[data-${i}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(i=>`.${i}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(i=>!!i).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function Xe(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return pe[t]?Xe():(pe[t]=t,t)}function Fn(e,t){return!!Cn.find(n=>n===e)||!!t}function Ge(e){return e.startsWith("data")||me.html.find(t=>e.toLowerCase()===t)}function We(e){return e&&(e.textContent="")}function ge(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?ge(e,t,n):t}function $(e,t=1){return t=b(t,Number)&&t||1,b(e,String)&&e.length>=t}function Je(e,t=120){return Ke(e,t).replace(/&lt;/g,"<")}function Ke(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function G(e){switch(!0){case b(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function se(e){return b(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Zn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function i(){t=!0}function a(){t=!1}function s(...x){return n.unshift(...x.map(S=>`${ue()} \u2A3B ${se(S)}`)),console.error(n.slice(0,x.length).join(`
14
- `)),r}function m(...x){return n.unshift(...x.map(S=>`${ue()} \u26A0 ${se(S)}`)),console.warn(n.slice(0,x.length).join(`
15
- `)),r}function g(...x){let S=x.map(y=>`${ue()} \u2714 ${se(y)}`);switch(!t&&n.unshift(...S),e){case!0:console.log(S.join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:g,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:m,enumerable:!1}}),Object.freeze(r)}function ue(){return(e=>`[${_(e.getHours())}:${_(e.getMinutes())}:${_(e.getSeconds())}.${_(e.getMilliseconds(),3)}]`)(new Date)}function zn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=A(n),n.startsWith("data"))return et(e,r);b(r,String)&&Ge(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function et(e,t){if(e&&b(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${A(n)}`,r)}function tt(e){return e?b(e,Proxy)?[e.EL]:b(e,NodeList)?[...e]:Z(e)?[e]:$e(e)?e:e.isJQx?e.collection:void 0:[]}function Be(e,t){return e.andThen(t)}function Rn(e,t){return e.andThen(t,!0)}function Z(e){return b(e,Text,HTMLElement,Comment)}function ce(e,t){if(b(t,Object))for(let[n,r]of Object.entries(t)){let i;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),i="important"),e.style.setProperty(A(n),r,i)}}function M(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Hn(e){if(!b(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),i=!![t.display,n.display].includes("none"),a=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,m=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,g=+n.opacity==0||+(t.opacity||1)==0;return!(a||m||g||i||r||s)}function Wn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function Jn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(rt(n)?`<!--${n.data}-->`:we(n)?n.textContent:n.outerHTML),"")}function _(e,t=2){return`${e}`.padStart(t,"0")}function Bn(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function nt(){return`_${qn(An).slice(0,8).join("")}`}function Yn(e){return e=b(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,b(e,Array)?e:b(e,String)&&e?.trim().toLowerCase()||""}function Qn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function Un(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function qn(e){let t=e.length;for(;t--;){let n=Bn(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Te(e){return b(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${Vn(t)}`||t).join(""):e}function A(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function Vn([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function we(e){return b(e,Comment,Text)}function rt(e){b(e,Comment)}function _n(e){return b(e,Text)}function Oe(e){return b(e,String)&&/^<|>$/.test(`${e}`.trim())}function $e(e){return b(e,Array)&&!e?.find(t=>!Z(t))}function ot(e){return b(e,Array)&&!e?.find(t=>!Oe(t))}function T(e,t){let n=e.collection.filter(r=>!we(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function Xn(e){return e.node?b(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function it(e,t,n){let r=t!==document.body&&b(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{E.warn(`JQx: Invalid CSS querySelector. [${b(e,String)?e:"Not a string!"}]`)}}function Gn(){return{isCommentOrTextNode:we,isNode:Z,isComment:rt,isText:_n,isHtmlString:Oe,isArrayOfHtmlElements:$e,isArrayOfHtmlStrings:ot,ElemArray2HtmlString:Jn,input2Collection:tt,setCollectionFromCssSelector:it,cssRuleEdit:_e({createWithId:"JQxStylesheet"})}}function Kn(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return b(n,Node)?Object.freeze({get writable(){return Wn(n)},get modal(){return Qn(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Hn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function er(e,t,n,r){n&&b(t,String)&&(t={[t]:n==="-"?"":n});let i;t.className&&(i=t.className,delete t.className),i=[...e.classList].find(a=>a.startsWith("JQxClass-")||i&&a===i)||i||`JQxClass-${nt().slice(1)}`,r.editCssRule(`.${i}`,t),e.classList.add(i)}var tr=Kn();function nr(e){return{factoryExtensions:rr(e),instanceExtensions:or(e)}}function rr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Pn)},set(n={}){if(!t.is.empty&&b(n,Object))for(let[r,i]of Object.entries(n))t.setData({[r]:i});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&b(n,Object))for(let[r,i]of Object.entries(n))t.setData({[r]:i});return t},remove(n){return t[0]?.removeAttribute(`data-${A(n)}`),t}}},dimensions(t){if(t.is.empty)return E.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=ge(n,0),r.scrollLeftDistance=ge(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let i=n?t.outerHtml:t.html();return r?G(i):i},set(n,r=!1,i=!1){n=n.isJQx?n.HTML.get(1):n;let a=b(n,String);return n=a&&i?G(n):n,a&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return tr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[A(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let i=b(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&b(r,String)?[r]:r,n=n&&b(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let a of n)t.addClass(a);return i?.startsWith(".")&&t.addClass(i.slice(1)),i?.startsWith("#")&&!t.attr("id")&&t.prop({id:i.slice(1)}),t}}}}}function or(e){return{addClass(t,...n){return T(t,r=>r&&n.forEach(i=>r.classList.add(i)))},after(t,n){return Be(t,n)},afterMe(t,n){return Be(t,n)},andThen(t,n,r=!1){if(!n||!b(n,String,Node,Proxy))return E.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),t;n=n?.isJQx?n:b(n,Node)?e.virtual(n):e.virtual(L(n));let[i,a,s]=r?[0,"before",n.collection.concat(t.collection)]:[t.collection.length-1,"after",t.collection.concat(n.collection)];return t[i][a](...n.collection),t.collection=s,t},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let i of n){if(!i.isJQx&&$(i)){let a=i.trim(),s=/^<(.+)[^>]+>$/m.test(a)?L(i):e.text(i);T(t,m=>m.append(r?s:M(s)))}Z(i)&&T(t,a=>a.append(r?i:M(i))),i.isJQx&&!i.is.empty&&T(t,a=>i.collection.forEach(s=>a.append(r?s:M(s))))}return t},appendTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||b(t.node,Text,Comment))return t;if(!r&&$(n))return n=A(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if($(n)&&r)switch(n=A(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return b(n,Object)&&!t.is.empty&&zn(t.node,n),t},before(t,n){return t.andThen(n,!0)},beforeMe(t,n){return Rn(t,n)},clear(t){return T(t,We)},closest(t,n){let r=$(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return T(t,i=>er(i,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return E.error("Duplicating an empty JQx instance is not possible"),t;default:let i=t.collection[0].cloneNode(!0);return i.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),n?e(i).toDOM(r):e.virtual(i)}},each(t,n){return T(t,n)},empty(t){return T(t,We)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return T(t,n=>ce(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!$(n)):return"";case!$(n):return t.node?.getHTML()??"";default:let i=L(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return T(t,a=>(a.textContent=r?a.textContent:"",a.insertAdjacentHTML(e.at.end,i.getHTML())))}},htmlFor(t,n,r="",i=!1){if(t.is.empty||!$(n)||!$(r))return t;let a=t.find$(n);if(a.length<1)return t;let s=L(`<span>${r}</span>`);return a.each(m=>{i||(m.textContent=""),m.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let i of n){if($(i)){i=i.trim();let a=/^<(.+)[^>]+>$/m.test(i)?L(i):e.text(i);a=r?a:M(a),T(t,s=>s.prepend(a.cloneNode(!0)))}Z(i)&&T(t,a=>a.prepend(r?i:M(i))),i.isJQx&&!i.is.empty&&(i.collection.length>1&&i.collection.reverse(),T(t,a=>T(i,s=>a.prepend(r?s:M(s)))),i.collection.reverse())}return t},prependTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).prepend(t),t}},prop(t,n,r){if(b(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let i=b(n,Object)?n:{[n]:r};for(let[a,s]of Object.entries(i)){if(a=a.trim(),s&&!Ge(a)||!s)return!1;if(a.toLowerCase()==="id")return t[0].id=s;T(t,m=>{if(a.startsWith("data"))return m.dataset[a.slice(a.indexOf("-")+1)]=s;m[a]=s})}return t},remove(t,n){let r=a=>a.remove(),i=()=>t.collection=t.collection.filter(a=>document.documentElement.contains(a));if(n){let a=t.find$(n);return a.is.empty||(T(a,r),i()),t}return T(t,r),i(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return T(t,r=>{if(r)for(let i of n)r.classList.remove(i)})},renderTo(t,n,r){return n=b(n,HTMLElement)||n.isJQx?n:document.body,r=b(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let i=t.node;return!n||!b(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||b(r,NodeList))&&(r=r[0]),i&&n&&(n=b(n,String)?i.querySelectorAll(n):n.isJQx?n.collection:n,b(n,HTMLElement,NodeList,Array)&&b(r,HTMLElement)&&(b(n,HTMLElement)?[n]:[...n]).forEach(a=>a.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return T(t,i=>{i.classList.remove(n);for(let a of r)i.classList.add(a)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=b(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return T(t,r=>et(r,n))},show(t){return T(t,n=>ce(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&b(n,String)):return t.find$(n);case(r&&b(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return T(t,i=>{r&&b(n,String)&&(n={[n]:r||"none"}),ce(i,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!b(n,String):return t.node.textContent;default:return T(t,i=>i.textContent=r?i.textContent+n:n)}},toDOM(t,n=document.body,r=I.BeforeEnd){return t.isVirtual=!1,ye(t.collection,n,r),t},toggleClass(t,n){return T(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,i){r=b(r,Function)?r:Event,i=b(i,Object)?{...i,bubbles:i.bubbles??!0}:{bubbles:!0};let a=new r(n,i);return t.is.empty||t.each(s=>s.dispatchEvent(a)),t},val(t,n){switch(!0){case(t.is.empty||!b(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!b(n,String):return t.node.value;default:return t.node.value=b(n,String)?n:"",t}}}}var he,K,{isComment:Oo,isText:$o,isHtmlString:No,isArrayOfHtmlElements:Eo,isArrayOfHtmlStrings:jo,ElemArray2HtmlString:Do,cssRuleEdit:be,addFn:ir}=ar();function ar(){return{...Gn(),addFn:lr}}function lr(e,t){return e=e?.trim(),!$(e)||!b(t,Function)?E.error("JQx.fn: method invalid parameter(s)"):(K[e]=(n,...r)=>t(n,...r),E.log(`JQx: added extension function [${e}]`))}function sr(e){return function(t,n,r){if(t=t?.trim(),!$(t)||!b(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let i=r?{get(){return n()}}:{value(...a){return n(...a)}};try{Object.defineProperty(e,t,i)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return E.log(`JQx: added static extension function [${t}]`)}}function X(e){return new Proxy(e,Object.freeze({get:(t,n)=>ur(t,n,e)}))}function Ye(e,t){return(...n)=>b(e,Function)&&e(X(t),...n)}function ur(e,t,n){switch(!0){case b(t,Symbol):return B({trial:()=>e[t],whenError:()=>e});case b(+t,Number):return e.collection?.[t]||void 0;case t in he:return Ye(he[t],n)();case t in K:return Ye(K[t],n);default:return e[t]}}function cr(e){let t=pr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function mr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Te(t):t.toLowerCase(),Q.allowTag(t),Object.defineProperties(e,Se(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),Q.prohibitTag(t),Object.defineProperties(e,Se(t,!1,e))}}}function Qe(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))be(t,{removeRule:1})}function dr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(I).find(a=>r===a);let i=e(t,document.createElement("br"));if(n&&!b(n,HTMLBRElement))for(let a of i.collection)r?n.insertAdjacentElement(r,a):n.append(a);return i}}function fr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[i,a]of Object.entries(r))!(i in t)&&Object.defineProperty(t,i,{...a,enumerable:!1})}return t}function yr(e,t,n,r){return e=A(r||e.toLowerCase()),{get(){return(...i)=>{let a=t&&n.virtual(ve(_t[e](...i)))||void 0,s=b(a?.node,Comment,Text,void 0)?"":Mn(a);return E.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function Se(e,t,n,r){e=e.toLowerCase();let i=yr(e,t,n,r);return r?{[r]:i,[Te(r)]:i}:{[e]:i,[e.toUpperCase()]:i}}function pr(e){return fr(Object.entries(Q.tagsRaw).reduce(gr(e),{}),Tr(e))}function gr(e){return function(t,[n,r]){return Object.defineProperties(t,Se(n,r,e)),t}}function hr(e){return function(t,n,...r){b(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function br(e){return function(t){let{type:n,types:r,origin:i,selector:a,handler:s,handlers:m,node:g,name:x,capture:S,once:y,about:c}=t;s=m||s,n=r||n,a=i||a;let h=Yn(n),p=x;s=b(s,Function)?[s]:s;let d={type:h,selector:a||i,capture:S,name:p,once:y,node:g,about:c};switch(!0){case(b(h,Array)&&h.length>0):for(let o of h)d.type=o,Ue(s,d,e);break;default:return Ue(s,d,e)}}}function Ue(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Sr(e){return function(t,n){return n=$(n)&&n,t=$(t)&&t,n&&t&&e.listenerStore[t][n]}}function xr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:Dn(e),enumerable:!1}),e.activePopup}function vr(e){let t=(m,g)=>be(m,g),n=function(m){return _e({createWithId:m||`jqx${nt()}`})},r=function(...m){for(let g of m)be(g)},i=mr(e),a=In(e),s=br(a);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:i,handle:s,capturedHandling:s,log:(...m)=>E.on.log(...m).off,warn:(...m)=>E.on.warn(...m).off,error:(...m)=>E.on.error(...m).off,handlerWrapper:a}}function Tr(e){let{factoryExtensions:t,instanceExtensions:n}=nr(e);he=t,K=n;let{editCssRule:r,createStyle:i,editCssRules:a,allowProhibit:s,handle:m,capturedHandling:g,log:x,warn:S,error:y,handlerWrapper:c}=vr(e),h=Sr(e),p=sr(e);return{log:x,warn:S,error:y,editCssRules:a,createStyle:i,editStylesheet:i,editCssRule:r,escHtml:G,logger:E,text(d,o=!1){return o?e.comment(d):document.createTextNode(d)},node(d,o=document){return o.querySelector(d,o)},nodes(d,o=document){return[...o.querySelectorAll(d,o)]},clearAllTimers:Ln,get staticFn(){return function(d,o,l){return p(d,o,l)}},get toBool(){return Un},get getNamedListener(){return h},get virtual(){return dr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return Qe},get removeCssRules(){return Qe},get delegate(){return hr(g)},get delegateCaptured(){return g},get handle(){return g},get listen(){return c.listen},get at(){return I},get setStyle(){return r},get fn(){return ir},get lenient(){return Q.allowUnknownHtmlTags},get IS(){return b},get Popup(){return xr(e)},get listenerStore(){return c.ListenerStore}}}var wr=cr(Or());function Or(){return function(e,t,n=I.BeforeEnd){if(e?.isJQx)return e;let r=b(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(I).find(g=>n===g)?n:void 0;let i=Oe(e),a=!i&&ot(e)||i,s={collection:tt(e)??[],isVirtual:r,isJQx:!0},m=$e(s.collection);if(s.collection.length&&m)return r||s.collection.forEach(g=>{t.contains(g)||ye([g],t,n)}),X(s);if(a){if([e].flat().forEach(g=>s.collection.push(L(g))),s.collection.length>0){let g=s.collection.filter(y=>y?.dataset?.jqxcreationerror);s.collection=s.collection.filter(y=>!y?.dataset?.jqxcreationerror);let x=s.collection.map(y=>`${String(y.constructor).split(/function|\(/)[1].trim()}`).length>1;s=X(s);let S=s.collection.length>0?Xn(s):"sanitized: no elements remaining";E.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${x?"array of ":""}HTML string${x?"s":""} ${S}`),s.isVirtual||ye(s.collection,t,n)}return s}return it(e,t,s),X(s)}}var P=wr;var oe=$r();function $r(){let[e,t,n,r]=["2-digit","numeric","long","short"],i={fixed:{MM:{month:n},M:{month:r},m:{month:t},mm:{month:e},yyyy:{year:t},yy:{year:e},WD:{weekday:n},wd:{weekday:r},d:{day:t},dd:{day:e},h:{hour:t},hh:{hour:e},mi:{minute:t},mmi:{minute:e},s:{second:t},ss:{second:e},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:c=>({timeZoneName:c.slice(4)}),hrc:c=>({hourCycle:`h${c.slice(4)}`}),ds:c=>({dateStyle:c.slice(3)}),ts:c=>({timeStyle:c.slice(3)}),tz:c=>({timeZone:c.slice(3)}),e:c=>({era:c.slice(2)}),l:c=>({locale:c.slice(2)})}},a={...i,retrieveDyn(c){let h=c?.slice(0,c.indexOf(":"));return i.dynamic[h]&&i.dynamic[h](c)},get re(){return new RegExp(`\\b(${Object.keys(i.fixed).join("|")})\\b`,"g")}},s=(c="dtf",h=0)=>{let p=` ${c.replace(/(?<=\{)(.+?)(?=})/g,o=>`[${h++}]`).replace(/[{}]/g,"").trim()} `,d=c.match(/(?<=\{)(.+?)(?=})/g)||[];return{get texts(){return d},formatString(o){p=o},set formatStr(o){p=o},get formatStr(){return p},get units(){return p.match(a.re)||[]},finalize(o="",l="",u="",f=""){return p.replace(/~([\d+]?)/g,"$1").replace(/dtf/,o).replace(/era/,u).replace(/dp\b|~dp\b/,l).replace(/yn\b/,f).replace(/\[(\d+?)]/g,(v,N)=>d[N].trim()).trim()}}},m=c=>c.replace(/\s+/g,""),g=(...c)=>c?.reduce((h,p)=>({...h,...a.retrieveDyn(p)||a.fixed[p]}),a.fixed.dl),x=(c,h,p)=>{let d=g(...m(p).split(",")),o=Intl.DateTimeFormat(d.locale,d).format(c);return h.finalize(o)},S=(c,h,p,d)=>c.toLocaleString(h,{timeZone:p,month:d?r:n}),y=(c,h,p)=>{let d=g(...h.units.concat(m(p).split(",")).flat()),o={...a.fixed},l=(f,v)=>d[f]==="numeric"&&v.startsWith("0")?v.slice(1):v,u=Intl.DateTimeFormat(d.locale,d).formatToParts(c).reduce((f,v)=>v.type==="literal"&&/[ ,/-]/.test(v.value)?f:{...f,[v.type]:l(v.type,v.value)},{});return o.ms=d.fractionalSecondDigits?o.msp:o.ms,o.yyyy=u.relatedYear?o.ry:o.yyyy,h.formatStr=h.formatStr.replace(a.re,f=>/^(M|MM)$/.test(f)?S(c,d.locale,d.timeZone,/^M$/.test(f)):u[Object.keys(o[f]).shift()]||f),h.finalize(void 0,u.dayPeriod,u.era,u.yearName)};return(c,h,p="l:default")=>/ds:|ts:/.test(p)?x(c,s(void 0),p):y(c,s(h||void 0),p)}var Nr=Er;function Er(){let e=(r,i)=>{let a=isNaN(new Date(r)),s=isNaN(new Date(i));if(s){let[m,g,x]=Array(3).fill("end date not valid");return{error:!0,message:m,full:g,clean:x}}if(a){let[m,g,x]=Array(3).fill("start date not valid");return{error:!0,message:m,full:g,clean:x}}if(a&&!s){let[m,g,x]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:m,full:g,clean:x}}return{error:!1}},t=n();return function({start:r,end:i,diffs:a={}}={}){let s=e(r,i),m=i>r?"+":"-";if(s.error)return s;let g=Math.abs(r-i),x=new Date(g),S=x.getUTCFullYear()-1970,y=x.getUTCMonth(),c=x.getUTCDate()-1,h=c%7,p=Math.floor(c/7),d=x.getUTCHours(),o=x.getUTCMinutes(),l=x.getUTCSeconds(),u=x.getUTCMilliseconds(),f=Math.floor(g/864e5);a={...a,fromUTC:r,toUTC:i,sign:"",years:S,months:y,days:c,hours:d,minutes:o,seconds:l,milliseconds:u,diffInDays:f},a.full=t({values:a,full:!0}),a.clean=t({values:a}),a.equalDates=a.clean==="Dates are equal";let v=d+o+l>0?"T":"";return a.clean!=="Dates are equal"&&(a.sign=m,a.jsPeriod=`${m}P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${p>0?`${p}W`:""}${h>0?`${h}D`:""}${v}${d>0?`${d}H`:""}${o>0?`${o}M`:""}${l>0?`${l}S`:""}`,a.ISOPeriod=`P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${c>0?`${c}D`:""}${v}${d>0?`${d}H`:""}${o>0?`${o}M`:""}${l>0?`${l}S`:""}`),a};function n(){let r=(...a)=>s=>a.reduce((m,g)=>g(m),s),i=(a,s)=>a===1?s.slice(0,-1):s;return r(({values:a,full:s})=>[Object.entries(a).filter(([m])=>/^(years|month|days|hours|minutes|seconds)/i.test(m)),s],([a,s])=>s?a:a.filter(([,m])=>s?+m:m>0),a=>a.reduce((s,[m,g])=>[...s,`${g} ${i(g,m)}`],[]),a=>a.length<1?"Dates are equal":`${a.slice(0,-1).join(", ")}${a.length>1?" and ":""}${a.slice(-1).shift()}`)}}var jr=Dr;function Dr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[i,a])=>({...r,[i]:a,[`${i}s`]:a}),{}),t=!1,n=function(...r){let i=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=i?r[0].trim().replace(/^subtract,/i,"").split(",").map(a=>a.trim()):r.filter(a=>!a.startsWith("subtract"))),i&&!t&&(r=r[0].split(",").map(a=>a.trim())),r.map(function(a){if(!a)return!1;let s=a.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(m=>{m=`${m}`.trim().replace(/[^a-z0-9-+]/g,"");let g=parseInt(m,10);return Number.isNaN(g)?m:t?-g:+g})}).filter(a=>a)};return function(r,...i){if(i.length<1)return r;let a=n(...i);return a.length&&a.forEach(([s,m])=>{m=m,m=e[m],s&&m&&r[`set${m}`](r[`get${m}`]()+s)}),r}}var vt=Nr(),Tt=Rr(),C=jr(),Ir=["sun","mon","tue","wed","thu","fri","sat"],wt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function at(e,...t){return C(e,...t),e}function Cr(e,t=!1){let n=Ot(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((i,a)=>n.clone.addDays(a+1)))}}function Ne(e,{start:t,end:n,future:r,past:i,include:a={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?w(t?.value||t).UTC:w.now.UTC,n=n&&n?.value||n?.constructor===Date?w(n?.value||n).UTC:w.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:i?t<n:(a.start?+s>=+t:+s>+t)&&(a.end?+s<=+n:+s<+n)}function lt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):O.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=O),oe(e,n,r)):Ar(e,n,r)}function Ar(e,t,n){let r=e.clone.relocate(O);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,oe(r,t,n)}function Pr(e,t){let n=vt({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function st(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:O,i=Mt(n,r),a=e.format("MM|WD",i).split("|");return{locale:n,timeZone:r,monthName:a[0],dayName:a[1],dayNames:Lt(n),monthNames:Ce(n)}}function ut(e,t=!1){let[n,r,i,a]=Ee(e,t),s={values4Timezone:t?O.timeZone:e.timeZone,hours:n,minutes:r,seconds:i,milliseconds:a};return Object.freeze(s)}function Ee(e,t=!1){let n=`l:en-CA,${t?`tz:${O.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function ct(e,t){let n=t?`tz:${O.timeZone}`:`,tz:${e.timeZone}`,[r,i,a]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);i-=1;let s=t?O.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:i,date:a})}function mt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Lr(e){let t=new Intl.Locale(e.locale),n=t.weekInfo?t.weekInfo.firstDay:t.getWeekInfo?t.getWeekInfo().firstDay:1;return n=n===7?0:n,wt[n]}function Ot(e,{sunday:t=!1}={}){let n=t?"sunday":Lr(e);return je(e,{day:n,preserveTodayWhenEqual:!0})}function kr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=De(n.slice(0,3)+":"+n.slice(-2),!0),r=De(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(i=>n[0]<0?-i:i)}function $t({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=w(t,{timeZone:e.timeZone})),e=w(pt(e,e.timeZone),{timeZone:e.timeZone}),t=w(pt(t,t.timeZone),{timeZone:t.timeZone});let n=vt({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=kr(t,e),i=n.sign.startsWith("-")?"ahead of":"behind",[a,s]=r.map(x=>Math.abs(x)),[m,g]=[`${a} ${ie(a,"hour")}`,`${s} ${ie(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||a+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${m}${s>0?` and ${g}`:""} ${i} ${t.timeZone}`,n}function dt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):w(e.value,{timeZone:t.timeZone||O.timeZone});let n=$t({start:e.clone,end:t}),r=`${n.sign}${ft(n.hours)}:${ft(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Mr(r)} ${e.timeZone}`}}function ft(e,t=2){return`${e}`.padStart(t,"0")}function ie(e,t){return`${t}${e>1||e===0?"s":""}`}function Mr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,i=ie(n,"hour"),a=ie(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${i} and ${r} ${a} ${s?"ahead of":"behind"}`:`${n} ${i} ${s?"ahead of":"behind"}`}function yt(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Fr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?yt(e,t,$D.localeInformation.formatOptions):yt(e,t,n);let i=e.clone.relocate({locale:"en"}),a=r?O.formatOptions:i.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${i.format("tz",a+",tzn:longOffset").replace(":","")} (tz)`;return i.format(s,a+",tzn:long, hrc:23")}function Nt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:O.timeZone,weekday:"short"});return Tt(n.format(e))}function Zr(e){let t=O,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),i=e.offsetFrom(r),a=r.offsetFrom(e),s=t,m=n,g=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),x=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),S={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:x,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:i.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(S.locales.remote={locale:m.locale,timeZone:m.timeZone},S.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Nt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:g,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:a.offset,string:e.toString()},S.offset.fromUserTime=a.offsetText),S}function ee(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function Et(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function jt(e,t){t=j({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(Et(n)-1)].map((r,i)=>n.clone.add(`${i+1} days`)))}function je(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let i=Tt(t);if(i<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let a=n?1:-1,s=w(new Date(...e.dateTimeValues),e.localeInfo);return r&&i===s.day?s:zr(s.addDays(n?1:-1),i,a)}function zr(e,t,n){function r(i){switch(!0){case i.day===t:return i;default:return r(i.add(`${n} days`))}}return r(e)}function te(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:i}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:i}):n?new Date(e).toLocaleTimeString(r,{timeZone:i}):new Date(e).toLocaleString(r,{timeZone:i})}function pt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function U(e,{year:t,month:n,date:r}={}){return D(t)&&e.setFullYear(parseInt(t)),D(r)&&e.setDate(parseInt(r)),D(n)&&e.setMonth(parseInt(n)),e}function z(e,{hours:t,minutes:n,seconds:r,milliseconds:i}={}){return D(t)&&e.setHours(parseInt(t)),D(n)&&e.setMinutes(parseInt(n)),D(r)&&e.setSeconds(parseInt(r)),D(i)&&e.setMilliseconds(parseInt(i)),e}function Dt(e){return e?.constructor===Date||e?.value}function gt(e,t){return Dt(t)?w(t?.value||t,e.localeInfo):w.from(...e.dateTimeValues).relocate(e.localeInfo)}function Rr(){return function(e){e=`${e}`.toLowerCase();let t=Ir.indexOf(e);return t<0?wt.indexOf(e):t}}function De(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function Hr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function ht(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function It(e,t){t=t||e?.timeZone||O.timeZone,e=e?.value?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t});let n=e.year||e.getFullYear(),r=ht(new Date(n,0,1),t),i=ht(new Date(n,5,1),t);return r!==i}function Ct(e,t){return t=t||e?.timeZone||O.timeZone,e=e?.hasDST?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Wr(e,{locale:t,timeZone:n,l:r,tz:i}={}){return e.localeInfo=j({locale:r||t||e.l||e.locale,timeZone:i||n||e.tz||e.timeZone}),e}function Jr(e,t){return Dt(t)&&(e=w(t.value||t,t.localeInfo||e.localeInfo)),e}function Ie(e,t){let n=At(new Date(e,11,t||31));return n===1?Ie(e,(t||31)-1):n}function bt(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function At(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Pt=Br;function Br({localeInfo:e,customMethods:t,dateValue:n}={}){let r,i={add(...a){return at(r,...a)},between({start:a,end:s,include:m}={}){return Ne(r,{start:a,end:s,include:m})},cloneWith(a){return gt(r,a)},daysUntil(a){return Pr(r,a)},differenceTo(a){return $t({start:r,end:a})},differenceUntil(a){return r.differenceTo(a).clean},firstWeekday({sunday:a=!1,midnight:s=!1}={}){return Ot(r,{sunday:a,midnight:s})},format(a,s){return lt(r,{formatStr:a,moreOptions:s})},fullMonth(a){return jt(r,a)},fullWeek(a=!1){return Cr(r,!!a)},isFuture(a){return Ne(r,{start:r,end:a,future:!0})},isPast(a){return Ne(r,{start:r,end:a,past:!0})},next(a,s){return je(r,{day:a,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(a){return dt(r,a)},previous(a,s){return je(r,{day:a,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:a,timeZone:s,l:m,tz:g}={}){return Wr(r,{locale:a,timeZone:s,l:m,tz:g})},revalue(a){return r=Jr(r,a),r},setDateValues({year:a,month:s,date:m}={}){return U(r,{year:a,month:s,date:m})},setTimeValues({hours:a,minutes:s,seconds:m,milliseconds:g}={}){return z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},subtract(...a){return at(r,"subtract,"+a.join(","))},toArray(a=!1){return ee(r,a)},toString({template:a,formatOptions:s,local:m}={}){return Fr(r,{withFormat:a,withFormatOptions:s,local:m})},values(a=!1){return a?r.dateTime:r.zoneDateTime},zoneFormat(a,s){return lt(r,{zoneTime:!0,formatStr:a,moreOptions:s})},set date({year:a,month:s,date:m}){U(r,{year:a,month:s,date:m})},set dateNr(a){U(r,{date:a})},set hours(a){z(r,{hours:a})},set localeInfo({locale:a,timeZone:s,l:m,tz:g}){e=ne({locale:a,timeZone:s,l:m,tz:g})},set milliseconds(a){z(r,{milliseconds:`${a}`})},set minutes(a){z(r,{minutes:a})},set month(a){U(r,{month:a})},set seconds(a){z(r,{seconds:a})},set time({hours:a,minutes:s,seconds:m,milliseconds:g}){z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},set year(a){U(r,{year:a})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return gt(r)},get date(){return ct(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return ee(r,!0)},get dateValues(){return mt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Et(r)},get DSTActive(){return Ct(r)},get hasDST(){return It(r)},get hours(){return r.time.hours},get info(){return Zr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return te(r)},get localDate(){return te(r,{dateOnly:!0})},get locale(){return(e||ne()).locale},get localeInfo(){return e},get localeString(){return te(r)},get localTime(){return te(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return st(r)},get quarter(){return bt(r)},get quarterNr(){return bt(r,!0)},get removeTime(){return Hr(r)},get seconds(){return r.time.seconds},get time(){return ut(r,!0)},get timeValues(){return Ee(r,!0)},get timeZone(){return(e||ne()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return O},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return dt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return At(r)},get weeksInYear(){return Ie(r.year,31)},get year(){return r.date.year},get zoneDate(){return ct(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return ee(r,!1)},get zoneDateValues(){return mt(r,!1)},get zoneDay(){return Nt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return st(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return ut(r)},get zoneTimeValues(){return Ee(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return ee(r,!1)}};return!e&&!n?i:(i.localeInfo=e||ne(),r=new Proxy(n,Yr(i)),Object.entries(Object.getOwnPropertyDescriptors(Ft(r,t))).forEach(([a,s])=>Object.defineProperty(i,a,s)),Object.freeze(r))}function Yr(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var O=kt(Intl.DateTimeFormat().resolvedOptions()),Qr=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);function Lt(e="en-GB"){return e=j({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Ce(e="en"){return e=j({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function Ur({year:e,locale:t}={}){e=D(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Ce().long.map(i=>i.toLowerCase());for(let i=0;i<12;i+=1){let a=w.from(e,i,1);n.calendar[r[i]]=jt(a,t)}return n}function qr({year:e,monthNr:t,locale:n="en-CA"}={}){e=D(t)&&parseInt(e)||-1,t=D(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=j({locale:n}).locale,t=r?t-1:void 0,r?w.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function kt(e){let t=Mt(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Mt(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function j({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,e=xt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:O.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${O.locale}"`),O.locale}}),t=xt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${O.timeZone}"`),O.timeZone}}),kt(Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions())}function ne({locale:e,timeZone:t,l:n,tz:r}={}){return j({locale:e,timeZone:t,l:n,tz:r},!0)}function St(e){return!Number.isNaN(+e)&&e?.constructor===Date?e:new Date}function Vr(e){let t=new Date;switch(!0){case(typeof e=="string"||typeof e=="number"):return St(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return St(e);default:return t}}function xt({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function _r({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:j({timeZone:t}).timeZone},i={timeZone:j({timeZone:n||""}).timeZone},a=w(e,r),s=w(e,i),m=s.differenceTo(a),g=a.offsetFrom(s).offset,[x,S]=De(g,!0),y=s.clone.add(`${x} hours, ${S} minutes`),c=m.equalDates?"No difference":`Time offset ${g}: ${i.timeZone} is ${m.clean} ${x<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:i.timeZone,timeDifference:c,result:{[r.timeZone.replace(/\//,"_")]:w(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[i.timeZone.replace(/\//,"_")]:y.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function D(e){return!Number.isNaN(parseInt(e))}function re(e,t,n){return e?.constructor===Number?C(t,`${e} ${n}`):t}function Xr(e){let t={addYears(n=1){return re(n,e,"years")},addMonths(n=1){return re(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,re(n,e,"days")},addDays(n=1){return re(n,e,"days")},get nextYear(){return C(e,"1 year")},get nextWeek(){return C(e,"7 days")},get previousWeek(){return C(e,"-7 days")},get previousYear(){return C(e,"-1 year")},get nextMonth(){return C(e,"1 month")},get previousMonth(){return C(e,"-1 month")},get tomorrow(){return C(e,"1 day")},get yesterday(){return C(e,"-1 day")}};for(let n of Qr)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Ft(e,t){let n=Xr(e);for(let[r,i]of Object.entries(t||{})){let a=i.enumerable,s=i.isGetter?{get(){return i.method(e)},enumerable:a}:{value(...m){return i.method(e,...m)},enumerable:a};Object.defineProperty(n,r,s)}return n}function Gr(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return j()}},localWeekdaynames:{value(n){return Lt(n)}},localMonthnames:{value(n){return Ce(n)}},daysInMonth:{value(n,r=!1){return n=D(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:Ur},monthCalendar:{value:qr},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=D(n)?parseInt(n)*1e3:void 0;let i=n?new Date(n):new Date;return w(i,r||O)}},hasDST:{value({date:n,timeZone:r}={}){return It(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return Ct(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let i=oe(n,"yyyy-m-d-h-mi-s",j({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return i[1]-=1,i}},format:{value({date:n,template:r,timeZone:i,locale:a,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let m=j({timeZone:i,locale:a}).formatOptions;return m+=s?`,${s}`:"",oe(n,r,m)}},addCustom:{value({name:n,method:r,enumerable:i=!1,isGetter:a=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:i,isGetter:a})}},validateLocaleInformation:{value:j},timeAcrossZones:{value:_r},weeksInYear:{value(n){return Ie(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,i])=>i.enumerable===!0));return[...Object.keys(Pt()),...Object.keys(Ft()),...Object.keys(n)].sort((r,i)=>r.localeCompare(i))}}}),e}var Zt={},w=Gr(Kr,Zt);function Kr(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Pt({localeInfo:j(n?e:t),dateValue:new Date(n?Date.now():Vr(e)),customMethods:Zt})}var eo=Object.defineProperties(zt,{escape:{value:uo,enumerable:!0}});function zt(e,...t){let{flags:n,cleanedArgs:r}=no(...t);return oo(new RegExp(co(to(e,...r)),n))}function to(e,...t){return R(t)?e.raw.reduce((n,r,i)=>n.concat(t[i-1]||"").concat(r),""):e.raw.join("")}function no(...e){let t=Ae(ro(e.at(-1)));return{flags:t,cleanedArgs:R(t)?e.slice(0,-1):e}}function ro(e){return ae(e,Array)?e.join(""):""}function oo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=so(n,e),t},enumerable:!1},clone:{get(){return lo(t)},enumerable:!1}}),ao(e));return t}function R(e){return e?.length>0}function ae(e,t){return e?.constructor===t}function io(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ae(r,Function)?r.bind(e.re):e.re[t]}}function ao(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:i}=io(t,n,e);switch(!0){case!!r:return r;default:return i}}}}function lo(e){let t=e.re.source,n=R(e.re.flags)?[...e.re.flags]:[];return zt`${t} ${n}`}function Ae(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ae(e,String)&&R(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function so(e,t){switch(!0){case(!ae(e,String)||!R(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,Ae(e));default:return t=new RegExp(t.source,Ae(t.flags,e))}}function uo(e){switch(!0){case(e?.constructor!==String||!R(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function co(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:k,maybe:Pe,$Wrap:Po,isNothing:mo,xProxy:Lo,addSymbolicExtensions:ko}=fo({useSymbolicExtensions:!1});function fo(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:i,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=yo(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function yo(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:i,verifyNothingness:a,determineType:s}=po(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),i(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(o){return o?.[Symbol.proxy]??e(o)}function c(o,l){switch(!0){case"defaultValue"in l:return p(o,l);case"notTypes"in l:return d(o,l);default:return e(o,...[l.isTypes].flat())}}function h(o,...l){return l.some(u=>e(o,u))}function p(o,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(o,...u)?o:l:d(o,{isTypes:u,notTypes:f})?o:l}function d(o,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(o,...l)&&!e(o,...u)}}function po(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(o,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return o(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return o(u,...f)},enumerable:!1,configurable:!1}}))}function r(o,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(o,l)}}function i(o){return(mo(o,!0)?{name:"unknown"}:Object.getPrototypeOf(o)?.constructor).name}function a(o,l){return Proxy=new o(o,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${i(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let o=Proxy;return{native(){Proxy=o},custom(){Proxy=a(o,Symbol.proxy)}}}function m(o,...l){let u=l.length<1,f=o==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(o?.constructor||Object.getPrototypeOf(o)?.constructor),isNaN:Number.isNaN(o)||Pe({trial:v=>String(o)===t.NAN}),isInfinity:Pe({trial:v=>String(o)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(o,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:N,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(o,...l);switch(l=l.length&&l[0],!0){case J:return String(o)===String(v);case(o?.[Symbol.proxy]&&f):return o[Symbol.proxy];case H:return f?t.NAN:String(v)===String(o);case W:return f?t.INFINITY:String(v)===String(o);case u:return f?String(o):String(v)===String(o);case N===Boolean:return f?t.BOOLEAN:N===l;default:return S(o,l,f,x(o,N))}}function x(o,l){switch(!0){case o===0:return Number;case o==="":return String;case!o:return{name:String(o)};default:return l}}function S(o,l,u,f){switch(!0){case(!u&&l===o||o?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(o)===t.NAN;case(o?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===o[Symbol.toStringTag];default:return l?c(o,l,f):y(o,f)}}function y(o,l){return(o?.[Symbol.toStringTag]??o?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(o,l,u){return Pe({trial:f=>o instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(o,l){return function(u){let f={get value(){return u},is(...v){return o(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return o(u,...v)}}}),Object.freeze(f)}}function p(){let o=l=>{};return function({trial:l,whenError:u=o}={}){try{return l()}catch(f){return u(f)}}}function d(o,l=!1){let u=o==null;return u=l?u||k(o,1/0)||k(o,NaN):u,u}}var Le=Rt(),ke=Rt("");function Rt(e,t={}){let{useSymbolicExtensions:n}=t;return e=k(e,String,Number)?String(e):void 0,n&&Me(),function(y,...c){return S(y,x(c))};function r(y,c){return c&&k(e,String,Number)?String(e):`{${y}}`}function i(y,c){let h=y in c;return h&&k(c[y],String,Number)?String(c[y]):r(y,h)}function a(y){return(...c)=>{let h=c.find(p=>p.key);return i(h?h.key:"_",y)}}function s(y,c){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,a(c))}function m(y){let c=[];return Object.entries(y).forEach(([h,p])=>{p.forEach((d,o)=>(c[o]??={},c[o][h]=d))}),c}function g(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function x(y){return g(y)?m(y[0]):y}function S(y,c){let h=c?.length?c.filter(p=>k(p,Object)).map((p,d)=>s(y,{...p,index:d+1})).join(""):y;return k(e,void 0)?h:h.replace(/\{[a-z_\d].+\}/gim,String(e))}}function Me(){return String.prototype[Symbol.for("interpolate")]||Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Le(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return ke(this,...e)}}}),[Symbol.for("interpolate"),Symbol.for("interpolate$")]}bo();go();var Ho={interpolate:Le,interpolateClear:ke,addSymbolicStringExtensions:Me};function go(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Wo(e=!0){let t=P('<ul id="log2screen">').first();function n(a=!1){let s=a?P.at.start:P.at.end;return m=>{if(m?.isJQx)return P.li(m.data.get("header")?{class:"head"}:"",m).renderTo(t,s);m=P.IS(m,String,Number,Symbol)?String(m):ho(m,e);let g=m.startsWith("!!");m=g?m.slice(2):m,P.li(g?{class:"head"}:"",m).renderTo(t,s)}}let[r,i]=[n(),n(!0)];return{log:(...a)=>a.forEach(r),logTop:(...a)=>a.forEach(i)}}function ho(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function bo(){P.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';}`)}export{P as $,w as $D,Wo as logFactory,eo as regexhelper,Ho as splatModule};
13
+ `)}function vn(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function Tn(e){return vn(xn(e))}function We(e,t){return e?.replace("::",":")===t?.replace("::",":")}var ye=!1,wn={on:()=>ye=!0,off:()=>ye=!1},U={tagsRaw:V,allowUnknownHtmlTags:wn,isAllowed(e){if(ye)return!0;let t=b(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!V[t]},allowTag:e=>V[e.toLowerCase()]=!0,prohibitTag:e=>V[e.toLowerCase()]=!1},On=!0,_={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};function $n(e){if(On&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${K(r)} => ${o}`],[]).join("\\000A");N.error(`JQx: HTML creation error(s): ${t}`)}}function Nn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||U.isAllowed(t)}function Te(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return b(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Te(n),n?.attributes){let r=b(n,SVGElement)?de.svg:de.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let a=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(_.whiteSpace,""),m=a==="href"?!_.validURL.test(s):_.notAllowedValues.test(s),g=a.startsWith("data")?!_.data.test(a):!!r[a];if(m||g){let x=Be(o.value||"none",60);x+=x.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${x}`,n.removeAttribute(o.name)}})}if(!(Nn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=Be(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),$n(t),e}function Dn(e){let t=document.createElement("div");return t.insertAdjacentHTML(I.end,e),t.childNodes.length?Te(t):void 0}function En(e,t,n){switch(!0){case b(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case b(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function pe(e=[],t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let a=Z(o)&&jn(o,t,n);return a?[...r,a]:r},[])}function jn(e,t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t?.[0]:t,b(e,Comment,Text)?En(e,t,n):b(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function M(e){if(b(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||b(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Dn(e);return r.childNodes.length<1?M(`<span data-jqxcreationerror="1">${Ke(e,60)}</span>`):r.children[0]}function In(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...Ut);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:c,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:s,removeModal:y});function a(d){if(r.open)switch(!0){case m(d):return;default:return s(),setTimeout(()=>a(d),200)}o={...d};let{content:i}=o;return e.IS(i,String,HTMLElement)||i?.isJQx?g():!0}function s(){return o.modal?p(o.warnMessage):x()}function m(d){for(let[i,l]of Object.entries(o))if(l!==d[i])return!1;return!0}function g(){n.clear();let{content:d,modal:i,closeAfter:l}=o;i=e.IS(i,Boolean)?i:!1;let u=i?"":e.div({id:"closeHandleIcon"});n.append(u,e.IS(d,String)?e.div(d):d),r.showModal(),!i&&e.IS(l,Number)&&h(s,l)}function x(){if(r.close(o.returnValue),S(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function S(){t.forEach(d=>clearTimeout(d)),t=[]}function y({callback:d,value:i}={}){o.returnValue=i,o.modal=!1,o.callback=d||o.callback,s()}function c({evt:d}){if(!(Object.keys(o).length<1||!r.open)&&(d.type==="cancel"&&o.modal&&d.preventDefault(),d.target.closest("#closeHandleIcon")||!d.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function h(d,i){e.IS(d,Function)&&e.IS(i,Number)&&i>0&&(S(),t.push(setTimeout(d,i*1e3)))}function p(d){if(!e.IS(d,String,HTMLElement,Proxy))return;let i=n.find$(".warn");switch(!0){case i.is.empty:i=e.div({class:"warn"},d);default:n.append(i.addClass("active")),h(()=>n.find$(".warn").removeClass("active"),2)}}}function Cn(e){let t={},n="anonymous_";function r(S){if(S){let{handler:y,capture:c,type:h}=S;document.addEventListener(h,y,{capture:c})}}function o(S){if(S){let{type:y,handler:c,capture:h}=S;document.removeEventListener(y,c,{capture:h})}}function a(S,y,c,h){return function(p){if(!$(y))return S({evt:p});let d=p.target.closest(y);if(d){let i=e(d);S({self:i,me:i,evt:p}),c&&g(p.type,h)}return!0}}function s(S){return t[S]=t[S]||{},t[S]}function m(S,y){return Object.entries(s(S)).find(([c])=>c===y)}function g(S,y){let c=m(S,y);c&&(o(c[1]),delete t[S][y],delete ge[y],N.warn(`Removed listener [${y}] for event type [${S}].`))}function x(S){let{type:y,handler:c,name:h,capture:p,once:d,selector:i,node:l,about:u}=S;t[y]=t[y]||{};let f=Mn(h||c.name),v=c;if(l instanceof HTMLElement){let D=l.dataset.hid||f;l.dataset.hid=D,i=`[data-hid=${D}]`}switch(!0){case!t[y][f]:return N.log(`JQx: created listener for event type ${y}, with handler name ${f}`),t[y][f]={name:f,handler:a(c,i,d,f),capture:Zn(y,p),once:!!d,type:y,initialHandler:v,selector:!!i&&i||!1,about:!!u&&u||!1,unListen(){g(y,f)}},t[y][f];default:return console.warn(`The listener [${f}] for [${y}] exists, it is not re-assigned.`)}}return{remove(...S){return g(...S)},listen:function(S){let{type:y,handler:c}=S;if(!$(y)||!b(c,Function))return;let h=x(S);if(h)return r(h),{type:y,name:h.name,unListen(){g(y,h.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var N=zn(),An=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],I=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(e,t){return e[String(t).toLowerCase()]??e[t]}})),Pn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Ln=Object.freeze({get(e,t){return e[we(t)]||e[t]},enumerable:!1,configurable:!1}),ge={};Jt.custom();function kn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Mn(e){return $(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():Xe()}function Fn(e){let t=!!e.node&&!b(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function Xe(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return ge[t]?Xe():(ge[t]=t,t)}function Zn(e,t){return!!An.find(n=>n===e)||!!t}function Ge(e){return e.startsWith("data")||de.html.find(t=>e.toLowerCase()===t)}function Je(e){return e&&(e.textContent="")}function he(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?he(e,t,n):t}function $(e,t=1){return t=b(t,Number)&&t||1,b(e,String)&&e.length>=t}function Be(e,t=120){return Ke(e,t).replace(/&lt;/g,"<")}function Ke(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function K(e){switch(!0){case b(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function ue(e){return b(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function zn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function a(){t=!1}function s(...x){return n.unshift(...x.map(S=>`${ce()} \u2A3B ${ue(S)}`)),console.error(n.slice(0,x.length).join(`
14
+ `)),r}function m(...x){return n.unshift(...x.map(S=>`${ce()} \u26A0 ${ue(S)}`)),console.warn(n.slice(0,x.length).join(`
15
+ `)),r}function g(...x){let S=x.map(y=>`${ce()} \u2714 ${ue(y)}`);switch(!t&&n.unshift(...S),e){case!0:console.log(S.join(`
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:g,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:m,enumerable:!1}}),Object.freeze(r)}function ce(){return(e=>`[${X(e.getHours())}:${X(e.getMinutes())}:${X(e.getSeconds())}.${X(e.getMilliseconds(),3)}]`)(new Date)}function Rn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=C(n),n.startsWith("data"))return et(e,r);b(r,String)&&Ge(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function et(e,t){if(e&&b(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${C(n)}`,r)}function tt(e){return e?b(e,Proxy)?[e.EL]:b(e,NodeList)?[...e]:Z(e)?[e]:Ne(e)?e:e.isJQx?e.collection:void 0:[]}function B(e,t,n=!0,...r){if(e.is.empty)return N.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."),e;if(r=r.map(o=>o.isJQx?o.node:b(o,String)?t(o).node??o:o),r.find(o=>!b(o,String,Element))){let o=n?"after":"before";return N.log(`[JQx instance].[${o}(Me)]: invalid/-sufficient input.`),e}return e.node[n?"after":"before"](...r),e}function Z(e){return b(e,Text,HTMLElement,Comment)}function me(e,t){if(b(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(C(n),r,o)}}function k(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Hn(e){if(!b(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),a=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,m=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,g=+n.opacity==0||+(t.opacity||1)==0;return!(a||m||g||o||r||s)}function Wn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function Jn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(rt(n)?`<!--${n.data}-->`:Oe(n)?n.textContent:n.outerHTML),"")}function X(e,t=2){return`${e}`.padStart(t,"0")}function Bn(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function nt(){return`_${qn(Pn).slice(0,8).join("")}`}function Qn(e){return e=b(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,b(e,Array)?e:b(e,String)&&e?.trim().toLowerCase()||""}function Yn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function Un(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function qn(e){let t=e.length;for(;t--;){let n=Bn(t);[e[t],e[n]]=[e[n],e[t]]}return e}function we(e){return b(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${Vn(t)}`||t).join(""):e}function C(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function Vn([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Oe(e){return b(e,Comment,Text)}function rt(e){b(e,Comment)}function _n(e){return b(e,Text)}function $e(e){return b(e,String)&&/^<|>$/.test(`${e}`.trim())}function Ne(e){return b(e,Array)&&!e?.find(t=>!Z(t))}function ot(e){return b(e,Array)&&!e?.find(t=>!$e(t))}function T(e,t){let n=e.collection.filter(r=>!Oe(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function Xn(e){return e.node?b(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function it(e,t,n){let r=t!==document.body&&b(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{N.warn(`JQx: Invalid CSS querySelector. [${b(e,String)?e:"Not a string!"}]`)}}function Gn(){return{isCommentOrTextNode:Oe,isNode:Z,isComment:rt,isText:_n,isHtmlString:$e,isArrayOfHtmlElements:Ne,isArrayOfHtmlStrings:ot,ElemArray2HtmlString:Jn,input2Collection:tt,setCollectionFromCssSelector:it,cssRuleEdit:_e({createWithId:"JQxStylesheet"})}}function Kn(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return b(n,Node)?Object.freeze({get writable(){return Wn(n)},get modal(){return Yn(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Hn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function er(e,t,n,r){n&&b(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${nt().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var tr=Kn();function nr(e){return{factoryExtensions:rr(e),instanceExtensions:or(e)}}function rr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Ln)},set(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${C(n)}`),t}}},dimensions(t){if(t.is.empty)return N.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=he(n,0),r.scrollLeftDistance=he(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?K(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let a=b(n,String);return n=a&&o?K(n):n,a&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return tr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[C(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=b(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&b(r,String)?[r]:r,n=n&&b(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let a of n)t.addClass(a);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function or(e){return{addClass(t,...n){return T(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after(t,...n){return B(t,e,!0,...n)},afterMe(t,...n){return B(t,e,!0,...n)},andThen(t,...n){return B(t,e,!0,...n)},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&$(o)){let a=o.trim(),s=/^<(.+)[^>]+>$/m.test(a)?M(o):e.text(o);T(t,m=>m.append(r?s:k(s)))}Z(o)&&T(t,a=>a.append(r?o:k(o))),o.isJQx&&!o.is.empty&&T(t,a=>o.collection.forEach(s=>a.append(r?s:k(s))))}return t},appendTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||b(t.node,Text,Comment))return t;if(!r&&$(n))return n=C(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if($(n)&&r)switch(n=C(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return b(n,Object)&&!t.is.empty&&Rn(t.node,n),t},before(t,...n){return B(t,e,!1,...n)},beforeMe(t,...n){B(t,e,!1,...n)},clear(t){return T(t,Je)},closest(t,n){let r=$(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return T(t,o=>er(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return N.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return T(t,n)},empty(t){return T(t,Je)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return T(t,n=>me(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!$(n)):return"";case!$(n):return t.node?.getHTML()??"";default:let o=M(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return T(t,a=>(a.textContent=r?a.textContent:"",a.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!$(n)||!$(r))return t;let a=t.find$(n);if(a.length<1)return t;let s=M(`<span>${r}</span>`);return a.each(m=>{o||(m.textContent=""),m.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if($(o)){o=o.trim();let a=/^<(.+)[^>]+>$/m.test(o)?M(o):e.text(o);a=r?a:k(a),T(t,s=>s.prepend(a.cloneNode(!0)))}Z(o)&&T(t,a=>a.prepend(r?o:k(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(t,a=>T(o,s=>a.prepend(r?s:k(s)))),o.collection.reverse())}return t},prependTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).prepend(t),t}},prop(t,n,r){if(b(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=b(n,Object)?n:{[n]:r};for(let[a,s]of Object.entries(o)){if(a=a.trim(),s&&!Ge(a)||!s)return!1;if(a.toLowerCase()==="id")return t[0].id=s;T(t,m=>{if(a.startsWith("data"))return m.dataset[a.slice(a.indexOf("-")+1)]=s;m[a]=s})}return t},remove(t,n){let r=a=>a.remove(),o=()=>t.collection=t.collection.filter(a=>document.documentElement.contains(a));if(n){let a=t.find$(n);return a.is.empty||(T(a,r),o()),t}return T(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return T(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=b(n,HTMLElement)||n.isJQx?n:document.body,r=b(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!b(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||b(r,NodeList))&&(r=r[0]),o&&n&&(n=b(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,b(n,HTMLElement,NodeList,Array)&&b(r,HTMLElement)&&(b(n,HTMLElement)?[n]:[...n]).forEach(a=>a.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return T(t,o=>{o.classList.remove(n);for(let a of r)o.classList.add(a)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=b(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return T(t,r=>et(r,n))},show(t){return T(t,n=>me(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&b(n,String)):return t.find$(n);case(r&&b(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return T(t,o=>{r&&b(n,String)&&(n={[n]:r||"none"}),me(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!b(n,String):return t.node.textContent;default:return T(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=I.BeforeEnd){return t.isVirtual=!1,pe(t.collection,n,r),t},toggleClass(t,n){return T(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){r=b(r,Function)?r:Event,o=b(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let a=new r(n,o);return t.is.empty||t.each(s=>s.dispatchEvent(a)),t},val(t,n){switch(!0){case(t.is.empty||!b(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!b(n,String):return t.node.value;default:return t.node.value=b(n,String)?n:"",t}}}}var be,ee,{isComment:Oo,isText:$o,isHtmlString:No,isArrayOfHtmlElements:Do,isArrayOfHtmlStrings:Eo,ElemArray2HtmlString:jo,cssRuleEdit:Se,addFn:ir}=ar();function ar(){return{...Gn(),addFn:lr}}function lr(e,t){return e=e?.trim(),!$(e)||!b(t,Function)?N.error("JQx.fn: method invalid parameter(s)"):(ee[e]=(n,...r)=>t(n,...r),N.log(`JQx: added extension function [${e}]`))}function sr(e){return function(t,n,r){if(t=t?.trim(),!$(t)||!b(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...a){return n(...a)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return N.log(`JQx: added static extension function [${t}]`)}}function G(e){return new Proxy(e,Object.freeze({get:(t,n)=>ur(t,n,e)}))}function Qe(e,t){return(...n)=>b(e,Function)&&e(G(t),...n)}function ur(e,t,n){switch(!0){case b(t,Symbol):return Q({trial:()=>e[t],whenError:()=>e});case b(+t,Number):return e.collection?.[t]||void 0;case t in be:return Qe(be[t],n)();case t in ee:return Qe(ee[t],n);default:return e[t]}}function cr(e){let t=pr(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function mr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?we(t):t.toLowerCase(),U.allowTag(t),Object.defineProperties(e,xe(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),U.prohibitTag(t),Object.defineProperties(e,xe(t,!1,e))}}}function Ye(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))Se(t,{removeRule:1})}function dr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(I).find(a=>r===a);let o=e(t,document.createElement("br"));if(n&&!b(n,HTMLBRElement))for(let a of o.collection)r?n.insertAdjacentElement(r,a):n.append(a);return o}}function fr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,a]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...a,enumerable:!1})}return t}function yr(e,t,n,r){return e=C(r||e.toLowerCase()),{get(){return(...o)=>{let a=t&&n.virtual(Te(Xt[e](...o)))||void 0,s=b(a?.node,Comment,Text,void 0)?"":Fn(a);return N.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function xe(e,t,n,r){e=e.toLowerCase();let o=yr(e,t,n,r);return r?{[r]:o,[we(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function pr(e){return fr(Object.entries(U.tagsRaw).reduce(gr(e),{}),Tr(e))}function gr(e){return function(t,[n,r]){return Object.defineProperties(t,xe(n,r,e)),t}}function hr(e){return function(t,n,...r){b(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function br(e){return function(t){let{type:n,types:r,origin:o,selector:a,handler:s,handlers:m,node:g,name:x,capture:S,once:y,about:c}=t;s=m||s,n=r||n,a=o||a;let h=Qn(n),p=x;s=b(s,Function)?[s]:s;let d={type:h,selector:a||o,capture:S,name:p,once:y,node:g,about:c};switch(!0){case(b(h,Array)&&h.length>0):for(let i of h)d.type=i,Ue(s,d,e);break;default:return Ue(s,d,e)}}}function Ue(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Sr(e){return function(t,n){return n=$(n)&&n,t=$(t)&&t,n&&t&&e.listenerStore[t][n]}}function xr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:In(e),enumerable:!1}),e.activePopup}function vr(e){let t=(m,g)=>Se(m,g),n=function(m){return _e({createWithId:m||`jqx${nt()}`})},r=function(...m){for(let g of m)Se(g)},o=mr(e),a=Cn(e),s=br(a);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...m)=>N.on.log(...m).off,warn:(...m)=>N.on.warn(...m).off,error:(...m)=>N.on.error(...m).off,handlerWrapper:a}}function Tr(e){let{factoryExtensions:t,instanceExtensions:n}=nr(e);be=t,ee=n;let{editCssRule:r,createStyle:o,editCssRules:a,allowProhibit:s,handle:m,capturedHandling:g,log:x,warn:S,error:y,handlerWrapper:c}=vr(e),h=Sr(e),p=sr(e);return{log:x,warn:S,error:y,editCssRules:a,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:K,logger:N,text(d,i=!1){return i?e.comment(d):document.createTextNode(d)},node(d,i=document){return i.querySelector(d,i)},nodes(d,i=document){return[...i.querySelectorAll(d,i)]},clearAllTimers:kn,get staticFn(){return function(d,i,l){return p(d,i,l)}},get toBool(){return Un},get getNamedListener(){return h},get virtual(){return dr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return Ye},get removeCssRules(){return Ye},get delegate(){return hr(g)},get delegateCaptured(){return g},get handle(){return g},get listen(){return c.listen},get at(){return I},get setStyle(){return r},get fn(){return ir},get lenient(){return U.allowUnknownHtmlTags},get IS(){return b},get Popup(){return xr(e)},get listenerStore(){return c.ListenerStore}}}var wr=cr(Or());function Or(){return function(e,t,n=I.BeforeEnd){if(e?.isJQx)return e;let r=b(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(I).find(g=>n===g)?n:void 0;let o=$e(e),a=!o&&ot(e)||o,s={collection:tt(e)??[],isVirtual:r,isJQx:!0},m=Ne(s.collection);if(s.collection.length&&m)return r||s.collection.forEach(g=>{t.contains(g)||pe([g],t,n)}),G(s);if(a){if([e].flat().forEach(g=>s.collection.push(M(g))),s.collection.length>0){let g=s.collection.filter(y=>y?.dataset?.jqxcreationerror);s.collection=s.collection.filter(y=>!y?.dataset?.jqxcreationerror);let x=s.collection.map(y=>`${String(y.constructor).split(/function|\(/)[1].trim()}`).length>1;s=G(s);let S=s.collection.length>0?Xn(s):"sanitized: no elements remaining";N.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${x?"array of ":""}HTML string${x?"s":""} ${S}`),s.isVirtual||pe(s.collection,t,n)}return s}return it(e,t,s),G(s)}}var A=wr;var ie=$r();function $r(){let[e,t,n,r]=["2-digit","numeric","long","short"],o={fixed:{MM:{month:n},M:{month:r},m:{month:t},mm:{month:e},yyyy:{year:t},yy:{year:e},WD:{weekday:n},wd:{weekday:r},d:{day:t},dd:{day:e},h:{hour:t},hh:{hour:e},mi:{minute:t},mmi:{minute:e},s:{second:t},ss:{second:e},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:c=>({timeZoneName:c.slice(4)}),hrc:c=>({hourCycle:`h${c.slice(4)}`}),ds:c=>({dateStyle:c.slice(3)}),ts:c=>({timeStyle:c.slice(3)}),tz:c=>({timeZone:c.slice(3)}),e:c=>({era:c.slice(2)}),l:c=>({locale:c.slice(2)})}},a={...o,retrieveDyn(c){let h=c?.slice(0,c.indexOf(":"));return o.dynamic[h]&&o.dynamic[h](c)},get re(){return new RegExp(`\\b(${Object.keys(o.fixed).join("|")})\\b`,"g")}},s=(c="dtf",h=0)=>{let p=` ${c.replace(/(?<=\{)(.+?)(?=})/g,i=>`[${h++}]`).replace(/[{}]/g,"").trim()} `,d=c.match(/(?<=\{)(.+?)(?=})/g)||[];return{get texts(){return d},formatString(i){p=i},set formatStr(i){p=i},get formatStr(){return p},get units(){return p.match(a.re)||[]},finalize(i="",l="",u="",f=""){return p.replace(/~([\d+]?)/g,"$1").replace(/dtf/,i).replace(/era/,u).replace(/dp\b|~dp\b/,l).replace(/yn\b/,f).replace(/\[(\d+?)]/g,(v,D)=>d[D].trim()).trim()}}},m=c=>c.replace(/\s+/g,""),g=(...c)=>c?.reduce((h,p)=>({...h,...a.retrieveDyn(p)||a.fixed[p]}),a.fixed.dl),x=(c,h,p)=>{let d=g(...m(p).split(",")),i=Intl.DateTimeFormat(d.locale,d).format(c);return h.finalize(i)},S=(c,h,p,d)=>c.toLocaleString(h,{timeZone:p,month:d?r:n}),y=(c,h,p)=>{let d=g(...h.units.concat(m(p).split(",")).flat()),i={...a.fixed},l=(f,v)=>d[f]==="numeric"&&v.startsWith("0")?v.slice(1):v,u=Intl.DateTimeFormat(d.locale,d).formatToParts(c).reduce((f,v)=>v.type==="literal"&&/[ ,/-]/.test(v.value)?f:{...f,[v.type]:l(v.type,v.value)},{});return i.ms=d.fractionalSecondDigits?i.msp:i.ms,i.yyyy=u.relatedYear?i.ry:i.yyyy,h.formatStr=h.formatStr.replace(a.re,f=>/^(M|MM)$/.test(f)?S(c,d.locale,d.timeZone,/^M$/.test(f)):u[Object.keys(i[f]).shift()]||f),h.finalize(void 0,u.dayPeriod,u.era,u.yearName)};return(c,h,p="l:default")=>/ds:|ts:/.test(p)?x(c,s(void 0),p):y(c,s(h||void 0),p)}var Nr=Dr;function Dr(){let e=(r,o)=>{let a=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[m,g,x]=Array(3).fill("end date not valid");return{error:!0,message:m,full:g,clean:x}}if(a){let[m,g,x]=Array(3).fill("start date not valid");return{error:!0,message:m,full:g,clean:x}}if(a&&!s){let[m,g,x]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:m,full:g,clean:x}}return{error:!1}},t=n();return function({start:r,end:o,diffs:a={}}={}){let s=e(r,o),m=o>r?"+":"-";if(s.error)return s;let g=Math.abs(r-o),x=new Date(g),S=x.getUTCFullYear()-1970,y=x.getUTCMonth(),c=x.getUTCDate()-1,h=c%7,p=Math.floor(c/7),d=x.getUTCHours(),i=x.getUTCMinutes(),l=x.getUTCSeconds(),u=x.getUTCMilliseconds(),f=Math.floor(g/864e5);a={...a,fromUTC:r,toUTC:o,sign:"",years:S,months:y,days:c,hours:d,minutes:i,seconds:l,milliseconds:u,diffInDays:f},a.full=t({values:a,full:!0}),a.clean=t({values:a}),a.equalDates=a.clean==="Dates are equal";let v=d+i+l>0?"T":"";return a.clean!=="Dates are equal"&&(a.sign=m,a.jsPeriod=`${m}P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${p>0?`${p}W`:""}${h>0?`${h}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`,a.ISOPeriod=`P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${c>0?`${c}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`),a};function n(){let r=(...a)=>s=>a.reduce((m,g)=>g(m),s),o=(a,s)=>a===1?s.slice(0,-1):s;return r(({values:a,full:s})=>[Object.entries(a).filter(([m])=>/^(years|month|days|hours|minutes|seconds)/i.test(m)),s],([a,s])=>s?a:a.filter(([,m])=>s?+m:m>0),a=>a.reduce((s,[m,g])=>[...s,`${g} ${o(g,m)}`],[]),a=>a.length<1?"Dates are equal":`${a.slice(0,-1).join(", ")}${a.length>1?" and ":""}${a.slice(-1).shift()}`)}}var Er=jr;function jr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,a])=>({...r,[o]:a,[`${o}s`]:a}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(a=>a.trim()):r.filter(a=>!a.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(a=>a.trim())),r.map(function(a){if(!a)return!1;let s=a.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(m=>{m=`${m}`.trim().replace(/[^a-z0-9-+]/g,"");let g=parseInt(m,10);return Number.isNaN(g)?m:t?-g:+g})}).filter(a=>a)};return function(r,...o){if(o.length<1)return r;let a=n(...o);return a.length&&a.forEach(([s,m])=>{m=m,m=e[m],s&&m&&r[`set${m}`](r[`get${m}`]()+s)}),r}}var Tt=Nr(),wt=Rr(),P=Er(),Ir=["sun","mon","tue","wed","thu","fri","sat"],Ot=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function at(e,t=!1){let n=e.month+1,r=e.month;if(e.month+=t?-1:1,!t&&e.month>=n)for(;e.month>n;)e.dateNr-=1;if(t&&e.month===r)for(;e.month>=r;)e.dateNr-=1;return e}function lt(e,...t){return P(e,...t),e}function Cr(e,t=!1){let n=$t(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((o,a)=>n.clone.addDays(a+1)))}}function De(e,{start:t,end:n,future:r,past:o,include:a={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?w(t?.value||t).UTC:w.now.UTC,n=n&&n?.value||n?.constructor===Date?w(n?.value||n).UTC:w.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(a.start?+s>=+t:+s>+t)&&(a.end?+s<=+n:+s<+n)}function st(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):O.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=O),ie(e,n,r)):Ar(e,n,r)}function Ar(e,t,n){let r=e.clone.relocate(O);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,ie(r,t,n)}function Pr(e,t){let n=Tt({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function ut(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:O,o=Ft(n,r),a=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:a[0],dayName:a[1],dayNames:kt(n),monthNames:Ae(n)}}function ct(e,t=!1){let[n,r,o,a]=Ee(e,t),s={values4Timezone:t?O.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:a};return Object.freeze(s)}function Ee(e,t=!1){let n=`l:en-CA,${t?`tz:${O.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function mt(e,t){let n=t?`tz:${O.timeZone}`:`,tz:${e.timeZone}`,[r,o,a]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?O.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:a})}function dt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Lr(e){let t=new Intl.Locale(e.locale),n=t.weekInfo?t.weekInfo.firstDay:t.getWeekInfo?t.getWeekInfo().firstDay:1;return n=n===7?0:n,Ot[n]}function $t(e,{sunday:t=!1}={}){let n=t?"sunday":Lr(e);return je(e,{day:n,preserveTodayWhenEqual:!0})}function kr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=Ie(n.slice(0,3)+":"+n.slice(-2),!0),r=Ie(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function Nt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=w(t,{timeZone:e.timeZone})),e=w(gt(e,e.timeZone),{timeZone:e.timeZone}),t=w(gt(t,t.timeZone),{timeZone:t.timeZone});let n=Tt({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=kr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[a,s]=r.map(x=>Math.abs(x)),[m,g]=[`${a} ${ae(a,"hour")}`,`${s} ${ae(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||a+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${m}${s>0?` and ${g}`:""} ${o} ${t.timeZone}`,n}function ft(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):w(e.value,{timeZone:t.timeZone||O.timeZone});let n=Nt({start:e.clone,end:t}),r=`${n.sign}${yt(n.hours)}:${yt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Mr(r)} ${e.timeZone}`}}function yt(e,t=2){return`${e}`.padStart(t,"0")}function ae(e,t){return`${t}${e>1||e===0?"s":""}`}function Mr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=ae(n,"hour"),a=ae(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${a} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function pt(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Fr(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?pt(e,t,$D.localeInformation.formatOptions):pt(e,t,n);let o=e.clone.relocate({locale:"en"}),a=r?O.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",a+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,a+",tzn:long, hrc:23")}function Dt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:O.timeZone,weekday:"short"});return wt(n.format(e))}function Zr(e){let t=O,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),a=r.offsetFrom(e),s=t,m=n,g=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),x=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),S={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:x,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(S.locales.remote={locale:m.locale,timeZone:m.timeZone},S.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Dt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:g,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:a.offset,string:e.toString()},S.offset.fromUserTime=a.offsetText),S}function te(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function Et(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function jt(e,t){t=E({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(Et(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function je(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=wt(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let a=n?1:-1,s=w(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:zr(s.addDays(n?1:-1),o,a)}function zr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ne(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function gt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function q(e,{year:t,month:n,date:r}={}){return j(t)&&e.setFullYear(parseInt(t)),j(r)&&e.setDate(parseInt(r)),j(n)&&e.setMonth(parseInt(n)),e}function z(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return j(t)&&e.setHours(parseInt(t)),j(n)&&e.setMinutes(parseInt(n)),j(r)&&e.setSeconds(parseInt(r)),j(o)&&e.setMilliseconds(parseInt(o)),e}function It(e){return e?.constructor===Date||e?.value}function ht(e,t){return It(t)?w(t?.value||t,e.localeInfo):w.from(...e.dateTimeValues).relocate(e.localeInfo)}function Rr(){return function(e){e=`${e}`.toLowerCase();let t=Ir.indexOf(e);return t<0?Ot.indexOf(e):t}}function Ie(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function Hr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function bt(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ct(e,t){t=t||e?.timeZone||O.timeZone,e=e?.value?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t});let n=e.year||e.getFullYear(),r=bt(new Date(n,0,1),t),o=bt(new Date(n,5,1),t);return r!==o}function At(e,t){return t=t||e?.timeZone||O.timeZone,e=e?.hasDST?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Wr(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=E({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function Jr(e,t){return It(t)&&(e=w(t.value||t,t.localeInfo||e.localeInfo)),e}function Ce(e,t){let n=Pt(new Date(e,11,t||31));return n===1?Ce(e,(t||31)-1):n}function St(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Pt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Lt=Br;function Br({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...a){return lt(r,...a)},between({start:a,end:s,include:m}={}){return De(r,{start:a,end:s,include:m})},cloneWith(a){return ht(r,a)},daysUntil(a){return Pr(r,a)},differenceTo(a){return Nt({start:r,end:a})},differenceUntil(a){return r.differenceTo(a).clean},firstWeekday({sunday:a=!1,midnight:s=!1}={}){return $t(r,{sunday:a,midnight:s})},format(a,s){return st(r,{formatStr:a,moreOptions:s})},fullMonth(a){return jt(r,a)},fullWeek(a=!1){return Cr(r,!!a)},isFuture(a){return De(r,{start:r,end:a,future:!0})},isPast(a){return De(r,{start:r,end:a,past:!0})},next(a,s){return je(r,{day:a,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(a){return ft(r,a)},previous(a,s){return je(r,{day:a,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:a,timeZone:s,l:m,tz:g}={}){return Wr(r,{locale:a,timeZone:s,l:m,tz:g})},revalue(a){return r=Jr(r,a),r},setDateValues({year:a,month:s,date:m}={}){return q(r,{year:a,month:s,date:m})},setTimeValues({hours:a,minutes:s,seconds:m,milliseconds:g}={}){return z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},subtract(...a){return lt(r,"subtract,"+a.join(","))},toArray(a=!1){return te(r,a)},toString({template:a,formatOptions:s,local:m}={}){return Fr(r,{withFormat:a,withFormatOptions:s,local:m})},values(a=!1){return a?r.dateTime:r.zoneDateTime},zoneFormat(a,s){return st(r,{zoneTime:!0,formatStr:a,moreOptions:s})},set date({year:a,month:s,date:m}){q(r,{year:a,month:s,date:m})},set dateNr(a){q(r,{date:a})},set hours(a){z(r,{hours:a})},set localeInfo({locale:a,timeZone:s,l:m,tz:g}){e=re({locale:a,timeZone:s,l:m,tz:g})},set milliseconds(a){z(r,{milliseconds:`${a}`})},set minutes(a){z(r,{minutes:a})},set month(a){q(r,{month:a})},set seconds(a){z(r,{seconds:a})},set time({hours:a,minutes:s,seconds:m,milliseconds:g}){z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},set year(a){q(r,{year:a})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return ht(r)},get date(){return mt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return te(r,!0)},get dateValues(){return dt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Et(r)},get DSTActive(){return At(r)},get hasDST(){return Ct(r)},get hours(){return r.time.hours},get info(){return Zr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ne(r)},get localDate(){return ne(r,{dateOnly:!0})},get locale(){return(e||re()).locale},get localeInfo(){return e},get localeString(){return ne(r)},get localTime(){return ne(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return ut(r)},get quarter(){return St(r)},get quarterNr(){return St(r,!0)},get removeTime(){return Hr(r)},get seconds(){return r.time.seconds},get time(){return ct(r,!0)},get timeValues(){return Ee(r,!0)},get timeZone(){return(e||re()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return O},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return ft(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Pt(r)},get weeksInYear(){return Ce(r.year,31)},get year(){return r.date.year},get zoneDate(){return mt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return te(r,!1)},get zoneDateValues(){return dt(r,!1)},get zoneDay(){return Dt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return ut(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return ct(r)},get zoneTimeValues(){return Ee(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return te(r,!1)}};return!e&&!n?o:(o.localeInfo=e||re(),r=new Proxy(n,Qr(o)),Object.entries(Object.getOwnPropertyDescriptors(Zt(r,t))).forEach(([a,s])=>Object.defineProperty(o,a,s)),Object.freeze(r))}function Qr(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var O=Mt(Intl.DateTimeFormat().resolvedOptions()),Yr=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);function kt(e="en-GB"){return e=E({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Ae(e="en"){return e=E({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function Ur({year:e,locale:t}={}){e=j(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Ae().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let a=w.from(e,o,1);n.calendar[r[o]]=jt(a,t)}return n}function qr({year:e,monthNr:t,locale:n="en-CA"}={}){e=j(t)&&parseInt(e)||-1,t=j(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=E({locale:n}).locale,t=r?t-1:void 0,r?w.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Mt(e){let t=Ft(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Ft(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function E({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,e=vt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:O.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${O.locale}"`),O.locale}}),t=vt({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${O.timeZone}"`),O.timeZone}}),Mt(Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions())}function re({locale:e,timeZone:t,l:n,tz:r}={}){return E({locale:e,timeZone:t,l:n,tz:r},!0)}function xt(e){return!Number.isNaN(+e)&&e?.constructor===Date?e:new Date}function Vr(e){let t=new Date;switch(!0){case(typeof e=="string"||typeof e=="number"):return xt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return xt(e);default:return t}}function vt({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function _r({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:E({timeZone:t}).timeZone},o={timeZone:E({timeZone:n||""}).timeZone},a=w(e,r),s=w(e,o),m=s.differenceTo(a),g=a.offsetFrom(s).offset,[x,S]=Ie(g,!0),y=s.clone.add(`${x} hours, ${S} minutes`),c=m.equalDates?"No difference":`Time offset ${g}: ${o.timeZone} is ${m.clean} ${x<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:c,result:{[r.timeZone.replace(/\//,"_")]:w(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:y.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function j(e){return!Number.isNaN(parseInt(e))}function oe(e,t,n){return e?.constructor===Number?P(t,`${e} ${n}`):t}function Xr(e){let t={addYears(n=1){return oe(n,e,"years")},addMonths(n=1){return oe(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,oe(n,e,"days")},addDays(n=1){return oe(n,e,"days")},get nextYear(){return P(e,"1 year")},get nextWeek(){return P(e,"7 days")},get previousWeek(){return P(e,"-7 days")},get previousYear(){return P(e,"-1 year")},get nextMonth(){return at(e)},get previousMonth(){return at(e,!0)},get tomorrow(){return P(e,"1 day")},get yesterday(){return P(e,"-1 day")}};for(let n of Yr)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Zt(e,t){let n=Xr(e);for(let[r,o]of Object.entries(t||{})){let a=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:a}:{value(...m){return o.method(e,...m)},enumerable:a};Object.defineProperty(n,r,s)}return n}function Gr(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return E()}},localWeekdaynames:{value(n){return kt(n)}},localMonthnames:{value(n){return Ae(n)}},daysInMonth:{value(n,r=!1){return n=j(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:Ur},monthCalendar:{value:qr},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=j(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return w(o,r||O)}},hasDST:{value({date:n,timeZone:r}={}){return Ct(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return At(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=ie(n,"yyyy-m-d-h-mi-s",E({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:a,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let m=E({timeZone:o,locale:a}).formatOptions;return m+=s?`,${s}`:"",ie(n,r,m)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:a=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:a})}},validateLocaleInformation:{value:E},timeAcrossZones:{value:_r},weeksInYear:{value(n){return Ce(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Lt()),...Object.keys(Zt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var zt={},w=Gr(Kr,zt);function Kr(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Lt({localeInfo:E(n?e:t),dateValue:new Date(n?Date.now():Vr(e)),customMethods:zt})}var eo=Object.defineProperties(Rt,{escape:{value:uo,enumerable:!0}});function Rt(e,...t){let{flags:n,cleanedArgs:r}=no(...t);return oo(new RegExp(co(to(e,...r)),n))}function to(e,...t){return R(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function no(...e){let t=Pe(ro(e.at(-1)));return{flags:t,cleanedArgs:R(t)?e.slice(0,-1):e}}function ro(e){return le(e,Array)?e.join(""):""}function oo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=so(n,e),t},enumerable:!1},clone:{get(){return lo(t)},enumerable:!1}}),ao(e));return t}function R(e){return e?.length>0}function le(e,t){return e?.constructor===t}function io(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:le(r,Function)?r.bind(e.re):e.re[t]}}function ao(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=io(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function lo(e){let t=e.re.source,n=R(e.re.flags)?[...e.re.flags]:[];return Rt`${t} ${n}`}function Pe(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(le(e,String)&&R(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function so(e,t){switch(!0){case(!le(e,String)||!R(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,Pe(e));default:return t=new RegExp(t.source,Pe(t.flags,e))}}function uo(e){switch(!0){case(e?.constructor!==String||!R(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function co(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:L,maybe:Le,$Wrap:Po,isNothing:mo,xProxy:Lo,addSymbolicExtensions:ko}=fo({useSymbolicExtensions:!1});function fo(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=yo(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function yo(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=po(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function po(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(mo(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||Le({trial:v=>String(i)===t.NAN}),isInfinity:Le({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:D,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case D===Boolean:return f?t.BOOLEAN:D===l;default:return S(i,l,f,x(i,D))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return Le({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||L(i,1/0)||L(i,NaN):u,u}}var ke=Ht(),Me=Ht("");function Ht(e,t={}){let{useSymbolicExtensions:n}=t;return e=L(e,String,Number)?String(e):void 0,n&&Fe(),function(y,...c){return S(y,x(c))};function r(y,c){return c&&L(e,String,Number)?String(e):`{${y}}`}function o(y,c){let h=y in c;return h&&L(c[y],String,Number)?String(c[y]):r(y,h)}function a(y){return(...c)=>{let h=c.find(p=>p.key);return o(h?h.key:"_",y)}}function s(y,c){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,a(c))}function m(y){let c=[];return Object.entries(y).forEach(([h,p])=>{p.forEach((d,i)=>(c[i]??={},c[i][h]=d))}),c}function g(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function x(y){return g(y)?m(y[0]):y}function S(y,c){let h=c?.length?c.filter(p=>L(p,Object)).map((p,d)=>s(y,{...p,index:d+1})).join(""):y;return L(e,void 0)?h:h.replace(/\{[a-z_\d].+\}/gim,String(e))}}function Fe(){return String.prototype[Symbol.for("interpolate")]||Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return ke(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return Me(this,...e)}}}),[Symbol.for("interpolate"),Symbol.for("interpolate$")]}bo();go();var Ho={interpolate:ke,interpolateClear:Me,addSymbolicStringExtensions:Fe};function go(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Wo(e=!0){let t=A('<ul id="log2screen">').first();function n(a=!1){let s=a?A.at.start:A.at.end;return m=>{if(m?.isJQx)return A.li(m.data.get("header")?{class:"head"}:"",m).renderTo(t,s);m=A.IS(m,String,Number,Symbol)?String(m):ho(m,e);let g=m.startsWith("!!");m=g?m.slice(2):m,A.li(g?{class:"head"}:"",m).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...a)=>a.forEach(r),logTop:(...a)=>a.forEach(o)}}function ho(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function bo(){A.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';}`)}export{A as $,w as $D,Wo as logFactory,eo as regexhelper,Ho as splatModule};