jclib-ui 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jclib-ui.es.js +4 -7
- package/dist/jclib-ui.es.js.map +1 -1
- package/dist/jclib-ui.umd.js +10 -10
- package/dist/jclib-ui.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/jclib-ui.umd.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
border-radius: 99px;
|
|
19
19
|
pointer-events: none;
|
|
20
20
|
z-index: 9999999;
|
|
21
|
-
`,y=" 🔴 ",k=" 🟢 ";function _(){t.useEffect(()=>{("localhost"==window.location.hostname||"127.0.0.1"==window.location.hostname||"[::1]"==window.location.hostname||window.location.hostname.startsWith("192.168."))&&!document.title.includes(y)&&(document.title=`${y}${document.title}`)},[])}function C(e){function r(){const t=e?[].concat(e):["test.","test-"];return Boolean(t.some(e=>window.location.hostname.includes(e)))}if(t.useEffect(()=>{r()&&!document.title.includes(k)&&(document.title=`${k}${document.title}`)},[e]),r()&&n.isMobile())return b.jsx(x,{})}const j=t.createContext({modalList:[],theme:"light",toggleTheme:()=>{},versionApp:"",addModal:(e,t)=>{},removeModal:e=>{},clearModals:()=>{},showBtnTop:!1,setShowBtnTop:()=>{},globalApiConfig:null,setTheme:()=>{},canChangeTheme:!1,reportType:0,setReportType:e=>{}}),w="sys/theme";function S(){const e=t.useContext(j);if(!(null==e?void 0:e.addModal))throw new Error("'ModalProvider' não encontrado!");return e}const E=1,N=2,A=3,T="jc-alert-hide-sb";function I({type:e=N,onConfirm:o,onCancel:i,title:a,text:s="",children:l,defaultBtn:u=2}){const c=t.useRef(),d=t.useRef(),{addModal:p,removeModal:h}=S(),[f]=t.useState("alert-"+n.random()),m=r.useDragControls();let g="jc-erro";switch(e){case N:g="jc-aviso";break;case A:g="jc-conf"}const v=t.useCallback(t=>{e===A&&("KeyS"===t.code&&o&&o(),"KeyN"===t.code&&i&&i())},[i,o,e]);return t.useEffect(()=>(p(f,e===A?i:o),()=>h(f)),[]),t.useEffect(()=>{var e;null==(e=null==c?void 0:c.current)||e.focus()},[c]),t.useEffect(()=>(document.addEventListener("keydown",v,!1),document.body.classList.add(T),()=>{document.removeEventListener("keydown",v,!1),document.body.classList.remove(T)}),[v]),b.jsx(r.motion.div,{className:"jc-alert--container",ref:d,children:b.jsxs(r.motion.div,{className:"jc-alert "+g,drag:!0,dragConstraints:d,dragElastic:.1,dragMomentum:!1,dragControls:m,dragListener:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[b.jsx("div",{className:"jc-close-button",onClick:function(){e===A?i():o()},children:b.jsx("i",{className:"fa-solid fa-xmark"})}),b.jsxs("div",{className:"jc-alert-header",onPointerDown:function(e){n.isMobile()||m.start(e)},children:[b.jsxs("div",{className:"icon",children:[e===N&&b.jsx("i",{className:"fa-solid fa-check"}),e===E&&b.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),e===A&&b.jsx("i",{className:"fas fa-question"})]}),b.jsx("div",{className:"jc-alert-title",children:a})]}),b.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?b.jsx(
|
|
21
|
+
`,y=" 🔴 ",k=" 🟢 ";function _(){t.useEffect(()=>{("localhost"==window.location.hostname||"127.0.0.1"==window.location.hostname||"[::1]"==window.location.hostname||window.location.hostname.startsWith("192.168."))&&!document.title.includes(y)&&(document.title=`${y}${document.title}`)},[])}function C(e){function r(){const t=e?[].concat(e):["test.","test-"];return Boolean(t.some(e=>window.location.hostname.includes(e)))}if(t.useEffect(()=>{r()&&!document.title.includes(k)&&(document.title=`${k}${document.title}`)},[e]),r()&&n.isMobile())return b.jsx(x,{})}const j=t.createContext({modalList:[],theme:"light",toggleTheme:()=>{},versionApp:"",addModal:(e,t)=>{},removeModal:e=>{},clearModals:()=>{},showBtnTop:!1,setShowBtnTop:()=>{},globalApiConfig:null,setTheme:()=>{},canChangeTheme:!1,reportType:0,setReportType:e=>{}}),w="sys/theme";function S(){const e=t.useContext(j);if(!(null==e?void 0:e.addModal))throw new Error("'ModalProvider' não encontrado!");return e}const E=1,N=2,A=3,T="jc-alert-hide-sb";function I({type:e=N,onConfirm:o,onCancel:i,title:a,text:s="",children:l,defaultBtn:u=2}){const c=t.useRef(),d=t.useRef(),{addModal:p,removeModal:h}=S(),[f]=t.useState("alert-"+n.random()),m=r.useDragControls();let g="jc-erro";switch(e){case N:g="jc-aviso";break;case A:g="jc-conf"}const v=t.useCallback(t=>{e===A&&("KeyS"===t.code&&o&&o(),"KeyN"===t.code&&i&&i())},[i,o,e]);return t.useEffect(()=>(p(f,e===A?i:o),()=>h(f)),[]),t.useEffect(()=>{var e;null==(e=null==c?void 0:c.current)||e.focus()},[c]),t.useEffect(()=>(document.addEventListener("keydown",v,!1),document.body.classList.add(T),()=>{document.removeEventListener("keydown",v,!1),document.body.classList.remove(T)}),[v]),b.jsx(r.motion.div,{className:"jc-alert--container",ref:d,children:b.jsxs(r.motion.div,{className:"jc-alert "+g,drag:!0,dragConstraints:d,dragElastic:.1,dragMomentum:!1,dragControls:m,dragListener:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[b.jsx("div",{className:"jc-close-button",onClick:function(){e===A?i():o()},children:b.jsx("i",{className:"fa-solid fa-xmark"})}),b.jsxs("div",{className:"jc-alert-header",onPointerDown:function(e){n.isMobile()||m.start(e)},children:[b.jsxs("div",{className:"icon",children:[e===N&&b.jsx("i",{className:"fa-solid fa-check"}),e===E&&b.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),e===A&&b.jsx("i",{className:"fas fa-question"})]}),b.jsx("div",{className:"jc-alert-title",children:a})]}),b.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?b.jsx(qr,{value:s}):b.jsx(b.Fragment,{children:s||l})}),b.jsxs("div",{className:"jc-alert-buttons",children:[(e===E||e===N)&&b.jsx("button",{ref:c,type:"button",className:"btn btn-confirm",onClick:o,children:"OK"}),e===A&&b.jsxs(b.Fragment,{children:[b.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:o,tabIndex:99,ref:1===u?c:null,children:[b.jsx("u",{children:"S"}),"im"]}),b.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:i,tabIndex:98,ref:2===u?c:null,children:[b.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function F({onConfirm:e,text:t="",children:n}){return b.jsx(I,{type:E,title:"Atenção!",text:t,onConfirm:e,children:n})}const D={baseURL:"",timeout:3e4,auth:{username:"",password:"",header:"x-auth",prefix:"Bearer"},version:"",ident:"",loginRoute:"/",refreshRoute:"",isProductionMode:!0,withCredentials:!1,getToken:()=>"",afterRequest:e=>{}};const O=o.div`
|
|
22
22
|
@media (max-width: 767px) {
|
|
23
23
|
overflow-x: auto;
|
|
24
24
|
}
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
}
|
|
628
628
|
`;
|
|
629
629
|
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
|
|
630
|
-
function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function En(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Sn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Nn=Object.entries,An=Object.setPrototypeOf,Tn=Object.isFrozen,In=Object.getPrototypeOf,Fn=Object.getOwnPropertyDescriptor;let Dn=Object.freeze,On=Object.seal,Rn=Object.create,Mn="undefined"!=typeof Reflect&&Reflect,Bn=Mn.apply,Pn=Mn.construct;Dn||(Dn=function(e){return e}),On||(On=function(e){return e}),Bn||(Bn=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Pn||(Pn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Ln=ar(Array.prototype.forEach),Vn=ar(Array.prototype.lastIndexOf),zn=ar(Array.prototype.pop),$n=ar(Array.prototype.push),Un=ar(Array.prototype.splice),qn=Array.isArray,Hn=ar(String.prototype.toLowerCase),Wn=ar(String.prototype.toString),Gn=ar(String.prototype.match),Yn=ar(String.prototype.replace),Kn=ar(String.prototype.indexOf),Xn=ar(String.prototype.trim),Jn=ar(Number.prototype.toString),Zn=ar(Boolean.prototype.toString),Qn="undefined"==typeof BigInt?null:ar(BigInt.prototype.toString),er="undefined"==typeof Symbol?null:ar(Symbol.prototype.toString),tr=ar(Object.prototype.hasOwnProperty),nr=ar(Object.prototype.toString),rr=ar(RegExp.prototype.test),or=(ir=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pn(ir,t)});var ir;function ar(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Bn(e,t,r)}}function sr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hn;if(An&&An(e,null),!qn(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Tn(t)||(t[r]=e),o=e)}e[o]=!0}return e}function lr(e){for(let t=0;t<e.length;t++){tr(e,t)||(e[t]=null)}return e}function ur(e){const t=Rn(null);for(const r of Nn(e)){var n=En(r,2);const o=n[0],i=n[1];tr(e,o)&&(qn(i)?t[o]=lr(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=ur(i):t[o]=i)}return t}function cr(e,t){for(;null!==e;){const n=Fn(e,t);if(n){if(n.get)return ar(n.get);if("function"==typeof n.value)return ar(n.value)}e=In(e)}return function(){return null}}const dr=Dn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pr=Dn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hr=Dn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fr=Dn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mr=Dn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gr=Dn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vr=Dn(["#text"]),br=Dn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xr=Dn(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","dominant-baseline","dur","edgemode","elevation","end","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","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"]),yr=Dn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kr=Dn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_r=On(/{{[\w\W]*|^[\w\W]*}}/g),Cr=On(/<%[\w\W]*|^[\w\W]*%>/g),jr=On(/\${[\w\W]*/g),wr=On(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sr=On(/^aria-[\-\w]+$/),Er=On(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nr=On(/^(?:\w+script|data):/i),Ar=On(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Tr=On(/^html$/i),Ir=On(/^[a-z][.\w]*(-[.\w]+)+$/i),Fr=On(/<[/\w!]/g),Dr=On(/<[/\w]/g),Or=On(/<\/no(script|embed|frames)/i),Rr=On(/\/>/i),Mr=1,Br=3,Pr=7,Lr=8,Vr=9,zr=11,$r=function(e,t,n,r){return tr(e,t)&&qn(e[t])?sr(r.base?ur(r.base):{},e[t],r.transform):n};var Ur=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.4.13",n.removed=[],!t||!t.document||t.document.nodeType!==Vr||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap;void 0===c&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,p=t.trustedTypes,h=l.prototype,f=cr(h,"cloneNode"),m=cr(h,"remove"),g=cr(h,"nextSibling"),v=cr(h,"childNodes"),b=cr(h,"parentNode"),x=cr(h,"shadowRoot"),y=cr(h,"attributes"),k=s&&s.prototype?cr(s.prototype,"nodeType"):null,_=s&&s.prototype?cr(s.prototype,"nodeName"):null,C=s&&s.prototype?cr(s.prototype,"ownerDocument"):null;if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let j,w,S="",E=!1,N=0;const A=function(){if(N>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(e){A(),N++;try{return j.createHTML(e)}finally{N--}},I=function(){return E||(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),E=!0),w},F=r,D=F.implementation,O=F.createNodeIterator,R=F.createDocumentFragment,M=F.getElementsByTagName,B=o.importNode;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Nn&&"function"==typeof b&&D&&void 0!==D.createHTMLDocument;const L=_r,V=Cr,z=jr,$=wr,U=Sr,q=Nr,H=Ar,W=Ir;let G=Er,Y=null;const K=sr({},[...dr,...pr,...hr,...mr,...vr]);let X=null;const J=sr({},[...br,...xr,...yr,...kr]);let Z=Object.seal(Rn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,ee=null;const te=Object.seal(Rn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,re=!0,oe=!1,ie=!0,ae=!1,se=!0,le=!1,ue=!1,ce=null,de=null,pe=!1,he=!1,fe=!1,me=!1,ge=!0,ve=!1;const be="user-content-";let xe=!0,ye=!1,ke={},_e=null;const Ce=sr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let je=null;const we=sr({},["audio","video","img","source","image","track"]);let Se=null;const Ee=sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let Ie=Te,Fe=!1,De=null;const Oe=sr({},[Ne,Ae,Te],Wn),Re=Dn(["mi","mo","mn","ms","mtext"]);let Me=sr({},Re);const Be=Dn(["annotation-xml"]);let Pe=sr({},Be);const Le=sr({},["title","style","font","a","script"]);let Ve=null;const ze=["application/xhtml+xml","text/html"];let $e=null,Ue=null;const qe=r.createElement("form"),He=function(e){return e instanceof RegExp||e instanceof Function},We=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ue&&Ue===e)return;e&&"object"==typeof e||(e={}),e=ur(e),Ve=-1===ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,$e="application/xhtml+xml"===Ve?Wn:Hn,Y=$r(e,"ALLOWED_TAGS",K,{transform:$e}),X=$r(e,"ALLOWED_ATTR",J,{transform:$e}),De=$r(e,"ALLOWED_NAMESPACES",Oe,{transform:Wn}),Se=$r(e,"ADD_URI_SAFE_ATTR",Ee,{transform:$e,base:Ee}),je=$r(e,"ADD_DATA_URI_TAGS",we,{transform:$e,base:we}),_e=$r(e,"FORBID_CONTENTS",Ce,{transform:$e}),Q=$r(e,"FORBID_TAGS",ur({}),{transform:$e}),ee=$r(e,"FORBID_ATTR",ur({}),{transform:$e}),ke=!!tr(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?ur(e.USE_PROFILES):e.USE_PROFILES),ne=!1!==e.ALLOW_ARIA_ATTR,re=!1!==e.ALLOW_DATA_ATTR,oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ae=e.SAFE_FOR_TEMPLATES||!1,se=!1!==e.SAFE_FOR_XML,le=e.WHOLE_DOCUMENT||!1,he=e.RETURN_DOM||!1,fe=e.RETURN_DOM_FRAGMENT||!1,me=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=!1!==e.SANITIZE_DOM,ve=e.SANITIZE_NAMED_PROPS||!1,xe=!1!==e.KEEP_CONTENT,ye=e.IN_PLACE||!1,G=function(e){try{return rr(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Er,Ie="string"==typeof e.NAMESPACE?e.NAMESPACE:Te,Me=tr(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?ur(e.MATHML_TEXT_INTEGRATION_POINTS):sr({},Re),Pe=tr(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?ur(e.HTML_INTEGRATION_POINTS):sr({},Be);const t=tr(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?ur(e.CUSTOM_ELEMENT_HANDLING):Rn(null);if(Z=Rn(null),tr(t,"tagNameCheck")&&He(t.tagNameCheck)&&(Z.tagNameCheck=t.tagNameCheck),tr(t,"attributeNameCheck")&&He(t.attributeNameCheck)&&(Z.attributeNameCheck=t.attributeNameCheck),tr(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),On(Z),ae&&(re=!1),fe&&(he=!0),ke&&(Y=sr({},vr),X=Rn(null),!0===ke.html&&(sr(Y,dr),sr(X,br)),!0===ke.svg&&(sr(Y,pr),sr(X,xr),sr(X,kr)),!0===ke.svgFilters&&(sr(Y,hr),sr(X,xr),sr(X,kr)),!0===ke.mathMl&&(sr(Y,mr),sr(X,yr),sr(X,kr))),te.tagCheck=null,te.attributeCheck=null,tr(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?te.tagCheck=e.ADD_TAGS:qn(e.ADD_TAGS)&&(Y===K&&(Y=ur(Y)),sr(Y,e.ADD_TAGS,$e))),tr(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?te.attributeCheck=e.ADD_ATTR:qn(e.ADD_ATTR)&&(X===J&&(X=ur(X)),sr(X,e.ADD_ATTR,$e))),tr(e,"ADD_URI_SAFE_ATTR")&&qn(e.ADD_URI_SAFE_ATTR)&&sr(Se,e.ADD_URI_SAFE_ATTR,$e),tr(e,"FORBID_CONTENTS")&&qn(e.FORBID_CONTENTS)&&(_e===Ce&&(_e=ur(_e)),sr(_e,e.FORBID_CONTENTS,$e)),tr(e,"ADD_FORBID_CONTENTS")&&qn(e.ADD_FORBID_CONTENTS)&&(_e===Ce&&(_e=ur(_e)),sr(_e,e.ADD_FORBID_CONTENTS,$e)),xe&&(Y["#text"]=!0),le&&sr(Y,["html","head","body"]),Y.table&&(sr(Y,["tbody"]),delete Q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=j;j=e.TRUSTED_TYPES_POLICY;try{S=T("")}catch(n){throw j=t,n}}else null===e.TRUSTED_TYPES_POLICY?(j=void 0,S=""):(void 0===j&&(j=I()),j&&"string"==typeof S&&(S=T("")));Dn&&Dn(e),Ue=e},Ge=sr({},[...pr,...hr,...fr]),Ye=sr({},[...mr,...gr]),Ke=function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Ie,tagName:"template"});const n=Hn(e.tagName),r=Hn(t.tagName);return!!De[e.namespaceURI]&&(e.namespaceURI===Ae?function(e,t,n){return t.namespaceURI===Te?"svg"===e:t.namespaceURI===Ne?"svg"===e&&("annotation-xml"===n||Me[n]):Boolean(Ge[e])}(n,t,r):e.namespaceURI===Ne?function(e,t,n){return t.namespaceURI===Te?"math"===e:t.namespaceURI===Ae?"math"===e&&Pe[n]:Boolean(Ye[e])}(n,t,r):e.namespaceURI===Te?function(e,t,n){return!(t.namespaceURI===Ae&&!Pe[n])&&!(t.namespaceURI===Ne&&!Me[n])&&!Ye[e]&&(Le[e]||!Ge[e])}(n,t,r):!("application/xhtml+xml"!==Ve||!De[e.namespaceURI]))},Xe=function(e){$n(n.removed,{element:e});try{b(e).removeChild(e)}catch(t){if(m(e),!b(e))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Je=function(e){et(e);const t=v(e);if(t){const e=[];Ln(t,t=>{$n(e,t)}),Ln(e,e=>{try{m(e)}catch(t){}})}const n=y(e);if(n)for(let o=n.length-1;o>=0;--o){const t=n[o],i=t&&t.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(r){}}},Ze=function(e,t){try{$n(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){$n(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(he||fe)try{Xe(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},Qe=function(e){const t=y(e);if(t)for(let r=t.length-1;r>=0;--r){const o=t[r],i=o&&o.name;if("string"==typeof i&&!X[$e(i)])try{e.removeAttribute(i)}catch(n){}}},et=function(e){const t=[e];for(;t.length>0;){const e=t.pop();(k?k(e):e.nodeType)===Mr&&Qe(e);const n=v(e);if(n)for(let r=n.length-1;r>=0;--r)t.push(n[r])}},tt=function(e){let t=null,n=null;if(pe)e="<remove></remove>"+e;else{const t=Gn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ve&&Ie===Te&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=j?T(e):e;if(Ie===Te)try{t=(new d).parseFromString(o,Ve)}catch(a){}if(!t||!t.documentElement){t=D.createDocument(Ie,"template",null);try{t.documentElement.innerHTML=Fe?S:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ie===Te?M.call(t,le?"html":"body")[0]:le?t.documentElement:i},nt=function(e){const t=C?C(e):e.ownerDocument;return O.call(t||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},rt=function(e){return e=Yn(e,L," "),e=Yn(e,V," "),e=Yn(e,z," ")},ot=function(e){var t;e.normalize();const n=C?C(e):e.ownerDocument,r=O.call(n||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let o=r.nextNode();for(;o;)o.data=rt(o.data),o=r.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&Ln(i,e=>{at(e.content)&&ot(e.content)})},it=function(e){const t=_?_(e):null;return"string"==typeof t&&("form"===$e(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==y(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==k(e)||e.childNodes!==v(e)))},at=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return k(e)===zr}catch(t){return!1}},st=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return"number"==typeof k(e)}catch(t){return!1}};function lt(e,t,r){0!==e.length&&Ln(e,e=>{e.call(n,t,r,Ue)})}const ut=function(e,t,n,r){return 0===e.length?t:t===n||t===r?ur(t):t},ct=function(e,t){if(lt(P.beforeSanitizeElements,e,null),e!==t&&null===b(e))return ye&&et(e),!0;if(it(e))return Xe(e),!0;const r=$e(_?_(e):e.nodeName);if(Y=ut(P.uponSanitizeElement,Y,K,ce),lt(P.uponSanitizeElement,e,{tagName:r,allowedTags:Y}),e!==t&&null===b(e))return ye&&et(e),!0;if(function(e,t){return!!(se&&e.hasChildNodes()&&!st(e.firstElementChild)&&rr(Fr,e.textContent)&&rr(Fr,e.innerHTML))||!(!se||e.namespaceURI!==Te||"style"!==t||!st(e.firstElementChild))||e.nodeType===Pr||!(!se||e.nodeType!==Lr||!rr(Dr,e.data))}(e,r))return Xe(e),!0;if(Q[r]||!(te.tagCheck instanceof Function&&te.tagCheck(r))&&!Y[r]){const n=function(e,t,n){if(!Q[t]&&ht(t)){if(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,t))return!1;if(Z.tagNameCheck instanceof Function&&Z.tagNameCheck(t))return!1}if(xe&&!_e[t]){const t=b(e),r=v(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?f(r[o],!0):r[o];t.insertBefore(i,g(e))}}return Xe(e),!0}(e,r,t);return!1===n&<(P.afterSanitizeElements,e,null),n}if((k?k(e):e.nodeType)===Mr&&!Ke(e))return Xe(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&rr(Or,e.innerHTML))return Xe(e),!0;if(ae&&e.nodeType===Br){const t=rt(e.textContent);e.textContent!==t&&($n(n.removed,{element:e.cloneNode()}),e.textContent=t)}return lt(P.afterSanitizeElements,e,null),!1},dt=function(e,t,n){if(ee[t])return!1;if(se&&"patchsrc"===t)return!1;if(se&&"for"===t&&"label"!==e&&"output"!==e)return!1;if(ge&&("id"===t||"name"===t)&&(n in r||n in qe))return!1;const o=X[t]||te.attributeCheck instanceof Function&&te.attributeCheck(t,e);if(re&&rr($,t));else if(ne&&rr(U,t));else if(o)if(Se[t]);else if(rr(G,Yn(n,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Kn(n,"data:")||!je[e]){if(oe&&!rr(q,Yn(n,H,"")));else if(n)return!1}else;else if(!(ht(e)&&(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,e)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(e))&&(Z.attributeNameCheck instanceof RegExp&&rr(Z.attributeNameCheck,t)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(t,e))||"is"===t&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,n)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(n))))return!1;return!0},pt=sr({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ht=function(e){return!pt[Hn(e)]&&rr(W,e)},ft=function(e,t,n,r){if(j&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(e,t)){case"TrustedHTML":return T(r);case"TrustedScriptURL":return function(e){A(),N++;try{return j.createScriptURL(e)}finally{N--}}(r)}return r},mt=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),it(e)?Xe(e):zn(n.removed)}catch(i){Ze(t,e)}},gt=function(e){lt(P.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||it(e))return;X=ut(P.uponSanitizeAttribute,X,J,de);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let r=t.length;const o=$e(e.nodeName);for(;r--;){const i=t[r],a=i.name,s=i.namespaceURI,l=i.value,u=$e(a),c=l;let d="value"===a?c:Xn(c);n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,lt(P.uponSanitizeAttribute,e,n),d=n.attrValue,!ve||"id"!==u&&"name"!==u||0===Kn(d,be)||(Ze(a,e),d=be+d),se&&rr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)?Ze(a,e):"attributename"===u&&Gn(d,"href")?Ze(a,e):n.forceKeepAttr||(n.keepAttr&&(ie||!rr(Rr,d))?(ae&&(d=rt(d)),dt(o,u,d)?(d=ft(o,u,s,d),d!==c&&mt(e,a,s,d)):Ze(a,e)):Ze(a,e))}lt(P.afterSanitizeAttributes,e,null)},vt=function(e){let t=null;const n=nt(e);for(lt(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){lt(P.uponSanitizeShadowNode,t,null),ct(t,e),gt(t),at(t.content)&&vt(t.content);if((k?k(t):t.nodeType)===Mr){const e=x(t);at(e)&&(bt(e),vt(e))}}lt(P.afterSanitizeShadowDOM,e,null)},bt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){vt(e.shadow);continue}const n=e.node,r=(k?k(n):n.nodeType)===Mr,o=v(n);if(o)for(let i=o.length-1;i>=0;--i)t.push({node:o[i],shadow:null});if(r){const e=_?_(n):null;if("string"==typeof e&&"template"===$e(e)){const e=n.content;at(e)&&t.push({node:e,shadow:null})}}if(r){const e=x(n);at(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(Fe=!e,Fe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return Jn(e);case"boolean":return Zn(e);case"bigint":return Qn?Qn(e):"0";case"symbol":return er?er(e):"Symbol()";case"undefined":default:return nr(e);case"function":case"object":{if(null===e)return nr(e);const t=e,n=cr(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:nr(e)}return nr(e)}}}(e)))throw or("dirty is not a string, aborting");if(!n.isSupported)return e;ue?(Y=ce,X=de):We(t),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(Y=ur(Y)),P.uponSanitizeAttribute.length>0&&(X=ur(X)),n.removed=[];const l=ye&&"string"!=typeof e&&st(e);if(l){!function(e){if(!se)return;const t=[e];for(;t.length>0;){const e=t.pop(),r=k?k(e):e.nodeType;if(r===Pr||r===Lr&&rr(Dr,e.data)){try{m(e)}catch(n){}continue}if(r===Mr){const t=e,r=$e(_?_(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&"label"!==r&&"output"!==r&&t.removeAttribute("for")}catch(n){}}const o=v(e);if(o)for(let n=o.length-1;n>=0;--n)t.push(o[n])}}(e);const t=_?_(e):e.nodeName;if("string"==typeof t){const n=$e(t);if(!Y[n]||Q[n])throw Je(e),or("root node is forbidden and cannot be sanitized in-place")}if(it(e))throw Je(e),or("root node is clobbered and cannot be sanitized in-place");try{bt(e)}catch(d){throw Je(e),d}}else if(st(e))r=tt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Mr&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),bt(i);else{if(!he&&!ae&&!le&&-1===e.indexOf("<"))return j&&me?T(e):e;if(r=tt(e),!r)return he?null:me?S:""}r&&pe&&Xe(r.firstChild);const u=l?e:r;try{const e=nt(u);for(;a=e.nextNode();)ct(a,u),gt(a),at(a.content)&&vt(a.content)}catch(d){throw l&&(Je(e),Ln(n.removed,e=>{e.element&&et(e.element)})),d}if(l)return Ln(n.removed,e=>{e.element&&et(e.element)}),ae&&ot(e),e;if(he){if(ae&&ot(r),fe)for(s=R.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(X.shadowroot||X.shadowrootmode)&&(s=B.call(o,s,!0)),s}let c=le?r.outerHTML:r.innerHTML;return le&&Y["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&rr(Tr,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),ae&&(c=rt(c)),j&&me?T(c):c},n.setConfig=function(){We(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ue=!0,ce=Y,de=X},n.clearConfig=function(){Ue=null,ue=!1,ce=null,de=null,j=w,S=""},n.isValidAttribute=function(e,t,n){Ue||We({});const r=$e(e),o=$e(t);return dt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&tr(P,e)&&$n(P[e],t)},n.removeHook=function(e,t){if(tr(P,e)){if(void 0!==t){const n=Vn(P[e],t);return-1===n?void 0:Un(P[e],n,1)[0]}return zn(P[e])}},n.removeHooks=function(e){tr(P,e)&&(P[e]=[])},n.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const qr=o.div`
|
|
630
|
+
function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function En(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,o=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Sn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Nn=Object.entries,An=Object.setPrototypeOf,Tn=Object.isFrozen,In=Object.getPrototypeOf,Fn=Object.getOwnPropertyDescriptor;let Dn=Object.freeze,On=Object.seal,Rn=Object.create,Mn="undefined"!=typeof Reflect&&Reflect,Bn=Mn.apply,Pn=Mn.construct;Dn||(Dn=function(e){return e}),On||(On=function(e){return e}),Bn||(Bn=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Pn||(Pn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Ln=ar(Array.prototype.forEach),Vn=ar(Array.prototype.lastIndexOf),zn=ar(Array.prototype.pop),$n=ar(Array.prototype.push),Un=ar(Array.prototype.splice),qn=Array.isArray,Hn=ar(String.prototype.toLowerCase),Wn=ar(String.prototype.toString),Gn=ar(String.prototype.match),Yn=ar(String.prototype.replace),Kn=ar(String.prototype.indexOf),Xn=ar(String.prototype.trim),Jn=ar(Number.prototype.toString),Zn=ar(Boolean.prototype.toString),Qn="undefined"==typeof BigInt?null:ar(BigInt.prototype.toString),er="undefined"==typeof Symbol?null:ar(Symbol.prototype.toString),tr=ar(Object.prototype.hasOwnProperty),nr=ar(Object.prototype.toString),rr=ar(RegExp.prototype.test),or=(ir=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pn(ir,t)});var ir;function ar(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Bn(e,t,r)}}function sr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hn;if(An&&An(e,null),!qn(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Tn(t)||(t[r]=e),o=e)}e[o]=!0}return e}function lr(e){for(let t=0;t<e.length;t++){tr(e,t)||(e[t]=null)}return e}function ur(e){const t=Rn(null);for(const r of Nn(e)){var n=En(r,2);const o=n[0],i=n[1];tr(e,o)&&(qn(i)?t[o]=lr(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=ur(i):t[o]=i)}return t}function cr(e,t){for(;null!==e;){const n=Fn(e,t);if(n){if(n.get)return ar(n.get);if("function"==typeof n.value)return ar(n.value)}e=In(e)}return function(){return null}}const dr=Dn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pr=Dn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hr=Dn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fr=Dn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mr=Dn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gr=Dn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vr=Dn(["#text"]),br=Dn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xr=Dn(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","dominant-baseline","dur","edgemode","elevation","end","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","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"]),yr=Dn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kr=Dn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_r=On(/{{[\w\W]*|^[\w\W]*}}/g),Cr=On(/<%[\w\W]*|^[\w\W]*%>/g),jr=On(/\${[\w\W]*/g),wr=On(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sr=On(/^aria-[\-\w]+$/),Er=On(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nr=On(/^(?:\w+script|data):/i),Ar=On(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Tr=On(/^html$/i),Ir=On(/^[a-z][.\w]*(-[.\w]+)+$/i),Fr=On(/<[/\w!]/g),Dr=On(/<[/\w]/g),Or=On(/<\/no(script|embed|frames)/i),Rr=On(/\/>/i),Mr=1,Br=3,Pr=7,Lr=8,Vr=9,zr=11,$r=function(e,t,n,r){return tr(e,t)&&qn(e[t])?sr(r.base?ur(r.base):{},e[t],r.transform):n};var Ur=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.4.13",n.removed=[],!t||!t.document||t.document.nodeType!==Vr||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap;void 0===c&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,p=t.trustedTypes,h=l.prototype,f=cr(h,"cloneNode"),m=cr(h,"remove"),g=cr(h,"nextSibling"),v=cr(h,"childNodes"),b=cr(h,"parentNode"),x=cr(h,"shadowRoot"),y=cr(h,"attributes"),k=s&&s.prototype?cr(s.prototype,"nodeType"):null,_=s&&s.prototype?cr(s.prototype,"nodeName"):null,C=s&&s.prototype?cr(s.prototype,"ownerDocument"):null;if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let j,w,S="",E=!1,N=0;const A=function(){if(N>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(e){A(),N++;try{return j.createHTML(e)}finally{N--}},I=function(){return E||(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),E=!0),w},F=r,D=F.implementation,O=F.createNodeIterator,R=F.createDocumentFragment,M=F.getElementsByTagName,B=o.importNode;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Nn&&"function"==typeof b&&D&&void 0!==D.createHTMLDocument;const L=_r,V=Cr,z=jr,$=wr,U=Sr,q=Nr,H=Ar,W=Ir;let G=Er,Y=null;const K=sr({},[...dr,...pr,...hr,...mr,...vr]);let X=null;const J=sr({},[...br,...xr,...yr,...kr]);let Z=Object.seal(Rn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,ee=null;const te=Object.seal(Rn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,re=!0,oe=!1,ie=!0,ae=!1,se=!0,le=!1,ue=!1,ce=null,de=null,pe=!1,he=!1,fe=!1,me=!1,ge=!0,ve=!1;const be="user-content-";let xe=!0,ye=!1,ke={},_e=null;const Ce=sr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let je=null;const we=sr({},["audio","video","img","source","image","track"]);let Se=null;const Ee=sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let Ie=Te,Fe=!1,De=null;const Oe=sr({},[Ne,Ae,Te],Wn),Re=Dn(["mi","mo","mn","ms","mtext"]);let Me=sr({},Re);const Be=Dn(["annotation-xml"]);let Pe=sr({},Be);const Le=sr({},["title","style","font","a","script"]);let Ve=null;const ze=["application/xhtml+xml","text/html"];let $e=null,Ue=null;const qe=r.createElement("form"),He=function(e){return e instanceof RegExp||e instanceof Function},We=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ue&&Ue===e)return;e&&"object"==typeof e||(e={}),e=ur(e),Ve=-1===ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,$e="application/xhtml+xml"===Ve?Wn:Hn,Y=$r(e,"ALLOWED_TAGS",K,{transform:$e}),X=$r(e,"ALLOWED_ATTR",J,{transform:$e}),De=$r(e,"ALLOWED_NAMESPACES",Oe,{transform:Wn}),Se=$r(e,"ADD_URI_SAFE_ATTR",Ee,{transform:$e,base:Ee}),je=$r(e,"ADD_DATA_URI_TAGS",we,{transform:$e,base:we}),_e=$r(e,"FORBID_CONTENTS",Ce,{transform:$e}),Q=$r(e,"FORBID_TAGS",ur({}),{transform:$e}),ee=$r(e,"FORBID_ATTR",ur({}),{transform:$e}),ke=!!tr(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?ur(e.USE_PROFILES):e.USE_PROFILES),ne=!1!==e.ALLOW_ARIA_ATTR,re=!1!==e.ALLOW_DATA_ATTR,oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ae=e.SAFE_FOR_TEMPLATES||!1,se=!1!==e.SAFE_FOR_XML,le=e.WHOLE_DOCUMENT||!1,he=e.RETURN_DOM||!1,fe=e.RETURN_DOM_FRAGMENT||!1,me=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=!1!==e.SANITIZE_DOM,ve=e.SANITIZE_NAMED_PROPS||!1,xe=!1!==e.KEEP_CONTENT,ye=e.IN_PLACE||!1,G=function(e){try{return rr(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Er,Ie="string"==typeof e.NAMESPACE?e.NAMESPACE:Te,Me=tr(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?ur(e.MATHML_TEXT_INTEGRATION_POINTS):sr({},Re),Pe=tr(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?ur(e.HTML_INTEGRATION_POINTS):sr({},Be);const t=tr(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?ur(e.CUSTOM_ELEMENT_HANDLING):Rn(null);if(Z=Rn(null),tr(t,"tagNameCheck")&&He(t.tagNameCheck)&&(Z.tagNameCheck=t.tagNameCheck),tr(t,"attributeNameCheck")&&He(t.attributeNameCheck)&&(Z.attributeNameCheck=t.attributeNameCheck),tr(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),On(Z),ae&&(re=!1),fe&&(he=!0),ke&&(Y=sr({},vr),X=Rn(null),!0===ke.html&&(sr(Y,dr),sr(X,br)),!0===ke.svg&&(sr(Y,pr),sr(X,xr),sr(X,kr)),!0===ke.svgFilters&&(sr(Y,hr),sr(X,xr),sr(X,kr)),!0===ke.mathMl&&(sr(Y,mr),sr(X,yr),sr(X,kr))),te.tagCheck=null,te.attributeCheck=null,tr(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?te.tagCheck=e.ADD_TAGS:qn(e.ADD_TAGS)&&(Y===K&&(Y=ur(Y)),sr(Y,e.ADD_TAGS,$e))),tr(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?te.attributeCheck=e.ADD_ATTR:qn(e.ADD_ATTR)&&(X===J&&(X=ur(X)),sr(X,e.ADD_ATTR,$e))),tr(e,"ADD_URI_SAFE_ATTR")&&qn(e.ADD_URI_SAFE_ATTR)&&sr(Se,e.ADD_URI_SAFE_ATTR,$e),tr(e,"FORBID_CONTENTS")&&qn(e.FORBID_CONTENTS)&&(_e===Ce&&(_e=ur(_e)),sr(_e,e.FORBID_CONTENTS,$e)),tr(e,"ADD_FORBID_CONTENTS")&&qn(e.ADD_FORBID_CONTENTS)&&(_e===Ce&&(_e=ur(_e)),sr(_e,e.ADD_FORBID_CONTENTS,$e)),xe&&(Y["#text"]=!0),le&&sr(Y,["html","head","body"]),Y.table&&(sr(Y,["tbody"]),delete Q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=j;j=e.TRUSTED_TYPES_POLICY;try{S=T("")}catch(n){throw j=t,n}}else null===e.TRUSTED_TYPES_POLICY?(j=void 0,S=""):(void 0===j&&(j=I()),j&&"string"==typeof S&&(S=T("")));Dn&&Dn(e),Ue=e},Ge=sr({},[...pr,...hr,...fr]),Ye=sr({},[...mr,...gr]),Ke=function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Ie,tagName:"template"});const n=Hn(e.tagName),r=Hn(t.tagName);return!!De[e.namespaceURI]&&(e.namespaceURI===Ae?function(e,t,n){return t.namespaceURI===Te?"svg"===e:t.namespaceURI===Ne?"svg"===e&&("annotation-xml"===n||Me[n]):Boolean(Ge[e])}(n,t,r):e.namespaceURI===Ne?function(e,t,n){return t.namespaceURI===Te?"math"===e:t.namespaceURI===Ae?"math"===e&&Pe[n]:Boolean(Ye[e])}(n,t,r):e.namespaceURI===Te?function(e,t,n){return!(t.namespaceURI===Ae&&!Pe[n])&&!(t.namespaceURI===Ne&&!Me[n])&&!Ye[e]&&(Le[e]||!Ge[e])}(n,t,r):!("application/xhtml+xml"!==Ve||!De[e.namespaceURI]))},Xe=function(e){$n(n.removed,{element:e});try{b(e).removeChild(e)}catch(t){if(m(e),!b(e))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Je=function(e){et(e);const t=v(e);if(t){const e=[];Ln(t,t=>{$n(e,t)}),Ln(e,e=>{try{m(e)}catch(t){}})}const n=y(e);if(n)for(let o=n.length-1;o>=0;--o){const t=n[o],i=t&&t.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(r){}}},Ze=function(e,t){try{$n(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){$n(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(he||fe)try{Xe(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},Qe=function(e){const t=y(e);if(t)for(let r=t.length-1;r>=0;--r){const o=t[r],i=o&&o.name;if("string"==typeof i&&!X[$e(i)])try{e.removeAttribute(i)}catch(n){}}},et=function(e){const t=[e];for(;t.length>0;){const e=t.pop();(k?k(e):e.nodeType)===Mr&&Qe(e);const n=v(e);if(n)for(let r=n.length-1;r>=0;--r)t.push(n[r])}},tt=function(e){let t=null,n=null;if(pe)e="<remove></remove>"+e;else{const t=Gn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ve&&Ie===Te&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=j?T(e):e;if(Ie===Te)try{t=(new d).parseFromString(o,Ve)}catch(a){}if(!t||!t.documentElement){t=D.createDocument(Ie,"template",null);try{t.documentElement.innerHTML=Fe?S:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ie===Te?M.call(t,le?"html":"body")[0]:le?t.documentElement:i},nt=function(e){const t=C?C(e):e.ownerDocument;return O.call(t||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},rt=function(e){return e=Yn(e,L," "),e=Yn(e,V," "),e=Yn(e,z," ")},ot=function(e){var t;e.normalize();const n=C?C(e):e.ownerDocument,r=O.call(n||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let o=r.nextNode();for(;o;)o.data=rt(o.data),o=r.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&Ln(i,e=>{at(e.content)&&ot(e.content)})},it=function(e){const t=_?_(e):null;return"string"==typeof t&&("form"===$e(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==y(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==k(e)||e.childNodes!==v(e)))},at=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return k(e)===zr}catch(t){return!1}},st=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return"number"==typeof k(e)}catch(t){return!1}};function lt(e,t,r){0!==e.length&&Ln(e,e=>{e.call(n,t,r,Ue)})}const ut=function(e,t,n,r){return 0===e.length?t:t===n||t===r?ur(t):t},ct=function(e,t){if(lt(P.beforeSanitizeElements,e,null),e!==t&&null===b(e))return ye&&et(e),!0;if(it(e))return Xe(e),!0;const r=$e(_?_(e):e.nodeName);if(Y=ut(P.uponSanitizeElement,Y,K,ce),lt(P.uponSanitizeElement,e,{tagName:r,allowedTags:Y}),e!==t&&null===b(e))return ye&&et(e),!0;if(function(e,t){return!!(se&&e.hasChildNodes()&&!st(e.firstElementChild)&&rr(Fr,e.textContent)&&rr(Fr,e.innerHTML))||!(!se||e.namespaceURI!==Te||"style"!==t||!st(e.firstElementChild))||e.nodeType===Pr||!(!se||e.nodeType!==Lr||!rr(Dr,e.data))}(e,r))return Xe(e),!0;if(Q[r]||!(te.tagCheck instanceof Function&&te.tagCheck(r))&&!Y[r]){const n=function(e,t,n){if(!Q[t]&&ht(t)){if(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,t))return!1;if(Z.tagNameCheck instanceof Function&&Z.tagNameCheck(t))return!1}if(xe&&!_e[t]){const t=b(e),r=v(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?f(r[o],!0):r[o];t.insertBefore(i,g(e))}}return Xe(e),!0}(e,r,t);return!1===n&<(P.afterSanitizeElements,e,null),n}if((k?k(e):e.nodeType)===Mr&&!Ke(e))return Xe(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&rr(Or,e.innerHTML))return Xe(e),!0;if(ae&&e.nodeType===Br){const t=rt(e.textContent);e.textContent!==t&&($n(n.removed,{element:e.cloneNode()}),e.textContent=t)}return lt(P.afterSanitizeElements,e,null),!1},dt=function(e,t,n){if(ee[t])return!1;if(se&&"patchsrc"===t)return!1;if(se&&"for"===t&&"label"!==e&&"output"!==e)return!1;if(ge&&("id"===t||"name"===t)&&(n in r||n in qe))return!1;const o=X[t]||te.attributeCheck instanceof Function&&te.attributeCheck(t,e);if(re&&rr($,t));else if(ne&&rr(U,t));else if(o)if(Se[t]);else if(rr(G,Yn(n,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Kn(n,"data:")||!je[e]){if(oe&&!rr(q,Yn(n,H,"")));else if(n)return!1}else;else if(!(ht(e)&&(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,e)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(e))&&(Z.attributeNameCheck instanceof RegExp&&rr(Z.attributeNameCheck,t)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(t,e))||"is"===t&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&rr(Z.tagNameCheck,n)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(n))))return!1;return!0},pt=sr({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ht=function(e){return!pt[Hn(e)]&&rr(W,e)},ft=function(e,t,n,r){if(j&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(e,t)){case"TrustedHTML":return T(r);case"TrustedScriptURL":return function(e){A(),N++;try{return j.createScriptURL(e)}finally{N--}}(r)}return r},mt=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),it(e)?Xe(e):zn(n.removed)}catch(i){Ze(t,e)}},gt=function(e){lt(P.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||it(e))return;X=ut(P.uponSanitizeAttribute,X,J,de);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let r=t.length;const o=$e(e.nodeName);for(;r--;){const i=t[r],a=i.name,s=i.namespaceURI,l=i.value,u=$e(a),c=l;let d="value"===a?c:Xn(c);n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,lt(P.uponSanitizeAttribute,e,n),d=n.attrValue,!ve||"id"!==u&&"name"!==u||0===Kn(d,be)||(Ze(a,e),d=be+d),se&&rr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)?Ze(a,e):"attributename"===u&&Gn(d,"href")?Ze(a,e):n.forceKeepAttr||(n.keepAttr&&(ie||!rr(Rr,d))?(ae&&(d=rt(d)),dt(o,u,d)?(d=ft(o,u,s,d),d!==c&&mt(e,a,s,d)):Ze(a,e)):Ze(a,e))}lt(P.afterSanitizeAttributes,e,null)},vt=function(e){let t=null;const n=nt(e);for(lt(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){lt(P.uponSanitizeShadowNode,t,null),ct(t,e),gt(t),at(t.content)&&vt(t.content);if((k?k(t):t.nodeType)===Mr){const e=x(t);at(e)&&(bt(e),vt(e))}}lt(P.afterSanitizeShadowDOM,e,null)},bt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){vt(e.shadow);continue}const n=e.node,r=(k?k(n):n.nodeType)===Mr,o=v(n);if(o)for(let i=o.length-1;i>=0;--i)t.push({node:o[i],shadow:null});if(r){const e=_?_(n):null;if("string"==typeof e&&"template"===$e(e)){const e=n.content;at(e)&&t.push({node:e,shadow:null})}}if(r){const e=x(n);at(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(Fe=!e,Fe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return Jn(e);case"boolean":return Zn(e);case"bigint":return Qn?Qn(e):"0";case"symbol":return er?er(e):"Symbol()";case"undefined":default:return nr(e);case"function":case"object":{if(null===e)return nr(e);const t=e,n=cr(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:nr(e)}return nr(e)}}}(e)))throw or("dirty is not a string, aborting");if(!n.isSupported)return e;ue?(Y=ce,X=de):We(t),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(Y=ur(Y)),P.uponSanitizeAttribute.length>0&&(X=ur(X)),n.removed=[];const l=ye&&"string"!=typeof e&&st(e);if(l){!function(e){if(!se)return;const t=[e];for(;t.length>0;){const e=t.pop(),r=k?k(e):e.nodeType;if(r===Pr||r===Lr&&rr(Dr,e.data)){try{m(e)}catch(n){}continue}if(r===Mr){const t=e,r=$e(_?_(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&"label"!==r&&"output"!==r&&t.removeAttribute("for")}catch(n){}}const o=v(e);if(o)for(let n=o.length-1;n>=0;--n)t.push(o[n])}}(e);const t=_?_(e):e.nodeName;if("string"==typeof t){const n=$e(t);if(!Y[n]||Q[n])throw Je(e),or("root node is forbidden and cannot be sanitized in-place")}if(it(e))throw Je(e),or("root node is clobbered and cannot be sanitized in-place");try{bt(e)}catch(d){throw Je(e),d}}else if(st(e))r=tt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Mr&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),bt(i);else{if(!he&&!ae&&!le&&-1===e.indexOf("<"))return j&&me?T(e):e;if(r=tt(e),!r)return he?null:me?S:""}r&&pe&&Xe(r.firstChild);const u=l?e:r;try{const e=nt(u);for(;a=e.nextNode();)ct(a,u),gt(a),at(a.content)&&vt(a.content)}catch(d){throw l&&(Je(e),Ln(n.removed,e=>{e.element&&et(e.element)})),d}if(l)return Ln(n.removed,e=>{e.element&&et(e.element)}),ae&&ot(e),e;if(he){if(ae&&ot(r),fe)for(s=R.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(X.shadowroot||X.shadowrootmode)&&(s=B.call(o,s,!0)),s}let c=le?r.outerHTML:r.innerHTML;return le&&Y["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&rr(Tr,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),ae&&(c=rt(c)),j&&me?T(c):c},n.setConfig=function(){We(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ue=!0,ce=Y,de=X},n.clearConfig=function(){Ue=null,ue=!1,ce=null,de=null,j=w,S=""},n.isValidAttribute=function(e,t,n){Ue||We({});const r=$e(e),o=$e(t);return dt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&tr(P,e)&&$n(P[e],t)},n.removeHook=function(e,t){if(tr(P,e)){if(void 0!==t){const n=Vn(P[e],t);return-1===n?void 0:Un(P[e],n,1)[0]}return zn(P[e])}},n.removeHooks=function(e){tr(P,e)&&(P[e]=[])},n.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function qr({value:e}){let t=e;return e&&"string"==typeof e&&(t=e.replaceAll("\n","<br/>")),b.jsx("span",{dangerouslySetInnerHTML:{__html:Ur.sanitize(t)}})}const Hr=o.div`
|
|
631
631
|
--toggle-color-on: #4169ed;
|
|
632
632
|
--toggle-color-off: #666;
|
|
633
633
|
--toggle-color-inactive: #999;
|
|
@@ -668,7 +668,7 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
668
668
|
font-weight: bold;
|
|
669
669
|
color: var(--toggle-color-${e=>e.disabled?"inactive":"text"});
|
|
670
670
|
}
|
|
671
|
-
`;const
|
|
671
|
+
`;const Wr=o.main`
|
|
672
672
|
height: calc(100% - 55px);
|
|
673
673
|
overflow-y: scroll;
|
|
674
674
|
overflow-x: hidden;
|
|
@@ -712,7 +712,7 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
712
712
|
max-width: ${({hasMaxWidth:e})=>e?"1840px":"auto"};
|
|
713
713
|
margin: 12px auto 20px;
|
|
714
714
|
}
|
|
715
|
-
`;const
|
|
715
|
+
`;const Gr=o.div`
|
|
716
716
|
display: flex;
|
|
717
717
|
flex-direction: column;
|
|
718
718
|
gap: var(--form-desk-gap);
|
|
@@ -776,7 +776,7 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
`;const
|
|
779
|
+
`;const Yr={id:"",caption:"",title:"",isOpen:!1,isVisible:!1},Kr=t.createContext(null);function Xr(e){let t=!1;for(const n of e)n.isOpen=!1,n.isVisible&&!t&&(n.isOpen=!0,t=!0)}function Jr(){return t.useContext(Kr)}function Zr({isMultine:e}){const{tabs:t,selectTab:n}=Jr(),r=t.filter(e=>e.isVisible);return b.jsx("div",{className:"tab-header--container "+(e?"is-tab-multiline":""),children:r.map(e=>b.jsx("button",{type:"button",title:e.title,onClick:()=>n(e.id),hidden:!e.isVisible,className:e.isOpen&&r.length>1?"tab-active":"",tabIndex:-1,children:e.caption||e.title},e.id))})}const Qr=o.div`
|
|
780
780
|
/* margin: ${({noMargin:e})=>e?"0":"5px 0 8px"}; */
|
|
781
781
|
border: 1px solid var(--pn-color-border);
|
|
782
782
|
border-radius: ${e=>e.open?"0 0 var(--pn-border-radius) var(--pn-border-radius)":"0"};
|
|
@@ -860,13 +860,13 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
`;function
|
|
863
|
+
`;function eo(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var to={exports:{}};
|
|
864
864
|
/*!
|
|
865
865
|
localForage -- Offline Storage, Improved
|
|
866
866
|
Version 1.10.0
|
|
867
867
|
https://localforage.github.io/localForage
|
|
868
868
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
869
|
-
*/eo.exports=function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){if(!s&&Qr)return Qr(a);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=Qr,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(e){var n,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(c),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,n=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}function d(e){1!==u.push(e)||r||n()}t.exports=d}).call(this,void 0!==d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&h(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(o){return i.reject(e,o)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}function a(){t(o,r)}var s=f(a);"error"===s.status&&r(s.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function m(e){return e instanceof this?e:i.resolve(new this(o),e)}function g(e){var t=new this(o);return i.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,u=new this(o);++l<n;)c(e[l],l);return u;function c(e,o){function l(e){a[o]=e,++s!==n||r||(r=!0,i.resolve(u,a))}t.resolve(e).then(l,function(e){r||(r=!0,i.reject(u,e))})}}function b(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=-1,s=new this(o);++a<n;)l(e[a]);return s;function l(e){t.resolve(e).then(function(e){r||(r=!0,i.resolve(s,e))},function(e){r||(r=!0,i.reject(s,e))})}}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(o);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){i.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=f(p,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)h(e,r);else{e.state=s,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=m,u.reject=g,u.all=v,u.race=b},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var a=i();function s(){try{if(!a||!a.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(n){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var u=Promise;function c(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function p(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,g={},v=Object.prototype.toString,b="readonly",x="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function k(e){return new u(function(t){var n=e.transaction(f,x),r=l([""]);n.objectStore(f).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function _(e){return"boolean"==typeof m?u.resolve(m):k(e).then(function(e){return m=e})}function C(e){var t=g[e.name],n={};n.promise=new u(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function j(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new u(function(n,r){if(g[e.name]=g[e.name]||M(),e.db){if(!t)return n(e.db);C(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),j(e)}})}function E(e){return S(e,!1)}function N(e){return S(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new u(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function I(e){return l([y(atob(e.data))],{type:e.type})}function F(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function O(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,E(e).then(function(t){return e.db=t,A(e)?N(e):t}).then(function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}).catch(function(t){throw w(e,t),t})}function R(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return u.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),N(e)}).then(function(){return O(e).then(function(){R(e,t,n,r-1)})}).catch(n);n(i)}}function M(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=M(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var i=[];function a(){return u.resolve()}for(var s=0;s<o.forages.length;s++){var l=o.forages[s];l!==t&&i.push(l._initReady().catch(a))}var c=o.forages.slice(0);return u.all(i).then(function(){return n.db=o.db,E(n)}).then(function(e){return n.db=e,A(n,t._defaultConfig.version)?N(n):e}).then(function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<c.length;r++){var i=c[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}})}function P(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),F(e)&&(e=I(e)),t(e)},a.onerror=function(){r(a.error)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function L(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;F(r)&&(r=I(r));var o=e(r,n.key,s++);void 0!==o?t(o):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(l){r(l)}})}).catch(r)});return c(r,t),r}function V(e,t,n){var r=this;e=p(e);var o=new u(function(n,o){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===v.call(t)?_(i.db).then(function(e){return e?t:T(t)}):t}).then(function(t){R(r._dbInfo,x,function(i,a){if(i)return o(i);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;o(e)}}catch(u){o(u)}})}).catch(o)});return c(o,n),o}function z(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,x,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function $(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,x,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function U(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function q(e,t){var n=this,r=new u(function(t,r){e<0?t(null):n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(u){r(u)}})}).catch(r)});return c(r,t),r}function H(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){n(i.error)}}catch(s){n(s)}})}).catch(n)});return c(n,e),n}function W(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;if(e.name){var i=e.name===n.name&&o._dbInfo.db?u.resolve(o._dbInfo.db):E(e).then(function(t){var n=g[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t});r=e.storeName?i.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;C(e);var r=g[e.name],o=r.forages;t.close();for(var i=0;i<o.length;i++){var s=o[i];s._dbInfo.db=null,s._dbInfo.version=n}return new u(function(t,r){var o=a.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,j(n._dbInfo)}}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})}}):i.then(function(t){C(e);var n=g[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new u(function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++)j(r[t]._dbInfo)}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})})}else r=u.reject("Invalid arguments");return c(r,t),r}var G={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:L,getItem:P,setItem:V,removeItem:z,clear:$,length:U,key:q,keys:H,dropInstance:W};function Y(){return"function"==typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",Q=Z.length,ee="arbf",te="blob",ne="si08",re="ui08",oe="uic8",ie="si16",ae="si32",se="ur16",le="ui32",ue="fl32",ce="fl64",de=Q+ee.length,pe=Object.prototype.toString;function he(e){var t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=K.indexOf(e[t]),r=K.indexOf(e[t+1]),o=K.indexOf(e[t+2]),i=K.indexOf(e[t+3]),c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|o>>2,c[l++]=(3&o)<<6|63&i;return u}function fe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=K[n[t]>>2],r+=K[(3&n[t])<<4|n[t+1]>>4],r+=K[(15&n[t+1])<<2|n[t+2]>>6],r+=K[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=pe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===pe.call(e.buffer))){var r,o=Z;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=le:"[object Float32Array]"===n?o+=ue:"[object Float64Array]"===n?o+=ce:t(new Error("Failed to get type for BinaryArray"))),t(o+fe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=X+e.type+"~"+fe(this.result);t(Z+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Q)!==Z)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Q,de);if(r===te&&J.test(n)){var o=n.match(J);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return l([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case le:return new Uint32Array(i);case ue:return new Float32Array(i);case ce:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:fe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function xe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction(function(o){be(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=ve,o}function ye(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?i(e,a):be(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}function ke(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function _e(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;s<a;s++){var l=i.item(s),u=l.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=e(u,l.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ce(e,t,n,r){var o=this;e=p(e);var i=new u(function(i,a){o.ready().then(function(){void 0===t&&(t=null);var s=t,l=o._dbInfo;l.serializer.serialize(t,function(t,u){u?a(u):l.db.transaction(function(n){ye(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){i(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(Ce.apply(o,[e,s,n,r-1]));a(t)}})})}).catch(a)});return c(i,n),i}function je(e,t,n){return Ce.apply(this,[e,t,n,1])}function we(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Se(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ee(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ne(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ae(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Te(e){return new u(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})},function(e,t){n(t)})},function(e){n(e)})})}function Ie(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;return c(r=e.name?new u(function(t){var r;r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Te(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function o(e){return new u(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var i=[],a=0,s=e.storeNames.length;a<s;a++)i.push(o(e.storeNames[a]));u.all(i).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):u.reject("Invalid arguments"),t),r}var Fe={_driver:"webSQLStorage",_initStorage:xe,_support:Y(),iterate:_e,getItem:ke,setItem:je,removeItem:we,clear:Se,length:Ee,key:Ne,keys:Ae,dropInstance:Ie};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Oe(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Re(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Me(){return!Re()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Oe(e,t._defaultConfig),Me()?(t._dbInfo=n,n.serializer=ve,u.resolve()):u.reject()}function Pe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return c(n,e),n}function Le(e,t){var n=this;e=p(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return c(r,t),r}function Ve(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s<i;s++){var l=localStorage.key(s);if(0===l.indexOf(r)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,l.substring(o),a++)))return u}}});return c(r,t),r}function ze(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return c(n,e),n}function Ue(e){var t=this.keys().then(function(e){return e.length});return c(t,e),t}function qe(e,t){var n=this;e=p(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return c(r,t),r}function He(e,t,n){var r=this;e=p(e);var o=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(o,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}})})});return c(o,n),o}function We(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,o=this;return c(r=e.name?new u(function(t){e.storeName?t(Oe(e,o._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):u.reject("Invalid arguments"),t),r}var Ge={_driver:"localStorageWrapper",_initStorage:Be,_support:De(),iterate:Ve,getItem:Le,setItem:He,removeItem:qe,clear:Pe,length:Ue,key:ze,keys:$e,dropInstance:We},Ye=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){for(var n=e.length,r=0;r<n;){if(Ye(e[r],t))return!0;r++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Je={},Ze={},Qe={INDEXEDDB:G,WEBSQL:Fe,LOCALSTORAGE:Ge},et=[Qe.INDEXEDDB._driver,Qe.WEBSQL._driver,Qe.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ot(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var at=function(){function e(t){for(var n in o(this,e),Qe)if(Qe.hasOwnProperty(n)){var r=Qe[n],i=r._driver;this[n]=i,Je[i]||this.defineDriver(r)}this._defaultConfig=it({},rt),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new u(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=nt.concat("_initStorage"),a=0,s=i.length;a<s;a++){var l=i[a];if((!Ke(tt,l)||e[l])&&"function"!=typeof e[l])return void n(o)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=u.reject(t);return c(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var o=tt[n];e[o]||(e[o]=t(o))}};d();var p=function(n){Je[r]&&console.info("Redefining LocalForage driver: "+r),Je[r]=e,Ze[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(p,n):p(!!e._support):p(!0)}catch(h){n(h)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Je[e]?u.resolve(Je[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(ve);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Xe(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function a(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var o=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(a).catch(n)}i();var s=new Error("No available storage method found.");return r._driverSet=u.reject(s),r._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch(function(){return u.resolve()}):u.resolve();return this._driverSet=l.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(o)})}).catch(function(){i();var e=new Error("No available storage method found.");return r._driverSet=u.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Ze[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)ot(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),st=new at;t.exports=st},{3:3}]},{},[4])(4);const to=p(eo.exports),no=to.createInstance({name:"report",storeName:"report"});function ro(e,n){const[r,o]=t.useState(()=>{const t=localStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>localStorage.setItem(e,JSON.stringify(r)),[r]),[r,o]}function oo(e){let t=e.url;if(e.params){t=t+"?"+new URLSearchParams(e.params).toString()}return t}to.config({driver:to.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const io={init:async e=>{let t=await to.getItem(oo(e));t&&(e.headers["x-tag"]=t.xtag,e.data=t.data)},save:async(e,t)=>{if(304==e.status)e.data=t.data;else if(e.status<400)try{let n={xtag:e.headers["x-tag"],data:e.data,create_at:new Date};await to.setItem(oo(t),n)}catch(n){console.info("Cache: ",n)}},clear:async(e=3)=>{const t=864e5*e,n=await to.keys(),r=new Date;for(const o of n){const e=await to.getItem(o);if(e&&e.create_at){r-new Date(e.create_at)>=t&&await to.removeItem(o)}}},clearAll:()=>{to.clear()}},ao=o.div`
|
|
869
|
+
*/to.exports=function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){if(!s&&eo)return eo(a);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=eo,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(e){var n,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(c),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,n=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}function d(e){1!==u.push(e)||r||n()}t.exports=d}).call(this,void 0!==d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&h(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(o){return i.reject(e,o)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}function a(){t(o,r)}var s=f(a);"error"===s.status&&r(s.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function m(e){return e instanceof this?e:i.resolve(new this(o),e)}function g(e){var t=new this(o);return i.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,u=new this(o);++l<n;)c(e[l],l);return u;function c(e,o){function l(e){a[o]=e,++s!==n||r||(r=!0,i.resolve(u,a))}t.resolve(e).then(l,function(e){r||(r=!0,i.reject(u,e))})}}function b(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=-1,s=new this(o);++a<n;)l(e[a]);return s;function l(e){t.resolve(e).then(function(e){r||(r=!0,i.resolve(s,e))},function(e){r||(r=!0,i.reject(s,e))})}}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(o);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){i.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=f(p,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)h(e,r);else{e.state=s,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=m,u.reject=g,u.all=v,u.race=b},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==d?d:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var a=i();function s(){try{if(!a||!a.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(n){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var u=Promise;function c(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function p(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,g={},v=Object.prototype.toString,b="readonly",x="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function k(e){return new u(function(t){var n=e.transaction(f,x),r=l([""]);n.objectStore(f).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function _(e){return"boolean"==typeof m?u.resolve(m):k(e).then(function(e){return m=e})}function C(e){var t=g[e.name],n={};n.promise=new u(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function j(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new u(function(n,r){if(g[e.name]=g[e.name]||M(),e.db){if(!t)return n(e.db);C(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),j(e)}})}function E(e){return S(e,!1)}function N(e){return S(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new u(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function I(e){return l([y(atob(e.data))],{type:e.type})}function F(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function O(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,E(e).then(function(t){return e.db=t,A(e)?N(e):t}).then(function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}).catch(function(t){throw w(e,t),t})}function R(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return u.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),N(e)}).then(function(){return O(e).then(function(){R(e,t,n,r-1)})}).catch(n);n(i)}}function M(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=M(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var i=[];function a(){return u.resolve()}for(var s=0;s<o.forages.length;s++){var l=o.forages[s];l!==t&&i.push(l._initReady().catch(a))}var c=o.forages.slice(0);return u.all(i).then(function(){return n.db=o.db,E(n)}).then(function(e){return n.db=e,A(n,t._defaultConfig.version)?N(n):e}).then(function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<c.length;r++){var i=c[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}})}function P(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),F(e)&&(e=I(e)),t(e)},a.onerror=function(){r(a.error)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function L(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;F(r)&&(r=I(r));var o=e(r,n.key,s++);void 0!==o?t(o):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(l){r(l)}})}).catch(r)});return c(r,t),r}function V(e,t,n){var r=this;e=p(e);var o=new u(function(n,o){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===v.call(t)?_(i.db).then(function(e){return e?t:T(t)}):t}).then(function(t){R(r._dbInfo,x,function(i,a){if(i)return o(i);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;o(e)}}catch(u){o(u)}})}).catch(o)});return c(o,n),o}function z(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,x,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function $(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,x,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function U(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function q(e,t){var n=this,r=new u(function(t,r){e<0?t(null):n.ready().then(function(){R(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(u){r(u)}})}).catch(r)});return c(r,t),r}function H(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){n(i.error)}}catch(s){n(s)}})}).catch(n)});return c(n,e),n}function W(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;if(e.name){var i=e.name===n.name&&o._dbInfo.db?u.resolve(o._dbInfo.db):E(e).then(function(t){var n=g[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t});r=e.storeName?i.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;C(e);var r=g[e.name],o=r.forages;t.close();for(var i=0;i<o.length;i++){var s=o[i];s._dbInfo.db=null,s._dbInfo.version=n}return new u(function(t,r){var o=a.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,j(n._dbInfo)}}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})}}):i.then(function(t){C(e);var n=g[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new u(function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++)j(r[t]._dbInfo)}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})})}else r=u.reject("Invalid arguments");return c(r,t),r}var G={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:L,getItem:P,setItem:V,removeItem:z,clear:$,length:U,key:q,keys:H,dropInstance:W};function Y(){return"function"==typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",Q=Z.length,ee="arbf",te="blob",ne="si08",re="ui08",oe="uic8",ie="si16",ae="si32",se="ur16",le="ui32",ue="fl32",ce="fl64",de=Q+ee.length,pe=Object.prototype.toString;function he(e){var t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=K.indexOf(e[t]),r=K.indexOf(e[t+1]),o=K.indexOf(e[t+2]),i=K.indexOf(e[t+3]),c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|o>>2,c[l++]=(3&o)<<6|63&i;return u}function fe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=K[n[t]>>2],r+=K[(3&n[t])<<4|n[t+1]>>4],r+=K[(15&n[t+1])<<2|n[t+2]>>6],r+=K[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=pe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===pe.call(e.buffer))){var r,o=Z;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=le:"[object Float32Array]"===n?o+=ue:"[object Float64Array]"===n?o+=ce:t(new Error("Failed to get type for BinaryArray"))),t(o+fe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=X+e.type+"~"+fe(this.result);t(Z+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Q)!==Z)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Q,de);if(r===te&&J.test(n)){var o=n.match(J);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return l([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case le:return new Uint32Array(i);case ue:return new Float32Array(i);case ce:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:fe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function xe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction(function(o){be(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=ve,o}function ye(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?i(e,a):be(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}function ke(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function _e(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;s<a;s++){var l=i.item(s),u=l.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=e(u,l.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ce(e,t,n,r){var o=this;e=p(e);var i=new u(function(i,a){o.ready().then(function(){void 0===t&&(t=null);var s=t,l=o._dbInfo;l.serializer.serialize(t,function(t,u){u?a(u):l.db.transaction(function(n){ye(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){i(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(Ce.apply(o,[e,s,n,r-1]));a(t)}})})}).catch(a)});return c(i,n),i}function je(e,t,n){return Ce.apply(this,[e,t,n,1])}function we(e,t){var n=this;e=p(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Se(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ee(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ne(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ae(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Te(e){return new u(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})},function(e,t){n(t)})},function(e){n(e)})})}function Ie(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;return c(r=e.name?new u(function(t){var r;r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Te(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function o(e){return new u(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var i=[],a=0,s=e.storeNames.length;a<s;a++)i.push(o(e.storeNames[a]));u.all(i).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):u.reject("Invalid arguments"),t),r}var Fe={_driver:"webSQLStorage",_initStorage:xe,_support:Y(),iterate:_e,getItem:ke,setItem:je,removeItem:we,clear:Se,length:Ee,key:Ne,keys:Ae,dropInstance:Ie};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Oe(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Re(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Me(){return!Re()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Oe(e,t._defaultConfig),Me()?(t._dbInfo=n,n.serializer=ve,u.resolve()):u.reject()}function Pe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return c(n,e),n}function Le(e,t){var n=this;e=p(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return c(r,t),r}function Ve(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s<i;s++){var l=localStorage.key(s);if(0===l.indexOf(r)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,l.substring(o),a++)))return u}}});return c(r,t),r}function ze(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return c(n,e),n}function Ue(e){var t=this.keys().then(function(e){return e.length});return c(t,e),t}function qe(e,t){var n=this;e=p(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return c(r,t),r}function He(e,t,n){var r=this;e=p(e);var o=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(o,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}})})});return c(o,n),o}function We(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,o=this;return c(r=e.name?new u(function(t){e.storeName?t(Oe(e,o._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):u.reject("Invalid arguments"),t),r}var Ge={_driver:"localStorageWrapper",_initStorage:Be,_support:De(),iterate:Ve,getItem:Le,setItem:He,removeItem:qe,clear:Pe,length:Ue,key:ze,keys:$e,dropInstance:We},Ye=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){for(var n=e.length,r=0;r<n;){if(Ye(e[r],t))return!0;r++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Je={},Ze={},Qe={INDEXEDDB:G,WEBSQL:Fe,LOCALSTORAGE:Ge},et=[Qe.INDEXEDDB._driver,Qe.WEBSQL._driver,Qe.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ot(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var at=function(){function e(t){for(var n in o(this,e),Qe)if(Qe.hasOwnProperty(n)){var r=Qe[n],i=r._driver;this[n]=i,Je[i]||this.defineDriver(r)}this._defaultConfig=it({},rt),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new u(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=nt.concat("_initStorage"),a=0,s=i.length;a<s;a++){var l=i[a];if((!Ke(tt,l)||e[l])&&"function"!=typeof e[l])return void n(o)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=u.reject(t);return c(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var o=tt[n];e[o]||(e[o]=t(o))}};d();var p=function(n){Je[r]&&console.info("Redefining LocalForage driver: "+r),Je[r]=e,Ze[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(p,n):p(!!e._support):p(!0)}catch(h){n(h)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Je[e]?u.resolve(Je[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(ve);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Xe(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function a(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var o=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(a).catch(n)}i();var s=new Error("No available storage method found.");return r._driverSet=u.reject(s),r._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch(function(){return u.resolve()}):u.resolve();return this._driverSet=l.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(o)})}).catch(function(){i();var e=new Error("No available storage method found.");return r._driverSet=u.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Ze[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)ot(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),st=new at;t.exports=st},{3:3}]},{},[4])(4);const no=p(to.exports),ro=no.createInstance({name:"report",storeName:"report"});function oo(e,n){const[r,o]=t.useState(()=>{const t=localStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>localStorage.setItem(e,JSON.stringify(r)),[r]),[r,o]}function io(e){let t=e.url;if(e.params){t=t+"?"+new URLSearchParams(e.params).toString()}return t}no.config({driver:no.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const ao={init:async e=>{let t=await no.getItem(io(e));t&&(e.headers["x-tag"]=t.xtag,e.data=t.data)},save:async(e,t)=>{if(304==e.status)e.data=t.data;else if(e.status<400)try{let n={xtag:e.headers["x-tag"],data:e.data,create_at:new Date};await no.setItem(io(t),n)}catch(n){console.info("Cache: ",n)}},clear:async(e=3)=>{const t=864e5*e,n=await no.keys(),r=new Date;for(const o of n){const e=await no.getItem(o);if(e&&e.create_at){r-new Date(e.create_at)>=t&&await no.removeItem(o)}}},clearAll:()=>{no.clear()}},so=o.div`
|
|
870
870
|
display: flex;
|
|
871
871
|
align-items: center;
|
|
872
872
|
gap: 0 5px;
|
|
@@ -896,7 +896,7 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
896
896
|
&:nth-child(1) {
|
|
897
897
|
border-top: 0;
|
|
898
898
|
}
|
|
899
|
-
`,
|
|
899
|
+
`,lo=o(a.Link)`
|
|
900
900
|
position: relative;
|
|
901
901
|
|
|
902
902
|
display: grid;
|
|
@@ -966,7 +966,7 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
966
966
|
top: 3px;
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
`,
|
|
969
|
+
`,uo=o.hr`
|
|
970
970
|
margin: 4px 12px;
|
|
971
|
-
`;function uo({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i}){var a;const{versionApp:s}=S();if((null==(a=e.menus)?void 0:a.length)>0)return b.jsxs(b.Fragment,{children:[b.jsxs(ao,{onClick:()=>n(e),isOpen:e.open,children:[b.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:e.caption}),b.jsx("span",{className:"icon",children:b.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),b.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,a)=>b.jsx(uo,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i},a))})]});if(e.route){let n=o(e.route),a=null==e?void 0:e.version;return a&&(a=Boolean(s.substring(0,a.length)===a)),b.jsxs(so,{to:e.route,onClick:t,children:[b.jsx("span",{className:"menu-icon",children:e.icon}),b.jsx("span",{className:"menu-caption",children:e.caption}),b.jsxs("span",{className:"menu-fav-new",children:[a&&b.jsx("span",{className:"menu-new",children:"novo"}),i&&b.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:b.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?b.jsx(lo,{}):null}const co="sys/nav/closed";const po=({routes:e,closeMenu:t,brand:n})=>b.jsx("div",{className:"navbar-mu--brand",children:b.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function ho({isOpen:e,setIsOpen:t,menuClose:n}){return b.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?b.jsx("i",{className:"fa-solid fa-xmark icon-close"}):b.jsxs("div",{className:"icon-desk",children:[b.jsx("span",{}),b.jsx("span",{}),b.jsx("span",{})]})})}const fo="sys/nav/closed";e.Alerta=F,e.Aviso=function({onConfirm:e,text:t="",children:n}){return b.jsx(I,{type:N,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return b.jsx(i.Button,{size:"sm",color:"warning",title:e,children:b.jsx(H,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return b.jsx(i.Button,{size:"sm",color:"primary",title:e,children:b.jsx(K,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return b.jsx(i.Button,{size:"sm",color:"danger",title:e,children:b.jsx(X,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return b.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:t,...n,children:[b.jsx(Y,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:o,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return b.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(o),children:[b.jsxs(i.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:s&&1==s,children:[b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),b.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[b.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return b.jsxs("div",{className:"box-color--container",children:[b.jsx(ne,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),b.jsx(ne,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),b.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&i&&i(e,u)},[u]),o?b.jsxs(re,{open:u,noMargin:a,...l,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",b.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),b.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=kn,e.ButtonBack=se,e.ButtonClose=ie,e.ButtonHelp=ae,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return b.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>b.jsx(i.Button,{active:r===e,color:"outline-info",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,o]=t.useState(!1);function i(){var e;o((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",i),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",i)}},[]),b.jsx(b.Fragment,{children:r&&b.jsx(le,{title:"Ir para o início da tela",visible:i,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),o(!1)},className:"pulsate-bck",center:n,children:b.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const o=r.disabled||!e;return b.jsx(Le,{disabled:o,children:b.jsxs("label",{children:[b.jsx(i.Input,{type:"checkbox",disabled:o,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),n]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),b.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:b.jsxs("div",{ref:e,className:"update-box",children:[b.jsx("div",{className:"update-line"}),b.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[o,i]=t.useState(!1);return t.useEffect(()=>()=>{ue&&clearTimeout(ue)},[]),b.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),b.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),i(!0),ue=setTimeout(()=>i(!1),r)},children:o?b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:o}){return b.jsx(I,{type:A,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:o,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:o,minHeight:i=40,...a}){return b.jsxs("div",{className:"di-box "+(o||""),...a,style:{minHeight:i},children:[e&&b.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?b.jsx("input",{className:"form-control",value:r,readOnly:!0}):b.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=M,e.DynamicCounter=function({valor:e=0,time:r=25,format:o,currency:i}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let o=r+n;return o>e&&(o=e),o===e&&clearInterval(t),o})},r);return()=>clearInterval(t)},[e,r]),o?n.formatValor(a,i?2:0,Boolean(i)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:o="8px",...i}){return b.jsx(Wr,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":o},sizeBreak:n,...i,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...o}){return b.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...o,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:o="",classNameCol:i="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),b.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[b.jsx("label",{className:`form-desk-label ${o}`,children:t}),b.jsx("div",{className:i,"data-is-line-short":String(n),children:e}),a&&b.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:o=1200,goBack:i,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),b.jsx("div",{className:"mx-auto",style:{maxWidth:o},children:b.jsx(ge,{title:e,count:n,codigo:r,goBack:i,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return b.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,o;if("Enter"===e.key){const i=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==n?void 0:n.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===i&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,o;-1!==e.indexOf("T")?(r=e.split("T"),o=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(o=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),o&&t&&(r=r+" "+o),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>b.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ve(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return b.jsxs("div",{className:`group-box--container ${t}`,children:[b.jsx("div",{className:"group-box--label",children:e}),b.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return b.jsxs("div",{className:"hint--container",children:[b.jsx("i",{className:"fas fa-question"}),b.jsxs("div",{className:"hint-content",children:[b.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=de,e.IconExitOutline=function(e){return b.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=pe,e.IconUserGear=function(e){return b.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>b.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>b.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>b.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=K,e.IconeEmail=()=>b.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>b.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=X,e.IconeFechar=Z,e.IconeFecharCircle=()=>b.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=Q,e.IconeIncluir=Y,e.IconeLogin=()=>b.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=G,e.IconeMostrarSenha=({display:e})=>b.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=ee,e.IconePassword=()=>b.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>b.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>b.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=te,e.IconeSalvar=()=>b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>b.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>b.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>b.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=J,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return b.jsx(vn,{onClick:n,...t});case"cnpj":return b.jsx(cn,{onClick:n,...t});case"codigo":return b.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return b.jsx(qe,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return b.jsx(bn,{onClick:n,...t});case"hora":return b.jsx(gn,{onClick:n,...t});case"percent":return b.jsx(fn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return b.jsx(hn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return b.jsx(pn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return b.jsx(_n,{onClick:n,...t});default:return b.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return b.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:o,autoFocus:i,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const o=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!o.erro&&e&&n&&n({...e,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf}),l(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:s,message:"Buscando CEP..."}),b.jsxs("div",{className:"input-group",children:[b.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:o,autoFocus:i}),b.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:o,children:b.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:o})=>b.jsx(jn,{children:b.jsxs(wn,{disabled:e,onClick:function(){if(!e&&o){o({target:{name:n,checked:!r}})}},children:[b.jsxs("span",{children:[r&&b.jsx(z,{color:e&&"silver"}),!r&&b.jsx($,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=cn,e.InputCodigo=mn,e.InputColor=ne,e.InputCpf=vn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...o}){return b.jsx(ln,{className:`form-control ${Ye(t)?"is-invalid":""} ${r||""}`,mask:un,onAccept:function(t,r,o){o&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...o})},e.InputEstado=bn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...r,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:t,children:b.jsx(q,{})})]}),e.InputFone=qe,e.InputHora=gn,e.InputOff=function({campo:e,dados:n,setDados:r,type:o,className:i,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,p]=t.useState(!1),h="password"==o;return t.useEffect(()=>{p(!1)},[a]),b.jsxs("div",{className:"input-off",children:[b.jsx("input",{className:`form-control ${i} ${h&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==o&&b.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||p(!d)},children:d?b.jsx("i",{className:"fa-solid fa-eye-slash"}):b.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[o,i]=t.useState(!1);return b.jsxs(Cn,{disabled:e,children:[b.jsx("input",{type:o?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),b.jsx("i",{className:o?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||i(!o)},title:e?"":(o?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=fn,e.InputPesquisa=Ae,e.InputQRCode=function({value:e,setValue:n}){const[r,o]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),b.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:b.jsx(W,{})}),b.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:b.jsx(te,{})}),e?b.jsx(ye,{className:"btn btn-info",title:"Abrir o link do documento",to:e,children:b.jsx(ee,{})}):b.jsx(i.Button,{color:"info",disabled:!0,children:b.jsx(ee,{})})]}),r&&b.jsx(Pe,{setVisible:o,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=hn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...o})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...o,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>b.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),b.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:r,children:b.jsx(q,{})})]}),e.InputValor=pn,e.LabelHint=function({label:e,hint:t}){return b.jsxs("div",{className:"label-hint--container",children:[b.jsx("label",{children:e}),b.jsx("div",{className:"label-hint--icon",children:b.jsx("i",{className:"fas fa-question"})}),b.jsxs("div",{className:"label-hint--box",children:[b.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:o,useTheme:i,testDomain:a})=>{const s="boolean"==typeof i&&i,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(w);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=ro("sys/reportType",0),[p,h]=t.useState([]),[f,m]=t.useState(!1),g=e=>{let t=p.find(t=>t.modalId===e);t&&t.setVisible(!1),h(t=>t.filter(t=>t.modalId!==e))},v=t.useCallback(e=>{"Escape"===e.key&&0!=p.length&&g(p[p.length-1].modalId)},[p]);_();const x=C(a);return t.useEffect(()=>{s&&(localStorage.setItem(w,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",v,!1),()=>window.removeEventListener("keydown",v,!1)),[p]),b.jsxs(j.Provider,{value:{versionApp:o,addModal:(e,t)=>{h(n=>{let r=[...n],o=r.findIndex(t=>t.modalId===e);return o>=0?r[o]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:g,clearModals:()=>{p.forEach(e=>{g(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[x,r]})},e.LinkToEmail=xe,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let o="+";return(null==r?void 0:r.startsWith("+"))||(o="+55"),o+=r.replace(/\D/g,""),b.jsx("a",{href:`tel:${o}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),b.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=ye,e.LinkToWhatsApp=be,e.Loading=Ue,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:o}){if(!r)return null;let[,i]=t.split("."),[a,s]=n.split(".");return s!=i&&(n=[a,i].join(".")),b.jsx(Ne,{url:e,file:t,fileTo:n,setLoading:o})},e.Modal=Fe,e.ModalBody=De,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:o,alignTop:i,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?b.jsxs(Fe,{alignTop:i,setVisible:t,visible:e,...u,children:[b.jsxs(Re,{helpLink:s,setVisible:t,children:[r,null!=l&&b.jsxs(b.Fragment,{children:[" ",b.jsx(fe,{value:l,isCount:!0})]}),b.jsx(fe,{value:n})]}),b.jsx(Oe,{children:b.jsx(De,{style:{paddingBottom:a},children:o})})]}):null},e.ModalContent=Oe,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:o,alignTop:a,helpLink:s}){return b.jsxs(Fe,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[b.jsx(Re,{helpLink:s,setVisible:t,children:e}),b.jsx(Oe,{children:b.jsxs(De,{className:"mod-filter--container",children:[o,b.jsxs("div",{className:"mod-filter--btn-area",children:[b.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[b.jsx(U,{})," Aplicar filtros"]}),b.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[b.jsx(Z,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return b.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Re,e.Navbar=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),p=t.useRef(),{theme:h,setTheme:f,canChangeTheme:m}=S(),[g,v]=t.useState(!1),[x,y]=t.useState(""),[k,_]=t.useState([]),[C,j]=t.useState([]);let w=[];const E=localStorage.getItem(co);E&&(w=JSON.parse(E));const[N]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):j(e.data)}}),[A]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function T(){v(!1)}function I(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(co,JSON.stringify(n)),_(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),_(t),I(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(A({data:r}),j(r))}function O(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&N()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),_(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(x.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(x.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),x&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[x,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar--area",children:b.jsxs("div",{className:"navbar-content",children:[b.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?b.jsx(de,{width:20,height:20}):b.jsx(pe,{width:20,height:20})}),b.jsxs("div",{className:"content",children:[b.jsx(a.Link,{to:i.home,className:"brand",onClick:T,title:"Voltar para tela inicial",children:e}),b.jsxs("div",{className:"company",children:[b.jsx("div",{className:"name",children:r}),b.jsxs("div",{className:"doc",children:[b.jsxs("span",{children:[null==s?void 0:s.title," "]}),b.jsx("strong",{children:null==s?void 0:s.name})]})]}),b.jsxs("div",{className:"nav-btn-area",children:[b.jsx("div",{className:"btn-theme",children:m&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&b.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:b.jsx(Q,{})}),b.jsxs("div",{className:"btn-atalho",children:[b.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&b.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&T()},children:b.jsxs("div",{className:"menu-content",children:[b.jsxs("div",{className:"search-area",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:d,placeholder:"Pesquisar...",value:x,onChange:e=>y(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),x&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>y(""),children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"navbar--menu-area",ref:p,children:k.map((e,t)=>b.jsx(uo,{opc:e,closeMenu:T,clickGroup:I,clickFavorite:D,isFavorite:O,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"menu-footer",children:b.jsx(a.Link,{to:i.exit,onClick:T,children:b.jsxs("div",{className:"user",children:[b.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),b.jsxs("span",{className:"sair",children:["Sair ",b.jsx(G,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:p,setTheme:h,canChangeTheme:f}=S(),[m,g]=t.useState(!1),[v,x]=t.useState(""),[y,k]=t.useState([]),[_,C]=t.useState([]);let j=[];const w=localStorage.getItem(fo);w&&(j=JSON.parse(w));const[E]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):C(e.data)}}),[N]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function A(){g(!1)}function T(e){let t=[...y],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(fo,JSON.stringify(n)),k(t)}function I(e){let t=[...y];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),T(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=_.filter(e=>e.route!==t.route);var r;n.length===_.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(N({data:r}),C(r))}function D(e){return _.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==_||_.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!j.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[v,_]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar-mu-area",children:b.jsxs("div",{className:"mu--container",children:[b.jsx(ho,{isOpen:m,setIsOpen:g}),b.jsxs("div",{className:"mu--content",children:[b.jsx(po,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i}),b.jsxs("div",{className:"mu--info",children:[b.jsx("div",{className:"info-line-1",children:r}),b.jsx("div",{className:"info-line-2",children:b.jsxs("span",{children:[null==s?void 0:s.title," ",b.jsx("strong",{children:null==s?void 0:s.name})]})})]}),b.jsxs("div",{className:"mu--buttons",children:[f&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";h(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),b.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),b.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&A()},children:b.jsxs("div",{className:"nv-menu--content","data-open":m,children:[b.jsxs("div",{className:"nv-menu--brand",children:[b.jsx(ho,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),b.jsx(po,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i,showButtonClose:!0})]}),b.jsxs("div",{className:"nv-menu--search",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of y)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;x(""),null==(e=null==u?void 0:u.current)||e.focus()},children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>I(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>I(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"nv-menu--opcoes",ref:c,children:y.map((e,t)=>b.jsx(uo,{opc:e,closeMenu:A,clickGroup:T,clickFavorite:F,isFavorite:D,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"nv-menu--footer",children:b.jsx(a.Link,{to:i.exit,onClick:A,children:b.jsxs("div",{className:"foo-user",children:[b.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),b.jsxs("span",{className:"foo-sair",children:["Sair ",b.jsx(G,{})]})]})})}),b.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:o=16,limit:i=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(o)||e.push(o),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==i&&void 0!==o;function c(t){var o;t!==n&&t>=1&&t<=e&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(t))}return b.jsx("div",{className:"pgn-content","data-fixed":i>=30?"true":"false","data-align":s,children:b.jsxs("div",{className:"pgn-comps",children:[u&&b.jsxs("div",{className:"pgn-limit",children:[b.jsx("strong",{children:"Registros:"}),b.jsx("select",{className:"form-select form-select-sm",value:i,onChange:e=>a(Number(e.target.value)),children:l.map(e=>b.jsx("option",{value:e,children:e},e))})]}),b.jsxs("div",{className:"pgn-pages",children:[b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-double-left"})}),b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-left"})}),b.jsx("span",{className:"p-2 text-body",children:b.jsxs("div",{children:[b.jsx("span",{className:"fw-bold",children:n}),e?b.jsxs("span",{children:[" / ",e]}):null]})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-right"})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=ge,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:o,children:i,marginBottom:a=0,degrade:s=!1,...l}){return b.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:o,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":s?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":s?"0px":"6px"},...l,children:[s&&b.jsx("div",{className:"pd-top"}),b.jsxs("div",{className:"pd-body",children:[e&&b.jsx("h3",{className:"pd-title",children:e}),i]})]})},e.PanelHeader=he,e.PrintButtons=function({onClose:e,showTypes:n}){const{reportType:r,setReportType:o}=S(),i=[{title:"PDF",icon:b.jsx("i",{className:"fa-solid fa-file-pdf"}),onClick(){o(0)}},{title:"Excel",icon:b.jsx("i",{className:"fa-solid fa-file-excel"}),onClick(){o(1)}},{title:"Word",icon:b.jsx("i",{className:"fa-solid fa-file-word"}),onClick(){o(2)}},{title:"Texto",icon:b.jsx("i",{className:"fa-regular fa-file-lines"}),onClick(){o(3)}}];return t.useEffect(()=>{n||o(0)},[]),b.jsxs("div",{className:"print-btn--container",children:[n&&b.jsx(M,{items:i,title:"Formato do relatório",direction:"down",children:b.jsxs("span",{className:"d-flex align-items-center gap-1",children:[b.jsxs("span",{children:["Formato",b.jsx("span",{className:"d-inline-block d-sm-none",children:" do relatório:"})]}),b.jsx("span",{className:"me-1",children:["PDF","Excel","Word","Texto"][r]}),b.jsx("i",{className:"fa-solid fa-chevron-down ms-auto fs-7"})]})}),b.jsxs("div",{className:"print-btn--buttons",children:[b.jsxs("button",{className:"btn btn-primary",type:"submit",children:[b.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),b.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[b.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=Pe,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:o,options:a=[],disabled:s,cols:l=1}){return b.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[b.jsx("div",{className:"group-radio--label",children:t}),b.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>b.jsxs("label",{children:[b.jsx(i.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>o(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return b.jsx(Hr,{hasMaxWidth:t,children:b.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:o="",innerRef:i,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...Gr,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?Kr(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let o=n-1;o>=0;o-=1){const t=e[o];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||Kr(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),p=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),h=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?Kr(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(i,()=>({open(e){const t=h(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,h]),b.jsx(Yr.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:h,selectTab:d,toggleTab:p},children:b.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[b.jsx(Jr,{isMultine:n}),b.jsx("div",{className:`tab-control--content ${o}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:o,isVisible:i=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=Xr(),p=t.useMemo(()=>e||n.random(999999),[]),h=l(p);return t.useEffect(()=>()=>c(p),[]),t.useEffect(()=>{d({id:p,caption:o,title:r,isVisible:i})},[d,r,o,i]),i?b.jsxs(Zr,{open:(null==h?void 0:h.isOpen)&&(null==h?void 0:h.isVisible),"data-in-tab-sheet":null!=h?"true":"false",...s,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>u(p),children:[r," ",b.jsx("i",{className:"fas fa-chevron-down"})]})}),b.jsx("div",{className:`bi-body ${(null==h?void 0:h.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:o,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:p,onClick:h,fixedHeader:f,clickCanEdit:m,loading:g}){var v,x;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let y=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(x=null==r?void 0:r.acoes)?void 0:x.filter(e=>e.ativa??!0);r.acoes=e,y=r.acoes.length>0}function _(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?b.jsxs("div",{className:"py-2 hstack gap-2",children:[b.jsx(i.Spinner,{size:"sm",color:"info"})," ",b.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?b.jsx(O,{children:b.jsxs(R,{alignTop:s,sizeBreak:c,hasBorder:u,children:[b.jsx(L,{fixedHeader:f,colunas:t,incColActions:y}),b.jsx(V,{colunas:t,acoes:r,dados:a,opcoes:o,colorir:l,getLineColor:p,onClick:h||m?function(e,t){if(h){if(_(null==t?void 0:t.currentTarget))return;h(e,t)}else if(m&&n.isDesktop()){if(_(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):b.jsx("div",{className:"alert alert-warning mb-0",children:d})},e.TextHtml=function({value:e}){let t=e;return e&&"string"==typeof e&&(t=e.replaceAll("\n","<br/>")),b.jsx("span",{dangerouslySetInnerHTML:{__html:Ur.sanitize(t)}})},e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:o,toRight:i,className:a="",...s}){return b.jsx(qr,{checked:t,disabled:n,className:a,...s,children:b.jsxs("label",{style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start"},children:[b.jsx("div",{className:"form-switch",children:b.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),o&&b.jsx("span",{className:"title",children:o})]})})},e.cache=io,e.createApiConfig=function(e=D){const t={...D,...e};return t.auth={...D.auth,...e.auth},t},e.createDropdownItems=ce,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=P,e.getDataCol=B,e.setRouteMain=function(e){me=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Se,e.useLibContext=S,e.useLocalForage=function(e,n,r=1){const[o,i]=t.useState(n);return t.useEffect(()=>{no.getItem(e).then(t=>{t&&(t.versao==r?i(t.data):no.removeItem(e))})},[]),t.useEffect(()=>{no.setItem(e,{versao:r,data:o})},[o]),[o,i]},e.useLocalStorage=ro,e.useLocalhostBadge=_,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,o]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,o]},e.useTestDomainBadge=C,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
971
|
+
`;function co({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i}){var a;const{versionApp:s}=S();if((null==(a=e.menus)?void 0:a.length)>0)return b.jsxs(b.Fragment,{children:[b.jsxs(so,{onClick:()=>n(e),isOpen:e.open,children:[b.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:e.caption}),b.jsx("span",{className:"icon",children:b.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),b.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,a)=>b.jsx(co,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i},a))})]});if(e.route){let n=o(e.route),a=null==e?void 0:e.version;return a&&(a=Boolean(s.substring(0,a.length)===a)),b.jsxs(lo,{to:e.route,onClick:t,children:[b.jsx("span",{className:"menu-icon",children:e.icon}),b.jsx("span",{className:"menu-caption",children:e.caption}),b.jsxs("span",{className:"menu-fav-new",children:[a&&b.jsx("span",{className:"menu-new",children:"novo"}),i&&b.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:b.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?b.jsx(uo,{}):null}const po="sys/nav/closed";const ho=({routes:e,closeMenu:t,brand:n})=>b.jsx("div",{className:"navbar-mu--brand",children:b.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function fo({isOpen:e,setIsOpen:t,menuClose:n}){return b.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?b.jsx("i",{className:"fa-solid fa-xmark icon-close"}):b.jsxs("div",{className:"icon-desk",children:[b.jsx("span",{}),b.jsx("span",{}),b.jsx("span",{})]})})}const mo="sys/nav/closed";e.Alerta=F,e.Aviso=function({onConfirm:e,text:t="",children:n}){return b.jsx(I,{type:N,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return b.jsx(i.Button,{size:"sm",color:"warning",title:e,children:b.jsx(H,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return b.jsx(i.Button,{size:"sm",color:"primary",title:e,children:b.jsx(K,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return b.jsx(i.Button,{size:"sm",color:"danger",title:e,children:b.jsx(X,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return b.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:t,...n,children:[b.jsx(Y,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:o,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return b.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(o),children:[b.jsxs(i.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:s&&1==s,children:[b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),b.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[b.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return b.jsxs("div",{className:"box-color--container",children:[b.jsx(ne,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),b.jsx(ne,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),b.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&i&&i(e,u)},[u]),o?b.jsxs(re,{open:u,noMargin:a,...l,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",b.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),b.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=kn,e.ButtonBack=se,e.ButtonClose=ie,e.ButtonHelp=ae,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return b.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>b.jsx(i.Button,{active:r===e,color:"outline-info",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,o]=t.useState(!1);function i(){var e;o((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",i),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",i)}},[]),b.jsx(b.Fragment,{children:r&&b.jsx(le,{title:"Ir para o início da tela",visible:i,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),o(!1)},className:"pulsate-bck",center:n,children:b.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const o=r.disabled||!e;return b.jsx(Le,{disabled:o,children:b.jsxs("label",{children:[b.jsx(i.Input,{type:"checkbox",disabled:o,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),n]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),b.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:b.jsxs("div",{ref:e,className:"update-box",children:[b.jsx("div",{className:"update-line"}),b.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[o,i]=t.useState(!1);return t.useEffect(()=>()=>{ue&&clearTimeout(ue)},[]),b.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),b.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),i(!0),ue=setTimeout(()=>i(!1),r)},children:o?b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:o}){return b.jsx(I,{type:A,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:o,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:o,minHeight:i=40,...a}){return b.jsxs("div",{className:"di-box "+(o||""),...a,style:{minHeight:i},children:[e&&b.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?b.jsx("input",{className:"form-control",value:r,readOnly:!0}):b.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=M,e.DynamicCounter=function({valor:e=0,time:r=25,format:o,currency:i}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let o=r+n;return o>e&&(o=e),o===e&&clearInterval(t),o})},r);return()=>clearInterval(t)},[e,r]),o?n.formatValor(a,i?2:0,Boolean(i)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:o="8px",...i}){return b.jsx(Gr,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":o},sizeBreak:n,...i,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...o}){return b.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...o,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:o="",classNameCol:i="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),b.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[b.jsx("label",{className:`form-desk-label ${o}`,children:t}),b.jsx("div",{className:i,"data-is-line-short":String(n),children:e}),a&&b.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:o=1200,goBack:i,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),b.jsx("div",{className:"mx-auto",style:{maxWidth:o},children:b.jsx(ge,{title:e,count:n,codigo:r,goBack:i,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return b.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,o;if("Enter"===e.key){const i=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==n?void 0:n.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===i&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,o;-1!==e.indexOf("T")?(r=e.split("T"),o=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(o=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),o&&t&&(r=r+" "+o),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>b.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ve(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return b.jsxs("div",{className:`group-box--container ${t}`,children:[b.jsx("div",{className:"group-box--label",children:e}),b.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return b.jsxs("div",{className:"hint--container",children:[b.jsx("i",{className:"fas fa-question"}),b.jsxs("div",{className:"hint-content",children:[b.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=de,e.IconExitOutline=function(e){return b.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=pe,e.IconUserGear=function(e){return b.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>b.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>b.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>b.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=K,e.IconeEmail=()=>b.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>b.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=X,e.IconeFechar=Z,e.IconeFecharCircle=()=>b.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=Q,e.IconeIncluir=Y,e.IconeLogin=()=>b.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=G,e.IconeMostrarSenha=({display:e})=>b.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=ee,e.IconePassword=()=>b.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>b.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>b.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=te,e.IconeSalvar=()=>b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>b.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>b.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>b.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=J,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return b.jsx(vn,{onClick:n,...t});case"cnpj":return b.jsx(cn,{onClick:n,...t});case"codigo":return b.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return b.jsx(qe,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return b.jsx(bn,{onClick:n,...t});case"hora":return b.jsx(gn,{onClick:n,...t});case"percent":return b.jsx(fn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return b.jsx(hn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return b.jsx(pn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return b.jsx(_n,{onClick:n,...t});default:return b.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return b.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:o,autoFocus:i,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const o=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!o.erro&&e&&n&&n({...e,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf}),l(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:s,message:"Buscando CEP..."}),b.jsxs("div",{className:"input-group",children:[b.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:o,autoFocus:i}),b.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:o,children:b.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:o})=>b.jsx(jn,{children:b.jsxs(wn,{disabled:e,onClick:function(){if(!e&&o){o({target:{name:n,checked:!r}})}},children:[b.jsxs("span",{children:[r&&b.jsx(z,{color:e&&"silver"}),!r&&b.jsx($,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=cn,e.InputCodigo=mn,e.InputColor=ne,e.InputCpf=vn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...o}){return b.jsx(ln,{className:`form-control ${Ye(t)?"is-invalid":""} ${r||""}`,mask:un,onAccept:function(t,r,o){o&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...o})},e.InputEstado=bn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...r,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:t,children:b.jsx(q,{})})]}),e.InputFone=qe,e.InputHora=gn,e.InputOff=function({campo:e,dados:n,setDados:r,type:o,className:i,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,p]=t.useState(!1),h="password"==o;return t.useEffect(()=>{p(!1)},[a]),b.jsxs("div",{className:"input-off",children:[b.jsx("input",{className:`form-control ${i} ${h&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==o&&b.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||p(!d)},children:d?b.jsx("i",{className:"fa-solid fa-eye-slash"}):b.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[o,i]=t.useState(!1);return b.jsxs(Cn,{disabled:e,children:[b.jsx("input",{type:o?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),b.jsx("i",{className:o?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||i(!o)},title:e?"":(o?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=fn,e.InputPesquisa=Ae,e.InputQRCode=function({value:e,setValue:n}){const[r,o]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),b.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:b.jsx(W,{})}),b.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:b.jsx(te,{})}),e?b.jsx(ye,{className:"btn btn-info",title:"Abrir o link do documento",to:e,children:b.jsx(ee,{})}):b.jsx(i.Button,{color:"info",disabled:!0,children:b.jsx(ee,{})})]}),r&&b.jsx(Pe,{setVisible:o,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=hn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...o})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...o,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>b.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),b.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:r,children:b.jsx(q,{})})]}),e.InputValor=pn,e.LabelHint=function({label:e,hint:t}){return b.jsxs("div",{className:"label-hint--container",children:[b.jsx("label",{children:e}),b.jsx("div",{className:"label-hint--icon",children:b.jsx("i",{className:"fas fa-question"})}),b.jsxs("div",{className:"label-hint--box",children:[b.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:o,useTheme:i,testDomain:a})=>{const s="boolean"==typeof i&&i,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(w);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=oo("sys/reportType",0),[p,h]=t.useState([]),[f,m]=t.useState(!1),g=e=>{let t=p.find(t=>t.modalId===e);t&&t.setVisible(!1),h(t=>t.filter(t=>t.modalId!==e))},v=t.useCallback(e=>{"Escape"===e.key&&0!=p.length&&g(p[p.length-1].modalId)},[p]);_();const x=C(a);return t.useEffect(()=>{s&&(localStorage.setItem(w,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",v,!1),()=>window.removeEventListener("keydown",v,!1)),[p]),b.jsxs(j.Provider,{value:{versionApp:o,addModal:(e,t)=>{h(n=>{let r=[...n],o=r.findIndex(t=>t.modalId===e);return o>=0?r[o]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:g,clearModals:()=>{p.forEach(e=>{g(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[x,r]})},e.LinkToEmail=xe,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let o="+";return(null==r?void 0:r.startsWith("+"))||(o="+55"),o+=r.replace(/\D/g,""),b.jsx("a",{href:`tel:${o}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),b.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=ye,e.LinkToWhatsApp=be,e.Loading=Ue,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:o}){if(!r)return null;let[,i]=t.split("."),[a,s]=n.split(".");return s!=i&&(n=[a,i].join(".")),b.jsx(Ne,{url:e,file:t,fileTo:n,setLoading:o})},e.Modal=Fe,e.ModalBody=De,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:o,alignTop:i,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?b.jsxs(Fe,{alignTop:i,setVisible:t,visible:e,...u,children:[b.jsxs(Re,{helpLink:s,setVisible:t,children:[r,null!=l&&b.jsxs(b.Fragment,{children:[" ",b.jsx(fe,{value:l,isCount:!0})]}),b.jsx(fe,{value:n})]}),b.jsx(Oe,{children:b.jsx(De,{style:{paddingBottom:a},children:o})})]}):null},e.ModalContent=Oe,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:o,alignTop:a,helpLink:s}){return b.jsxs(Fe,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[b.jsx(Re,{helpLink:s,setVisible:t,children:e}),b.jsx(Oe,{children:b.jsxs(De,{className:"mod-filter--container",children:[o,b.jsxs("div",{className:"mod-filter--btn-area",children:[b.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[b.jsx(U,{})," Aplicar filtros"]}),b.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[b.jsx(Z,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return b.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Re,e.Navbar=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),p=t.useRef(),{theme:h,setTheme:f,canChangeTheme:m}=S(),[g,v]=t.useState(!1),[x,y]=t.useState(""),[k,_]=t.useState([]),[C,j]=t.useState([]);let w=[];const E=localStorage.getItem(po);E&&(w=JSON.parse(E));const[N]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):j(e.data)}}),[A]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function T(){v(!1)}function I(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(po,JSON.stringify(n)),_(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),_(t),I(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(A({data:r}),j(r))}function O(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&N()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),_(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(x.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(x.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),x&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[x,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar--area",children:b.jsxs("div",{className:"navbar-content",children:[b.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?b.jsx(de,{width:20,height:20}):b.jsx(pe,{width:20,height:20})}),b.jsxs("div",{className:"content",children:[b.jsx(a.Link,{to:i.home,className:"brand",onClick:T,title:"Voltar para tela inicial",children:e}),b.jsxs("div",{className:"company",children:[b.jsx("div",{className:"name",children:r}),b.jsxs("div",{className:"doc",children:[b.jsxs("span",{children:[null==s?void 0:s.title," "]}),b.jsx("strong",{children:null==s?void 0:s.name})]})]}),b.jsxs("div",{className:"nav-btn-area",children:[b.jsx("div",{className:"btn-theme",children:m&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&b.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:b.jsx(Q,{})}),b.jsxs("div",{className:"btn-atalho",children:[b.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&b.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&T()},children:b.jsxs("div",{className:"menu-content",children:[b.jsxs("div",{className:"search-area",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:d,placeholder:"Pesquisar...",value:x,onChange:e=>y(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),x&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>y(""),children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"navbar--menu-area",ref:p,children:k.map((e,t)=>b.jsx(co,{opc:e,closeMenu:T,clickGroup:I,clickFavorite:D,isFavorite:O,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"menu-footer",children:b.jsx(a.Link,{to:i.exit,onClick:T,children:b.jsxs("div",{className:"user",children:[b.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),b.jsxs("span",{className:"sair",children:["Sair ",b.jsx(G,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:p,setTheme:h,canChangeTheme:f}=S(),[m,g]=t.useState(!1),[v,x]=t.useState(""),[y,k]=t.useState([]),[_,C]=t.useState([]);let j=[];const w=localStorage.getItem(mo);w&&(j=JSON.parse(w));const[E]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):C(e.data)}}),[N]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function A(){g(!1)}function T(e){let t=[...y],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(mo,JSON.stringify(n)),k(t)}function I(e){let t=[...y];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),T(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=_.filter(e=>e.route!==t.route);var r;n.length===_.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(N({data:r}),C(r))}function D(e){return _.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==_||_.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!j.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[v,_]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar-mu-area",children:b.jsxs("div",{className:"mu--container",children:[b.jsx(fo,{isOpen:m,setIsOpen:g}),b.jsxs("div",{className:"mu--content",children:[b.jsx(ho,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i}),b.jsxs("div",{className:"mu--info",children:[b.jsx("div",{className:"info-line-1",children:r}),b.jsx("div",{className:"info-line-2",children:b.jsxs("span",{children:[null==s?void 0:s.title," ",b.jsx("strong",{children:null==s?void 0:s.name})]})})]}),b.jsxs("div",{className:"mu--buttons",children:[f&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";h(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),b.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),b.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&A()},children:b.jsxs("div",{className:"nv-menu--content","data-open":m,children:[b.jsxs("div",{className:"nv-menu--brand",children:[b.jsx(fo,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),b.jsx(ho,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i,showButtonClose:!0})]}),b.jsxs("div",{className:"nv-menu--search",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of y)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;x(""),null==(e=null==u?void 0:u.current)||e.focus()},children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>I(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>I(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"nv-menu--opcoes",ref:c,children:y.map((e,t)=>b.jsx(co,{opc:e,closeMenu:A,clickGroup:T,clickFavorite:F,isFavorite:D,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"nv-menu--footer",children:b.jsx(a.Link,{to:i.exit,onClick:A,children:b.jsxs("div",{className:"foo-user",children:[b.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),b.jsxs("span",{className:"foo-sair",children:["Sair ",b.jsx(G,{})]})]})})}),b.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:o=16,limit:i=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(o)||e.push(o),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==i&&void 0!==o;function c(t){var o;t!==n&&t>=1&&t<=e&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(t))}return b.jsx("div",{className:"pgn-content","data-fixed":i>=30?"true":"false","data-align":s,children:b.jsxs("div",{className:"pgn-comps",children:[u&&b.jsxs("div",{className:"pgn-limit",children:[b.jsx("strong",{children:"Registros:"}),b.jsx("select",{className:"form-select form-select-sm",value:i,onChange:e=>a(Number(e.target.value)),children:l.map(e=>b.jsx("option",{value:e,children:e},e))})]}),b.jsxs("div",{className:"pgn-pages",children:[b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-double-left"})}),b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-left"})}),b.jsx("span",{className:"p-2 text-body",children:b.jsxs("div",{children:[b.jsx("span",{className:"fw-bold",children:n}),e?b.jsxs("span",{children:[" / ",e]}):null]})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-right"})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=ge,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:o,children:i,marginBottom:a=0,degrade:s=!1,...l}){return b.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:o,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":s?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":s?"0px":"6px"},...l,children:[s&&b.jsx("div",{className:"pd-top"}),b.jsxs("div",{className:"pd-body",children:[e&&b.jsx("h3",{className:"pd-title",children:e}),i]})]})},e.PanelHeader=he,e.PrintButtons=function({onClose:e,showTypes:n}){const{reportType:r,setReportType:o}=S(),i=[{title:"PDF",icon:b.jsx("i",{className:"fa-solid fa-file-pdf"}),onClick(){o(0)}},{title:"Excel",icon:b.jsx("i",{className:"fa-solid fa-file-excel"}),onClick(){o(1)}},{title:"Word",icon:b.jsx("i",{className:"fa-solid fa-file-word"}),onClick(){o(2)}},{title:"Texto",icon:b.jsx("i",{className:"fa-regular fa-file-lines"}),onClick(){o(3)}}];return t.useEffect(()=>{n||o(0)},[]),b.jsxs("div",{className:"print-btn--container",children:[n&&b.jsx(M,{items:i,title:"Formato do relatório",direction:"down",children:b.jsxs("span",{className:"d-flex align-items-center gap-1",children:[b.jsxs("span",{children:["Formato",b.jsx("span",{className:"d-inline-block d-sm-none",children:" do relatório:"})]}),b.jsx("span",{className:"me-1",children:["PDF","Excel","Word","Texto"][r]}),b.jsx("i",{className:"fa-solid fa-chevron-down ms-auto fs-7"})]})}),b.jsxs("div",{className:"print-btn--buttons",children:[b.jsxs("button",{className:"btn btn-primary",type:"submit",children:[b.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),b.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[b.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=Pe,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:o,options:a=[],disabled:s,cols:l=1}){return b.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[b.jsx("div",{className:"group-radio--label",children:t}),b.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>b.jsxs("label",{children:[b.jsx(i.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>o(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return b.jsx(Wr,{hasMaxWidth:t,children:b.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:o="",innerRef:i,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...Yr,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?Xr(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let o=n-1;o>=0;o-=1){const t=e[o];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||Xr(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),p=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),h=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?Xr(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(i,()=>({open(e){const t=h(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,h]),b.jsx(Kr.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:h,selectTab:d,toggleTab:p},children:b.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[b.jsx(Zr,{isMultine:n}),b.jsx("div",{className:`tab-control--content ${o}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:o,isVisible:i=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=Jr(),p=t.useMemo(()=>e||n.random(999999),[]),h=l(p);return t.useEffect(()=>()=>c(p),[]),t.useEffect(()=>{d({id:p,caption:o,title:r,isVisible:i})},[d,r,o,i]),i?b.jsxs(Qr,{open:(null==h?void 0:h.isOpen)&&(null==h?void 0:h.isVisible),"data-in-tab-sheet":null!=h?"true":"false",...s,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>u(p),children:[r," ",b.jsx("i",{className:"fas fa-chevron-down"})]})}),b.jsx("div",{className:`bi-body ${(null==h?void 0:h.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:o,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:p,onClick:h,fixedHeader:f,clickCanEdit:m,loading:g}){var v,x;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let y=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(x=null==r?void 0:r.acoes)?void 0:x.filter(e=>e.ativa??!0);r.acoes=e,y=r.acoes.length>0}function _(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?b.jsxs("div",{className:"py-2 hstack gap-2",children:[b.jsx(i.Spinner,{size:"sm",color:"info"})," ",b.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?b.jsx(O,{children:b.jsxs(R,{alignTop:s,sizeBreak:c,hasBorder:u,children:[b.jsx(L,{fixedHeader:f,colunas:t,incColActions:y}),b.jsx(V,{colunas:t,acoes:r,dados:a,opcoes:o,colorir:l,getLineColor:p,onClick:h||m?function(e,t){if(h){if(_(null==t?void 0:t.currentTarget))return;h(e,t)}else if(m&&n.isDesktop()){if(_(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):b.jsx("div",{className:"alert alert-warning mb-0",children:d})},e.TextHtml=qr,e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:o,toRight:i,className:a="",...s}){return b.jsx(Hr,{checked:t,disabled:n,className:a,...s,children:b.jsxs("label",{style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start"},children:[b.jsx("div",{className:"form-switch",children:b.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),o&&b.jsx("span",{className:"title",children:o})]})})},e.cache=ao,e.createApiConfig=function(e=D){const t={...D,...e};return t.auth={...D.auth,...e.auth},t},e.createDropdownItems=ce,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=P,e.getDataCol=B,e.setRouteMain=function(e){me=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Se,e.useLibContext=S,e.useLocalForage=function(e,n,r=1){const[o,i]=t.useState(n);return t.useEffect(()=>{ro.getItem(e).then(t=>{t&&(t.versao==r?i(t.data):ro.removeItem(e))})},[]),t.useEffect(()=>{ro.setItem(e,{versao:r,data:o})},[o]),[o,i]},e.useLocalStorage=oo,e.useLocalhostBadge=_,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,o]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,o]},e.useTestDomainBadge=C,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
972
972
|
//# sourceMappingURL=jclib-ui.umd.js.map
|