jclib-ui 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("jcinfo-utils"),require("framer-motion"),require("styled-components"),require("reactstrap"),require("react-router-dom"),require("js-file-download"),require("axios"),require("react-qr-reader"),require("react-number-format")):"function"==typeof define&&define.amd?define(["exports","react","jcinfo-utils","framer-motion","styled-components","reactstrap","react-router-dom","js-file-download","axios","react-qr-reader","react-number-format"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JCLibUI={},e.React,e.JCInfoUtils,e.FramerMotion,e.styled,e.Reactstrap,e.ReactRouterDom,e.jcFileDownload,e.Axios,e.ReactQrReader,e.ReactNumberFormat)}(this,function(e,t,n,r,s,i,a,o,l,u,c){"use strict";var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,f={exports:{}},m={};var v,g={};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("jcinfo-utils"),require("framer-motion"),require("styled-components"),require("reactstrap"),require("react-router-dom"),require("js-file-download"),require("axios"),require("react-qr-reader"),require("react-number-format")):"function"==typeof define&&define.amd?define(["exports","react","jcinfo-utils","framer-motion","styled-components","reactstrap","react-router-dom","js-file-download","axios","react-qr-reader","react-number-format"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JCLibUI={},e.React,e.JCInfoUtils,e.FramerMotion,e.styled,e.Reactstrap,e.ReactRouterDom,e.jcFileDownload,e.Axios,e.ReactQrReader,e.ReactNumberFormat)}(this,function(e,t,n,r,o,i,a,s,l,u,c){"use strict";var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,f={exports:{}},m={};var g,v={};
2
2
  /**
3
3
  * @license React
4
4
  * react-jsx-runtime.development.js
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */"production"===process.env.NODE_ENV?f.exports=function(){if(p)return m;p=1;var e=t,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,r){var o,l={},u=null,c=null;for(o in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,o)&&!a.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===l[o]&&(l[o]=t[o]);return{$$typeof:n,type:e,key:u,ref:c,props:l,_owner:i.current}}return m.Fragment=r,m.jsx=o,m.jsxs=o,m}():f.exports=(v||(v=1,"production"!==process.env.NODE_ENV&&function(){var e,n=t,r=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=b.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var s=n.map(function(e){return String(e)});s.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,s)}("error",e,n)}function y(e){return e.displayName||"Context"}function k(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case s:return"Portal";case o:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case u:return y(e)+".Consumer";case l:return y(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var s=t.displayName||t.name||"";return""!==s?n+"("+s+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:k(e.type)||"Memo";case f:var n=e,r=n._payload,m=n._init;try{return k(m(r))}catch(v){return null}}return null}e=Symbol.for("react.module.reference");var j,C,_,w,S,E,N,I=Object.assign,A=0;function F(){}F.__reactDisabledLog=!0;var T,D=b.ReactCurrentDispatcher;function B(e,t,n){if(void 0===T)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);T=r&&r[1]||""}return"\n"+T+e}var O,R=!1,M="function"==typeof WeakMap?WeakMap:Map;function V(e,t){if(!e||R)return"";var n,r=O.get(e);if(void 0!==r)return r;R=!0;var s,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,s=D.current,D.current=null,function(){if(0===A){j=console.log,C=console.info,_=console.warn,w=console.error,S=console.group,E=console.groupCollapsed,N=console.groupEnd;var e={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(f){n=f}Reflect.construct(e,[],a)}else{try{a.call()}catch(f){n=f}e.call(a.prototype)}}else{try{throw Error()}catch(f){n=f}e()}}catch(m){if(m&&n&&"string"==typeof m.stack){for(var o=m.stack.split("\n"),l=n.stack.split("\n"),u=o.length-1,c=l.length-1;u>=1&&c>=0&&o[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(o[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||o[u]!==l[c]){var d="\n"+o[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&O.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{R=!1,D.current=s,function(){if(0===--A){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:j}),info:I({},e,{value:C}),warn:I({},e,{value:_}),error:I({},e,{value:w}),group:I({},e,{value:S}),groupCollapsed:I({},e,{value:E}),groupEnd:I({},e,{value:N})})}A<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var h=e?e.displayName||e.name:"",p=h?B(h):"";return"function"==typeof e&&O.set(e,p),p}function P(e,t,n){if(null==e)return"";if("function"==typeof e)return V(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return B(e);switch(e){case d:return B("Suspense");case h:return B("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return V(e.render,!1);case p:return P(e.type,t,n);case f:var s=e,i=s._payload,a=s._init;try{return P(a(i),t,n)}catch(o){}}return""}O=new M;var L=Object.prototype.hasOwnProperty,$={},z=b.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,n=P(e.type,e._source,t?t.type:null);z.setExtraStackFrame(n)}else z.setExtraStackFrame(null)}var q=Array.isArray;function W(e){return q(e)}function H(e){return""+e}function K(e){if(function(e){try{return H(e),!1}catch(t){return!0}}(e))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),H(e)}var G,Y,J=b.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n,s,i){var a,o={},l=null,u=null;for(a in void 0!==n&&(K(n),l=""+n),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(K(t.key),l=""+t.key),function(e){if(L.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e){"string"==typeof e.ref&&J.current}(t)),t)L.call(t,a)&&!X.hasOwnProperty(a)&&(o[a]=t[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===o[a]&&(o[a]=c[a])}if(l||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){G||(G=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,d),u&&function(e,t){var n=function(){Y||(Y=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(o,d)}return function(e,t,n,s,i,a,o){var l={$$typeof:r,type:e,key:t,ref:n,props:o,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,u,i,s,J.current,o)}var Q,ee=b.ReactCurrentOwner,te=b.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=P(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function se(){if(ee.current){var e=k(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=se();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ie[n]){ie[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+k(e._owner.type)+"."),ne(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function oe(e,t){if("object"==typeof e)if(W(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ae(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var s=function(e){if(null===e||"object"!=typeof e)return null;var t=v&&e[v]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof s&&s!==e.entries)for(var i,a=s.call(e);!(i=a.next()).done;)re(i.value)&&ae(i.value,t)}}function le(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=k(n);!function(e,t,n,r,s){var i=Function.call.bind(L);for(var a in e)if(i(e,a)){var o=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}o=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){o=u}!o||o instanceof Error||(U(s),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof o),U(null)),o instanceof Error&&!(o.message in $)&&($[o.message]=!0,U(s),x("Failed %s type: %s",n,o.message),U(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Q||(Q=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ue={};function ce(t,n,s,v,g,b){var y=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===o||t===a||t===d||t===h||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===l||t.$$typeof===u||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)}(t);if(!y){var j,C="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C+=se(),null===t?j="null":W(t)?j="array":void 0!==t&&t.$$typeof===r?(j="<"+(k(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):j=typeof t,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,C)}var _=Z(t,n,s,g,b);if(null==_)return _;if(y){var w=n.children;if(void 0!==w)if(v)if(W(w)){for(var S=0;S<w.length;S++)oe(w[S],t);Object.freeze&&Object.freeze(w)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else oe(w,t)}if(L.call(n,"key")){var E=k(t),N=Object.keys(n).filter(function(e){return"key"!==e}),I=N.length>0?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}";ue[E+I]||(x('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',I,E,N.length>0?"{"+N.join(": ..., ")+": ...}":"{}",E),ue[E+I]=!0)}return t===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(_):le(_),_}var de=function(e,t,n){return ce(e,t,n,!1)},he=function(e,t,n){return ce(e,t,n,!0)};g.Fragment=i,g.jsx=de,g.jsxs=he}()),g);var b=f.exports;const x=s.div`
10
+ */"production"===process.env.NODE_ENV?f.exports=function(){if(h)return m;h=1;var e=t,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,l={},u=null,c=null;for(s in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:u,ref:c,props:l,_owner:i.current}}return m.Fragment=r,m.jsx=s,m.jsxs=s,m}():f.exports=(g||(g=1,"production"!==process.env.NODE_ENV&&function(){var e,n=t,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=b.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map(function(e){return String(e)});o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}function y(e){return e.displayName||"Context"}function k(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case u:return y(e)+".Consumer";case l:return y(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:k(e.type)||"Memo";case f:var n=e,r=n._payload,m=n._init;try{return k(m(r))}catch(g){return null}}return null}e=Symbol.for("react.module.reference");var _,C,j,w,S,E,N,A=Object.assign,T=0;function I(){}I.__reactDisabledLog=!0;var F,D=b.ReactCurrentDispatcher;function O(e,t,n){if(void 0===F)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);F=r&&r[1]||""}return"\n"+F+e}var R,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function P(e,t){if(!e||M)return"";var n,r=R.get(e);if(void 0!==r)return r;M=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=D.current,D.current=null,function(){if(0===T){_=console.log,C=console.info,j=console.warn,w=console.error,S=console.group,E=console.groupCollapsed,N=console.groupEnd;var e={configurable:!0,enumerable:!0,value:I,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}T++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(f){n=f}Reflect.construct(e,[],a)}else{try{a.call()}catch(f){n=f}e.call(a.prototype)}}else{try{throw Error()}catch(f){n=f}e()}}catch(m){if(m&&n&&"string"==typeof m.stack){for(var s=m.stack.split("\n"),l=n.stack.split("\n"),u=s.length-1,c=l.length-1;u>=1&&c>=0&&s[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(s[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||s[u]!==l[c]){var d="\n"+s[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&R.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{M=!1,D.current=o,function(){if(0===--T){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:_}),info:A({},e,{value:C}),warn:A({},e,{value:j}),error:A({},e,{value:w}),group:A({},e,{value:S}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:N})})}T<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",h=p?O(p):"";return"function"==typeof e&&R.set(e,h),h}function L(e,t,n){if(null==e)return"";if("function"==typeof e)return P(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return O(e);switch(e){case d:return O("Suspense");case p:return O("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return P(e.render,!1);case h:return L(e.type,t,n);case f:var o=e,i=o._payload,a=o._init;try{return L(a(i),t,n)}catch(s){}}return""}R=new B;var V=Object.prototype.hasOwnProperty,z={},$=b.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);$.setExtraStackFrame(n)}else $.setExtraStackFrame(null)}var q=Array.isArray;function H(e){return q(e)}function W(e){return""+e}function G(e){if(function(e){try{return W(e),!1}catch(t){return!0}}(e))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),W(e)}var Y,K,X=b.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n,o,i){var a,s={},l=null,u=null;for(a in void 0!==n&&(G(n),l=""+n),function(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(G(t.key),l=""+t.key),function(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e){"string"==typeof e.ref&&X.current}(t)),t)V.call(t,a)&&!J.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===s[a]&&(s[a]=c[a])}if(l||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){Y||(Y=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(s,d),u&&function(e,t){var n=function(){K||(K=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(s,d)}return function(e,t,n,o,i,a,s){var l={$$typeof:r,type:e,key:t,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,u,i,o,X.current,s)}var Q,ee=b.ReactCurrentOwner,te=b.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function oe(){if(ee.current){var e=k(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ie={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=oe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ie[n]){ie[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+k(e._owner.type)+"."),ne(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function se(e,t){if("object"==typeof e)if(H(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ae(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)re(i.value)&&ae(i.value,t)}}function le(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==h)return;t=n.propTypes}if(t){var r=k(n);!function(e,t,n,r,o){var i=Function.call.bind(V);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){s=u}!s||s instanceof Error||(U(o),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),U(null)),s instanceof Error&&!(s.message in z)&&(z[s.message]=!0,U(o),x("Failed %s type: %s",n,s.message),U(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Q||(Q=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ue={};function ce(t,n,o,g,v,b){var y=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===s||t===a||t===d||t===p||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===h||t.$$typeof===l||t.$$typeof===u||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)}(t);if(!y){var _,C="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C+=oe(),null===t?_="null":H(t)?_="array":void 0!==t&&t.$$typeof===r?(_="<"+(k(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):_=typeof t,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,C)}var j=Z(t,n,o,v,b);if(null==j)return j;if(y){var w=n.children;if(void 0!==w)if(g)if(H(w)){for(var S=0;S<w.length;S++)se(w[S],t);Object.freeze&&Object.freeze(w)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else se(w,t)}if(V.call(n,"key")){var E=k(t),N=Object.keys(n).filter(function(e){return"key"!==e}),A=N.length>0?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}";ue[E+A]||(x('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',A,E,N.length>0?"{"+N.join(": ..., ")+": ...}":"{}",E),ue[E+A]=!0)}return t===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(j):le(j),j}var de=function(e,t,n){return ce(e,t,n,!1)},pe=function(e,t,n){return ce(e,t,n,!0)};v.Fragment=i,v.jsx=de,v.jsxs=pe}()),v);var b=f.exports;const x=o.div`
11
11
  position: fixed;
12
12
  top: 3px;
13
13
  left: 3px;
@@ -18,11 +18,11 @@
18
18
  border-radius: 99px;
19
19
  pointer-events: none;
20
20
  z-index: 9999999;
21
- `,y=" 🔴 ",k=" 🟢 ";function j(){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 _=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(_);if(!(null==e?void 0:e.addModal))throw new Error("'ModalProvider' não encontrado!");return e}const E=1,N=2,I=3,A="jc-alert-hide-sb";function F({type:e=N,onConfirm:s,onCancel:i,title:a,text:o="",children:l,defaultBtn:u=2}){const c=t.useRef(),d=t.useRef(),{addModal:h,removeModal:p}=S(),[f]=t.useState("alert-"+n.random()),m=r.useDragControls();let v="jc-erro";switch(e){case N:v="jc-aviso";break;case I:v="jc-conf"}const g=t.useCallback(t=>{e===I&&("KeyS"===t.code&&s&&s(),"KeyN"===t.code&&i&&i())},[i,s,e]);return t.useEffect(()=>(h(f,e===I?i:s),()=>p(f)),[]),t.useEffect(()=>{var e;null==(e=null==c?void 0:c.current)||e.focus()},[c]),t.useEffect(()=>(document.addEventListener("keydown",g,!1),document.body.classList.add(A),()=>{document.removeEventListener("keydown",g,!1),document.body.classList.remove(A)}),[g]),b.jsx(r.motion.div,{className:"jc-alert--container",ref:d,children:b.jsxs(r.motion.div,{className:"jc-alert "+v,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===I?i():s()},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===I&&b.jsx("i",{className:"fas fa-question"})]}),b.jsx("div",{className:"jc-alert-title",children:a})]}),b.jsx("div",{className:"jc-alert-body",children:o&&"string"==typeof o?b.jsx("span",{dangerouslySetInnerHTML:{__html:o.replaceAll("\n","<br/>")}}):b.jsx(b.Fragment,{children:o||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:s,children:"OK"}),e===I&&b.jsxs(b.Fragment,{children:[b.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:s,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 T({onConfirm:e,text:t="",children:n}){return b.jsx(F,{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:()=>"",setToken:e=>console.error("*** setToken() is not defined ***",e),afterRequest:e=>{}};const B=s.div`
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("span",{children:s.split("\n").map((e,n,r)=>b.jsxs(t.Fragment,{children:[e,n<r.length-1&&b.jsx("br",{})]},n))}):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:()=>"",setToken:e=>console.error("*** setToken() is not defined ***",e),afterRequest:e=>{}};const O=o.div`
22
22
  @media (max-width: 767px) {
23
23
  overflow-x: auto;
24
24
  }
25
- `,O=s.table`
25
+ `,R=o.table`
26
26
  --color-tb: var(--pn-color-border);
27
27
  --color-bg: var(--bs-body);
28
28
  --table-border: 1px solid var(--bs-border-color);
@@ -197,7 +197,7 @@
197
197
  }
198
198
  }
199
199
  }
200
- `;function R({title:e,items:n,size:r,children:s,direction:o="start",color:l,dados:u,...c}){const d=a.useHistory(),[h,p]=t.useState(!1);return b.jsxs(i.Dropdown,{isOpen:h,toggle:()=>{p(e=>!e)},direction:o,size:r,title:e,children:[b.jsxs(i.DropdownMenu,{className:"left-shadow",style:{backgroundColor:"var(--ddm-body-bg)"},children:[e&&b.jsxs(b.Fragment,{children:[b.jsx(i.DropdownItem,{header:!0,children:b.jsx("strong",{className:"fs-6 text-body",children:e})}),b.jsx(i.DropdownItem,{divider:!0})]}),n&&n.map((e,t)=>e.isLine?b.jsx(i.DropdownItem,{divider:!0},t):b.jsx(i.DropdownItem,{disabled:e.disabled,onClick:()=>{var t;(t=e).route?d.push(t.route,!0):t.onClick(u)},children:b.jsxs("div",{className:"dropdown-btn--opt-area","data-disabled":Boolean(e.disabled),children:[b.jsx("span",{children:e.icon}),b.jsx("div",{children:e.title})]})},t))]}),b.jsx(i.DropdownToggle,{color:l||"secondary",...c,size:r,children:s})]})}s.span`
200
+ `;function M({title:e,items:n,size:r,children:o,direction:s="start",color:l,dados:u,...c}){const d=a.useHistory(),[p,h]=t.useState(!1);return b.jsxs(i.Dropdown,{isOpen:p,toggle:()=>{h(e=>!e)},direction:s,size:r,title:e,children:[b.jsxs(i.DropdownMenu,{className:"left-shadow",style:{backgroundColor:"var(--ddm-body-bg)"},children:[e&&b.jsxs(b.Fragment,{children:[b.jsx(i.DropdownItem,{header:!0,children:b.jsx("strong",{className:"fs-6 text-body",children:e})}),b.jsx(i.DropdownItem,{divider:!0})]}),n&&n.map((e,t)=>e.isLine?b.jsx(i.DropdownItem,{divider:!0},t):b.jsx(i.DropdownItem,{disabled:e.disabled,onClick:()=>{var t;(t=e).route?d.push(t.route,!0):t.onClick(u)},children:b.jsxs("div",{className:"dropdown-btn--opt-area","data-disabled":Boolean(e.disabled),children:[b.jsx("span",{children:e.icon}),b.jsx("div",{children:e.title})]})},t))]}),b.jsx(i.DropdownToggle,{color:l||"secondary",...c,size:r,children:o})]})}o.span`
201
201
  display: inline-flex;
202
202
  align-items: center;
203
203
  justify-content: center;
@@ -209,7 +209,7 @@
209
209
  border-radius: 1px;
210
210
  color: ${e=>e.value?"#fff":""};
211
211
  background-color: ${e=>e.value?"#346fdd":"var(--bs-body-color"};
212
- `,e.hasTableLineClick=!1;function M(e,t){if("function"==typeof e.campo)return e.campo(t);if("string"==typeof e.campo){const r=t[e.campo];return e.campo2?b.jsxs("div",{className:"col-campo2",children:[b.jsx("div",{className:"fw-bold",children:r}),b.jsx("small",{className:"text-secondary",children:t[e.campo2]})]}):"date"==e.tipo?n.formatData(r):"datetime"==e.tipo?n.formatDataHora(r):"float"==e.tipo||"numeric"==e.tipo?n.formatValor(r,2,!1):"money"==e.tipo||"currency"==e.tipo||e.money?n.formatValor(r,2,!0):"boolean"==typeof r?b.jsx("input",{type:"checkbox",checked:r,readOnly:!0,className:"form-check-input",style:{marginTop:3,cursor:"default"}}):r}return null}const V=e=>{let t="left";return("float"===e.tipo||"currency"===e.tipo||e.money)&&(t="right"),e.campoChave&&(t="center"),e.align&&(t=e.align),t};function P({colunas:e,fixedHeader:t,incColActions:n=!0}){return e?b.jsx("thead",{className:t?"table-header--fixed":"",children:b.jsxs("tr",{children:[e.filter(e=>"color"!==e.campo).map((e,t)=>"boolean"!=typeof e.visible||e.visible?b.jsx("th",{className:(null==e?void 0:e.className)||"",style:{textAlign:V(e)},children:e.titulo},t):null),n&&b.jsx("th",{})]})}):null}function L({colunas:e,acoes:t,opcoes:n,dados:r,colorir:s,getLineColor:i,onClick:a}){var o;const l=(null==(o=null==t?void 0:t.acoes)?void 0:o.length)||"auto";function u(e,t){let n="var(--bs-body-color)";return s&&t.color?t.color:(i&&(n=i(t)||n),n)}if(!r||0==(null==r?void 0:r.length))return null;function c(e){e.preventDefault(),e.stopPropagation()}return b.jsx("tbody",{children:null==r?void 0:r.map((r,s)=>{var i;return b.jsxs("tr",{role:a?"button":"",onClick:e=>a&&a(r,e),children:[null==e?void 0:e.map((e,t)=>{if("boolean"==typeof e.visible&&!e.visible)return null;let n=e.campoChave?65:e.largura||"auto";return e.campoChave&&e.largura&&(n=e.largura),b.jsx("td",{className:e.className||"",style:{textAlign:V(e),fontWeight:e.campoChave||e.bold?"bold":"normal",color:u(0,r),width:n},onClick:t=>{(null==e?void 0:e.onClick)&&(t.stopPropagation(),e.onClick(r))},role:(null==e?void 0:e.onClick)?"button":"",children:b.jsxs("div",{children:[e.titulo&&b.jsxs("span",{className:"titulo",children:[e.tituloCard||e.titulo,": "]}),M(e,r)]})},t)}),t&&(null==(i=t.acoes)?void 0:i.length)>0&&b.jsx("td",{className:"acoes",style:{width:l},onClick:c,children:b.jsxs("div",{className:"acoes-layout",children:[null==t?void 0:t.acoes.map((e,n)=>b.jsx("span",{onClick:()=>{var n,i;(null==(i=null==(n=null==e?void 0:e.botao)?void 0:n.props)?void 0:i.disabled)||e.funcao(r[t.campo],r,s)},children:e.botao},n)),n&&b.jsx("span",{children:b.jsx(R,{items:n,size:"sm",title:"Opções",dados:r,children:b.jsx("i",{className:"fas fa-ellipsis-h"})})})]})})]},s)})})}s.div`
212
+ `,e.hasTableLineClick=!1;function B(e,t){if("function"==typeof e.campo)return e.campo(t);if("string"==typeof e.campo){const r=t[e.campo];return e.campo2?b.jsxs("div",{className:"col-campo2",children:[b.jsx("div",{className:"fw-bold",children:r}),b.jsx("small",{className:"text-secondary",children:t[e.campo2]})]}):"date"==e.tipo?n.formatData(r):"datetime"==e.tipo?n.formatDataHora(r):"float"==e.tipo||"numeric"==e.tipo?n.formatValor(r,2,!1):"money"==e.tipo||"currency"==e.tipo||e.money?n.formatValor(r,2,!0):"boolean"==typeof r?b.jsx("input",{type:"checkbox",checked:r,readOnly:!0,className:"form-check-input",style:{marginTop:3,cursor:"default"}}):r}return null}const P=e=>{let t="left";return("float"===e.tipo||"currency"===e.tipo||e.money)&&(t="right"),e.campoChave&&(t="center"),e.align&&(t=e.align),t};function L({colunas:e,fixedHeader:t,incColActions:n=!0}){return e?b.jsx("thead",{className:t?"table-header--fixed":"",children:b.jsxs("tr",{children:[e.filter(e=>"color"!==e.campo).map((e,t)=>"boolean"!=typeof e.visible||e.visible?b.jsx("th",{className:(null==e?void 0:e.className)||"",style:{textAlign:P(e)},children:e.titulo},t):null),n&&b.jsx("th",{})]})}):null}function V({colunas:e,acoes:t,opcoes:n,dados:r,colorir:o,getLineColor:i,onClick:a}){var s;const l=(null==(s=null==t?void 0:t.acoes)?void 0:s.length)||"auto";function u(e,t){let n="var(--bs-body-color)";return o&&t.color?t.color:(i&&(n=i(t)||n),n)}if(!r||0==(null==r?void 0:r.length))return null;function c(e){e.preventDefault(),e.stopPropagation()}return b.jsx("tbody",{children:null==r?void 0:r.map((r,o)=>{var i;return b.jsxs("tr",{role:a?"button":"",onClick:e=>a&&a(r,e),children:[null==e?void 0:e.map((e,t)=>{if("boolean"==typeof e.visible&&!e.visible)return null;let n=e.campoChave?65:e.largura||"auto";return e.campoChave&&e.largura&&(n=e.largura),b.jsx("td",{className:e.className||"",style:{textAlign:P(e),fontWeight:e.campoChave||e.bold?"bold":"normal",color:u(0,r),width:n},onClick:t=>{(null==e?void 0:e.onClick)&&(t.stopPropagation(),e.onClick(r))},role:(null==e?void 0:e.onClick)?"button":"",children:b.jsxs("div",{children:[e.titulo&&b.jsxs("span",{className:"titulo",children:[e.tituloCard||e.titulo,": "]}),B(e,r)]})},t)}),t&&(null==(i=t.acoes)?void 0:i.length)>0&&b.jsx("td",{className:"acoes",style:{width:l},onClick:c,children:b.jsxs("div",{className:"acoes-layout",children:[null==t?void 0:t.acoes.map((e,n)=>b.jsx("span",{onClick:()=>{var n,i;(null==(i=null==(n=null==e?void 0:e.botao)?void 0:n.props)?void 0:i.disabled)||e.funcao(r[t.campo],r,o)},children:e.botao},n)),n&&b.jsx("span",{children:b.jsx(M,{items:n,size:"sm",title:"Opções",dados:r,children:b.jsx("i",{className:"fas fa-ellipsis-h"})})})]})})]},o)})})}o.div`
213
213
  display: inline-block;
214
214
  width: 27px;
215
215
  height: 25px;
@@ -222,13 +222,13 @@
222
222
  margin-left: 0;
223
223
  font-size: 17px;
224
224
  }
225
- `,s.div`
225
+ `,o.div`
226
226
  background-color: white;
227
227
  border: 1px solid ${e=>e.color||"#7fb0c9"};
228
228
  border-top: 8px solid ${e=>e.color||"#7fb0c9"};
229
229
  border-radius: 0 0 6px 6px;
230
230
  padding-bottom: 8px;
231
- `,s.div`
231
+ `,o.div`
232
232
  justify-content: center;
233
233
  align-items: center;
234
234
  padding: 5px 0;
@@ -237,20 +237,20 @@
237
237
  h3 {
238
238
  font-size: 20px;
239
239
  }
240
- `,s.div`
240
+ `,o.div`
241
241
  background-color: white;
242
242
  padding: 5px 20px;
243
- `,s.h3`
243
+ `,o.h3`
244
244
  font-size: 1.5em;
245
245
  color: var(--cor-title);
246
246
  padding-bottom: 5px;
247
- `,s.div`
247
+ `,o.div`
248
248
  cursor: pointer;
249
249
  font-size: 22px;
250
250
  text-align: center;
251
251
  color: ${e=>e.ativo?"#232BFF":"#888"};
252
252
  transition: all ease 0.5s;
253
- `;const $=({color:e})=>b.jsx("i",{className:"fas fa-toggle-on",style:{color:e||"blue"}}),z=({color:e})=>b.jsx("i",{className:"fas fa-toggle-off",style:{color:e||"gray"}}),U=()=>b.jsx("i",{className:"far fa-check-circle"}),q=()=>b.jsx("i",{className:"fas fa-search"}),W=()=>b.jsx("i",{className:"far fa-copy"}),H=()=>b.jsx("i",{className:"fas fa-times"});s.div`
253
+ `;const z=({color:e})=>b.jsx("i",{className:"fas fa-toggle-on",style:{color:e||"blue"}}),$=({color:e})=>b.jsx("i",{className:"fas fa-toggle-off",style:{color:e||"gray"}}),U=()=>b.jsx("i",{className:"far fa-check-circle"}),q=()=>b.jsx("i",{className:"fas fa-search"}),H=()=>b.jsx("i",{className:"far fa-copy"}),W=()=>b.jsx("i",{className:"fas fa-times"});o.div`
254
254
  width: 16px;
255
255
  height: 16px;
256
256
  font-size: 9px;
@@ -262,7 +262,7 @@
262
262
  border: 1px solid ${e=>e.checked?"#0067C0":"silver"};
263
263
  border-radius: 4px;
264
264
  cursor: ${e=>e.onClick?"pointer":"default"};
265
- `;const K=({...e})=>b.jsx("i",{className:"fas fa-sign-out-alt",...e}),G=()=>b.jsx("i",{className:"fa-solid fa-plus"}),Y=()=>b.jsx("i",{className:"fas fa-pencil-alt"}),J=()=>b.jsx("i",{className:"fas fa-trash-alt"}),X=()=>b.jsx("i",{className:"fas fa-search"}),Z=()=>b.jsx("i",{className:"fa-solid fa-xmark"}),Q=()=>b.jsx("i",{className:"fa-solid fa-circle-question"}),ee=({...e})=>b.jsx("i",{className:"fa-solid fa-arrow-up-right-from-square",...e}),te=({...e})=>b.jsx("i",{className:"fa-solid fa-qrcode",...e});function ne({label:e,...t}){return b.jsxs("div",{className:"inp-color--container",children:[b.jsx("input",{type:"color",...t}),b.jsx("div",{children:e})]})}const re=s.div`
265
+ `;const G=({...e})=>b.jsx("i",{className:"fas fa-sign-out-alt",...e}),Y=()=>b.jsx("i",{className:"fa-solid fa-plus"}),K=()=>b.jsx("i",{className:"fas fa-pencil-alt"}),X=()=>b.jsx("i",{className:"fas fa-trash-alt"}),J=()=>b.jsx("i",{className:"fas fa-search"}),Z=()=>b.jsx("i",{className:"fa-solid fa-xmark"}),Q=()=>b.jsx("i",{className:"fa-solid fa-circle-question"}),ee=({...e})=>b.jsx("i",{className:"fa-solid fa-arrow-up-right-from-square",...e}),te=({...e})=>b.jsx("i",{className:"fa-solid fa-qrcode",...e});function ne({label:e,...t}){return b.jsxs("div",{className:"inp-color--container",children:[b.jsx("input",{type:"color",...t}),b.jsx("div",{children:e})]})}const re=o.div`
266
266
  margin: ${({noMargin:e})=>e?"0":"5px 0 8px"};
267
267
  border: 1px solid var(--pn-color-border);
268
268
  border-radius: ${e=>e.open?"0 0 var(--pn-border-radius) var(--pn-border-radius)":"0"};
@@ -331,7 +331,7 @@
331
331
  display: block;
332
332
  animation: slide-open 0.2s linear;
333
333
  }
334
- `;const se=s.button`
334
+ `;const oe=o.button`
335
335
  --margin-hor: -10px;
336
336
 
337
337
  background-color: transparent;
@@ -374,7 +374,7 @@
374
374
  color: #ff4545;
375
375
  }
376
376
  }
377
- `,ie=({...e})=>b.jsx(se,{type:"button",title:"Fechar",className:"close",...e,children:b.jsx("i",{className:"fa-solid fa-xmark"})});function ae({...e}){return b.jsx(se,{type:"button",className:"btn-help",...e,children:b.jsx(Q,{})})}const oe=({...e})=>b.jsx(se,{type:"button",className:"back",...e,children:b.jsx("i",{className:"fa-solid fa-arrow-left"})}),le=s.div`
377
+ `,ie=({...e})=>b.jsx(oe,{type:"button",title:"Fechar",className:"close",...e,children:b.jsx("i",{className:"fa-solid fa-xmark"})});function ae({...e}){return b.jsx(oe,{type:"button",className:"btn-help",...e,children:b.jsx(Q,{})})}const se=({...e})=>b.jsx(oe,{type:"button",className:"back",...e,children:b.jsx("i",{className:"fa-solid fa-arrow-left"})}),le=o.div`
378
378
  font-size: 1.4rem;
379
379
  line-height: 100%;
380
380
  color: #fff;
@@ -411,7 +411,7 @@
411
411
  @media (max-width: 340px) {
412
412
  right: calc(50vw - 24px);
413
413
  }
414
- `;let ue;function ce(e){return e}function de(e){return b.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"currentColor",d:"M6.225 4.811a1 1 0 00-1.414 1.414L10.586 12 4.81 17.775a1 1 0 101.414 1.414L12 13.414l5.775 5.775a1 1 0 001.414-1.414L13.414 12l5.775-5.775a1 1 0 00-1.414-1.414L12 10.586 6.225 4.81z"})})}function he(e){return b.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"currentColor",d:"M2 6a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM2 12.032a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM3 17.064a1 1 0 100 2h18a1 1 0 000-2H3z"})})}const pe=s.div`
414
+ `;let ue;function ce(e){return e}function de(e){return b.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"currentColor",d:"M6.225 4.811a1 1 0 00-1.414 1.414L10.586 12 4.81 17.775a1 1 0 101.414 1.414L12 13.414l5.775 5.775a1 1 0 001.414-1.414L13.414 12l5.775-5.775a1 1 0 00-1.414-1.414L12 10.586 6.225 4.81z"})})}function pe(e){return b.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"currentColor",d:"M2 6a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM2 12.032a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM3 17.064a1 1 0 100 2h18a1 1 0 000-2H3z"})})}const he=o.div`
415
415
  --pn-internal-radius: calc(var(--pn-border-radius) - 1px);
416
416
 
417
417
  display: flex;
@@ -445,7 +445,7 @@
445
445
  display: none;
446
446
  }
447
447
  }
448
- `;function fe({value:e,isCount:t,...n}){let r;return r="number"==typeof e?t?Math.min(e,9999):e<=0?"Inclusão":`#${e}`:e,b.jsx("div",{className:"badge bg-info text-dark",style:{borderRadius:"var(--pn-border-radius)"},...n,children:r})}let me="/home";function ve({title:e,count:t,codigo:n,goBack:r,goHome:s,onClose:i,children:o,maxWidth:l,className:u="",helpLink:c="",...d}){const h=a.useHistory(),p=t&&"number"==typeof t?t:0,f=p>9999?"9999+":p,m=Intl.NumberFormat("pt-br",{}).format(p),v=()=>{if(i)return i();r?h.goBack():h.push(me)},g=d.style||{};return l&&(g.maxWidth=l,d.style=g),b.jsxs("div",{className:"panel--container "+u,...d,children:[b.jsxs(pe,{children:[b.jsx("div",{className:"d-none d-sm-block",children:(r||s||i)&&b.jsx(oe,{title:"Fechar",onClick:v})}),b.jsxs("div",{className:"pn-title",children:[e,0!==p&&b.jsx(fe,{title:`Total de registros: ${m}`,value:f,isCount:!0}),b.jsx(fe,{value:n})]}),c&&b.jsx(ae,{title:"Ir para ajuda",onClick:()=>window.open(c,"_blank")}),(r||s||i)&&b.jsx(ie,{title:"Fechar",onClick:v})]}),b.jsx("div",{className:"pn-body",children:o})]})}function ge({fileTo:e,previewUrl:r,visible:s,setVisible:i}){const{addModal:a,removeModal:o}=S(),[l]=t.useState("preview-"+n.random());return t.useEffect(()=>(s||o(l),()=>o(l)),[s]),t.useEffect(()=>{a(l,i)},[l]),b.jsxs("div",{className:"pr-box",children:[b.jsxs("div",{className:"pr-box--header",children:[b.jsxs("div",{className:"pr-box--title",children:[b.jsxs("div",{className:"pr-box--name",children:[b.jsx("div",{children:"Visualizar relatório:"}),b.jsx("div",{className:"fw-bold",children:e})]}),b.jsx("div",{children:b.jsxs("a",{href:r,download:e,children:[b.jsx("i",{className:"fa-solid fa-download me-2"}),"Salvar relatório"]})})]}),b.jsx("button",{className:"ms-4 btn btn-danger rounded-pill",onClick:i,children:b.jsx(Z,{})})]}),b.jsx("iframe",{className:"pr-box--preview",src:r})]})}function be({title:e,href:t,text:n="",children:r,...s}){let i;return i=t?t.replace(/\D/g,""):null==r?void 0:r.replace(/\D/g,""),b.jsx("a",{href:`https://wa.me/${i}?text=${encodeURI(n)}`,target:"_blank",rel:"noreferrer",title:e||"Enviar mensagem para este número usando o WhatsApp",...s,children:r||t})}function xe({href:e,title:t,children:n,...r}){return b.jsx("a",{href:`mailto:${e||n}`,title:t||"Enviar um e-mail para este endereço",...r,children:n||e})}function ye({to:e,children:t,...n}){return b.jsx("a",{href:e||t,target:"_blank",rel:"noreferrer",...n,children:t||e})}const ke=s.div`
448
+ `;function fe({value:e,isCount:t,...n}){let r;return r="number"==typeof e?t?Math.min(e,9999):e<=0?"Inclusão":`#${e}`:e,b.jsx("div",{className:"badge bg-info text-dark",style:{borderRadius:"var(--pn-border-radius)"},...n,children:r})}let me="/home";function ge({title:e,count:t,codigo:n,goBack:r,goHome:o,onClose:i,children:s,maxWidth:l,className:u="",helpLink:c="",...d}){const p=a.useHistory(),h=t&&"number"==typeof t?t:0,f=h>9999?"9999+":h,m=Intl.NumberFormat("pt-br",{}).format(h),g=()=>{if(i)return i();r?p.goBack():p.push(me)},v=d.style||{};return l&&(v.maxWidth=l,d.style=v),b.jsxs("div",{className:"panel--container "+u,...d,children:[b.jsxs(he,{children:[b.jsx("div",{className:"d-none d-sm-block",children:(r||o||i)&&b.jsx(se,{title:"Fechar",onClick:g})}),b.jsxs("div",{className:"pn-title",children:[e,0!==h&&b.jsx(fe,{title:`Total de registros: ${m}`,value:f,isCount:!0}),b.jsx(fe,{value:n})]}),c&&b.jsx(ae,{title:"Ir para ajuda",onClick:()=>window.open(c,"_blank","noopener,noreferrer")}),(r||o||i)&&b.jsx(ie,{title:"Fechar",onClick:g})]}),b.jsx("div",{className:"pn-body",children:s})]})}function ve({fileTo:e,previewUrl:r,visible:o,setVisible:i}){const{addModal:a,removeModal:s}=S(),[l]=t.useState("preview-"+n.random());return t.useEffect(()=>(o||s(l),()=>s(l)),[o]),t.useEffect(()=>{a(l,i)},[l]),b.jsxs("div",{className:"pr-box",children:[b.jsxs("div",{className:"pr-box--header",children:[b.jsxs("div",{className:"pr-box--title",children:[b.jsxs("div",{className:"pr-box--name",children:[b.jsx("div",{children:"Visualizar relatório:"}),b.jsx("div",{className:"fw-bold",children:e})]}),b.jsx("div",{children:b.jsxs("a",{href:r,download:e,children:[b.jsx("i",{className:"fa-solid fa-download me-2"}),"Salvar relatório"]})})]}),b.jsx("button",{className:"ms-4 btn btn-danger rounded-pill",onClick:i,children:b.jsx(Z,{})})]}),b.jsx("iframe",{className:"pr-box--preview",src:r})]})}function be({title:e,href:t,text:n="",children:r,...o}){let i;return i=t?t.replace(/\D/g,""):null==r?void 0:r.replace(/\D/g,""),b.jsx("a",{href:`https://wa.me/${i}?text=${encodeURI(n)}`,target:"_blank",rel:"noreferrer",title:e||"Enviar mensagem para este número usando o WhatsApp",...o,children:r||t})}function xe({href:e,title:t,children:n,...r}){return b.jsx("a",{href:`mailto:${e||n}`,title:t||"Enviar um e-mail para este endereço",...r,children:n||e})}function ye({to:e,children:t,...n}){return b.jsx("a",{href:e||t,target:"_blank",rel:"noreferrer",...n,children:t||e})}const ke=o.div`
449
449
  .alert {
450
450
  font-weight: bold;
451
451
  margin-bottom: 0;
@@ -469,7 +469,7 @@
469
469
  padding-top: 8px;
470
470
  }
471
471
  }
472
- `;function je(){return b.jsxs(ke,{children:[b.jsx("div",{className:"alert alert-danger",children:"Falha na conexão!"}),b.jsxs("div",{children:["Possíveis causas:",b.jsx("ul",{children:navigator.onLine?b.jsxs(b.Fragment,{children:[b.jsx("li",{children:"Você está sem conexão com a internet;"}),b.jsx("li",{children:"O servidor pode estar passando por uma atualização. Por favor, tente novamente em alguns instantes."}),b.jsx("li",{children:"O servidor pode estar temporariamente indisponível."})]}):b.jsx("li",{children:"Você está sem conexão com a internet;"})}),b.jsxs("div",{children:["Se o erro persistir, por favor, entre em contato com nosso suporte técnico:",b.jsxs("ul",{children:[b.jsxs("li",{children:["Fone e WhatsApp:"," ",b.jsx(be,{className:"numeros",children:"(27) 9 9774-2904"})]}),b.jsxs("li",{children:["E-mail:"," ",b.jsx(xe,{href:"suporte@jcinfoes.com.br?subject="+encodeURI("SIPAR - Sem conexão com o servidor!"),children:"suporte@jcinfoes.com.br"})]})]})]})]})]})}let Ce=null;async function _e(e,t,n){var r;if(!(null==t?void 0:t.refreshRoute))return!1;if(401!==(null==(r=null==e?void 0:e.response)?void 0:r.status))return!1;if(null==n?void 0:n._retry)return!1;if(function(e,t){const n=String((null==e?void 0:e.url)||"");return n===t.refreshRoute||n.endsWith(t.refreshRoute)}(n,t))return!1;Ce||(Ce=l.post(t.refreshRoute,null,{baseURL:t.baseURL,timeout:t.timeout,withCredentials:!0}).finally(()=>{Ce=null}));try{return await Ce,!0}catch{return!1}}const we={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Se(e={}){const n=a.useHistory(),r=new AbortController,{globalApiConfig:s}=S(),[i,o]=t.useState(we);return"string"==typeof e&&(e={url:e}),[async function(t){var i,a,u,c;let d,h=(null==(i=s.auth)?void 0:i.username)?{username:s.auth.username,password:s.auth.password}:void 0;if(e.headers={...e.headers,...null==t?void 0:t.headers},s.getToken){let t=s.getToken();t&&(s.auth.prefix&&(t=`${s.auth.prefix} ${t}`),e.headers[s.auth.header]=t)}s.version&&(e.headers["x-ver"]=encodeURIComponent(s.version)),s.ident&&(e.headers["x-identify"]=encodeURIComponent(s.ident));let p={baseURL:s.baseURL,timeout:s.timeout,auth:h,withCredentials:s.withCredentials,...e,...t,headers:e.headers};p.report&&(p={...p,responseType:"blob",timeout:0}),o({...we,loading:!0}),p.onBefore&&p.onBefore(p);try{let e;try{e=await l({...p,signal:r.signal})}catch(m){if(!(await _e(m,s,p)))throw m;p._retry=!0,e=await l({...p,signal:r.signal})}s.afterRequest&&s.afterRequest(e),d={...we,data:e.data,message:e.statusText,status:e.status,headers:e.headers}}catch(m){const{ERR_NETWORK:e,ECONNABORTED:t,ETIMEDOUT:r}=l.AxiosError;if([e,t,r].includes(null==m?void 0:m.code))d={...we,isError:!0,status:400,message:b.jsx(je,{})};else if(m.response)switch(d={...we,isError:!0,status:m.response.status,message:(null==(a=m.response.data)?void 0:a.error)||m.response.data,code:null==(u=m.response.data)?void 0:u.code},m.response.status){case 400:case 500:if("blob"==(null==p?void 0:p.responseType)){let e=await m.response.data.text();e=JSON.parse(e),d.message=e.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:d.message="Servidor requer autenticação!",(null==s?void 0:s.setToken)&&(null==s||s.setToken("")),n.push(s.loginRoute);break;case 404:d.message="Servidor não possui este recurso!";break;case 405:d.message=`Método [${(null==(c=p.method)?void 0:c.toUpperCase())||"GET"}] indisponível!`;break;case 429:d.message="Muitos acessos. Tente novamente mais tarde!"}else d={...we,isError:!0,message:m.message}}const f=`timeout of ${s.timeout}ms exceeded`;return d.message!=f&&"Network Error"!=d.message||(d.message="Sem conexão com o servidor!"),d.isError?d.error=d.message:d.error=null,d={...d,loading:!1},o(d),(null==e?void 0:e.onTerminated)&&e.onTerminated(d),d},i,function(){r&&r.abort("Cancelado pelo usuário!")}]}let Ee=null;function Ne({url:e,file:r,fileTo:s,setLoading:i}){const[a,l]=t.useState(""),[u,c]=t.useState(!1),[d,h]=t.useState(0),[p,f]=t.useState(r),[m,v]=t.useState(""),[g,,x]=Se({url:e,method:"post",data:{file:p},report:!0,onDownloadProgress:e=>{c(e.loaded>0),h(e.loaded/e.total*100)},onTerminated:e=>{if(204===e.status)return k(3);if(e.error)l(e.error),y();else{const[,r]=s.split(".");n.isDesktop()&&"pdf"==r.toLowerCase()?(t=e.data,v(URL.createObjectURL(t))):(o(e.data,function(){let e=s.split("."),t=`-${n.getDateTimeStr().replace(/\D/g,"")}-${n.getHash(s)}`;return e[0]+=t,e=e.join("."),e}()),f(""))}var t}});function y(){Ee&&clearTimeout(Ee)}function k(e){y(),Ee=setTimeout(()=>g(),1e3*e)}return t.useEffect(()=>()=>y(),[]),t.useEffect(()=>()=>m&&URL.revokeObjectURL(m),[m]),t.useEffect(()=>{p?(i(!0),k(2)):i(!1)},[p]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"loading-report--area",children:[b.jsxs("div",{className:"loading-box",style:{display:m?"none":"block"},children:[b.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){u?x():l(""),i(!1)},children:b.jsx("i",{className:"fas fa-times"})}),b.jsxs("div",{className:"line",children:[u?b.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):b.jsx("div",{className:"spinner"}),b.jsx("span",{children:u?"Baixando relatório...":"Gerando relatório..."})]}),b.jsx("div",{className:"pbar",children:b.jsx("div",{style:{width:`${d}%`}})})]}),m&&b.jsx(ge,{fileTo:s,previewUrl:m,setVisible:()=>f(""),visible:!0})]}),a&&b.jsx(T,{onConfirm:()=>i(!1),children:a})]})}function Ie({search:e,setSearch:r,fnSearch:s,fnFilter:a,fnValidateFilter:o,placeHolder:l,...u}){const c=t.useRef();return b.jsxs("div",{className:"inp-pesq--input-area",children:[b.jsxs(i.InputGroup,{children:[b.jsx(i.Input,{innerRef:c,value:e,onChange:e=>r(e.target.value),placeholder:l,...u}),b.jsx(i.Button,{color:"outline-secondary",type:"button",onClick:()=>{r(""),n.isDesktop()&&(null==c?void 0:c.current)&&c.current.focus()},title:"Limpar campo de pesquisa",children:b.jsx(Z,{})}),b.jsx(i.Button,{color:"info",title:"Pesquisar",onClick:s,type:s?"button":"submit",children:b.jsx(X,{})})]}),a&&b.jsxs(i.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[b.jsx("i",{className:"fas fa-filter"}),b.jsx("span",{className:"ip--btn-caption",children:" Filtros"}),o&&o()&&b.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:b.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}const Ae=s.div`
472
+ `;function _e(){return b.jsxs(ke,{children:[b.jsx("div",{className:"alert alert-danger",children:"Falha na conexão!"}),b.jsxs("div",{children:["Possíveis causas:",b.jsx("ul",{children:navigator.onLine?b.jsxs(b.Fragment,{children:[b.jsx("li",{children:"Você está sem conexão com a internet;"}),b.jsx("li",{children:"O servidor pode estar passando por uma atualização. Por favor, tente novamente em alguns instantes."}),b.jsx("li",{children:"O servidor pode estar temporariamente indisponível."})]}):b.jsx("li",{children:"Você está sem conexão com a internet;"})}),b.jsxs("div",{children:["Se o erro persistir, por favor, entre em contato com nosso suporte técnico:",b.jsxs("ul",{children:[b.jsxs("li",{children:["Fone e WhatsApp:"," ",b.jsx(be,{className:"numeros",children:"(27) 9 9774-2904"})]}),b.jsxs("li",{children:["E-mail:"," ",b.jsx(xe,{href:"suporte@jcinfoes.com.br?subject="+encodeURI("SIPAR - Sem conexão com o servidor!"),children:"suporte@jcinfoes.com.br"})]})]})]})]})]})}let Ce=null;async function je(e,t,n){var r;if(!(null==t?void 0:t.refreshRoute))return!1;if(401!==(null==(r=null==e?void 0:e.response)?void 0:r.status))return!1;if(null==n?void 0:n._retry)return!1;if(function(e,t){const n=String((null==e?void 0:e.url)||"");return n===t.refreshRoute||n.endsWith(t.refreshRoute)}(n,t))return!1;Ce||(Ce=l.post(t.refreshRoute,null,{baseURL:t.baseURL,timeout:t.timeout,withCredentials:!0}).finally(()=>{Ce=null}));try{return await Ce,!0}catch{return!1}}const we={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Se(e={}){const n=a.useHistory(),r=new AbortController,{globalApiConfig:o}=S(),[i,s]=t.useState(we);return"string"==typeof e&&(e={url:e}),[async function(t){var i,a,u,c;let d,p=(null==(i=o.auth)?void 0:i.username)?{username:o.auth.username,password:o.auth.password}:void 0;if(e.headers={...e.headers,...null==t?void 0:t.headers},o.getToken){let t=o.getToken();t&&(o.auth.prefix&&(t=`${o.auth.prefix} ${t}`),e.headers[o.auth.header]=t)}o.version&&(e.headers["x-ver"]=encodeURIComponent(o.version)),o.ident&&(e.headers["x-identify"]=encodeURIComponent(o.ident));let h={baseURL:o.baseURL,timeout:o.timeout,auth:p,withCredentials:o.withCredentials,...e,...t,headers:e.headers};h.report&&(h={...h,responseType:"blob",timeout:0}),s({...we,loading:!0}),h.onBefore&&h.onBefore(h);try{let e;try{e=await l({...h,signal:r.signal})}catch(m){if(!(await je(m,o,h)))throw m;h._retry=!0,e=await l({...h,signal:r.signal})}o.afterRequest&&o.afterRequest(e),d={...we,data:e.data,message:e.statusText,status:e.status,headers:e.headers}}catch(m){const{ERR_NETWORK:e,ECONNABORTED:t,ETIMEDOUT:r}=l.AxiosError;if([e,t,r].includes(null==m?void 0:m.code))d={...we,isError:!0,status:400,message:b.jsx(_e,{})};else if(m.response)switch(d={...we,isError:!0,status:m.response.status,message:(null==(a=m.response.data)?void 0:a.error)||m.response.data,code:null==(u=m.response.data)?void 0:u.code},m.response.status){case 400:case 500:if("blob"==(null==h?void 0:h.responseType)){let e=await m.response.data.text();e=JSON.parse(e),d.message=e.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:d.message="Servidor requer autenticação!",(null==o?void 0:o.setToken)&&(null==o||o.setToken("")),n.push(o.loginRoute);break;case 404:d.message="Servidor não possui este recurso!";break;case 405:d.message=`Método [${(null==(c=h.method)?void 0:c.toUpperCase())||"GET"}] indisponível!`;break;case 429:d.message="Muitos acessos. Tente novamente mais tarde!"}else d={...we,isError:!0,message:m.message}}const f=`timeout of ${o.timeout}ms exceeded`;return d.message!=f&&"Network Error"!=d.message||(d.message="Sem conexão com o servidor!"),d.isError?d.error=d.message:d.error=null,d={...d,loading:!1},s(d),(null==e?void 0:e.onTerminated)&&e.onTerminated(d),d},i,function(){r&&r.abort("Cancelado pelo usuário!")}]}let Ee=null;function Ne({url:e,file:r,fileTo:o,setLoading:i}){const[a,l]=t.useState(""),[u,c]=t.useState(!1),[d,p]=t.useState(0),[h,f]=t.useState(r),[m,g]=t.useState(""),[v,,x]=Se({url:e,method:"post",data:{file:h},report:!0,onDownloadProgress:e=>{c(e.loaded>0),p(e.loaded/e.total*100)},onTerminated:e=>{if(204===e.status)return k(3);if(e.error)l(e.error),y();else{const[,r]=o.split(".");n.isDesktop()&&"pdf"==r.toLowerCase()?(t=e.data,g(URL.createObjectURL(t))):(s(e.data,function(){let e=o.split("."),t=`-${n.getDateTimeStr().replace(/\D/g,"")}-${n.getHash(o)}`;return e[0]+=t,e=e.join("."),e}()),f(""))}var t}});function y(){Ee&&clearTimeout(Ee)}function k(e){y(),Ee=setTimeout(()=>v(),1e3*e)}return t.useEffect(()=>()=>y(),[]),t.useEffect(()=>()=>m&&URL.revokeObjectURL(m),[m]),t.useEffect(()=>{h?(i(!0),k(2)):i(!1)},[h]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"loading-report--area",children:[b.jsxs("div",{className:"loading-box",style:{display:m?"none":"block"},children:[b.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){u?x():l(""),i(!1)},children:b.jsx("i",{className:"fas fa-times"})}),b.jsxs("div",{className:"line",children:[u?b.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):b.jsx("div",{className:"spinner"}),b.jsx("span",{children:u?"Baixando relatório...":"Gerando relatório..."})]}),b.jsx("div",{className:"pbar",children:b.jsx("div",{style:{width:`${d}%`}})})]}),m&&b.jsx(ve,{fileTo:o,previewUrl:m,setVisible:()=>f(""),visible:!0})]}),a&&b.jsx(F,{onConfirm:()=>i(!1),children:a})]})}function Ae({search:e,setSearch:r,fnSearch:o,fnFilter:a,fnValidateFilter:s,placeHolder:l,...u}){const c=t.useRef();return b.jsxs("div",{className:"inp-pesq--input-area",children:[b.jsxs(i.InputGroup,{children:[b.jsx(i.Input,{innerRef:c,value:e,onChange:e=>r(e.target.value),placeholder:l,...u}),b.jsx(i.Button,{color:"outline-secondary",type:"button",onClick:()=>{r(""),n.isDesktop()&&(null==c?void 0:c.current)&&c.current.focus()},title:"Limpar campo de pesquisa",children:b.jsx(Z,{})}),b.jsx(i.Button,{color:"info",title:"Pesquisar",onClick:o,type:o?"button":"submit",children:b.jsx(J,{})})]}),a&&b.jsxs(i.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[b.jsx("i",{className:"fas fa-filter"}),b.jsx("span",{className:"ip--btn-caption",children:" Filtros"}),s&&s()&&b.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:b.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}const Te=o.div`
473
473
  position: fixed;
474
474
  inset: 0 0 0;
475
475
  background-color: var(--jc-overlay-bg);
@@ -537,7 +537,7 @@
537
537
  ${e=>e.alignTop?"max-height: calc(100vh - 110px);":""}
538
538
  }
539
539
  }
540
- `,Fe="modal-hide-sb";function Te({maxWidth:e,visible:r,setVisible:s,children:i,hideScrollBar:a=!0,id:o,alignTop:l}){const{addModal:u,removeModal:c}=S(),[d]=t.useState(o||"modal-"+n.random());function h(){c(d),a&&document.body.classList.remove(Fe)}return t.useEffect(()=>(r?a&&document.body.classList.add(Fe):h(),()=>h()),[r,a]),t.useEffect(()=>{u(d,s)},[d]),r?b.jsx(Ae,{alignTop:l,maxWidth:e,children:b.jsx("div",{className:"mod-panel",children:i})}):null}function De({className:e="",...t}){return b.jsx("div",{className:`modal--body ${e}`,...t})}function Be({className:e="",...t}){return b.jsx("div",{className:`modal--content ${e}`,...t})}function Oe({className:e="",setVisible:t,children:n,helpLink:r,...s}){return b.jsxs(pe,{className:`modal--header ${e}`,...s,children:[b.jsx("span",{className:"pn-title",children:n}),r&&b.jsx(ae,{title:"Ir para a ajuda",onClick:()=>window.open(r,"_blank")}),b.jsx(ie,{type:"button",onClick:()=>t(!1)})]})}const Re="Requested device not found",Me="Permission denied";function Ve({onResult:e,setVisible:n,title:r,helpLink:s}){const[i,a]=t.useState(""),[o,l]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs(Te,{visible:!0,setVisible:n,hideScrollBar:!1,maxWidth:500,children:[b.jsx(Oe,{helpLink:s,setVisible:n,children:r}),b.jsx(Be,{children:b.jsx(De,{children:b.jsxs("div",{className:"position-relative my-2",children:[b.jsx(u.QrReader,{onResult:function(t,r){let s=null==r?void 0:r.message;s&&([Re,Me].includes(s)&&(s="Dispositivo de câmera não foi encontrado, está indisponível ou bloqueado!",l(!0)),a(`Ocorreu um erro ao fazer a leitura: ${s}`)),t&&e&&(e(t),n(!1))},constraints:{facingMode:"environment"}}),b.jsxs("svg",{width:"50px",viewBox:"0 0 100 100",style:{top:"0px",left:"0px",zIndex:1,boxSizing:"border-box",border:"50px solid rgba(0, 0, 0, 0.25)",borderRadius:"15px",position:"absolute",width:"100%",height:"100%"},children:[b.jsx("path",{fill:"none",d:"M13,0 L0,0 L0,13",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M0,87 L0,100 L13,100",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M87,100 L100,100 L100,87",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M100,13 L100,0 87,0",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"})]})]})})})]}),i&&b.jsx(T,{onConfirm:function(){a(),o&&n(!1)},children:i})]})}const Pe=s.div`
540
+ `,Ie="modal-hide-sb";function Fe({maxWidth:e,visible:r,setVisible:o,children:i,hideScrollBar:a=!0,id:s,alignTop:l}){const{addModal:u,removeModal:c}=S(),[d]=t.useState(s||"modal-"+n.random());function p(){c(d),a&&document.body.classList.remove(Ie)}return t.useEffect(()=>(r?a&&document.body.classList.add(Ie):p(),()=>p()),[r,a]),t.useEffect(()=>{u(d,o)},[d]),r?b.jsx(Te,{alignTop:l,maxWidth:e,children:b.jsx("div",{className:"mod-panel",children:i})}):null}function De({className:e="",...t}){return b.jsx("div",{className:`modal--body ${e}`,...t})}function Oe({className:e="",...t}){return b.jsx("div",{className:`modal--content ${e}`,...t})}function Re({className:e="",setVisible:t,children:n,helpLink:r,...o}){return b.jsxs(he,{className:`modal--header ${e}`,...o,children:[b.jsx("span",{className:"pn-title",children:n}),r&&b.jsx(ae,{title:"Ir para a ajuda",onClick:()=>window.open(r,"_blank","noopener,noreferrer")}),b.jsx(ie,{type:"button",onClick:()=>t(!1)})]})}const Me="Requested device not found",Be="Permission denied";function Pe({onResult:e,setVisible:n,title:r,helpLink:o}){const[i,a]=t.useState(""),[s,l]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs(Fe,{visible:!0,setVisible:n,hideScrollBar:!1,maxWidth:500,children:[b.jsx(Re,{helpLink:o,setVisible:n,children:r}),b.jsx(Oe,{children:b.jsx(De,{children:b.jsxs("div",{className:"position-relative my-2",children:[b.jsx(u.QrReader,{onResult:function(t,r){let o=null==r?void 0:r.message;o&&([Me,Be].includes(o)&&(o="Dispositivo de câmera não foi encontrado, está indisponível ou bloqueado!",l(!0)),a(`Ocorreu um erro ao fazer a leitura: ${o}`)),t&&e&&(e(t),n(!1))},constraints:{facingMode:"environment"}}),b.jsxs("svg",{width:"50px",viewBox:"0 0 100 100",style:{top:"0px",left:"0px",zIndex:1,boxSizing:"border-box",border:"50px solid rgba(0, 0, 0, 0.25)",borderRadius:"15px",position:"absolute",width:"100%",height:"100%"},children:[b.jsx("path",{fill:"none",d:"M13,0 L0,0 L0,13",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M0,87 L0,100 L13,100",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M87,100 L100,100 L100,87",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),b.jsx("path",{fill:"none",d:"M100,13 L100,0 87,0",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"})]})]})})})]}),i&&b.jsx(F,{onConfirm:function(){a(),s&&n(!1)},children:i})]})}const Le=o.div`
541
541
  display: flex;
542
542
  align-items: center;
543
543
 
@@ -555,7 +555,7 @@
555
555
  min-height: 16px;
556
556
  }
557
557
  }
558
- `;function Le(e){return"number"!=typeof e&&(e=0),e||(e=0),Number.isNaN(e)&&(e=0),Number.isFinite(e)||(e=0),e}const $e=s.div`
558
+ `;function Ve(e){return"number"!=typeof e&&(e=0),e||(e=0),Number.isNaN(e)&&(e=0),Number.isFinite(e)||(e=0),e}const ze=o.div`
559
559
  --loading-bar-size: 2px;
560
560
 
561
561
  background-color: var(--loading-bar-bg);
@@ -574,7 +574,7 @@
574
574
  transform: ease all 0.4s;
575
575
  animation: FadeIn 0.5s both;
576
576
  }
577
- `;function ze({visible:e}){const[n,r]=t.useState([0,0]);return e?(setTimeout(()=>{let[e,t]=n;t<100?t++:t>50&&e++,100==e&&(e=0,t=0),r([e,t])},5),b.jsx($e,{children:b.jsx("div",{className:"floating-bar",style:{left:`${n[0]}%`,width:`${n[1]}%`},children:b.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function Ue({visible:e,message:t="Aguarde...",isbar:n=!1}){return e?n?b.jsx(ze,{visible:e}):b.jsx("div",{className:"loading--container",children:b.jsxs("div",{className:"loading-body",children:[b.jsx("div",{className:"spinner-border text-info"}),b.jsx("span",{children:t})]})}):null}function qe({name:e,value:t,onChange:n,invalid:r=!1,...s}){return b.jsx(c,{placeholder:"Informe o telefone",className:"form-control "+(r?"is-invalid":""),format:"(##) # ####-####",mask:"_",value:t,name:e,onValueChange:t=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(t,e,n),...s})}const We={mask:"**.***.***/****-00",definitions:{"*":/[A-Za-z0-9]/}};function He(e){const t=String(e).replace(/\D/g,"");let r=!1;return n.validarCPF(t)||(r=!0),"00000000000"==t&&(r=!1),""==e&&(r=!1),r}function Ke(e){return!n.validarCNPJ(e)}function Ge(e){const t=String(e).replace(/[^A-Za-z0-9]/g,"");let n=!1;return t.length<=11&&He(e)&&(n=!0),t.length>11&&Ke(e)&&(n=!0),""==e&&(n=!1),n}function Ye(e){return"string"==typeof e||e instanceof String}function Je(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function Xe(e,t){return Array.isArray(t)?Xe(e,(e,n)=>t.includes(n)):Object.entries(e).reduce((e,n)=>{let[r,s]=n;return t(s,r)&&(e[r]=s),e},{})}const Ze="NONE",Qe="LEFT",et="FORCE_LEFT",tt="RIGHT",nt="FORCE_RIGHT";function rt(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function st(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let s;if(n&&r){if(t.length!=e.length)return!1;for(s=0;s<t.length;s++)if(!st(t[s],e[s]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const i=t instanceof RegExp,a=e instanceof RegExp;if(i&&a)return t.toString()==e.toString();if(i!=a)return!1;const o=Object.keys(t);for(s=0;s<o.length;s++)if(!Object.prototype.hasOwnProperty.call(e,o[s]))return!1;for(s=0;s<o.length;s++)if(!st(e[o[s]],t[o[s]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class it{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Ze:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?Qe:tt}}function at(e,t){return new at.InputMask(e,t)}function ot(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?at.MaskedRegExp:Ye(e)?at.MaskedPattern:e===Date?at.MaskedDate:e===Number?at.MaskedNumber:Array.isArray(e)||e===Array?at.MaskedDynamic:at.Masked&&e.prototype instanceof at.Masked?e:at.Masked&&e instanceof at.Masked?e.constructor:e instanceof Function?at.MaskedFunction:(console.warn("Mask not found for mask",e),at.Masked)}function lt(e){if(!e)throw new Error("Options in not defined");if(at.Masked){if(e.prototype instanceof at.Masked)return{mask:e};const{mask:t,...n}=e instanceof at.Masked?{mask:e}:Je(e)&&e.mask instanceof at.Masked?e:{};if(t){const e=t.mask;return{...Xe(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...n}}}return Je(e)?{...e}:{mask:e}}function ut(e){if(at.Masked&&e instanceof at.Masked)return e;const t=lt(e),n=ot(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}at.createMask=ut;class ct{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}at.MaskElement=ct;class dt extends ct{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}at.HTMLMaskElement=dt;class ht extends dt{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}at.HTMLMaskElement=dt;class pt extends dt{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,s=r.getSelection&&r.getSelection();s&&(s.removeAllRanges(),s.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}at.HTMLContenteditableMaskElement=pt;class ft{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ft.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}ft.MAX_LENGTH=100;at.InputMask=class{constructor(e,t){this.el=e instanceof ct?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new pt(e):new ht(e),this.masked=ut(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ft,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof at.Masked)&&this.masked.constructor===ot(e))return void this.masked.updateOptions({mask:e});const t=e instanceof at.Masked?e:ut({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,s=this.displayValue,i=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==s&&(this.el.value=s),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),i&&this._fireChangeEvents(),this._historyChanging||!i&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),s=this.masked.optionsIsChanged(n);r&&(this.mask=t),s&&this.masked.updateOptions(n),(r||s)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Qe))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new it({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=n===this.masked.rawInputValue?t.removeDirection:Ze;let i=this.masked.nearestInputPos(t.startChangePos+r,s);s!==Ze&&(i=this.masked.nearestInputPos(i,Ze)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class mt{static normalize(e){return Array.isArray(e)?e:[e,new mt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}at.ChangeDetails=mt;class vt{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class gt{constructor(e){this._value="",this._update({...gt.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new vt(this.extractInput(e,t),e)}appendTail(e){return Ye(e)&&(e=new vt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new mt({inserted:e,rawInserted:e})):new mt}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let i=this.pad(t);const a=this._appendCharRaw(e,t);i=i.aggregate(a),a.rawInserted||i.equals(s)?s=i:this.state=n}if(s.inserted){let e,i=!1!==this.doValidate(t);if(i&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<s.rawInserted.length;++e)n.unshift(this.displayValue.length-s.tailShift)}let r=this.appendTail(n);if(i=r.rawInserted.length===n.toString().length,!(i&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<s.rawInserted.length;++e)n.shift();r=this.appendTail(n),i=r.rawInserted.length===n.toString().length}i&&r.inserted&&(this.state=t)}i||(s=new mt,this.state=r,n&&e&&(n.state=e))}return s}_appendPlaceholder(){return new mt}_appendEager(){return new mt}append(e,t,n){if(!Ye(e))throw new Error("value should be string");const r=Ye(n)?new vt(String(n)):n;let s;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,s]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const n=this._appendChar(e[i],t,r);if(!n.rawInserted&&!this.doSkipInvalid(e[i],t,r))break;s.aggregate(n)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&s.aggregate(this._appendEager()),null!=r&&(s.tailShift+=this.appendTail(r).tailShift),s}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new mt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),mt.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),mt.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,s){void 0===n&&(n=""),void 0===r&&(r=Ze),void 0===s&&(s={input:!0});const i=e+t,a=this.extractTail(i),o=!0===this.eager||"remove"===this.eager;let l;o&&(r=function(e){switch(e){case Qe:return et;case tt:return nt;default:return e}}(r),l=this.extractInput(0,i,{raw:!0}));let u=e;const c=new mt;if(r!==Ze&&(u=this.nearestInputPos(e,t>1&&0!==e&&!o?Ze:r),c.tailShift=u-e),c.aggregate(this.remove(u)),o&&r!==Ze&&l===this.rawInputValue)if(r===et){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new mt({tailShift:-1})).aggregate(this.remove(e-1))}else r===nt&&a.unshift();return c.aggregate(this.append(n,s,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!st(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||gt.EMPTY_VALUES.includes(e)&&gt.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new mt}}gt.DEFAULTS={skipInvalid:!0},gt.EMPTY_VALUES=[void 0,null,""],at.Masked=gt;class bt{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ye(e)?new vt(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof vt)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof bt){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof at.MaskedPattern)){return new vt(this.toString()).appendTo(e)}const t=new mt;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],s=e._mapPosToBlock(e.displayValue.length),i=r.stop;let a;if(null!=i&&(!s||s.index<=i)&&((r instanceof bt||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),a=r instanceof bt&&e._blocks[i]),a){const n=a.appendTail(r);t.aggregate(n);const s=r.toString().slice(n.rawInserted.length);s&&t.aggregate(e.append(s,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(e=>{const t="chunks"in e?new bt:new vt;return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class xt{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,et),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Qe),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Qe),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,nt),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Ze),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Ze),!0})}}class yt{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new mt}nearestInputPos(e,t){void 0===t&&(t=Ze);const n=this._value.length;switch(t){case Qe:case et:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new mt;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,s=new mt({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new mt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new vt("")}appendTail(e){return Ye(e)&&(e=new vt(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class kt{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:s,lazy:i,eager:a,...o}=e;this.masked=ut(o),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:s,lazy:i,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new mt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new mt;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new mt,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new mt:(this.isFilled=!0,new mt({inserted:this.placeholderChar}))}_appendEager(){return new mt}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=Ze);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case Qe:case et:return this.isComplete?r:0;case tt:case nt:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new mt}}kt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};at.MaskedRegExp=class extends gt{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class jt extends gt{constructor(e){super({...jt.DEFAULTS,...e,definitions:Object.assign({},kt.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let s=0;s<t.length;++s){if(this.blocks){const e=t.slice(s),n=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));n.sort((e,t)=>t.length-e.length);const r=n[0];if(r){const{expose:e,repeat:t,...n}=lt(this.blocks[r]),i={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},a=null!=t?new at.RepeatBlock(i):ut(i);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),s+=r.length-1;continue}}let i=t[s],a=i in e;if(i===jt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===i||"}"===i){n=!n;continue}if("["===i||"]"===i){r=!r;continue}if(i===jt.ESCAPE_CHAR){if(++s,i=t[s],!i)break;a=!1}const o=a?new kt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...lt(e[i]),parent:this}):new yt({char:i,eager:this.eager,isUnmasking:n});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach((e,n)=>e.state=t[n]),super.state=n}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new mt;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const e=this._blocks[r]._appendEager();if(!e.inserted)break;t.aggregate(e)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new mt;if(!n)return r;for(let i,a=n.index;i=this._blocks[a];++a){var s;const n=i._appendChar(e,{...t,_beforeTailState:null==(s=t._beforeTailState)||null==(s=s._blocks)?void 0:s[a]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new bt;return e===t||this._forEachBlocksInRange(e,t,(e,t,r,s)=>{const i=e.extractTail(r,s);i.stop=this._findStopBefore(t),i.from=this._blockStartPos(t),i instanceof bt&&(i.blockIndex=t),n.extend(i)}),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(e,t,s,i)=>{r+=e.extractInput(s,i,n)}),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new mt;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,s=null!=e?e:this._blocks.length;return this._blocks.slice(r,s).forEach(n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],s=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),s=e&&r.index===e.index,i=r.offset,a=e&&s?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,i,a),e&&!s){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,r,s)=>{n.aggregate(e.remove(r,s))}),n}nearestInputPos(e,t){if(void 0===t&&(t=Ze),!this._blocks.length)return 0;const n=new xt(this,e);if(t===Ze)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===Qe||t===et){if(t===Qe){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===Qe){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===et?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===tt||t===nt?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===nt?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,Qe)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,(e,t,r,s)=>{n+=e.totalInputPositions(r,s)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){const t=new mt;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}}jt.DEFAULTS={...gt.DEFAULTS,lazy:!0,placeholderChar:"_"},jt.STOP_CHAR="`",jt.ESCAPE_CHAR="\\",jt.InputDefinition=kt,jt.FixedDefinition=yt,at.MaskedPattern=jt;class Ct extends jt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:s=this.autofix,...i}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=s;const a=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<o.length&&o[l]===a[l];)++l;i.mask=o.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(i)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(r.length)+s,n="9".repeat(r.length)+s),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[s,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(n[this.value.length],t):Number(s)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new mt;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(e=>this._appendCharRaw(e))}return t}}at.MaskedRange=Ct;class _t extends jt{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Ye(t)?t:n}}constructor(e){super(_t.extractPatternOptions({..._t.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...s}={..._t.DEFAULTS,...e},i=Object.assign({},_t.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,r),super._update({...s,mask:Ye(t)?t:n,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(_t.extractPatternOptions(e))}}_t.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ct,from:1,to:31,maxLength:2},m:{mask:Ct,from:1,to:12,maxLength:2},Y:{mask:Ct,from:1900,to:9999}}),_t.DEFAULTS={...jt.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[n,r,s]=e.split(".").map(Number);return new Date(s,r-1,n)}},at.MaskedDate=_t;class wt extends gt{constructor(e){super({...wt.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{const{expose:t,...n}=lt(e),r=ut({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,s=this.rawInputValue,i=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:s,a=s.slice(i.length),o=this.currentMask,l=new mt,u=null==o?void 0:o.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new mt;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new mt;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...s}=e;t&&this.compiledMasks.forEach((e,n)=>e.state=t[n]),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=s}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;const{mask:r,...s}=e[n];return st(t,s)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}wt.DEFAULTS={...gt.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const s=t.rawInputValue,i=t.compiledMasks.map((i,a)=>{const o=t.currentMask===i,l=o?i.displayValue.length:i.nearestInputPos(i.displayValue.length,et);return i.rawInputValue!==s?(i.reset(),i.append(s,{raw:!0})):o||i.remove(l),i.append(e,t.currentMaskFlags(n)),i.appendTail(r),{index:a,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(l,i.nearestInputPos(i.displayValue.length,et)))}});return i.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[i[0].index]}},at.MaskedDynamic=wt;class St extends jt{constructor(e){super({...St.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map(e=>e.length),r=Math.min(...e),s=Math.max(...e)-r;n.mask="*".repeat(r),s&&(n.mask+="["+"*".repeat(s)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,nt),this.value.length),r=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,n));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,(e,n)=>{const s=r[0][n];n>=this.value.length||s===e.value||(e.reset(),e._appendChar(s,t))});const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new mt({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new vt("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new mt;const n=Math.min(super.nearestInputPos(0,nt),this.value.length);let r;for(r=e;r>=0;--r){if(this.enum.filter(e=>this.matchValue(e,this.value.slice(n,r),n)).length>1)break}const s=super.remove(r,t);return s.tailShift+=r-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}St.DEFAULTS={...jt.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},at.MaskedEnum=St;var Et;at.MaskedFunction=class extends gt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Nt extends gt{constructor(e){super({...Nt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+rt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const i=this.number;let a,o=!isNaN(i),l=!1;if(o){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(Nt.UNMASKED_RADIX,this.radix),l||(l=s===this._value&&!t.tail)):o=!1),o&&(o=Boolean(this._value.match(this._numberRegExp)))}o?a=new mt({inserted:this._value.slice(s.length),rawInserted:l?"":e,skip:l}):(this._value=s,a=new mt),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return a.tailShift+=(c-r)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),s=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const i=this._separatorsCountFromSlice(n);return new mt({tailShift:(i-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case Ze:case Qe:case et:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===et)return n}break}case tt:case nt:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,n,r)=>t+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===Nt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Nt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Nt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Nt.EMPTY_VALUES.includes(e)&&Nt.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Et=Nt,Nt.UNMASKED_RADIX=".",Nt.EMPTY_VALUES=[...gt.EMPTY_VALUES,0],Nt.DEFAULTS={...gt.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Et.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},at.MaskedNumber=Nt;const It={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function At(e,t,n){void 0===t&&(t=It.MASKED),void 0===n&&(n=It.MASKED);const r=ut(e);return e=>r.runIsolated(r=>(r[t]=e,r[n]))}at.PIPE_TYPE=It,at.createPipe=At,at.pipe=function(e,t,n,r){return At(t,n,r)(e)};at.RepeatBlock=class extends jt{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:s,...i}=lt(e);this._blockOpts=Object.assign({},this._blockOpts,i);const a=ut(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=s?s:a.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(ut(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new mt;for(let o,l,u=null!=(r=null==(s=this._mapPosToBlock(this.displayValue.length))?void 0:s.index)?r:Math.max(this._blocks.length-1,0);o=null!=(i=this._blocks[u])?i:l=!l&&this._allocateBlock(u);++u){var r,s,i,a;const c=o._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const s=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let i;null!=t&&(i=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==i&&(i=this._blocks.length-1);let a=0;for(let o=i;s<=o&&!this._blocks[o].unmaskedValue;--o,++a);a&&(this._blocks.splice(i-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=at}catch{}var Ft,Tt={exports:{}},Dt={exports:{}},Bt={};var Ot,Rt,Mt,Vt,Pt,Lt,$t,zt,Ut,qt,Wt,Ht,Kt,Gt,Yt={};
577
+ `;function $e({visible:e}){const[n,r]=t.useState([0,0]);return e?(setTimeout(()=>{let[e,t]=n;t<100?t++:t>50&&e++,100==e&&(e=0,t=0),r([e,t])},5),b.jsx(ze,{children:b.jsx("div",{className:"floating-bar",style:{left:`${n[0]}%`,width:`${n[1]}%`},children:b.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function Ue({visible:e,message:t="Aguarde...",isbar:n=!1}){return e?n?b.jsx($e,{visible:e}):b.jsx("div",{className:"loading--container",children:b.jsxs("div",{className:"loading-body",children:[b.jsx("div",{className:"spinner-border text-info"}),b.jsx("span",{children:t})]})}):null}function qe({name:e,value:t,onChange:n,invalid:r=!1,...o}){return b.jsx(c,{placeholder:"Informe o telefone",className:"form-control "+(r?"is-invalid":""),format:"(##) # ####-####",mask:"_",value:t,name:e,onValueChange:t=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(t,e,n),...o})}const He={mask:"**.***.***/****-00",definitions:{"*":/[A-Za-z0-9]/}};function We(e){const t=String(e).replace(/\D/g,"");let r=!1;return n.validarCPF(t)||(r=!0),"00000000000"==t&&(r=!1),""==e&&(r=!1),r}function Ge(e){return!n.validarCNPJ(e)}function Ye(e){const t=String(e).replace(/[^A-Za-z0-9]/g,"");let n=!1;return t.length<=11&&We(e)&&(n=!0),t.length>11&&Ge(e)&&(n=!0),""==e&&(n=!1),n}function Ke(e){return"string"==typeof e||e instanceof String}function Xe(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function Je(e,t){return Array.isArray(t)?Je(e,(e,n)=>t.includes(n)):Object.entries(e).reduce((e,n)=>{let[r,o]=n;return t(o,r)&&(e[r]=o),e},{})}const Ze="NONE",Qe="LEFT",et="FORCE_LEFT",tt="RIGHT",nt="FORCE_RIGHT";function rt(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ot(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let o;if(n&&r){if(t.length!=e.length)return!1;for(o=0;o<t.length;o++)if(!ot(t[o],e[o]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const i=t instanceof RegExp,a=e instanceof RegExp;if(i&&a)return t.toString()==e.toString();if(i!=a)return!1;const s=Object.keys(t);for(o=0;o<s.length;o++)if(!Object.prototype.hasOwnProperty.call(e,s[o]))return!1;for(o=0;o<s.length;o++)if(!ot(e[s[o]],t[s[o]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class it{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Ze:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?Qe:tt}}function at(e,t){return new at.InputMask(e,t)}function st(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?at.MaskedRegExp:Ke(e)?at.MaskedPattern:e===Date?at.MaskedDate:e===Number?at.MaskedNumber:Array.isArray(e)||e===Array?at.MaskedDynamic:at.Masked&&e.prototype instanceof at.Masked?e:at.Masked&&e instanceof at.Masked?e.constructor:e instanceof Function?at.MaskedFunction:(console.warn("Mask not found for mask",e),at.Masked)}function lt(e){if(!e)throw new Error("Options in not defined");if(at.Masked){if(e.prototype instanceof at.Masked)return{mask:e};const{mask:t,...n}=e instanceof at.Masked?{mask:e}:Xe(e)&&e.mask instanceof at.Masked?e:{};if(t){const e=t.mask;return{...Je(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...n}}}return Xe(e)?{...e}:{mask:e}}function ut(e){if(at.Masked&&e instanceof at.Masked)return e;const t=lt(e),n=st(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}at.createMask=ut;class ct{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}at.MaskElement=ct;class dt extends ct{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}at.HTMLMaskElement=dt;class pt extends dt{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}at.HTMLMaskElement=dt;class ht extends dt{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,o=r.getSelection&&r.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}at.HTMLContenteditableMaskElement=ht;class ft{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ft.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}ft.MAX_LENGTH=100;at.InputMask=class{constructor(e,t){this.el=e instanceof ct?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new ht(e):new pt(e),this.masked=ut(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ft,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof at.Masked)&&this.masked.constructor===st(e))return void this.masked.updateOptions({mask:e});const t=e instanceof at.Masked?e:ut({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,o=this.displayValue,i=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==o&&(this.el.value=o),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),i&&this._fireChangeEvents(),this._historyChanging||!i&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),o=this.masked.optionsIsChanged(n);r&&(this.mask=t),o&&this.masked.updateOptions(n),(r||o)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Qe))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new it({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?t.removeDirection:Ze;let i=this.masked.nearestInputPos(t.startChangePos+r,o);o!==Ze&&(i=this.masked.nearestInputPos(i,Ze)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class mt{static normalize(e){return Array.isArray(e)?e:[e,new mt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}at.ChangeDetails=mt;class gt{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class vt{constructor(e){this._value="",this._update({...vt.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new gt(this.extractInput(e,t),e)}appendTail(e){return Ke(e)&&(e=new gt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new mt({inserted:e,rawInserted:e})):new mt}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let o;if([e,o]=this.doPrepareChar(e,t),e&&(o=o.aggregate(this._appendCharRaw(e,t)),!o.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let i=this.pad(t);const a=this._appendCharRaw(e,t);i=i.aggregate(a),a.rawInserted||i.equals(o)?o=i:this.state=n}if(o.inserted){let e,i=!1!==this.doValidate(t);if(i&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<o.rawInserted.length;++e)n.unshift(this.displayValue.length-o.tailShift)}let r=this.appendTail(n);if(i=r.rawInserted.length===n.toString().length,!(i&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<o.rawInserted.length;++e)n.shift();r=this.appendTail(n),i=r.rawInserted.length===n.toString().length}i&&r.inserted&&(this.state=t)}i||(o=new mt,this.state=r,n&&e&&(n.state=e))}return o}_appendPlaceholder(){return new mt}_appendEager(){return new mt}append(e,t,n){if(!Ke(e))throw new Error("value should be string");const r=Ke(n)?new gt(String(n)):n;let o;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,o]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const n=this._appendChar(e[i],t,r);if(!n.rawInserted&&!this.doSkipInvalid(e[i],t,r))break;o.aggregate(n)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&o.aggregate(this._appendEager()),null!=r&&(o.tailShift+=this.appendTail(r).tailShift),o}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new mt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),mt.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),mt.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=Ze),void 0===o&&(o={input:!0});const i=e+t,a=this.extractTail(i),s=!0===this.eager||"remove"===this.eager;let l;s&&(r=function(e){switch(e){case Qe:return et;case tt:return nt;default:return e}}(r),l=this.extractInput(0,i,{raw:!0}));let u=e;const c=new mt;if(r!==Ze&&(u=this.nearestInputPos(e,t>1&&0!==e&&!s?Ze:r),c.tailShift=u-e),c.aggregate(this.remove(u)),s&&r!==Ze&&l===this.rawInputValue)if(r===et){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new mt({tailShift:-1})).aggregate(this.remove(e-1))}else r===nt&&a.unshift();return c.aggregate(this.append(n,o,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ot(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||vt.EMPTY_VALUES.includes(e)&&vt.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new mt}}vt.DEFAULTS={skipInvalid:!0},vt.EMPTY_VALUES=[void 0,null,""],at.Masked=vt;class bt{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ke(e)?new gt(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof gt)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof bt){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof at.MaskedPattern)){return new gt(this.toString()).appendTo(e)}const t=new mt;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],o=e._mapPosToBlock(e.displayValue.length),i=r.stop;let a;if(null!=i&&(!o||o.index<=i)&&((r instanceof bt||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),a=r instanceof bt&&e._blocks[i]),a){const n=a.appendTail(r);t.aggregate(n);const o=r.toString().slice(n.rawInserted.length);o&&t.aggregate(e.append(o,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(e=>{const t="chunks"in e?new bt:new gt;return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class xt{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,et),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Qe),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Qe),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,nt),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Ze),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Ze),!0})}}class yt{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new mt}nearestInputPos(e,t){void 0===t&&(t=Ze);const n=this._value.length;switch(t){case Qe:case et:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new mt;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,o=new mt({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new mt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new gt("")}appendTail(e){return Ke(e)&&(e=new gt(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class kt{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:o,lazy:i,eager:a,...s}=e;this.masked=ut(s),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:o,lazy:i,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new mt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new mt;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new mt,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new mt:(this.isFilled=!0,new mt({inserted:this.placeholderChar}))}_appendEager(){return new mt}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=Ze);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case Qe:case et:return this.isComplete?r:0;case tt:case nt:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new mt}}kt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};at.MaskedRegExp=class extends vt{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class _t extends vt{constructor(e){super({..._t.DEFAULTS,...e,definitions:Object.assign({},kt.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let o=0;o<t.length;++o){if(this.blocks){const e=t.slice(o),n=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));n.sort((e,t)=>t.length-e.length);const r=n[0];if(r){const{expose:e,repeat:t,...n}=lt(this.blocks[r]),i={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},a=null!=t?new at.RepeatBlock(i):ut(i);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),o+=r.length-1;continue}}let i=t[o],a=i in e;if(i===_t.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===i||"}"===i){n=!n;continue}if("["===i||"]"===i){r=!r;continue}if(i===_t.ESCAPE_CHAR){if(++o,i=t[o],!i)break;a=!1}const s=a?new kt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...lt(e[i]),parent:this}):new yt({char:i,eager:this.eager,isUnmasking:n});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach((e,n)=>e.state=t[n]),super.state=n}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new mt;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const e=this._blocks[r]._appendEager();if(!e.inserted)break;t.aggregate(e)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new mt;if(!n)return r;for(let i,a=n.index;i=this._blocks[a];++a){var o;const n=i._appendChar(e,{...t,_beforeTailState:null==(o=t._beforeTailState)||null==(o=o._blocks)?void 0:o[a]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new bt;return e===t||this._forEachBlocksInRange(e,t,(e,t,r,o)=>{const i=e.extractTail(r,o);i.stop=this._findStopBefore(t),i.from=this._blockStartPos(t),i instanceof bt&&(i.blockIndex=t),n.extend(i)}),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(e,t,o,i)=>{r+=e.extractInput(o,i,n)}),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new mt;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,o=null!=e?e:this._blocks.length;return this._blocks.slice(r,o).forEach(n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],o=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),o=e&&r.index===e.index,i=r.offset,a=e&&o?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,i,a),e&&!o){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,r,o)=>{n.aggregate(e.remove(r,o))}),n}nearestInputPos(e,t){if(void 0===t&&(t=Ze),!this._blocks.length)return 0;const n=new xt(this,e);if(t===Ze)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===Qe||t===et){if(t===Qe){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===Qe){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===et?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===tt||t===nt?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===nt?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,Qe)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,(e,t,r,o)=>{n+=e.totalInputPositions(r,o)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){const t=new mt;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}}_t.DEFAULTS={...vt.DEFAULTS,lazy:!0,placeholderChar:"_"},_t.STOP_CHAR="`",_t.ESCAPE_CHAR="\\",_t.InputDefinition=kt,_t.FixedDefinition=yt,at.MaskedPattern=_t;class Ct extends _t{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:o=this.autofix,...i}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<s.length&&s[l]===a[l];)++l;i.mask=s.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(i)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(t="0".repeat(r.length)+o,n="9".repeat(r.length)+o),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[o,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(n[this.value.length],t):Number(o)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new mt;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(e=>this._appendCharRaw(e))}return t}}at.MaskedRange=Ct;class jt extends _t{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Ke(t)?t:n}}constructor(e){super(jt.extractPatternOptions({...jt.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...o}={...jt.DEFAULTS,...e},i=Object.assign({},jt.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,r),super._update({...o,mask:Ke(t)?t:n,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(jt.extractPatternOptions(e))}}jt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ct,from:1,to:31,maxLength:2},m:{mask:Ct,from:1,to:12,maxLength:2},Y:{mask:Ct,from:1900,to:9999}}),jt.DEFAULTS={..._t.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[n,r,o]=e.split(".").map(Number);return new Date(o,r-1,n)}},at.MaskedDate=jt;class wt extends vt{constructor(e){super({...wt.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{const{expose:t,...n}=lt(e),r=ut({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,o=this.rawInputValue,i=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:o,a=o.slice(i.length),s=this.currentMask,l=new mt,u=null==s?void 0:s.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==s?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new mt;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new mt;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...o}=e;t&&this.compiledMasks.forEach((e,n)=>e.state=t[n]),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=o}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;const{mask:r,...o}=e[n];return ot(t,o)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}wt.DEFAULTS={...vt.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,i=t.compiledMasks.map((i,a)=>{const s=t.currentMask===i,l=s?i.displayValue.length:i.nearestInputPos(i.displayValue.length,et);return i.rawInputValue!==o?(i.reset(),i.append(o,{raw:!0})):s||i.remove(l),i.append(e,t.currentMaskFlags(n)),i.appendTail(r),{index:a,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(l,i.nearestInputPos(i.displayValue.length,et)))}});return i.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[i[0].index]}},at.MaskedDynamic=wt;class St extends _t{constructor(e){super({...St.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map(e=>e.length),r=Math.min(...e),o=Math.max(...e)-r;n.mask="*".repeat(r),o&&(n.mask+="["+"*".repeat(o)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,nt),this.value.length),r=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,n));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,(e,n)=>{const o=r[0][n];n>=this.value.length||o===e.value||(e.reset(),e._appendChar(o,t))});const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new mt({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new gt("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new mt;const n=Math.min(super.nearestInputPos(0,nt),this.value.length);let r;for(r=e;r>=0;--r){if(this.enum.filter(e=>this.matchValue(e,this.value.slice(n,r),n)).length>1)break}const o=super.remove(r,t);return o.tailShift+=r-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}St.DEFAULTS={..._t.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},at.MaskedEnum=St;var Et;at.MaskedFunction=class extends vt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Nt extends vt{constructor(e){super({...Nt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+rt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=e;const i=this.number;let a,s=!isNaN(i),l=!1;if(s){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(Nt.UNMASKED_RADIX,this.radix),l||(l=o===this._value&&!t.tail)):s=!1),s&&(s=Boolean(this._value.match(this._numberRegExp)))}s?a=new mt({inserted:this._value.slice(o.length),rawInserted:l?"":e,skip:l}):(this._value=o,a=new mt),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return a.tailShift+=(c-r)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const i=this._separatorsCountFromSlice(n);return new mt({tailShift:(i-o)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case Ze:case Qe:case et:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===et)return n}break}case tt:case nt:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,n,r)=>t+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===Nt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Nt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Nt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Nt.EMPTY_VALUES.includes(e)&&Nt.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Et=Nt,Nt.UNMASKED_RADIX=".",Nt.EMPTY_VALUES=[...vt.EMPTY_VALUES,0],Nt.DEFAULTS={...vt.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Et.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},at.MaskedNumber=Nt;const At={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Tt(e,t,n){void 0===t&&(t=At.MASKED),void 0===n&&(n=At.MASKED);const r=ut(e);return e=>r.runIsolated(r=>(r[t]=e,r[n]))}at.PIPE_TYPE=At,at.createPipe=Tt,at.pipe=function(e,t,n,r){return Tt(t,n,r)(e)};at.RepeatBlock=class extends _t{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:o,...i}=lt(e);this._blockOpts=Object.assign({},this._blockOpts,i);const a=ut(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=o?o:a.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(ut(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new mt;for(let s,l,u=null!=(r=null==(o=this._mapPosToBlock(this.displayValue.length))?void 0:o.index)?r:Math.max(this._blocks.length-1,0);s=null!=(i=this._blocks[u])?i:l=!l&&this._allocateBlock(u);++u){var r,o,i,a;const c=s._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const o=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let i;null!=t&&(i=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==i&&(i=this._blocks.length-1);let a=0;for(let s=i;o<=s&&!this._blocks[s].unmaskedValue;--s,++a);a&&(this._blocks.splice(i-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=at}catch{}var It,Ft={exports:{}},Dt={exports:{}},Ot={};var Rt,Mt,Bt,Pt,Lt,Vt,zt,$t,Ut,qt,Ht,Wt,Gt,Yt,Kt={};
578
578
  /** @license React v16.13.1
579
579
  * react-is.development.js
580
580
  *
@@ -582,12 +582,12 @@
582
582
  *
583
583
  * This source code is licensed under the MIT license found in the
584
584
  * LICENSE file in the root directory of this source tree.
585
- */function Jt(){return Rt||(Rt=1,"production"===process.env.NODE_ENV?Dt.exports=function(){if(Ft)return Bt;Ft=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case u:case r:case i:case s:case d:return e;default:switch(e=e&&e.$$typeof){case o:case c:case f:case p:case a:return e;default:return h}}case n:return h}}}function y(e){return x(e)===u}return Bt.AsyncMode=l,Bt.ConcurrentMode=u,Bt.ContextConsumer=o,Bt.ContextProvider=a,Bt.Element=t,Bt.ForwardRef=c,Bt.Fragment=r,Bt.Lazy=f,Bt.Memo=p,Bt.Portal=n,Bt.Profiler=i,Bt.StrictMode=s,Bt.Suspense=d,Bt.isAsyncMode=function(e){return y(e)||x(e)===l},Bt.isConcurrentMode=y,Bt.isContextConsumer=function(e){return x(e)===o},Bt.isContextProvider=function(e){return x(e)===a},Bt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Bt.isForwardRef=function(e){return x(e)===c},Bt.isFragment=function(e){return x(e)===r},Bt.isLazy=function(e){return x(e)===f},Bt.isMemo=function(e){return x(e)===p},Bt.isPortal=function(e){return x(e)===n},Bt.isProfiler=function(e){return x(e)===i},Bt.isStrictMode=function(e){return x(e)===s},Bt.isSuspense=function(e){return x(e)===d},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===s||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===o||e.$$typeof===c||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},Bt.typeOf=x,Bt}():Dt.exports=(Ot||(Ot=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case u:case r:case i:case s:case d:return m;default:var v=m&&m.$$typeof;switch(v){case o:case c:case f:case p:case a:return v;default:return h}}case n:return h}}}var y=l,k=u,j=o,C=a,_=t,w=c,S=r,E=f,N=p,I=n,A=i,F=s,T=d,D=!1;function B(e){return x(e)===u}Yt.AsyncMode=y,Yt.ConcurrentMode=k,Yt.ContextConsumer=j,Yt.ContextProvider=C,Yt.Element=_,Yt.ForwardRef=w,Yt.Fragment=S,Yt.Lazy=E,Yt.Memo=N,Yt.Portal=I,Yt.Profiler=A,Yt.StrictMode=F,Yt.Suspense=T,Yt.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(e)||x(e)===l},Yt.isConcurrentMode=B,Yt.isContextConsumer=function(e){return x(e)===o},Yt.isContextProvider=function(e){return x(e)===a},Yt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Yt.isForwardRef=function(e){return x(e)===c},Yt.isFragment=function(e){return x(e)===r},Yt.isLazy=function(e){return x(e)===f},Yt.isMemo=function(e){return x(e)===p},Yt.isPortal=function(e){return x(e)===n},Yt.isProfiler=function(e){return x(e)===i},Yt.isStrictMode=function(e){return x(e)===s},Yt.isSuspense=function(e){return x(e)===d},Yt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===s||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===o||e.$$typeof===c||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},Yt.typeOf=x}()),Yt)),Dt.exports}
585
+ */function Xt(){return Mt||(Mt=1,"production"===process.env.NODE_ENV?Dt.exports=function(){if(It)return Ot;It=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return x(e)===u}return Ot.AsyncMode=l,Ot.ConcurrentMode=u,Ot.ContextConsumer=s,Ot.ContextProvider=a,Ot.Element=t,Ot.ForwardRef=c,Ot.Fragment=r,Ot.Lazy=f,Ot.Memo=h,Ot.Portal=n,Ot.Profiler=i,Ot.StrictMode=o,Ot.Suspense=d,Ot.isAsyncMode=function(e){return y(e)||x(e)===l},Ot.isConcurrentMode=y,Ot.isContextConsumer=function(e){return x(e)===s},Ot.isContextProvider=function(e){return x(e)===a},Ot.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ot.isForwardRef=function(e){return x(e)===c},Ot.isFragment=function(e){return x(e)===r},Ot.isLazy=function(e){return x(e)===f},Ot.isMemo=function(e){return x(e)===h},Ot.isPortal=function(e){return x(e)===n},Ot.isProfiler=function(e){return x(e)===i},Ot.isStrictMode=function(e){return x(e)===o},Ot.isSuspense=function(e){return x(e)===d},Ot.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Ot.typeOf=x,Ot}():Dt.exports=(Rt||(Rt=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var m=e.type;switch(m){case l:case u:case r:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case c:case f:case h:case a:return g;default:return p}}case n:return p}}}var y=l,k=u,_=s,C=a,j=t,w=c,S=r,E=f,N=h,A=n,T=i,I=o,F=d,D=!1;function O(e){return x(e)===u}Kt.AsyncMode=y,Kt.ConcurrentMode=k,Kt.ContextConsumer=_,Kt.ContextProvider=C,Kt.Element=j,Kt.ForwardRef=w,Kt.Fragment=S,Kt.Lazy=E,Kt.Memo=N,Kt.Portal=A,Kt.Profiler=T,Kt.StrictMode=I,Kt.Suspense=F,Kt.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||x(e)===l},Kt.isConcurrentMode=O,Kt.isContextConsumer=function(e){return x(e)===s},Kt.isContextProvider=function(e){return x(e)===a},Kt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Kt.isForwardRef=function(e){return x(e)===c},Kt.isFragment=function(e){return x(e)===r},Kt.isLazy=function(e){return x(e)===f},Kt.isMemo=function(e){return x(e)===h},Kt.isPortal=function(e){return x(e)===n},Kt.isProfiler=function(e){return x(e)===i},Kt.isStrictMode=function(e){return x(e)===o},Kt.isSuspense=function(e){return x(e)===d},Kt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Kt.typeOf=x}()),Kt)),Dt.exports}
586
586
  /*
587
587
  object-assign
588
588
  (c) Sindre Sorhus
589
589
  @license MIT
590
- */function Xt(){if(Vt)return Mt;Vt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Mt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(s){return!1}}()?Object.assign:function(r,s){for(var i,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var u in i=Object(arguments[l]))t.call(i,u)&&(o[u]=i[u]);if(e){a=e(i);for(var c=0;c<a.length;c++)n.call(i,a[c])&&(o[a[c]]=i[a[c]])}}return o},Mt}function Zt(){if(Lt)return Pt;Lt=1;return Pt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Qt(){return zt?$t:(zt=1,$t=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var en=Jt();Tt.exports=function(){if(Ht)return Wt;Ht=1;var e=Jt(),t=Xt(),n=Zt(),r=Qt(),s=function(){if(qt)return Ut;qt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Zt(),n={},r=Qt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function s(s,i,a,o,l){if("production"!==process.env.NODE_ENV)for(var u in s)if(r(s,u)){var c;try{if("function"!=typeof s[u]){var d=Error((o||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=s[u](i,u,o,a,null,t)}catch(p){c=p}if(!c||c instanceof Error||e((o||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var h=l?l():"";e("Failed "+a+" type: "+c.message+(null!=h?h:""))}}}return s.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Ut=s}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),Wt=function(o,l){var u="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f(function(t,r,s,i,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside arrayOf.");var o=t[r];if(!Array.isArray(o))return new p("Invalid "+i+" `"+a+"` of type `"+b(o)+"` supplied to `"+s+"`, expected an array.");for(var l=0;l<o.length;l++){var u=e(o,l,s,i,a+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:f(function(e,t,n,r,s){var i=e[t];return o(i)?null:new p("Invalid "+r+" `"+s+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:f(function(t,n,r,s,i){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+s+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return f(function(t,n,r,s,i){if(!(t[n]instanceof e)){var a=e.name||c;return new p("Invalid "+s+" `"+i+"` of type `"+((o=t[n]).constructor&&o.constructor.name?o.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var o;return null})},node:f(function(e,t,n,r,s){return g(e[t])?null:new p("Invalid "+r+" `"+s+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return f(function(t,s,i,a,o){if("function"!=typeof e)return new p("Property `"+o+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[s],u=b(l);if("object"!==u)return new p("Invalid "+a+" `"+o+"` of type `"+u+"` supplied to `"+i+"`, expected an object.");for(var c in l)if(r(l,c)){var d=e(l,c,i,a,o+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?f(function(t,n,r,s,i){for(var a=t[n],o=0;o<e.length;o++)if(h(a,e[o]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===x(t)?String(t):t});return new p("Invalid "+s+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var s=e[t];if("function"!=typeof s)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(s)+" at index "+t+"."),a}return f(function(t,s,i,a,o){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,s,i,a,o,n);if(null==c)return null;c.data&&r(c.data,"expectedType")&&l.push(c.data.expectedType)}return new p("Invalid "+a+" `"+o+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return f(function(t,r,s,i,a){var o=t[r],l=b(o);if("object"!==l)return new p("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+s+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return v(s,i,a,u,x(c));var d=c(o,u,s,i,a+"."+u,n);if(d)return d}return null})},exact:function(e){return f(function(s,i,a,o,l){var u=s[i],c=b(u);if("object"!==c)return new p("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var d=t({},s[i],e);for(var h in d){var f=e[h];if(r(e,h)&&"function"!=typeof f)return v(a,o,l,h,x(f));if(!f)return new p("Invalid "+o+" `"+l+"` key `"+h+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(s[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(u,h,a,o,l+"."+h,n);if(m)return m}return null})}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function s(s,a,o,u,d,h,f){if(u=u||c,h=h||o,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=u+":"+o;!t[v]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[v]=!0,r++)}}return null==a[o]?s?null===a[o]?new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,o,u,d,h)}var a=s.bind(null,!1);return a.isRequired=s.bind(null,!0),a}function m(e){return f(function(t,n,r,s,i,a){var o=t[n];return b(o)!==e?new p("Invalid "+s+" `"+i+"` of type `"+x(o)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function v(e,t,n,r,s){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+s+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||o(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var s=n.value;if(s&&!g(s[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,d.checkPropTypes=s,d.resetWarningCache=s.resetWarningCache,d.PropTypes=d,d},Wt}()(en.isElement,!0)}else Tt.exports=function(){if(Gt)return Kt;Gt=1;var e=Zt();function t(){}function n(){}return n.resetWarningCache=t,Kt=function(){function r(t,n,r,s,i,a){if(a!==e){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function s(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();const tn=h(Tt.exports),nn={mask:tn.oneOfType([tn.array,tn.func,tn.string,tn.instanceOf(RegExp),tn.oneOf([Date,Number,at.Masked]),tn.instanceOf(at.Masked)]),value:tn.any,unmask:tn.oneOfType([tn.bool,tn.oneOf(["typed"])]),prepare:tn.func,prepareChar:tn.func,validate:tn.func,commit:tn.func,overwrite:tn.oneOfType([tn.bool,tn.oneOf(["shift"])]),eager:tn.oneOfType([tn.bool,tn.oneOf(["append","remove"])]),skipInvalid:tn.bool,onAccept:tn.func,onComplete:tn.func,placeholderChar:tn.string,displayChar:tn.string,lazy:tn.bool,definitions:tn.object,blocks:tn.object,enum:tn.arrayOf(tn.string),maxLength:tn.number,from:tn.number,to:tn.number,pattern:tn.string,format:tn.func,parse:tn.func,autofix:tn.oneOfType([tn.bool,tn.oneOf(["pad"])]),radix:tn.string,thousandsSeparator:tn.string,mapToRadix:tn.arrayOf(tn.string),scale:tn.number,normalizeZeros:tn.bool,padFractionalZeros:tn.bool,min:tn.oneOfType([tn.number,tn.instanceOf(Date)]),max:tn.oneOfType([tn.number,tn.instanceOf(Date)]),dispatch:tn.func,inputRef:tn.oneOfType([tn.func,tn.shape({current:tn.object})])},rn=Object.keys(nn).filter(e=>"value"!==e),sn=["value","unmask","onAccept","onComplete","inputRef"],an=rn.filter(e=>sn.indexOf(e)<0);const on=function(e){var n;const r=((n=class extends t.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const e=this.props,t=this._extractMaskOptionsFromProps(e);var n;t.mask?this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t):(this.destroyMask(),"value"in e&&void 0!==e.value&&(null!=(n=this.element)&&n.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value))}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=at(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){const{...t}=e;return Object.keys(t).filter(e=>an.indexOf(e)<0).forEach(e=>{delete t[e]}),t}_extractNonMaskProps(e){const{...t}=e;return rn.forEach(e=>{"maxLength"!==e&&delete t[e]}),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return t.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,n.propTypes=void 0,n),s=e.displayName||e.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=nn,t.forwardRef((e,n)=>t.createElement(r,{...e,ref:n}))}(e=>{let{inputRef:n,...r}=e;return t.createElement("input",{...r,ref:n})}),ln=t.forwardRef((e,n)=>t.createElement(on,{...e,ref:n})),un=[{mask:"000.000.000-00"},We];function cn({value:e,name:t,onChange:n,className:r,...s}){return b.jsx(ln,{className:`form-control ${Ke(e)?"is-invalid":""} ${r||""}`,mask:We.mask,definitions:We.definitions,onAccept:function(e,r,s){s&&n({target:{name:t,value:e.toUpperCase()}})},value:e,name:t,...s})}function dn(e,t,n){if(n){n({target:{name:t,value:(r=e.floatValue,!r||null==r||isNaN(r)?0:Number(r))}})}var r}const hn=({name:e,onChange:t,onClick:n,allowNegative:r=!1,...s})=>b.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:n=>dn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...s}),pn=({name:e,onChange:t,onClick:n,allowNegative:r=!0,decimalScale:s=2,...i})=>b.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:s,allowNegative:r,onValueChange:n=>dn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...i}),fn=({name:e,onChange:t,allowNegative:n=!0,decimalScale:r=2,...s})=>b.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:r,allowNegative:n,onValueChange:n=>dn(n,e,t),name:e,...s}),mn=({name:e,onChange:t,...n})=>b.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:n=>dn(n,e,t),...n}),vn=e=>b.jsx(c,{name:e.name,format:"##:##",mask:"_",value:e.value,onChange:e.onChange,className:"form-control",...e}),gn=e=>b.jsx(i.Input,{tag:c,name:e.name,format:"###.###.###-##",mask:"_",value:e.value,onChange:e.onChange,invalid:He(e.value),...e}),bn=e=>b.jsxs("select",{className:"form-select",name:e.name,value:e.value,onChange:e.onChange,...e,children:[b.jsx("option",{value:"",children:"- Selecione o estado -"}),b.jsx("option",{value:"EX",children:"Estrangeiro"}),b.jsx("option",{value:"AC",children:"Acre"}),b.jsx("option",{value:"AL",children:"Alagoas"}),b.jsx("option",{value:"AP",children:"Amapá"}),b.jsx("option",{value:"AM",children:"Amazonas"}),b.jsx("option",{value:"BA",children:"Bahia"}),b.jsx("option",{value:"CE",children:"Ceará"}),b.jsx("option",{value:"DF",children:"Distrito Federal"}),b.jsx("option",{value:"ES",children:"Espírito Santo"}),b.jsx("option",{value:"GO",children:"Goiás"}),b.jsx("option",{value:"MA",children:"Maranhão"}),b.jsx("option",{value:"MT",children:"Mato Grosso"}),b.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),b.jsx("option",{value:"MG",children:"Minas Gerais"}),b.jsx("option",{value:"PA",children:"Pará"}),b.jsx("option",{value:"PB",children:"Paraíba"}),b.jsx("option",{value:"PR",children:"Paraná"}),b.jsx("option",{value:"PE",children:"Pernambuco"}),b.jsx("option",{value:"PI",children:"Piauí"}),b.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),b.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),b.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),b.jsx("option",{value:"RO",children:"Rondônia"}),b.jsx("option",{value:"RR",children:"Roraima"}),b.jsx("option",{value:"SC",children:"Santa Catarina"}),b.jsx("option",{value:"SP",children:"São Paulo"}),b.jsx("option",{value:"SE",children:"Sergipe"}),b.jsx("option",{value:"TO",children:"Tocantins"})]});function xn({innerRef:e,loading:t,page:n,pages:r,...s}){return b.jsx("div",{className:"footer-load-more--container",ref:e,hidden:n>=r,...s,children:t&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Loading..."})}),"Carregando..."]})})}const yn={q:"",page:1};function kn({isOpen:e,setOpen:r,title:s="Pesquisar",placeHolder:i="Digite o que deseja pesquisar",maxWidth:a=800,searchInit:o,route:l,keyField:u,fields:c,renderLine:d,onClick:h,helpLink:p}){var f,m;const v=t.useRef(null),[g]=t.useState(`box-inp-${n.random(1e4)}`),[x,y]=t.useState([]),[k,j]=t.useState(""),[C,_]=t.useState({...yn,q:o||""}),[w,S]=t.useState(!1),[E,N]=Se({url:l,params:{...C,limit:n.isDesktop()?28:10},onTerminated:e=>{e.error?j(e.error):e.data instanceof Array?(S(!1),y(e.data)):(S(!0),y(t=>[...t,...e.data.data]))}});function I(){if(!C.q)return j("Informe o que deseja pesquisar!");y([]),C.page>1?_({...C,page:1}):E(),A()}function A(){var e;n.isDesktop()&&(null==(e=document.querySelector(`#${g}`))||e.focus())}return t.useEffect(()=>{C.q.length>0&&E()},[C.page]),t.useEffect(()=>{const e=v.current;if(!e)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&function(){var e;let t=C.page+1;if(t>(null==(e=N.data)?void 0:e.pages)||N.loading||0==x.length)return;N.data||(t=1);_({...C,page:t})}()})});return t.observe(e),()=>t.unobserve(e)},[x]),e?b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:N.loading}),b.jsxs(Te,{title:s,maxWidth:a,visible:!0,setVisible:r,children:[b.jsx(Oe,{helpLink:p,setVisible:r,children:s}),b.jsx(Be,{children:b.jsxs(De,{children:[b.jsx("div",{className:"my-2",children:b.jsx(Ie,{search:C.q,setSearch:e=>_({...C,q:e}),fnSearch:I,placeHolder:i,onKeyDown:function(e){13===e.keyCode&&(e.preventDefault(),I())},autoFocus:n.isDesktop(),id:g})}),b.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=N.data)?void 0:f.length)&&b.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),x&&b.jsx("table",{children:b.jsx("tbody",{children:null==x?void 0:x.map((e,t)=>b.jsx("tr",{onClick:()=>h(e[u],e),children:d?d(e):c.map((t,n)=>{let r;return r=0==n?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},b.jsx("td",{style:r,children:e[t]},n)})},t))})}),w&&b.jsx(xn,{innerRef:v,loading:N.loading,page:C.page,pages:null==(m=N.data)?void 0:m.pages})]})]})})]}),k&&b.jsx(T,{onConfirm:()=>{j(),A()},children:k})]}):null}function jn({children:e,findTitle:n,findPlaceHolder:r,findRoute:s,findKeyField:i,findFields:a,findRenderLine:o,findOnSelect:l,...u}){const[c,d]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...u,children:[b.jsxs("option",{value:0,children:["- ",n," -"]}),e]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:()=>d(!0),children:b.jsx(q,{})})]}),c&&b.jsx(kn,{title:n,placeHolder:r,fields:a,keyField:i,route:s,isOpen:!0,setOpen:d,renderLine:o,onClick:(e,t)=>{l(e,t),d(!1)}})]})}const Cn=s.div`
590
+ */function Jt(){if(Pt)return Bt;Pt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Bt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var u in i=Object(arguments[l]))t.call(i,u)&&(s[u]=i[u]);if(e){a=e(i);for(var c=0;c<a.length;c++)n.call(i,a[c])&&(s[a[c]]=i[a[c]])}}return s},Bt}function Zt(){if(Vt)return Lt;Vt=1;return Lt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Qt(){return $t?zt:($t=1,zt=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var en=Xt();Ft.exports=function(){if(Wt)return Ht;Wt=1;var e=Xt(),t=Jt(),n=Zt(),r=Qt(),o=function(){if(qt)return Ut;qt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Zt(),n={},r=Qt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var c;try{if("function"!=typeof o[u]){var d=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=o[u](i,u,s,a,null,t)}catch(h){c=h}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Ut=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),Ht=function(s,l){var u="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f(function(t,r,o,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new h("Invalid "+i+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var u=e(s,l,o,i,a+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:f(function(e,t,n,r,o){var i=e[t];return s(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:f(function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return f(function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||c;return new h("Invalid "+o+" `"+i+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null})},node:f(function(e,t,n,r,o){return v(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return f(function(t,o,i,a,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],u=b(l);if("object"!==u)return new h("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+i+"`, expected an object.");for(var c in l)if(r(l,c)){var d=e(l,c,i,a,s+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?f(function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===x(t)?String(t):t});return new h("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(o)+" at index "+t+"."),a}return f(function(t,o,i,a,s){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,o,i,a,s,n);if(null==c)return null;c.data&&r(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return f(function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new h("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return g(o,i,a,u,x(c));var d=c(s,u,o,i,a+"."+u,n);if(d)return d}return null})},exact:function(e){return f(function(o,i,a,s,l){var u=o[i],c=b(u);if("object"!==c)return new h("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],e);for(var p in d){var f=e[p];if(r(e,p)&&"function"!=typeof f)return g(a,s,l,p,x(f));if(!f)return new h("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(u,p,a,s,l+"."+p,n);if(m)return m}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,u,d,p,f){if(u=u||c,p=p||s,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=u+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new h("The "+d+" `"+p+"` is marked as required in `"+u+"`, but its value is `null`."):new h("The "+d+" `"+p+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,s,u,d,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return f(function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new h("Invalid "+o+" `"+i+"` of type `"+x(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,o){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Ht}()(en.isElement,!0)}else Ft.exports=function(){if(Yt)return Gt;Yt=1;var e=Zt();function t(){}function n(){}return n.resetWarningCache=t,Gt=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();const tn=p(Ft.exports),nn={mask:tn.oneOfType([tn.array,tn.func,tn.string,tn.instanceOf(RegExp),tn.oneOf([Date,Number,at.Masked]),tn.instanceOf(at.Masked)]),value:tn.any,unmask:tn.oneOfType([tn.bool,tn.oneOf(["typed"])]),prepare:tn.func,prepareChar:tn.func,validate:tn.func,commit:tn.func,overwrite:tn.oneOfType([tn.bool,tn.oneOf(["shift"])]),eager:tn.oneOfType([tn.bool,tn.oneOf(["append","remove"])]),skipInvalid:tn.bool,onAccept:tn.func,onComplete:tn.func,placeholderChar:tn.string,displayChar:tn.string,lazy:tn.bool,definitions:tn.object,blocks:tn.object,enum:tn.arrayOf(tn.string),maxLength:tn.number,from:tn.number,to:tn.number,pattern:tn.string,format:tn.func,parse:tn.func,autofix:tn.oneOfType([tn.bool,tn.oneOf(["pad"])]),radix:tn.string,thousandsSeparator:tn.string,mapToRadix:tn.arrayOf(tn.string),scale:tn.number,normalizeZeros:tn.bool,padFractionalZeros:tn.bool,min:tn.oneOfType([tn.number,tn.instanceOf(Date)]),max:tn.oneOfType([tn.number,tn.instanceOf(Date)]),dispatch:tn.func,inputRef:tn.oneOfType([tn.func,tn.shape({current:tn.object})])},rn=Object.keys(nn).filter(e=>"value"!==e),on=["value","unmask","onAccept","onComplete","inputRef"],an=rn.filter(e=>on.indexOf(e)<0);const sn=function(e){var n;const r=((n=class extends t.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const e=this.props,t=this._extractMaskOptionsFromProps(e);var n;t.mask?this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t):(this.destroyMask(),"value"in e&&void 0!==e.value&&(null!=(n=this.element)&&n.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value))}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=at(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){const{...t}=e;return Object.keys(t).filter(e=>an.indexOf(e)<0).forEach(e=>{delete t[e]}),t}_extractNonMaskProps(e){const{...t}=e;return rn.forEach(e=>{"maxLength"!==e&&delete t[e]}),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return t.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,n.propTypes=void 0,n),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=nn,t.forwardRef((e,n)=>t.createElement(r,{...e,ref:n}))}(e=>{let{inputRef:n,...r}=e;return t.createElement("input",{...r,ref:n})}),ln=t.forwardRef((e,n)=>t.createElement(sn,{...e,ref:n})),un=[{mask:"000.000.000-00"},He];function cn({value:e,name:t,onChange:n,className:r,...o}){return b.jsx(ln,{className:`form-control ${Ge(e)?"is-invalid":""} ${r||""}`,mask:He.mask,definitions:He.definitions,onAccept:function(e,r,o){o&&n({target:{name:t,value:e.toUpperCase()}})},value:e,name:t,...o})}function dn(e,t,n){if(n){n({target:{name:t,value:(r=e.floatValue,!r||null==r||isNaN(r)?0:Number(r))}})}var r}const pn=({name:e,onChange:t,onClick:n,allowNegative:r=!1,...o})=>b.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:n=>dn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...o}),hn=({name:e,onChange:t,onClick:n,allowNegative:r=!0,decimalScale:o=2,...i})=>b.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:o,allowNegative:r,onValueChange:n=>dn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...i}),fn=({name:e,onChange:t,allowNegative:n=!0,decimalScale:r=2,...o})=>b.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:r,allowNegative:n,onValueChange:n=>dn(n,e,t),name:e,...o}),mn=({name:e,onChange:t,...n})=>b.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:n=>dn(n,e,t),...n}),gn=e=>b.jsx(c,{name:e.name,format:"##:##",mask:"_",value:e.value,onChange:e.onChange,className:"form-control",...e}),vn=e=>b.jsx(i.Input,{tag:c,name:e.name,format:"###.###.###-##",mask:"_",value:e.value,onChange:e.onChange,invalid:We(e.value),...e}),bn=e=>b.jsxs("select",{className:"form-select",name:e.name,value:e.value,onChange:e.onChange,...e,children:[b.jsx("option",{value:"",children:"- Selecione o estado -"}),b.jsx("option",{value:"EX",children:"Estrangeiro"}),b.jsx("option",{value:"AC",children:"Acre"}),b.jsx("option",{value:"AL",children:"Alagoas"}),b.jsx("option",{value:"AP",children:"Amapá"}),b.jsx("option",{value:"AM",children:"Amazonas"}),b.jsx("option",{value:"BA",children:"Bahia"}),b.jsx("option",{value:"CE",children:"Ceará"}),b.jsx("option",{value:"DF",children:"Distrito Federal"}),b.jsx("option",{value:"ES",children:"Espírito Santo"}),b.jsx("option",{value:"GO",children:"Goiás"}),b.jsx("option",{value:"MA",children:"Maranhão"}),b.jsx("option",{value:"MT",children:"Mato Grosso"}),b.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),b.jsx("option",{value:"MG",children:"Minas Gerais"}),b.jsx("option",{value:"PA",children:"Pará"}),b.jsx("option",{value:"PB",children:"Paraíba"}),b.jsx("option",{value:"PR",children:"Paraná"}),b.jsx("option",{value:"PE",children:"Pernambuco"}),b.jsx("option",{value:"PI",children:"Piauí"}),b.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),b.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),b.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),b.jsx("option",{value:"RO",children:"Rondônia"}),b.jsx("option",{value:"RR",children:"Roraima"}),b.jsx("option",{value:"SC",children:"Santa Catarina"}),b.jsx("option",{value:"SP",children:"São Paulo"}),b.jsx("option",{value:"SE",children:"Sergipe"}),b.jsx("option",{value:"TO",children:"Tocantins"})]});function xn({innerRef:e,loading:t,page:n,pages:r,...o}){return b.jsx("div",{className:"footer-load-more--container",ref:e,hidden:n>=r,...o,children:t&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Loading..."})}),"Carregando..."]})})}const yn={q:"",page:1};function kn({isOpen:e,setOpen:r,title:o="Pesquisar",placeHolder:i="Digite o que deseja pesquisar",maxWidth:a=800,searchInit:s,route:l,keyField:u,fields:c,renderLine:d,onClick:p,helpLink:h}){var f,m;const g=t.useRef(null),[v]=t.useState(`box-inp-${n.random(1e4)}`),[x,y]=t.useState([]),[k,_]=t.useState(""),[C,j]=t.useState({...yn,q:s||""}),[w,S]=t.useState(!1),[E,N]=Se({url:l,params:{...C,limit:n.isDesktop()?28:10},onTerminated:e=>{e.error?_(e.error):e.data instanceof Array?(S(!1),y(e.data)):(S(!0),y(t=>[...t,...e.data.data]))}});function A(){if(!C.q)return _("Informe o que deseja pesquisar!");y([]),C.page>1?j({...C,page:1}):E(),T()}function T(){var e;n.isDesktop()&&(null==(e=document.querySelector(`#${v}`))||e.focus())}return t.useEffect(()=>{C.q.length>0&&E()},[C.page]),t.useEffect(()=>{const e=g.current;if(!e)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&function(){var e;let t=C.page+1;if(t>(null==(e=N.data)?void 0:e.pages)||N.loading||0==x.length)return;N.data||(t=1);j({...C,page:t})}()})});return t.observe(e),()=>t.unobserve(e)},[x]),e?b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:N.loading}),b.jsxs(Fe,{title:o,maxWidth:a,visible:!0,setVisible:r,children:[b.jsx(Re,{helpLink:h,setVisible:r,children:o}),b.jsx(Oe,{children:b.jsxs(De,{children:[b.jsx("div",{className:"my-2",children:b.jsx(Ae,{search:C.q,setSearch:e=>j({...C,q:e}),fnSearch:A,placeHolder:i,onKeyDown:function(e){13===e.keyCode&&(e.preventDefault(),A())},autoFocus:n.isDesktop(),id:v})}),b.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=N.data)?void 0:f.length)&&b.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),x&&b.jsx("table",{children:b.jsx("tbody",{children:null==x?void 0:x.map((e,t)=>b.jsx("tr",{onClick:()=>p(e[u],e),children:d?d(e):c.map((t,n)=>{let r;return r=0==n?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},b.jsx("td",{style:r,children:e[t]},n)})},t))})}),w&&b.jsx(xn,{innerRef:g,loading:N.loading,page:C.page,pages:null==(m=N.data)?void 0:m.pages})]})]})})]}),k&&b.jsx(F,{onConfirm:()=>{_(),T()},children:k})]}):null}function _n({children:e,findTitle:n,findPlaceHolder:r,findRoute:o,findKeyField:i,findFields:a,findRenderLine:s,findOnSelect:l,...u}){const[c,d]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...u,children:[b.jsxs("option",{value:0,children:["- ",n," -"]}),e]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:()=>d(!0),children:b.jsx(q,{})})]}),c&&b.jsx(kn,{title:n,placeHolder:r,fields:a,keyField:i,route:o,isOpen:!0,setOpen:d,renderLine:s,onClick:(e,t)=>{l(e,t),d(!1)}})]})}const Cn=o.div`
591
591
  position: relative;
592
592
 
593
593
  input {
@@ -613,9 +613,9 @@
613
613
  color: ${({disabled:e})=>e?"currentColor":"var(--bs-primary)"};
614
614
  }
615
615
  }
616
- `;const _n=s.div`
616
+ `;const jn=o.div`
617
617
  display: inline-block;
618
- `,wn=s.span`
618
+ `,wn=o.span`
619
619
  color: ${e=>e.disabled?"silver":"#333"};
620
620
  display: flex;
621
621
  align-items: center;
@@ -625,7 +625,9 @@
625
625
  span {
626
626
  font-size: 20px;
627
627
  }
628
- `;const Sn=s.div`
628
+ `;
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&&lt(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`
629
631
  --toggle-color-on: #4169ed;
630
632
  --toggle-color-off: #666;
631
633
  --toggle-color-inactive: #999;
@@ -666,7 +668,7 @@
666
668
  font-weight: bold;
667
669
  color: var(--toggle-color-${e=>e.disabled?"inactive":"text"});
668
670
  }
669
- `;const En=s.main`
671
+ `;const Hr=o.main`
670
672
  height: calc(100% - 55px);
671
673
  overflow-y: scroll;
672
674
  overflow-x: hidden;
@@ -710,7 +712,7 @@
710
712
  max-width: ${({hasMaxWidth:e})=>e?"1840px":"auto"};
711
713
  margin: 12px auto 20px;
712
714
  }
713
- `;const Nn=s.div`
715
+ `;const Wr=o.div`
714
716
  display: flex;
715
717
  flex-direction: column;
716
718
  gap: var(--form-desk-gap);
@@ -774,7 +776,7 @@
774
776
  }
775
777
  }
776
778
  }
777
- `;const In={id:"",caption:"",title:"",isOpen:!1,isVisible:!1},An=t.createContext(null);function Fn(e){let t=!1;for(const n of e)n.isOpen=!1,n.isVisible&&!t&&(n.isOpen=!0,t=!0)}function Tn(){return t.useContext(An)}function Dn({isMultine:e}){const{tabs:t,selectTab:n}=Tn(),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 Bn=s.div`
779
+ `;const Gr={id:"",caption:"",title:"",isOpen:!1,isVisible:!1},Yr=t.createContext(null);function Kr(e){let t=!1;for(const n of e)n.isOpen=!1,n.isVisible&&!t&&(n.isOpen=!0,t=!0)}function Xr(){return t.useContext(Yr)}function Jr({isMultine:e}){const{tabs:t,selectTab:n}=Xr(),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 Zr=o.div`
778
780
  /* margin: ${({noMargin:e})=>e?"0":"5px 0 8px"}; */
779
781
  border: 1px solid var(--pn-color-border);
780
782
  border-radius: ${e=>e.open?"0 0 var(--pn-border-radius) var(--pn-border-radius)":"0"};
@@ -858,13 +860,13 @@
858
860
  }
859
861
  }
860
862
  }
861
- `;function On(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 Rn={exports:{}};
863
+ `;function Qr(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 eo={exports:{}};
862
864
  /*!
863
865
  localForage -- Offline Storage, Improved
864
866
  Version 1.10.0
865
867
  https://localforage.github.io/localForage
866
868
  (c) 2013-2017 Mozilla, Apache License 2.0
867
- */Rn.exports=function e(t,n,r){function s(a,o){if(!n[a]){if(!t[a]){if(!o&&On)return On(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 s(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=On,a=0;a<r.length;a++)s(r[a]);return s}({1:[function(e,t,n){(function(e){var n,r,s=e.MutationObserver||e.WebKitMutationObserver;if(s){var i=0,a=new s(c),o=e.document.createTextNode("");a.observe(o,{characterData:!0}),n=function(){o.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 s(){}var i={},a=["REJECTED"],o=["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!==s&&p(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(s){return i.reject(e,s)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function s(t){n||(n=!0,i.resolve(e,t))}function a(){t(s,r)}var o=f(a);"error"===o.status&&r(o.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(s),e)}function v(e){var t=new this(s);return i.reject(t,e)}function g(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),o=0,l=-1,u=new this(s);++l<n;)c(e[l],l);return u;function c(e,s){function l(e){a[s]=e,++o!==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,o=new this(s);++a<n;)l(e[a]);return o;function l(e){t.resolve(e).then(function(e){r||(r=!0,i.resolve(o,e))},function(e){r||(r=!0,i.reject(o,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===o||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(s);return this.state!==l?d(n,this.state===o?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(h,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=o,e.outcome=t;for(var s=-1,a=e.queue.length;++s<a;)e.queue[s].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=v,u.all=g,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 s(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 o(){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(s){if("TypeError"!==s.name)throw s;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 h(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function p(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,v={},g=Object.prototype.toString,b="readonly",x="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),s=0;s<t;s++)r[s]=e.charCodeAt(s);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 j(e){return"boolean"==typeof m?u.resolve(m):k(e).then(function(e){return m=e})}function C(e){var t=v[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 _(e){var t=v[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var n=v[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new u(function(n,r){if(v[e.name]=v[e.name]||R(),e.db){if(!t)return n(e.db);C(e),e.db.close()}var s=[e.name];t&&s.push(e.version);var i=a.open.apply(a,s);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),_(e)}})}function E(e){return S(e,!1)}function N(e){return S(e,!0)}function I(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,s=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),s||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function A(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 F(e){return l([y(atob(e.data))],{type:e.type})}function T(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,n=t._initReady().then(function(){var e=v[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function B(e){C(e);for(var t=v[e.name],n=t.forages,r=0;r<n.length;r++){var s=n[r];s._dbInfo.db&&(s._dbInfo.db.close(),s._dbInfo.db=null)}return e.db=null,E(e).then(function(t){return e.db=t,I(e)?N(e):t}).then(function(r){e.db=t.db=r;for(var s=0;s<n.length;s++)n[s]._dbInfo.db=r}).catch(function(t){throw w(e,t),t})}function O(e,t,n,r){void 0===r&&(r=1);try{var s=e.db.transaction(e.storeName,t);n(null,s)}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 B(e).then(function(){O(e,t,n,r-1)})}).catch(n);n(i)}}function R(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function M(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var s=v[n.name];s||(s=R(),v[n.name]=s),s.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var i=[];function a(){return u.resolve()}for(var o=0;o<s.forages.length;o++){var l=s.forages[o];l!==t&&i.push(l._initReady().catch(a))}var c=s.forages.slice(0);return u.all(i).then(function(){return n.db=s.db,E(n)}).then(function(e){return n.db=e,I(n,t._defaultConfig.version)?N(n):e}).then(function(e){n.db=s.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 V(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){O(n._dbInfo,b,function(s,i){if(s)return r(s);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),T(e)&&(e=F(e)),t(e)},a.onerror=function(){r(a.error)}}catch(o){r(o)}})}).catch(r)});return c(r,t),r}function P(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){O(n._dbInfo,b,function(s,i){if(s)return r(s);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),o=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;T(r)&&(r=F(r));var s=e(r,n.key,o++);void 0!==s?t(s):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(l){r(l)}})}).catch(r)});return c(r,t),r}function L(e,t,n){var r=this;e=h(e);var s=new u(function(n,s){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===g.call(t)?j(i.db).then(function(e){return e?t:A(t)}):t}).then(function(t){O(r._dbInfo,x,function(i,a){if(i)return s(i);try{var o=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=o.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;s(e)}}catch(u){s(u)}})}).catch(s)});return c(s,n),s}function $(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){O(n._dbInfo,x,function(s,i){if(s)return r(s);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(o){r(o)}})}).catch(r)});return c(r,t),r}function z(e){var t=this,n=new u(function(e,n){t.ready().then(function(){O(t._dbInfo,x,function(r,s){if(r)return n(r);try{var i=s.objectStore(t._dbInfo.storeName).clear();s.oncomplete=function(){e()},s.onabort=s.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(){O(t._dbInfo,b,function(r,s){if(r)return n(r);try{var i=s.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(){O(n._dbInfo,b,function(s,i){if(s)return r(s);try{var a=i.objectStore(n._dbInfo.storeName),o=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||o?t(n.key):(o=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(u){r(u)}})}).catch(r)});return c(r,t),r}function W(e){var t=this,n=new u(function(e,n){t.ready().then(function(){O(t._dbInfo,b,function(r,s){if(r)return n(r);try{var i=s.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(o){n(o)}})}).catch(n)});return c(n,e),n}function H(e,t){t=p.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,s=this;if(e.name){var i=e.name===n.name&&s._dbInfo.db?u.resolve(s._dbInfo.db):E(e).then(function(t){var n=v[e.name],r=n.forages;n.db=t;for(var s=0;s<r.length;s++)r[s]._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=v[e.name],s=r.forages;t.close();for(var i=0;i<s.length;i++){var o=s[i];o._dbInfo.db=null,o._dbInfo.version=n}return new u(function(t,r){var s=a.open(e.name,n);s.onerror=function(e){s.result.close(),r(e)},s.onupgradeneeded=function(){s.result.deleteObjectStore(e.storeName)},s.onsuccess=function(){var e=s.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<s.length;t++){var n=s[t];n._dbInfo.db=e,_(n._dbInfo)}}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})}}):i.then(function(t){C(e);var n=v[e.name],r=n.forages;t.close();for(var s=0;s<r.length;s++)r[s]._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++)_(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 K={_driver:"asyncStorage",_initStorage:M,_support:o(),iterate:P,getItem:V,setItem:L,removeItem:$,clear:z,length:U,key:q,keys:W,dropInstance:H};function G(){return"function"==typeof openDatabase}var Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",J="~~local_forage_type~",X=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",Q=Z.length,ee="arbf",te="blob",ne="si08",re="ui08",se="uic8",ie="si16",ae="si32",oe="ur16",le="ui32",ue="fl32",ce="fl64",de=Q+ee.length,he=Object.prototype.toString;function pe(e){var t,n,r,s,i,a=.75*e.length,o=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<o;t+=4)n=Y.indexOf(e[t]),r=Y.indexOf(e[t+1]),s=Y.indexOf(e[t+2]),i=Y.indexOf(e[t+3]),c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|s>>2,c[l++]=(3&s)<<6|63&i;return u}function fe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=Y[n[t]>>2],r+=Y[(3&n[t])<<4|n[t+1]>>4],r+=Y[(15&n[t+1])<<2|n[t+2]>>6],r+=Y[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=he.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===he.call(e.buffer))){var r,s=Z;e instanceof ArrayBuffer?(r=e,s+=ee):(r=e.buffer,"[object Int8Array]"===n?s+=ne:"[object Uint8Array]"===n?s+=re:"[object Uint8ClampedArray]"===n?s+=se:"[object Int16Array]"===n?s+=ie:"[object Uint16Array]"===n?s+=oe:"[object Int32Array]"===n?s+=ae:"[object Uint32Array]"===n?s+=le:"[object Float32Array]"===n?s+=ue:"[object Float64Array]"===n?s+=ce:t(new Error("Failed to get type for BinaryArray"))),t(s+fe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+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 ve(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&&X.test(n)){var s=n.match(X);t=s[1],n=n.substring(s[0].length)}var i=pe(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 se:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case oe: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 ge={serialize:me,deserialize:ve,stringToBuffer:pe,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 s=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(s){return r(s)}n.db.transaction(function(s){be(s,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=ge,s}function ye(e,t,n,r,s,i){e.executeSql(n,r,s,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,o){o.rows.length?i(e,a):be(e,t,function(){e.executeSql(n,r,s,i)},i)},i):i(e,a)},i)}function ke(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var s=n._dbInfo;s.db.transaction(function(n){ye(n,s,"SELECT * FROM "+s.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=s.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function je(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var s=n._dbInfo;s.db.transaction(function(n){ye(n,s,"SELECT * FROM "+s.storeName,[],function(n,r){for(var i=r.rows,a=i.length,o=0;o<a;o++){var l=i.item(o),u=l.value;if(u&&(u=s.serializer.deserialize(u)),void 0!==(u=e(u,l.key,o+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 s=this;e=h(e);var i=new u(function(i,a){s.ready().then(function(){void 0===t&&(t=null);var o=t,l=s._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(o)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(Ce.apply(s,[e,o,n,r-1]));a(t)}})})}).catch(a)});return c(i,n),i}function _e(e,t,n){return Ce.apply(this,[e,t,n,1])}function we(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var s=n._dbInfo;s.db.transaction(function(n){ye(n,s,"DELETE FROM "+s.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 s=n._dbInfo;s.db.transaction(function(n){ye(n,s,"SELECT key FROM "+s.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 Ie(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=[],s=0;s<n.rows.length;s++)r.push(n.rows.item(s).key);e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ae(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 s=[],i=0;i<r.rows.length;i++)s.push(r.rows.item(i).name);t({db:e,storeNames:s})},function(e,t){n(t)})},function(e){n(e)})})}function Fe(e,t){t=p.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,s=this;return c(r=e.name?new u(function(t){var r;r=e.name===n.name?s._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Ae(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function s(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,o=e.storeNames.length;a<o;a++)i.push(s(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 Te={_driver:"webSQLStorage",_initStorage:xe,_support:G(),iterate:je,getItem:ke,setItem:_e,removeItem:we,clear:Se,length:Ee,key:Ne,keys:Ie,dropInstance:Fe};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Be(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Oe(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Re(){return!Oe()||localStorage.length>0}function Me(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Be(e,t._defaultConfig),Re()?(t._dbInfo=n,n.serializer=ge,u.resolve()):u.reject()}function Ve(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 Pe(e,t){var n=this;e=h(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 Le(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,s=r.length,i=localStorage.length,a=1,o=0;o<i;o++){var l=localStorage.key(o);if(0===l.indexOf(r)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,l.substring(s),a++)))return u}}});return c(r,t),r}function $e(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(s){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r}function ze(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],s=0;s<n;s++){var i=localStorage.key(s);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=h(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return c(r,t),r}function We(e,t,n){var r=this;e=h(e);var s=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(s,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),s(n)}catch(o){"QuotaExceededError"!==o.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==o.name||i(o),i(o)}})})});return c(s,n),s}function He(e,t){if(t=p.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,s=this;return c(r=e.name?new u(function(t){e.storeName?t(Be(e,s._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 Ke={_driver:"localStorageWrapper",_initStorage:Me,_support:De(),iterate:Le,getItem:Pe,setItem:We,removeItem:qe,clear:Ve,length:Ue,key:$e,keys:ze,dropInstance:He},Ge=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ye=function(e,t){for(var n=e.length,r=0;r<n;){if(Ge(e[r],t))return!0;r++}return!1},Je=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Xe={},Ze={},Qe={INDEXEDDB:K,WEBSQL:Te,LOCALSTORAGE:Ke},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 st(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)&&(Je(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 s(this,e),Qe)if(Qe.hasOwnProperty(n)){var r=Qe[n],i=r._driver;this[n]=i,Xe[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,s=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(s);for(var i=nt.concat("_initStorage"),a=0,o=i.length;a<o;a++){var l=i[a];if((!Ye(tt,l)||e[l])&&"function"!=typeof e[l])return void n(s)}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 s=tt[n];e[s]||(e[s]=t(s))}};d();var h=function(n){Xe[r]&&console.info("Redefining LocalForage driver: "+r),Xe[r]=e,Ze[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(p){n(p)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Xe[e]?u.resolve(Xe[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(ge);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;Je(e)||(e=[e]);var s=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 o(e){return function(){var t=0;function n(){for(;t<e.length;){var s=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(s).then(a).catch(n)}i();var o=new Error("No available storage method found.");return r._driverSet=u.reject(o),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=s[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=o(s)})}).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 s=e[n];this.supports(s)&&t.push(s)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)st(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),ot=new at;t.exports=ot},{3:3}]},{},[4])(4);const Mn=h(Rn.exports),Vn=Mn.createInstance({name:"report",storeName:"report"});function Pn(e,n){const[r,s]=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,s]}function Ln(e){let t=e.url;if(e.params){t=t+"?"+new URLSearchParams(e.params).toString()}return t}Mn.config({driver:Mn.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const $n={init:async e=>{let t=await Mn.getItem(Ln(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 Mn.setItem(Ln(t),n)}catch(n){console.info("Cache: ",n)}},clear:async(e=3)=>{const t=864e5*e,n=await Mn.keys(),r=new Date;for(const s of n){const e=await Mn.getItem(s);if(e&&e.create_at){r-new Date(e.create_at)>=t&&await Mn.removeItem(s)}}},clearAll:()=>{Mn.clear()}},zn=s.div`
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`
868
870
  display: flex;
869
871
  align-items: center;
870
872
  gap: 0 5px;
@@ -894,7 +896,7 @@
894
896
  &:nth-child(1) {
895
897
  border-top: 0;
896
898
  }
897
- `,Un=s(a.Link)`
899
+ `,so=o(a.Link)`
898
900
  position: relative;
899
901
 
900
902
  display: grid;
@@ -964,7 +966,7 @@
964
966
  top: 3px;
965
967
  }
966
968
  }
967
- `,qn=s.hr`
969
+ `,lo=o.hr`
968
970
  margin: 4px 12px;
969
- `;function Wn({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:s,enabledFavorite:i}){var a;const{versionApp:o}=S();if((null==(a=e.menus)?void 0:a.length)>0)return b.jsxs(b.Fragment,{children:[b.jsxs(zn,{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(Wn,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:s,enabledFavorite:i},a))})]});if(e.route){let n=s(e.route),a=null==e?void 0:e.version;return a&&(a=Boolean(o.substring(0,a.length)===a)),b.jsxs(Un,{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(qn,{}):null}const Hn="sys/nav/closed";const Kn=({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 Gn({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 Yn="sys/nav/closed";e.Alerta=T,e.Aviso=function({onConfirm:e,text:t="",children:n}){return b.jsx(F,{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(W,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return b.jsx(i.Button,{size:"sm",color:"primary",title:e,children:b.jsx(Y,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return b.jsx(i.Button,{size:"sm",color:"danger",title:e,children:b.jsx(J,{})})},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(G,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:s,btnSaveDisabled:o,onCancel:l,onConfirm:u}){const c=a.useHistory();return b.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(s),children:[b.jsxs(i.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:o&&1==o,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:s=!0,onChange:i,noMargin:a,children:o,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&i&&i(e,u)},[u]),s?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:o})]}):null},e.BoxSearch=kn,e.ButtonBack=oe,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,s]=t.useState(!1);function i(){var e;s((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"}),s(!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 s=r.disabled||!e;return b.jsx(Pe,{disabled:s,children:b.jsxs("label",{children:[b.jsx(i.Input,{type:"checkbox",disabled:s,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[s,i]=t.useState(!1);return t.useEffect(()=>()=>{ue&&clearTimeout(ue)},[]),b.jsxs("div",{className:`clipboard-area--container ${s&&" 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:s?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:s}){return b.jsx(F,{type:I,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:s,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:s,minHeight:i=40,...a}){return b.jsxs("div",{className:"di-box "+(s||""),...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=R,e.DynamicCounter=function({valor:e=0,time:r=25,format:s,currency:i}){const[a,o]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;o(r=>{let s=r+n;return s>e&&(s=e),s===e&&clearInterval(t),s})},r);return()=>clearInterval(t)},[e,r]),s?n.formatValor(a,i?2:0,Boolean(i)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:s="8px",...i}){return b.jsx(Nn,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":s},sizeBreak:n,...i,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...s}){return b.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...s,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:s="",classNameCol:i="",extraComp:a,inpWidth:o,...l}){const u={};return o&&(u["--form-desk-line-short-width"]=o),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 ${s}`,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:s=1200,goBack:i,goHome:a,onClose:o,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:s},children:b.jsx(ve,{title:e,count:n,codigo:r,goBack:i,goHome:a,onClose:o,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,s;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==(s=null==n?void 0:n.current)?void 0:s.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,s;-1!==e.indexOf("T")?(r=e.split("T"),s=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(s=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),s&&t&&(r=r+" "+s),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(Le(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(Le(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(Le(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=he,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=Y,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=J,e.IconeFechar=Z,e.IconeFecharCircle=()=>b.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=Q,e.IconeIncluir=G,e.IconeLogin=()=>b.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=K,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=X,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(gn,{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(vn,{onClick:n,...t});case"percent":return b.jsx(fn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return b.jsx(pn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return b.jsx(hn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return b.jsx(jn,{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:s,autoFocus:i,...a}){const[o,l]=t.useState(!1),u=async t=>{l(!0);const s=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);!s.erro&&e&&n&&n({...e,ende:s.logradouro,bairro:s.bairro,cida:s.localidade,uf:s.uf}),l(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:o,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:s,autoFocus:i}),b.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:s,children:b.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:s})=>b.jsx(_n,{children:b.jsxs(wn,{disabled:e,onClick:function(){if(!e&&s){s({target:{name:n,checked:!r}})}},children:[b.jsxs("span",{children:[r&&b.jsx($,{color:e&&"silver"}),!r&&b.jsx(z,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=cn,e.InputCodigo=mn,e.InputColor=ne,e.InputCpf=gn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...s}){return b.jsx(ln,{className:`form-control ${Ge(t)?"is-invalid":""} ${r||""}`,mask:un,onAccept:function(t,r,s){s&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...s})},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=vn,e.InputOff=function({campo:e,dados:n,setDados:r,type:s,className:i,disabled:a,...o}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,h]=t.useState(!1),p="password"==s;return t.useEffect(()=>{h(!1)},[a]),b.jsxs("div",{className:"input-off",children:[b.jsx("input",{className:`form-control ${i} ${p&&!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,...o}),"password"==s&&b.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||h(!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[s,i]=t.useState(!1);return b.jsxs(Cn,{disabled:e,children:[b.jsx("input",{type:s?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),b.jsx("i",{className:s?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||i(!s)},title:e?"":(s?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=fn,e.InputPesquisa=Ie,e.InputQRCode=function({value:e,setValue:n}){const[r,s]=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(H,{})}),b.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>s(!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(Ve,{setVisible:s,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=pn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...s})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...s,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=hn,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:s,useTheme:i,testDomain:a})=>{const o="boolean"==typeof i&&i,[l,u]=t.useState(()=>{let e="";if(o){let t=localStorage.getItem(w);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=Pn("sys/reportType",0),[h,p]=t.useState([]),[f,m]=t.useState(!1),v=e=>{let t=h.find(t=>t.modalId===e);t&&t.setVisible(!1),p(t=>t.filter(t=>t.modalId!==e))},g=t.useCallback(e=>{"Escape"===e.key&&0!=h.length&&v(h[h.length-1].modalId)},[h]);j();const x=C(a);return t.useEffect(()=>{o&&(localStorage.setItem(w,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,o]),t.useEffect(()=>(window.addEventListener("keydown",g,!1),()=>window.removeEventListener("keydown",g,!1)),[h]),b.jsxs(_.Provider,{value:{versionApp:s,addModal:(e,t)=>{p(n=>{let r=[...n],s=r.findIndex(t=>t.modalId===e);return s>=0?r[s]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:v,clearModals:()=>{h.forEach(e=>{v(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:o,reportType:c,setReportType:d},children:[x,r]})},e.LinkToEmail=xe,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let s="+";return(null==r?void 0:r.startsWith("+"))||(s="+55"),s+=r.replace(/\D/g,""),b.jsx("a",{href:`tel:${s}`,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:s}){if(!r)return null;let[,i]=t.split("."),[a,o]=n.split(".");return o!=i&&(n=[a,i].join(".")),b.jsx(Ne,{url:e,file:t,fileTo:n,setLoading:s})},e.Modal=Te,e.ModalBody=De,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:s,alignTop:i,paddingBottom:a=10,helpLink:o,count:l,...u}){return e?b.jsxs(Te,{alignTop:i,setVisible:t,visible:e,...u,children:[b.jsxs(Oe,{helpLink:o,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(Be,{children:b.jsx(De,{style:{paddingBottom:a},children:s})})]}):null},e.ModalContent=Be,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:s,alignTop:a,helpLink:o}){return b.jsxs(Te,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[b.jsx(Oe,{helpLink:o,setVisible:t,children:e}),b.jsx(Be,{children:b.jsxs(De,{className:"mod-filter--container",children:[s,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=Oe,e.Navbar=function({menusConfig:{brand:e,company:r,menus:s,routes:i,user:o,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),h=t.useRef(),{theme:p,setTheme:f,canChangeTheme:m}=S(),[v,g]=t.useState(!1),[x,y]=t.useState(""),[k,j]=t.useState([]),[C,_]=t.useState([]);let w=[];const E=localStorage.getItem(Hn);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):_(e.data)}}),[I]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function A(){g(!1)}function F(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Hn,JSON.stringify(n)),j(t)}function T(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)}),j(t),F(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&&(I({data:r}),_(r))}function B(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&N()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{s.forEach((n,r)=>{var s;if(r>0&&0!==(null==(s=null==n?void 0:n.menus)?void 0:s.length)){let s=n.menus.findIndex(e=>e.route===t.route);if(s>=0){let i=n.menus[s];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(s).padStart(2,0)})}}})}),"Favoritos"===s[0].caption&&(s[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),j(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}(s))},[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())},[v]),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"+(v?" opened":""),title:"Abrir menu de opções",onClick:()=>g(!v),children:v?b.jsx(de,{width:20,height:20}):b.jsx(he,{width:20,height:20})}),b.jsxs("div",{className:"content",children:[b.jsx(a.Link,{to:i.home,className:"brand",onClick:A,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==o?void 0:o.title," "]}),b.jsx("strong",{children:null==o?void 0:o.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"==p?"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",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:()=>g(!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:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),v&&b.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&A()},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),g(!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:()=>T(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"navbar--menu-area",ref:h,children:k.map((e,t)=>b.jsx(Wn,{opc:e,closeMenu:A,clickGroup:F,clickFavorite:D,isFavorite:B,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"menu-footer",children:b.jsx(a.Link,{to:i.exit,onClick:A,children:b.jsxs("div",{className:"user",children:[b.jsx("span",{className:"name",title:`Último acesso em ${null==o?void 0:o.lastAccess}`,children:null==o?void 0:o.name}),b.jsxs("span",{className:"sair",children:["Sair ",b.jsx(K,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:s,routes:i,user:o,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:h,setTheme:p,canChangeTheme:f}=S(),[m,v]=t.useState(!1),[g,x]=t.useState(""),[y,k]=t.useState([]),[j,C]=t.useState([]);let _=[];const w=localStorage.getItem(Yn);w&&(_=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 I(){v(!1)}function A(e){let t=[...y],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Yn,JSON.stringify(n)),k(t)}function F(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),A(null)}function T(e,t){e.stopPropagation(),e.preventDefault();const n=j.filter(e=>e.route!==t.route);var r;n.length===j.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 j.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==j||j.forEach(t=>{s.forEach((n,r)=>{var s;if(r>0&&0!==(null==(s=null==n?void 0:n.menus)?void 0:s.length)){let s=n.menus.findIndex(e=>e.route===t.route);if(s>=0){let i=n.menus[s];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(s).padStart(2,0)})}}})}),"Favoritos"===s[0].caption&&(s[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:!_.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(g.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(g.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})}),g&&(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}(s))},[g,j]),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(Gn,{isOpen:m,setIsOpen:v}),b.jsxs("div",{className:"mu--content",children:[b.jsx(Kn,{isOpen:m,setIsOpen:v,brand:e,closeMenu:I,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==o?void 0:o.title," ",b.jsx("strong",{children:null==o?void 0:o.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"==h?"dark":"light";p(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:()=>v(!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:()=>v(!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&&I()},children:b.jsxs("div",{className:"nv-menu--content","data-open":m,children:[b.jsxs("div",{className:"nv-menu--brand",children:[b.jsx(Gn,{isOpen:m,setIsOpen:v,menuClose:n.isMobile()}),b.jsx(Kn,{isOpen:m,setIsOpen:v,brand:e,closeMenu:I,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:g,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),v(!1);break}}}}),g&&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:()=>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:"nv-menu--opcoes",ref:c,children:y.map((e,t)=>b.jsx(Wn,{opc:e,closeMenu:I,clickGroup:A,clickFavorite:T,isFavorite:D,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"nv-menu--footer",children:b.jsx(a.Link,{to:i.exit,onClick:I,children:b.jsxs("div",{className:"foo-user",children:[b.jsx("span",{className:"foo-name",children:null==o?void 0:o.name}),b.jsxs("span",{className:"foo-sair",children:["Sair ",b.jsx(K,{})]})]})})}),b.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==o?void 0:o.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:s=16,limit:i=16,setLimit:a,align:o="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(s)||e.push(s),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==i&&void 0!==s;function c(t){var s;t!==n&&t>=1&&t<=e&&(null==(s=document.querySelector("main"))||s.scrollTo(0,0),r(t))}return b.jsx("div",{className:"pgn-content","data-fixed":i>=30?"true":"false","data-align":o,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=ve,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:s,children:i,marginBottom:a=0,degrade:o=!1,...l}){return b.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:s,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":o?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":o?"0px":"6px"},...l,children:[o&&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=pe,e.PrintButtons=function({onClose:e,showTypes:n}){const{reportType:r,setReportType:s}=S(),i=[{title:"PDF",icon:b.jsx("i",{className:"fa-solid fa-file-pdf"}),onClick(){s(0)}},{title:"Excel",icon:b.jsx("i",{className:"fa-solid fa-file-excel"}),onClick(){s(1)}},{title:"Word",icon:b.jsx("i",{className:"fa-solid fa-file-word"}),onClick(){s(2)}},{title:"Texto",icon:b.jsx("i",{className:"fa-regular fa-file-lines"}),onClick(){s(3)}}];return t.useEffect(()=>{n||s(0)},[]),b.jsxs("div",{className:"print-btn--container",children:[n&&b.jsx(R,{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=Ve,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:s,options:a=[],disabled:o}){return b.jsxs("div",{className:"rad-group--container "+e,style:{color:o?"var(--bs-secondary)":"currentColor"},children:[b.jsx("div",{className:"group-radio--label",children:t}),b.jsx("div",{className:"group-radio--body",children:a.map((e,t)=>b.jsxs("label",{children:[b.jsx(i.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>s(t),disabled:o}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return b.jsx(En,{hasMaxWidth:t,children:b.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:s="",innerRef:i,...a}){const[o,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({...In,...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)?Fn(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let s=n-1;s>=0;s-=1){const t=e[s];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||Fn(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}))},[]),h=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),p=t.useCallback(e=>o.find(t=>t.id==e),[o]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?Fn(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=p(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,p]),b.jsx(An.Provider,{value:{tabs:o,updateOrInsertTab:u,removeTab:c,findTab:p,selectTab:d,toggleTab:h},children:b.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[b.jsx(Dn,{isMultine:n}),b.jsx("div",{className:`tab-control--content ${s}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:s,isVisible:i=!0,children:a,...o}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=Tn(),h=t.useMemo(()=>e||n.random(999999),[]),p=l(h);return t.useEffect(()=>()=>c(h),[]),t.useEffect(()=>{d({id:h,caption:s,title:r,isVisible:i})},[d,r,s,i]),i?b.jsxs(Bn,{open:(null==p?void 0:p.isOpen)&&(null==p?void 0:p.isVisible),"data-in-tab-sheet":null!=p?"true":"false",...o,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>u(h),children:[r," ",b.jsx("i",{className:"fas fa-chevron-down"})]})}),b.jsx("div",{className:`bi-body ${(null==p?void 0:p.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:s,dados:a,alignTop:o,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:h,onClick:p,fixedHeader:f,clickCanEdit:m,loading:v}){var g,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==(g=null==r?void 0:r.acoes)?void 0:g.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 j(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 v?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(B,{children:b.jsxs(O,{alignTop:o,sizeBreak:c,hasBorder:u,children:[b.jsx(P,{fixedHeader:f,colunas:t,incColActions:y}),b.jsx(L,{colunas:t,acoes:r,dados:a,opcoes:s,colorir:l,getLineColor:h,onClick:p||m?function(e,t){if(p){if(j(null==t?void 0:t.currentTarget))return;p(e,t)}else if(m&&n.isDesktop()){if(j(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}){return e&&"string"==typeof e&&e.replaceAll("\n","<br/>"),b.jsx("span",{dangerouslySetInnerHTML:{__html:e}})},e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:s,toRight:i,className:a="",...o}){return b.jsx(Sn,{checked:t,disabled:n,className:a,...o,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}})}})}),s&&b.jsx("span",{className:"title",children:s})]})})},e.cache=$n,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=V,e.getDataCol=M,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[s,i]=t.useState(n);return t.useEffect(()=>{Vn.getItem(e).then(t=>{t&&(t.versao==r?i(t.data):Vn.removeItem(e))})},[]),t.useEffect(()=>{Vn.setItem(e,{versao:r,data:s})},[s]),[s,i]},e.useLocalStorage=Pn,e.useLocalhostBadge=j,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,s]=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,s]},e.useTestDomainBadge=C,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
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"})});
970
972
  //# sourceMappingURL=jclib-ui.umd.js.map