@syncfy/authentication-widget 2.1.0 → 2.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.
|
@@ -691,7 +691,7 @@
|
|
|
691
691
|
*/$o(wG,_G,"app");function EG(){const t=Z5({apiKey:"AIzaSyC9JxQ4ULW2nC-tBNwsZ52OTQnS9mIeeS8",authDomain:"syncfy-widget.firebaseapp.com",projectId:"syncfy-widget",storageBucket:"syncfy-widget.appspot.com",messagingSenderId:"406921126981",appId:"1:406921126981:web:788d7d85203868101aaf2c",measurementId:"G-FYDLPN68N8"});RC(t),en("load")}function en(e,t){const r=RC();BC(r,e,{environment:void 0,eventAction:e,...t||{}})}var vm,PC;function SG(){if(PC)return vm;PC=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,M){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=M};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,l=new e(s),f=new e(s),d=new e(s);vm={Cache:e,split:v,normalizePath:h,setter:function(w){var M=h(w);return f.get(w)||f.set(w,function(B,D){for(var N=0,O=M.length,P=B;N<O-1;){var L=M[N];if(L==="__proto__"||L==="constructor"||L==="prototype")return B;P=P[M[N++]]}P[M[N]]=D})},getter:function(w,M){var k=h(w);return d.get(w)||d.set(w,function(D){for(var N=0,O=k.length;N<O;)if(D!=null||!M)D=D[k[N++]];else return;return D})},join:function(w){return w.reduce(function(M,k){return M+(g(k)||r.test(k)?"["+k+"]":(M?".":"")+k)},"")},forEach:function(w,M,k){b(Array.isArray(w)?w:v(w),M,k)}};function h(w){return l.get(w)||l.set(w,v(w).map(function(M){return M.replace(i,"$2")}))}function v(w){return w.match(t)||[""]}function b(w,M,k){var B=w.length,D,N,O,P;for(N=0;N<B;N++)D=w[N],D&&(T(D)&&(D='"'+D+'"'),P=g(D),O=!P&&/^\d+$/.test(D),M.call(k,D,P,O,N,w))}function g(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function y(w){return w.match(n)&&!w.match(r)}function _(w){return a.test(w)}function T(w){return!g(w)&&(y(w)||_(w))}return vm}var Os=SG(),mm,DC;function CG(){if(DC)return mm;DC=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],r=h=>h[0].toUpperCase()+h.slice(1),n=(h,v)=>t(h).join(v).toLowerCase(),a=h=>t(h).reduce((v,b)=>`${v}${v?b[0].toUpperCase()+b.slice(1).toLowerCase():b.toLowerCase()}`,"");return mm={words:t,upperFirst:r,camelCase:a,pascalCase:h=>r(a(h)),snakeCase:h=>n(h,"_"),kebabCase:h=>n(h,"-"),sentenceCase:h=>r(n(h," ")),titleCase:h=>t(h).map(r).join(" ")},mm}var gm=CG(),jd={exports:{}},LC;function MG(){if(LC)return jd.exports;LC=1,jd.exports=function(a){return e(t(a),a)},jd.exports.array=e;function e(a,i){var s=a.length,l=new Array(s),f={},d=s,h=r(i),v=n(a);for(i.forEach(function(g){if(!v.has(g[0])||!v.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)f[d]||b(a[d],d,new Set);return l;function b(g,y,_){if(_.has(g)){var T;try{T=", node was:"+JSON.stringify(g)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!v.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!f[y]){f[y]=!0;var w=h.get(g)||new Set;if(w=Array.from(w),y=w.length){_.add(g);do{var M=w[--y];b(M,v.get(M),_)}while(y);_.delete(g)}l[--s]=g}}}function t(a){for(var i=new Set,s=0,l=a.length;s<l;s++){var f=a[s];i.add(f[0]),i.add(f[1])}return Array.from(i)}function r(a){for(var i=new Map,s=0,l=a.length;s<l;s++){var f=a[s];i.has(f[0])||i.set(f[0],new Set),i.has(f[1])||i.set(f[1],new Set),i.get(f[0]).add(f[1])}return i}function n(a){for(var i=new Map,s=0,l=a.length;s<l;s++)i.set(a[s],s);return i}return jd.exports}var TG=MG();const AG=mi(TG),IG=Object.prototype.toString,kG=Error.prototype.toString,RG=RegExp.prototype.toString,BG=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",OG=/^Symbol\((.*)\)(.*)$/;function NG(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function xC(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return NG(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return BG.call(e).replace(OG,"Symbol($1)");const n=IG.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+kG.call(e)+"]":n==="RegExp"?RG.call(e):null}function ro(e,t){let r=xC(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=xC(this[n],t);return i!==null?i:a},2)}function FC(e){return e==null?[]:[].concat(e)}let qC,$C,UC,PG=/\$\{\s*(\w+)\s*\}/g;qC=Symbol.toStringTag;class zC{constructor(t,r,n,a){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[qC]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],FC(t).forEach(i=>{if(tn.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}$C=Symbol.hasInstance,UC=Symbol.toStringTag;class tn extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(PG,(a,i)=>ro(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){const s=new zC(t,r,n,a);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[UC]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,tn)}static[$C](t){return zC[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Sa={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${ro(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ro(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${ro(r,!0)}\``+a}},$n={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Uo={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ym={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},bm={isValue:"${path} field must be ${value}"},Kd={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Wd={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:Sa,string:$n,number:Uo,date:ym,object:Kd,array:Wd,boolean:bm,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.length<a)return`${t} tuple value has too few items, expected a length of ${a} but got ${r.length} for value: \`${ro(r,!0)}\``;if(r.length>a)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${ro(r,!0)}\``}return tn.formatError(Sa.notType,e)}}});const Qu=e=>e&&e.__isYupSchema__;class Gd{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,s=typeof n=="function"?n:(...l)=>l.every(f=>f===n);return new Gd(t,(l,f)=>{var d;let h=s(...l)?a:i;return(d=h?.(f))!=null?d:f})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r?.value,r?.parent,r?.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!Qu(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Yd={context:"$",value:"."};class Ns{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Yd.context,this.isValue=this.key[0]===Yd.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Yd.context:this.isValue?Yd.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Os.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ns.prototype.__isYupRef=!0;const Wi=e=>e==null;function Nl(e){function t({value:r,path:n="",options:a,originalValue:i,schema:s},l,f){const{name:d,test:h,params:v,message:b,skipAbsent:g}=e;let{parent:y,context:_,abortEarly:T=s.spec.abortEarly,disableStackTrace:w=s.spec.disableStackTrace}=a;const M={value:r,parent:y,context:_};function k(S={}){const o=VC(Object.assign({value:r,originalValue:i,label:s.spec.label,path:S.path||n,spec:s.spec,disableStackTrace:S.disableStackTrace||w},v,S.params),M),u=new tn(tn.formatError(S.message||b,o),r,o.path,S.type||d,o.disableStackTrace);return u.params=o,u}const B=T?l:f;let D={path:n,parent:y,type:d,from:a.from,createError:k,resolve(S){return HC(S,M)},options:a,originalValue:i,schema:s};const N=S=>{tn.isError(S)?B(S):S?f(null):B(k())},O=S=>{tn.isError(S)?B(S):l(S)};if(g&&Wi(r))return N(!0);let L;try{var F;if(L=h.call(D,r,D),typeof((F=L)==null?void 0:F.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(N,O)}}catch(S){O(S);return}N(L)}return t.OPTIONS=e,t}function VC(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=HC(e[r],t);return e}function HC(e,t){return Ns.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function DG(e,t,r,n=r){let a,i,s;return t?(Os.forEach(t,(l,f,d)=>{let h=f?l.slice(1,l.length-1):l;e=e.resolve({context:n,parent:a,value:r});let v=e.type==="tuple",b=d?parseInt(h,10):0;if(e.innerType||v){if(v&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&b>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[b],e=v?e.spec.types[b]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);a=r,r=r&&r[h],e=e.fields[h]}i=h,s=f?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Zd extends Set{describe(){const t=[];for(const r of this.values())t.push(Ns.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Zd(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function Pl(e,t=new Map){if(Qu(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Pl(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,a]of e.entries())r.set(n,Pl(a,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Pl(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,a]of Object.entries(e))r[n]=Pl(a,t)}else throw Error(`Unable to clone ${e}`);return r}function LG(e){if(!(e!=null&&e.length))return;const t=[];let r="",n=!1,a=!1;for(let i=0;i<e.length;i++){const s=e[i];if(s==="["&&!a){r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(s==="]"&&!a){r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(s==='"'){a=!a;continue}if(s==="."&&!n&&!a){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(...r.split(".").filter(Boolean)),t}function xG(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(n=>({message:n,path:LG(r)}))}function wm(e,t){var r;if(!((r=e.inner)!=null&&r.length)&&e.errors.length)return xG(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(a=>wm(a,n))}let Un=class{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Zd,this._blacklist=new Zd,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Sa.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Pl(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&Wi(i))return i;let s=ro(t),l=ro(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
692
692
|
|
|
693
693
|
attempted value: ${s}
|
|
694
|
-
`+(l!==s?`result of cast: ${l}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:s=t,strict:l=this.spec.strict}=r,f=t;l||(f=this._cast(f,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:i,value:f,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return a(h,f);this.runTests({path:i,value:f,originalValue:s,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:s,originalValue:l,path:f,options:d}=t,h=_=>{a||(a=!0,r(_,s))},v=_=>{a||(a=!0,n(_,s))},b=i.length,g=[];if(!b)return v([]);let y={value:s,originalValue:l,path:f,options:d,schema:this};for(let _=0;_<i.length;_++){const T=i[_];T(y,h,function(M){M&&(Array.isArray(M)?g.push(...M):g.push(M)),--b<=0&&v(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:a,originalParent:i,options:s}){const l=t??r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof l=="number";let d=n[l];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:i[l],key:void 0,[f?"index":"key"]:l,path:f||l.includes(".")?`${a||""}[${f?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(v,b,g)=>this.resolve(h)._validate(d,h,b,g)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r?.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((s,l)=>a._validate(t,r,(f,d)=>{tn.isError(f)&&(f.value=d),l(f)},(f,d)=>{f.length?l(new tn(f,d,void 0,void 0,i)):s(d)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r?.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(l,f)=>{throw tn.isError(l)&&(l.value=f),l},(l,f)=>{if(l.length)throw new tn(l,t,void 0,void 0,s);i=f}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(tn.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(tn.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Pl(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Nl({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Nl({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Sa.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Sa.notNull){return this.nullability(!1,t)}required(t=Sa.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Sa.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Nl(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=FC(t).map(i=>new Ns(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new Gd(a,r):Gd.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Nl({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Sa.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Nl({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=Sa.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Nl({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:s}=r.spec;return{meta:a,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((f,d,h)=>h.findIndex(v=>v.OPTIONS.name===f.OPTIONS.name)===d).map(f=>{const d=f.OPTIONS.params&&t?VC(Object.assign({},f.OPTIONS.params),t):f.OPTIONS.params;return{name:f.OPTIONS.name,params:d}})}}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(a){if(a instanceof tn)return{issues:wm(a)};throw a}}}}};Un.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Un.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:s}=DG(this,t,r,n.context);return s[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])Un.prototype[e]=Un.prototype.oneOf;for(const e of["not","nope"])Un.prototype[e]=Un.prototype.notOneOf;const FG=()=>!0;function _m(e){return new jC(e)}class jC extends Un{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:FG},t))}}_m.prototype=jC.prototype;function Yr(){return new KC}class KC extends Un{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=bm.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Wi(r)||r===!0}})}isFalse(t=bm.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Wi(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yr.prototype=KC.prototype;const qG=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $G(e){const t=Em(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Em(e){var t,r;const n=qG.exec(e);return n?{year:no(n[1]),month:no(n[2],1)-1,day:no(n[3],1),hour:no(n[4]),minute:no(n[5]),second:no(n[6]),millisecond:n[7]?no(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:no(n[10]),minuteOffset:no(n[11])}:null}function no(e,t=0){return Number(e)||t}let UG=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,zG=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,VG=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,HG="^\\d{4}-\\d{2}-\\d{2}",jG="\\d{2}:\\d{2}:\\d{2}",KG="(([+-]\\d{2}(:?\\d{2})?)|Z)",WG=new RegExp(`${HG}T${jG}(\\.\\d+)?${KG}$`),GG=e=>Wi(e)||e===e.trim(),YG={}.toString();function wr(){return new WC}class WC extends Un{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===YG?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Sa.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=$n.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=$n.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=$n.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||$n.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=$n.email){return this.matches(UG,{name:"email",message:t,excludeEmptyString:!0})}url(t=$n.url){return this.matches(zG,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=$n.uuid){return this.matches(VG,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,a;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:a=void 0}=t:r=t),this.matches(WG,{name:"datetime",message:r||$n.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||$n.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=Em(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||$n.datetime_precision,params:{precision:a},skipAbsent:!0,test:i=>{if(!i||a==null)return!0;const s=Em(i);return s?s.precision===a:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=$n.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:GG})}lowercase(t=$n.lowercase){return this.transform(r=>Wi(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Wi(r)||r===r.toLowerCase()})}uppercase(t=$n.uppercase){return this.transform(r=>Wi(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Wi(r)||r===r.toUpperCase()})}}wr.prototype=WC.prototype;let ZG=e=>e!=+e;function Jd(){return new GC}class GC extends Un{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!ZG(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let a=t;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return n.isType(a)||a===null?a:parseFloat(a)})})}min(t,r=Uo.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Uo.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Uo.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Uo.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Uo.positive){return this.moreThan(0,t)}negative(t=Uo.negative){return this.lessThan(0,t)}integer(t=Uo.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Wi(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(a=>Wi(a)?a:Math[t](a))}}Jd.prototype=GC.prototype;let JG=new Date(""),XG=e=>Object.prototype.toString.call(e)==="[object Date]";class Sm extends Un{constructor(){super({type:"date",check(t){return XG(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=$G(t),isNaN(t)?Sm.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ns.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=ym.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=ym.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}Sm.INVALID_DATE=JG;function QG(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([s,l])=>`${s}-${l}`));function i(s,l){let f=Os.split(s)[0];n.add(f),a.has(`${l}-${f}`)||r.push([l,f])}for(const s of Object.keys(e)){let l=e[s];n.add(s),Ns.isRef(l)&&l.isSibling?i(l.path,s):Qu(l)&&"deps"in l&&l.deps.forEach(f=>i(f,s))}return AG.array(Array.from(n),r).reverse()}function YC(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function ZC(e){return(t,r)=>YC(e,t)-YC(e,r)}const JC=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Xd(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Xd(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Xd(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Xd)}):"optional"in e?e.optional():e}const eY=(e,t)=>{const r=[...Os.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=Os.getter(Os.join(r),!0)(e);return!!(a&&n in a)};let XC=e=>Object.prototype.toString.call(e)==="[object Object]";function QC(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const tY=ZC([]);function gi(e){return new eM(e)}class eM extends Un{constructor(t){super({type:"object",check(r){return XC(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=tY,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(v=>!this._nodes.includes(v))),f={},d=Object.assign({},r,{parent:f,__validating:r.__validating||!1}),h=!1;for(const v of l){let b=i[v],g=v in a;if(b){let y,_=a[v];d.path=(r.path?`${r.path}.`:"")+v,b=b.resolve({value:_,context:r.context,parent:f});let T=b instanceof Un?b.spec:void 0,w=T?.strict;if(T!=null&&T.strip){h=h||v in a;continue}y=!r.__validating||!w?b.cast(a[v],d):a[v],y!==void 0&&(f[v]=y)}else g&&!s&&(f[v]=a[v]);(g!==v in f||f[v]!==a[v])&&(h=!0)}return h?f:a}_validate(t,r={},n,a){let{from:i=[],originalValue:s=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(f,d)=>{if(!l||!XC(d)){a(f,d);return}s=s||d;let h=[];for(let v of this._nodes){let b=this.fields[v];!b||Ns.isRef(b)||h.push(b.asNestedTest({options:r,key:v,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:h,value:d,originalValue:s,options:r},n,v=>{a(v.sort(this._sortErrors).concat(f),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const s=n[a];n[a]=s===void 0?i:s}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let s=t;(a=s)!=null&&a.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=QG(t,r),n._sortErrors=ZC(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Xd(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,a])=>t.includes(n)&&t.includes(a)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let a=Os.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return eY(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=a(i)),s})}json(){return this.transform(JC)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Kd.exact,test(r){if(r==null)return!0;const n=QC(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Kd.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=QC(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Kd.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(gm.camelCase)}snakeCase(){return this.transformKeys(gm.snakeCase)}constantCase(){return this.transformKeys(t=>gm.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var a;let l=t;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=s.describe(l)}return n}}gi.prototype=eM.prototype;function zo(e){return new tM(e)}class tM extends Un{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let a=!1;const i=n.map((s,l)=>{const f=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return f!==s&&(a=!0),f});return a?i:n}_validate(t,r={},n,a){var i;let s=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(f,d)=>{var h;if(!l||!s||!this._typeCheck(d)){a(f,d);return}let v=new Array(d.length);for(let g=0;g<d.length;g++){var b;v[g]=s.asNestedTest({options:r,index:g,parent:d,parentPath:r.path,originalParent:(b=r.originalValue)!=null?b:t})}this.runTests({value:d,tests:v,originalValue:(h=r.originalValue)!=null?h:t,options:r},n,g=>a(g.concat(f),d))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(JC)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Qu(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ro(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=Wd.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||Wd.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||Wd.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,a,i)=>!t(n,a,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var a;let i=t;(a=i)!=null&&a.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}zo.prototype=tM.prototype;function rM(e){return new Cm(e)}function nM(e){try{return e()}catch(t){if(tn.isError(t))return Promise.reject(t);throw t}}class Cm{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let a=this.builder(r,n);if(!Qu(a))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(a=a.optional()),a.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new Cm(this.builder);return r.spec=Object.assign({},this.spec,t),r}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,r){return this._resolve(t,r).cast(t,r)}asNestedTest(t){let{key:r,index:n,parent:a,options:i}=t,s=a[n??r];return this._resolve(s,Object.assign({},i,{value:s,parent:a})).asNestedTest(t)}validate(t,r){return nM(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return nM(()=>this._resolve(r,n).validateAt(t,r,n))}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){try{return this._resolve(t,r).isValid(t,r)}catch(n){if(tn.isError(n))return Promise.resolve(!1);throw n}}isValidSync(t,r){return this._resolve(t,r).isValidSync(t,r)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(a){if(tn.isError(a))return{issues:wm(a)};throw a}}}}}const Mm=gi().noUnknown().shape({client:gi().noUnknown().shape({logo:wr(),name:wr()}),entrypoint:gi().noUnknown().shape({account:wr(),country:wr(),credential:wr(),site:wr(),siteOrganizationType:wr(),updateCredential:wr()}),locale:wr().oneOf(["es","en"]),navigation:gi().noUnknown().shape({disableFormAutocomplete:Yr(),displayAccountsSelection:Yr(),displayBusinessSites:Yr(),displayCredentialInModal:Yr(),displayErrorsInToast:Yr(),displayLogoImages:Yr(),displayLongDescription:Yr(),displayPersonalSites:Yr(),displayPrivacyScreen:Yr(),displaySiteOrganizations:zo().of(wr()),displaySiteOrganizationTypes:zo().of(wr()),displaySites:zo().of(wr()),displayStatusInToast:Yr(),enableBackNavigation:Yr(),enableTwofaBackNavigation:Yr(),formButtonsDisabledStyle:Yr(),formShowPasswordStyle:wr().oneOf(["icon","none","text"]),getSelectedAccounts:_m().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),hideSelectCountry:Yr(),hideSiteOrganizations:zo().of(wr()),hideSiteOrganizationTypes:zo().of(wr()),hideSites:zo().of(wr()),oneSiteFlow:Yr(),quickAnswer:Yr(),requireConsent:Yr(),returnToSiteFormOnUserError:rM(e=>typeof e=="object"?zo().of(Jd().oneOf([401,403,411])):Yr()),saveCredential:Yr(),selectClass:wr(),socketTimeout:Jd().min(1),toastDuration:Jd().min(0),toastPosition:wr().oneOf(["bottom-left","bottom-right","top-left","top-right"])}),__internal__:gi().noUnknown().shape({apiBaseUrl:wr(),apiEnv:wr().oneOf(["development","production"]),assetsBaseUrl:wr(),plaidSites:Yr(),defaultHttpParams:gi()})}),rY=gi().shape({token:wr().required(),element:rM(e=>{switch(typeof e){case"string":return wr().test("isElement","${path} is not an Element",t=>{if(!document.querySelector(t))throw new tn(`Invalid selector: Element "${t}" not found.`);return!0});case"object":return gi().test("isElement","${path} is not an Element",t=>{if(!kj(t))throw new tn("Invalid element: Object should be a valid HtmlElement.");return!0});default:return wr()}}),refreshTokenFunction:_m().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),enableTestMode:Yr(),strict:gi().noUnknown().nullable().shape({authorization:gi().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required()}),body:gi().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required().test("isBase64","${path} is not a base64 encoded",e=>e&&/^(?:[A-Za-z0-9+/]{2}[A-Za-z0-9+/]{2})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))})}),config:Mm}).strict().noUnknown();let Tm={git:{hash:"ga858a6f",distance:0,tag:"v2.1.0"}};function Qd(){let e=`${Tm.git.tag}.${Tm.git.distance}`;return e=`${e}-${Tm.git.hash}`,e}function nY(e,t){const r=parseInt("0x4",16),n="38060000000000000000000000000000000000000000000F00000000000000000000000000000000000D9802010000010101000000000000";let a;return iY().then(()=>(a=new digipass.nativebridge.DP110,new Promise((s,l)=>{a.onError(()=>l("bridge.not_ready")),a.onReady(f=>{if(f.versionCode<a.versionCode&&l("bridge.host_update_available"),a.isReady())a.getTokenInfo(r,function(h){if(h.returnCode!==0)return l(`bridge.${Math.abs(h.returnCode)}`);a.generateOTP(n,t,function(v){if(v.returnCode!==0)return l(`bridge.${Math.abs(v.returnCode)}`);s({token:`${e}XX${v.otp}XX${h.info}XX${f.versionCode}`,challenge:t})})});else return Promise.reject("bridge.not_ready")})})))}function iY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeUsb"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeUsb"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.dp110.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}function aY(){const e=window.bridgeBluetooth;if(e.timeoutValidation=!1,e.cryptoAppOTP=7,!e.bridge.isReady()){e.bridge.reconnect();return}clearTimeout(e.varSetTime),e.bridge.generateResponseOnlyOTP(e.cryptoAppOTP,function(t){t.returnCode!=0?(t.returnCode==-6014||t.returnCode==-6015||t.returnCode==-6016)&&eh(!1,!1):e.timeoutValidation||(e.validOTP=!0,e.valFinalFlow=!0,e.token=t.otp,e.acceptB?sM():(hY(),oM()))})}function oY(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,fY(e)})}function sY(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,cY(e)})}function lY(e,t){window.bridgeBluetooth={acceptB:null,accesLogin:!0,bridge:null,cancelB:!1,cancelB2:!1,changeIdNameOtp:!1,claveInsSegOTP:null,contNB:2,contNBReady:0,contNBVersion:0,cryptoAppOTP:null,digipassSerial:null,eai_firma_DP110:null,eai_serial_DP110:null,isChequeLineaOrSAT:null,jspDesafio:t,jspToken:e,nbProcessIsComplete:!1,resolve:null,reject:null,setTimeReady:!1,switchState:!0,timeoutValidation:!1,token:"",valFinalFlow:!1,validOTP:!1,varSetTime:null,versionCode:null};const r=window.bridgeBluetooth;return uY().then(()=>new Promise((a,i)=>{r.resolve=a,r.reject=i,aM()}))}function uY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeBluetooth"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeBluetooth"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.dptoken.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}function iM(){const e=window.bridgeBluetooth;e.accesLogin&&(e.cancelB||(e.valFinalFlow=!0,e.token="********",e.resolve(e.token)),e.accesLogin=!1)}function cY(e){const t=window.bridgeBluetooth,r=JSON.parse(e);r.estado!=="OK"||t.cancelB2||gY(r.requestMessage)}function fY(e){const t=JSON.parse(e);t.estado!=="OK"||yY(t.requestMessage)}function dY(){const e=window.bridgeBluetooth;if(!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.initializeDigipass(e.digipassSerial,function(t){t.returnCode!=0||e.bridge.getDigipassTimeChallenge(function(r){r.returnCode!=0?Am(function(){e.switchState&&ec()},5e3,"timeOut"):(clearTimeout(e.varSetTime),e.timeoutValidation=!1,e.setTimeReady?iM():bY())})})}function aM(){const e=window.bridgeBluetooth;try{e.bridge=new digipass.nativebridge.DPToken,e.bridge.getDigipassTimeChallenge(function(){eh(!0,!1)}),e.bridge.onError(function(){e.contNB++,e.nbProcessIsComplete||e.contNB<=4&&(e.accesLogin?e.bridge.reconnect():e.bridge.getDigipassTimeChallenge(function(){}))}),e.bridge.onReady(function(){clearTimeout(e.varSetTime),e.contNB=0,e.contNBReady===0&&(e.validOTP||(Am(function(){e.timeoutValidation=!0},3e4,"timeOut"),e.switchState&&ec()),e.contNBReady++)})}catch(t){e.reject(t)}}function ec(){const e=window.bridgeBluetooth;if(e.digipassSerial=null,!e.bridge.isReady()){e.bridge.reconnect();return}if(e.contNBVersion===0&&e.bridge.getNativeBridgeVersion(function(t){e.versionCode=t.versionCode,e.contNBVersion++}),!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.getDigipassList(function(t){e.timeoutValidation||t.returnCode!=0||(t.devices.length==0?e.switchState&&ec():(t.devices.forEach(r=>{r.digipassSerial===e.jspToken&&(e.digipassSerial=r.digipassSerial,e.jspDesafio!=="null"&&(e.eai_serial_DP110=e.jspToken))}),e.digipassSerial===null?e.switchState&&ec():e.timeoutValidation||dY()))})}function oM(){const e=window.bridgeBluetooth;if(e.switchState){let t="";e.token!==void 0?(t=e.token,e.token=t+e.cryptoAppOTP):(t=e.claveInsSegOTP,e.claveInsSegOTP=t+e.cryptoAppOTP)}e.resolve(`${e.token}XX${e.eai_firma_DP110}XX${e.eai_serial_DP110}XX${e.versionCode}`)}function hY(){const e=window.bridgeBluetooth;e.changeIdNameOtp=!0}function pY(){const e=window.bridgeBluetooth;e.changeIdNameOtp=!1}function vY(e,t){const r=window.bridgeBluetooth;if(!r.bridge.isReady()){r.bridge.reconnect();return}r.bridge.parseResponseMessage(e,t,function(n){n.returnCode!=0?(n.returnCode==-6014||n.returnCode==-6015||n.returnCode==-6016)&&eh(!1,!1):r.timeoutValidation||(r.validOTP=!0,r.jspDesafio!=="null"&&(r.eai_firma_DP110=n.messageSignature),aY())})}function mY(e,t){const r=window.bridgeBluetooth;if(!r.bridge.isReady()){r.bridge.reconnect();return}r.bridge.parseResponseMessage(e,t,function(n){n.returnCode!=0||(r.setTimeReady=!0,iM())})}function gY(e){const t=window.bridgeBluetooth;if(!t.bridge.isReady()){t.bridge.reconnect();return}t.bridge.transmitRequestMessage(e,function(r){r.returnCode!=0||vY(r.responseMessage,e)})}function yY(e){const t=window.bridgeBluetooth;if(!t.bridge.isReady()){t.bridge.reconnect();return}t.bridge.transmitRequestMessage(e,function(r){r.returnCode!=0||mY(r.responseMessage,e)})}function sM(){const e=window.bridgeBluetooth;clearTimeout(e.varSetTime),oM()}function bY(){const e=window.bridgeBluetooth;if(!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.getDigipassTimeChallenge(function(t){t.returnCode!=0||e.resolve(t.timeChallenge)})}function Am(e,t,r){const n=window.bridgeBluetooth;switch(r){case"timeOut":n.varSetTime=setTimeout(e,t);break;case"interval":setInterval(e,t);break}}function eh(e,t){const r=window.bridgeBluetooth,n="";if(r.timeoutValidation=!1,r.acceptB=t,clearTimeout(r.varSetTime),r.token.length!=8&&!t&&(r.validOTP=!1),t||(r.switchState=e),e)if(r.contNBVersion=0,r.valFinalFlow=!1,t||(r.accesLogin=!0,r.cancelB=!1),r.validOTP)sM(),r.valFinalFlow=!0;else{if(r.contNBVersion=0,r.cancelB2=!1,r.contNB=2,t||(r.token=n),r.bridge===void 0&&aM(),!r.bridge.isReady()){r.bridge.reconnect();return}clearTimeout(r.varSetTime),Am(function(){r.timeoutValidation=!0},3e4,"timeOut"),r.contNBReady!==0?ec():r.bridge.reconnect()}else clearTimeout(r.varSetTime),r.validOTP=!0,r.cancelB=!0,r.cancelB2=!0,pY(),r.claveInsSegOTP=n,r.token=n}function wY(){eh(!0,!0)}const yi="bridgeBluetooth";function _Y(e){const t=window[yi];return new Promise((n,a)=>{t.resolve=n,t.reject=a;let i,s;const{authenticationData:l}=e.authenticationResponse;l[0].idAuthenticationData==="signedMessage"?([i]=l[0].authenticationData,[s]=l[1].authenticationData):([i]=l[1].authenticationData,[s]=l[0].authenticationData),RY({signedMessage:i,signedTimeMessage:s})})}async function EY(){const e=window[yi];return new Promise(async(t,r)=>{if(e.nativeBridgeInstance.isReady())try{const n=await async function(a){return new Promise((i,s)=>{a.getDigipassTimeChallenge(l=>{if(l.returnCode!==0){const d={title:"Generar - TimeChallenge",response:{message:"Se ha producido un error al generar el TimeChallenge. Por favor, aseg\xFArate de tener tu token conectado y encendido.",returnCode:l.returnCode}};return void s(d)}const f={title:"Generar - TimeChallenge",response:{message:`El TimeChallenge es: ${l.timeChallenge}`,timeChallenge:l.timeChallenge,errorCode:""}};i(f)})})}(e.nativeBridgeInstance);t(n)}catch(n){r(n)}else r({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:""}})})}function SY(e){window[yi]={isDp785Signature:!1,nativeBridgeInstance:null,resolve:null,reject:null};const t=window[yi];return CY().then(()=>new Promise((n,a)=>{t.resolve=n,t.reject=a,t.isDp785Signature=e!=="214",t.nativeBridgeInstance=new window.digipass.nativebridge.DPToken,kY()}))}function CY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","undefineddigipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeBluetooth"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeBluetooth"),a.setAttribute("src","undefineddigipass.nativebridge.dptoken.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}async function MY(){const e=window[yi];try{const t=await TY(e.isDp785Signature);if(t.length===1){const[r]=t;await AY(r.serial);const n=await EY();e.resolve(n.response.timeChallenge)}}catch(t){e.reject(t),alert("Por favor, aseg\xFArate de tener tu token conectado y encendido.")}}async function TY(e){const t=window[yi];return new Promise(async(r,n)=>{const a=e?"DP785_T4_MANUAL":"DP785_T4_NOT_LINKED";if(t.nativeBridgeInstance.isReady())try{const i=await async function(f){return new Promise((d,h)=>{f.getDigipassList(v=>{if(v.returnCode===0)d(v.devices);else{const b={title:"Listar dispositivos",response:{message:"Error al obtener la lista de dispositivos disponibles.",returnCode:v.returnCode}};h(b)}})})}(t.nativeBridgeInstance),s=i.map(f=>({name:f.deviceName,serial:f.digipassSerial})),[l]=s;if(!l||!l.serial)return void n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:a}});r(s)}catch(i){n(i)}else n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:a}})})}async function AY(e){const t=window[yi];return new Promise((r,n)=>{t.nativeBridgeInstance.initializeDigipass(e,a=>{if(a.returnCode!==0){const s={title:"Inicializar dispositivo",response:{message:"Error al intentar inicializar el dispositivo.",returnCode:a.returnCode}};return void n(s)}const i={title:"Inicializar dispositivo",response:{message:`El dispositivo con serial: ${e} est\xE1 listo para ser usado.`,errorCode:""}};r(i)})})}async function IY(e){const t=window[yi];return new Promise(async(r,n)=>{if(t.nativeBridgeInstance.isReady())try{const a=await async function(i,s){return new Promise((l,f)=>{i.generateResponseOnlyOTP(s,d=>{if(d.returnCode!==0){const v={title:"Generar OTP con PIN",response:{message:"No fue posible generar la OTP.",returnCode:d.returnCode}};return void f(v)}const h={title:"Generar OTP con PIN",response:{message:`La OTP se gener\xF3 correctamente: ${d.otp}`,otp:d.otp,errorCode:"",processType:"DP785_T4_LINKED"}};l(h)})})}(t.nativeBridgeInstance,e);r(a)}catch(a){n(a)}else n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:"DP785_T4_NOT_LINKED"}})})}async function kY(){const e=window[yi],t=await BY();if(t.response.errorCode!==""){alert(t.response.message),e.reject(t.response.errorCode);return}else await MY()}async function RY({signedMessage:e="",signedTimeMessage:t=""}){const r=window[yi];try{await lM(t,r.isDp785Signature);const n=await lM(e,r.isDp785Signature),{response:{messageSignature:a}}=n,i=7,s=await IY(i),{response:{otp:l}}=s,f={};f.otpChallenge=a;const d=`${l}${i}`;f.otp=d,r.resolve(`${f.otpChallenge}XX${f.otp}`)}catch(n){r.reject(n),alert("Error al intentar validar la sesi\xF3n desde el dispositivo de acceso seguro.")}}async function BY(){const e=window[yi];return new Promise((t,r)=>{e.nativeBridgeInstance.onReady(()=>{e.nativeBridgeInstance.getNativeBridgeVersion(n=>{const a={title:"Conexi\xF3n con Native Bridge",response:{errorCode:"",message:"El software Native Bridge se encuentra instalado en tu ordenador.",updateAvailable:!(n.versionCode>=e.nativeBridgeInstance.versionCode)}};t(a)})}),e.nativeBridgeInstance.onError(()=>{r({title:"Conexi\xF3n con Native Bridge",response:{errorCode:"222",message:"El software Native Bridge no se encontr\xF3 instalado en tu ordenador.",processType:"DP785_T4_NOT_LINKED"}})})})}async function lM(e,t){const r=window[yi];return new Promise(async(n,a)=>{const i=t?"DP785_T4_MANUAL":"DP785_T4_NOT_LINKED";if(r.nativeBridgeInstance.isReady())try{const{responseMessage:s}=await async function(f,d){return new Promise((h,v)=>{f.transmitRequestMessage(d,b=>{if(b.returnCode===0)h(b);else{const g={title:"Firmar mensaje",response:{message:"No fue posible transmitir el mensaje.",returnCode:b.returnCode}};v(g)}})})}(r.nativeBridgeInstance,e),l=await async function(f,d,h){return new Promise((v,b)=>{f.parseResponseMessage(d,h,g=>{if(g.returnCode!==0){const _={title:"Firmar mensaje",response:{message:"No fue posible parsear el mensaje.",returnCode:g.returnCode}};return void b(_)}const y={title:"Firmar mensaje",response:{message:`Se realiz\xF3 la firma del mensaje correctamente: ${g.messageSignature}`,messageSignature:g.messageSignature,errorCode:"",processType:"DP785_T4_LINKED"}};v(y)})})}(r.nativeBridgeInstance,s,e);n(l)}catch(s){a(s)}else a({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:i}})})}const th=/\{([a-z_]+)\}/g;function OY(e){const t=e.documents||[],r=[];let n=0,a;for(th.lastIndex=0;(a=th.exec(e.text))!==null;){const i=t.find(s=>s.role===a[1]);a.index>n&&r.push({text:e.text.slice(n,a.index)}),r.push(i?{document:i,text:i.label}:{text:a[0]}),n=a.index+a[0].length}return n<e.text.length&&r.push({text:e.text.slice(n)}),r}function NY(e,t=!1){const r=e?.is_business===1,n=e?.is_personal===1;return r&&!n?"legal_entity":n&&!r?"individual":t?"legal_entity":"individual"}function PY(e){var t,r,n;const a=(t=e?.response)==null?void 0:t.status,i=((n=(r=e?.response)==null?void 0:r.data)==null?void 0:n.message)||"";return a===409?"stale":a===400&&/consent/i.test(i)?"missing":null}function DY(e){const t=e.documents||[];return th.lastIndex=0,Array.from(e.text.matchAll(th)).some(r=>!t.some(n=>n.role===r[1]))}const Dl={enables:["download_options"],name:"download_options_active",required:!1,translate_label:"download_options.switch",type:"switch",validation:null},Im={name:"download_options",required:!1,enabled_by:"download_options_active",translate_error_label:"download_options.label",type:"date_range",validation:null},Ll=["56cf5728784806f72b8b456f","5da784f1f9de2a06483abec1"];var km={},tc={},uM;function LY(){if(uM)return tc;uM=1,tc.byteLength=l,tc.toByteArray=d,tc.fromByteArray=b;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,i=n.length;a<i;++a)e[a]=n[a],t[n.charCodeAt(a)]=a;t[45]=62,t[95]=63;function s(g){var y=g.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=g.indexOf("=");_===-1&&(_=y);var T=_===y?0:4-_%4;return[_,T]}function l(g){var y=s(g),_=y[0],T=y[1];return(_+T)*3/4-T}function f(g,y,_){return(y+_)*3/4-_}function d(g){var y,_=s(g),T=_[0],w=_[1],M=new r(f(g,T,w)),k=0,B=w>0?T-4:T,D;for(D=0;D<B;D+=4)y=t[g.charCodeAt(D)]<<18|t[g.charCodeAt(D+1)]<<12|t[g.charCodeAt(D+2)]<<6|t[g.charCodeAt(D+3)],M[k++]=y>>16&255,M[k++]=y>>8&255,M[k++]=y&255;return w===2&&(y=t[g.charCodeAt(D)]<<2|t[g.charCodeAt(D+1)]>>4,M[k++]=y&255),w===1&&(y=t[g.charCodeAt(D)]<<10|t[g.charCodeAt(D+1)]<<4|t[g.charCodeAt(D+2)]>>2,M[k++]=y>>8&255,M[k++]=y&255),M}function h(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function v(g,y,_){for(var T,w=[],M=y;M<_;M+=3)T=(g[M]<<16&16711680)+(g[M+1]<<8&65280)+(g[M+2]&255),w.push(h(T));return w.join("")}function b(g){for(var y,_=g.length,T=_%3,w=[],M=16383,k=0,B=_-T;k<B;k+=M)w.push(v(g,k,k+M>B?B:k+M));return T===1?(y=g[_-1],w.push(e[y>>2]+e[y<<4&63]+"==")):T===2&&(y=(g[_-2]<<8)+g[_-1],w.push(e[y>>10]+e[y>>4&63]+e[y<<2&63]+"=")),w.join("")}return tc}var rh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var cM;function xY(){return cM||(cM=1,rh.read=function(e,t,r,n,a){var i,s,l=a*8-n-1,f=(1<<l)-1,d=f>>1,h=-7,v=r?a-1:0,b=r?-1:1,g=e[t+v];for(v+=b,i=g&(1<<-h)-1,g>>=-h,h+=l;h>0;i=i*256+e[t+v],v+=b,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;h>0;s=s*256+e[t+v],v+=b,h-=8);if(i===0)i=1-d;else{if(i===f)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),i=i-d}return(g?-1:1)*s*Math.pow(2,i-n)},rh.write=function(e,t,r,n,a,i){var s,l,f,d=i*8-a-1,h=(1<<d)-1,v=h>>1,b=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,y=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+v>=1?t+=b/f:t+=b*Math.pow(2,1-v),t*f>=2&&(s++,f/=2),s+v>=h?(l=0,s=h):s+v>=1?(l=(t*f-1)*Math.pow(2,a),s=s+v):(l=t*Math.pow(2,v-1)*Math.pow(2,a),s=0));a>=8;e[r+g]=l&255,g+=y,l/=256,a-=8);for(s=s<<a|l,d+=a;d>0;e[r+g]=s&255,g+=y,s/=256,d-=8);e[r+g-y]|=_*128}),rh}/*!
|
|
694
|
+
`+(l!==s?`result of cast: ${l}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:s=t,strict:l=this.spec.strict}=r,f=t;l||(f=this._cast(f,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:i,value:f,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return a(h,f);this.runTests({path:i,value:f,originalValue:s,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:s,originalValue:l,path:f,options:d}=t,h=_=>{a||(a=!0,r(_,s))},v=_=>{a||(a=!0,n(_,s))},b=i.length,g=[];if(!b)return v([]);let y={value:s,originalValue:l,path:f,options:d,schema:this};for(let _=0;_<i.length;_++){const T=i[_];T(y,h,function(M){M&&(Array.isArray(M)?g.push(...M):g.push(M)),--b<=0&&v(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:a,originalParent:i,options:s}){const l=t??r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof l=="number";let d=n[l];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:i[l],key:void 0,[f?"index":"key"]:l,path:f||l.includes(".")?`${a||""}[${f?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(v,b,g)=>this.resolve(h)._validate(d,h,b,g)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r?.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((s,l)=>a._validate(t,r,(f,d)=>{tn.isError(f)&&(f.value=d),l(f)},(f,d)=>{f.length?l(new tn(f,d,void 0,void 0,i)):s(d)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,s=(n=r?.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(l,f)=>{throw tn.isError(l)&&(l.value=f),l},(l,f)=>{if(l.length)throw new tn(l,t,void 0,void 0,s);i=f}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(tn.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(tn.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Pl(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Nl({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Nl({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Sa.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Sa.notNull){return this.nullability(!1,t)}required(t=Sa.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Sa.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Nl(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=FC(t).map(i=>new Ns(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new Gd(a,r):Gd.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Nl({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Sa.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Nl({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(t,r=Sa.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Nl({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:s}=r.spec;return{meta:a,label:n,optional:i,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((f,d,h)=>h.findIndex(v=>v.OPTIONS.name===f.OPTIONS.name)===d).map(f=>{const d=f.OPTIONS.params&&t?VC(Object.assign({},f.OPTIONS.params),t):f.OPTIONS.params;return{name:f.OPTIONS.name,params:d}})}}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(a){if(a instanceof tn)return{issues:wm(a)};throw a}}}}};Un.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Un.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:s}=DG(this,t,r,n.context);return s[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])Un.prototype[e]=Un.prototype.oneOf;for(const e of["not","nope"])Un.prototype[e]=Un.prototype.notOneOf;const FG=()=>!0;function _m(e){return new jC(e)}class jC extends Un{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:FG},t))}}_m.prototype=jC.prototype;function Yr(){return new KC}class KC extends Un{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=bm.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Wi(r)||r===!0}})}isFalse(t=bm.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Wi(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yr.prototype=KC.prototype;const qG=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $G(e){const t=Em(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Em(e){var t,r;const n=qG.exec(e);return n?{year:no(n[1]),month:no(n[2],1)-1,day:no(n[3],1),hour:no(n[4]),minute:no(n[5]),second:no(n[6]),millisecond:n[7]?no(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:no(n[10]),minuteOffset:no(n[11])}:null}function no(e,t=0){return Number(e)||t}let UG=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,zG=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,VG=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,HG="^\\d{4}-\\d{2}-\\d{2}",jG="\\d{2}:\\d{2}:\\d{2}",KG="(([+-]\\d{2}(:?\\d{2})?)|Z)",WG=new RegExp(`${HG}T${jG}(\\.\\d+)?${KG}$`),GG=e=>Wi(e)||e===e.trim(),YG={}.toString();function wr(){return new WC}class WC extends Un{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===YG?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Sa.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=$n.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=$n.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=$n.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||$n.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=$n.email){return this.matches(UG,{name:"email",message:t,excludeEmptyString:!0})}url(t=$n.url){return this.matches(zG,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=$n.uuid){return this.matches(VG,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,a;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:a=void 0}=t:r=t),this.matches(WG,{name:"datetime",message:r||$n.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||$n.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const s=Em(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||$n.datetime_precision,params:{precision:a},skipAbsent:!0,test:i=>{if(!i||a==null)return!0;const s=Em(i);return s?s.precision===a:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=$n.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:GG})}lowercase(t=$n.lowercase){return this.transform(r=>Wi(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Wi(r)||r===r.toLowerCase()})}uppercase(t=$n.uppercase){return this.transform(r=>Wi(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Wi(r)||r===r.toUpperCase()})}}wr.prototype=WC.prototype;let ZG=e=>e!=+e;function Jd(){return new GC}class GC extends Un{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!ZG(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let a=t;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return n.isType(a)||a===null?a:parseFloat(a)})})}min(t,r=Uo.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Uo.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Uo.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Uo.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Uo.positive){return this.moreThan(0,t)}negative(t=Uo.negative){return this.lessThan(0,t)}integer(t=Uo.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Wi(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(a=>Wi(a)?a:Math[t](a))}}Jd.prototype=GC.prototype;let JG=new Date(""),XG=e=>Object.prototype.toString.call(e)==="[object Date]";class Sm extends Un{constructor(){super({type:"date",check(t){return XG(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=$G(t),isNaN(t)?Sm.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ns.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=ym.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=ym.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}Sm.INVALID_DATE=JG;function QG(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([s,l])=>`${s}-${l}`));function i(s,l){let f=Os.split(s)[0];n.add(f),a.has(`${l}-${f}`)||r.push([l,f])}for(const s of Object.keys(e)){let l=e[s];n.add(s),Ns.isRef(l)&&l.isSibling?i(l.path,s):Qu(l)&&"deps"in l&&l.deps.forEach(f=>i(f,s))}return AG.array(Array.from(n),r).reverse()}function YC(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function ZC(e){return(t,r)=>YC(e,t)-YC(e,r)}const JC=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Xd(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Xd(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Xd(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Xd)}):"optional"in e?e.optional():e}const eY=(e,t)=>{const r=[...Os.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=Os.getter(Os.join(r),!0)(e);return!!(a&&n in a)};let XC=e=>Object.prototype.toString.call(e)==="[object Object]";function QC(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const tY=ZC([]);function gi(e){return new eM(e)}class eM extends Un{constructor(t){super({type:"object",check(r){return XC(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=tY,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(v=>!this._nodes.includes(v))),f={},d=Object.assign({},r,{parent:f,__validating:r.__validating||!1}),h=!1;for(const v of l){let b=i[v],g=v in a;if(b){let y,_=a[v];d.path=(r.path?`${r.path}.`:"")+v,b=b.resolve({value:_,context:r.context,parent:f});let T=b instanceof Un?b.spec:void 0,w=T?.strict;if(T!=null&&T.strip){h=h||v in a;continue}y=!r.__validating||!w?b.cast(a[v],d):a[v],y!==void 0&&(f[v]=y)}else g&&!s&&(f[v]=a[v]);(g!==v in f||f[v]!==a[v])&&(h=!0)}return h?f:a}_validate(t,r={},n,a){let{from:i=[],originalValue:s=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(f,d)=>{if(!l||!XC(d)){a(f,d);return}s=s||d;let h=[];for(let v of this._nodes){let b=this.fields[v];!b||Ns.isRef(b)||h.push(b.asNestedTest({options:r,key:v,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:h,value:d,originalValue:s,options:r},n,v=>{a(v.sort(this._sortErrors).concat(f),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const s=n[a];n[a]=s===void 0?i:s}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let s=t;(a=s)!=null&&a.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=QG(t,r),n._sortErrors=ZC(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Xd(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,a])=>t.includes(n)&&t.includes(a)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let a=Os.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return eY(i,t)&&(s=Object.assign({},i),n||delete s[t],s[r]=a(i)),s})}json(){return this.transform(JC)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Kd.exact,test(r){if(r==null)return!0;const n=QC(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Kd.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=QC(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Kd.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(gm.camelCase)}snakeCase(){return this.transformKeys(gm.snakeCase)}constantCase(){return this.transformKeys(t=>gm.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,s]of Object.entries(r.fields)){var a;let l=t;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=s.describe(l)}return n}}gi.prototype=eM.prototype;function zo(e){return new tM(e)}class tM extends Un{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let a=!1;const i=n.map((s,l)=>{const f=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return f!==s&&(a=!0),f});return a?i:n}_validate(t,r={},n,a){var i;let s=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(f,d)=>{var h;if(!l||!s||!this._typeCheck(d)){a(f,d);return}let v=new Array(d.length);for(let g=0;g<d.length;g++){var b;v[g]=s.asNestedTest({options:r,index:g,parent:d,parentPath:r.path,originalParent:(b=r.originalValue)!=null?b:t})}this.runTests({value:d,tests:v,originalValue:(h=r.originalValue)!=null?h:t,options:r},n,g=>a(g.concat(f),d))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(JC)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Qu(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ro(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=Wd.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||Wd.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||Wd.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,a,i)=>!t(n,a,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var a;let i=t;(a=i)!=null&&a.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}}zo.prototype=tM.prototype;function rM(e){return new Cm(e)}function nM(e){try{return e()}catch(t){if(tn.isError(t))return Promise.reject(t);throw t}}class Cm{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let a=this.builder(r,n);if(!Qu(a))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(a=a.optional()),a.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new Cm(this.builder);return r.spec=Object.assign({},this.spec,t),r}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,r){return this._resolve(t,r).cast(t,r)}asNestedTest(t){let{key:r,index:n,parent:a,options:i}=t,s=a[n??r];return this._resolve(s,Object.assign({},i,{value:s,parent:a})).asNestedTest(t)}validate(t,r){return nM(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return nM(()=>this._resolve(r,n).validateAt(t,r,n))}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){try{return this._resolve(t,r).isValid(t,r)}catch(n){if(tn.isError(n))return Promise.resolve(!1);throw n}}isValidSync(t,r){return this._resolve(t,r).isValidSync(t,r)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(a){if(tn.isError(a))return{issues:wm(a)};throw a}}}}}const Mm=gi().noUnknown().shape({client:gi().noUnknown().shape({logo:wr(),name:wr()}),entrypoint:gi().noUnknown().shape({account:wr(),country:wr(),credential:wr(),site:wr(),siteOrganizationType:wr(),updateCredential:wr()}),locale:wr().oneOf(["es","en"]),navigation:gi().noUnknown().shape({disableFormAutocomplete:Yr(),displayAccountsSelection:Yr(),displayBusinessSites:Yr(),displayCredentialInModal:Yr(),displayErrorsInToast:Yr(),displayLogoImages:Yr(),displayLongDescription:Yr(),displayPersonalSites:Yr(),displayPrivacyScreen:Yr(),displaySiteOrganizations:zo().of(wr()),displaySiteOrganizationTypes:zo().of(wr()),displaySites:zo().of(wr()),displayStatusInToast:Yr(),enableBackNavigation:Yr(),enableTwofaBackNavigation:Yr(),formButtonsDisabledStyle:Yr(),formShowPasswordStyle:wr().oneOf(["icon","none","text"]),getSelectedAccounts:_m().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),hideSelectCountry:Yr(),hideSiteOrganizations:zo().of(wr()),hideSiteOrganizationTypes:zo().of(wr()),hideSites:zo().of(wr()),oneSiteFlow:Yr(),quickAnswer:Yr(),requireConsent:Yr(),returnToSiteFormOnUserError:rM(e=>typeof e=="object"?zo().of(Jd().oneOf([401,403,411])):Yr()),saveCredential:Yr(),selectClass:wr(),socketTimeout:Jd().min(1),toastDuration:Jd().min(0),toastPosition:wr().oneOf(["bottom-left","bottom-right","top-left","top-right"])}),__internal__:gi().noUnknown().shape({apiBaseUrl:wr(),apiEnv:wr().oneOf(["development","production"]),assetsBaseUrl:wr(),plaidSites:Yr(),defaultHttpParams:gi()})}),rY=gi().shape({token:wr().required(),element:rM(e=>{switch(typeof e){case"string":return wr().test("isElement","${path} is not an Element",t=>{if(!document.querySelector(t))throw new tn(`Invalid selector: Element "${t}" not found.`);return!0});case"object":return gi().test("isElement","${path} is not an Element",t=>{if(!kj(t))throw new tn("Invalid element: Object should be a valid HtmlElement.");return!0});default:return wr()}}),refreshTokenFunction:_m().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),enableTestMode:Yr(),strict:gi().noUnknown().nullable().shape({authorization:gi().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required()}),body:gi().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required().test("isBase64","${path} is not a base64 encoded",e=>e&&/^(?:[A-Za-z0-9+/]{2}[A-Za-z0-9+/]{2})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))})}),config:Mm}).strict().noUnknown();let Tm={git:{hash:"gd5878a2",distance:0,tag:"v2.1.2"}};function Qd(){let e=`${Tm.git.tag}.${Tm.git.distance}`;return e=`${e}-${Tm.git.hash}`,e}function nY(e,t){const r=parseInt("0x4",16),n="38060000000000000000000000000000000000000000000F00000000000000000000000000000000000D9802010000010101000000000000";let a;return iY().then(()=>(a=new digipass.nativebridge.DP110,new Promise((s,l)=>{a.onError(()=>l("bridge.not_ready")),a.onReady(f=>{if(f.versionCode<a.versionCode&&l("bridge.host_update_available"),a.isReady())a.getTokenInfo(r,function(h){if(h.returnCode!==0)return l(`bridge.${Math.abs(h.returnCode)}`);a.generateOTP(n,t,function(v){if(v.returnCode!==0)return l(`bridge.${Math.abs(v.returnCode)}`);s({token:`${e}XX${v.otp}XX${h.info}XX${f.versionCode}`,challenge:t})})});else return Promise.reject("bridge.not_ready")})})))}function iY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeUsb"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeUsb"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.dp110.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}function aY(){const e=window.bridgeBluetooth;if(e.timeoutValidation=!1,e.cryptoAppOTP=7,!e.bridge.isReady()){e.bridge.reconnect();return}clearTimeout(e.varSetTime),e.bridge.generateResponseOnlyOTP(e.cryptoAppOTP,function(t){t.returnCode!=0?(t.returnCode==-6014||t.returnCode==-6015||t.returnCode==-6016)&&eh(!1,!1):e.timeoutValidation||(e.validOTP=!0,e.valFinalFlow=!0,e.token=t.otp,e.acceptB?sM():(hY(),oM()))})}function oY(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,fY(e)})}function sY(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,cY(e)})}function lY(e,t){window.bridgeBluetooth={acceptB:null,accesLogin:!0,bridge:null,cancelB:!1,cancelB2:!1,changeIdNameOtp:!1,claveInsSegOTP:null,contNB:2,contNBReady:0,contNBVersion:0,cryptoAppOTP:null,digipassSerial:null,eai_firma_DP110:null,eai_serial_DP110:null,isChequeLineaOrSAT:null,jspDesafio:t,jspToken:e,nbProcessIsComplete:!1,resolve:null,reject:null,setTimeReady:!1,switchState:!0,timeoutValidation:!1,token:"",valFinalFlow:!1,validOTP:!1,varSetTime:null,versionCode:null};const r=window.bridgeBluetooth;return uY().then(()=>new Promise((a,i)=>{r.resolve=a,r.reject=i,aM()}))}function uY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeBluetooth"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeBluetooth"),a.setAttribute("src","https://www.paybook.com/lib/syncfy/digipass.nativebridge.dptoken.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}function iM(){const e=window.bridgeBluetooth;e.accesLogin&&(e.cancelB||(e.valFinalFlow=!0,e.token="********",e.resolve(e.token)),e.accesLogin=!1)}function cY(e){const t=window.bridgeBluetooth,r=JSON.parse(e);r.estado!=="OK"||t.cancelB2||gY(r.requestMessage)}function fY(e){const t=JSON.parse(e);t.estado!=="OK"||yY(t.requestMessage)}function dY(){const e=window.bridgeBluetooth;if(!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.initializeDigipass(e.digipassSerial,function(t){t.returnCode!=0||e.bridge.getDigipassTimeChallenge(function(r){r.returnCode!=0?Am(function(){e.switchState&&ec()},5e3,"timeOut"):(clearTimeout(e.varSetTime),e.timeoutValidation=!1,e.setTimeReady?iM():bY())})})}function aM(){const e=window.bridgeBluetooth;try{e.bridge=new digipass.nativebridge.DPToken,e.bridge.getDigipassTimeChallenge(function(){eh(!0,!1)}),e.bridge.onError(function(){e.contNB++,e.nbProcessIsComplete||e.contNB<=4&&(e.accesLogin?e.bridge.reconnect():e.bridge.getDigipassTimeChallenge(function(){}))}),e.bridge.onReady(function(){clearTimeout(e.varSetTime),e.contNB=0,e.contNBReady===0&&(e.validOTP||(Am(function(){e.timeoutValidation=!0},3e4,"timeOut"),e.switchState&&ec()),e.contNBReady++)})}catch(t){e.reject(t)}}function ec(){const e=window.bridgeBluetooth;if(e.digipassSerial=null,!e.bridge.isReady()){e.bridge.reconnect();return}if(e.contNBVersion===0&&e.bridge.getNativeBridgeVersion(function(t){e.versionCode=t.versionCode,e.contNBVersion++}),!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.getDigipassList(function(t){e.timeoutValidation||t.returnCode!=0||(t.devices.length==0?e.switchState&&ec():(t.devices.forEach(r=>{r.digipassSerial===e.jspToken&&(e.digipassSerial=r.digipassSerial,e.jspDesafio!=="null"&&(e.eai_serial_DP110=e.jspToken))}),e.digipassSerial===null?e.switchState&&ec():e.timeoutValidation||dY()))})}function oM(){const e=window.bridgeBluetooth;if(e.switchState){let t="";e.token!==void 0?(t=e.token,e.token=t+e.cryptoAppOTP):(t=e.claveInsSegOTP,e.claveInsSegOTP=t+e.cryptoAppOTP)}e.resolve(`${e.token}XX${e.eai_firma_DP110}XX${e.eai_serial_DP110}XX${e.versionCode}`)}function hY(){const e=window.bridgeBluetooth;e.changeIdNameOtp=!0}function pY(){const e=window.bridgeBluetooth;e.changeIdNameOtp=!1}function vY(e,t){const r=window.bridgeBluetooth;if(!r.bridge.isReady()){r.bridge.reconnect();return}r.bridge.parseResponseMessage(e,t,function(n){n.returnCode!=0?(n.returnCode==-6014||n.returnCode==-6015||n.returnCode==-6016)&&eh(!1,!1):r.timeoutValidation||(r.validOTP=!0,r.jspDesafio!=="null"&&(r.eai_firma_DP110=n.messageSignature),aY())})}function mY(e,t){const r=window.bridgeBluetooth;if(!r.bridge.isReady()){r.bridge.reconnect();return}r.bridge.parseResponseMessage(e,t,function(n){n.returnCode!=0||(r.setTimeReady=!0,iM())})}function gY(e){const t=window.bridgeBluetooth;if(!t.bridge.isReady()){t.bridge.reconnect();return}t.bridge.transmitRequestMessage(e,function(r){r.returnCode!=0||vY(r.responseMessage,e)})}function yY(e){const t=window.bridgeBluetooth;if(!t.bridge.isReady()){t.bridge.reconnect();return}t.bridge.transmitRequestMessage(e,function(r){r.returnCode!=0||mY(r.responseMessage,e)})}function sM(){const e=window.bridgeBluetooth;clearTimeout(e.varSetTime),oM()}function bY(){const e=window.bridgeBluetooth;if(!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.getDigipassTimeChallenge(function(t){t.returnCode!=0||e.resolve(t.timeChallenge)})}function Am(e,t,r){const n=window.bridgeBluetooth;switch(r){case"timeOut":n.varSetTime=setTimeout(e,t);break;case"interval":setInterval(e,t);break}}function eh(e,t){const r=window.bridgeBluetooth,n="";if(r.timeoutValidation=!1,r.acceptB=t,clearTimeout(r.varSetTime),r.token.length!=8&&!t&&(r.validOTP=!1),t||(r.switchState=e),e)if(r.contNBVersion=0,r.valFinalFlow=!1,t||(r.accesLogin=!0,r.cancelB=!1),r.validOTP)sM(),r.valFinalFlow=!0;else{if(r.contNBVersion=0,r.cancelB2=!1,r.contNB=2,t||(r.token=n),r.bridge===void 0&&aM(),!r.bridge.isReady()){r.bridge.reconnect();return}clearTimeout(r.varSetTime),Am(function(){r.timeoutValidation=!0},3e4,"timeOut"),r.contNBReady!==0?ec():r.bridge.reconnect()}else clearTimeout(r.varSetTime),r.validOTP=!0,r.cancelB=!0,r.cancelB2=!0,pY(),r.claveInsSegOTP=n,r.token=n}function wY(){eh(!0,!0)}const yi="bridgeBluetooth";function _Y(e){const t=window[yi];return new Promise((n,a)=>{t.resolve=n,t.reject=a;let i,s;const{authenticationData:l}=e.authenticationResponse;l[0].idAuthenticationData==="signedMessage"?([i]=l[0].authenticationData,[s]=l[1].authenticationData):([i]=l[1].authenticationData,[s]=l[0].authenticationData),RY({signedMessage:i,signedTimeMessage:s})})}async function EY(){const e=window[yi];return new Promise(async(t,r)=>{if(e.nativeBridgeInstance.isReady())try{const n=await async function(a){return new Promise((i,s)=>{a.getDigipassTimeChallenge(l=>{if(l.returnCode!==0){const d={title:"Generar - TimeChallenge",response:{message:"Se ha producido un error al generar el TimeChallenge. Por favor, aseg\xFArate de tener tu token conectado y encendido.",returnCode:l.returnCode}};return void s(d)}const f={title:"Generar - TimeChallenge",response:{message:`El TimeChallenge es: ${l.timeChallenge}`,timeChallenge:l.timeChallenge,errorCode:""}};i(f)})})}(e.nativeBridgeInstance);t(n)}catch(n){r(n)}else r({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:""}})})}function SY(e){window[yi]={isDp785Signature:!1,nativeBridgeInstance:null,resolve:null,reject:null};const t=window[yi];return CY().then(()=>new Promise((n,a)=>{t.resolve=n,t.reject=a,t.isDp785Signature=e!=="214",t.nativeBridgeInstance=new window.digipass.nativebridge.DPToken,kY()}))}function CY(){const e=new Promise((r,n)=>{if(document.getElementById("widgetBridgeConfig"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeConfig"),a.setAttribute("src","undefineddigipass.nativebridge.config.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_config_script_not_loaded")}}),t=new Promise((r,n)=>{if(document.getElementById("widgetBridgeBluetooth"))return r();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("id","widgetBridgeBluetooth"),a.setAttribute("src","undefineddigipass.nativebridge.dptoken.min.js"),(document.head||document.body).appendChild(a),a.onload=()=>r(),a.onerror=()=>{n("bridge.digipass_script_not_loaded")}});return Promise.all([e,t])}async function MY(){const e=window[yi];try{const t=await TY(e.isDp785Signature);if(t.length===1){const[r]=t;await AY(r.serial);const n=await EY();e.resolve(n.response.timeChallenge)}}catch(t){e.reject(t),alert("Por favor, aseg\xFArate de tener tu token conectado y encendido.")}}async function TY(e){const t=window[yi];return new Promise(async(r,n)=>{const a=e?"DP785_T4_MANUAL":"DP785_T4_NOT_LINKED";if(t.nativeBridgeInstance.isReady())try{const i=await async function(f){return new Promise((d,h)=>{f.getDigipassList(v=>{if(v.returnCode===0)d(v.devices);else{const b={title:"Listar dispositivos",response:{message:"Error al obtener la lista de dispositivos disponibles.",returnCode:v.returnCode}};h(b)}})})}(t.nativeBridgeInstance),s=i.map(f=>({name:f.deviceName,serial:f.digipassSerial})),[l]=s;if(!l||!l.serial)return void n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:a}});r(s)}catch(i){n(i)}else n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:a}})})}async function AY(e){const t=window[yi];return new Promise((r,n)=>{t.nativeBridgeInstance.initializeDigipass(e,a=>{if(a.returnCode!==0){const s={title:"Inicializar dispositivo",response:{message:"Error al intentar inicializar el dispositivo.",returnCode:a.returnCode}};return void n(s)}const i={title:"Inicializar dispositivo",response:{message:`El dispositivo con serial: ${e} est\xE1 listo para ser usado.`,errorCode:""}};r(i)})})}async function IY(e){const t=window[yi];return new Promise(async(r,n)=>{if(t.nativeBridgeInstance.isReady())try{const a=await async function(i,s){return new Promise((l,f)=>{i.generateResponseOnlyOTP(s,d=>{if(d.returnCode!==0){const v={title:"Generar OTP con PIN",response:{message:"No fue posible generar la OTP.",returnCode:d.returnCode}};return void f(v)}const h={title:"Generar OTP con PIN",response:{message:`La OTP se gener\xF3 correctamente: ${d.otp}`,otp:d.otp,errorCode:"",processType:"DP785_T4_LINKED"}};l(h)})})}(t.nativeBridgeInstance,e);r(a)}catch(a){n(a)}else n({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:"DP785_T4_NOT_LINKED"}})})}async function kY(){const e=window[yi],t=await BY();if(t.response.errorCode!==""){alert(t.response.message),e.reject(t.response.errorCode);return}else await MY()}async function RY({signedMessage:e="",signedTimeMessage:t=""}){const r=window[yi];try{await lM(t,r.isDp785Signature);const n=await lM(e,r.isDp785Signature),{response:{messageSignature:a}}=n,i=7,s=await IY(i),{response:{otp:l}}=s,f={};f.otpChallenge=a;const d=`${l}${i}`;f.otp=d,r.resolve(`${f.otpChallenge}XX${f.otp}`)}catch(n){r.reject(n),alert("Error al intentar validar la sesi\xF3n desde el dispositivo de acceso seguro.")}}async function BY(){const e=window[yi];return new Promise((t,r)=>{e.nativeBridgeInstance.onReady(()=>{e.nativeBridgeInstance.getNativeBridgeVersion(n=>{const a={title:"Conexi\xF3n con Native Bridge",response:{errorCode:"",message:"El software Native Bridge se encuentra instalado en tu ordenador.",updateAvailable:!(n.versionCode>=e.nativeBridgeInstance.versionCode)}};t(a)})}),e.nativeBridgeInstance.onError(()=>{r({title:"Conexi\xF3n con Native Bridge",response:{errorCode:"222",message:"El software Native Bridge no se encontr\xF3 instalado en tu ordenador.",processType:"DP785_T4_NOT_LINKED"}})})})}async function lM(e,t){const r=window[yi];return new Promise(async(n,a)=>{const i=t?"DP785_T4_MANUAL":"DP785_T4_NOT_LINKED";if(r.nativeBridgeInstance.isReady())try{const{responseMessage:s}=await async function(f,d){return new Promise((h,v)=>{f.transmitRequestMessage(d,b=>{if(b.returnCode===0)h(b);else{const g={title:"Firmar mensaje",response:{message:"No fue posible transmitir el mensaje.",returnCode:b.returnCode}};v(g)}})})}(r.nativeBridgeInstance,e),l=await async function(f,d,h){return new Promise((v,b)=>{f.parseResponseMessage(d,h,g=>{if(g.returnCode!==0){const _={title:"Firmar mensaje",response:{message:"No fue posible parsear el mensaje.",returnCode:g.returnCode}};return void b(_)}const y={title:"Firmar mensaje",response:{message:`Se realiz\xF3 la firma del mensaje correctamente: ${g.messageSignature}`,messageSignature:g.messageSignature,errorCode:"",processType:"DP785_T4_LINKED"}};v(y)})})}(r.nativeBridgeInstance,s,e);n(l)}catch(s){a(s)}else a({title:"Error de conexi\xF3n",response:{message:"No es posible interactuar con el dispositivo.",errorCode:"",processType:i}})})}const th=/\{([a-z_]+)\}/g;function OY(e){const t=e.documents||[],r=[];let n=0,a;for(th.lastIndex=0;(a=th.exec(e.text))!==null;){const i=t.find(s=>s.role===a[1]);a.index>n&&r.push({text:e.text.slice(n,a.index)}),r.push(i?{document:i,text:i.label}:{text:a[0]}),n=a.index+a[0].length}return n<e.text.length&&r.push({text:e.text.slice(n)}),r}function NY(e,t=!1){const r=e?.is_business===1,n=e?.is_personal===1;return r&&!n?"legal_entity":n&&!r?"individual":t?"legal_entity":"individual"}function PY(e){var t,r,n;const a=(t=e?.response)==null?void 0:t.status,i=((n=(r=e?.response)==null?void 0:r.data)==null?void 0:n.message)||"";return a===409?"stale":a===400&&/consent/i.test(i)?"missing":null}function DY(e){const t=e.documents||[];return th.lastIndex=0,Array.from(e.text.matchAll(th)).some(r=>!t.some(n=>n.role===r[1]))}const Dl={enables:["download_options"],name:"download_options_active",required:!1,translate_label:"download_options.switch",type:"switch",validation:null},Im={name:"download_options",required:!1,enabled_by:"download_options_active",translate_error_label:"download_options.label",type:"date_range",validation:null},Ll=["56cf5728784806f72b8b456f","5da784f1f9de2a06483abec1"];var km={},tc={},uM;function LY(){if(uM)return tc;uM=1,tc.byteLength=l,tc.toByteArray=d,tc.fromByteArray=b;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,i=n.length;a<i;++a)e[a]=n[a],t[n.charCodeAt(a)]=a;t[45]=62,t[95]=63;function s(g){var y=g.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=g.indexOf("=");_===-1&&(_=y);var T=_===y?0:4-_%4;return[_,T]}function l(g){var y=s(g),_=y[0],T=y[1];return(_+T)*3/4-T}function f(g,y,_){return(y+_)*3/4-_}function d(g){var y,_=s(g),T=_[0],w=_[1],M=new r(f(g,T,w)),k=0,B=w>0?T-4:T,D;for(D=0;D<B;D+=4)y=t[g.charCodeAt(D)]<<18|t[g.charCodeAt(D+1)]<<12|t[g.charCodeAt(D+2)]<<6|t[g.charCodeAt(D+3)],M[k++]=y>>16&255,M[k++]=y>>8&255,M[k++]=y&255;return w===2&&(y=t[g.charCodeAt(D)]<<2|t[g.charCodeAt(D+1)]>>4,M[k++]=y&255),w===1&&(y=t[g.charCodeAt(D)]<<10|t[g.charCodeAt(D+1)]<<4|t[g.charCodeAt(D+2)]>>2,M[k++]=y>>8&255,M[k++]=y&255),M}function h(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function v(g,y,_){for(var T,w=[],M=y;M<_;M+=3)T=(g[M]<<16&16711680)+(g[M+1]<<8&65280)+(g[M+2]&255),w.push(h(T));return w.join("")}function b(g){for(var y,_=g.length,T=_%3,w=[],M=16383,k=0,B=_-T;k<B;k+=M)w.push(v(g,k,k+M>B?B:k+M));return T===1?(y=g[_-1],w.push(e[y>>2]+e[y<<4&63]+"==")):T===2&&(y=(g[_-2]<<8)+g[_-1],w.push(e[y>>10]+e[y>>4&63]+e[y<<2&63]+"=")),w.join("")}return tc}var rh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var cM;function xY(){return cM||(cM=1,rh.read=function(e,t,r,n,a){var i,s,l=a*8-n-1,f=(1<<l)-1,d=f>>1,h=-7,v=r?a-1:0,b=r?-1:1,g=e[t+v];for(v+=b,i=g&(1<<-h)-1,g>>=-h,h+=l;h>0;i=i*256+e[t+v],v+=b,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;h>0;s=s*256+e[t+v],v+=b,h-=8);if(i===0)i=1-d;else{if(i===f)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),i=i-d}return(g?-1:1)*s*Math.pow(2,i-n)},rh.write=function(e,t,r,n,a,i){var s,l,f,d=i*8-a-1,h=(1<<d)-1,v=h>>1,b=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,y=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+v>=1?t+=b/f:t+=b*Math.pow(2,1-v),t*f>=2&&(s++,f/=2),s+v>=h?(l=0,s=h):s+v>=1?(l=(t*f-1)*Math.pow(2,a),s=s+v):(l=t*Math.pow(2,v-1)*Math.pow(2,a),s=0));a>=8;e[r+g]=l&255,g+=y,l/=256,a-=8);for(s=s<<a|l,d+=a;d>0;e[r+g]=s&255,g+=y,s/=256,d-=8);e[r+g-y]|=_*128}),rh}/*!
|
|
695
695
|
* The buffer module from node.js, for the browser.
|
|
696
696
|
*
|
|
697
697
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -891,7 +891,7 @@ For more detail, please visit: ${a}
|
|
|
891
891
|
(?:`+n+":){1}(?:(?::"+n+"){0,4}:"+r+"|(?::"+n+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
892
892
|
(?::(?:(?::`+n+"){0,5}:"+r+"|(?::"+n+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
893
893
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
894
|
-
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+r+"$)|(?:^"+a+"$)"),s=new RegExp("^"+r+"$"),l=new RegExp("^"+a+"$"),f=function(B){return B&&B.exact?i:new RegExp("(?:"+t(B)+r+t(B)+")|(?:"+t(B)+a+t(B)+")","g")};f.v4=function(k){return k&&k.exact?s:new RegExp(""+t(k)+r+t(k),"g")},f.v6=function(k){return k&&k.exact?l:new RegExp(""+t(k)+a+t(k),"g")};var d="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",v=f.v4().source,b=f.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",_="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",T="(?::\\d{2,5})?",w='(?:[/?#][^\\s"]*)?',M="(?:"+d+"|www\\.)"+h+"(?:localhost|"+v+"|"+b+"|"+g+y+_+")"+T+w;return _v=new RegExp("(?:^"+M+"$)","i"),_v},aH={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},pd={integer:function(t){return pd.number(t)&&parseInt(t,10)===t},float:function(t){return pd.number(t)&&!pd.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!pd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(aH.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(fbe())},hex:function(t){return typeof t=="string"&&!!t.match(aH.hex)}},dbe=function(t,r,n,a,i){if(t.required&&r===void 0){iH(t,r,n,a,i);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;s.indexOf(l)>-1?pd[l](r)||a.push(pi(i.messages.types[l],t.fullField,t.type)):l&&typeof r!==t.type&&a.push(pi(i.messages.types[l],t.fullField,t.type))},hbe=function(t,r,n,a,i){var s=typeof t.len=="number",l=typeof t.min=="number",f=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,h=r,v=null,b=typeof r=="number",g=typeof r=="string",y=Array.isArray(r);if(b?v="number":g?v="string":y&&(v="array"),!v)return!1;y&&(h=r.length),g&&(h=r.replace(d,"_").length),s?h!==t.len&&a.push(pi(i.messages[v].len,t.fullField,t.len)):l&&!f&&h<t.min?a.push(pi(i.messages[v].min,t.fullField,t.min)):f&&!l&&h>t.max?a.push(pi(i.messages[v].max,t.fullField,t.max)):l&&f&&(h<t.min||h>t.max)&&a.push(pi(i.messages[v].range,t.fullField,t.min,t.max))},xu="enum",pbe=function(t,r,n,a,i){t[xu]=Array.isArray(t[xu])?t[xu]:[],t[xu].indexOf(r)===-1&&a.push(pi(i.messages[xu],t.fullField,t[xu].join(", ")))},vbe=function(t,r,n,a,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||a.push(pi(i.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(r)||a.push(pi(i.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},sr={required:iH,whitespace:cbe,type:dbe,range:hbe,enum:pbe,pattern:vbe},mbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"string")&&!t.required)return n();sr.required(t,r,a,s,i,"string"),dn(r,"string")||(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i),sr.pattern(t,r,a,s,i),t.whitespace===!0&&sr.whitespace(t,r,a,s,i))}n(s)},gbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},ybe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r===""&&(r=void 0),dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},bbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},wbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),dn(r)||sr.type(t,r,a,s,i)}n(s)},_be=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Ebe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Sbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r==null&&!t.required)return n();sr.required(t,r,a,s,i,"array"),r!=null&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Cbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},Mbe="enum",Tbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr[Mbe](t,r,a,s,i)}n(s)},Abe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"string")&&!t.required)return n();sr.required(t,r,a,s,i),dn(r,"string")||sr.pattern(t,r,a,s,i)}n(s)},Ibe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"date")&&!t.required)return n();if(sr.required(t,r,a,s,i),!dn(r,"date")){var f;r instanceof Date?f=r:f=new Date(r),sr.type(t,f,a,s,i),f&&sr.range(t,f.getTime(),a,s,i)}}n(s)},kbe=function(t,r,n,a,i){var s=[],l=Array.isArray(r)?"array":typeof r;sr.required(t,r,a,s,i,l),n(s)},PS=function(t,r,n,a,i){var s=t.type,l=[],f=t.required||!t.required&&a.hasOwnProperty(t.field);if(f){if(dn(r,s)&&!t.required)return n();sr.required(t,r,a,l,i,s),dn(r,s)||sr.type(t,r,a,l,i)}n(l)},Rbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i)}n(s)},vd={string:mbe,method:gbe,number:ybe,boolean:bbe,regexp:wbe,integer:_be,float:Ebe,array:Sbe,object:Cbe,enum:Tbe,pattern:Abe,date:Ibe,url:PS,hex:PS,email:PS,required:kbe,any:Rbe};function DS(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var LS=DS(),md=function(){function e(r){this.rules=null,this._messages=LS,this.define(r)}var t=e.prototype;return t.define=function(n){var a=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var s=n[i];a.rules[i]=Array.isArray(s)?s:[s]})},t.messages=function(n){return n&&(this._messages=nH(DS(),n)),this._messages},t.validate=function(n,a,i){var s=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var l=n,f=a,d=i;if(typeof f=="function"&&(d=f,f={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,l),Promise.resolve(l);function h(_){var T=[],w={};function M(B){if(Array.isArray(B)){var D;T=(D=T).concat.apply(D,B)}else T.push(B)}for(var k=0;k<_.length;k++)M(_[k]);T.length?(w=NS(T),d(T,w)):d(null,l)}if(f.messages){var v=this.messages();v===LS&&(v=DS()),nH(v,f.messages),f.messages=v}else f.messages=this.messages();var b={},g=f.keys||Object.keys(this.rules);g.forEach(function(_){var T=s.rules[_],w=l[_];T.forEach(function(M){var k=M;typeof k.transform=="function"&&(l===n&&(l=Ml({},l)),w=l[_]=k.transform(w)),typeof k=="function"?k={validator:k}:k=Ml({},k),k.validator=s.getValidationMethod(k),k.validator&&(k.field=_,k.fullField=k.fullField||_,k.type=s.getType(k),b[_]=b[_]||[],b[_].push({rule:k,value:w,source:l,field:_}))})});var y={};return sbe(b,f,function(_,T){var w=_.rule,M=(w.type==="object"||w.type==="array")&&(typeof w.fields=="object"||typeof w.defaultField=="object");M=M&&(w.required||!w.required&&_.value),w.field=_.field;function k(N,O){return Ml({},O,{fullField:w.fullField+"."+N,fullFields:w.fullFields?[].concat(w.fullFields,[N]):[N]})}function B(N){N===void 0&&(N=[]);var O=Array.isArray(N)?N:[N];!f.suppressWarning&&O.length&&e.warning("async-validator:",O),O.length&&w.message!==void 0&&(O=[].concat(w.message));var P=O.map(rH(w,l));if(f.first&&P.length)return y[w.field]=1,T(P);if(!M)T(P);else{if(w.required&&!_.value)return w.message!==void 0?P=[].concat(w.message).map(rH(w,l)):f.error&&(P=[f.error(w,pi(f.messages.required,w.field))]),T(P);var L={};w.defaultField&&Object.keys(_.value).map(function(o){L[o]=w.defaultField}),L=Ml({},L,_.rule.fields);var F={};Object.keys(L).forEach(function(o){var u=L[o],p=Array.isArray(u)?u:[u];F[o]=p.map(k.bind(null,o))});var S=new e(F);S.messages(f.messages),_.rule.options&&(_.rule.options.messages=f.messages,_.rule.options.error=f.error),S.validate(_.value,_.rule.options||f,function(o){var u=[];P&&P.length&&u.push.apply(u,P),o&&o.length&&u.push.apply(u,o),T(u.length?u:null)})}}var D;if(w.asyncValidator)D=w.asyncValidator(w,_.value,B,_.source,f);else if(w.validator){try{D=w.validator(w,_.value,B,_.source,f)}catch(N){console.error?.(N),f.suppressValidatorError||setTimeout(function(){throw N},0),B(N.message)}D===!0?B():D===!1?B(typeof w.message=="function"?w.message(w.fullField||w.field):w.message||(w.fullField||w.field)+" fails"):D instanceof Array?B(D):D instanceof Error&&B(D.message)}D&&D.then&&D.then(function(){return B()},function(N){return B(N)})},function(_){h(_)},l)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!vd.hasOwnProperty(n.type))throw new Error(pi("Unknown rule type %s",n.type));return n.type||"string"},t.getValidationMethod=function(n){if(typeof n.validator=="function")return n.validator;var a=Object.keys(n),i=a.indexOf("message");return i!==-1&&a.splice(i,1),a.length===1&&a[0]==="required"?vd.required:vd[this.getType(n)]||void 0},e}();md.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");vd[t]=r},md.warning=QV,md.messages=LS,md.validators=vd;const oH="ElLabelWrap";var Bbe=_t({name:oH,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const r=Tt(El,void 0),n=Tt(Sl);n||ds(oH,"usage: <el-form-item><label-wrap /></el-form-item>");const a=Pt("form"),i=Ue(),s=Ue(0),l=()=>{var h;if((h=i.value)!=null&&h.firstElementChild){const v=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(v))}else return 0},f=(h="update")=>{Lt(()=>{t.default&&e.isAutoWidth&&(h==="update"?s.value=l():h==="remove"&&r?.deregisterLabelWidth(s.value))})},d=()=>f("update");return lr(()=>{d()}),xr(()=>{f("remove")}),df(()=>d()),Et(s,(h,v)=>{e.updateAll&&r?.registerLabelWidth(h,v)}),qi(be(()=>{var h,v;return(v=(h=i.value)==null?void 0:h.firstElementChild)!=null?v:null}),d),()=>{var h,v;if(!t)return null;const{isAutoWidth:b}=e;if(b){const g=r?.autoLabelWidth,y=n?.hasLabel,_={};if(y&&g&&g!=="auto"){const T=Math.max(0,Number.parseInt(g,10)-s.value),M=(n.labelPosition||r.labelPosition)==="left"?"marginRight":"marginLeft";T&&(_[M]=`${T}px`)}return rt("div",{ref:i,class:[a.be("item","label-wrap")],style:_},[(h=t.default)==null?void 0:h.call(t)])}else return rt(Mt,{ref:i},[(v=t.default)==null?void 0:v.call(t)])}}});const Obe=["role","aria-labelledby"];var sH=_t({name:"ElFormItem",__name:"form-item",props:Qye,setup(e,{expose:t}){const r=e,n=Da(),a=Tt(El,void 0),i=Tt(Sl,void 0),s=Wa(void 0,{formItem:!1}),l=Pt("form-item"),f=td().value,d=Ue([]),h=Ue(""),v=epe(h,100),b=Ue(""),g=Ue();let y,_=!1;const T=be(()=>r.labelPosition||a?.labelPosition),w=be(()=>{var X;return T.value==="top"?{}:{width:_u((X=r.labelWidth)!=null?X:a?.labelWidth)}}),M=be(()=>{var X;if(T.value==="top"||a?.inline)return{};if(!r.label&&!r.labelWidth&&F)return{};const re=_u((X=r.labelWidth)!=null?X:a?.labelWidth);return!r.label&&!n.label?{marginLeft:re}:{}}),k=be(()=>[l.b(),l.m(s.value),l.is("error",h.value==="error"),l.is("validating",h.value==="validating"),l.is("success",h.value==="success"),l.is("required",m.value||r.required),l.is("no-asterisk",a?.hideRequiredAsterisk),a?.requireAsteriskPosition==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:a?.statusIcon,[l.m(`label-${T.value}`)]:T.value}]),B=be(()=>di(r.inlineMessage)?r.inlineMessage:a?.inlineMessage||!1),D=be(()=>[l.e("error"),{[l.em("error","inline")]:B.value}]),N=be(()=>r.prop?lt(r.prop)?r.prop.join("."):r.prop:""),O=be(()=>!!(r.label||n.label)),P=be(()=>{var X;return(X=r.for)!=null?X:d.value.length===1?d.value[0]:void 0}),L=be(()=>!P.value&&O.value),F=!!i,S=be(()=>{const X=a?.model;if(!(!X||!r.prop))return gu(X,r.prop).value}),o=be(()=>{const{required:X}=r,re=[];r.rules&&re.push(...Pi(r.rules));const xe=a?.rules;if(xe&&r.prop){const ve=gu(xe,r.prop).value;ve&&re.push(...Pi(ve))}if(X!==void 0){const ve=re.map((J,we)=>[J,we]).filter(([J])=>"required"in J);if(ve.length>0)for(const[J,we]of ve)J.required!==X&&(re[we]={...J,required:X});else re.push({required:X})}return re}),u=be(()=>o.value.length>0),p=X=>o.value.filter(xe=>!xe.trigger||!X?!0:lt(xe.trigger)?xe.trigger.includes(X):xe.trigger===X).map(({trigger:xe,...ve})=>ve),m=be(()=>o.value.some(X=>X.required)),E=be(()=>{var X;return v.value==="error"&&r.showMessage&&((X=a?.showMessage)!=null?X:!0)}),A=be(()=>`${r.label||""}${a?.labelSuffix||""}`),R=X=>{h.value=X},C=X=>{var re,xe;const{errors:ve,fields:J}=X;(!ve||!J)&&console.error(X),R("error"),b.value=ve?(xe=(re=ve?.[0])==null?void 0:re.message)!=null?xe:`${r.prop} is required`:"",a?.emit("validate",r.prop,!1,b.value)},c=()=>{R("success"),a?.emit("validate",r.prop,!0,"")},I=async X=>{const re=N.value;return new md({[re]:X}).validate({[re]:S.value},{firstFields:!0}).then(()=>(c(),!0)).catch(ve=>(C(ve),Promise.reject(ve)))},x=async(X,re)=>{if(_||!r.prop)return!1;const xe=At(re);if(!u.value)return re?.(!1),!1;const ve=p(X);return ve.length===0?(re?.(!0),!0):(R("validating"),I(ve).then(()=>(re?.(!0),!0)).catch(J=>{const{fields:we}=J;return re?.(!1,we),xe?!1:Promise.reject(we)}))},q=()=>{R(""),b.value="",_=!1},H=async()=>{const X=a?.model;if(!X||!r.prop)return;const re=gu(X,r.prop);_=!0,re.value=$f(y),await Lt(),q(),_=!1},Y=X=>{d.value.includes(X)||d.value.push(X)},Q=X=>{d.value=d.value.filter(re=>re!==X)},V=X=>{y=$f(X)};Et(()=>r.error,X=>{b.value=X||"",R(X?"error":"")},{immediate:!0}),Et(()=>r.validateStatus,X=>R(X||""));const G=jr({...ho(r),$el:g,size:s,validateMessage:b,validateState:h,labelId:f,inputIds:d,isGroup:L,hasLabel:O,fieldValue:S,addInputId:Y,removeInputId:Q,resetField:H,clearValidate:q,validate:x,propString:N,setInitialValue:V});return Br(Sl,G),lr(()=>{r.prop&&(V(S.value),a?.addField(G))}),xr(()=>{a?.removeField(G)}),t({size:s,validateMessage:b,validateState:h,validate:x,clearValidate:q,resetField:H,setInitialValue:V}),(X,re)=>{var xe;return se(),Oe("div",{ref_key:"formItemRef",ref:g,class:Ee(k.value),role:L.value?"group":void 0,"aria-labelledby":L.value?U(f):void 0},[rt(U(Bbe),{"is-auto-width":w.value.width==="auto","update-all":((xe=U(a))==null?void 0:xe.labelWidth)==="auto"},{default:nt(()=>[e.label||X.$slots.label?(se(),et(yr(P.value?"label":"div"),{key:0,id:U(f),for:P.value,class:Ee(U(l).e("label")),style:Pr(w.value)},{default:nt(()=>[yt(X.$slots,"label",{label:A.value},()=>[dr(at(A.value),1)])]),_:3},8,["id","for","class","style"])):Ye("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),Pe("div",{class:Ee(U(l).e("content")),style:Pr(M.value)},[yt(X.$slots,"default"),rt(vae,{name:`${U(l).namespace.value}-zoom-in-top`},{default:nt(()=>[E.value?yt(X.$slots,"error",{key:0,error:b.value},()=>[Pe("div",{class:Ee(D.value)},at(b.value),3)]):Ye("v-if",!0)]),_:3},8,["name"])],6)],10,Obe)}}});const xS=on(Jye,{FormItem:sH}),FS=Mo(sH),Nbe=$t({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fn}}),Pbe={click:e=>e instanceof MouseEvent},Dbe=["href","target"];var Lbe=_t({name:"ElLink",__name:"link",props:Nbe,emits:Pbe,setup(e,{emit:t}){const r=e,n=t,a=D0("link");id({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},be(()=>di(r.underline)));const i=Pt("link"),s=be(()=>{var d,h,v;return[i.b(),i.m((v=(h=r.type)!=null?h:(d=a.value)==null?void 0:d.type)!=null?v:"default"),i.is("disabled",r.disabled),i.is("underline",l.value==="always"),i.is("hover-underline",l.value==="hover"&&!r.disabled)]}),l=be(()=>{var d,h,v;return di(r.underline)?r.underline?"hover":"never":(v=(h=r.underline)!=null?h:(d=a.value)==null?void 0:d.underline)!=null?v:"hover"});function f(d){r.disabled||n("click",d)}return(d,h)=>(se(),Oe("a",{class:Ee(s.value),href:e.disabled||!e.href?void 0:e.href,target:e.disabled||!e.href?void 0:e.target,onClick:f},[e.icon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.icon)))]),_:1})):Ye("v-if",!0),d.$slots.default?(se(),Oe("span",{key:1,class:Ee(U(i).e("inner"))},[yt(d.$slots,"default")],2)):Ye("v-if",!0),d.$slots.icon?yt(d.$slots,"icon",{key:2}):Ye("v-if",!0)],10,Dbe))}});const xbe=on(Lbe);var Fbe=Object.defineProperty,qbe=(e,t,r)=>t in e?Fbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lH=(e,t,r)=>qbe(e,typeof t!="symbol"?t+"":t,r);let $be=class{constructor(t,r){this.parent=t,this.domNode=r,lH(this,"subMenuItems"),lH(this,"subIndex",0),this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,r=>{r.addEventListener("keydown",n=>{const a=ga(n);let i=!1;switch(a){case Ut.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case Ut.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case Ut.tab:{x0(t,"mouseleave");break}case Ut.enter:case Ut.numpadEnter:case Ut.space:{i=!0,n.currentTarget.click();break}}return i&&(n.preventDefault(),n.stopPropagation()),!1})})}};var Ube=Object.defineProperty,zbe=(e,t,r)=>t in e?Ube(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vbe=(e,t,r)=>zbe(e,t+"",r);class Hbe{constructor(t,r){this.domNode=t,Vbe(this,"submenu",null),this.submenu=null,this.init(r)}init(t){this.domNode.setAttribute("tabindex","0");const r=this.domNode.querySelector(`.${t}-menu`);r&&(this.submenu=new $be(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{const r=ga(t);let n=!1;switch(r){case Ut.down:{x0(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case Ut.up:{x0(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case Ut.tab:{x0(t.currentTarget,"mouseleave");break}case Ut.enter:case Ut.numpadEnter:case Ut.space:{n=!0,t.currentTarget.click();break}}n&&t.preventDefault()})}}let jbe=class{constructor(t,r){this.domNode=t,this.init(r)}init(t){const r=this.domNode.childNodes;Array.from(r).forEach(n=>{n.nodeType===1&&new Hbe(n,t)})}};var Kbe=_t({name:"ElMenuCollapseTransition",__name:"menu-collapse-transition",setup(e){const t=Pt("menu"),r={onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,a){bu(n,`${t.namespace.value}-opacity-transition`),n.style.opacity="1",a()},onAfterEnter(n){gl(n,`${t.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Hf(n,t.m("collapse"))?(gl(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),bu(n,t.m("collapse"))):(bu(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),gl(n,t.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){bu(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}};return(n,a)=>(se(),et(yo,$r({mode:"out-in"},r),{default:nt(()=>[yt(n.$slots,"default")]),_:3},16))}});function uH(e,t){const r=be(()=>{let a=e.parent;const i=[t.value];for(;a.type.name!=="ElMenu";)a.props.index&&i.unshift(a.props.index),a=a.parent;return i});return{parentMenu:be(()=>{let a=e.parent;for(;a&&!["ElMenu","ElSubMenu"].includes(a.type.name);)a=a.parent;return a}),indexPath:r}}function Wbe(e){return be(()=>{const r=e.backgroundColor;return r?new gV(r).shade(20).toString():""})}const cH=(e,t)=>{const r=Pt("menu");return be(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":Wbe(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},qS="rootMenu",Ev="subMenu:",Gbe=$t({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,popperStyle:{type:ft([String,Object])},disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fn},expandOpenIcon:{type:fn},collapseCloseIcon:{type:fn},collapseOpenIcon:{type:fn}}),$S="ElSubMenu";var US=_t({name:$S,props:Gbe,setup(e,{slots:t,expose:r}){const n=fr(),{indexPath:a,parentMenu:i}=uH(n,be(()=>e.index)),s=Pt("menu"),l=Pt("sub-menu"),f=Tt(qS);f||ds($S,"can not inject root menu");const d=Tt(`${Ev}${i.value.uid}`);d||ds($S,"can not inject sub menu");const h=Ue({}),v=Ue({});let b;const g=Ue(!1),y=Ue(),_=Ue(),T=be(()=>d.level===0),w=be(()=>P.value==="horizontal"&&T.value?"bottom-start":"right-start"),M=be(()=>P.value==="horizontal"&&T.value||P.value==="vertical"&&!f.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?N.value?e.expandOpenIcon:e.expandCloseIcon:qE:e.collapseCloseIcon&&e.collapseOpenIcon?N.value?e.collapseOpenIcon:e.collapseCloseIcon:jf),k=be(()=>{const x=e.teleported;return Li(x)?T.value:x}),B=be(()=>f.props.collapse?`${s.namespace.value}-zoom-in-left`:`${s.namespace.value}-zoom-in-top`),D=be(()=>P.value==="horizontal"&&T.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),N=be(()=>f.openedMenus.includes(e.index)),O=be(()=>[...Object.values(h.value),...Object.values(v.value)].some(({active:x})=>x)),P=be(()=>f.props.mode),L=be(()=>f.props.persistent),F=jr({index:e.index,indexPath:a,active:O}),S=cH(f.props,d.level+1),o=be(()=>{var x;return(x=e.popperOffset)!=null?x:f.props.popperOffset}),u=be(()=>{var x;return(x=e.popperClass)!=null?x:f.props.popperClass}),p=be(()=>{var x;return(x=e.popperStyle)!=null?x:f.props.popperStyle}),m=be(()=>{var x;return(x=e.showTimeout)!=null?x:f.props.showTimeout}),E=be(()=>{var x;return(x=e.hideTimeout)!=null?x:f.props.hideTimeout}),A=()=>{var x,q,H;return(H=(q=(x=_.value)==null?void 0:x.popperRef)==null?void 0:q.popperInstanceRef)==null?void 0:H.destroy()},R=x=>{x||A()},C=()=>{f.props.menuTrigger==="hover"&&f.props.mode==="horizontal"||f.props.collapse&&f.props.mode==="vertical"||e.disabled||f.handleSubMenuClick({index:e.index,indexPath:a.value,active:O.value})},c=(x,q=m.value)=>{var H;if(x.type!=="focus"){if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||e.disabled){d.mouseInChild.value=!0;return}d.mouseInChild.value=!0,b?.(),{stop:b}=LE(()=>{f.openMenu(e.index,a.value)},q),k.value&&((H=i.value.vnode.el)==null||H.dispatchEvent(new MouseEvent("mouseenter"))),x.type==="mouseenter"&&x.target&&Lt(()=>{F0(x.target,{preventScroll:!0})})}},I=(x=!1)=>{var q;if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"){d.mouseInChild.value=!1;return}b?.(),d.mouseInChild.value=!1,{stop:b}=LE(()=>!g.value&&f.closeMenu(e.index,a.value),E.value),k.value&&x&&((q=d.handleMouseleave)==null||q.call(d,!0))};Et(()=>f.props.collapse,x=>R(!!x));{const x=H=>{v.value[H.index]=H},q=H=>{delete v.value[H.index]};Br(`${Ev}${n.uid}`,{addSubMenu:x,removeSubMenu:q,handleMouseleave:I,mouseInChild:g,level:d.level+1})}return r({opened:N}),lr(()=>{f.addSubMenu(F),d.addSubMenu(F)}),xr(()=>{d.removeSubMenu(F),f.removeSubMenu(F)}),()=>{var x;const q=[(x=t.title)==null?void 0:x.call(t),Ht(zt,{class:l.e("icon-arrow"),style:{transform:N.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&f.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>qt(M.value)?Ht(n.appContext.components[M.value]):Ht(M.value)})],H=f.isMenuPopup?Ht(Z0,{ref:_,visible:N.value,effect:"light",pure:!0,offset:o.value,showArrow:!1,persistent:L.value,popperClass:u.value,popperStyle:p.value,placement:w.value,teleported:k.value,fallbackPlacements:D.value,transition:B.value,gpuAcceleration:!1},{content:()=>{var Y;return Ht("div",{class:[s.m(P.value),s.m("popup-container"),u.value],onMouseenter:Q=>c(Q,100),onMouseleave:()=>I(!0),onFocus:Q=>c(Q,100)},[Ht("ul",{class:[s.b(),s.m("popup"),s.m(`popup-${w.value}`)],style:S.value},[(Y=t.default)==null?void 0:Y.call(t)])])},default:()=>Ht("div",{class:l.e("title"),onClick:C},q)}):Ht(Mt,{},[Ht("div",{class:l.e("title"),ref:y,onClick:C},q),Ht(Lge,{},{default:()=>{var Y;return cr(Ht("ul",{role:"menu",class:[s.b(),s.m("inline")],style:S.value},[(Y=t.default)==null?void 0:Y.call(t)]),[[Zr,N.value]])}})]);return Ht("li",{class:[l.b(),l.is("active",O.value),l.is("opened",N.value),l.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:N.value,onMouseenter:c,onMouseleave:()=>I(),onFocus:c},[H])}}});const Ybe=$t({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ft(Array),default:()=>Lz([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:fn,default:()=>xpe},popperEffect:{type:ft(String),default:"dark"},popperClass:String,popperStyle:{type:ft([String,Object])},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),zS=e=>lt(e)&&e.every(t=>qt(t)),Zbe={close:(e,t)=>qt(e)&&zS(t),open:(e,t)=>qt(e)&&zS(t),select:(e,t,r,n)=>qt(e)&&zS(t)&&xt(r)&&(Li(n)||n instanceof Promise)},fH=64;var Jbe=_t({name:"ElMenu",props:Ybe,emits:Zbe,setup(e,{emit:t,slots:r,expose:n}){const a=fr(),i=a.appContext.config.globalProperties.$router,s=Ue(),l=Ue(),f=Pt("menu"),d=Pt("sub-menu");let h=fH;const v=Ue(-1),b=Ue(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=Ue(e.defaultActive),y=Ue({}),_=Ue({}),T=be(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),w=()=>{const A=g.value&&y.value[g.value];if(!A||e.mode==="horizontal"||e.collapse)return;A.indexPath.forEach(C=>{const c=_.value[C];c&&M(C,c.indexPath)})},M=(A,R)=>{b.value.includes(A)||(e.uniqueOpened&&(b.value=b.value.filter(C=>R.includes(C))),b.value.push(A),t("open",A,R))},k=A=>{const R=b.value.indexOf(A);R!==-1&&b.value.splice(R,1)},B=(A,R)=>{k(A),t("close",A,R)},D=({index:A,indexPath:R})=>{b.value.includes(A)?B(A,R):M(A,R)},N=A=>{(e.mode==="horizontal"||e.collapse)&&(b.value=[]);const{index:R,indexPath:C}=A;if(!(fs(R)||fs(C)))if(e.router&&i){const c=A.route||R,I=i.push(c).then(x=>(x||(g.value=R),x));t("select",R,C,{index:R,indexPath:C,route:c},I)}else g.value=R,t("select",R,C,{index:R,indexPath:C})},O=A=>{var R;const C=y.value,c=C[A]||g.value&&C[g.value]||C[e.defaultActive];g.value=(R=c?.index)!=null?R:A},P=A=>{const R=getComputedStyle(A),C=Number.parseInt(R.marginLeft,10),c=Number.parseInt(R.marginRight,10);return A.offsetWidth+C+c||0},L=()=>{if(!s.value)return-1;const A=Array.from(s.value.childNodes).filter(H=>H.nodeName!=="#comment"&&(H.nodeName!=="#text"||H.nodeValue)),R=getComputedStyle(s.value),C=Number.parseInt(R.paddingLeft,10),c=Number.parseInt(R.paddingRight,10),I=s.value.clientWidth-C-c;let x=0,q=0;return A.forEach((H,Y)=>{x+=P(H),x<=I-h&&(q=Y+1)}),q===A.length?-1:q},F=A=>_.value[A].indexPath,S=(A,R=33.34)=>{let C;return()=>{C&&clearTimeout(C),C=setTimeout(()=>{A()},R)}};let o=!0;const u=()=>{const A=xi(l);if(A&&(h=P(A)||fH),v.value===L())return;const R=()=>{v.value=-1,Lt(()=>{v.value=L()})};o?R():S(R)(),o=!1};Et(()=>e.defaultActive,A=>{y.value[A]||(g.value=""),O(A)}),Et(()=>e.collapse,A=>{A&&(b.value=[])}),Et(y.value,w);let p;w4(()=>{e.mode==="horizontal"&&e.ellipsis?p=qi(s,u).stop:p?.()});const m=Ue(!1);{const A=I=>{_.value[I.index]=I},R=I=>{delete _.value[I.index]};Br(qS,jr({props:e,openedMenus:b,items:y,subMenus:_,activeIndex:g,isMenuPopup:T,addMenuItem:I=>{y.value[I.index]=I},removeMenuItem:I=>{delete y.value[I.index]},addSubMenu:A,removeSubMenu:R,openMenu:M,closeMenu:B,handleMenuItemClick:N,handleSubMenuClick:D})),Br(`${Ev}${a.uid}`,{addSubMenu:A,removeSubMenu:R,mouseInChild:m,level:0})}lr(()=>{e.mode==="horizontal"&&new jbe(a.vnode.el,f.namespace.value)}),n({open:R=>{const{indexPath:C}=_.value[R];C.forEach(c=>M(c,C))},close:k,updateActiveIndex:O,handleResize:u});const E=cH(e,0);return()=>{var A,R;let C=(R=(A=r.default)==null?void 0:A.call(r))!=null?R:[];const c=[];if(e.mode==="horizontal"&&s.value){const q=wl(C).filter(Q=>Q?.shapeFlag!==8),H=v.value===-1?q:q.slice(0,v.value),Y=v.value===-1?[]:q.slice(v.value);Y?.length&&e.ellipsis&&(C=H,c.push(Ht(US,{ref:l,index:"sub-menu-more",class:d.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>Ht(zt,{class:d.e("icon-more")},{default:()=>Ht(e.ellipsisIcon)}),default:()=>Y})))}const I=e.closeOnClickOutside?[[ad,()=>{b.value.length&&(m.value||(b.value.forEach(q=>t("close",q,F(q))),b.value=[]))}]]:[],x=cr(Ht("ul",{key:String(e.collapse),role:"menubar",ref:s,style:E.value,class:{[f.b()]:!0,[f.m(e.mode)]:!0,[f.m("collapse")]:e.collapse}},[...C,...c]),I);return e.collapseTransition&&e.mode==="vertical"?Ht(Kbe,()=>x):x}}});const Xbe=$t({index:{type:ft([String,null]),default:null},route:{type:ft([String,Object])},disabled:Boolean}),Qbe={click:e=>qt(e.index)&<(e.indexPath)},Sv="ElMenuItem";var dH=_t({name:Sv,__name:"menu-item",props:Xbe,emits:Qbe,setup(e,{expose:t,emit:r}){const n=e,a=r;B0(n.index)&&pr(Sv,'Missing required prop: "index"');const i=fr(),s=Tt(qS),l=Pt("menu"),f=Pt("menu-item");s||ds(Sv,"can not inject root menu");const{parentMenu:d,indexPath:h}=uH(i,Kr(n,"index")),v=Tt(`${Ev}${d.value.uid}`);v||ds(Sv,"can not inject sub menu");const b=be(()=>n.index===s.activeIndex),g=jr({index:n.index,indexPath:h,active:b}),y=()=>{n.disabled||(s.handleMenuItemClick({index:n.index,indexPath:h.value,route:n.route}),a("click",g))};return lr(()=>{v.addSubMenu(g),s.addMenuItem(g)}),xr(()=>{v.removeSubMenu(g),s.removeMenuItem(g)}),t({parentMenu:d,rootMenu:s,active:b,nsMenu:l,nsMenuItem:f,handleClick:y}),(_,T)=>(se(),Oe("li",{class:Ee([U(f).b(),U(f).is("active",b.value),U(f).is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:y},[U(d).type.name==="ElMenu"&&U(s).props.collapse&&_.$slots.title?(se(),et(U(Z0),{key:0,effect:U(s).props.popperEffect,placement:"right","fallback-placements":["left"],"popper-class":U(s).props.popperClass,"popper-style":U(s).props.popperStyle,persistent:U(s).props.persistent,"focus-on-target":""},{content:nt(()=>[yt(_.$slots,"title")]),default:nt(()=>[Pe("div",{class:Ee(U(l).be("tooltip","trigger"))},[yt(_.$slots,"default")],2)]),_:3},8,["effect","popper-class","popper-style","persistent"])):(se(),Oe(Mt,{key:1},[yt(_.$slots,"default"),yt(_.$slots,"title")],64))],2))}}),hH=_t({name:"ElMenuItemGroup",__name:"menu-item-group",props:{title:String},setup(e){const t=Pt("menu-item-group");return(r,n)=>(se(),Oe("li",{class:Ee(U(t).b())},[Pe("div",{class:Ee(U(t).e("title"))},[r.$slots.title?yt(r.$slots,"title",{key:1}):(se(),Oe(Mt,{key:0},[dr(at(e.title),1)],64))],2),Pe("ul",null,[yt(r.$slots,"default")])],2))}});const ewe=on(Jbe,{MenuItem:dH,MenuItemGroup:hH,SubMenu:US}),twe=Mo(dH);Mo(hH),Mo(US);const rwe=$t({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:ft([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:ft([String,Object,Array])}});var nwe=_t({name:"ElStatistic",__name:"statistic",props:rwe,setup(e,{expose:t}){const r=e,n=Pt("statistic"),a=be(()=>{const{value:i,formatter:s,precision:l,decimalSeparator:f,groupSeparator:d}=r;if(At(s))return s(i);if(!an(i)||Number.isNaN(i))return i;let[h,v=""]=String(i).split(".");return v=v.padEnd(l,"0").slice(0,l>0?l:0),h=h.replace(/\B(?=(\d{3})+(?!\d))/g,d),[h,v].join(v?f:"")});return t({displayValue:a}),(i,s)=>(se(),Oe("div",{class:Ee(U(n).b())},[i.$slots.title||e.title?(se(),Oe("div",{key:0,class:Ee(U(n).e("head"))},[yt(i.$slots,"title",{},()=>[dr(at(e.title),1)])],2)):Ye("v-if",!0),Pe("div",{class:Ee(U(n).e("content"))},[i.$slots.prefix||e.prefix?(se(),Oe("div",{key:0,class:Ee(U(n).e("prefix"))},[yt(i.$slots,"prefix",{},()=>[Pe("span",null,at(e.prefix),1)])],2)):Ye("v-if",!0),Pe("span",{class:Ee(U(n).e("number")),style:Pr(e.valueStyle)},at(a.value),7),i.$slots.suffix||e.suffix?(se(),Oe("div",{key:1,class:Ee(U(n).e("suffix"))},[yt(i.$slots,"suffix",{},()=>[Pe("span",null,at(e.suffix),1)])],2)):Ye("v-if",!0)],2)],2))}});const iwe=on(nwe),awe=$t({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:e=>["",...Vf].includes(e)},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fn},activeActionIcon:{type:fn},activeIcon:{type:fn},inactiveIcon:{type:fn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:ft(Function)},id:String,tabindex:{type:[String,Number]},...Ao(["ariaLabel"])}),owe={[Xr]:e=>di(e)||qt(e)||an(e),[Wn]:e=>di(e)||qt(e)||an(e),[yu]:e=>di(e)||qt(e)||an(e)},swe=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],lwe=["aria-hidden"],uwe={key:1},cwe={key:1},fwe=["aria-hidden"],VS="ElSwitch";var dwe=_t({name:VS,__name:"switch",props:awe,emits:owe,setup(e,{expose:t,emit:r}){const n=e,a=r,{formItem:i}=Io(),s=Wa(),l=Pt("switch"),{inputId:f}=Iu(n,{formItemContext:i}),d=Vi(be(()=>{if(n.loading)return!0})),h=Ue(n.modelValue!==!1),v=fo(),b=be(()=>[l.b(),l.m(s.value),l.is("disabled",d.value),l.is("checked",w.value)]),g=be(()=>[l.e("label"),l.em("label","left"),l.is("active",!w.value)]),y=be(()=>[l.e("label"),l.em("label","right"),l.is("active",w.value)]),_=be(()=>({width:_u(n.width)}));Et(()=>n.modelValue,()=>{h.value=!0});const T=be(()=>h.value?n.modelValue:!1),w=be(()=>T.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(T.value)||(a(Xr,n.inactiveValue),a(Wn,n.inactiveValue),a(yu,n.inactiveValue)),Et(w,D=>{var N;v.value.checked=D,n.validateEvent&&((N=i?.validate)==null||N.call(i,"change").catch(O=>pr(O)))});const M=()=>{const D=w.value?n.inactiveValue:n.activeValue;a(Xr,D),a(Wn,D),a(yu,D),Lt(()=>{v.value.checked=w.value})},k=()=>{if(d.value)return;const{beforeChange:D}=n;if(!D){M();return}const N=D();[Kc(N),di(N)].includes(!0)||ds(VS,"beforeChange must return type `Promise<boolean>` or `boolean`"),Kc(N)?N.then(P=>{P&&M()}).catch(P=>{pr(VS,`some error occurred: ${P}`)}):N&&M()},B=()=>{var D,N;(N=(D=v.value)==null?void 0:D.focus)==null||N.call(D)};return lr(()=>{v.value.checked=w.value}),t({focus:B,checked:w}),(D,N)=>(se(),Oe("div",{class:Ee(b.value),onClick:br(k,["prevent"])},[Pe("input",{id:U(f),ref_key:"input",ref:v,class:Ee(U(l).e("input")),type:"checkbox",role:"switch","aria-checked":w.value,"aria-disabled":U(d),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:U(d),tabindex:e.tabindex,onChange:M,onKeydown:fa(k,["enter"])},null,42,swe),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||D.$slots.inactive)?(se(),Oe("span",{key:0,class:Ee(g.value)},[yt(D.$slots,"inactive",{},()=>[e.inactiveIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveIcon)))]),_:1})):Ye("v-if",!0),!e.inactiveIcon&&e.inactiveText?(se(),Oe("span",{key:1,"aria-hidden":w.value},at(e.inactiveText),9,lwe)):Ye("v-if",!0)])],2)):Ye("v-if",!0),Pe("span",{class:Ee(U(l).e("core")),style:Pr(_.value)},[e.inlinePrompt?(se(),Oe("div",{key:0,class:Ee(U(l).e("inner"))},[w.value?(se(),Oe("div",{key:1,class:Ee(U(l).e("inner-wrapper"))},[yt(D.$slots,"active",{},()=>[e.activeIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeIcon)))]),_:1})):Ye("v-if",!0),!e.activeIcon&&e.activeText?(se(),Oe("span",cwe,at(e.activeText),1)):Ye("v-if",!0)])],2)):(se(),Oe("div",{key:0,class:Ee(U(l).e("inner-wrapper"))},[yt(D.$slots,"inactive",{},()=>[e.inactiveIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveIcon)))]),_:1})):Ye("v-if",!0),!e.inactiveIcon&&e.inactiveText?(se(),Oe("span",uwe,at(e.inactiveText),1)):Ye("v-if",!0)])],2))],2)):Ye("v-if",!0),Pe("div",{class:Ee(U(l).e("action"))},[e.loading?(se(),et(U(zt),{key:0,class:Ee(U(l).is("loading"))},{default:nt(()=>[rt(U(UE))]),_:1},8,["class"])):w.value?yt(D.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeActionIcon)))]),_:1})):Ye("v-if",!0)]):w.value?Ye("v-if",!0):yt(D.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveActionIcon)))]),_:1})):Ye("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||D.$slots.active)?(se(),Oe("span",{key:1,class:Ee(y.value)},[yt(D.$slots,"active",{},()=>[e.activeIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeIcon)))]),_:1})):Ye("v-if",!0),!e.activeIcon&&e.activeText?(se(),Oe("span",{key:1,"aria-hidden":!w.value},at(e.activeText),9,fwe)):Ye("v-if",!0)])],2)):Ye("v-if",!0)],2))}});const hwe=on(dwe);function pwe(e,t){let r;const n=Ue(!1),a=jr({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(g){a.text=g}function s(){const g=a.parent,y=b.ns;if(!g.vLoadingAddClassList){let _=g.getAttribute("loading-number");_=Number.parseInt(_)-1,_?g.setAttribute("loading-number",_.toString()):(gl(g,y.bm("parent","relative")),g.removeAttribute("loading-number")),gl(g,y.bm("parent","hidden"))}l(),v.unmount()}function l(){var g,y;(y=(g=b.$el)==null?void 0:g.parentNode)==null||y.removeChild(b.$el)}function f(){var g;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(r),r=setTimeout(d,400),a.visible=!1,(g=e.closed)==null||g.call(e))}function d(){if(!n.value)return;const g=a.parent;n.value=!1,g.vLoadingAddClassList=void 0,s()}const v=YF(_t({name:"ElLoading",setup(g,{expose:y}){const{ns:_,zIndex:T}=az("loading");return y({ns:_,zIndex:T}),()=>{const w=a.spinner||a.svg,M=Ht("svg",{class:"circular",viewBox:a.svgViewBox?a.svgViewBox:"0 0 50 50",...w?{innerHTML:w}:{}},[Ht("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=a.text?Ht("p",{class:_.b("text")},[a.text]):void 0;return Ht(yo,{name:_.b("fade"),onAfterLeave:d},{default:nt(()=>[cr(rt("div",{style:{backgroundColor:a.background||""},class:[_.b("mask"),a.customClass,_.is("fullscreen",a.fullscreen)]},[Ht("div",{class:_.b("spinner")},[M,k])]),[[Zr,a.visible]])])})}}}));Object.assign(v._context,t??{});const b=v.mount(document.createElement("div"));return{...ho(a),setText:i,removeElLoadingChild:l,close:f,handleAfterLeave:d,vm:b,get $el(){return b.$el}}}let Cv;const HS=function(e={},t){if(!Jr)return;const r=vwe(e);if(r.fullscreen&&Cv)return Cv;const n=pwe({...r,closed:()=>{var i;(i=r.closed)==null||i.call(r),r.fullscreen&&(Cv=void 0)}},t??HS._context);mwe(r,r.parent,n),pH(r,r.parent,n),r.parent.vLoadingAddClassList=()=>pH(r,r.parent,n);let a=r.parent.getAttribute("loading-number");return a?a=`${Number.parseInt(a)+1}`:a="1",r.parent.setAttribute("loading-number",a),r.parent.appendChild(n.$el),Lt(()=>n.visible.value=r.visible),r.fullscreen&&(Cv=n),n},vwe=e=>{var t,r,n,a;let i;return qt(e.target)?i=(t=document.querySelector(e.target))!=null?t:document.body:i=e.target||document.body,{parent:i===document.body||e.body?document.body:i,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:i===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(a=e.visible)!=null?a:!0,beforeClose:e.beforeClose,closed:e.closed,target:i}},mwe=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(e.fullscreen)r.originalPosition.value=wu(document.body,"position"),r.originalOverflow.value=wu(document.body,"overflow"),a.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=wu(document.body,"position"),await Lt();for(const i of["top","left"]){const s=i==="top"?"scrollTop":"scrollLeft";a[i]=`${e.target.getBoundingClientRect()[i]+document.body[s]+document.documentElement[s]-Number.parseInt(wu(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${e.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=wu(t,"position");for(const[i,s]of Object.entries(a))r.$el.style[i]=s},pH=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?gl(t,n.bm("parent","relative")):bu(t,n.bm("parent","relative")),e.fullscreen&&e.lock?bu(t,n.bm("parent","hidden")):gl(t,n.bm("parent","hidden"))};HS._context=null;const gd=Symbol("ElLoading"),Tl=e=>`element-loading-${Ra(e)}`,vH=(e,t)=>{var r,n,a,i;const s=t.instance,l=g=>xt(t.value)?t.value[g]:void 0,f=g=>{const y=qt(g)&&s?.[g]||g;return Ue(y)},d=g=>f(l(g)||e.getAttribute(Tl(g))),h=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,v={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:h,target:(n=l("target"))!=null?n:h?void 0:e,body:(a=l("body"))!=null?a:t.modifiers.body,lock:(i=l("lock"))!=null?i:t.modifiers.lock},b=HS(v);b._context=jS._context,e[gd]={options:v,instance:b}},gwe=(e,t)=>{for(const r of Object.keys(e))Er(e[r])&&(e[r].value=t[r])},jS={mounted(e,t){t.value&&vH(e,t)},updated(e,t){const r=e[gd];if(!t.value){r?.instance.close(),e[gd]=null;return}r?gwe(r.options,xt(t.value)?t.value:{text:e.getAttribute(Tl("text")),svg:e.getAttribute(Tl("svg")),svgViewBox:e.getAttribute(Tl("svgViewBox")),spinner:e.getAttribute(Tl("spinner")),background:e.getAttribute(Tl("background")),customClass:e.getAttribute(Tl("customClass"))}):vH(e,t)},unmounted(e){var t;(t=e[gd])==null||t.instance.close(),e[gd]=null}};jS._context=null;const mH=["primary","success","info","warning","error"],ywe=$t({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fn},id:{type:String,default:""},message:{type:ft([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:ft(Function),default:()=>{}},onClose:{type:ft(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...mH,""],default:""},zIndex:Number,closeIcon:{type:fn,default:q0}}),bwe={destroy:()=>!0},wwe=["id"],_we=["textContent"],Ewe={key:0},Swe=["innerHTML"];var Cwe=_t({name:"ElNotification",__name:"notification",props:ywe,emits:bwe,setup(e,{expose:t}){const r=e,{ns:n,zIndex:a}=az("notification"),{nextZIndex:i,currentZIndex:s}=a,l=Ue(!1);let f;const d=be(()=>{const M=r.type;return M&&$0[r.type]?n.m(M):""}),h=be(()=>r.type&&$0[r.type]||r.icon),v=be(()=>r.position.endsWith("right")?"right":"left"),b=be(()=>r.position.startsWith("top")?"top":"bottom"),g=be(()=>{var M;return{[b.value]:`${r.offset}px`,zIndex:(M=r.zIndex)!=null?M:s.value}});function y(){r.duration>0&&({stop:f}=LE(()=>{l.value&&T()},r.duration))}function _(){f?.()}function T(){l.value=!1}function w(M){switch(ga(M)){case Ut.delete:case Ut.backspace:_();break;case Ut.esc:l.value&&T();break;default:y();break}}return lr(()=>{y(),i(),l.value=!0}),Fi(document,"keydown",w),t({visible:l,close:T}),(M,k)=>(se(),et(yo,{name:U(n).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:k[1]||(k[1]=B=>M.$emit("destroy")),persisted:""},{default:nt(()=>[cr(Pe("div",{id:e.id,class:Ee([U(n).b(),e.customClass,v.value]),style:Pr(g.value),role:"alert",onMouseenter:_,onMouseleave:y,onClick:k[0]||(k[0]=(...B)=>e.onClick&&e.onClick(...B))},[h.value?(se(),et(U(zt),{key:0,class:Ee([U(n).e("icon"),d.value])},{default:nt(()=>[(se(),et(yr(h.value)))]),_:1},8,["class"])):Ye("v-if",!0),Pe("div",{class:Ee(U(n).e("group"))},[Pe("h2",{class:Ee(U(n).e("title")),textContent:at(e.title)},null,10,_we),cr(Pe("div",{class:Ee(U(n).e("content")),style:Pr(e.title?void 0:{margin:0})},[yt(M.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(se(),Oe(Mt,{key:1},[Ye(" Caution here, message could've been compromised, never use user's input as message "),Pe("p",{innerHTML:e.message},null,8,Swe)],2112)):(se(),Oe("p",Ewe,at(e.message),1))])],6),[[Zr,e.message]]),e.showClose?(se(),et(U(zt),{key:0,class:Ee(U(n).e("closeBtn")),onClick:br(T,["stop"])},{default:nt(()=>[(se(),et(yr(e.closeIcon)))]),_:1},8,["class"])):Ye("v-if",!0)],2)],46,wwe),[[Zr,l.value]])]),_:3},8,["name","onBeforeLeave"]))}});const Fu={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Mv=16;let Mwe=1;const Al=function(e={},t){if(!Jr)return{close:()=>{}};(qt(e)||wn(e))&&(e={message:e});const r=e.position||"top-right";let n=e.offset||0;Fu[r].forEach(({vm:h})=>{var v;n+=(((v=h.el)==null?void 0:v.offsetHeight)||0)+Mv}),n+=Mv;const a=`notification_${Mwe++}`,i=e.onClose,s={...e,offset:n,id:a,onClose:()=>{Twe(a,r,i)}};let l=document.body;Ha(e.appendTo)?l=e.appendTo:qt(e.appendTo)&&(l=document.querySelector(e.appendTo)),Ha(l)||(pr("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),l=document.body);const f=document.createElement("div"),d=rt(Cwe,s,At(s.message)?s.message:wn(s.message)?()=>s.message:null);return d.appContext=Li(t)?Al._context:t,d.props.onDestroy=()=>{GF(null,f)},GF(d,f),Fu[r].push({vm:d}),l.appendChild(f.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};mH.forEach(e=>{Al[e]=(t={},r)=>((qt(t)||wn(t))&&(t={message:t}),Al({...t,type:e},r))});function Twe(e,t,r){const n=Fu[t],a=n.findIndex(({vm:d})=>{var h;return((h=d.component)==null?void 0:h.props.id)===e});if(a===-1)return;const{vm:i}=n[a];if(!i)return;r?.(i);const s=i.el.offsetHeight,l=t.split("-")[0];n.splice(a,1);const f=n.length;if(!(f<1))for(let d=a;d<f;d++){const{el:h,component:v}=n[d].vm,b=Number.parseInt(h.style[l],10)-s-Mv;v.props.offset=b}}function Awe(){for(const e of Object.values(Fu))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}function Iwe(e="top-right"){var t,r,n,a;let i=((n=(r=(t=Fu[e][0])==null?void 0:t.vm.component)==null?void 0:r.props)==null?void 0:n.offset)||0;for(const{vm:s}of Fu[e])s.component.props.offset=i,i+=(((a=s.el)==null?void 0:a.offsetHeight)||0)+Mv}Al.closeAll=Awe,Al.updateOffsets=Iwe,Al._context=null;const Gr=cpe(Al,"$notify");/*! Element Plus v2.13.3 */var kwe={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};/*! Element Plus v2.13.3 */var Rwe={name:"es",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"Confirmar",clear:"Despejar",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Ahora",today:"Hoy",cancel:"Cancelar",clear:"Despejar",confirm:"Confirmar",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Seleccionar fecha",selectTime:"Seleccionar hora",startDate:"Fecha Incial",startTime:"Hora Inicial",endDate:"Fecha Final",endTime:"Hora Final",prevYear:"A\xF1o Anterior",nextYear:"Pr\xF3ximo A\xF1o",prevMonth:"Mes Anterior",nextMonth:"Pr\xF3ximo Mes",year:"",month1:"enero",month2:"febrero",month3:"marzo",month4:"abril",month5:"mayo",month6:"junio",month7:"julio",month8:"agosto",month9:"septiembre",month10:"octubre",month11:"noviembre",month12:"diciembre",weeks:{sun:"dom",mon:"lun",tue:"mar",wed:"mi\xE9",thu:"jue",fri:"vie",sat:"s\xE1b"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"ene",feb:"feb",mar:"mar",apr:"abr",may:"may",jun:"jun",jul:"jul",aug:"ago",sep:"sep",oct:"oct",nov:"nov",dec:"dic"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Cargando",noMatch:"No hay datos que coincidan",noData:"Sin datos",placeholder:"Seleccionar"},mention:{loading:"Cargando"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No hay datos que coincidan",loading:"Cargando",placeholder:"Seleccionar",noData:"Sin datos"},pagination:{goto:"Ir a",pagesize:"/p\xE1gina",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"Aceptar",cancel:"Cancelar",error:"Entrada inv\xE1lida",close:"Close this dialog"},upload:{deleteTip:"Pulse Eliminar para retirar",delete:"Eliminar",preview:"Vista Previa",continue:"Continuar"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"Sin Datos",confirmFilter:"Confirmar",resetFilter:"Reiniciar",clearFilter:"Despejar",sumText:"Suma",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"Sin Datos"},transfer:{noMatch:"No hay datos que coincidan",noData:"Sin datos",titles:["Lista 1","Lista 2"],filterPlaceholder:"Ingresar palabra clave",noCheckedFormat:"{total} art\xEDculos",hasCheckedFormat:"{checked}/{total} revisados"},image:{error:"HA FALLADO"},pageHeader:{title:"Volver"},popconfirm:{confirmButtonText:"Si",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Bwe={key:0,width:"30",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Owe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",fill:"none"},Nwe={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},Pwe={key:3,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},Dwe={key:4,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},Lwe={key:5,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},xwe={key:6,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},Fwe={key:7,xmlns:"http://www.w3.org/2000/svg",width:"22",height:"23",fill:"none",stroke:"#969eab","stroke-width":"3","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},qwe={key:8,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},$we={key:9,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},Uwe={key:10,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"#abb6c8","stroke-width":"1.5","xmlns:v":"https://vecta.io/nano"},Xn=_t({__name:"CustomIcon",props:{icon:{}},setup(e){const t=e;return(r,n)=>t.icon==="back"?(se(),Oe("svg",Bwe,n[0]||(n[0]=[Pe("path",{d:"M2 14.219h26.5M2 13.781 13.781 2M2 14.219 13.781 26",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):t.icon==="close"?(se(),Oe("svg",Owe,n[1]||(n[1]=[Pe("path",{d:"m2 2 18.738 18.738M2.12 21.107 20.857 2.37",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):t.icon==="error"?(se(),Oe("svg",Nwe,n[2]||(n[2]=[Pe("circle",{cx:"25",cy:"25",r:"25",fill:"#d75a4a"},null,-1),Pe("path",{fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-miterlimit":"10",d:"M16 34l9-9 9-9M16 16l9 9 9 9"},null,-1)]))):t.icon==="eye"?(se(),Oe("svg",Pwe,n[3]||(n[3]=[Pe("path",{d:"M12 9q1.219 0 2.109.891T15 12t-.891 2.109T12 15t-2.109-.891T9 12t.891-2.109T12 9zm0 8.016q2.063 0 3.539-1.477T17.016 12t-1.477-3.539T12 6.984 8.461 8.461 6.984 12t1.477 3.539T12 17.016zM12 4.5q3.703 0 6.703 2.063t4.313 5.438q-1.313 3.375-4.313 5.438T12 19.502t-6.703-2.063-4.313-5.438q1.313-3.375 4.313-5.438T12 4.5z"},null,-1)]))):t.icon==="eye-slash"?(se(),Oe("svg",Dwe,n[4]||(n[4]=[Pe("path",{d:"M11.859 9H12q1.219 0 2.109.891T15 12v.188zm-4.312.797Q6.984 10.922 6.984 12q0 2.063 1.477 3.539T12 17.016q1.078 0 2.203-.563l-1.547-1.547Q12.281 15 12 15q-1.219 0-2.109-.891T9 12q0-.281.094-.656zM2.016 4.266L3.282 3l17.719 17.719-1.266 1.266q-.234-.234-1.477-1.453t-1.898-1.875q-2.016.844-4.359.844-3.703 0-6.703-2.063T.985 12q.516-1.219 1.617-2.695t2.133-2.273q-.563-.563-1.57-1.594T2.017 4.266zM12 6.984q-.938 0-1.828.375L8.016 5.203Q9.844 4.5 12 4.5q3.703 0 6.68 2.063t4.289 5.438q-1.125 2.766-3.422 4.734l-2.906-2.906q.375-.891.375-1.828 0-2.063-1.477-3.539T12 6.985z"},null,-1)]))):t.icon==="files"?(se(),Oe("svg",Lwe,n[5]||(n[5]=[Pe("path",{d:"M21 28H7a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10l5 5v14a1 1 0 0 1-1 1Z"},null,-1),Pe("path",{d:"M10 8V5a1 1 0 0 1 1-1h10l5 5v14a1 1 0 0 1-1 1h-3m-11-5h6m-6 4h6","stroke-linecap":"round"},null,-1)]))):t.icon==="lock"?(se(),Oe("svg",xwe,n[6]||(n[6]=[Pe("path",{d:"M16 20a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zm0 0v3"},null,-1),Pe("path",{d:"M26 11H6a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V12a1 1 0 0 0-1-1ZM11.5 11V6.5a4.5 4.5 0 1 1 9 0V11"},null,-1)]))):t.icon==="search"?(se(),Oe("svg",Fwe,n[7]||(n[7]=[Pe("circle",{cx:"9.451",cy:"9.451",r:"7.451"},null,-1),Pe("path",{d:"M13.921 15.412 19.51 21","stroke-linecap":"round"},null,-1)]))):t.icon==="success"?(se(),Oe("svg",qwe,n[8]||(n[8]=[Pe("circle",{cx:"25",cy:"25",r:"25",fill:"#25ae88"},null,-1),Pe("path",{fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":"10",d:"M38 15L22 33l-10-8"},null,-1)]))):t.icon==="users"?(se(),Oe("svg",$we,n[9]||(n[9]=[Pe("path",{d:"M16 22.5a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm8.5-8a7.475 7.475 0 0 1 6 3m-29 0a7.474 7.474 0 0 1 6-3"},null,-1),Pe("path",{d:"M8.8 27a8.012 8.012 0 0 1 14.4 0M7.5 14.5a4 4 0 1 1 3.925-4.75m9.15 0A4 4 0 1 1 24.5 14.5"},null,-1)]))):t.icon==="x-circle"?(se(),Oe("svg",Uwe,n[10]||(n[10]=[Pe("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z","stroke-miterlimit":"10"},null,-1),Pe("path",{d:"M15 9l-6 6m6 0L9 9","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):Ye("",!0)}}),zwe=["src"],Vwe=_t({__name:"AppLoader",props:{avatar:{default:void 0},grow:{type:Boolean,default:!0},icon:{default:void 0},message:{default:void 0},size:{default:"small"},title:{default:void 0},type:{default:"loading"}},emits:["imagesLoaded","imagesLoading"],setup(e,{emit:t}){const r=e,n=t;return lr(()=>{r.avatar&&n("imagesLoading")}),(a,i)=>(se(),Oe("div",{class:Ee([a.$style["loader-body"],[a.$style[`loader-${a.size}`]],[a.$style[`loader-${a.type}`]],{[a.$style["loader-no-grow"]]:a.grow===!1}])},[Pe("div",{class:Ee(a.$style["loader-container"])},[Pe("div",{class:Ee(a.$style["loader-inner"])},[Pe("div",{class:Ee(a.$style["loader-mask"])},[a.avatar?(se(),Oe("img",{key:0,alt:"",src:a.avatar,width:"1",height:"1",onLoad:i[0]||(i[0]=()=>n("imagesLoaded"))},null,40,zwe)):Ye("",!0),a.icon?(se(),et(Xn,{key:1,icon:a.icon},null,8,["icon"])):Ye("",!0)],2)],2),Pe("div",{class:Ee(a.$style.loader)},i[1]||(i[1]=[Pe("span",null,null,-1)]),2)],2),a.title?(se(),Oe("h2",{key:0,class:Ee(a.$style["loader-title"])},at(a.title),3)):Ye("",!0),a.message?(se(),Oe("p",{key:1,class:Ee(a.$style["loader-message"])},at(a.message),3)):Ye("",!0)],2))}}),Hwe={loader:"pb-w-sync_loader","loader-container-animation":"pb-w-sync_loader-container-animation","loader-clip-animation":"pb-w-sync_loader-clip-animation","loader-bar-animation":"pb-w-sync_loader-bar-animation","loader-body":"pb-w-sync_loader-body","loader-error":"pb-w-sync_loader-error","loader-title":"pb-w-sync_loader-title","loader-success":"pb-w-sync_loader-success","loader-large":"pb-w-sync_loader-large","loader-container":"pb-w-sync_loader-container","loader-inner":"pb-w-sync_loader-inner","loader-loading":"pb-w-sync_loader-loading","loader-no-grow":"pb-w-sync_loader-no-grow","loader-small":"pb-w-sync_loader-small","loader-mask":"pb-w-sync_loader-mask","loader-message":"pb-w-sync_loader-message"},Sn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},ws=Sn(Vwe,[["__cssModules",{$style:Hwe}]]),jwe=["disabled"],Kwe=Sn(_t({__name:"AccountsSelection",props:{avatar:{default:void 0},buttonDisabledStyle:{type:Boolean,default:!1},client:{},credential:{},disableFormAutocomplete:{type:Boolean,default:!1},getSelectedAccounts:{type:Function,default:void 0},sync:{}},emits:["done"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s=Ue([]),l=Ue(null),f=Ue(!1),d=jr({accounts:[]}),h=Ue(!0),v=Ue(!0),b=jr({accounts:[{type:"array",required:!0,message:i("accounts_selection.form_error"),trigger:"change"}]});let g;function y(){r.getSelectedAccounts?r.getSelectedAccounts(r.credential).then(D=>{g=D,s.value.length>0&&M()}).catch(()=>{g=[],s.value.length>0&&M()}):g=[],w()}function _(){let D=s.value.reduce((N,O)=>(N={...N,[O.id_account]:!1},N),{});return d.accounts.forEach(N=>{D[N]=!0}),D}function T(D){return`**${D.slice(-4)}`}function w(){const D=setInterval(()=>{r.sync.getAccounts({id_credential:r.credential}).then(N=>{N.length>0&&s.value.length===0&&(clearInterval(D),s.value=N,g&&M())}).catch(()=>{clearInterval(D),v.value=!1,f.value=!0,a("accounts-error")})},2e3)}function M(){g.length>0&&(d.accounts=g.filter(D=>s.value.some(N=>N.id_account===D))),d.accounts.length===0&&s.value.length>0&&(d.accounts=s.value.map(D=>D.id_account)),v.value=!1}const k=async(D,N)=>{D.preventDefault(),N&&await N.validate(O=>{O&&(a("accounts-selected",_()),n("done"))})};function B(D,N){h.value=!N}return y(),(D,N)=>(se(),Oe("div",{class:Ee([D.$style["accounts-selection"],{[D.$style["accounts-api-error"]]:f.value}])},[v.value||f.value?(se(),et(ws,{key:0,avatar:r.avatar,grow:!f.value,message:f.value?U(i)("accounts_selection.error"):U(i)("accounts_selection.fetching"),size:"large",title:U(i)("accounts_selection.fetching"),type:f.value?"error":"loading",onImagesLoaded:N[0]||(N[0]=()=>U(a)("images-loaded")),onImagesLoading:N[1]||(N[1]=()=>U(a)("images-loading"))},null,8,["avatar","grow","message","title","type"])):(se(),et(U(xS),{key:1,ref_key:"accountsFormRef",ref:l,class:Ee(D.$style["accounts-form"]),autocomplete:D.disableFormAutocomplete?"off":"on",disabled:v.value,"hide-required-asterisk":!0,"label-position":"top",model:d,name:"accounts-selection",rules:b,onSubmit:N[3]||(N[3]=O=>k(O,l.value)),onValidate:B},{default:nt(()=>[rt(U(FS),{label:r.client.name?U(i)("accounts_selection.form_label_client",{client:r.client.name}):U(i)("accounts_selection.form_label"),prop:"accounts"},{default:nt(()=>[rt(U(Pge),{modelValue:d.accounts,"onUpdate:modelValue":N[2]||(N[2]=O=>d.accounts=O),class:Ee(D.$style["accounts-checkboxes"])},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(s.value,O=>(se(),et(U(Nge),{key:O.id_account,class:Ee(D.$style["accounts-checkbox"]),name:"accounts",value:O.id_account},{default:nt(()=>[Pe("div",{class:Ee(D.$style["accounts-checkbox-content"])},[Pe("div",null,at(O.account_type),1),Pe("div",{class:Ee(D.$style["accounts-checkbox-row"])},[Pe("div",null,at(T(O.number)),1),Pe("div",null,[rt(U(iwe),{class:Ee(D.$style["accounts-balance"]),value:O.balance,precision:2},null,8,["class","value"]),dr(" "+at(O.currency),1)])],2)],2)]),_:2},1032,["class","value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["label"]),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"accounts-button",disabled:D.buttonDisabledStyle&&h.value,type:"submit"},at(U(i)("accounts_selection.done")),9,jwe)]),_:1},8,["class","autocomplete","disabled","model","rules"])),f.value?(se(),Oe("div",{key:2,class:Ee(D.$style["accounts-error-button-container"])},[Pe("button",{class:"pb-w-sync_primary-button","data-testid":"accounts-button",type:"button",onClick:N[4]||(N[4]=()=>n("done"))},at(U(i)("accounts_selection.done")),1)],2)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"accounts-balance":"pb-w-sync_accounts-balance","accounts-checkbox":"pb-w-sync_accounts-checkbox","accounts-checkbox-content":"pb-w-sync_accounts-checkbox-content","accounts-checkbox-row":"pb-w-sync_accounts-checkbox-row","accounts-checkboxes":"pb-w-sync_accounts-checkboxes","accounts-error-button-container":"pb-w-sync_accounts-error-button-container","accounts-form":"pb-w-sync_accounts-form","accounts-selection":"pb-w-sync_accounts-selection","accounts-api-error":"pb-w-sync_accounts-api-error"}}]]),Wwe=Sn(_t({__name:"FinalResponse",props:{avatar:{},displayAccountsSelection:{type:Boolean},displayAddAnotherButton:{type:Boolean},longMessage:{default:""},message:{default:""},showLogo:{type:Boolean},type:{default:"error"}},emits:["add-other","select-accounts"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn();return(s,l)=>(se(),Oe("div",{class:Ee(s.$style["final-response-container"])},[rt(ws,{avatar:s.showLogo?s.avatar:void 0,grow:!1,icon:s.showLogo?void 0:s.type,message:s.longMessage,size:"large",title:s.message,type:s.type,onImagesLoaded:l[0]||(l[0]=()=>U(a)("images-loaded")),onImagesLoading:l[1]||(l[1]=()=>U(a)("images-loading"))},null,8,["avatar","icon","message","title","type"]),s.displayAddAnotherButton&&(!r.displayAccountsSelection||r.type==="error")?(se(),Oe("button",{key:0,class:"pb-w-sync_primary-button",onClick:l[2]||(l[2]=f=>n("add-other"))},at(U(i)("common.add_other")),1)):Ye("",!0),r.displayAccountsSelection&&r.type==="success"?(se(),Oe("button",{key:1,class:"pb-w-sync_primary-button",onClick:l[3]||(l[3]=f=>n("select-accounts"))},at(U(i)("common.continue")),1)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"final-response-container":"pb-w-sync_final-response-container"}}]]),Gwe=["src"],Ywe=["src"],Zwe=["onClick"],Jwe=Sn(_t({__name:"InstitutionFilters",props:{countryId:{},filteredCountries:{},filteredOrganizationTypes:{},showCountries:{type:Boolean},organizationTypeId:{},selectClass:{}},emits:["update:countryId","update:organizationTypeId"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=be(()=>l(r.filteredCountries.find(d=>d.id_country===r.countryId)));function s(d){en("open_country",{id_country:d}),n("update:countryId",d)}function l(d){return`https://hatscripts.github.io/circle-flags/flags/${d.code.toLocaleLowerCase()}.svg`}function f(d){en("open_site_organization_type",{id_site_organization_type:d}),n("update:organizationTypeId",d)}return(d,h)=>(se(),Oe(Mt,null,[Pe("p",{class:Ee(d.$style["institution-filters-intro"])},at(U(a)("common.intro")),3),d.showCountries?(se(),et(U(nv),{key:0,class:Ee(d.$style["widget-country"]),"model-value":r.countryId,"popper-class":r.selectClass,onChange:s},{prefix:nt(()=>[Pe("img",{src:i.value,width:"44",height:"44",alt:""},null,8,Gwe)]),default:nt(()=>[(se(!0),Oe(Mt,null,ur(d.filteredCountries,v=>(se(),et(U(iv),{key:v.id_country,class:Ee(d.$style["widget-country-option"]),value:v.id_country,label:v.name},{default:nt(()=>[Pe("img",{src:l(v),width:"44",height:"44",alt:""},null,8,Ywe),Pe("span",null,at(v.name),1)]),_:2},1032,["class","value","label"]))),128))]),_:1},8,["class","model-value","popper-class"])):Ye("",!0),Pe("div",{class:Ee(d.$style["organization-types-list"])},[(se(!0),Oe(Mt,null,ur(d.filteredOrganizationTypes,v=>(se(),Oe("button",{key:v.id_site_organization_type,onClick:()=>f(v.id_site_organization_type)},at(U(a)(`common.${v.label}`)),9,Zwe))),128))],2)],64))}}),[["__cssModules",{$style:{"institution-filters-intro":"pb-w-sync_institution-filters-intro","organization-types-list":"pb-w-sync_organization-types-list","widget-country":"pb-w-sync_widget-country","widget-country-option":"pb-w-sync_widget-country-option"}}]]),Xwe=["onClick"],Qwe=["alt","src"],e_e={key:1},t_e=Sn(_t({__name:"OrganizationSitesList",props:{assetsPath:{default:"https://s.paybook.com"},items:{default:()=>[]},showLogo:{type:Boolean,default:!0},showPlaidSitesButton:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s=Ue("");let l=0;const f=be(()=>{const v=s.value.toLocaleLowerCase();return r.items.map(b=>({...b,show:v===""?!0:b.name.toLocaleLowerCase().includes(v)}))});lr(()=>{r.items.length>0&&r.showLogo&&(l=0,a("images-loading"))}),Et(()=>r.items,v=>{v.length>0&&r.showLogo&&(l=0,a("images-loading"))});function d(){l++,l===r.items.length&&a("images-loaded")}function h(v){n("select",v)}return(v,b)=>v.showPlaidSitesButton?(se(),Oe("div",{key:0,class:Ee(v.$style["widget-plaid-container"])},[Pe("button",{class:"pb-w-sync_primary-button",onClick:b[0]||(b[0]=()=>U(a)("__internal__.plaid-sites-clicked"))},at(U(i)("common.find_your_institution")),1)],2)):(se(),Oe(Mt,{key:1},[rt(U(Ga),{modelValue:s.value,"onUpdate:modelValue":b[1]||(b[1]=g=>s.value=g),"data-testid":"search-organization",placeholder:U(i)("common.search")},{prefix:nt(()=>[rt(Xn,{icon:"search"})]),_:1},8,["modelValue","placeholder"]),Pe("div",{class:Ee(v.$style["organization-sites"])},[(se(!0),Oe(Mt,null,ur(f.value,(g,y)=>cr((se(),Oe("button",{key:`${g.id_site_organization}-${y}`,class:Ee(v.$style["organization-button"]),type:"button",onClick:()=>h(g)},[v.showLogo?(se(),Oe("img",{key:0,alt:g.name,src:`${v.assetsPath}${g.small_cover}`,loading:"lazy",height:"66",width:"220",onLoad:d},null,40,Qwe)):(se(),Oe("span",e_e,at(g.name),1))],10,Xwe)),[[Zr,g.show]])),128))],2)],64))}}),[["__cssModules",{$style:{"widget-plaid-container":"pb-w-sync_widget-plaid-container","organization-sites":"pb-w-sync_organization-sites","organization-button":"pb-w-sync_organization-button"}}]]),r_e={key:0},n_e=["src"],i_e=["src"],a_e=["href"],o_e=Sn(_t({__name:"PrivacyPolicy",props:{client:{}},emits:["continue"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s="https://www.paybook.com/lib/syncfy/";let l=0;lr(()=>{a("images-loading")});function f(){a("privacy-accepted"),n("continue")}function d(){l++,(l===1&&!r.client.logo||l===2)&&a("images-loaded")}return(h,v)=>(se(),Oe("div",{class:Ee(h.$style["privacy-container"])},[v[1]||(v[1]=Pe("div",null,null,-1)),Pe("div",{class:Ee(h.$style["privacy-center"])},[Pe("div",{class:Ee([h.$style["privacy-images"],{[h.$style["with-client-logo"]]:r.client.logo}])},[r.client.logo?(se(),Oe("div",r_e,[Pe("img",{src:r.client.logo,alt:"",onLoad:d},null,40,n_e)])):Ye("",!0),Pe("div",null,[Pe("img",{src:`${U(s)}blog/syncfy-icon.svg`,alt:"",width:"190",height:"43",onLoad:d},null,40,i_e)])],2),Pe("h1",null,at(r.client.name?U(i)("privacy.title_client",{client:r.client.name}):U(i)("privacy.title")),1),Pe("ul",null,[Pe("li",null,[rt(Xn,{icon:"files"}),dr(" "+at(U(i)("privacy.list.first")),1)]),Pe("li",null,[rt(Xn,{icon:"lock"}),dr(" "+at(U(i)("privacy.list.second")),1)]),Pe("li",null,[rt(Xn,{icon:"users"}),dr(" "+at(U(i)("privacy.list.third")),1)])]),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"privacy-button",type:"button",onClick:f},at(U(i)("common.continue")),1),Pe("p",null,[dr(at(U(i)("privacy.message"))+"\xA0",1),Pe("a",{rel:"noopener",href:U(i)("privacy.url"),target:"_blank"},at(U(i)("privacy.link")),9,a_e),v[0]||(v[0]=dr(". ",-1))])],2),v[2]||(v[2]=Pe("div",null,null,-1))],2))}}),[["__cssModules",{$style:{"privacy-container":"pb-w-sync_privacy-container","privacy-center":"pb-w-sync_privacy-center","privacy-images":"pb-w-sync_privacy-images","with-client-logo":"pb-w-sync_with-client-logo"}}]]),s_e=["aria-label","checked"],l_e=["data-testid","href"],u_e=Sn(_t({__name:"ConsentNotice",props:{consent:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=be(()=>OY(r.consent));function s(l){n("update:modelValue",l.target.checked)}return(l,f)=>(se(),Oe("div",{class:Ee(l.$style["consent-container"]),"data-testid":"consent"},[Pe("label",{class:Ee(l.$style["consent-label"])},[Pe("input",{"aria-label":U(a)("consent.aria_label"),checked:r.modelValue,"data-testid":"consent-checkbox",type:"checkbox",onChange:s},null,40,s_e),Pe("span",{class:Ee(l.$style["consent-text"]),"data-testid":"consent-text"},[(se(!0),Oe(Mt,null,ur(i.value,(d,h)=>(se(),Oe(Mt,{key:h},[d.document?(se(),Oe("a",{key:0,"data-testid":`consent-document-${d.document.role}`,href:d.document.url,rel:"noopener noreferrer",target:"_blank",onClick:f[0]||(f[0]=br(()=>{},["stop"]))},at(d.text),9,l_e)):(se(),Oe(Mt,{key:1},[dr(at(d.text),1)],64))],64))),128))],2)],2)],2))}}),[["__cssModules",{$style:{"consent-container":"pb-w-sync_consent-container","consent-label":"pb-w-sync_consent-label","consent-text":"pb-w-sync_consent-text"}}]]),c_e=["for"],f_e=["aria-label"],d_e=["accept","name"],h_e=Sn(_t({__name:"FileInput",props:{credential:{},displayError:{type:Boolean},idSite:{}},emits:["input","validate"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=Ue(null),s=Ue(null),l=Ue(!1),f=Ue(!1),d=be(()=>h.value.join(",")),h=be(()=>{const k=[],B=[];let D="";return r.credential.accept&&r.credential.accept.forEach(N=>{k.push(`.${N.extension}`),k.push(N.mime_type)}),k.sort(),k.forEach(N=>{N!==D&&(B.push(N),D=N)}),B}),v=be(()=>l.value&&!s.value&&!f.value),b=be(()=>{const k=h.value.filter(B=>B[0]===".");return k.length>1?a("file.invalid_multiple",{extensions:k.join(", ")}):a("file.invalid",{extension:k[0]})});Et(()=>r.displayError,k=>{k&&(l.value=!0)});function g(k){const B=new FileReader;B.onload=D=>{s.value={file:D.target.result,info:{type:k.type,name:k.name}},n("input",D.target.result)},B.readAsDataURL(k)}function y(k){k.preventDefault(),k.dataTransfer.files[0]&&g(k.dataTransfer.files[0])}function _(k){f.value=!1;const B=k.target.files[0],D=k.srcElement.value;k.preventDefault(),k.stopPropagation(),D.length>0?h.value.length===0||h.value.includes(B.type)||h.value.includes(`.${D.split(".").pop()}`)?(n("validate",!0),g(B)):B.value||(f.value=!0,n("validate",!1)):B.value||n("validate",!1)}function T(k){k.stopPropagation(),k.preventDefault(),setTimeout(()=>{l.value=!0},2e3)}function w(k){k.stopPropagation(),s.value=null,i.value.value=null,n("input",null)}function M(k){k.preventDefault(),i.value.click(),setTimeout(()=>{l.value=!0},5e3)}return(k,B)=>(se(),Oe("div",{class:Ee(k.$style["upload-document"])},[Pe("div",{class:Ee(k.$style["upload-document-input"]),onClick:B[1]||(B[1]=D=>M(D)),onDrop:B[2]||(B[2]=D=>y(D)),onDragover:B[3]||(B[3]=D=>T(D))},[Pe("label",{class:Ee(k.$style["upload-document-label"]),for:`${r.idSite}[${r.credential.name}]`},at(r.credential.label),11,c_e),s.value?(se(),Oe("span",{key:0,class:Ee(k.$style["upload-document-name"])},[Pe("span",null,at(s.value?s.value.info.name:k.$t("file.no_chosen")),1),Pe("button",{"aria-label":U(a)("common.back"),class:Ee(k.$style["widget-back-button"]),onClick:B[0]||(B[0]=D=>w(D))},[rt(Xn,{icon:"x-circle"})],10,f_e)],2)):(se(),Oe("button",{key:1,class:Ee(k.$style["upload-document-button"])},at(k.$t("file.click")),3))],34),v.value?(se(),Oe("div",{key:0,class:Ee(k.$style["upload-document-required-error"])},at(r.credential.label)+"\xA0"+at(k.$t("file.required")),3)):Ye("",!0),f.value?(se(),Oe("div",{key:1,class:Ee(k.$style["upload-document-required-error"])},at(b.value),3)):Ye("",!0),Pe("input",{ref_key:"fileInput",ref:i,type:"file","data-testid":"file-input",accept:d.value,style:{position:"absolute",left:"-99999999px"},name:`${r.idSite}[${r.credential.name}]`,onClick:B[4]||(B[4]=D=>D.stopPropagation()),onChange:B[5]||(B[5]=D=>_(D))},null,40,d_e)],2))}}),[["__cssModules",{$style:{"upload-document":"pb-w-sync_upload-document","upload-document-button":"pb-w-sync_upload-document-button","upload-document-input":"pb-w-sync_upload-document-input","upload-document-label":"pb-w-sync_upload-document-label","upload-document-name":"pb-w-sync_upload-document-name","upload-document-required-error":"pb-w-sync_upload-document-required-error"}}]]);function yd(e){return e.version===1}function bd(e){return e.version===3}function KS(e){return e.version===4}const p_e={key:1},v_e=["alt","src"],m_e=["aria-label"],g_e={class:"el-form-item__error"},y_e=["disabled","title"],WS=Sn(_t({__name:"SiteForm",props:{assetsPath:{default:"https://s.paybook.com"},backUpConnection:{type:Boolean,default:!1},buttonDisabledStyle:{type:Boolean,default:!1},consent:{default:null},credentialService:{default:null},disableFormAutocomplete:{type:Boolean,default:!1},displayBackButton:{type:Boolean},errorMessage:{default:null},loaderMessage:{},selectClass:{default:""},showHeader:{type:Boolean,default:!0},showLogo:{type:Boolean,default:!0},showPasswordStyle:{default:"icon"},consentLoading:{type:Boolean,default:!1},requireConsent:{type:Boolean,default:!1},site:{},testMode:{type:Boolean,default:!1},updateMode:{type:Boolean,default:!1}},emits:["back","consent-rejected","error","success","valid"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),i=Ue("0"),s=Ue({...yd(r.site)?r.site.data:bd(r.site)?r.site.input[i.value].data:r.backUpConnection?r.site.backUpInput.data:r.site.input[i.value].data}),l=Ue(!1),f=Ue(!0),d=Ue(!1),h=Ue(!1),v=Ue(!1),b=Ue(!1);let g=0,y=null,_={};const T=Ue(null),w=Ue(null),M=be(()=>r.requireConsent&&!r.updateMode),k=be(()=>M.value&&(!r.consent||!l.value)),B=be(()=>k.value||(r.buttonDisabledStyle||M.value)&&f.value),D=be(()=>yd(r.site)?r.site.getFields(r.updateMode):bd(r.site)?r.site.getFields(Number.parseInt(i.value),r.updateMode):KS(r.site)?r.backUpConnection?r.site.getBackUpFields(r.updateMode):r.site.getFields(Number.parseInt(i.value),r.updateMode):null),N=be(()=>yd(r.site)?r.site.getRules(r.updateMode):bd(r.site)?r.site.getRules(Number.parseInt(i.value),r.updateMode):r.backUpConnection?r.site.getBackUpRules(r.updateMode):r.site.getRules(Number.parseInt(i.value),r.updateMode)),O=be(()=>r.site.config.version===3?r.site.config.input:KS(r.site)?r.backUpConnection?[r.site.backUpConnection]:r.site.connections:[]),{t:P}=Kn();xr(()=>{clearTimeout(y)}),lr(()=>{r.showLogo&&a("images-loading"),o(),c(),r.site.on("status-update",I=>{I==="loading"?d.value=!0:d.value=!1})});function L(I){return I.getTime()>Date.now()}function F(I){return!!s.value[I]}function S(){clearTimeout(y),r.testMode&&(g<2?(g++,y=setTimeout(()=>{g=0},500)):(r.site.toggleTestMode(),b.value=r.site.testMode,g=0))}function o(){T.value&&T.value[0]&&T.value[0].focus()}function u(I){return I.translate_error_label?P(I.translate_error_label):I.error_label?I.error_label:I.translate_label?P(I.translate_label):I.label}function p(){a("images-loaded")}function m(I){return I.enabled_by?s.value[I.enabled_by]:!0}function E(){r.site.status==="loading"&&(d.value=!0)}function A(I){r.site.updateData(Number.parseInt(i.value),s.value),i.value=I,s.value={...r.site.input[i.value].data},c(),Lt(()=>{o()})}const R=async(I,x)=>{I.preventDefault();let q;x&&(k.value||(r.site.setConsent(M.value?{accepted:l.value,text:r.consent.text}:null),await x.validate(H=>{H&&!f.value?(n("valid"),a("submitted"),r.updateMode?(q=r.credentialService.update(r.site,s.value,Number.parseInt(i.value),r.backUpConnection),d.value=!0):yd(r.site)?q=r.site.connect(s.value):bd(r.site)?q=r.site.connect(Number.parseInt(i.value),s.value):q=r.site.connect(Number.parseInt(i.value),s.value,r.backUpConnection),q.then(Y=>(n("success",Y),r.site.config.request||a("updated",r.site.response),Y)).catch(Y=>{const Q=M.value?PY(Y):null;if(Q){l.value=!1,d.value=!1,n("consent-rejected",Q);return}s.value={},c(),n("error",Y)})):v.value=!0})))};function C(I,x,q){q&&q.forEach(H=>{I?N.value[H].push({required:!0,message:"required"}):N.value[H]=N.value[H].filter(Y=>Y.message!=="required")})}function c(I,x){I&&(_[I]=x),f.value=Object.keys(N.value).reduce((q,H)=>N.value[H].length===0?q:q||!_[H],!1)}return E(),(I,x)=>d.value?(se(),Oe("div",{key:0,class:Ee(I.$style["widget-form-loader"])},[rt(ws,{avatar:I.showLogo?`${I.assetsPath}${I.site.config.site_organization.avatar}`:void 0,message:r.loaderMessage.long,title:r.loaderMessage.short,size:"large",onImagesLoaded:x[0]||(x[0]=()=>U(a)("images-loaded")),onImagesLoading:x[1]||(x[1]=()=>U(a)("images-loading"))},null,8,["avatar","message","title"])],2)):(se(),Oe("div",p_e,[Pe("div",{class:Ee(I.$style["site-form-header"])},[b.value?(se(),et(U(Xpe),{key:0,center:"",closable:!1,effect:"dark"},{default:nt(()=>[dr(at(U(P)("common.test_mode")),1)]),_:1})):Ye("",!0),I.showLogo&&I.showHeader?(se(),Oe("img",{key:1,alt:I.site.config.site_organization.name,class:Ee(I.$style["site-cover"]),src:`${I.assetsPath}${I.site.config.site_organization.cover}`,width:"1600",height:"480",onLoad:p},null,42,v_e)):Ye("",!0),I.showHeader?(se(),Oe("h2",{key:2,onClick:S},at(I.site.config.name),1)):Ye("",!0)],2),I.errorMessage?(se(),Oe("div",{key:0,class:Ee(I.$style["auth-error"])},[Pe("h3",null,at(I.errorMessage.short),1),Pe("p",null,at(I.errorMessage.long),1)],2)):Ye("",!0),O.value.length>1&&!r.backUpConnection?(se(),et(U(ewe),{key:1,"default-active":"0",mode:"horizontal",class:Ee(I.$style["site-tabs"]),ellipsis:!1,onSelect:A},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(O.value,(q,H)=>(se(),et(U(twe),{key:H,index:`${H}`},{default:nt(()=>[dr(at(q.label),1)]),_:2},1032,["index"]))),128))]),_:1},8,["class"])):Ye("",!0),rt(U(xS),{ref_key:"siteFormRef",ref:w,"data-testid":"site-form",autocomplete:I.disableFormAutocomplete?"off":"on",disabled:d.value,"hide-required-asterisk":!0,"label-position":"top",model:s.value,name:`${I.site.config.id_site}`,rules:N.value,onSubmit:x[6]||(x[6]=q=>R(q,w.value)),onValidate:c},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(D.value,(q,H)=>(se(),Oe(Mt,{key:`${H}-${q.name}`},[m(q)?(se(),Oe(Mt,{key:0},[q.type==="file"?(se(),et(h_e,{key:`${H}-${q.name}`,credential:q,"display-error":v.value,"id-site":I.site.config.id_site,onInput:Y=>s.value[q.name]=Y,onValidate:Y=>c(q.name,Y)},null,8,["credential","display-error","id-site","onInput","onValidate"])):(se(),et(U(FS),{key:1,class:Ee({[I.$style["site-switch"]]:q.type==="switch"}),label:q.translate_label?I.$t(q.translate_label):q.label||"",prop:q.name,for:`${I.site.config.id_site}[${q.name}]`},{error:nt(({error:Y})=>[Pe("div",g_e,at(U(P)(`form_errors.${Y}`,{label:u(q)})),1)]),default:nt(()=>[q.type==="text"||q.type==="password"?(se(),et(U(Ga),{key:0,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,"data-testid":"site-input",autocomplete:q.name==="password"?`${I.site.config.id_site} new-password`:I.disableFormAutocomplete?"off":`${I.site.config.id_site} ${q.name}`,name:`${I.site.config.id_site}[${q.name}]`,type:q.type==="password"&&h.value?"text":q.type},Tx({_:2},[q.type==="password"&&I.showPasswordStyle==="icon"?{name:"append",fn:nt(()=>[Pe("button",{class:Ee(I.$style["icon-eye"]),"aria-label":U(P)(`common.${h.value?"hide":"show_password"}`),type:"button",onClick:x[2]||(x[2]=()=>{h.value=!h.value})},[h.value?(se(),et(Xn,{key:0,icon:"eye-slash"})):(se(),et(Xn,{key:1,icon:"eye"}))],10,m_e)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","autocomplete","name","type"])):Ye("",!0),q.type==="select"?(se(),et(U(nv),{key:1,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,"data-testid":"site-select","popper-class":I.selectClass,autocomplete:I.disableFormAutocomplete?"off":`${I.site.config.id_site} ${q.name}`},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(q.options,(Y,Q)=>(se(),et(U(iv),{key:Q,value:Y.value,label:Y.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","popper-class","autocomplete"])):Ye("",!0),q.type==="switch"?(se(),et(U(hwe),{key:2,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,onInput:Y=>C(Y,q.name,q.enables)},null,8,["modelValue","onUpdate:modelValue","onInput"])):Ye("",!0),q.type==="date_range"?(se(),et(U(jye),{key:3,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,type:"daterange","range-separator":"-","start-placeholder":I.$t("download_options.date_range_start"),"end-placeholder":I.$t("download_options.date_range_end"),"disabled-date":L},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):Ye("",!0)]),_:2},1032,["class","label","prop","for"])),q.type==="password"&&I.showPasswordStyle==="text"&&F(q.name)?(se(),et(U(gs),{key:`${H}-${q.name}-toggle`,class:Ee(I.$style["show-hide"]),"native-type":"button",onClick:x[3]||(x[3]=()=>{h.value=!h.value})},{default:nt(()=>[dr(at(U(P)(`common.${h.value?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Ye("",!0)],64)):Ye("",!0)],64))),128)),M.value&&I.consent?(se(),et(u_e,{key:0,modelValue:l.value,"onUpdate:modelValue":x[4]||(x[4]=q=>l.value=q),consent:I.consent},null,8,["modelValue","consent"])):M.value&&I.consentLoading?(se(),Oe("div",{key:1,class:Ee(I.$style["consent-placeholder"]),"data-testid":"consent-loading"},x[7]||(x[7]=[Pe("span",null,null,-1),Pe("span",null,null,-1),Pe("span",null,null,-1)]),2)):Ye("",!0),Pe("div",{class:Ee(I.$style["site-buttons"])},[I.displayBackButton?(se(),Oe("button",{key:0,class:"pb-w-sync_secondary-button","data-testid":"site-back",type:"button",onClick:x[5]||(x[5]=()=>n("back"))},at(U(P)("common.back")),1)):Ye("",!0),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"site-button",disabled:B.value,title:k.value?U(P)("consent.required"):void 0,type:"submit"},at(U(P)("common.next")),9,y_e)],2)]),_:1},8,["autocomplete","disabled","model","name","rules"])]))}}),[["__cssModules",{$style:{"consent-placeholder":"pb-w-sync_consent-placeholder","consent-pulse":"pb-w-sync_consent-pulse","auth-error":"pb-w-sync_auth-error","icon-eye":"pb-w-sync_icon-eye","show-hide":"pb-w-sync_show-hide","site-buttons":"pb-w-sync_site-buttons","site-form-header":"pb-w-sync_site-form-header","site-cover":"pb-w-sync_site-cover","site-tabs":"pb-w-sync_site-tabs","site-switch":"pb-w-sync_site-switch","widget-form-loader":"pb-w-sync_widget-form-loader"}}]]),b_e=["alt","src"],w_e=["onClick"],__e=Sn(_t({__name:"SitesList",props:{assetsPath:{},items:{},organization:{},showLogo:{type:Boolean}},emits:["back","select"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);lr(()=>{r.showLogo&&a("images-loading")});function i(){a("images-loaded")}function s(l){n("select",l)}return(l,f)=>(se(),Oe("div",{class:Ee(l.$style["sites-container"])},[l.showLogo?(se(),Oe("img",{key:0,class:Ee(l.$style["organization-cover"]),alt:l.organization.name,src:`${l.assetsPath}${l.organization.cover}`,width:"1600",height:"480",onLoad:i},null,42,b_e)):Ye("",!0),Pe("div",{class:Ee(l.$style.sites)},[(se(!0),Oe(Mt,null,ur(l.items,(d,h)=>(se(),Oe("button",{key:`${d.id_site}-${h}`,type:"button",onClick:()=>s(d)},at(d.name),9,w_e))),128)),Pe("button",{type:"button",onClick:f[0]||(f[0]=()=>n("back"))},at(l.$t("common.back")),1)],2)],2))}}),[["__cssModules",{$style:{"organization-cover":"pb-w-sync_organization-cover","sites-container":"pb-w-sync_sites-container",sites:"pb-w-sync_sites"}}]]),E_e=Sn(_t({__name:"TheModal",props:{mobile:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);function i(){en("close"),n("update:visible",!1),a("closed")}return(s,l)=>cr((se(),Oe("div",{class:Ee(s.$style["modal-container"])},[Pe("div",{class:Ee(s.$style["modal-overlay-backdrop"]),onClick:i},null,2),Pe("div",{class:Ee(s.$style["modal-wrapper"])},[Pe("div",{class:Ee([s.$style.modal,{[s.$style["is-mobile"]]:r.mobile}])},[yt(s.$slots,"default")],2)],2)],2)),[[Zr,s.visible]])}}),[["__cssModules",{$style:{"modal-container":"pb-w-sync_modal-container","modal-wrapper":"pb-w-sync_modal-wrapper","modal-overlay-backdrop":"pb-w-sync_modal-overlay-backdrop",modal:"pb-w-sync_modal","is-mobile":"pb-w-sync_is-mobile"}}]]),S_e=["onClick"],C_e=["src"],M_e=Sn(_t({__name:"MultipleImages",props:{credential:{default:()=>({type:"options",name:"token",label:"Por favor, revisa las im\xE1genes que se te presentan y selecciona la correcta",options:[]})},modelValue:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);let i=0;const s=be(()=>{const d=Math.sqrt(r.credential.options.length);return d%1===0?[d,d]:l(Math.floor(d))});lr(()=>{a("images-loading")});function l(d){if(r.credential.options.length%d===0){const h=r.credential.options.length/d;return[d,h]}return l(d-1)}function f(){i++,i===r.credential.options.length&&a("images-loaded")}return(d,h)=>(se(),Oe("div",{class:Ee(d.$style["multiple-images-container"])},[Pe("div",{class:Ee(d.$style["multiple-images-wrapper"])},[(se(!0),Oe(Mt,null,ur(s.value[0],v=>(se(),Oe("div",{key:v,class:Ee(d.$style["credential-options-row"])},[(se(!0),Oe(Mt,null,ur(s.value[1],b=>(se(),Oe("div",{key:b,class:Ee([d.$style["credential-options-col"],{[d.$style.selected]:d.modelValue===d.credential.options[b-1+(v-1)*s.value[1]].value}]),onClick:g=>n("update:modelValue",d.credential.options[b-1+(v-1)*s.value[1]].value)},[Pe("img",{class:Ee(d.$style["credental-options-img"]),src:d.credential.options[b-1+(v-1)*s.value[1]].imgBase64File||d.credential.options[b-1+(v-1)*s.value[1]].imgURL,onLoad:f},null,42,C_e)],10,S_e))),128))],2))),128))],2)],2))}}),[["__cssModules",{$style:{"multiple-images-container":"pb-w-sync_multiple-images-container","multiple-images-wrapper":"pb-w-sync_multiple-images-wrapper","credential-options-row":"pb-w-sync_credential-options-row","credential-options-col":"pb-w-sync_credential-options-col",selected:"pb-w-sync_selected","credental-options-img":"pb-w-sync_credental-options-img"}}]]),T_e={key:1},A_e=["alt","src"],I_e={key:0},k_e=["src"],R_e={key:1},B_e=["src","onLoad"],O_e=["aria-label"],N_e=["disabled"],GS=Sn(_t({__name:"TwofaForm",props:{avatar:{},buttonDisabledStyle:{type:Boolean},cover:{},disableFormAutocomplete:{type:Boolean},enableBackNavigation:{type:Boolean},inNotification:{type:Boolean},loaderMessage:{},selectClass:{},siteName:{},showLogo:{type:Boolean},showPasswordStyle:{},twofa:{}},emits:["back","error"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),i=Tt(x3),s=Ue({}),l=Ue({...r.twofa.data}),f=Ue({}),d=Ue([]),h=Ue(!1);let v=0,b=!0,g=!1,y={};const _=be(()=>r.twofa.config.twofa.reduce((p,m)=>m.imgBase64File?p+1:p,0)),T=Ue(null),w=Ue(null);Et(()=>r.twofa,()=>{S()});function M(){S()}function k(p){return f.value[p]||{}}function B(p){return!!l[p]}function D(p){const m=d.value[p];m&&(f.value={...f.value,[p]:{width:`${m.naturalWidth}px`}},Lt(O))}function N(){T.value&&T.value[0].focus()}function O(){v++,v===_.value&&a("images-loaded")}function P(){const p={};r.twofa.config.twofa&&r.twofa.config.twofa.length&&r.twofa.config.twofa.forEach(m=>{m.type==="accounts"&&(p[m.name]=[])}),s.value=p}function L(p){return["text","password","textOptions","accounts","options"].includes(p)}function F(p){l.value={...l.value,[p]:s.value[p].join()}}function S(){s.value={},l.value={...r.twofa.data},f.value={},d.value=[],h.value=!1,v=0,b=!0,g=!1,y={},r.twofa.defineRules(i),P(),r.twofa.on("loading",()=>{h.value=!0}),r.twofa.on("twofa-device-error",p=>{n("error",p)}),r.twofa.on("token-received",()=>{l.value={...r.twofa.data}}),_.value&&a("images-loading"),u(),r.twofa.config.twofa.forEach(p=>{["connection","challenge"].includes(p.type)&&u(p.name,!0)}),Lt(()=>{N()})}function o(){w.value.validate(p=>{p&&(a("submitted"),r.twofa.authenticate({...l.value}).then(m=>m).catch(m=>{n("error",m)}))})}function u(p,m){const E=Vt(r.twofa.rules);p&&(y[p]=m),b=Object.getOwnPropertyNames(E).reduce((A,R)=>R==="__ob__"||E[R].length===0?A:A||!y[R],!1)}return M(),(p,m)=>h.value?(se(),Oe("div",{key:0,class:Ee(p.$style["twofa-form-loader"])},[rt(ws,{avatar:p.showLogo?p.avatar:void 0,message:r.loaderMessage.long,title:r.loaderMessage.short,size:"large",onImagesLoaded:m[0]||(m[0]=()=>U(a)("images-loaded")),onImagesLoading:m[1]||(m[1]=()=>U(a)("images-loading"))},null,8,["avatar","message","title"])],2)):(se(),Oe("div",T_e,[p.inNotification?Ye("",!0):(se(),Oe("div",{key:0,class:Ee(p.$style["twofa-form-header"])},[p.showLogo?(se(),Oe("img",{key:0,alt:p.siteName,class:Ee(p.$style["twofa-cover"]),src:p.cover,width:"1600",height:"480",onLoad:O},null,42,A_e)):Ye("",!0),Pe("h2",null,at(p.siteName),1)],2)),r.twofa?(se(),et(U(xS),{key:1,ref_key:"twofaForm",ref:w,"data-testid":"twofa-form","label-position":"top",disabled:h.value,model:l.value,rules:Vt(r.twofa.rules),name:`twofa-${r.twofa.config.id_site}`,autocomplete:r.disableFormAutocomplete?"off":"on",onSubmit:br(o,["prevent"]),onValidate:u},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(r.twofa.config.twofa,(E,A)=>(se(),Oe(Mt,{key:`${A}-${E.name}`},[E.type==="externalAction"?(se(),Oe("div",I_e,[Pe("label",{class:Ee(p.$style["external-action-label"])},at(E.label),3),Pe("div",{class:Ee(p.$style["external-action-img-container"])},[E.imgBase64File?(se(),Oe("img",{key:0,alt:"",src:E.imgBase64File,onLoad:O},null,40,k_e)):Ye("",!0)],2)])):E.type==="instructions"?(se(),Oe("div",R_e,[Pe("label",{class:Ee(p.$style["external-action-label"])},at(E.label),3)])):Ye("",!0),L(E.type)?(se(),et(U(FS),{key:2,label:E.label,prop:E.name,for:`twofa-${r.twofa.config.id_site}[${E.name}]`},{default:nt(()=>[E.imgBase64File?(se(),Oe("img",{key:0,ref_for:!0,ref_key:"imageWithoutSize",ref:d,src:E.imgBase64File,class:Ee(p.$style["input-image"]),style:Pr(k(A)),alt:"",onLoad:R=>D(A)},null,46,B_e)):Ye("",!0),E.type==="text"||E.type==="password"?(se(),et(U(Ga),{key:1,ref_for:!0,ref:A===0&&"firstInput",modelValue:l.value[E.name],"onUpdate:modelValue":R=>l.value[E.name]=R,"data-testid":"twofa-input",name:`twofa-${r.twofa.config.id_site}[${E.name}]`,autocomplete:E.name==="password"?`${r.twofa.config.id_site} new-password`:r.disableFormAutocomplete?"off":`${r.twofa.config.id_site} ${E.name}`,disabled:E.disabled,type:E.type==="password"&&U(g)?"text":E.type},Tx({_:2},[E.type==="password"&&r.showPasswordStyle==="icon"?{name:"append",fn:nt(()=>[Pe("button",{class:Ee(p.$style["icon-eye-twofa"]),"aria-label":U(i)(`common.${U(g)?"hide":"show_password"}`),type:"button",onClick:m[2]||(m[2]=()=>{Er(g)?g.value=!U(g):g=!U(g)})},[U(g)?(se(),et(Xn,{key:1,icon:"eye-slash"})):(se(),et(Xn,{key:0,icon:"eye"}))],10,O_e)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","name","autocomplete","disabled","type"])):Ye("",!0),E.type==="textOptions"?(se(),et(U(nv),{key:2,ref_for:!0,ref:A===0&&"firstInput",modelValue:l.value[E.name],"onUpdate:modelValue":R=>l.value[E.name]=R,"data-testid":"twofa-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${E.name}`,name:`twofa-${r.twofa.config.id_site}[${E.name}]`,"popper-class":r.selectClass},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(E.options,(R,C)=>(se(),et(U(iv),{key:C,value:R.value,label:R.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class"])):Ye("",!0),E.type==="accounts"?(se(),et(U(nv),{key:3,ref_for:!0,ref:A===0&&"firstInput",modelValue:s.value[E.name],"onUpdate:modelValue":R=>s.value[E.name]=R,"data-testid":"twofa-multi-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${E.name}`,filterable:"",multiple:"",name:`twofa-${r.twofa.config.id_site}[${E.name}]`,"popper-class":r.selectClass,onChange:()=>F(E.name)},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(E.options,(R,C)=>(se(),et(U(iv),{key:C,value:R.value,label:R.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class","onChange"])):Ye("",!0),E.type==="options"?(se(),et(M_e,{key:4,modelValue:l.value[E.name],"onUpdate:modelValue":[R=>l.value[E.name]=R,()=>{u(E.name,!0)}],credential:E},null,8,["modelValue","onUpdate:modelValue","credential"])):Ye("",!0)]),_:2},1032,["label","prop","for"])):Ye("",!0),E.type==="password"&&r.showPasswordStyle==="text"&&B(E.name)?(se(),et(U(gs),{key:`${A}-${E.name}-toggle`,class:Ee(p.$style["show-hide"]),"native-type":"button",onClick:m[3]||(m[3]=()=>{Er(g)?g.value=!U(g):g=!U(g)})},{default:nt(()=>[dr(at(U(i)(`common.${U(g)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Ye("",!0)],64))),128)),Pe("div",{class:Ee(p.$style["twofa-buttons"])},[r.enableBackNavigation?(se(),Oe("button",{key:0,class:"pb-w-sync_secondary-button","data-testid":"twofa-back",type:"button",onClick:m[4]||(m[4]=()=>{n("back")})},at(U(i)("common.back")),1)):Ye("",!0),r.twofa.displaySubmitButton?(se(),Oe("button",{key:1,class:"pb-w-sync_primary-button",disabled:r.buttonDisabledStyle&&U(b),"data-testid":"twofa-button",type:"submit"},at(U(i)("common.next")),9,N_e)):Ye("",!0)],2)]),_:1},8,["disabled","model","rules","name","autocomplete"])):Ye("",!0)]))}}),[["__cssModules",{$style:{"external-action-img-container":"pb-w-sync_external-action-img-container","external-action-label":"pb-w-sync_external-action-label","icon-eye-twofa":"pb-w-sync_icon-eye-twofa","input-image":"pb-w-sync_input-image","show-hide":"pb-w-sync_show-hide","twofa-buttons":"pb-w-sync_twofa-buttons","twofa-form-header":"pb-w-sync_twofa-form-header","twofa-cover":"pb-w-sync_twofa-cover","twofa-form-loader":"pb-w-sync_twofa-form-loader"}}]]),Qr=Sn(_t({__name:"TwofaNotification",props:{assetsPath:{default:"https://s.paybook.com"},buttonDisabledStyle:{type:Boolean,default:!1},disableFormAutocomplete:{type:Boolean,default:!1},displayLongDescription:{type:Boolean,default:!1},duration:{},enableBackNavigation:{type:Boolean,default:!1},hideForm:{type:Boolean,default:!1},initLongMessage:{default:null},initMessage:{default:null},initTitle:{default:""},item:{default:null},messagesUpdater:{default:null},rootEmit:{type:Function,default:null},selectClass:{default:""},showLogo:{type:Boolean,default:!1},showPasswordStyle:{default:"icon"},t:{},type:{}},emits:["back","error","imagesLoaded","imagesLoading"],setup(e,{emit:t}){var r,n,a,i;const s=e,l=t;Br(li,s.rootEmit),Br(x3,s.t);let f=Ue(s.initLongMessage||((r=s.messagesUpdater)==null?void 0:r.getMessages().long)||""),d=Ue(s.initMessage||((n=s.messagesUpdater)==null?void 0:n.getMessages().short)||""),h=Ue(s.displayLongDescription||!1),v=Ue((a=s.item)==null?void 0:a.status),b=Ue((i=s.item)!=null&&i.config?s.item.config.name:s.initTitle);const g=be(()=>s.item&&s.item.config?`${s.assetsPath}${s.item.config.avatar}`:""),y=be(()=>s.item&&s.item.config?`${s.assetsPath}${s.item.config.cover}`:""),_=be(()=>s.item?v.value==="twofa"&&!s.hideForm:!1),T=be(()=>s.item?s.type==="info"&&v.value!=="twofa":s.type==="info");function w(){s.messagesUpdater&&s.messagesUpdater.subscribe(()=>{const k=s.messagesUpdater.getMessages();f.value=k.long,d.value=k.short}),s.item&&(s.item.on("twofa",()=>{v.value="twofa"}),s.item.on("twofa-loading",()=>{v.value="twofa-loading"}))}function M(){h.value=!h.value}return w(),(k,B)=>(se(),Oe("div",{class:Ee(k.$style["twofa-notification"])},[Pe("div",{class:Ee(k.$style["site-identifier"])},[T.value||k.showLogo?(se(),et(ws,{key:0,class:Ee(k.$style["notification-loader"]),avatar:k.showLogo?g.value:void 0,type:s.type==="info"?"loading":s.type,onImagesLoaded:B[0]||(B[0]=()=>l("imagesLoaded")),onImagesLoading:B[1]||(B[1]=()=>l("imagesLoading"))},null,8,["class","avatar","type"])):Ye("",!0),Pe("div",{class:Ee([k.$style["site-identifier-description"],{[k.$style["with-loader"]]:T.value||k.showLogo}])},[Pe("span",{class:Ee([k.$style["site-name"],k.$style[s.type]])},at(U(b)),3),Pe("p",{class:Ee(k.$style["site-identifier-message"])},at(U(d)),3),U(h)?(se(),Oe("p",{key:0,class:Ee(k.$style["site-identifier-long-message"])},at(U(f)),3)):Ye("",!0),s.type!=="info"?(se(),Oe("div",{key:1,class:Ee(k.$style["widget-notification-show-more-container"])},[U(f)?(se(),et(U(xbe),{key:0,type:"primary",onClick:br(M,["stop"])},{default:nt(()=>[dr(at(s.t("common.show",{msg:s.t(`common.${U(h)?"less":"more"}`)})),1)]),_:1})):Ye("",!0)],2)):Ye("",!0)],2)],2),_.value?(se(),Oe("div",{key:0,class:Ee(k.$style["notification-form"])},[rt(GS,{avatar:g.value,"button-disabled-style":k.buttonDisabledStyle,cover:y.value,"disable-form-autocomplete":k.disableFormAutocomplete,"enable-back-navigation":k.enableBackNavigation,"in-notification":!0,"loader-message":{long:U(f),short:U(d)},"select-class":k.selectClass,"show-logo":k.showLogo,"show-password-style":k.showPasswordStyle,"site-name":U(b),twofa:s.item.twofa,onBack:B[2]||(B[2]=()=>l("back")),onError:B[3]||(B[3]=D=>l("error",D))},null,8,["avatar","button-disabled-style","cover","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-logo","show-password-style","site-name","twofa"])],2)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"notification-form":"pb-w-sync_notification-form","notification-loader":"pb-w-sync_notification-loader","site-identifier":"pb-w-sync_site-identifier","site-identifier-description":"pb-w-sync_site-identifier-description","with-loader":"pb-w-sync_with-loader","site-name":"pb-w-sync_site-name",error:"pb-w-sync_error",success:"pb-w-sync_success","site-identifier-long-message":"pb-w-sync_site-identifier-long-message","site-identifier-message":"pb-w-sync_site-identifier-message","twofa-notification":"pb-w-sync_twofa-notification","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container"}}]]),P_e=Sn(_t({__name:"UnauthorizedNotification",props:{initMessage:{default:""},initTitle:{default:""},refreshTokenFunction:{},t:{}},emits:["closed","closeNotification","refreshToken","refreshTokenError"],setup(e,{emit:t}){const r=e,n=t;let a=Ue(!1);xr(()=>{n("closed")});function i(){a.value=!0,r.refreshTokenFunction().then(({token:s,strict:l})=>{if(typeof s!="string")throw new Error("Refresh token is not valid. Promise should return a valid token.");return new Promise(f=>{n("refreshToken",{token:s,strict:l,resolve:f})})}).catch(()=>{n("refreshTokenError")}).finally(()=>{a.value=!1})}return(s,l)=>(se(),Oe("div",{class:Ee(s.$style["unauthorized-notification"])},[Pe("span",null,at(r.initTitle),1),Pe("p",null,at(r.initMessage),1),Pe("div",{class:Ee(s.$style["unauthorized-button-container"])},[cr((se(),et(U(gs),{disabled:U(a),type:"primary",onClick:br(i,["stop"])},{default:nt(()=>[dr(at(r.t("common.refresh")),1)]),_:1},8,["disabled"])),[[U(jS),U(a)]]),rt(U(gs),{disabled:U(a),onClick:l[0]||(l[0]=br(()=>{n("closeNotification")},["stop"]))},{default:nt(()=>[dr(at(r.t("common.cancel")),1)]),_:1},8,["disabled"])],2)],2))}}),[["__cssModules",{$style:{"unauthorized-notification":"pb-w-sync_unauthorized-notification","unauthorized-button-container":"pb-w-sync_unauthorized-button-container"}}]]);var D_e="2.0.4",YS=500,gH="user-agent",qu="",yH="?",Tv="function",_s="undefined",$u="object",ZS="string",Qn="browser",Bo="cpu",Za="device",ba="engine",Hi="os",Uu="result",pt="name",ot="type",ht="vendor",mt="version",ei="architecture",wd="major",ct="model",_d="console",Zt="mobile",Rr="tablet",sn="smarttv",Ja="wearable",Av="xr",Ed="embedded",Sd="inapp",JS="brands",Il="formFactors",XS="fullVersionList",zu="platform",QS="platformVersion",Iv="bitness",Es="sec-ch-ua",L_e=Es+"-full-version-list",x_e=Es+"-arch",F_e=Es+"-"+Iv,q_e=Es+"-form-factors",$_e=Es+"-"+Zt,U_e=Es+"-"+ct,bH=Es+"-"+zu,z_e=bH+"-version",wH=[JS,XS,Zt,ct,zu,QS,ei,Il,Iv],kv="Amazon",Vu="Apple",_H="ASUS",EH="BlackBerry",kl="Google",SH="Huawei",e5="Lenovo",CH="Honor",Rv="LG",t5="Microsoft",r5="Motorola",n5="Nvidia",MH="OnePlus",i5="OPPO",Cd="Samsung",TH="Sharp",Md="Sony",a5="Xiaomi",o5="Zebra",AH="Chrome",IH="Chromium",Ss="Chromecast",Bv="Edge",Td="Firefox",Ad="Opera",s5="Facebook",kH="Sogou",Hu="Mobile ",Id=" Browser",l5="Windows",V_e=typeof window!==_s,ti=V_e&&window.navigator?window.navigator:void 0,Cs=ti&&ti.userAgentData?ti.userAgentData:void 0,H_e=function(e,t){var r={},n=t;if(!Nv(t)){n={};for(var a in t)for(var i in t[a])n[i]=t[a][i].concat(n[i]?n[i]:[])}for(var s in e)r[s]=n[s]&&n[s].length%2===0?n[s].concat(e[s]):e[s];return r},Ov=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},u5=function(e,t){if(typeof e===$u&&e.length>0){for(var r in e)if(Oo(t)==Oo(e[r]))return!0;return!1}return ju(e)?Oo(t)==Oo(e):!1},Nv=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||(t?Nv(e[r]):!1)},ju=function(e){return typeof e===ZS},c5=function(e){if(e){for(var t=[],r=Ku(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var a=Pv(r[n]).split(";v=");t[n]={brand:a[0],version:a[1]}}else t[n]=Pv(r[n]);return t}},Oo=function(e){return ju(e)?e.toLowerCase():e},f5=function(e){return ju(e)?Ku(/[^\d\.]/g,e).split(".")[0]:void 0},No=function(e){for(var t in e){var r=e[t];typeof r==$u&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Ku=function(e,t){return ju(t)?t.replace(e,qu):t},kd=function(e){return Ku(/\\?\"/g,e)},Pv=function(e,t){if(ju(e))return e=Ku(/^\s\s*/,e),typeof t===_s?e:e.substring(0,YS)},d5=function(e,t){if(!(!e||!t))for(var r=0,n,a,i,s,l,f;r<t.length&&!l;){var d=t[r],h=t[r+1];for(n=a=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e),l)for(i=0;i<h.length;i++)f=l[++a],s=h[i],typeof s===$u&&s.length>0?s.length===2?typeof s[1]==Tv?this[s[0]]=s[1].call(this,f):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Tv&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=f?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=f?s[1].call(this,f,s[2]):void 0:s.length==3?this[s[0]]=f?f.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=f?s[3].call(this,f.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=f?s[3].apply(this,[f.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=f||void 0;r+=2}},Xa=function(e,t){for(var r in t)if(typeof t[r]===$u&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(u5(t[r][n],e))return r===yH?void 0:r}else if(u5(t[r],e))return r===yH?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},RH={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},BH={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},j_e={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},OH={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[mt,[pt,Hu+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[mt,[pt,Bv+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[mt,[pt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[pt,mt],[/opios[\/ ]+([\w\.]+)/i],[mt,[pt,Ad+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[mt,[pt,Ad+" GX"]],[/\bopr\/([\w\.]+)/i],[mt,[pt,Ad]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[mt,[pt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[mt,[pt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[pt,mt],[/quark(?:pc)?\/([-\w\.]+)/i],[mt,[pt,"Quark"]],[/\bddg\/([\w\.]+)/i],[mt,[pt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[mt,[pt,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[mt,[pt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[mt,[pt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[mt,[pt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[mt,[pt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[mt,[pt,"Smart "+e5+Id]],[/(avast|avg)\/([\w\.]+)/i],[[pt,/(.+)/,"$1 Secure"+Id],mt],[/\bfocus\/([\w\.]+)/i],[mt,[pt,Td+" Focus"]],[/\bopt\/([\w\.]+)/i],[mt,[pt,Ad+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[mt,[pt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[mt,[pt,"Dolphin"]],[/coast\/([\w\.]+)/i],[mt,[pt,Ad+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[mt,[pt,"MIUI"+Id]],[/fxios\/([\w\.-]+)/i],[mt,[pt,Hu+Td]],[/\bqihoobrowser\/?([\w\.]*)/i],[mt,[pt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[pt,/(.+)/,"$1Browser"],mt],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[pt,/(.+)/,"$1"+Id],mt],[/samsungbrowser\/([\w\.]+)/i],[mt,[pt,Cd+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[mt,[pt,kH+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[pt,kH+" Mobile"],mt],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[pt,mt],[/(lbbrowser|rekonq)/i],[pt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[mt,pt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[pt,s5],mt,[ot,Sd]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[pt,mt,[ot,Sd]],[/\bgsa\/([\w\.]+) .*safari\//i],[mt,[pt,"GSA"],[ot,Sd]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[mt,[pt,"TikTok"],[ot,Sd]],[/\[(linkedin)app\]/i],[pt,[ot,Sd]],[/(chromium)[\/ ]([-\w\.]+)/i],[pt,mt],[/headlesschrome(?:\/([\w\.]+)| )/i],[mt,[pt,AH+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[mt,[pt,Bv+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[pt,AH+" WebView"],mt],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[mt,[pt,"Android"+Id]],[/chrome\/([\w\.]+) mobile/i],[mt,[pt,Hu+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[pt,mt],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[mt,[pt,Hu+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[pt,Hu+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[mt,pt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[pt,[mt,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[pt,mt],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[pt,Hu+Td],mt],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[pt,"Netscape"],mt],[/(wolvic|librewolf)\/([\w\.]+)/i],[pt,mt],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[mt,[pt,Td+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[pt,[mt,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[pt,[mt,/[^\d\.]+./,qu]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ei,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ei,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ei,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ei,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ei,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[ei,/ower/,qu,Oo]],[/ sun4\w[;\)]/i],[[ei,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[ei,Oo]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[ct,[ht,Cd],[ot,Rr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[ct,[ht,Cd],[ot,Zt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[ct,[ht,Vu],[ot,Zt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[ct,[ht,Vu],[ot,Rr]],[/(macintosh);/i],[ct,[ht,Vu]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ct,[ht,TH],[ot,Zt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[ct,[ht,CH],[ot,Rr]],[/honor([-\w ]+)[;\)]/i],[ct,[ht,CH],[ot,Zt]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[ct,[ht,SH],[ot,Rr]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[ct,[ht,SH],[ot,Zt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[ct,/_/g," "],[ht,a5],[ot,Rr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[ct,/_/g," "],[ht,a5],[ot,Zt]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ct,[ht,MH],[ot,Zt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ct,[ht,i5],[ot,Zt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[ct,[ht,Xa,{OnePlus:["203","304","403","404","413","415"],"*":i5}],[ot,Rr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[ct,[ht,"BLU"],[ot,Zt]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ct,[ht,"Vivo"],[ot,Zt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ct,[ht,"Realme"],[ot,Zt]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[ct,[ht,e5],[ot,Rr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[ct,[ht,e5],[ot,Zt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[ct,[ht,r5],[ot,Zt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ct,[ht,r5],[ot,Rr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ct,[ht,Rv],[ot,Rr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[ct,[ht,Rv],[ot,Zt]],[/(nokia) (t[12][01])/i],[ht,ct,[ot,Rr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[ct,/_/g," "],[ot,Zt],[ht,"Nokia"]],[/(pixel (c|tablet))\b/i],[ct,[ht,kl],[ot,Rr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[ct,[ht,kl],[ot,Zt]],[/(google) (pixelbook( go)?)/i],[ht,ct],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[ct,[ht,Md],[ot,Zt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ct,"Xperia Tablet"],[ht,Md],[ot,Rr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ct,[ht,kv],[ot,Rr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ct,/(.+)/g,"Fire Phone $1"],[ht,kv],[ot,Zt]],[/(playbook);[-\w\),; ]+(rim)/i],[ct,ht,[ot,Rr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[ct,[ht,EH],[ot,Zt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ct,[ht,_H],[ot,Rr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ct,[ht,_H],[ot,Zt]],[/(nexus 9)/i],[ct,[ht,"HTC"],[ot,Rr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[ht,[ct,/_/g," "],[ot,Zt]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[ct,[ht,"TCL"],[ot,Rr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[ct,[ht,"TCL"],[ot,Zt]],[/(itel) ((\w+))/i],[[ht,Oo],ct,[ot,Xa,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ct,[ht,"Acer"],[ot,Rr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ct,[ht,"Meizu"],[ot,Zt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ct,[ht,"Ulefone"],[ot,Zt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ct,[ht,"Energizer"],[ot,Zt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ct,[ht,"Cat"],[ot,Zt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ct,[ht,"Smartfren"],[ot,Zt]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[ct,[ht,"Nothing"],[ot,Zt]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[ct,[ht,"Archos"],[ot,Rr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[ct,[ht,"Archos"],[ot,Zt]],[/; (n159v)/i],[ct,[ht,"HMD"],[ot,Zt]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[ht,ct,[ot,Rr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[ht,ct,[ot,Zt]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[ht,ct,[ot,Rr]],[/(surface duo)/i],[ct,[ht,t5],[ot,Rr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ct,[ht,"Fairphone"],[ot,Zt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[ct,[ht,n5],[ot,Rr]],[/(sprint) (\w+)/i],[ht,ct,[ot,Zt]],[/(kin\.[onetw]{3})/i],[[ct,/\./g," "],[ht,t5],[ot,Zt]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ct,[ht,o5],[ot,Rr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ct,[ht,o5],[ot,Zt]],[/smart-tv.+(samsung)/i],[ht,[ot,sn]],[/hbbtv.+maple;(\d+)/i],[[ct,/^/,"SmartTV"],[ht,Cd],[ot,sn]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[ht,ct,[ot,sn]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[ht,Rv],[ot,sn]],[/(apple) ?tv/i],[ht,[ct,Vu+" TV"],[ot,sn]],[/crkey.*devicetype\/chromecast/i],[[ct,Ss+" Third Generation"],[ht,kl],[ot,sn]],[/crkey.*devicetype\/([^/]*)/i],[[ct,/^/,"Chromecast "],[ht,kl],[ot,sn]],[/fuchsia.*crkey/i],[[ct,Ss+" Nest Hub"],[ht,kl],[ot,sn]],[/crkey/i],[[ct,Ss],[ht,kl],[ot,sn]],[/(portaltv)/i],[ct,[ht,s5],[ot,sn]],[/droid.+aft(\w+)( bui|\))/i],[ct,[ht,kv],[ot,sn]],[/(shield \w+ tv)/i],[ct,[ht,n5],[ot,sn]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ct,[ht,TH],[ot,sn]],[/(bravia[\w ]+)( bui|\))/i],[ct,[ht,Md],[ot,sn]],[/(mi(tv|box)-?\w+) bui/i],[ct,[ht,a5],[ot,sn]],[/Hbbtv.*(technisat) (.*);/i],[ht,ct,[ot,sn]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[ht,/.+\/(\w+)/,"$1",Xa,{LG:"lge"}],[ct,Pv],[ot,sn]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[ct,[ot,sn]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[ot,sn]],[/(playstation \w+)/i],[ct,[ht,Md],[ot,_d]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ct,[ht,t5],[ot,_d]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[ht,ct,[ot,_d]],[/droid.+; (shield)( bui|\))/i],[ct,[ht,n5],[ot,_d]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[ct,[ht,Cd],[ot,Ja]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[ht,ct,[ot,Ja]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[ct,[ht,i5],[ot,Ja]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ct,[ht,Vu],[ot,Ja]],[/(opwwe\d{3})/i],[ct,[ht,MH],[ot,Ja]],[/(moto 360)/i],[ct,[ht,r5],[ot,Ja]],[/(smartwatch 3)/i],[ct,[ht,Md],[ot,Ja]],[/(g watch r)/i],[ct,[ht,Rv],[ot,Ja]],[/droid.+; (wt63?0{2,3})\)/i],[ct,[ht,o5],[ot,Ja]],[/droid.+; (glass) \d/i],[ct,[ht,kl],[ot,Av]],[/(pico) (4|neo3(?: link|pro)?)/i],[ht,ct,[ot,Av]],[/(quest( \d| pro)?s?).+vr/i],[ct,[ht,s5],[ot,Av]],[/mobile vr; rv.+firefox/i],[[ot,Av]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[ht,[ot,Ed]],[/(aeobc)\b/i],[ct,[ht,kv],[ot,Ed]],[/(homepod).+mac os/i],[ct,[ht,Vu],[ot,Ed]],[/windows iot/i],[[ot,Ed]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[ct,[ot,Xa,{mobile:"Mobile",xr:"VR","*":Rr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[ot,Rr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[ot,Zt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[ct,[ht,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[mt,[pt,Bv+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[pt,mt],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[mt,[pt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[pt,mt],[/ladybird\//i],[[pt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[mt,pt]],os:[[/(windows nt) (6\.[23]); arm/i],[[pt,/N/,"R"],[mt,Xa,RH]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[pt,mt],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[mt,/(;|\))/g,"",Xa,RH],[pt,l5]],[/(windows ce)\/?([\d\.]*)/i],[pt,mt],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[mt,/_/g,"."],[pt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[pt,"macOS"],[mt,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[mt,[pt,Ss+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[mt,[pt,Ss+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[mt,[pt,Ss+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[mt,[pt,Ss+" Linux"]],[/crkey\/([\d\.]+)/i],[mt,[pt,Ss]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[mt,pt],[/(ubuntu) ([\w\.]+) like android/i],[[pt,/(.+)/,"$1 Touch"],mt],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[pt,mt],[/\(bb(10);/i],[mt,[pt,EH]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[mt,[pt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[mt,[pt,Td+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[mt,[pt,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[mt,Xa,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[pt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[mt,[pt,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[pt,"Chrome OS"],mt],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[pt,mt],[/(sunos) ?([\d\.]*)/i],[[pt,"Solaris"],mt],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[pt,mt]]},Dv=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return No.call(e.init,[[Qn,[pt,mt,wd,ot]],[Bo,[ei]],[Za,[ot,ct,ht]],[ba,[pt,mt]],[Hi,[pt,mt]]]),No.call(e.isIgnore,[[Qn,[mt,wd]],[ba,[mt]],[Hi,[mt]]]),No.call(e.isIgnoreRgx,[[Qn,/ ?browser$/i],[Hi,/ ?os$/i]]),No.call(e.toString,[[Qn,[pt,mt]],[Bo,[ei]],[Za,[ht,ct]],[ba,[pt,mt]],[Hi,[pt,mt]]]),e}(),K_e=function(e,t){var r=Dv.init[t],n=Dv.isIgnore[t]||0,a=Dv.isIgnoreRgx[t]||0,i=Dv.toString[t]||0;function s(){No.call(this,r)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Cs?Cs.getHighEntropyValues(wH).then(function(l){return e.setCH(new NH(l,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Uu&&(s.prototype.is=function(l){var f=!1;for(var d in this)if(this.hasOwnProperty(d)&&!u5(n,d)&&Oo(a?Ku(a,this[d]):this[d])==Oo(a?Ku(a,l):l)){if(f=!0,l!=_s)break}else if(l==_s&&f){f=!f;break}return f},s.prototype.toString=function(){var l=qu;for(var f in i)typeof this[i[f]]!==_s&&(l+=(l?" ":qu)+this[i[f]]);return l||_s}),Cs||(s.prototype.then=function(l){var f=this,d=function(){for(var v in f)f.hasOwnProperty(v)&&(this[v]=f[v])};d.prototype={is:s.prototype.is,toString:s.prototype.toString};var h=new d;return l(h),h}),new s};function NH(e,t){if(e=e||{},No.call(this,wH),t)No.call(this,[[JS,c5(e[Es])],[XS,c5(e[L_e])],[Zt,/\?1/.test(e[$_e])],[ct,kd(e[U_e])],[zu,kd(e[bH])],[QS,kd(e[z_e])],[ei,kd(e[x_e])],[Il,c5(e[q_e])],[Iv,kd(e[F_e])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==_s&&(this[r]=e[r])}function PH(e,t,r,n){return this.get=function(a){return a?this.data.hasOwnProperty(a)?this.data[a]:void 0:this.data},this.set=function(a,i){return this.data[a]=i,this},this.setCH=function(a){return this.uaCH=a,this},this.detectFeature=function(){if(ti&&ti.userAgent==this.ua)switch(this.itemType){case Qn:ti.brave&&typeof ti.brave.isBrave==Tv&&this.set(pt,"Brave");break;case Za:!this.get(ot)&&Cs&&Cs[Zt]&&this.set(ot,Zt),this.get(ct)=="Macintosh"&&ti&&typeof ti.standalone!==_s&&ti.maxTouchPoints&&ti.maxTouchPoints>2&&this.set(ct,"iPad").set(ot,Rr);break;case Hi:!this.get(pt)&&Cs&&Cs[zu]&&this.set(pt,Cs[zu]);break;case Uu:var a=this.data,i=function(s){return a[s].getItem().detectFeature().get()};this.set(Qn,i(Qn)).set(Bo,i(Bo)).set(Za,i(Za)).set(ba,i(ba)).set(Hi,i(Hi))}return this},this.parseUA=function(){return this.itemType!=Uu&&d5.call(this.data,this.ua,this.rgxMap),this.itemType==Qn&&this.set(wd,f5(this.get(mt))),this},this.parseCH=function(){var a=this.uaCH,i=this.rgxMap;switch(this.itemType){case Qn:case ba:var s=a[XS]||a[JS],l;if(s)for(var f in s){var d=s[f].brand||s[f],h=s[f].version;this.itemType==Qn&&!/not.a.brand/i.test(d)&&(!l||/Chrom/.test(l)&&d!=IH||l==Bv&&/WebView2/.test(d))&&(d=Xa(d,j_e),l=this.get(pt),l&&!/Chrom/.test(l)&&/Chrom/.test(d)||this.set(pt,d).set(mt,h).set(wd,f5(h)),l=d),this.itemType==ba&&d==IH&&this.set(mt,h)}break;case Bo:var v=a[ei];v&&(v&&a[Iv]=="64"&&(v+="64"),d5.call(this.data,v+";",i));break;case Za:if(a[Zt]&&this.set(ot,Zt),a[ct]&&(this.set(ct,a[ct]),!this.get(ot)||!this.get(ht))){var b={};d5.call(b,"droid 9; "+a[ct]+")",i),!this.get(ot)&&b.type&&this.set(ot,b.type),!this.get(ht)&&b.vendor&&this.set(ht,b.vendor)}if(a[Il]){var g;if(typeof a[Il]!="string")for(var y=0;!g&&y<a[Il].length;)g=Xa(a[Il][y++],BH);else g=Xa(a[Il],BH);this.set(ot,g)}break;case Hi:var _=a[zu];if(_){var T=a[QS];_==l5&&(T=parseInt(f5(T),10)>=13?"11":"10"),this.set(pt,_).set(mt,T)}this.get(pt)==l5&&a[ct]=="Xbox"&&this.set(pt,"Xbox").set(mt,void 0);break;case Uu:var w=this.data,M=function(k){return w[k].getItem().setCH(a).parseCH().get()};this.set(Qn,M(Qn)).set(Bo,M(Bo)).set(Za,M(Za)).set(ba,M(ba)).set(Hi,M(Hi))}return this},No.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",K_e(this,e)]]),this}function Qa(e,t,r){if(typeof e===$u?(Nv(e,!0)?(typeof t===$u&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e===ZS&&!Nv(t,!0)&&(r=t,t=void 0),r&&typeof r.append===Tv){var n={};r.forEach(function(f,d){n[d]=f}),r=n}if(!(this instanceof Qa))return new Qa(e,t,r).getResult();var a=typeof e===ZS?e:r&&r[gH]?r[gH]:ti&&ti.userAgent?ti.userAgent:qu,i=new NH(r,!0),s=t?H_e(OH,t):OH,l=function(f){return f==Uu?function(){return new PH(f,a,s,i).set("ua",a).set(Qn,this.getBrowser()).set(Bo,this.getCPU()).set(Za,this.getDevice()).set(ba,this.getEngine()).set(Hi,this.getOS()).get()}:function(){return new PH(f,a,s[f],i).parseUA().get()}};return No.call(this,[["getBrowser",l(Qn)],["getCPU",l(Bo)],["getDevice",l(Za)],["getEngine",l(ba)],["getOS",l(Hi)],["getResult",l(Uu)],["getUA",function(){return a}],["setUA",function(f){return ju(f)&&(a=f.length>YS?Pv(f,YS):f),this}]]).setUA(a),this}Qa.VERSION=D_e,Qa.BROWSER=Ov([pt,mt,wd,ot]),Qa.CPU=Ov([ei]),Qa.DEVICE=Ov([ct,ht,ot,_d,Zt,sn,Rr,Ja,Ed]),Qa.ENGINE=Qa.OS=Ov([pt,mt]);function W_e(){const e=Ue(!1);function t(){const{device:r}=Qa(navigator.userAgent);Lt(()=>{e.value=r.type==="mobile"||window.innerWidth<540})}return xr(()=>window.removeEventListener("resize",t)),lr(()=>{t(),window.addEventListener("resize",t)}),{mobile:e}}class h5 extends tr{constructor(t,r,n=!0){if(super(),Dt(this,"bluetoothDevice",!1),Dt(this,"connection"),Dt(this,"data",{}),Dt(this,"displaySubmitButton",!0),Dt(this,"http"),Dt(this,"interfaceVersion"),Dt(this,"_loading",!1),Dt(this,"messageEncrypted"),Dt(this,"rules",{}),Dt(this,"rulesDefined",!1),this.config=t,this.measureEvents=n,this.http=r.getInstance(),t.twofa&&t.twofa.length)this.configuredMeasureEvent("twofa_request",{id_site:t.id_site,...t.id_site?{}:{id_request:t.id_request}}),t.twofa.forEach(a=>{const i=a.name;this.data[i]=null,(a.type==="authentication_type"||a.type==="challenge")&&(this.data[i]=a.label),a.type==="connection"&&(this.connection=this.data[i]=a.label),(a.type==="externalAction"||a.type==="instructions")&&(this.displaySubmitButton=!1),a.type==="interface_version"&&(this.interfaceVersion=this.data[i]=a.label)}),this.connectSantanderUsbToken(),this.handleBbvaNetcashConnections();else throw new Error("TWOFA credentials are required.")}get loading(){return this._loading}set loading(t){this._loading=t,t&&this.emit("loading")}authenticate(t){return this.data={...t},this.configuredMeasureEvent("twofa_send",{id_site:this.config.id_site,...this.config.id_site?{}:{id_request:this.config.id_request}}),this.loading=!0,this.connection==="eai_otp_GO3"&&!this.bluetoothDevice?this.sendBbvaNetcashUsbToken():(this.turnOnBbvaNetcashBluetoothDevice(),this.http.post(this.config.address,{twofa:{...this.data}}).then(r=>(this.emit("login-success"),r)).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r))))}defineRules(t){this.rulesDefined||(this.rulesDefined=!0,this.config.twofa.forEach(r=>{Object.defineProperty(this.rules,r.name,{value:this.setRules(r,t)})}))}getFields(){return this.config.twofa.filter(t=>t.type!=="challenge"&&t.type!=="connection")}getBbvaNetcashBluetoothFinalToken(t){const r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],sY(t).then(n=>{this.data={token:n,other_message_encrypted:"other_message_encrypted"},this.authenticate(this.data)})}statusChanged(){this.loading||(this.loading=!0)}configuredMeasureEvent(t,r){this.measureEvents&&en(t,r)}connectSantanderUsbToken(){this.config.id_site==="57f6dd8c78480602048b4567"&&this.config.twofa[0].type==="instructions"&&mre(this.config.twofa[0].imgBase64File).then(t=>{this.authenticate(t)}).catch(t=>{this.emit("twofa-api-error"),this.emit("twofa-device-error",t)})}findTwofaByName(t){return this.config.twofa.find(r=>r.name===t)}findTwofaByType(t){return this.config.twofa.find(r=>r.type===t)}handleBbvaNetcashConnections(){this.messageEncrypted=this.findTwofaByType("message_encrypted");const t=this.findTwofaByType("other_message_encrypted");this.connection==="eai_otp_GO3"&&(this.bluetoothDevice=this.findTwofaByType("bluetooth_device").label==="S",this.bluetoothDevice?this.sendBbvaNetcashBluetoothTimeChallengeV1():this.setBbvaNetcashUsbFields()),this.messageEncrypted&&this.setBbvaNetcashBluetoothFakeToken(),t&&this.getBbvaNetcashBluetoothFinalToken(t.label),this.findTwofaByType("authentication_type")&&this.sendBbvaNetcashBluetoothTimeChallengeV2(),this.config.id_site==="57239fae78480601038b4567"&&!this.connection&&this.findTwofaByType("challenge")&&!this.messageEncrypted&&!t&&this.sendBbvaNetcashBluetoothSecondToken()}sendBbvaNetcashBluetoothSecondToken(){const t=JSON.parse(this.findTwofaByType("challenge").label),r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],_Y(t).then(n=>{this.authenticate({challenge:n,token:n})})}sendBbvaNetcashBluetoothTimeChallengeV1(){const t=this.findTwofaByType("challenge").label,r=this.findTwofaByType("device").label,n=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:n,name:"token",type:"instructions"}],lY(r,t).then(a=>{this.data={bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection",device:"device",interface_version:"interface_version",token:a},this.authenticate(this.data)})}sendBbvaNetcashBluetoothTimeChallengeV2(){const t=this.findTwofaByType("authentication_type").label,r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],SY(t).then(n=>{this.authenticate({authentication_type:"authentication_type",interface_version:"interface_version",token:n})})}sendBbvaNetcashUsbToken(){return nY(this.data.token,this.data.challenge).then(t=>this.http.post(this.config.address,{twofa:{...this.data,...t,bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection"}}).then(r=>(this.emit("login-success"),r)).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r)))).catch(t=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(t.response?{...t,response:{...t.response,status:500}}:t)))}setBbvaNetcashBluetoothFakeToken(){const t=this.findTwofaByName("token").label;this.rules={token:[{required:!0}]},this.rulesDefined=!0,this.data={token:""},this.config.twofa=[{name:"token",type:"text",label:t,disabled:!0}],oY(this.messageEncrypted.label).then(r=>{this.data={token:r},this.emit("token-received")})}setBbvaNetcashUsbFields(){this.config.twofa=[this.findTwofaByType("text")]}setRules(t,r){const n=[];return n.push({required:!0,message:r("form_errors.required",{label:t.label})}),t.validation&&t.validation.forEach(a=>{switch(a.type){case"text":break;case"regex":n.push({pattern:a.value,message:a.error_message});break}}),n}turnOnBbvaNetcashBluetoothDevice(){this.messageEncrypted&&(this.data={token:"OK",message_encrypted:"message_encrypted"},wY())}}class p5 extends tr{constructor(t,r,n){super(),Dt(this,"config"),Dt(this,"_consent",null),Dt(this,"response"),Dt(this,"testMode",!1),Dt(this,"http"),Dt(this,"_finalResponse",null),Dt(this,"_lastSocketMessage"),Dt(this,"_loading",!1),Dt(this,"_status","start"),Dt(this,"_twofa"),Dt(this,"isSocketOpen",!1),Dt(this,"options",{}),Dt(this,"socket"),Dt(this,"socketOpened",!1),Dt(this,"socketTimeoutAfterError"),Dt(this,"timer",null),this.httpService=r,this.userConfig=n,this.config=t,this.http=r.getInstance()}get finalResponse(){return this._finalResponse}set finalResponse(t){this._finalResponse=t,this.status="finish"}get lastSocketMessage(){return this._lastSocketMessage}set lastSocketMessage(t){this._lastSocketMessage=t}get loading(){return this._loading}set loading(t){this._loading=t,t&&(this.status="loading")}get status(){return this._status}set status(t){const r=this._status!==t;this._status=t,r&&(this.emit(t),this.emit("status-update",t))}get twofa(){return this._twofa}set twofa(t){this._twofa=t,t&&(this.status="twofa",t.on("loading",()=>{this._twofa===t&&this.status==="twofa"&&(this.status="twofa-loading")}))}setOption(t,r){this.options[t]=r}toggleTestMode(){this.testMode=!this.testMode}configuredMeasureEvent(t,r){this.userConfig.isHeadless||en(t,r)}setConsent(t){this._consent=t}withConsent(t){return this._consent?{...t,consent:{accepted:this._consent.accepted,text:this._consent.text}}:t}clearTimer(){clearTimeout(this.timer)}moveDownloadOptions(t){if(t.download_options_active){const r=t.download_options[0],n=t.download_options[1];this.setOption("search_from",this.formatDate(r)),this.setOption("search_to",this.formatDate(n))}delete t.download_options_active,delete t.download_options}setRules(t){const r=[];return t.required&&r.push({required:!0,message:"required"}),t.validation&&t.validation.forEach(n=>{switch(n.type){case"text":break;case"regex":r.push({pattern:n.value,message:"regex"});break}}),r}setSocket(t){this.socket=new WebSocket(t),this.socket.onclose=r=>this.reopenSocket(r),this.socket.onerror=()=>this.socketError(),this.socket.onmessage=r=>this.socketMessage(r),this.socket.onopen=()=>this.socketOpen()}spreadOptions(){const t=Object.keys(this.options).reduce((r,n)=>(this.options[n]!==null&&this.options[n]!==void 0&&(r[n]=this.options[n]),r),{});return Object.keys(t).length?{options:{...t}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.userConfig.socketTimeoutTime)}formatDate(t){return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}reopenSocket(t){this.setSocket(t.target.url)}reopenSocketAfterError(){if(!this.socketTimeoutAfterError){this.socketTimeoutAfterError=new Date().getTime()+12e4,this.setSocket(this.response.ws);const t=setInterval(()=>{this.isSocketOpen?clearInterval(t):new Date().getTime()<this.socketTimeoutAfterError?(this.socket.close(),this.setSocket(this.response.ws)):(clearInterval(t),this.socket.close(),this.loading=!1,this.emit("socket-error"),this.finalResponse="error")},2e3)}}socketClose(t){this.clearTimer(),this.twofa=null,this.emit("socket-close",event),t&&t(this),this.socket&&(this.socket.onclose=null,this.socket.close())}socketError(){this.isSocketOpen=!1,this.socketOpened?this.reopenSocketAfterError():(this.loading=!1,this.emit("socket-error"),this.finalResponse="error")}socketMessage(t){const r=JSON.parse(t.data);if(this.lastSocketMessage=r,this.clearTimer(),this.config.quickAnswer&&r.code===102){this.socketClose(()=>{this.finalResponse="success",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-quick-answer")}),this.configuredMeasureEvent("sync_success",{code:r.code,id_site:this.config.id_site});return}r.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),r.code===410&&(this.twofa=new h5({...r,id_site:this.config.id_site},this.httpService,!this.userConfig.isHeadless),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",r),this.startTimer(),r.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),(200<=r.code&&r.code<300||400<=r.code&&r.code<600&&r.code!==410)&&(r.code<300?(this.finalResponse="success",this.configuredMeasureEvent("sync_success",{code:r.code,id_site:this.config.id_site})):(this.finalResponse="error",this.configuredMeasureEvent("sync_error",{code:r.code,code_origin:"socket",id_site:this.config.id_site})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose()),!(400<=r.code&&r.code<600&&r.code!==410||200<=r.code&&r.code<300)&&this.twofa&&r.code!==410&&(this.twofa.loading=!0,this.status="twofa-loading")}socketOpen(){this.isSocketOpen=this.socketOpened=!0,this.socketTimeoutAfterError=void 0}socketTimeout(){this.socketClose(()=>{this.finalResponse="error",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-timeout")})}}const DH=class Ld extends p5{constructor(t,r,n,a){super(t,r,a),Dt(this,"input",[]),Dt(this,"backUpInputArray",[]),this.defaultParams=n,this.userConfig=a,this.allConnections.forEach(i=>{const s={rules:{},data:{}};Ll.includes(t.id_site)&&this.addDownloadOptions(i),i.fields.forEach(l=>{const f=l.name;Object.defineProperty(s.rules,f,{enumerable:!0,value:this.setRules(l),writable:!0}),s.data[f]=null}),i.name===Ld.statementParseInputName?this.backUpInputArray=[s]:this.input.push(s)})}get backUpConnection(){return this.allConnections.find(t=>t.name===Ld.statementParseInputName)}get backUpInput(){return this.backUpInputArray[0]}get connections(){return this.allConnections.filter(t=>t.name!==Ld.statementParseInputName)}get version(){return 4}get allConnections(){return this.config.input.map(t=>({name:t.name,label:t.label,fields:t.fields.map(r=>({...r.options.widget,name:r.name,identifier:r.options.api.identifier,required:r.required}))}))}connect(t,r,n=!1){const a=this.getConnectData(t,r,n);return this.startTimer(),this.http.post(this.config.endpoint,a).then(i=>(this.response=i,this.emit("login-success"),this.setSocket(i.ws),i)).catch(i=>(this.configuredMeasureEvent("sync_error",{code:i.response?i.response.status:i.toString(),code_origin:"endpoint",id_site:this.config.id_site}),n?this.backUpInput.data={}:this.input[t].data={},this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(i)))}getConnectData(t,r,n=!1){this.updateData(t,r,n);const a=t||0,i={...n?this.backUpInput.data:this.input[a].data};Ll.includes(this.config.id_site)&&this.moveDownloadOptions(i),this.testMode?this.setOption("allowMultipleRequests",!0):this.setOption("allowMultipleRequests",void 0);const s={...this.defaultParams,id_site:this.config.id_site,input_name:n?Ld.statementParseInputName:this.connections[t].name,input:i,...this.spreadOptions()};return this.config.request?Promise.resolve(s.input):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.userConfig.saveCredential||(s.save_credential=this.userConfig.saveCredential),this.testMode&&(s.test=1),this.withConsent(s))}getFields(t,r=!1){return r?this.connections[t].fields.filter(n=>!n.identifier):this.connections[t].fields}getBackUpFields(t=!1){var r;return t?this.backUpConnection.fields.filter(n=>!n.identifier):(r=this.backUpConnection)==null?void 0:r.fields}getBackUpRules(t=!1){if(t){const r={};return this.getBackUpFields(!0).forEach(n=>{r[n.name]=this.setRules(n)}),r}return this.backUpInput.rules}getOptions(){return this.connections}getRules(t,r=!1){if(r){const n={};return this.getFields(t,!0).forEach(a=>{n[a.name]=this.setRules(a)}),n}return this.input[t].rules}updateData(t,r,n=!1){if(n){this.backUpInput.data={...r};return}this.input[t].data={...r}}addDownloadOptions(t){t.fields.includes(Dl)||(t.fields.push(Dl),t.fields.push(Im))}};Dt(DH,"statementParseInputName","statement_account_parse");let LH=DH;function xH(e,t){return function(){return e.apply(t,arguments)}}const{toString:G_e}=Object.prototype,{getPrototypeOf:v5}=Object,{iterator:Lv,toStringTag:FH}=Symbol,xv=(e=>t=>{const r=G_e.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wa=e=>(e=e.toLowerCase(),t=>xv(t)===e),Fv=e=>t=>typeof t===e,{isArray:Wu}=Array,Gu=Fv("undefined");function Rd(e){return e!==null&&!Gu(e)&&e.constructor!==null&&!Gu(e.constructor)&&ri(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qH=wa("ArrayBuffer");function Y_e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qH(e.buffer),t}const Z_e=Fv("string"),ri=Fv("function"),$H=Fv("number"),Bd=e=>e!==null&&typeof e=="object",J_e=e=>e===!0||e===!1,qv=e=>{if(xv(e)!=="object")return!1;const t=v5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(FH in e)&&!(Lv in e)},X_e=e=>{if(!Bd(e)||Rd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Q_e=wa("Date"),e6e=wa("File"),t6e=e=>!!(e&&typeof e.uri<"u"),r6e=e=>e&&typeof e.getParts<"u",n6e=wa("Blob"),i6e=wa("FileList"),a6e=e=>Bd(e)&&ri(e.pipe);function o6e(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof hn<"u"?hn:{}}const UH=o6e(),zH=typeof UH.FormData<"u"?UH.FormData:void 0,s6e=e=>{let t;return e&&(zH&&e instanceof zH||ri(e.append)&&((t=xv(e))==="formdata"||t==="object"&&ri(e.toString)&&e.toString()==="[object FormData]"))},l6e=wa("URLSearchParams"),[u6e,c6e,f6e,d6e]=["ReadableStream","Request","Response","Headers"].map(wa),h6e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Od(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Wu(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Rd(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(n=0;n<s;n++)l=i[n],t.call(null,e[l],l,e)}}function VH(e,t){if(Rd(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:hn,HH=e=>!Gu(e)&&e!==Rl;function m5(){const{caseless:e,skipUndefined:t}=HH(this)&&this||{},r={},n=(a,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&VH(r,i)||i;qv(r[s])&&qv(a)?r[s]=m5(r[s],a):qv(a)?r[s]=m5({},a):Wu(a)?r[s]=a.slice():(!t||!Gu(a))&&(r[s]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Od(arguments[a],n);return r}const p6e=(e,t,r,{allOwnKeys:n}={})=>(Od(t,(a,i)=>{r&&ri(a)?Object.defineProperty(e,i,{value:xH(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),v6e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),m6e=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},g6e=(e,t,r,n)=>{let a,i,s;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!n||n(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=r!==!1&&v5(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},y6e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},b6e=e=>{if(!e)return null;if(Wu(e))return e;let t=e.length;if(!$H(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},w6e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&v5(Uint8Array)),_6e=(e,t)=>{const n=(e&&e[Lv]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},E6e=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},S6e=wa("HTMLFormElement"),C6e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),jH=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),M6e=wa("RegExp"),KH=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Od(r,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(n[i]=s||a)}),Object.defineProperties(e,n)},T6e=e=>{KH(e,(t,r)=>{if(ri(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ri(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},A6e=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Wu(e)?n(e):n(String(e).split(t)),r},I6e=()=>{},k6e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function R6e(e){return!!(e&&ri(e.append)&&e[FH]==="FormData"&&e[Lv])}const B6e=e=>{const t=new Array(10),r=(n,a)=>{if(Bd(n)){if(t.indexOf(n)>=0)return;if(Rd(n))return n;if(!("toJSON"in n)){t[a]=n;const i=Wu(n)?[]:{};return Od(n,(s,l)=>{const f=r(s,a+1);!Gu(f)&&(i[l]=f)}),t[a]=void 0,i}}return n};return r(e,0)},O6e=wa("AsyncFunction"),N6e=e=>e&&(Bd(e)||ri(e))&&ri(e.then)&&ri(e.catch),WH=((e,t)=>e?setImmediate:t?((r,n)=>(Rl.addEventListener("message",({source:a,data:i})=>{a===Rl&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Rl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ri(Rl.postMessage)),P6e=typeof queueMicrotask<"u"?queueMicrotask.bind(Rl):typeof ke<"u"&&ke.nextTick||WH,tt={isArray:Wu,isArrayBuffer:qH,isBuffer:Rd,isFormData:s6e,isArrayBufferView:Y_e,isString:Z_e,isNumber:$H,isBoolean:J_e,isObject:Bd,isPlainObject:qv,isEmptyObject:X_e,isReadableStream:u6e,isRequest:c6e,isResponse:f6e,isHeaders:d6e,isUndefined:Gu,isDate:Q_e,isFile:e6e,isReactNativeBlob:t6e,isReactNative:r6e,isBlob:n6e,isRegExp:M6e,isFunction:ri,isStream:a6e,isURLSearchParams:l6e,isTypedArray:w6e,isFileList:i6e,forEach:Od,merge:m5,extend:p6e,trim:h6e,stripBOM:v6e,inherits:m6e,toFlatObject:g6e,kindOf:xv,kindOfTest:wa,endsWith:y6e,toArray:b6e,forEachEntry:_6e,matchAll:E6e,isHTMLForm:S6e,hasOwnProperty:jH,hasOwnProp:jH,reduceDescriptors:KH,freezeMethods:T6e,toObjectSet:A6e,toCamelCase:C6e,noop:I6e,toFiniteNumber:k6e,findKey:VH,global:Rl,isContextDefined:HH,isSpecCompliantForm:R6e,toJSONObject:B6e,isAsyncFn:O6e,isThenable:N6e,setImmediate:WH,asap:P6e,isIterable:e=>e!=null&&ri(e[Lv])};let jt=class Cj extends Error{static from(t,r,n,a,i,s){const l=new Cj(t.message,r||t.code,n,a,i);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,r,n,a,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:tt.toJSONObject(this.config),code:this.code,status:this.status}}};jt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",jt.ERR_BAD_OPTION="ERR_BAD_OPTION",jt.ECONNABORTED="ECONNABORTED",jt.ETIMEDOUT="ETIMEDOUT",jt.ERR_NETWORK="ERR_NETWORK",jt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",jt.ERR_DEPRECATED="ERR_DEPRECATED",jt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",jt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",jt.ERR_CANCELED="ERR_CANCELED",jt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",jt.ERR_INVALID_URL="ERR_INVALID_URL";const D6e=null;function g5(e){return tt.isPlainObject(e)||tt.isArray(e)}function GH(e){return tt.endsWith(e,"[]")?e.slice(0,-2):e}function y5(e,t,r){return e?e.concat(t).map(function(a,i){return a=GH(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function L6e(e){return tt.isArray(e)&&!e.some(g5)}const x6e=tt.toFlatObject(tt,{},null,function(t){return/^is[A-Z]/.test(t)});function $v(e,t,r){if(!tt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=tt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!tt.isUndefined(T[_])});const n=r.metaTokens,a=r.visitor||h,i=r.dots,s=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&tt.isSpecCompliantForm(t);if(!tt.isFunction(a))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(tt.isDate(y))return y.toISOString();if(tt.isBoolean(y))return y.toString();if(!f&&tt.isBlob(y))throw new jt("Blob is not supported. Use a Buffer instead.");return tt.isArrayBuffer(y)||tt.isTypedArray(y)?f&&typeof Blob=="function"?new Blob([y]):Le.Buffer.from(y):y}function h(y,_,T){let w=y;if(tt.isReactNative(t)&&tt.isReactNativeBlob(y))return t.append(y5(T,_,i),d(y)),!1;if(y&&!T&&typeof y=="object"){if(tt.endsWith(_,"{}"))_=n?_:_.slice(0,-2),y=JSON.stringify(y);else if(tt.isArray(y)&&L6e(y)||(tt.isFileList(y)||tt.endsWith(_,"[]"))&&(w=tt.toArray(y)))return _=GH(_),w.forEach(function(k,B){!(tt.isUndefined(k)||k===null)&&t.append(s===!0?y5([_],B,i):s===null?_:_+"[]",d(k))}),!1}return g5(y)?!0:(t.append(y5(T,_,i),d(y)),!1)}const v=[],b=Object.assign(x6e,{defaultVisitor:h,convertValue:d,isVisitable:g5});function g(y,_){if(!tt.isUndefined(y)){if(v.indexOf(y)!==-1)throw Error("Circular reference detected in "+_.join("."));v.push(y),tt.forEach(y,function(w,M){(!(tt.isUndefined(w)||w===null)&&a.call(t,w,tt.isString(M)?M.trim():M,_,b))===!0&&g(w,_?_.concat(M):[M])}),v.pop()}}if(!tt.isObject(e))throw new TypeError("data must be an object");return g(e),t}function YH(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function b5(e,t){this._pairs=[],e&&$v(e,this,t)}const ZH=b5.prototype;ZH.append=function(t,r){this._pairs.push([t,r])},ZH.toString=function(t){const r=t?function(n){return t.call(this,n,YH)}:YH;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function F6e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function JH(e,t,r){if(!t)return e;const n=r&&r.encode||F6e,a=tt.isFunction(r)?{serialize:r}:r,i=a&&a.serialize;let s;if(i?s=i(t,a):s=tt.isURLSearchParams(t)?t.toString():new b5(t,a).toString(n),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class XH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){tt.forEach(this.handlers,function(n){n!==null&&t(n)})}}const w5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},q6e={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:b5,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_5=typeof window<"u"&&typeof document<"u",E5=typeof navigator=="object"&&navigator||void 0,$6e=_5&&(!E5||["ReactNative","NativeScript","NS"].indexOf(E5.product)<0),U6e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z6e=_5&&window.location.href||"http://localhost",kn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_5,hasStandardBrowserEnv:$6e,hasStandardBrowserWebWorkerEnv:U6e,navigator:E5,origin:z6e},Symbol.toStringTag,{value:"Module"})),...q6e};function V6e(e,t){return $v(e,new kn.classes.URLSearchParams,{visitor:function(r,n,a,i){return kn.isNode&&tt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function H6e(e){return tt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function j6e(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function QH(e){function t(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),f=i>=r.length;return s=!s&&tt.isArray(a)?a.length:s,f?(tt.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!l):((!a[s]||!tt.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],i)&&tt.isArray(a[s])&&(a[s]=j6e(a[s])),!l)}if(tt.isFormData(e)&&tt.isFunction(e.entries)){const r={};return tt.forEachEntry(e,(n,a)=>{t(H6e(n),a,r,0)}),r}return null}function K6e(e,t,r){if(tt.isString(e))try{return(t||JSON.parse)(e),tt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Nd={transitional:w5,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=tt.isObject(t);if(i&&tt.isHTMLForm(t)&&(t=new FormData(t)),tt.isFormData(t))return a?JSON.stringify(QH(t)):t;if(tt.isArrayBuffer(t)||tt.isBuffer(t)||tt.isStream(t)||tt.isFile(t)||tt.isBlob(t)||tt.isReadableStream(t))return t;if(tt.isArrayBufferView(t))return t.buffer;if(tt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return V6e(t,this.formSerializer).toString();if((l=tt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return $v(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),K6e(t)):t}],transformResponse:[function(t){const r=this.transitional||Nd.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(tt.isResponse(t)||tt.isReadableStream(t))return t;if(t&&tt.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?jt.from(l,jt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kn.classes.FormData,Blob:kn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tt.forEach(["delete","get","head","post","put","patch"],e=>{Nd.headers[e]={}});const W6e=tt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),G6e=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
894
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+r+"$)|(?:^"+a+"$)"),s=new RegExp("^"+r+"$"),l=new RegExp("^"+a+"$"),f=function(B){return B&&B.exact?i:new RegExp("(?:"+t(B)+r+t(B)+")|(?:"+t(B)+a+t(B)+")","g")};f.v4=function(k){return k&&k.exact?s:new RegExp(""+t(k)+r+t(k),"g")},f.v6=function(k){return k&&k.exact?l:new RegExp(""+t(k)+a+t(k),"g")};var d="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",v=f.v4().source,b=f.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",_="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",T="(?::\\d{2,5})?",w='(?:[/?#][^\\s"]*)?',M="(?:"+d+"|www\\.)"+h+"(?:localhost|"+v+"|"+b+"|"+g+y+_+")"+T+w;return _v=new RegExp("(?:^"+M+"$)","i"),_v},aH={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},pd={integer:function(t){return pd.number(t)&&parseInt(t,10)===t},float:function(t){return pd.number(t)&&!pd.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!pd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(aH.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(fbe())},hex:function(t){return typeof t=="string"&&!!t.match(aH.hex)}},dbe=function(t,r,n,a,i){if(t.required&&r===void 0){iH(t,r,n,a,i);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;s.indexOf(l)>-1?pd[l](r)||a.push(pi(i.messages.types[l],t.fullField,t.type)):l&&typeof r!==t.type&&a.push(pi(i.messages.types[l],t.fullField,t.type))},hbe=function(t,r,n,a,i){var s=typeof t.len=="number",l=typeof t.min=="number",f=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,h=r,v=null,b=typeof r=="number",g=typeof r=="string",y=Array.isArray(r);if(b?v="number":g?v="string":y&&(v="array"),!v)return!1;y&&(h=r.length),g&&(h=r.replace(d,"_").length),s?h!==t.len&&a.push(pi(i.messages[v].len,t.fullField,t.len)):l&&!f&&h<t.min?a.push(pi(i.messages[v].min,t.fullField,t.min)):f&&!l&&h>t.max?a.push(pi(i.messages[v].max,t.fullField,t.max)):l&&f&&(h<t.min||h>t.max)&&a.push(pi(i.messages[v].range,t.fullField,t.min,t.max))},xu="enum",pbe=function(t,r,n,a,i){t[xu]=Array.isArray(t[xu])?t[xu]:[],t[xu].indexOf(r)===-1&&a.push(pi(i.messages[xu],t.fullField,t[xu].join(", ")))},vbe=function(t,r,n,a,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||a.push(pi(i.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(r)||a.push(pi(i.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},sr={required:iH,whitespace:cbe,type:dbe,range:hbe,enum:pbe,pattern:vbe},mbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"string")&&!t.required)return n();sr.required(t,r,a,s,i,"string"),dn(r,"string")||(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i),sr.pattern(t,r,a,s,i),t.whitespace===!0&&sr.whitespace(t,r,a,s,i))}n(s)},gbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},ybe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r===""&&(r=void 0),dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},bbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},wbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),dn(r)||sr.type(t,r,a,s,i)}n(s)},_be=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Ebe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Sbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r==null&&!t.required)return n();sr.required(t,r,a,s,i,"array"),r!=null&&(sr.type(t,r,a,s,i),sr.range(t,r,a,s,i))}n(s)},Cbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr.type(t,r,a,s,i)}n(s)},Mbe="enum",Tbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i),r!==void 0&&sr[Mbe](t,r,a,s,i)}n(s)},Abe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"string")&&!t.required)return n();sr.required(t,r,a,s,i),dn(r,"string")||sr.pattern(t,r,a,s,i)}n(s)},Ibe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r,"date")&&!t.required)return n();if(sr.required(t,r,a,s,i),!dn(r,"date")){var f;r instanceof Date?f=r:f=new Date(r),sr.type(t,f,a,s,i),f&&sr.range(t,f.getTime(),a,s,i)}}n(s)},kbe=function(t,r,n,a,i){var s=[],l=Array.isArray(r)?"array":typeof r;sr.required(t,r,a,s,i,l),n(s)},PS=function(t,r,n,a,i){var s=t.type,l=[],f=t.required||!t.required&&a.hasOwnProperty(t.field);if(f){if(dn(r,s)&&!t.required)return n();sr.required(t,r,a,l,i,s),dn(r,s)||sr.type(t,r,a,l,i)}n(l)},Rbe=function(t,r,n,a,i){var s=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(dn(r)&&!t.required)return n();sr.required(t,r,a,s,i)}n(s)},vd={string:mbe,method:gbe,number:ybe,boolean:bbe,regexp:wbe,integer:_be,float:Ebe,array:Sbe,object:Cbe,enum:Tbe,pattern:Abe,date:Ibe,url:PS,hex:PS,email:PS,required:kbe,any:Rbe};function DS(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var LS=DS(),md=function(){function e(r){this.rules=null,this._messages=LS,this.define(r)}var t=e.prototype;return t.define=function(n){var a=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var s=n[i];a.rules[i]=Array.isArray(s)?s:[s]})},t.messages=function(n){return n&&(this._messages=nH(DS(),n)),this._messages},t.validate=function(n,a,i){var s=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var l=n,f=a,d=i;if(typeof f=="function"&&(d=f,f={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,l),Promise.resolve(l);function h(_){var T=[],w={};function M(B){if(Array.isArray(B)){var D;T=(D=T).concat.apply(D,B)}else T.push(B)}for(var k=0;k<_.length;k++)M(_[k]);T.length?(w=NS(T),d(T,w)):d(null,l)}if(f.messages){var v=this.messages();v===LS&&(v=DS()),nH(v,f.messages),f.messages=v}else f.messages=this.messages();var b={},g=f.keys||Object.keys(this.rules);g.forEach(function(_){var T=s.rules[_],w=l[_];T.forEach(function(M){var k=M;typeof k.transform=="function"&&(l===n&&(l=Ml({},l)),w=l[_]=k.transform(w)),typeof k=="function"?k={validator:k}:k=Ml({},k),k.validator=s.getValidationMethod(k),k.validator&&(k.field=_,k.fullField=k.fullField||_,k.type=s.getType(k),b[_]=b[_]||[],b[_].push({rule:k,value:w,source:l,field:_}))})});var y={};return sbe(b,f,function(_,T){var w=_.rule,M=(w.type==="object"||w.type==="array")&&(typeof w.fields=="object"||typeof w.defaultField=="object");M=M&&(w.required||!w.required&&_.value),w.field=_.field;function k(N,O){return Ml({},O,{fullField:w.fullField+"."+N,fullFields:w.fullFields?[].concat(w.fullFields,[N]):[N]})}function B(N){N===void 0&&(N=[]);var O=Array.isArray(N)?N:[N];!f.suppressWarning&&O.length&&e.warning("async-validator:",O),O.length&&w.message!==void 0&&(O=[].concat(w.message));var P=O.map(rH(w,l));if(f.first&&P.length)return y[w.field]=1,T(P);if(!M)T(P);else{if(w.required&&!_.value)return w.message!==void 0?P=[].concat(w.message).map(rH(w,l)):f.error&&(P=[f.error(w,pi(f.messages.required,w.field))]),T(P);var L={};w.defaultField&&Object.keys(_.value).map(function(o){L[o]=w.defaultField}),L=Ml({},L,_.rule.fields);var F={};Object.keys(L).forEach(function(o){var u=L[o],p=Array.isArray(u)?u:[u];F[o]=p.map(k.bind(null,o))});var S=new e(F);S.messages(f.messages),_.rule.options&&(_.rule.options.messages=f.messages,_.rule.options.error=f.error),S.validate(_.value,_.rule.options||f,function(o){var u=[];P&&P.length&&u.push.apply(u,P),o&&o.length&&u.push.apply(u,o),T(u.length?u:null)})}}var D;if(w.asyncValidator)D=w.asyncValidator(w,_.value,B,_.source,f);else if(w.validator){try{D=w.validator(w,_.value,B,_.source,f)}catch(N){console.error?.(N),f.suppressValidatorError||setTimeout(function(){throw N},0),B(N.message)}D===!0?B():D===!1?B(typeof w.message=="function"?w.message(w.fullField||w.field):w.message||(w.fullField||w.field)+" fails"):D instanceof Array?B(D):D instanceof Error&&B(D.message)}D&&D.then&&D.then(function(){return B()},function(N){return B(N)})},function(_){h(_)},l)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!vd.hasOwnProperty(n.type))throw new Error(pi("Unknown rule type %s",n.type));return n.type||"string"},t.getValidationMethod=function(n){if(typeof n.validator=="function")return n.validator;var a=Object.keys(n),i=a.indexOf("message");return i!==-1&&a.splice(i,1),a.length===1&&a[0]==="required"?vd.required:vd[this.getType(n)]||void 0},e}();md.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");vd[t]=r},md.warning=QV,md.messages=LS,md.validators=vd;const oH="ElLabelWrap";var Bbe=_t({name:oH,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const r=Tt(El,void 0),n=Tt(Sl);n||ds(oH,"usage: <el-form-item><label-wrap /></el-form-item>");const a=Pt("form"),i=Ue(),s=Ue(0),l=()=>{var h;if((h=i.value)!=null&&h.firstElementChild){const v=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(v))}else return 0},f=(h="update")=>{Lt(()=>{t.default&&e.isAutoWidth&&(h==="update"?s.value=l():h==="remove"&&r?.deregisterLabelWidth(s.value))})},d=()=>f("update");return lr(()=>{d()}),xr(()=>{f("remove")}),df(()=>d()),Et(s,(h,v)=>{e.updateAll&&r?.registerLabelWidth(h,v)}),qi(be(()=>{var h,v;return(v=(h=i.value)==null?void 0:h.firstElementChild)!=null?v:null}),d),()=>{var h,v;if(!t)return null;const{isAutoWidth:b}=e;if(b){const g=r?.autoLabelWidth,y=n?.hasLabel,_={};if(y&&g&&g!=="auto"){const T=Math.max(0,Number.parseInt(g,10)-s.value),M=(n.labelPosition||r.labelPosition)==="left"?"marginRight":"marginLeft";T&&(_[M]=`${T}px`)}return rt("div",{ref:i,class:[a.be("item","label-wrap")],style:_},[(h=t.default)==null?void 0:h.call(t)])}else return rt(Mt,{ref:i},[(v=t.default)==null?void 0:v.call(t)])}}});const Obe=["role","aria-labelledby"];var sH=_t({name:"ElFormItem",__name:"form-item",props:Qye,setup(e,{expose:t}){const r=e,n=Da(),a=Tt(El,void 0),i=Tt(Sl,void 0),s=Wa(void 0,{formItem:!1}),l=Pt("form-item"),f=td().value,d=Ue([]),h=Ue(""),v=epe(h,100),b=Ue(""),g=Ue();let y,_=!1;const T=be(()=>r.labelPosition||a?.labelPosition),w=be(()=>{var X;return T.value==="top"?{}:{width:_u((X=r.labelWidth)!=null?X:a?.labelWidth)}}),M=be(()=>{var X;if(T.value==="top"||a?.inline)return{};if(!r.label&&!r.labelWidth&&F)return{};const re=_u((X=r.labelWidth)!=null?X:a?.labelWidth);return!r.label&&!n.label?{marginLeft:re}:{}}),k=be(()=>[l.b(),l.m(s.value),l.is("error",h.value==="error"),l.is("validating",h.value==="validating"),l.is("success",h.value==="success"),l.is("required",m.value||r.required),l.is("no-asterisk",a?.hideRequiredAsterisk),a?.requireAsteriskPosition==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:a?.statusIcon,[l.m(`label-${T.value}`)]:T.value}]),B=be(()=>di(r.inlineMessage)?r.inlineMessage:a?.inlineMessage||!1),D=be(()=>[l.e("error"),{[l.em("error","inline")]:B.value}]),N=be(()=>r.prop?lt(r.prop)?r.prop.join("."):r.prop:""),O=be(()=>!!(r.label||n.label)),P=be(()=>{var X;return(X=r.for)!=null?X:d.value.length===1?d.value[0]:void 0}),L=be(()=>!P.value&&O.value),F=!!i,S=be(()=>{const X=a?.model;if(!(!X||!r.prop))return gu(X,r.prop).value}),o=be(()=>{const{required:X}=r,re=[];r.rules&&re.push(...Pi(r.rules));const xe=a?.rules;if(xe&&r.prop){const ve=gu(xe,r.prop).value;ve&&re.push(...Pi(ve))}if(X!==void 0){const ve=re.map((J,we)=>[J,we]).filter(([J])=>"required"in J);if(ve.length>0)for(const[J,we]of ve)J.required!==X&&(re[we]={...J,required:X});else re.push({required:X})}return re}),u=be(()=>o.value.length>0),p=X=>o.value.filter(xe=>!xe.trigger||!X?!0:lt(xe.trigger)?xe.trigger.includes(X):xe.trigger===X).map(({trigger:xe,...ve})=>ve),m=be(()=>o.value.some(X=>X.required)),E=be(()=>{var X;return v.value==="error"&&r.showMessage&&((X=a?.showMessage)!=null?X:!0)}),A=be(()=>`${r.label||""}${a?.labelSuffix||""}`),R=X=>{h.value=X},C=X=>{var re,xe;const{errors:ve,fields:J}=X;(!ve||!J)&&console.error(X),R("error"),b.value=ve?(xe=(re=ve?.[0])==null?void 0:re.message)!=null?xe:`${r.prop} is required`:"",a?.emit("validate",r.prop,!1,b.value)},c=()=>{R("success"),a?.emit("validate",r.prop,!0,"")},I=async X=>{const re=N.value;return new md({[re]:X}).validate({[re]:S.value},{firstFields:!0}).then(()=>(c(),!0)).catch(ve=>(C(ve),Promise.reject(ve)))},x=async(X,re)=>{if(_||!r.prop)return!1;const xe=At(re);if(!u.value)return re?.(!1),!1;const ve=p(X);return ve.length===0?(re?.(!0),!0):(R("validating"),I(ve).then(()=>(re?.(!0),!0)).catch(J=>{const{fields:we}=J;return re?.(!1,we),xe?!1:Promise.reject(we)}))},q=()=>{R(""),b.value="",_=!1},H=async()=>{const X=a?.model;if(!X||!r.prop)return;const re=gu(X,r.prop);_=!0,re.value=$f(y),await Lt(),q(),_=!1},Y=X=>{d.value.includes(X)||d.value.push(X)},Q=X=>{d.value=d.value.filter(re=>re!==X)},V=X=>{y=$f(X)};Et(()=>r.error,X=>{b.value=X||"",R(X?"error":"")},{immediate:!0}),Et(()=>r.validateStatus,X=>R(X||""));const G=jr({...ho(r),$el:g,size:s,validateMessage:b,validateState:h,labelId:f,inputIds:d,isGroup:L,hasLabel:O,fieldValue:S,addInputId:Y,removeInputId:Q,resetField:H,clearValidate:q,validate:x,propString:N,setInitialValue:V});return Br(Sl,G),lr(()=>{r.prop&&(V(S.value),a?.addField(G))}),xr(()=>{a?.removeField(G)}),t({size:s,validateMessage:b,validateState:h,validate:x,clearValidate:q,resetField:H,setInitialValue:V}),(X,re)=>{var xe;return se(),Oe("div",{ref_key:"formItemRef",ref:g,class:Ee(k.value),role:L.value?"group":void 0,"aria-labelledby":L.value?U(f):void 0},[rt(U(Bbe),{"is-auto-width":w.value.width==="auto","update-all":((xe=U(a))==null?void 0:xe.labelWidth)==="auto"},{default:nt(()=>[e.label||X.$slots.label?(se(),et(yr(P.value?"label":"div"),{key:0,id:U(f),for:P.value,class:Ee(U(l).e("label")),style:Pr(w.value)},{default:nt(()=>[yt(X.$slots,"label",{label:A.value},()=>[dr(at(A.value),1)])]),_:3},8,["id","for","class","style"])):Ye("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),Pe("div",{class:Ee(U(l).e("content")),style:Pr(M.value)},[yt(X.$slots,"default"),rt(vae,{name:`${U(l).namespace.value}-zoom-in-top`},{default:nt(()=>[E.value?yt(X.$slots,"error",{key:0,error:b.value},()=>[Pe("div",{class:Ee(D.value)},at(b.value),3)]):Ye("v-if",!0)]),_:3},8,["name"])],6)],10,Obe)}}});const xS=on(Jye,{FormItem:sH}),FS=Mo(sH),Nbe=$t({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fn}}),Pbe={click:e=>e instanceof MouseEvent},Dbe=["href","target"];var Lbe=_t({name:"ElLink",__name:"link",props:Nbe,emits:Pbe,setup(e,{emit:t}){const r=e,n=t,a=D0("link");id({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},be(()=>di(r.underline)));const i=Pt("link"),s=be(()=>{var d,h,v;return[i.b(),i.m((v=(h=r.type)!=null?h:(d=a.value)==null?void 0:d.type)!=null?v:"default"),i.is("disabled",r.disabled),i.is("underline",l.value==="always"),i.is("hover-underline",l.value==="hover"&&!r.disabled)]}),l=be(()=>{var d,h,v;return di(r.underline)?r.underline?"hover":"never":(v=(h=r.underline)!=null?h:(d=a.value)==null?void 0:d.underline)!=null?v:"hover"});function f(d){r.disabled||n("click",d)}return(d,h)=>(se(),Oe("a",{class:Ee(s.value),href:e.disabled||!e.href?void 0:e.href,target:e.disabled||!e.href?void 0:e.target,onClick:f},[e.icon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.icon)))]),_:1})):Ye("v-if",!0),d.$slots.default?(se(),Oe("span",{key:1,class:Ee(U(i).e("inner"))},[yt(d.$slots,"default")],2)):Ye("v-if",!0),d.$slots.icon?yt(d.$slots,"icon",{key:2}):Ye("v-if",!0)],10,Dbe))}});const xbe=on(Lbe);var Fbe=Object.defineProperty,qbe=(e,t,r)=>t in e?Fbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lH=(e,t,r)=>qbe(e,typeof t!="symbol"?t+"":t,r);let $be=class{constructor(t,r){this.parent=t,this.domNode=r,lH(this,"subMenuItems"),lH(this,"subIndex",0),this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,r=>{r.addEventListener("keydown",n=>{const a=ga(n);let i=!1;switch(a){case Ut.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case Ut.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case Ut.tab:{x0(t,"mouseleave");break}case Ut.enter:case Ut.numpadEnter:case Ut.space:{i=!0,n.currentTarget.click();break}}return i&&(n.preventDefault(),n.stopPropagation()),!1})})}};var Ube=Object.defineProperty,zbe=(e,t,r)=>t in e?Ube(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vbe=(e,t,r)=>zbe(e,t+"",r);class Hbe{constructor(t,r){this.domNode=t,Vbe(this,"submenu",null),this.submenu=null,this.init(r)}init(t){this.domNode.setAttribute("tabindex","0");const r=this.domNode.querySelector(`.${t}-menu`);r&&(this.submenu=new $be(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{const r=ga(t);let n=!1;switch(r){case Ut.down:{x0(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case Ut.up:{x0(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case Ut.tab:{x0(t.currentTarget,"mouseleave");break}case Ut.enter:case Ut.numpadEnter:case Ut.space:{n=!0,t.currentTarget.click();break}}n&&t.preventDefault()})}}let jbe=class{constructor(t,r){this.domNode=t,this.init(r)}init(t){const r=this.domNode.childNodes;Array.from(r).forEach(n=>{n.nodeType===1&&new Hbe(n,t)})}};var Kbe=_t({name:"ElMenuCollapseTransition",__name:"menu-collapse-transition",setup(e){const t=Pt("menu"),r={onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,a){bu(n,`${t.namespace.value}-opacity-transition`),n.style.opacity="1",a()},onAfterEnter(n){gl(n,`${t.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Hf(n,t.m("collapse"))?(gl(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),bu(n,t.m("collapse"))):(bu(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),gl(n,t.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){bu(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}};return(n,a)=>(se(),et(yo,$r({mode:"out-in"},r),{default:nt(()=>[yt(n.$slots,"default")]),_:3},16))}});function uH(e,t){const r=be(()=>{let a=e.parent;const i=[t.value];for(;a.type.name!=="ElMenu";)a.props.index&&i.unshift(a.props.index),a=a.parent;return i});return{parentMenu:be(()=>{let a=e.parent;for(;a&&!["ElMenu","ElSubMenu"].includes(a.type.name);)a=a.parent;return a}),indexPath:r}}function Wbe(e){return be(()=>{const r=e.backgroundColor;return r?new gV(r).shade(20).toString():""})}const cH=(e,t)=>{const r=Pt("menu");return be(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":Wbe(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},qS="rootMenu",Ev="subMenu:",Gbe=$t({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,popperStyle:{type:ft([String,Object])},disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fn},expandOpenIcon:{type:fn},collapseCloseIcon:{type:fn},collapseOpenIcon:{type:fn}}),$S="ElSubMenu";var US=_t({name:$S,props:Gbe,setup(e,{slots:t,expose:r}){const n=fr(),{indexPath:a,parentMenu:i}=uH(n,be(()=>e.index)),s=Pt("menu"),l=Pt("sub-menu"),f=Tt(qS);f||ds($S,"can not inject root menu");const d=Tt(`${Ev}${i.value.uid}`);d||ds($S,"can not inject sub menu");const h=Ue({}),v=Ue({});let b;const g=Ue(!1),y=Ue(),_=Ue(),T=be(()=>d.level===0),w=be(()=>P.value==="horizontal"&&T.value?"bottom-start":"right-start"),M=be(()=>P.value==="horizontal"&&T.value||P.value==="vertical"&&!f.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?N.value?e.expandOpenIcon:e.expandCloseIcon:qE:e.collapseCloseIcon&&e.collapseOpenIcon?N.value?e.collapseOpenIcon:e.collapseCloseIcon:jf),k=be(()=>{const x=e.teleported;return Li(x)?T.value:x}),B=be(()=>f.props.collapse?`${s.namespace.value}-zoom-in-left`:`${s.namespace.value}-zoom-in-top`),D=be(()=>P.value==="horizontal"&&T.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),N=be(()=>f.openedMenus.includes(e.index)),O=be(()=>[...Object.values(h.value),...Object.values(v.value)].some(({active:x})=>x)),P=be(()=>f.props.mode),L=be(()=>f.props.persistent),F=jr({index:e.index,indexPath:a,active:O}),S=cH(f.props,d.level+1),o=be(()=>{var x;return(x=e.popperOffset)!=null?x:f.props.popperOffset}),u=be(()=>{var x;return(x=e.popperClass)!=null?x:f.props.popperClass}),p=be(()=>{var x;return(x=e.popperStyle)!=null?x:f.props.popperStyle}),m=be(()=>{var x;return(x=e.showTimeout)!=null?x:f.props.showTimeout}),E=be(()=>{var x;return(x=e.hideTimeout)!=null?x:f.props.hideTimeout}),A=()=>{var x,q,H;return(H=(q=(x=_.value)==null?void 0:x.popperRef)==null?void 0:q.popperInstanceRef)==null?void 0:H.destroy()},R=x=>{x||A()},C=()=>{f.props.menuTrigger==="hover"&&f.props.mode==="horizontal"||f.props.collapse&&f.props.mode==="vertical"||e.disabled||f.handleSubMenuClick({index:e.index,indexPath:a.value,active:O.value})},c=(x,q=m.value)=>{var H;if(x.type!=="focus"){if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||e.disabled){d.mouseInChild.value=!0;return}d.mouseInChild.value=!0,b?.(),{stop:b}=LE(()=>{f.openMenu(e.index,a.value)},q),k.value&&((H=i.value.vnode.el)==null||H.dispatchEvent(new MouseEvent("mouseenter"))),x.type==="mouseenter"&&x.target&&Lt(()=>{F0(x.target,{preventScroll:!0})})}},I=(x=!1)=>{var q;if(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"){d.mouseInChild.value=!1;return}b?.(),d.mouseInChild.value=!1,{stop:b}=LE(()=>!g.value&&f.closeMenu(e.index,a.value),E.value),k.value&&x&&((q=d.handleMouseleave)==null||q.call(d,!0))};Et(()=>f.props.collapse,x=>R(!!x));{const x=H=>{v.value[H.index]=H},q=H=>{delete v.value[H.index]};Br(`${Ev}${n.uid}`,{addSubMenu:x,removeSubMenu:q,handleMouseleave:I,mouseInChild:g,level:d.level+1})}return r({opened:N}),lr(()=>{f.addSubMenu(F),d.addSubMenu(F)}),xr(()=>{d.removeSubMenu(F),f.removeSubMenu(F)}),()=>{var x;const q=[(x=t.title)==null?void 0:x.call(t),Ht(zt,{class:l.e("icon-arrow"),style:{transform:N.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&f.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>qt(M.value)?Ht(n.appContext.components[M.value]):Ht(M.value)})],H=f.isMenuPopup?Ht(Z0,{ref:_,visible:N.value,effect:"light",pure:!0,offset:o.value,showArrow:!1,persistent:L.value,popperClass:u.value,popperStyle:p.value,placement:w.value,teleported:k.value,fallbackPlacements:D.value,transition:B.value,gpuAcceleration:!1},{content:()=>{var Y;return Ht("div",{class:[s.m(P.value),s.m("popup-container"),u.value],onMouseenter:Q=>c(Q,100),onMouseleave:()=>I(!0),onFocus:Q=>c(Q,100)},[Ht("ul",{class:[s.b(),s.m("popup"),s.m(`popup-${w.value}`)],style:S.value},[(Y=t.default)==null?void 0:Y.call(t)])])},default:()=>Ht("div",{class:l.e("title"),onClick:C},q)}):Ht(Mt,{},[Ht("div",{class:l.e("title"),ref:y,onClick:C},q),Ht(Lge,{},{default:()=>{var Y;return cr(Ht("ul",{role:"menu",class:[s.b(),s.m("inline")],style:S.value},[(Y=t.default)==null?void 0:Y.call(t)]),[[Zr,N.value]])}})]);return Ht("li",{class:[l.b(),l.is("active",O.value),l.is("opened",N.value),l.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:N.value,onMouseenter:c,onMouseleave:()=>I(),onFocus:c},[H])}}});const Ybe=$t({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ft(Array),default:()=>Lz([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:fn,default:()=>xpe},popperEffect:{type:ft(String),default:"dark"},popperClass:String,popperStyle:{type:ft([String,Object])},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),zS=e=>lt(e)&&e.every(t=>qt(t)),Zbe={close:(e,t)=>qt(e)&&zS(t),open:(e,t)=>qt(e)&&zS(t),select:(e,t,r,n)=>qt(e)&&zS(t)&&xt(r)&&(Li(n)||n instanceof Promise)},fH=64;var Jbe=_t({name:"ElMenu",props:Ybe,emits:Zbe,setup(e,{emit:t,slots:r,expose:n}){const a=fr(),i=a.appContext.config.globalProperties.$router,s=Ue(),l=Ue(),f=Pt("menu"),d=Pt("sub-menu");let h=fH;const v=Ue(-1),b=Ue(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=Ue(e.defaultActive),y=Ue({}),_=Ue({}),T=be(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),w=()=>{const A=g.value&&y.value[g.value];if(!A||e.mode==="horizontal"||e.collapse)return;A.indexPath.forEach(C=>{const c=_.value[C];c&&M(C,c.indexPath)})},M=(A,R)=>{b.value.includes(A)||(e.uniqueOpened&&(b.value=b.value.filter(C=>R.includes(C))),b.value.push(A),t("open",A,R))},k=A=>{const R=b.value.indexOf(A);R!==-1&&b.value.splice(R,1)},B=(A,R)=>{k(A),t("close",A,R)},D=({index:A,indexPath:R})=>{b.value.includes(A)?B(A,R):M(A,R)},N=A=>{(e.mode==="horizontal"||e.collapse)&&(b.value=[]);const{index:R,indexPath:C}=A;if(!(fs(R)||fs(C)))if(e.router&&i){const c=A.route||R,I=i.push(c).then(x=>(x||(g.value=R),x));t("select",R,C,{index:R,indexPath:C,route:c},I)}else g.value=R,t("select",R,C,{index:R,indexPath:C})},O=A=>{var R;const C=y.value,c=C[A]||g.value&&C[g.value]||C[e.defaultActive];g.value=(R=c?.index)!=null?R:A},P=A=>{const R=getComputedStyle(A),C=Number.parseInt(R.marginLeft,10),c=Number.parseInt(R.marginRight,10);return A.offsetWidth+C+c||0},L=()=>{if(!s.value)return-1;const A=Array.from(s.value.childNodes).filter(H=>H.nodeName!=="#comment"&&(H.nodeName!=="#text"||H.nodeValue)),R=getComputedStyle(s.value),C=Number.parseInt(R.paddingLeft,10),c=Number.parseInt(R.paddingRight,10),I=s.value.clientWidth-C-c;let x=0,q=0;return A.forEach((H,Y)=>{x+=P(H),x<=I-h&&(q=Y+1)}),q===A.length?-1:q},F=A=>_.value[A].indexPath,S=(A,R=33.34)=>{let C;return()=>{C&&clearTimeout(C),C=setTimeout(()=>{A()},R)}};let o=!0;const u=()=>{const A=xi(l);if(A&&(h=P(A)||fH),v.value===L())return;const R=()=>{v.value=-1,Lt(()=>{v.value=L()})};o?R():S(R)(),o=!1};Et(()=>e.defaultActive,A=>{y.value[A]||(g.value=""),O(A)}),Et(()=>e.collapse,A=>{A&&(b.value=[])}),Et(y.value,w);let p;w4(()=>{e.mode==="horizontal"&&e.ellipsis?p=qi(s,u).stop:p?.()});const m=Ue(!1);{const A=I=>{_.value[I.index]=I},R=I=>{delete _.value[I.index]};Br(qS,jr({props:e,openedMenus:b,items:y,subMenus:_,activeIndex:g,isMenuPopup:T,addMenuItem:I=>{y.value[I.index]=I},removeMenuItem:I=>{delete y.value[I.index]},addSubMenu:A,removeSubMenu:R,openMenu:M,closeMenu:B,handleMenuItemClick:N,handleSubMenuClick:D})),Br(`${Ev}${a.uid}`,{addSubMenu:A,removeSubMenu:R,mouseInChild:m,level:0})}lr(()=>{e.mode==="horizontal"&&new jbe(a.vnode.el,f.namespace.value)}),n({open:R=>{const{indexPath:C}=_.value[R];C.forEach(c=>M(c,C))},close:k,updateActiveIndex:O,handleResize:u});const E=cH(e,0);return()=>{var A,R;let C=(R=(A=r.default)==null?void 0:A.call(r))!=null?R:[];const c=[];if(e.mode==="horizontal"&&s.value){const q=wl(C).filter(Q=>Q?.shapeFlag!==8),H=v.value===-1?q:q.slice(0,v.value),Y=v.value===-1?[]:q.slice(v.value);Y?.length&&e.ellipsis&&(C=H,c.push(Ht(US,{ref:l,index:"sub-menu-more",class:d.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>Ht(zt,{class:d.e("icon-more")},{default:()=>Ht(e.ellipsisIcon)}),default:()=>Y})))}const I=e.closeOnClickOutside?[[ad,()=>{b.value.length&&(m.value||(b.value.forEach(q=>t("close",q,F(q))),b.value=[]))}]]:[],x=cr(Ht("ul",{key:String(e.collapse),role:"menubar",ref:s,style:E.value,class:{[f.b()]:!0,[f.m(e.mode)]:!0,[f.m("collapse")]:e.collapse}},[...C,...c]),I);return e.collapseTransition&&e.mode==="vertical"?Ht(Kbe,()=>x):x}}});const Xbe=$t({index:{type:ft([String,null]),default:null},route:{type:ft([String,Object])},disabled:Boolean}),Qbe={click:e=>qt(e.index)&<(e.indexPath)},Sv="ElMenuItem";var dH=_t({name:Sv,__name:"menu-item",props:Xbe,emits:Qbe,setup(e,{expose:t,emit:r}){const n=e,a=r;B0(n.index)&&pr(Sv,'Missing required prop: "index"');const i=fr(),s=Tt(qS),l=Pt("menu"),f=Pt("menu-item");s||ds(Sv,"can not inject root menu");const{parentMenu:d,indexPath:h}=uH(i,Kr(n,"index")),v=Tt(`${Ev}${d.value.uid}`);v||ds(Sv,"can not inject sub menu");const b=be(()=>n.index===s.activeIndex),g=jr({index:n.index,indexPath:h,active:b}),y=()=>{n.disabled||(s.handleMenuItemClick({index:n.index,indexPath:h.value,route:n.route}),a("click",g))};return lr(()=>{v.addSubMenu(g),s.addMenuItem(g)}),xr(()=>{v.removeSubMenu(g),s.removeMenuItem(g)}),t({parentMenu:d,rootMenu:s,active:b,nsMenu:l,nsMenuItem:f,handleClick:y}),(_,T)=>(se(),Oe("li",{class:Ee([U(f).b(),U(f).is("active",b.value),U(f).is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:y},[U(d).type.name==="ElMenu"&&U(s).props.collapse&&_.$slots.title?(se(),et(U(Z0),{key:0,effect:U(s).props.popperEffect,placement:"right","fallback-placements":["left"],"popper-class":U(s).props.popperClass,"popper-style":U(s).props.popperStyle,persistent:U(s).props.persistent,"focus-on-target":""},{content:nt(()=>[yt(_.$slots,"title")]),default:nt(()=>[Pe("div",{class:Ee(U(l).be("tooltip","trigger"))},[yt(_.$slots,"default")],2)]),_:3},8,["effect","popper-class","popper-style","persistent"])):(se(),Oe(Mt,{key:1},[yt(_.$slots,"default"),yt(_.$slots,"title")],64))],2))}}),hH=_t({name:"ElMenuItemGroup",__name:"menu-item-group",props:{title:String},setup(e){const t=Pt("menu-item-group");return(r,n)=>(se(),Oe("li",{class:Ee(U(t).b())},[Pe("div",{class:Ee(U(t).e("title"))},[r.$slots.title?yt(r.$slots,"title",{key:1}):(se(),Oe(Mt,{key:0},[dr(at(e.title),1)],64))],2),Pe("ul",null,[yt(r.$slots,"default")])],2))}});const ewe=on(Jbe,{MenuItem:dH,MenuItemGroup:hH,SubMenu:US}),twe=Mo(dH);Mo(hH),Mo(US);const rwe=$t({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:ft([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:ft([String,Object,Array])}});var nwe=_t({name:"ElStatistic",__name:"statistic",props:rwe,setup(e,{expose:t}){const r=e,n=Pt("statistic"),a=be(()=>{const{value:i,formatter:s,precision:l,decimalSeparator:f,groupSeparator:d}=r;if(At(s))return s(i);if(!an(i)||Number.isNaN(i))return i;let[h,v=""]=String(i).split(".");return v=v.padEnd(l,"0").slice(0,l>0?l:0),h=h.replace(/\B(?=(\d{3})+(?!\d))/g,d),[h,v].join(v?f:"")});return t({displayValue:a}),(i,s)=>(se(),Oe("div",{class:Ee(U(n).b())},[i.$slots.title||e.title?(se(),Oe("div",{key:0,class:Ee(U(n).e("head"))},[yt(i.$slots,"title",{},()=>[dr(at(e.title),1)])],2)):Ye("v-if",!0),Pe("div",{class:Ee(U(n).e("content"))},[i.$slots.prefix||e.prefix?(se(),Oe("div",{key:0,class:Ee(U(n).e("prefix"))},[yt(i.$slots,"prefix",{},()=>[Pe("span",null,at(e.prefix),1)])],2)):Ye("v-if",!0),Pe("span",{class:Ee(U(n).e("number")),style:Pr(e.valueStyle)},at(a.value),7),i.$slots.suffix||e.suffix?(se(),Oe("div",{key:1,class:Ee(U(n).e("suffix"))},[yt(i.$slots,"suffix",{},()=>[Pe("span",null,at(e.suffix),1)])],2)):Ye("v-if",!0)],2)],2))}});const iwe=on(nwe),awe=$t({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:e=>["",...Vf].includes(e)},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fn},activeActionIcon:{type:fn},activeIcon:{type:fn},inactiveIcon:{type:fn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:ft(Function)},id:String,tabindex:{type:[String,Number]},...Ao(["ariaLabel"])}),owe={[Xr]:e=>di(e)||qt(e)||an(e),[Wn]:e=>di(e)||qt(e)||an(e),[yu]:e=>di(e)||qt(e)||an(e)},swe=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],lwe=["aria-hidden"],uwe={key:1},cwe={key:1},fwe=["aria-hidden"],VS="ElSwitch";var dwe=_t({name:VS,__name:"switch",props:awe,emits:owe,setup(e,{expose:t,emit:r}){const n=e,a=r,{formItem:i}=Io(),s=Wa(),l=Pt("switch"),{inputId:f}=Iu(n,{formItemContext:i}),d=Vi(be(()=>{if(n.loading)return!0})),h=Ue(n.modelValue!==!1),v=fo(),b=be(()=>[l.b(),l.m(s.value),l.is("disabled",d.value),l.is("checked",w.value)]),g=be(()=>[l.e("label"),l.em("label","left"),l.is("active",!w.value)]),y=be(()=>[l.e("label"),l.em("label","right"),l.is("active",w.value)]),_=be(()=>({width:_u(n.width)}));Et(()=>n.modelValue,()=>{h.value=!0});const T=be(()=>h.value?n.modelValue:!1),w=be(()=>T.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(T.value)||(a(Xr,n.inactiveValue),a(Wn,n.inactiveValue),a(yu,n.inactiveValue)),Et(w,D=>{var N;v.value.checked=D,n.validateEvent&&((N=i?.validate)==null||N.call(i,"change").catch(O=>pr(O)))});const M=()=>{const D=w.value?n.inactiveValue:n.activeValue;a(Xr,D),a(Wn,D),a(yu,D),Lt(()=>{v.value.checked=w.value})},k=()=>{if(d.value)return;const{beforeChange:D}=n;if(!D){M();return}const N=D();[Kc(N),di(N)].includes(!0)||ds(VS,"beforeChange must return type `Promise<boolean>` or `boolean`"),Kc(N)?N.then(P=>{P&&M()}).catch(P=>{pr(VS,`some error occurred: ${P}`)}):N&&M()},B=()=>{var D,N;(N=(D=v.value)==null?void 0:D.focus)==null||N.call(D)};return lr(()=>{v.value.checked=w.value}),t({focus:B,checked:w}),(D,N)=>(se(),Oe("div",{class:Ee(b.value),onClick:br(k,["prevent"])},[Pe("input",{id:U(f),ref_key:"input",ref:v,class:Ee(U(l).e("input")),type:"checkbox",role:"switch","aria-checked":w.value,"aria-disabled":U(d),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:U(d),tabindex:e.tabindex,onChange:M,onKeydown:fa(k,["enter"])},null,42,swe),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||D.$slots.inactive)?(se(),Oe("span",{key:0,class:Ee(g.value)},[yt(D.$slots,"inactive",{},()=>[e.inactiveIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveIcon)))]),_:1})):Ye("v-if",!0),!e.inactiveIcon&&e.inactiveText?(se(),Oe("span",{key:1,"aria-hidden":w.value},at(e.inactiveText),9,lwe)):Ye("v-if",!0)])],2)):Ye("v-if",!0),Pe("span",{class:Ee(U(l).e("core")),style:Pr(_.value)},[e.inlinePrompt?(se(),Oe("div",{key:0,class:Ee(U(l).e("inner"))},[w.value?(se(),Oe("div",{key:1,class:Ee(U(l).e("inner-wrapper"))},[yt(D.$slots,"active",{},()=>[e.activeIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeIcon)))]),_:1})):Ye("v-if",!0),!e.activeIcon&&e.activeText?(se(),Oe("span",cwe,at(e.activeText),1)):Ye("v-if",!0)])],2)):(se(),Oe("div",{key:0,class:Ee(U(l).e("inner-wrapper"))},[yt(D.$slots,"inactive",{},()=>[e.inactiveIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveIcon)))]),_:1})):Ye("v-if",!0),!e.inactiveIcon&&e.inactiveText?(se(),Oe("span",uwe,at(e.inactiveText),1)):Ye("v-if",!0)])],2))],2)):Ye("v-if",!0),Pe("div",{class:Ee(U(l).e("action"))},[e.loading?(se(),et(U(zt),{key:0,class:Ee(U(l).is("loading"))},{default:nt(()=>[rt(U(UE))]),_:1},8,["class"])):w.value?yt(D.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeActionIcon)))]),_:1})):Ye("v-if",!0)]):w.value?Ye("v-if",!0):yt(D.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.inactiveActionIcon)))]),_:1})):Ye("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||D.$slots.active)?(se(),Oe("span",{key:1,class:Ee(y.value)},[yt(D.$slots,"active",{},()=>[e.activeIcon?(se(),et(U(zt),{key:0},{default:nt(()=>[(se(),et(yr(e.activeIcon)))]),_:1})):Ye("v-if",!0),!e.activeIcon&&e.activeText?(se(),Oe("span",{key:1,"aria-hidden":!w.value},at(e.activeText),9,fwe)):Ye("v-if",!0)])],2)):Ye("v-if",!0)],2))}});const hwe=on(dwe);function pwe(e,t){let r;const n=Ue(!1),a=jr({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(g){a.text=g}function s(){const g=a.parent,y=b.ns;if(!g.vLoadingAddClassList){let _=g.getAttribute("loading-number");_=Number.parseInt(_)-1,_?g.setAttribute("loading-number",_.toString()):(gl(g,y.bm("parent","relative")),g.removeAttribute("loading-number")),gl(g,y.bm("parent","hidden"))}l(),v.unmount()}function l(){var g,y;(y=(g=b.$el)==null?void 0:g.parentNode)==null||y.removeChild(b.$el)}function f(){var g;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(r),r=setTimeout(d,400),a.visible=!1,(g=e.closed)==null||g.call(e))}function d(){if(!n.value)return;const g=a.parent;n.value=!1,g.vLoadingAddClassList=void 0,s()}const v=YF(_t({name:"ElLoading",setup(g,{expose:y}){const{ns:_,zIndex:T}=az("loading");return y({ns:_,zIndex:T}),()=>{const w=a.spinner||a.svg,M=Ht("svg",{class:"circular",viewBox:a.svgViewBox?a.svgViewBox:"0 0 50 50",...w?{innerHTML:w}:{}},[Ht("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=a.text?Ht("p",{class:_.b("text")},[a.text]):void 0;return Ht(yo,{name:_.b("fade"),onAfterLeave:d},{default:nt(()=>[cr(rt("div",{style:{backgroundColor:a.background||""},class:[_.b("mask"),a.customClass,_.is("fullscreen",a.fullscreen)]},[Ht("div",{class:_.b("spinner")},[M,k])]),[[Zr,a.visible]])])})}}}));Object.assign(v._context,t??{});const b=v.mount(document.createElement("div"));return{...ho(a),setText:i,removeElLoadingChild:l,close:f,handleAfterLeave:d,vm:b,get $el(){return b.$el}}}let Cv;const HS=function(e={},t){if(!Jr)return;const r=vwe(e);if(r.fullscreen&&Cv)return Cv;const n=pwe({...r,closed:()=>{var i;(i=r.closed)==null||i.call(r),r.fullscreen&&(Cv=void 0)}},t??HS._context);mwe(r,r.parent,n),pH(r,r.parent,n),r.parent.vLoadingAddClassList=()=>pH(r,r.parent,n);let a=r.parent.getAttribute("loading-number");return a?a=`${Number.parseInt(a)+1}`:a="1",r.parent.setAttribute("loading-number",a),r.parent.appendChild(n.$el),Lt(()=>n.visible.value=r.visible),r.fullscreen&&(Cv=n),n},vwe=e=>{var t,r,n,a;let i;return qt(e.target)?i=(t=document.querySelector(e.target))!=null?t:document.body:i=e.target||document.body,{parent:i===document.body||e.body?document.body:i,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:i===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(a=e.visible)!=null?a:!0,beforeClose:e.beforeClose,closed:e.closed,target:i}},mwe=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(e.fullscreen)r.originalPosition.value=wu(document.body,"position"),r.originalOverflow.value=wu(document.body,"overflow"),a.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=wu(document.body,"position"),await Lt();for(const i of["top","left"]){const s=i==="top"?"scrollTop":"scrollLeft";a[i]=`${e.target.getBoundingClientRect()[i]+document.body[s]+document.documentElement[s]-Number.parseInt(wu(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${e.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=wu(t,"position");for(const[i,s]of Object.entries(a))r.$el.style[i]=s},pH=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?gl(t,n.bm("parent","relative")):bu(t,n.bm("parent","relative")),e.fullscreen&&e.lock?bu(t,n.bm("parent","hidden")):gl(t,n.bm("parent","hidden"))};HS._context=null;const gd=Symbol("ElLoading"),Tl=e=>`element-loading-${Ra(e)}`,vH=(e,t)=>{var r,n,a,i;const s=t.instance,l=g=>xt(t.value)?t.value[g]:void 0,f=g=>{const y=qt(g)&&s?.[g]||g;return Ue(y)},d=g=>f(l(g)||e.getAttribute(Tl(g))),h=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,v={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:h,target:(n=l("target"))!=null?n:h?void 0:e,body:(a=l("body"))!=null?a:t.modifiers.body,lock:(i=l("lock"))!=null?i:t.modifiers.lock},b=HS(v);b._context=jS._context,e[gd]={options:v,instance:b}},gwe=(e,t)=>{for(const r of Object.keys(e))Er(e[r])&&(e[r].value=t[r])},jS={mounted(e,t){t.value&&vH(e,t)},updated(e,t){const r=e[gd];if(!t.value){r?.instance.close(),e[gd]=null;return}r?gwe(r.options,xt(t.value)?t.value:{text:e.getAttribute(Tl("text")),svg:e.getAttribute(Tl("svg")),svgViewBox:e.getAttribute(Tl("svgViewBox")),spinner:e.getAttribute(Tl("spinner")),background:e.getAttribute(Tl("background")),customClass:e.getAttribute(Tl("customClass"))}):vH(e,t)},unmounted(e){var t;(t=e[gd])==null||t.instance.close(),e[gd]=null}};jS._context=null;const mH=["primary","success","info","warning","error"],ywe=$t({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fn},id:{type:String,default:""},message:{type:ft([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:ft(Function),default:()=>{}},onClose:{type:ft(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...mH,""],default:""},zIndex:Number,closeIcon:{type:fn,default:q0}}),bwe={destroy:()=>!0},wwe=["id"],_we=["textContent"],Ewe={key:0},Swe=["innerHTML"];var Cwe=_t({name:"ElNotification",__name:"notification",props:ywe,emits:bwe,setup(e,{expose:t}){const r=e,{ns:n,zIndex:a}=az("notification"),{nextZIndex:i,currentZIndex:s}=a,l=Ue(!1);let f;const d=be(()=>{const M=r.type;return M&&$0[r.type]?n.m(M):""}),h=be(()=>r.type&&$0[r.type]||r.icon),v=be(()=>r.position.endsWith("right")?"right":"left"),b=be(()=>r.position.startsWith("top")?"top":"bottom"),g=be(()=>{var M;return{[b.value]:`${r.offset}px`,zIndex:(M=r.zIndex)!=null?M:s.value}});function y(){r.duration>0&&({stop:f}=LE(()=>{l.value&&T()},r.duration))}function _(){f?.()}function T(){l.value=!1}function w(M){switch(ga(M)){case Ut.delete:case Ut.backspace:_();break;case Ut.esc:l.value&&T();break;default:y();break}}return lr(()=>{y(),i(),l.value=!0}),Fi(document,"keydown",w),t({visible:l,close:T}),(M,k)=>(se(),et(yo,{name:U(n).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:k[1]||(k[1]=B=>M.$emit("destroy")),persisted:""},{default:nt(()=>[cr(Pe("div",{id:e.id,class:Ee([U(n).b(),e.customClass,v.value]),style:Pr(g.value),role:"alert",onMouseenter:_,onMouseleave:y,onClick:k[0]||(k[0]=(...B)=>e.onClick&&e.onClick(...B))},[h.value?(se(),et(U(zt),{key:0,class:Ee([U(n).e("icon"),d.value])},{default:nt(()=>[(se(),et(yr(h.value)))]),_:1},8,["class"])):Ye("v-if",!0),Pe("div",{class:Ee(U(n).e("group"))},[Pe("h2",{class:Ee(U(n).e("title")),textContent:at(e.title)},null,10,_we),cr(Pe("div",{class:Ee(U(n).e("content")),style:Pr(e.title?void 0:{margin:0})},[yt(M.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(se(),Oe(Mt,{key:1},[Ye(" Caution here, message could've been compromised, never use user's input as message "),Pe("p",{innerHTML:e.message},null,8,Swe)],2112)):(se(),Oe("p",Ewe,at(e.message),1))])],6),[[Zr,e.message]]),e.showClose?(se(),et(U(zt),{key:0,class:Ee(U(n).e("closeBtn")),onClick:br(T,["stop"])},{default:nt(()=>[(se(),et(yr(e.closeIcon)))]),_:1},8,["class"])):Ye("v-if",!0)],2)],46,wwe),[[Zr,l.value]])]),_:3},8,["name","onBeforeLeave"]))}});const Fu={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Mv=16;let Mwe=1;const Al=function(e={},t){if(!Jr)return{close:()=>{}};(qt(e)||wn(e))&&(e={message:e});const r=e.position||"top-right";let n=e.offset||0;Fu[r].forEach(({vm:h})=>{var v;n+=(((v=h.el)==null?void 0:v.offsetHeight)||0)+Mv}),n+=Mv;const a=`notification_${Mwe++}`,i=e.onClose,s={...e,offset:n,id:a,onClose:()=>{Twe(a,r,i)}};let l=document.body;Ha(e.appendTo)?l=e.appendTo:qt(e.appendTo)&&(l=document.querySelector(e.appendTo)),Ha(l)||(pr("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),l=document.body);const f=document.createElement("div"),d=rt(Cwe,s,At(s.message)?s.message:wn(s.message)?()=>s.message:null);return d.appContext=Li(t)?Al._context:t,d.props.onDestroy=()=>{GF(null,f)},GF(d,f),Fu[r].push({vm:d}),l.appendChild(f.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};mH.forEach(e=>{Al[e]=(t={},r)=>((qt(t)||wn(t))&&(t={message:t}),Al({...t,type:e},r))});function Twe(e,t,r){const n=Fu[t],a=n.findIndex(({vm:d})=>{var h;return((h=d.component)==null?void 0:h.props.id)===e});if(a===-1)return;const{vm:i}=n[a];if(!i)return;r?.(i);const s=i.el.offsetHeight,l=t.split("-")[0];n.splice(a,1);const f=n.length;if(!(f<1))for(let d=a;d<f;d++){const{el:h,component:v}=n[d].vm,b=Number.parseInt(h.style[l],10)-s-Mv;v.props.offset=b}}function Awe(){for(const e of Object.values(Fu))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}function Iwe(e="top-right"){var t,r,n,a;let i=((n=(r=(t=Fu[e][0])==null?void 0:t.vm.component)==null?void 0:r.props)==null?void 0:n.offset)||0;for(const{vm:s}of Fu[e])s.component.props.offset=i,i+=(((a=s.el)==null?void 0:a.offsetHeight)||0)+Mv}Al.closeAll=Awe,Al.updateOffsets=Iwe,Al._context=null;const Gr=cpe(Al,"$notify");/*! Element Plus v2.13.3 */var kwe={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};/*! Element Plus v2.13.3 */var Rwe={name:"es",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"Confirmar",clear:"Despejar",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Ahora",today:"Hoy",cancel:"Cancelar",clear:"Despejar",confirm:"Confirmar",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Seleccionar fecha",selectTime:"Seleccionar hora",startDate:"Fecha Incial",startTime:"Hora Inicial",endDate:"Fecha Final",endTime:"Hora Final",prevYear:"A\xF1o Anterior",nextYear:"Pr\xF3ximo A\xF1o",prevMonth:"Mes Anterior",nextMonth:"Pr\xF3ximo Mes",year:"",month1:"enero",month2:"febrero",month3:"marzo",month4:"abril",month5:"mayo",month6:"junio",month7:"julio",month8:"agosto",month9:"septiembre",month10:"octubre",month11:"noviembre",month12:"diciembre",weeks:{sun:"dom",mon:"lun",tue:"mar",wed:"mi\xE9",thu:"jue",fri:"vie",sat:"s\xE1b"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"ene",feb:"feb",mar:"mar",apr:"abr",may:"may",jun:"jun",jul:"jul",aug:"ago",sep:"sep",oct:"oct",nov:"nov",dec:"dic"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Cargando",noMatch:"No hay datos que coincidan",noData:"Sin datos",placeholder:"Seleccionar"},mention:{loading:"Cargando"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No hay datos que coincidan",loading:"Cargando",placeholder:"Seleccionar",noData:"Sin datos"},pagination:{goto:"Ir a",pagesize:"/p\xE1gina",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"Aceptar",cancel:"Cancelar",error:"Entrada inv\xE1lida",close:"Close this dialog"},upload:{deleteTip:"Pulse Eliminar para retirar",delete:"Eliminar",preview:"Vista Previa",continue:"Continuar"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"Sin Datos",confirmFilter:"Confirmar",resetFilter:"Reiniciar",clearFilter:"Despejar",sumText:"Suma",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"Sin Datos"},transfer:{noMatch:"No hay datos que coincidan",noData:"Sin datos",titles:["Lista 1","Lista 2"],filterPlaceholder:"Ingresar palabra clave",noCheckedFormat:"{total} art\xEDculos",hasCheckedFormat:"{checked}/{total} revisados"},image:{error:"HA FALLADO"},pageHeader:{title:"Volver"},popconfirm:{confirmButtonText:"Si",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Bwe={key:0,width:"30",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Owe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",fill:"none"},Nwe={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},Pwe={key:3,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},Dwe={key:4,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},Lwe={key:5,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},xwe={key:6,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},Fwe={key:7,xmlns:"http://www.w3.org/2000/svg",width:"22",height:"23",fill:"none",stroke:"#969eab","stroke-width":"3","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},qwe={key:8,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},$we={key:9,xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",stroke:"#666e7b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","xmlns:v":"https://vecta.io/nano"},Uwe={key:10,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"#abb6c8","stroke-width":"1.5","xmlns:v":"https://vecta.io/nano"},Xn=_t({__name:"CustomIcon",props:{icon:{}},setup(e){const t=e;return(r,n)=>t.icon==="back"?(se(),Oe("svg",Bwe,n[0]||(n[0]=[Pe("path",{d:"M2 14.219h26.5M2 13.781 13.781 2M2 14.219 13.781 26",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):t.icon==="close"?(se(),Oe("svg",Owe,n[1]||(n[1]=[Pe("path",{d:"m2 2 18.738 18.738M2.12 21.107 20.857 2.37",stroke:"#000","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):t.icon==="error"?(se(),Oe("svg",Nwe,n[2]||(n[2]=[Pe("circle",{cx:"25",cy:"25",r:"25",fill:"#d75a4a"},null,-1),Pe("path",{fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-miterlimit":"10",d:"M16 34l9-9 9-9M16 16l9 9 9 9"},null,-1)]))):t.icon==="eye"?(se(),Oe("svg",Pwe,n[3]||(n[3]=[Pe("path",{d:"M12 9q1.219 0 2.109.891T15 12t-.891 2.109T12 15t-2.109-.891T9 12t.891-2.109T12 9zm0 8.016q2.063 0 3.539-1.477T17.016 12t-1.477-3.539T12 6.984 8.461 8.461 6.984 12t1.477 3.539T12 17.016zM12 4.5q3.703 0 6.703 2.063t4.313 5.438q-1.313 3.375-4.313 5.438T12 19.502t-6.703-2.063-4.313-5.438q1.313-3.375 4.313-5.438T12 4.5z"},null,-1)]))):t.icon==="eye-slash"?(se(),Oe("svg",Dwe,n[4]||(n[4]=[Pe("path",{d:"M11.859 9H12q1.219 0 2.109.891T15 12v.188zm-4.312.797Q6.984 10.922 6.984 12q0 2.063 1.477 3.539T12 17.016q1.078 0 2.203-.563l-1.547-1.547Q12.281 15 12 15q-1.219 0-2.109-.891T9 12q0-.281.094-.656zM2.016 4.266L3.282 3l17.719 17.719-1.266 1.266q-.234-.234-1.477-1.453t-1.898-1.875q-2.016.844-4.359.844-3.703 0-6.703-2.063T.985 12q.516-1.219 1.617-2.695t2.133-2.273q-.563-.563-1.57-1.594T2.017 4.266zM12 6.984q-.938 0-1.828.375L8.016 5.203Q9.844 4.5 12 4.5q3.703 0 6.68 2.063t4.289 5.438q-1.125 2.766-3.422 4.734l-2.906-2.906q.375-.891.375-1.828 0-2.063-1.477-3.539T12 6.985z"},null,-1)]))):t.icon==="files"?(se(),Oe("svg",Lwe,n[5]||(n[5]=[Pe("path",{d:"M21 28H7a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10l5 5v14a1 1 0 0 1-1 1Z"},null,-1),Pe("path",{d:"M10 8V5a1 1 0 0 1 1-1h10l5 5v14a1 1 0 0 1-1 1h-3m-11-5h6m-6 4h6","stroke-linecap":"round"},null,-1)]))):t.icon==="lock"?(se(),Oe("svg",xwe,n[6]||(n[6]=[Pe("path",{d:"M16 20a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zm0 0v3"},null,-1),Pe("path",{d:"M26 11H6a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V12a1 1 0 0 0-1-1ZM11.5 11V6.5a4.5 4.5 0 1 1 9 0V11"},null,-1)]))):t.icon==="search"?(se(),Oe("svg",Fwe,n[7]||(n[7]=[Pe("circle",{cx:"9.451",cy:"9.451",r:"7.451"},null,-1),Pe("path",{d:"M13.921 15.412 19.51 21","stroke-linecap":"round"},null,-1)]))):t.icon==="success"?(se(),Oe("svg",qwe,n[8]||(n[8]=[Pe("circle",{cx:"25",cy:"25",r:"25",fill:"#25ae88"},null,-1),Pe("path",{fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":"10",d:"M38 15L22 33l-10-8"},null,-1)]))):t.icon==="users"?(se(),Oe("svg",$we,n[9]||(n[9]=[Pe("path",{d:"M16 22.5a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm8.5-8a7.475 7.475 0 0 1 6 3m-29 0a7.474 7.474 0 0 1 6-3"},null,-1),Pe("path",{d:"M8.8 27a8.012 8.012 0 0 1 14.4 0M7.5 14.5a4 4 0 1 1 3.925-4.75m9.15 0A4 4 0 1 1 24.5 14.5"},null,-1)]))):t.icon==="x-circle"?(se(),Oe("svg",Uwe,n[10]||(n[10]=[Pe("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z","stroke-miterlimit":"10"},null,-1),Pe("path",{d:"M15 9l-6 6m6 0L9 9","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):Ye("",!0)}}),zwe=["src"],Vwe=_t({__name:"AppLoader",props:{avatar:{default:void 0},grow:{type:Boolean,default:!0},icon:{default:void 0},message:{default:void 0},size:{default:"small"},title:{default:void 0},type:{default:"loading"}},emits:["imagesLoaded","imagesLoading"],setup(e,{emit:t}){const r=e,n=t;return lr(()=>{r.avatar&&n("imagesLoading")}),(a,i)=>(se(),Oe("div",{class:Ee([a.$style["loader-body"],[a.$style[`loader-${a.size}`]],[a.$style[`loader-${a.type}`]],{[a.$style["loader-no-grow"]]:a.grow===!1}])},[Pe("div",{class:Ee(a.$style["loader-container"])},[Pe("div",{class:Ee(a.$style["loader-inner"])},[Pe("div",{class:Ee(a.$style["loader-mask"])},[a.avatar?(se(),Oe("img",{key:0,alt:"",src:a.avatar,width:"1",height:"1",onLoad:i[0]||(i[0]=()=>n("imagesLoaded"))},null,40,zwe)):Ye("",!0),a.icon?(se(),et(Xn,{key:1,icon:a.icon},null,8,["icon"])):Ye("",!0)],2)],2),Pe("div",{class:Ee(a.$style.loader)},i[1]||(i[1]=[Pe("span",null,null,-1)]),2)],2),a.title?(se(),Oe("h2",{key:0,class:Ee(a.$style["loader-title"])},at(a.title),3)):Ye("",!0),a.message?(se(),Oe("p",{key:1,class:Ee(a.$style["loader-message"])},at(a.message),3)):Ye("",!0)],2))}}),Hwe={loader:"pb-w-sync_loader","loader-container-animation":"pb-w-sync_loader-container-animation","loader-clip-animation":"pb-w-sync_loader-clip-animation","loader-bar-animation":"pb-w-sync_loader-bar-animation","loader-body":"pb-w-sync_loader-body","loader-error":"pb-w-sync_loader-error","loader-title":"pb-w-sync_loader-title","loader-success":"pb-w-sync_loader-success","loader-large":"pb-w-sync_loader-large","loader-container":"pb-w-sync_loader-container","loader-inner":"pb-w-sync_loader-inner","loader-loading":"pb-w-sync_loader-loading","loader-no-grow":"pb-w-sync_loader-no-grow","loader-small":"pb-w-sync_loader-small","loader-mask":"pb-w-sync_loader-mask","loader-message":"pb-w-sync_loader-message"},Sn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},ws=Sn(Vwe,[["__cssModules",{$style:Hwe}]]),jwe=["disabled"],Kwe=Sn(_t({__name:"AccountsSelection",props:{avatar:{default:void 0},buttonDisabledStyle:{type:Boolean,default:!1},client:{},credential:{},disableFormAutocomplete:{type:Boolean,default:!1},getSelectedAccounts:{type:Function,default:void 0},sync:{}},emits:["done"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s=Ue([]),l=Ue(null),f=Ue(!1),d=jr({accounts:[]}),h=Ue(!0),v=Ue(!0),b=jr({accounts:[{type:"array",required:!0,message:i("accounts_selection.form_error"),trigger:"change"}]});let g;function y(){r.getSelectedAccounts?r.getSelectedAccounts(r.credential).then(D=>{g=D,s.value.length>0&&M()}).catch(()=>{g=[],s.value.length>0&&M()}):g=[],w()}function _(){let D=s.value.reduce((N,O)=>(N={...N,[O.id_account]:!1},N),{});return d.accounts.forEach(N=>{D[N]=!0}),D}function T(D){return`**${D.slice(-4)}`}function w(){const D=setInterval(()=>{r.sync.getAccounts({id_credential:r.credential}).then(N=>{N.length>0&&s.value.length===0&&(clearInterval(D),s.value=N,g&&M())}).catch(()=>{clearInterval(D),v.value=!1,f.value=!0,a("accounts-error")})},2e3)}function M(){g.length>0&&(d.accounts=g.filter(D=>s.value.some(N=>N.id_account===D))),d.accounts.length===0&&s.value.length>0&&(d.accounts=s.value.map(D=>D.id_account)),v.value=!1}const k=async(D,N)=>{D.preventDefault(),N&&await N.validate(O=>{O&&(a("accounts-selected",_()),n("done"))})};function B(D,N){h.value=!N}return y(),(D,N)=>(se(),Oe("div",{class:Ee([D.$style["accounts-selection"],{[D.$style["accounts-api-error"]]:f.value}])},[v.value||f.value?(se(),et(ws,{key:0,avatar:r.avatar,grow:!f.value,message:f.value?U(i)("accounts_selection.error"):U(i)("accounts_selection.fetching"),size:"large",title:U(i)("accounts_selection.fetching"),type:f.value?"error":"loading",onImagesLoaded:N[0]||(N[0]=()=>U(a)("images-loaded")),onImagesLoading:N[1]||(N[1]=()=>U(a)("images-loading"))},null,8,["avatar","grow","message","title","type"])):(se(),et(U(xS),{key:1,ref_key:"accountsFormRef",ref:l,class:Ee(D.$style["accounts-form"]),autocomplete:D.disableFormAutocomplete?"off":"on",disabled:v.value,"hide-required-asterisk":!0,"label-position":"top",model:d,name:"accounts-selection",rules:b,onSubmit:N[3]||(N[3]=O=>k(O,l.value)),onValidate:B},{default:nt(()=>[rt(U(FS),{label:r.client.name?U(i)("accounts_selection.form_label_client",{client:r.client.name}):U(i)("accounts_selection.form_label"),prop:"accounts"},{default:nt(()=>[rt(U(Pge),{modelValue:d.accounts,"onUpdate:modelValue":N[2]||(N[2]=O=>d.accounts=O),class:Ee(D.$style["accounts-checkboxes"])},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(s.value,O=>(se(),et(U(Nge),{key:O.id_account,class:Ee(D.$style["accounts-checkbox"]),name:"accounts",value:O.id_account},{default:nt(()=>[Pe("div",{class:Ee(D.$style["accounts-checkbox-content"])},[Pe("div",null,at(O.account_type),1),Pe("div",{class:Ee(D.$style["accounts-checkbox-row"])},[Pe("div",null,at(T(O.number)),1),Pe("div",null,[rt(U(iwe),{class:Ee(D.$style["accounts-balance"]),value:O.balance,precision:2},null,8,["class","value"]),dr(" "+at(O.currency),1)])],2)],2)]),_:2},1032,["class","value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["label"]),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"accounts-button",disabled:D.buttonDisabledStyle&&h.value,type:"submit"},at(U(i)("accounts_selection.done")),9,jwe)]),_:1},8,["class","autocomplete","disabled","model","rules"])),f.value?(se(),Oe("div",{key:2,class:Ee(D.$style["accounts-error-button-container"])},[Pe("button",{class:"pb-w-sync_primary-button","data-testid":"accounts-button",type:"button",onClick:N[4]||(N[4]=()=>n("done"))},at(U(i)("accounts_selection.done")),1)],2)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"accounts-balance":"pb-w-sync_accounts-balance","accounts-checkbox":"pb-w-sync_accounts-checkbox","accounts-checkbox-content":"pb-w-sync_accounts-checkbox-content","accounts-checkbox-row":"pb-w-sync_accounts-checkbox-row","accounts-checkboxes":"pb-w-sync_accounts-checkboxes","accounts-error-button-container":"pb-w-sync_accounts-error-button-container","accounts-form":"pb-w-sync_accounts-form","accounts-selection":"pb-w-sync_accounts-selection","accounts-api-error":"pb-w-sync_accounts-api-error"}}]]),Wwe=Sn(_t({__name:"FinalResponse",props:{avatar:{},displayAccountsSelection:{type:Boolean},displayAddAnotherButton:{type:Boolean},longMessage:{default:""},message:{default:""},showLogo:{type:Boolean},type:{default:"error"}},emits:["add-other","select-accounts"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn();return(s,l)=>(se(),Oe("div",{class:Ee(s.$style["final-response-container"])},[rt(ws,{avatar:s.showLogo?s.avatar:void 0,grow:!1,icon:s.showLogo?void 0:s.type,message:s.longMessage,size:"large",title:s.message,type:s.type,onImagesLoaded:l[0]||(l[0]=()=>U(a)("images-loaded")),onImagesLoading:l[1]||(l[1]=()=>U(a)("images-loading"))},null,8,["avatar","icon","message","title","type"]),s.displayAddAnotherButton&&(!r.displayAccountsSelection||r.type==="error")?(se(),Oe("button",{key:0,class:"pb-w-sync_primary-button",onClick:l[2]||(l[2]=f=>n("add-other"))},at(U(i)("common.add_other")),1)):Ye("",!0),r.displayAccountsSelection&&r.type==="success"?(se(),Oe("button",{key:1,class:"pb-w-sync_primary-button",onClick:l[3]||(l[3]=f=>n("select-accounts"))},at(U(i)("common.continue")),1)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"final-response-container":"pb-w-sync_final-response-container"}}]]),Gwe=["src"],Ywe=["src"],Zwe=["onClick"],Jwe=Sn(_t({__name:"InstitutionFilters",props:{countryId:{},filteredCountries:{},filteredOrganizationTypes:{},showCountries:{type:Boolean},organizationTypeId:{},selectClass:{}},emits:["update:countryId","update:organizationTypeId"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=be(()=>l(r.filteredCountries.find(d=>d.id_country===r.countryId)));function s(d){en("open_country",{id_country:d}),n("update:countryId",d)}function l(d){return`https://hatscripts.github.io/circle-flags/flags/${d.code.toLocaleLowerCase()}.svg`}function f(d){en("open_site_organization_type",{id_site_organization_type:d}),n("update:organizationTypeId",d)}return(d,h)=>(se(),Oe(Mt,null,[Pe("p",{class:Ee(d.$style["institution-filters-intro"])},at(U(a)("common.intro")),3),d.showCountries?(se(),et(U(nv),{key:0,class:Ee(d.$style["widget-country"]),"model-value":r.countryId,"popper-class":r.selectClass,onChange:s},{prefix:nt(()=>[Pe("img",{src:i.value,width:"44",height:"44",alt:""},null,8,Gwe)]),default:nt(()=>[(se(!0),Oe(Mt,null,ur(d.filteredCountries,v=>(se(),et(U(iv),{key:v.id_country,class:Ee(d.$style["widget-country-option"]),value:v.id_country,label:v.name},{default:nt(()=>[Pe("img",{src:l(v),width:"44",height:"44",alt:""},null,8,Ywe),Pe("span",null,at(v.name),1)]),_:2},1032,["class","value","label"]))),128))]),_:1},8,["class","model-value","popper-class"])):Ye("",!0),Pe("div",{class:Ee(d.$style["organization-types-list"])},[(se(!0),Oe(Mt,null,ur(d.filteredOrganizationTypes,v=>(se(),Oe("button",{key:v.id_site_organization_type,onClick:()=>f(v.id_site_organization_type)},at(U(a)(`common.${v.label}`)),9,Zwe))),128))],2)],64))}}),[["__cssModules",{$style:{"institution-filters-intro":"pb-w-sync_institution-filters-intro","organization-types-list":"pb-w-sync_organization-types-list","widget-country":"pb-w-sync_widget-country","widget-country-option":"pb-w-sync_widget-country-option"}}]]),Xwe=["onClick"],Qwe=["alt","src"],e_e={key:1},t_e=Sn(_t({__name:"OrganizationSitesList",props:{assetsPath:{default:"https://s.paybook.com"},items:{default:()=>[]},showLogo:{type:Boolean,default:!0},showPlaidSitesButton:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s=Ue("");let l=0;const f=be(()=>{const v=s.value.toLocaleLowerCase();return r.items.map(b=>({...b,show:v===""?!0:b.name.toLocaleLowerCase().includes(v)}))});lr(()=>{r.items.length>0&&r.showLogo&&(l=0,a("images-loading"))}),Et(()=>r.items,v=>{v.length>0&&r.showLogo&&(l=0,a("images-loading"))});function d(){l++,l===r.items.length&&a("images-loaded")}function h(v){n("select",v)}return(v,b)=>v.showPlaidSitesButton?(se(),Oe("div",{key:0,class:Ee(v.$style["widget-plaid-container"])},[Pe("button",{class:"pb-w-sync_primary-button",onClick:b[0]||(b[0]=()=>U(a)("__internal__.plaid-sites-clicked"))},at(U(i)("common.find_your_institution")),1)],2)):(se(),Oe(Mt,{key:1},[rt(U(Ga),{modelValue:s.value,"onUpdate:modelValue":b[1]||(b[1]=g=>s.value=g),"data-testid":"search-organization",placeholder:U(i)("common.search")},{prefix:nt(()=>[rt(Xn,{icon:"search"})]),_:1},8,["modelValue","placeholder"]),Pe("div",{class:Ee(v.$style["organization-sites"])},[(se(!0),Oe(Mt,null,ur(f.value,(g,y)=>cr((se(),Oe("button",{key:`${g.id_site_organization}-${y}`,class:Ee(v.$style["organization-button"]),type:"button",onClick:()=>h(g)},[v.showLogo?(se(),Oe("img",{key:0,alt:g.name,src:`${v.assetsPath}${g.small_cover}`,loading:"lazy",height:"66",width:"220",onLoad:d},null,40,Qwe)):(se(),Oe("span",e_e,at(g.name),1))],10,Xwe)),[[Zr,g.show]])),128))],2)],64))}}),[["__cssModules",{$style:{"widget-plaid-container":"pb-w-sync_widget-plaid-container","organization-sites":"pb-w-sync_organization-sites","organization-button":"pb-w-sync_organization-button"}}]]),r_e={key:0},n_e=["src"],i_e=["src"],a_e=["href"],o_e=Sn(_t({__name:"PrivacyPolicy",props:{client:{}},emits:["continue"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),{t:i}=Kn(),s="https://www.paybook.com/lib/syncfy/";let l=0;lr(()=>{a("images-loading")});function f(){a("privacy-accepted"),n("continue")}function d(){l++,(l===1&&!r.client.logo||l===2)&&a("images-loaded")}return(h,v)=>(se(),Oe("div",{class:Ee(h.$style["privacy-container"])},[v[1]||(v[1]=Pe("div",null,null,-1)),Pe("div",{class:Ee(h.$style["privacy-center"])},[Pe("div",{class:Ee([h.$style["privacy-images"],{[h.$style["with-client-logo"]]:r.client.logo}])},[r.client.logo?(se(),Oe("div",r_e,[Pe("img",{src:r.client.logo,alt:"",onLoad:d},null,40,n_e)])):Ye("",!0),Pe("div",null,[Pe("img",{src:`${U(s)}blog/syncfy-icon.svg`,alt:"",width:"190",height:"43",onLoad:d},null,40,i_e)])],2),Pe("h1",null,at(r.client.name?U(i)("privacy.title_client",{client:r.client.name}):U(i)("privacy.title")),1),Pe("ul",null,[Pe("li",null,[rt(Xn,{icon:"files"}),dr(" "+at(U(i)("privacy.list.first")),1)]),Pe("li",null,[rt(Xn,{icon:"lock"}),dr(" "+at(U(i)("privacy.list.second")),1)]),Pe("li",null,[rt(Xn,{icon:"users"}),dr(" "+at(U(i)("privacy.list.third")),1)])]),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"privacy-button",type:"button",onClick:f},at(U(i)("common.continue")),1),Pe("p",null,[dr(at(U(i)("privacy.message"))+"\xA0",1),Pe("a",{rel:"noopener",href:U(i)("privacy.url"),target:"_blank"},at(U(i)("privacy.link")),9,a_e),v[0]||(v[0]=dr(". ",-1))])],2),v[2]||(v[2]=Pe("div",null,null,-1))],2))}}),[["__cssModules",{$style:{"privacy-container":"pb-w-sync_privacy-container","privacy-center":"pb-w-sync_privacy-center","privacy-images":"pb-w-sync_privacy-images","with-client-logo":"pb-w-sync_with-client-logo"}}]]),s_e=["aria-label","checked"],l_e=["data-testid","href"],u_e=Sn(_t({__name:"ConsentNotice",props:{consent:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=be(()=>OY(r.consent));function s(l){n("update:modelValue",l.target.checked)}return(l,f)=>(se(),Oe("div",{class:Ee(l.$style["consent-container"]),"data-testid":"consent"},[Pe("label",{class:Ee(l.$style["consent-label"])},[Pe("input",{"aria-label":U(a)("consent.aria_label"),checked:r.modelValue,"data-testid":"consent-checkbox",type:"checkbox",onChange:s},null,40,s_e),Pe("span",{class:Ee(l.$style["consent-text"]),"data-testid":"consent-text"},[(se(!0),Oe(Mt,null,ur(i.value,(d,h)=>(se(),Oe(Mt,{key:h},[d.document?(se(),Oe("a",{key:0,"data-testid":`consent-document-${d.document.role}`,href:d.document.url,rel:"noopener noreferrer",target:"_blank",onClick:f[0]||(f[0]=br(()=>{},["stop"]))},at(d.text),9,l_e)):(se(),Oe(Mt,{key:1},[dr(at(d.text),1)],64))],64))),128))],2)],2)],2))}}),[["__cssModules",{$style:{"consent-container":"pb-w-sync_consent-container","consent-label":"pb-w-sync_consent-label","consent-text":"pb-w-sync_consent-text"}}]]),c_e=["for"],f_e=["aria-label"],d_e=["accept","name"],h_e=Sn(_t({__name:"FileInput",props:{credential:{},displayError:{type:Boolean},idSite:{}},emits:["input","validate"],setup(e,{emit:t}){const r=e,n=t,{t:a}=Kn(),i=Ue(null),s=Ue(null),l=Ue(!1),f=Ue(!1),d=be(()=>h.value.join(",")),h=be(()=>{const k=[],B=[];let D="";return r.credential.accept&&r.credential.accept.forEach(N=>{k.push(`.${N.extension}`),k.push(N.mime_type)}),k.sort(),k.forEach(N=>{N!==D&&(B.push(N),D=N)}),B}),v=be(()=>l.value&&!s.value&&!f.value),b=be(()=>{const k=h.value.filter(B=>B[0]===".");return k.length>1?a("file.invalid_multiple",{extensions:k.join(", ")}):a("file.invalid",{extension:k[0]})});Et(()=>r.displayError,k=>{k&&(l.value=!0)});function g(k){const B=new FileReader;B.onload=D=>{s.value={file:D.target.result,info:{type:k.type,name:k.name}},n("input",D.target.result)},B.readAsDataURL(k)}function y(k){k.preventDefault(),k.dataTransfer.files[0]&&g(k.dataTransfer.files[0])}function _(k){f.value=!1;const B=k.target.files[0],D=k.srcElement.value;k.preventDefault(),k.stopPropagation(),D.length>0?h.value.length===0||h.value.includes(B.type)||h.value.includes(`.${D.split(".").pop()}`)?(n("validate",!0),g(B)):B.value||(f.value=!0,n("validate",!1)):B.value||n("validate",!1)}function T(k){k.stopPropagation(),k.preventDefault(),setTimeout(()=>{l.value=!0},2e3)}function w(k){k.stopPropagation(),s.value=null,i.value.value=null,n("input",null)}function M(k){k.preventDefault(),i.value.click(),setTimeout(()=>{l.value=!0},5e3)}return(k,B)=>(se(),Oe("div",{class:Ee(k.$style["upload-document"])},[Pe("div",{class:Ee(k.$style["upload-document-input"]),onClick:B[1]||(B[1]=D=>M(D)),onDrop:B[2]||(B[2]=D=>y(D)),onDragover:B[3]||(B[3]=D=>T(D))},[Pe("label",{class:Ee(k.$style["upload-document-label"]),for:`${r.idSite}[${r.credential.name}]`},at(r.credential.label),11,c_e),s.value?(se(),Oe("span",{key:0,class:Ee(k.$style["upload-document-name"])},[Pe("span",null,at(s.value?s.value.info.name:k.$t("file.no_chosen")),1),Pe("button",{"aria-label":U(a)("common.back"),class:Ee(k.$style["widget-back-button"]),onClick:B[0]||(B[0]=D=>w(D))},[rt(Xn,{icon:"x-circle"})],10,f_e)],2)):(se(),Oe("button",{key:1,class:Ee(k.$style["upload-document-button"])},at(k.$t("file.click")),3))],34),v.value?(se(),Oe("div",{key:0,class:Ee(k.$style["upload-document-required-error"])},at(r.credential.label)+"\xA0"+at(k.$t("file.required")),3)):Ye("",!0),f.value?(se(),Oe("div",{key:1,class:Ee(k.$style["upload-document-required-error"])},at(b.value),3)):Ye("",!0),Pe("input",{ref_key:"fileInput",ref:i,type:"file","data-testid":"file-input",accept:d.value,style:{position:"absolute",left:"-99999999px"},name:`${r.idSite}[${r.credential.name}]`,onClick:B[4]||(B[4]=D=>D.stopPropagation()),onChange:B[5]||(B[5]=D=>_(D))},null,40,d_e)],2))}}),[["__cssModules",{$style:{"upload-document":"pb-w-sync_upload-document","upload-document-button":"pb-w-sync_upload-document-button","upload-document-input":"pb-w-sync_upload-document-input","upload-document-label":"pb-w-sync_upload-document-label","upload-document-name":"pb-w-sync_upload-document-name","upload-document-required-error":"pb-w-sync_upload-document-required-error"}}]]);function yd(e){return e.version===1}function bd(e){return e.version===3}function KS(e){return e.version===4}const p_e={key:1},v_e=["alt","src"],m_e=["aria-label"],g_e={class:"el-form-item__error"},y_e=["disabled","title"],WS=Sn(_t({__name:"SiteForm",props:{assetsPath:{default:"https://s.paybook.com"},backUpConnection:{type:Boolean,default:!1},buttonDisabledStyle:{type:Boolean,default:!1},consent:{default:null},credentialService:{default:null},disableFormAutocomplete:{type:Boolean,default:!1},displayBackButton:{type:Boolean},errorMessage:{default:null},loaderMessage:{},selectClass:{default:""},showHeader:{type:Boolean,default:!0},showLogo:{type:Boolean,default:!0},showPasswordStyle:{default:"icon"},consentLoading:{type:Boolean,default:!1},requireConsent:{type:Boolean,default:!1},site:{},testMode:{type:Boolean,default:!1},updateMode:{type:Boolean,default:!1}},emits:["back","consent-rejected","error","success","valid"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),i=Ue("0"),s=Ue({...yd(r.site)?r.site.data:bd(r.site)?r.site.input[i.value].data:r.backUpConnection?r.site.backUpInput.data:r.site.input[i.value].data}),l=Ue(!1),f=Ue(!0),d=Ue(!1),h=Ue(!1),v=Ue(!1),b=Ue(!1);let g=0,y=null,_={};const T=Ue(null),w=Ue(null),M=be(()=>r.requireConsent&&!r.updateMode),k=be(()=>M.value&&(!r.consent||!l.value)),B=be(()=>k.value||(r.buttonDisabledStyle||M.value)&&f.value),D=be(()=>yd(r.site)?r.site.getFields(r.updateMode):bd(r.site)?r.site.getFields(Number.parseInt(i.value),r.updateMode):KS(r.site)?r.backUpConnection?r.site.getBackUpFields(r.updateMode):r.site.getFields(Number.parseInt(i.value),r.updateMode):null),N=be(()=>yd(r.site)?r.site.getRules(r.updateMode):bd(r.site)?r.site.getRules(Number.parseInt(i.value),r.updateMode):r.backUpConnection?r.site.getBackUpRules(r.updateMode):r.site.getRules(Number.parseInt(i.value),r.updateMode)),O=be(()=>r.site.config.version===3?r.site.config.input:KS(r.site)?r.backUpConnection?[r.site.backUpConnection]:r.site.connections:[]),{t:P}=Kn();xr(()=>{clearTimeout(y)}),lr(()=>{r.showLogo&&a("images-loading"),o(),c(),r.site.on("status-update",I=>{I==="loading"?d.value=!0:d.value=!1})});function L(I){return I.getTime()>Date.now()}function F(I){return!!s.value[I]}function S(){clearTimeout(y),r.testMode&&(g<2?(g++,y=setTimeout(()=>{g=0},500)):(r.site.toggleTestMode(),b.value=r.site.testMode,g=0))}function o(){T.value&&T.value[0]&&T.value[0].focus()}function u(I){return I.translate_error_label?P(I.translate_error_label):I.error_label?I.error_label:I.translate_label?P(I.translate_label):I.label}function p(){a("images-loaded")}function m(I){return I.enabled_by?s.value[I.enabled_by]:!0}function E(){r.site.status==="loading"&&(d.value=!0)}function A(I){r.site.updateData(Number.parseInt(i.value),s.value),i.value=I,s.value={...r.site.input[i.value].data},c(),Lt(()=>{o()})}const R=async(I,x)=>{I.preventDefault();let q;x&&(k.value||(r.site.setConsent(M.value?{accepted:l.value,text:r.consent.text}:null),await x.validate(H=>{H&&!f.value?(n("valid"),a("submitted"),r.updateMode?(q=r.credentialService.update(r.site,s.value,Number.parseInt(i.value),r.backUpConnection),d.value=!0):yd(r.site)?q=r.site.connect(s.value):bd(r.site)?q=r.site.connect(Number.parseInt(i.value),s.value):q=r.site.connect(Number.parseInt(i.value),s.value,r.backUpConnection),q.then(Y=>(n("success",Y),r.site.config.request||a("updated",r.site.response),Y)).catch(Y=>{const Q=M.value?PY(Y):null;if(Q){l.value=!1,d.value=!1,n("consent-rejected",Q);return}s.value={},c(),n("error",Y)})):v.value=!0})))};function C(I,x,q){q&&q.forEach(H=>{I?N.value[H].push({required:!0,message:"required"}):N.value[H]=N.value[H].filter(Y=>Y.message!=="required")})}function c(I,x){I&&(_[I]=x),f.value=Object.keys(N.value).reduce((q,H)=>N.value[H].length===0?q:q||!_[H],!1)}return E(),(I,x)=>d.value?(se(),Oe("div",{key:0,class:Ee(I.$style["widget-form-loader"])},[rt(ws,{avatar:I.showLogo?`${I.assetsPath}${I.site.config.site_organization.avatar}`:void 0,message:r.loaderMessage.long,title:r.loaderMessage.short,size:"large",onImagesLoaded:x[0]||(x[0]=()=>U(a)("images-loaded")),onImagesLoading:x[1]||(x[1]=()=>U(a)("images-loading"))},null,8,["avatar","message","title"])],2)):(se(),Oe("div",p_e,[Pe("div",{class:Ee(I.$style["site-form-header"])},[b.value?(se(),et(U(Xpe),{key:0,center:"",closable:!1,effect:"dark"},{default:nt(()=>[dr(at(U(P)("common.test_mode")),1)]),_:1})):Ye("",!0),I.showLogo&&I.showHeader?(se(),Oe("img",{key:1,alt:I.site.config.site_organization.name,class:Ee(I.$style["site-cover"]),src:`${I.assetsPath}${I.site.config.site_organization.cover}`,width:"1600",height:"480",onLoad:p},null,42,v_e)):Ye("",!0),I.showHeader?(se(),Oe("h2",{key:2,onClick:S},at(I.site.config.name),1)):Ye("",!0)],2),I.errorMessage?(se(),Oe("div",{key:0,class:Ee(I.$style["auth-error"])},[Pe("h3",null,at(I.errorMessage.short),1),Pe("p",null,at(I.errorMessage.long),1)],2)):Ye("",!0),O.value.length>1&&!r.backUpConnection?(se(),et(U(ewe),{key:1,"default-active":"0",mode:"horizontal",class:Ee(I.$style["site-tabs"]),ellipsis:!1,onSelect:A},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(O.value,(q,H)=>(se(),et(U(twe),{key:H,index:`${H}`},{default:nt(()=>[dr(at(q.label),1)]),_:2},1032,["index"]))),128))]),_:1},8,["class"])):Ye("",!0),rt(U(xS),{ref_key:"siteFormRef",ref:w,"data-testid":"site-form",autocomplete:I.disableFormAutocomplete?"off":"on",disabled:d.value,"hide-required-asterisk":!0,"label-position":"top",model:s.value,name:`${I.site.config.id_site}`,rules:N.value,onSubmit:x[6]||(x[6]=q=>R(q,w.value)),onValidate:c},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(D.value,(q,H)=>(se(),Oe(Mt,{key:`${H}-${q.name}`},[m(q)?(se(),Oe(Mt,{key:0},[q.type==="file"?(se(),et(h_e,{key:`${H}-${q.name}`,credential:q,"display-error":v.value,"id-site":I.site.config.id_site,onInput:Y=>s.value[q.name]=Y,onValidate:Y=>c(q.name,Y)},null,8,["credential","display-error","id-site","onInput","onValidate"])):(se(),et(U(FS),{key:1,class:Ee({[I.$style["site-switch"]]:q.type==="switch"}),label:q.translate_label?I.$t(q.translate_label):q.label||"",prop:q.name,for:`${I.site.config.id_site}[${q.name}]`},{error:nt(({error:Y})=>[Pe("div",g_e,at(U(P)(`form_errors.${Y}`,{label:u(q)})),1)]),default:nt(()=>[q.type==="text"||q.type==="password"?(se(),et(U(Ga),{key:0,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,"data-testid":"site-input",autocomplete:q.name==="password"?`${I.site.config.id_site} new-password`:I.disableFormAutocomplete?"off":`${I.site.config.id_site} ${q.name}`,name:`${I.site.config.id_site}[${q.name}]`,type:q.type==="password"&&h.value?"text":q.type},Tx({_:2},[q.type==="password"&&I.showPasswordStyle==="icon"?{name:"append",fn:nt(()=>[Pe("button",{class:Ee(I.$style["icon-eye"]),"aria-label":U(P)(`common.${h.value?"hide":"show_password"}`),type:"button",onClick:x[2]||(x[2]=()=>{h.value=!h.value})},[h.value?(se(),et(Xn,{key:0,icon:"eye-slash"})):(se(),et(Xn,{key:1,icon:"eye"}))],10,m_e)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","autocomplete","name","type"])):Ye("",!0),q.type==="select"?(se(),et(U(nv),{key:1,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,"data-testid":"site-select","popper-class":I.selectClass,autocomplete:I.disableFormAutocomplete?"off":`${I.site.config.id_site} ${q.name}`},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(q.options,(Y,Q)=>(se(),et(U(iv),{key:Q,value:Y.value,label:Y.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","popper-class","autocomplete"])):Ye("",!0),q.type==="switch"?(se(),et(U(hwe),{key:2,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,onInput:Y=>C(Y,q.name,q.enables)},null,8,["modelValue","onUpdate:modelValue","onInput"])):Ye("",!0),q.type==="date_range"?(se(),et(U(jye),{key:3,ref_for:!0,ref_key:"firstInput",ref:T,modelValue:s.value[q.name],"onUpdate:modelValue":Y=>s.value[q.name]=Y,type:"daterange","range-separator":"-","start-placeholder":I.$t("download_options.date_range_start"),"end-placeholder":I.$t("download_options.date_range_end"),"disabled-date":L},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):Ye("",!0)]),_:2},1032,["class","label","prop","for"])),q.type==="password"&&I.showPasswordStyle==="text"&&F(q.name)?(se(),et(U(gs),{key:`${H}-${q.name}-toggle`,class:Ee(I.$style["show-hide"]),"native-type":"button",onClick:x[3]||(x[3]=()=>{h.value=!h.value})},{default:nt(()=>[dr(at(U(P)(`common.${h.value?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Ye("",!0)],64)):Ye("",!0)],64))),128)),M.value&&I.consent?(se(),et(u_e,{key:0,modelValue:l.value,"onUpdate:modelValue":x[4]||(x[4]=q=>l.value=q),consent:I.consent},null,8,["modelValue","consent"])):M.value&&I.consentLoading?(se(),Oe("div",{key:1,class:Ee(I.$style["consent-placeholder"]),"data-testid":"consent-loading"},x[7]||(x[7]=[Pe("span",null,null,-1),Pe("span",null,null,-1),Pe("span",null,null,-1)]),2)):Ye("",!0),Pe("div",{class:Ee(I.$style["site-buttons"])},[I.displayBackButton?(se(),Oe("button",{key:0,class:"pb-w-sync_secondary-button","data-testid":"site-back",type:"button",onClick:x[5]||(x[5]=()=>n("back"))},at(U(P)("common.back")),1)):Ye("",!0),Pe("button",{class:"pb-w-sync_primary-button","data-testid":"site-button",disabled:B.value,title:k.value?U(P)("consent.required"):void 0,type:"submit"},at(U(P)("common.next")),9,y_e)],2)]),_:1},8,["autocomplete","disabled","model","name","rules"])]))}}),[["__cssModules",{$style:{"consent-placeholder":"pb-w-sync_consent-placeholder","consent-pulse":"pb-w-sync_consent-pulse","auth-error":"pb-w-sync_auth-error","icon-eye":"pb-w-sync_icon-eye","show-hide":"pb-w-sync_show-hide","site-buttons":"pb-w-sync_site-buttons","site-form-header":"pb-w-sync_site-form-header","site-cover":"pb-w-sync_site-cover","site-tabs":"pb-w-sync_site-tabs","site-switch":"pb-w-sync_site-switch","widget-form-loader":"pb-w-sync_widget-form-loader"}}]]),b_e=["alt","src"],w_e=["onClick"],__e=Sn(_t({__name:"SitesList",props:{assetsPath:{},items:{},organization:{},showLogo:{type:Boolean}},emits:["back","select"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);lr(()=>{r.showLogo&&a("images-loading")});function i(){a("images-loaded")}function s(l){n("select",l)}return(l,f)=>(se(),Oe("div",{class:Ee(l.$style["sites-container"])},[l.showLogo?(se(),Oe("img",{key:0,class:Ee(l.$style["organization-cover"]),alt:l.organization.name,src:`${l.assetsPath}${l.organization.cover}`,width:"1600",height:"480",onLoad:i},null,42,b_e)):Ye("",!0),Pe("div",{class:Ee(l.$style.sites)},[(se(!0),Oe(Mt,null,ur(l.items,(d,h)=>(se(),Oe("button",{key:`${d.id_site}-${h}`,type:"button",onClick:()=>s(d)},at(d.name),9,w_e))),128)),Pe("button",{type:"button",onClick:f[0]||(f[0]=()=>n("back"))},at(l.$t("common.back")),1)],2)],2))}}),[["__cssModules",{$style:{"organization-cover":"pb-w-sync_organization-cover","sites-container":"pb-w-sync_sites-container",sites:"pb-w-sync_sites"}}]]),E_e=Sn(_t({__name:"TheModal",props:{mobile:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);function i(){en("close"),n("update:visible",!1),a("closed")}return(s,l)=>cr((se(),Oe("div",{class:Ee(s.$style["modal-container"])},[Pe("div",{class:Ee(s.$style["modal-overlay-backdrop"]),onClick:i},null,2),Pe("div",{class:Ee(s.$style["modal-wrapper"])},[Pe("div",{class:Ee([s.$style.modal,{[s.$style["is-mobile"]]:r.mobile}])},[yt(s.$slots,"default")],2)],2)],2)),[[Zr,s.visible]])}}),[["__cssModules",{$style:{"modal-container":"pb-w-sync_modal-container","modal-wrapper":"pb-w-sync_modal-wrapper","modal-overlay-backdrop":"pb-w-sync_modal-overlay-backdrop",modal:"pb-w-sync_modal","is-mobile":"pb-w-sync_is-mobile"}}]]),S_e=["onClick"],C_e=["src"],M_e=Sn(_t({__name:"MultipleImages",props:{credential:{default:()=>({type:"options",name:"token",label:"Por favor, revisa las im\xE1genes que se te presentan y selecciona la correcta",options:[]})},modelValue:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li);let i=0;const s=be(()=>{const d=Math.sqrt(r.credential.options.length);return d%1===0?[d,d]:l(Math.floor(d))});lr(()=>{a("images-loading")});function l(d){if(r.credential.options.length%d===0){const h=r.credential.options.length/d;return[d,h]}return l(d-1)}function f(){i++,i===r.credential.options.length&&a("images-loaded")}return(d,h)=>(se(),Oe("div",{class:Ee(d.$style["multiple-images-container"])},[Pe("div",{class:Ee(d.$style["multiple-images-wrapper"])},[(se(!0),Oe(Mt,null,ur(s.value[0],v=>(se(),Oe("div",{key:v,class:Ee(d.$style["credential-options-row"])},[(se(!0),Oe(Mt,null,ur(s.value[1],b=>(se(),Oe("div",{key:b,class:Ee([d.$style["credential-options-col"],{[d.$style.selected]:d.modelValue===d.credential.options[b-1+(v-1)*s.value[1]].value}]),onClick:g=>n("update:modelValue",d.credential.options[b-1+(v-1)*s.value[1]].value)},[Pe("img",{class:Ee(d.$style["credental-options-img"]),src:d.credential.options[b-1+(v-1)*s.value[1]].imgBase64File||d.credential.options[b-1+(v-1)*s.value[1]].imgURL,onLoad:f},null,42,C_e)],10,S_e))),128))],2))),128))],2)],2))}}),[["__cssModules",{$style:{"multiple-images-container":"pb-w-sync_multiple-images-container","multiple-images-wrapper":"pb-w-sync_multiple-images-wrapper","credential-options-row":"pb-w-sync_credential-options-row","credential-options-col":"pb-w-sync_credential-options-col",selected:"pb-w-sync_selected","credental-options-img":"pb-w-sync_credental-options-img"}}]]),T_e={key:1},A_e=["alt","src"],I_e={key:0},k_e=["src"],R_e={key:1},B_e=["src","onLoad"],O_e=["aria-label"],N_e=["disabled"],GS=Sn(_t({__name:"TwofaForm",props:{avatar:{},buttonDisabledStyle:{type:Boolean},cover:{},disableFormAutocomplete:{type:Boolean},enableBackNavigation:{type:Boolean},inNotification:{type:Boolean},loaderMessage:{},selectClass:{},siteName:{},showLogo:{type:Boolean},showPasswordStyle:{},twofa:{}},emits:["back","error"],setup(e,{emit:t}){const r=e,n=t,a=Tt(li),i=Tt(x3),s=Ue({}),l=Ue({...r.twofa.data}),f=Ue({}),d=Ue([]),h=Ue(!0),v=Ue(!1);let b=0,g=!1,y={};const _=be(()=>r.twofa.config.twofa.reduce((p,m)=>m.imgBase64File?p+1:p,0)),T=Ue(null),w=Ue(null);Et(()=>r.twofa,()=>{S()});function M(){S()}function k(p){return f.value[p]||{}}function B(p){return!!l[p]}function D(p){const m=d.value[p];m&&(f.value={...f.value,[p]:{width:`${m.naturalWidth}px`}},Lt(O))}function N(){T.value&&T.value[0].focus()}function O(){b++,b===_.value&&a("images-loaded")}function P(){const p={};r.twofa.config.twofa&&r.twofa.config.twofa.length&&r.twofa.config.twofa.forEach(m=>{m.type==="accounts"&&(p[m.name]=[])}),s.value=p}function L(p){return["text","password","textOptions","accounts","options"].includes(p)}function F(p){l.value={...l.value,[p]:s.value[p].join()}}function S(){s.value={},l.value={...r.twofa.data},f.value={},d.value=[],v.value=!1,b=0,h.value=!0,g=!1,y={},r.twofa.defineRules(i),P(),r.twofa.on("loading",()=>{v.value=!0}),r.twofa.on("twofa-device-error",p=>{n("error",p)}),r.twofa.on("token-received",()=>{l.value={...r.twofa.data}}),_.value&&a("images-loading"),u(),r.twofa.config.twofa.forEach(p=>{["connection","challenge"].includes(p.type)&&u(p.name,!0)}),Lt(()=>{N()})}function o(){w.value.validate(p=>{p&&(a("submitted"),r.twofa.authenticate({...l.value}).then(m=>m).catch(m=>{n("error",m)}))})}function u(p,m){const E=Vt(r.twofa.rules);p&&(y[p]=m),h.value=Object.getOwnPropertyNames(E).reduce((A,R)=>R==="__ob__"||E[R].length===0?A:A||!y[R],!1)}return M(),(p,m)=>v.value?(se(),Oe("div",{key:0,class:Ee(p.$style["twofa-form-loader"])},[rt(ws,{avatar:p.showLogo?p.avatar:void 0,message:r.loaderMessage.long,title:r.loaderMessage.short,size:"large",onImagesLoaded:m[0]||(m[0]=()=>U(a)("images-loaded")),onImagesLoading:m[1]||(m[1]=()=>U(a)("images-loading"))},null,8,["avatar","message","title"])],2)):(se(),Oe("div",T_e,[p.inNotification?Ye("",!0):(se(),Oe("div",{key:0,class:Ee(p.$style["twofa-form-header"])},[p.showLogo?(se(),Oe("img",{key:0,alt:p.siteName,class:Ee(p.$style["twofa-cover"]),src:p.cover,width:"1600",height:"480",onLoad:O},null,42,A_e)):Ye("",!0),Pe("h2",null,at(p.siteName),1)],2)),r.twofa?(se(),et(U(xS),{key:1,ref_key:"twofaForm",ref:w,"data-testid":"twofa-form","label-position":"top",disabled:v.value,model:l.value,rules:Vt(r.twofa.rules),name:`twofa-${r.twofa.config.id_site}`,autocomplete:r.disableFormAutocomplete?"off":"on",onSubmit:br(o,["prevent"]),onValidate:u},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(r.twofa.config.twofa,(E,A)=>(se(),Oe(Mt,{key:`${A}-${E.name}`},[E.type==="externalAction"?(se(),Oe("div",I_e,[Pe("label",{class:Ee(p.$style["external-action-label"])},at(E.label),3),Pe("div",{class:Ee(p.$style["external-action-img-container"])},[E.imgBase64File?(se(),Oe("img",{key:0,alt:"",src:E.imgBase64File,onLoad:O},null,40,k_e)):Ye("",!0)],2)])):E.type==="instructions"?(se(),Oe("div",R_e,[Pe("label",{class:Ee(p.$style["external-action-label"])},at(E.label),3)])):Ye("",!0),L(E.type)?(se(),et(U(FS),{key:2,label:E.label,prop:E.name,for:`twofa-${r.twofa.config.id_site}[${E.name}]`},{default:nt(()=>[E.imgBase64File?(se(),Oe("img",{key:0,ref_for:!0,ref_key:"imageWithoutSize",ref:d,src:E.imgBase64File,class:Ee(p.$style["input-image"]),style:Pr(k(A)),alt:"",onLoad:R=>D(A)},null,46,B_e)):Ye("",!0),E.type==="text"||E.type==="password"?(se(),et(U(Ga),{key:1,ref_for:!0,ref:A===0&&"firstInput",modelValue:l.value[E.name],"onUpdate:modelValue":R=>l.value[E.name]=R,"data-testid":"twofa-input",name:`twofa-${r.twofa.config.id_site}[${E.name}]`,autocomplete:E.name==="password"?`${r.twofa.config.id_site} new-password`:r.disableFormAutocomplete?"off":`${r.twofa.config.id_site} ${E.name}`,disabled:E.disabled,type:E.type==="password"&&U(g)?"text":E.type},Tx({_:2},[E.type==="password"&&r.showPasswordStyle==="icon"?{name:"append",fn:nt(()=>[Pe("button",{class:Ee(p.$style["icon-eye-twofa"]),"aria-label":U(i)(`common.${U(g)?"hide":"show_password"}`),type:"button",onClick:m[2]||(m[2]=()=>{Er(g)?g.value=!U(g):g=!U(g)})},[U(g)?(se(),et(Xn,{key:1,icon:"eye-slash"})):(se(),et(Xn,{key:0,icon:"eye"}))],10,O_e)]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","name","autocomplete","disabled","type"])):Ye("",!0),E.type==="textOptions"?(se(),et(U(nv),{key:2,ref_for:!0,ref:A===0&&"firstInput",modelValue:l.value[E.name],"onUpdate:modelValue":R=>l.value[E.name]=R,"data-testid":"twofa-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${E.name}`,name:`twofa-${r.twofa.config.id_site}[${E.name}]`,"popper-class":r.selectClass},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(E.options,(R,C)=>(se(),et(U(iv),{key:C,value:R.value,label:R.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class"])):Ye("",!0),E.type==="accounts"?(se(),et(U(nv),{key:3,ref_for:!0,ref:A===0&&"firstInput",modelValue:s.value[E.name],"onUpdate:modelValue":R=>s.value[E.name]=R,"data-testid":"twofa-multi-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${E.name}`,filterable:"",multiple:"",name:`twofa-${r.twofa.config.id_site}[${E.name}]`,"popper-class":r.selectClass,onChange:()=>F(E.name)},{default:nt(()=>[(se(!0),Oe(Mt,null,ur(E.options,(R,C)=>(se(),et(U(iv),{key:C,value:R.value,label:R.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class","onChange"])):Ye("",!0),E.type==="options"?(se(),et(M_e,{key:4,modelValue:l.value[E.name],"onUpdate:modelValue":[R=>l.value[E.name]=R,()=>{u(E.name,!0)}],credential:E},null,8,["modelValue","onUpdate:modelValue","credential"])):Ye("",!0)]),_:2},1032,["label","prop","for"])):Ye("",!0),E.type==="password"&&r.showPasswordStyle==="text"&&B(E.name)?(se(),et(U(gs),{key:`${A}-${E.name}-toggle`,class:Ee(p.$style["show-hide"]),"native-type":"button",onClick:m[3]||(m[3]=()=>{Er(g)?g.value=!U(g):g=!U(g)})},{default:nt(()=>[dr(at(U(i)(`common.${U(g)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Ye("",!0)],64))),128)),Pe("div",{class:Ee(p.$style["twofa-buttons"])},[r.enableBackNavigation?(se(),Oe("button",{key:0,class:"pb-w-sync_secondary-button","data-testid":"twofa-back",type:"button",onClick:m[4]||(m[4]=()=>{n("back")})},at(U(i)("common.back")),1)):Ye("",!0),r.twofa.displaySubmitButton?(se(),Oe("button",{key:1,class:"pb-w-sync_primary-button",disabled:r.buttonDisabledStyle&&h.value,"data-testid":"twofa-button",type:"submit"},at(U(i)("common.next")),9,N_e)):Ye("",!0)],2)]),_:1},8,["disabled","model","rules","name","autocomplete"])):Ye("",!0)]))}}),[["__cssModules",{$style:{"external-action-img-container":"pb-w-sync_external-action-img-container","external-action-label":"pb-w-sync_external-action-label","icon-eye-twofa":"pb-w-sync_icon-eye-twofa","input-image":"pb-w-sync_input-image","show-hide":"pb-w-sync_show-hide","twofa-buttons":"pb-w-sync_twofa-buttons","twofa-form-header":"pb-w-sync_twofa-form-header","twofa-cover":"pb-w-sync_twofa-cover","twofa-form-loader":"pb-w-sync_twofa-form-loader"}}]]),Qr=Sn(_t({__name:"TwofaNotification",props:{assetsPath:{default:"https://s.paybook.com"},buttonDisabledStyle:{type:Boolean,default:!1},disableFormAutocomplete:{type:Boolean,default:!1},displayLongDescription:{type:Boolean,default:!1},duration:{},enableBackNavigation:{type:Boolean,default:!1},hideForm:{type:Boolean,default:!1},initLongMessage:{default:null},initMessage:{default:null},initTitle:{default:""},item:{default:null},messagesUpdater:{default:null},rootEmit:{type:Function,default:null},selectClass:{default:""},showLogo:{type:Boolean,default:!1},showPasswordStyle:{default:"icon"},t:{},type:{}},emits:["back","error","imagesLoaded","imagesLoading"],setup(e,{emit:t}){var r,n,a,i;const s=e,l=t;Br(li,s.rootEmit),Br(x3,s.t);let f=Ue(s.initLongMessage||((r=s.messagesUpdater)==null?void 0:r.getMessages().long)||""),d=Ue(s.initMessage||((n=s.messagesUpdater)==null?void 0:n.getMessages().short)||""),h=Ue(s.displayLongDescription||!1),v=Ue((a=s.item)==null?void 0:a.status),b=Ue((i=s.item)!=null&&i.config?s.item.config.name:s.initTitle);const g=be(()=>s.item&&s.item.config?`${s.assetsPath}${s.item.config.avatar}`:""),y=be(()=>s.item&&s.item.config?`${s.assetsPath}${s.item.config.cover}`:""),_=be(()=>s.item?v.value==="twofa"&&!s.hideForm:!1),T=be(()=>s.item?s.type==="info"&&v.value!=="twofa":s.type==="info");function w(){s.messagesUpdater&&s.messagesUpdater.subscribe(()=>{const k=s.messagesUpdater.getMessages();f.value=k.long,d.value=k.short}),s.item&&(s.item.on("twofa",()=>{v.value="twofa"}),s.item.on("twofa-loading",()=>{v.value="twofa-loading"}))}function M(){h.value=!h.value}return w(),(k,B)=>(se(),Oe("div",{class:Ee(k.$style["twofa-notification"])},[Pe("div",{class:Ee(k.$style["site-identifier"])},[T.value||k.showLogo?(se(),et(ws,{key:0,class:Ee(k.$style["notification-loader"]),avatar:k.showLogo?g.value:void 0,type:s.type==="info"?"loading":s.type,onImagesLoaded:B[0]||(B[0]=()=>l("imagesLoaded")),onImagesLoading:B[1]||(B[1]=()=>l("imagesLoading"))},null,8,["class","avatar","type"])):Ye("",!0),Pe("div",{class:Ee([k.$style["site-identifier-description"],{[k.$style["with-loader"]]:T.value||k.showLogo}])},[Pe("span",{class:Ee([k.$style["site-name"],k.$style[s.type]])},at(U(b)),3),Pe("p",{class:Ee(k.$style["site-identifier-message"])},at(U(d)),3),U(h)?(se(),Oe("p",{key:0,class:Ee(k.$style["site-identifier-long-message"])},at(U(f)),3)):Ye("",!0),s.type!=="info"?(se(),Oe("div",{key:1,class:Ee(k.$style["widget-notification-show-more-container"])},[U(f)?(se(),et(U(xbe),{key:0,type:"primary",onClick:br(M,["stop"])},{default:nt(()=>[dr(at(s.t("common.show",{msg:s.t(`common.${U(h)?"less":"more"}`)})),1)]),_:1})):Ye("",!0)],2)):Ye("",!0)],2)],2),_.value?(se(),Oe("div",{key:0,class:Ee(k.$style["notification-form"])},[rt(GS,{avatar:g.value,"button-disabled-style":k.buttonDisabledStyle,cover:y.value,"disable-form-autocomplete":k.disableFormAutocomplete,"enable-back-navigation":k.enableBackNavigation,"in-notification":!0,"loader-message":{long:U(f),short:U(d)},"select-class":k.selectClass,"show-logo":k.showLogo,"show-password-style":k.showPasswordStyle,"site-name":U(b),twofa:s.item.twofa,onBack:B[2]||(B[2]=()=>l("back")),onError:B[3]||(B[3]=D=>l("error",D))},null,8,["avatar","button-disabled-style","cover","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-logo","show-password-style","site-name","twofa"])],2)):Ye("",!0)],2))}}),[["__cssModules",{$style:{"notification-form":"pb-w-sync_notification-form","notification-loader":"pb-w-sync_notification-loader","site-identifier":"pb-w-sync_site-identifier","site-identifier-description":"pb-w-sync_site-identifier-description","with-loader":"pb-w-sync_with-loader","site-name":"pb-w-sync_site-name",error:"pb-w-sync_error",success:"pb-w-sync_success","site-identifier-long-message":"pb-w-sync_site-identifier-long-message","site-identifier-message":"pb-w-sync_site-identifier-message","twofa-notification":"pb-w-sync_twofa-notification","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container"}}]]),P_e=Sn(_t({__name:"UnauthorizedNotification",props:{initMessage:{default:""},initTitle:{default:""},refreshTokenFunction:{},t:{}},emits:["closed","closeNotification","refreshToken","refreshTokenError"],setup(e,{emit:t}){const r=e,n=t;let a=Ue(!1);xr(()=>{n("closed")});function i(){a.value=!0,r.refreshTokenFunction().then(({token:s,strict:l})=>{if(typeof s!="string")throw new Error("Refresh token is not valid. Promise should return a valid token.");return new Promise(f=>{n("refreshToken",{token:s,strict:l,resolve:f})})}).catch(()=>{n("refreshTokenError")}).finally(()=>{a.value=!1})}return(s,l)=>(se(),Oe("div",{class:Ee(s.$style["unauthorized-notification"])},[Pe("span",null,at(r.initTitle),1),Pe("p",null,at(r.initMessage),1),Pe("div",{class:Ee(s.$style["unauthorized-button-container"])},[cr((se(),et(U(gs),{disabled:U(a),type:"primary",onClick:br(i,["stop"])},{default:nt(()=>[dr(at(r.t("common.refresh")),1)]),_:1},8,["disabled"])),[[U(jS),U(a)]]),rt(U(gs),{disabled:U(a),onClick:l[0]||(l[0]=br(()=>{n("closeNotification")},["stop"]))},{default:nt(()=>[dr(at(r.t("common.cancel")),1)]),_:1},8,["disabled"])],2)],2))}}),[["__cssModules",{$style:{"unauthorized-notification":"pb-w-sync_unauthorized-notification","unauthorized-button-container":"pb-w-sync_unauthorized-button-container"}}]]);var D_e="2.0.4",YS=500,gH="user-agent",qu="",yH="?",Tv="function",_s="undefined",$u="object",ZS="string",Qn="browser",Bo="cpu",Za="device",ba="engine",Hi="os",Uu="result",pt="name",ot="type",ht="vendor",mt="version",ei="architecture",wd="major",ct="model",_d="console",Zt="mobile",Rr="tablet",sn="smarttv",Ja="wearable",Av="xr",Ed="embedded",Sd="inapp",JS="brands",Il="formFactors",XS="fullVersionList",zu="platform",QS="platformVersion",Iv="bitness",Es="sec-ch-ua",L_e=Es+"-full-version-list",x_e=Es+"-arch",F_e=Es+"-"+Iv,q_e=Es+"-form-factors",$_e=Es+"-"+Zt,U_e=Es+"-"+ct,bH=Es+"-"+zu,z_e=bH+"-version",wH=[JS,XS,Zt,ct,zu,QS,ei,Il,Iv],kv="Amazon",Vu="Apple",_H="ASUS",EH="BlackBerry",kl="Google",SH="Huawei",e5="Lenovo",CH="Honor",Rv="LG",t5="Microsoft",r5="Motorola",n5="Nvidia",MH="OnePlus",i5="OPPO",Cd="Samsung",TH="Sharp",Md="Sony",a5="Xiaomi",o5="Zebra",AH="Chrome",IH="Chromium",Ss="Chromecast",Bv="Edge",Td="Firefox",Ad="Opera",s5="Facebook",kH="Sogou",Hu="Mobile ",Id=" Browser",l5="Windows",V_e=typeof window!==_s,ti=V_e&&window.navigator?window.navigator:void 0,Cs=ti&&ti.userAgentData?ti.userAgentData:void 0,H_e=function(e,t){var r={},n=t;if(!Nv(t)){n={};for(var a in t)for(var i in t[a])n[i]=t[a][i].concat(n[i]?n[i]:[])}for(var s in e)r[s]=n[s]&&n[s].length%2===0?n[s].concat(e[s]):e[s];return r},Ov=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},u5=function(e,t){if(typeof e===$u&&e.length>0){for(var r in e)if(Oo(t)==Oo(e[r]))return!0;return!1}return ju(e)?Oo(t)==Oo(e):!1},Nv=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||(t?Nv(e[r]):!1)},ju=function(e){return typeof e===ZS},c5=function(e){if(e){for(var t=[],r=Ku(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var a=Pv(r[n]).split(";v=");t[n]={brand:a[0],version:a[1]}}else t[n]=Pv(r[n]);return t}},Oo=function(e){return ju(e)?e.toLowerCase():e},f5=function(e){return ju(e)?Ku(/[^\d\.]/g,e).split(".")[0]:void 0},No=function(e){for(var t in e){var r=e[t];typeof r==$u&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Ku=function(e,t){return ju(t)?t.replace(e,qu):t},kd=function(e){return Ku(/\\?\"/g,e)},Pv=function(e,t){if(ju(e))return e=Ku(/^\s\s*/,e),typeof t===_s?e:e.substring(0,YS)},d5=function(e,t){if(!(!e||!t))for(var r=0,n,a,i,s,l,f;r<t.length&&!l;){var d=t[r],h=t[r+1];for(n=a=0;n<d.length&&!l&&d[n];)if(l=d[n++].exec(e),l)for(i=0;i<h.length;i++)f=l[++a],s=h[i],typeof s===$u&&s.length>0?s.length===2?typeof s[1]==Tv?this[s[0]]=s[1].call(this,f):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Tv&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=f?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=f?s[1].call(this,f,s[2]):void 0:s.length==3?this[s[0]]=f?f.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=f?s[3].call(this,f.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=f?s[3].apply(this,[f.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=f||void 0;r+=2}},Xa=function(e,t){for(var r in t)if(typeof t[r]===$u&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(u5(t[r][n],e))return r===yH?void 0:r}else if(u5(t[r],e))return r===yH?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},RH={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},BH={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},j_e={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},OH={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[mt,[pt,Hu+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[mt,[pt,Bv+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[mt,[pt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[pt,mt],[/opios[\/ ]+([\w\.]+)/i],[mt,[pt,Ad+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[mt,[pt,Ad+" GX"]],[/\bopr\/([\w\.]+)/i],[mt,[pt,Ad]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[mt,[pt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[mt,[pt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[pt,mt],[/quark(?:pc)?\/([-\w\.]+)/i],[mt,[pt,"Quark"]],[/\bddg\/([\w\.]+)/i],[mt,[pt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[mt,[pt,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[mt,[pt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[mt,[pt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[mt,[pt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[mt,[pt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[mt,[pt,"Smart "+e5+Id]],[/(avast|avg)\/([\w\.]+)/i],[[pt,/(.+)/,"$1 Secure"+Id],mt],[/\bfocus\/([\w\.]+)/i],[mt,[pt,Td+" Focus"]],[/\bopt\/([\w\.]+)/i],[mt,[pt,Ad+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[mt,[pt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[mt,[pt,"Dolphin"]],[/coast\/([\w\.]+)/i],[mt,[pt,Ad+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[mt,[pt,"MIUI"+Id]],[/fxios\/([\w\.-]+)/i],[mt,[pt,Hu+Td]],[/\bqihoobrowser\/?([\w\.]*)/i],[mt,[pt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[pt,/(.+)/,"$1Browser"],mt],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[pt,/(.+)/,"$1"+Id],mt],[/samsungbrowser\/([\w\.]+)/i],[mt,[pt,Cd+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[mt,[pt,kH+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[pt,kH+" Mobile"],mt],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[pt,mt],[/(lbbrowser|rekonq)/i],[pt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[mt,pt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[pt,s5],mt,[ot,Sd]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[pt,mt,[ot,Sd]],[/\bgsa\/([\w\.]+) .*safari\//i],[mt,[pt,"GSA"],[ot,Sd]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[mt,[pt,"TikTok"],[ot,Sd]],[/\[(linkedin)app\]/i],[pt,[ot,Sd]],[/(chromium)[\/ ]([-\w\.]+)/i],[pt,mt],[/headlesschrome(?:\/([\w\.]+)| )/i],[mt,[pt,AH+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[mt,[pt,Bv+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[pt,AH+" WebView"],mt],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[mt,[pt,"Android"+Id]],[/chrome\/([\w\.]+) mobile/i],[mt,[pt,Hu+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[pt,mt],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[mt,[pt,Hu+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[pt,Hu+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[mt,pt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[pt,[mt,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[pt,mt],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[pt,Hu+Td],mt],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[pt,"Netscape"],mt],[/(wolvic|librewolf)\/([\w\.]+)/i],[pt,mt],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[mt,[pt,Td+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[pt,[mt,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[pt,[mt,/[^\d\.]+./,qu]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ei,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ei,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ei,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ei,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ei,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[ei,/ower/,qu,Oo]],[/ sun4\w[;\)]/i],[[ei,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[ei,Oo]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[ct,[ht,Cd],[ot,Rr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[ct,[ht,Cd],[ot,Zt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[ct,[ht,Vu],[ot,Zt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[ct,[ht,Vu],[ot,Rr]],[/(macintosh);/i],[ct,[ht,Vu]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ct,[ht,TH],[ot,Zt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[ct,[ht,CH],[ot,Rr]],[/honor([-\w ]+)[;\)]/i],[ct,[ht,CH],[ot,Zt]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[ct,[ht,SH],[ot,Rr]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[ct,[ht,SH],[ot,Zt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[ct,/_/g," "],[ht,a5],[ot,Rr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[ct,/_/g," "],[ht,a5],[ot,Zt]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ct,[ht,MH],[ot,Zt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ct,[ht,i5],[ot,Zt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[ct,[ht,Xa,{OnePlus:["203","304","403","404","413","415"],"*":i5}],[ot,Rr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[ct,[ht,"BLU"],[ot,Zt]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ct,[ht,"Vivo"],[ot,Zt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ct,[ht,"Realme"],[ot,Zt]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[ct,[ht,e5],[ot,Rr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[ct,[ht,e5],[ot,Zt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[ct,[ht,r5],[ot,Zt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ct,[ht,r5],[ot,Rr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ct,[ht,Rv],[ot,Rr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[ct,[ht,Rv],[ot,Zt]],[/(nokia) (t[12][01])/i],[ht,ct,[ot,Rr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[ct,/_/g," "],[ot,Zt],[ht,"Nokia"]],[/(pixel (c|tablet))\b/i],[ct,[ht,kl],[ot,Rr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[ct,[ht,kl],[ot,Zt]],[/(google) (pixelbook( go)?)/i],[ht,ct],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[ct,[ht,Md],[ot,Zt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ct,"Xperia Tablet"],[ht,Md],[ot,Rr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ct,[ht,kv],[ot,Rr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ct,/(.+)/g,"Fire Phone $1"],[ht,kv],[ot,Zt]],[/(playbook);[-\w\),; ]+(rim)/i],[ct,ht,[ot,Rr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[ct,[ht,EH],[ot,Zt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ct,[ht,_H],[ot,Rr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ct,[ht,_H],[ot,Zt]],[/(nexus 9)/i],[ct,[ht,"HTC"],[ot,Rr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[ht,[ct,/_/g," "],[ot,Zt]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[ct,[ht,"TCL"],[ot,Rr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[ct,[ht,"TCL"],[ot,Zt]],[/(itel) ((\w+))/i],[[ht,Oo],ct,[ot,Xa,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ct,[ht,"Acer"],[ot,Rr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ct,[ht,"Meizu"],[ot,Zt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ct,[ht,"Ulefone"],[ot,Zt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ct,[ht,"Energizer"],[ot,Zt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ct,[ht,"Cat"],[ot,Zt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ct,[ht,"Smartfren"],[ot,Zt]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[ct,[ht,"Nothing"],[ot,Zt]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[ct,[ht,"Archos"],[ot,Rr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[ct,[ht,"Archos"],[ot,Zt]],[/; (n159v)/i],[ct,[ht,"HMD"],[ot,Zt]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[ht,ct,[ot,Rr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[ht,ct,[ot,Zt]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[ht,ct,[ot,Rr]],[/(surface duo)/i],[ct,[ht,t5],[ot,Rr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ct,[ht,"Fairphone"],[ot,Zt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[ct,[ht,n5],[ot,Rr]],[/(sprint) (\w+)/i],[ht,ct,[ot,Zt]],[/(kin\.[onetw]{3})/i],[[ct,/\./g," "],[ht,t5],[ot,Zt]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ct,[ht,o5],[ot,Rr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ct,[ht,o5],[ot,Zt]],[/smart-tv.+(samsung)/i],[ht,[ot,sn]],[/hbbtv.+maple;(\d+)/i],[[ct,/^/,"SmartTV"],[ht,Cd],[ot,sn]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[ht,ct,[ot,sn]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[ht,Rv],[ot,sn]],[/(apple) ?tv/i],[ht,[ct,Vu+" TV"],[ot,sn]],[/crkey.*devicetype\/chromecast/i],[[ct,Ss+" Third Generation"],[ht,kl],[ot,sn]],[/crkey.*devicetype\/([^/]*)/i],[[ct,/^/,"Chromecast "],[ht,kl],[ot,sn]],[/fuchsia.*crkey/i],[[ct,Ss+" Nest Hub"],[ht,kl],[ot,sn]],[/crkey/i],[[ct,Ss],[ht,kl],[ot,sn]],[/(portaltv)/i],[ct,[ht,s5],[ot,sn]],[/droid.+aft(\w+)( bui|\))/i],[ct,[ht,kv],[ot,sn]],[/(shield \w+ tv)/i],[ct,[ht,n5],[ot,sn]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ct,[ht,TH],[ot,sn]],[/(bravia[\w ]+)( bui|\))/i],[ct,[ht,Md],[ot,sn]],[/(mi(tv|box)-?\w+) bui/i],[ct,[ht,a5],[ot,sn]],[/Hbbtv.*(technisat) (.*);/i],[ht,ct,[ot,sn]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[ht,/.+\/(\w+)/,"$1",Xa,{LG:"lge"}],[ct,Pv],[ot,sn]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[ct,[ot,sn]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[ot,sn]],[/(playstation \w+)/i],[ct,[ht,Md],[ot,_d]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ct,[ht,t5],[ot,_d]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[ht,ct,[ot,_d]],[/droid.+; (shield)( bui|\))/i],[ct,[ht,n5],[ot,_d]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[ct,[ht,Cd],[ot,Ja]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[ht,ct,[ot,Ja]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[ct,[ht,i5],[ot,Ja]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ct,[ht,Vu],[ot,Ja]],[/(opwwe\d{3})/i],[ct,[ht,MH],[ot,Ja]],[/(moto 360)/i],[ct,[ht,r5],[ot,Ja]],[/(smartwatch 3)/i],[ct,[ht,Md],[ot,Ja]],[/(g watch r)/i],[ct,[ht,Rv],[ot,Ja]],[/droid.+; (wt63?0{2,3})\)/i],[ct,[ht,o5],[ot,Ja]],[/droid.+; (glass) \d/i],[ct,[ht,kl],[ot,Av]],[/(pico) (4|neo3(?: link|pro)?)/i],[ht,ct,[ot,Av]],[/(quest( \d| pro)?s?).+vr/i],[ct,[ht,s5],[ot,Av]],[/mobile vr; rv.+firefox/i],[[ot,Av]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[ht,[ot,Ed]],[/(aeobc)\b/i],[ct,[ht,kv],[ot,Ed]],[/(homepod).+mac os/i],[ct,[ht,Vu],[ot,Ed]],[/windows iot/i],[[ot,Ed]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[ct,[ot,Xa,{mobile:"Mobile",xr:"VR","*":Rr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[ot,Rr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[ot,Zt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[ct,[ht,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[mt,[pt,Bv+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[pt,mt],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[mt,[pt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[pt,mt],[/ladybird\//i],[[pt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[mt,pt]],os:[[/(windows nt) (6\.[23]); arm/i],[[pt,/N/,"R"],[mt,Xa,RH]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[pt,mt],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[mt,/(;|\))/g,"",Xa,RH],[pt,l5]],[/(windows ce)\/?([\d\.]*)/i],[pt,mt],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[mt,/_/g,"."],[pt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[pt,"macOS"],[mt,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[mt,[pt,Ss+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[mt,[pt,Ss+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[mt,[pt,Ss+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[mt,[pt,Ss+" Linux"]],[/crkey\/([\d\.]+)/i],[mt,[pt,Ss]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[mt,pt],[/(ubuntu) ([\w\.]+) like android/i],[[pt,/(.+)/,"$1 Touch"],mt],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[pt,mt],[/\(bb(10);/i],[mt,[pt,EH]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[mt,[pt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[mt,[pt,Td+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[mt,[pt,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[mt,Xa,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[pt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[mt,[pt,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[pt,"Chrome OS"],mt],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[pt,mt],[/(sunos) ?([\d\.]*)/i],[[pt,"Solaris"],mt],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[pt,mt]]},Dv=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return No.call(e.init,[[Qn,[pt,mt,wd,ot]],[Bo,[ei]],[Za,[ot,ct,ht]],[ba,[pt,mt]],[Hi,[pt,mt]]]),No.call(e.isIgnore,[[Qn,[mt,wd]],[ba,[mt]],[Hi,[mt]]]),No.call(e.isIgnoreRgx,[[Qn,/ ?browser$/i],[Hi,/ ?os$/i]]),No.call(e.toString,[[Qn,[pt,mt]],[Bo,[ei]],[Za,[ht,ct]],[ba,[pt,mt]],[Hi,[pt,mt]]]),e}(),K_e=function(e,t){var r=Dv.init[t],n=Dv.isIgnore[t]||0,a=Dv.isIgnoreRgx[t]||0,i=Dv.toString[t]||0;function s(){No.call(this,r)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Cs?Cs.getHighEntropyValues(wH).then(function(l){return e.setCH(new NH(l,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Uu&&(s.prototype.is=function(l){var f=!1;for(var d in this)if(this.hasOwnProperty(d)&&!u5(n,d)&&Oo(a?Ku(a,this[d]):this[d])==Oo(a?Ku(a,l):l)){if(f=!0,l!=_s)break}else if(l==_s&&f){f=!f;break}return f},s.prototype.toString=function(){var l=qu;for(var f in i)typeof this[i[f]]!==_s&&(l+=(l?" ":qu)+this[i[f]]);return l||_s}),Cs||(s.prototype.then=function(l){var f=this,d=function(){for(var v in f)f.hasOwnProperty(v)&&(this[v]=f[v])};d.prototype={is:s.prototype.is,toString:s.prototype.toString};var h=new d;return l(h),h}),new s};function NH(e,t){if(e=e||{},No.call(this,wH),t)No.call(this,[[JS,c5(e[Es])],[XS,c5(e[L_e])],[Zt,/\?1/.test(e[$_e])],[ct,kd(e[U_e])],[zu,kd(e[bH])],[QS,kd(e[z_e])],[ei,kd(e[x_e])],[Il,c5(e[q_e])],[Iv,kd(e[F_e])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==_s&&(this[r]=e[r])}function PH(e,t,r,n){return this.get=function(a){return a?this.data.hasOwnProperty(a)?this.data[a]:void 0:this.data},this.set=function(a,i){return this.data[a]=i,this},this.setCH=function(a){return this.uaCH=a,this},this.detectFeature=function(){if(ti&&ti.userAgent==this.ua)switch(this.itemType){case Qn:ti.brave&&typeof ti.brave.isBrave==Tv&&this.set(pt,"Brave");break;case Za:!this.get(ot)&&Cs&&Cs[Zt]&&this.set(ot,Zt),this.get(ct)=="Macintosh"&&ti&&typeof ti.standalone!==_s&&ti.maxTouchPoints&&ti.maxTouchPoints>2&&this.set(ct,"iPad").set(ot,Rr);break;case Hi:!this.get(pt)&&Cs&&Cs[zu]&&this.set(pt,Cs[zu]);break;case Uu:var a=this.data,i=function(s){return a[s].getItem().detectFeature().get()};this.set(Qn,i(Qn)).set(Bo,i(Bo)).set(Za,i(Za)).set(ba,i(ba)).set(Hi,i(Hi))}return this},this.parseUA=function(){return this.itemType!=Uu&&d5.call(this.data,this.ua,this.rgxMap),this.itemType==Qn&&this.set(wd,f5(this.get(mt))),this},this.parseCH=function(){var a=this.uaCH,i=this.rgxMap;switch(this.itemType){case Qn:case ba:var s=a[XS]||a[JS],l;if(s)for(var f in s){var d=s[f].brand||s[f],h=s[f].version;this.itemType==Qn&&!/not.a.brand/i.test(d)&&(!l||/Chrom/.test(l)&&d!=IH||l==Bv&&/WebView2/.test(d))&&(d=Xa(d,j_e),l=this.get(pt),l&&!/Chrom/.test(l)&&/Chrom/.test(d)||this.set(pt,d).set(mt,h).set(wd,f5(h)),l=d),this.itemType==ba&&d==IH&&this.set(mt,h)}break;case Bo:var v=a[ei];v&&(v&&a[Iv]=="64"&&(v+="64"),d5.call(this.data,v+";",i));break;case Za:if(a[Zt]&&this.set(ot,Zt),a[ct]&&(this.set(ct,a[ct]),!this.get(ot)||!this.get(ht))){var b={};d5.call(b,"droid 9; "+a[ct]+")",i),!this.get(ot)&&b.type&&this.set(ot,b.type),!this.get(ht)&&b.vendor&&this.set(ht,b.vendor)}if(a[Il]){var g;if(typeof a[Il]!="string")for(var y=0;!g&&y<a[Il].length;)g=Xa(a[Il][y++],BH);else g=Xa(a[Il],BH);this.set(ot,g)}break;case Hi:var _=a[zu];if(_){var T=a[QS];_==l5&&(T=parseInt(f5(T),10)>=13?"11":"10"),this.set(pt,_).set(mt,T)}this.get(pt)==l5&&a[ct]=="Xbox"&&this.set(pt,"Xbox").set(mt,void 0);break;case Uu:var w=this.data,M=function(k){return w[k].getItem().setCH(a).parseCH().get()};this.set(Qn,M(Qn)).set(Bo,M(Bo)).set(Za,M(Za)).set(ba,M(ba)).set(Hi,M(Hi))}return this},No.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",K_e(this,e)]]),this}function Qa(e,t,r){if(typeof e===$u?(Nv(e,!0)?(typeof t===$u&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e===ZS&&!Nv(t,!0)&&(r=t,t=void 0),r&&typeof r.append===Tv){var n={};r.forEach(function(f,d){n[d]=f}),r=n}if(!(this instanceof Qa))return new Qa(e,t,r).getResult();var a=typeof e===ZS?e:r&&r[gH]?r[gH]:ti&&ti.userAgent?ti.userAgent:qu,i=new NH(r,!0),s=t?H_e(OH,t):OH,l=function(f){return f==Uu?function(){return new PH(f,a,s,i).set("ua",a).set(Qn,this.getBrowser()).set(Bo,this.getCPU()).set(Za,this.getDevice()).set(ba,this.getEngine()).set(Hi,this.getOS()).get()}:function(){return new PH(f,a,s[f],i).parseUA().get()}};return No.call(this,[["getBrowser",l(Qn)],["getCPU",l(Bo)],["getDevice",l(Za)],["getEngine",l(ba)],["getOS",l(Hi)],["getResult",l(Uu)],["getUA",function(){return a}],["setUA",function(f){return ju(f)&&(a=f.length>YS?Pv(f,YS):f),this}]]).setUA(a),this}Qa.VERSION=D_e,Qa.BROWSER=Ov([pt,mt,wd,ot]),Qa.CPU=Ov([ei]),Qa.DEVICE=Ov([ct,ht,ot,_d,Zt,sn,Rr,Ja,Ed]),Qa.ENGINE=Qa.OS=Ov([pt,mt]);function W_e(){const e=Ue(!1);function t(){const{device:r}=Qa(navigator.userAgent);Lt(()=>{e.value=r.type==="mobile"||window.innerWidth<540})}return xr(()=>window.removeEventListener("resize",t)),lr(()=>{t(),window.addEventListener("resize",t)}),{mobile:e}}class h5 extends tr{constructor(t,r,n=!0){if(super(),Dt(this,"bluetoothDevice",!1),Dt(this,"connection"),Dt(this,"data",{}),Dt(this,"displaySubmitButton",!0),Dt(this,"http"),Dt(this,"interfaceVersion"),Dt(this,"_loading",!1),Dt(this,"messageEncrypted"),Dt(this,"rules",{}),Dt(this,"rulesDefined",!1),this.config=t,this.measureEvents=n,this.http=r.getInstance(),t.twofa&&t.twofa.length)this.configuredMeasureEvent("twofa_request",{id_site:t.id_site,...t.id_site?{}:{id_request:t.id_request}}),t.twofa.forEach(a=>{const i=a.name;this.data[i]=null,(a.type==="authentication_type"||a.type==="challenge")&&(this.data[i]=a.label),a.type==="connection"&&(this.connection=this.data[i]=a.label),(a.type==="externalAction"||a.type==="instructions")&&(this.displaySubmitButton=!1),a.type==="interface_version"&&(this.interfaceVersion=this.data[i]=a.label)}),this.connectSantanderUsbToken(),this.handleBbvaNetcashConnections();else throw new Error("TWOFA credentials are required.")}get loading(){return this._loading}set loading(t){this._loading=t,t&&this.emit("loading")}authenticate(t){return this.data={...t},this.configuredMeasureEvent("twofa_send",{id_site:this.config.id_site,...this.config.id_site?{}:{id_request:this.config.id_request}}),this.loading=!0,this.connection==="eai_otp_GO3"&&!this.bluetoothDevice?this.sendBbvaNetcashUsbToken():(this.turnOnBbvaNetcashBluetoothDevice(),this.http.post(this.config.address,{twofa:{...this.data}}).then(r=>(this.emit("login-success"),r)).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r))))}defineRules(t){this.rulesDefined||(this.rulesDefined=!0,this.config.twofa.forEach(r=>{Object.defineProperty(this.rules,r.name,{value:this.setRules(r,t)})}))}getFields(){return this.config.twofa.filter(t=>t.type!=="challenge"&&t.type!=="connection")}getBbvaNetcashBluetoothFinalToken(t){const r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],sY(t).then(n=>{this.data={token:n,other_message_encrypted:"other_message_encrypted"},this.authenticate(this.data)})}statusChanged(){this.loading||(this.loading=!0)}configuredMeasureEvent(t,r){this.measureEvents&&en(t,r)}connectSantanderUsbToken(){this.config.id_site==="57f6dd8c78480602048b4567"&&this.config.twofa[0].type==="instructions"&&mre(this.config.twofa[0].imgBase64File).then(t=>{this.authenticate(t)}).catch(t=>{this.emit("twofa-api-error"),this.emit("twofa-device-error",t)})}findTwofaByName(t){return this.config.twofa.find(r=>r.name===t)}findTwofaByType(t){return this.config.twofa.find(r=>r.type===t)}handleBbvaNetcashConnections(){this.messageEncrypted=this.findTwofaByType("message_encrypted");const t=this.findTwofaByType("other_message_encrypted");this.connection==="eai_otp_GO3"&&(this.bluetoothDevice=this.findTwofaByType("bluetooth_device").label==="S",this.bluetoothDevice?this.sendBbvaNetcashBluetoothTimeChallengeV1():this.setBbvaNetcashUsbFields()),this.messageEncrypted&&this.setBbvaNetcashBluetoothFakeToken(),t&&this.getBbvaNetcashBluetoothFinalToken(t.label),this.findTwofaByType("authentication_type")&&this.sendBbvaNetcashBluetoothTimeChallengeV2(),this.config.id_site==="57239fae78480601038b4567"&&!this.connection&&this.findTwofaByType("challenge")&&!this.messageEncrypted&&!t&&this.sendBbvaNetcashBluetoothSecondToken()}sendBbvaNetcashBluetoothSecondToken(){const t=JSON.parse(this.findTwofaByType("challenge").label),r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],_Y(t).then(n=>{this.authenticate({challenge:n,token:n})})}sendBbvaNetcashBluetoothTimeChallengeV1(){const t=this.findTwofaByType("challenge").label,r=this.findTwofaByType("device").label,n=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:n,name:"token",type:"instructions"}],lY(r,t).then(a=>{this.data={bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection",device:"device",interface_version:"interface_version",token:a},this.authenticate(this.data)})}sendBbvaNetcashBluetoothTimeChallengeV2(){const t=this.findTwofaByType("authentication_type").label,r=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:r,name:"token",type:"instructions"}],SY(t).then(n=>{this.authenticate({authentication_type:"authentication_type",interface_version:"interface_version",token:n})})}sendBbvaNetcashUsbToken(){return nY(this.data.token,this.data.challenge).then(t=>this.http.post(this.config.address,{twofa:{...this.data,...t,bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection"}}).then(r=>(this.emit("login-success"),r)).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r)))).catch(t=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(t.response?{...t,response:{...t.response,status:500}}:t)))}setBbvaNetcashBluetoothFakeToken(){const t=this.findTwofaByName("token").label;this.rules={token:[{required:!0}]},this.rulesDefined=!0,this.data={token:""},this.config.twofa=[{name:"token",type:"text",label:t,disabled:!0}],oY(this.messageEncrypted.label).then(r=>{this.data={token:r},this.emit("token-received")})}setBbvaNetcashUsbFields(){this.config.twofa=[this.findTwofaByType("text")]}setRules(t,r){const n=[];return n.push({required:!0,message:r("form_errors.required",{label:t.label})}),t.validation&&t.validation.forEach(a=>{switch(a.type){case"text":break;case"regex":n.push({pattern:a.value,message:a.error_message});break}}),n}turnOnBbvaNetcashBluetoothDevice(){this.messageEncrypted&&(this.data={token:"OK",message_encrypted:"message_encrypted"},wY())}}class p5 extends tr{constructor(t,r,n){super(),Dt(this,"config"),Dt(this,"_consent",null),Dt(this,"response"),Dt(this,"testMode",!1),Dt(this,"http"),Dt(this,"_finalResponse",null),Dt(this,"_lastSocketMessage"),Dt(this,"_loading",!1),Dt(this,"_status","start"),Dt(this,"_twofa"),Dt(this,"isSocketOpen",!1),Dt(this,"options",{}),Dt(this,"socket"),Dt(this,"socketOpened",!1),Dt(this,"socketTimeoutAfterError"),Dt(this,"timer",null),this.httpService=r,this.userConfig=n,this.config=t,this.http=r.getInstance()}get finalResponse(){return this._finalResponse}set finalResponse(t){this._finalResponse=t,this.status="finish"}get lastSocketMessage(){return this._lastSocketMessage}set lastSocketMessage(t){this._lastSocketMessage=t}get loading(){return this._loading}set loading(t){this._loading=t,t&&(this.status="loading")}get status(){return this._status}set status(t){const r=this._status!==t;this._status=t,r&&(this.emit(t),this.emit("status-update",t))}get twofa(){return this._twofa}set twofa(t){this._twofa=t,t&&(this.status="twofa",t.on("loading",()=>{this._twofa===t&&this.status==="twofa"&&(this.status="twofa-loading")}))}setOption(t,r){this.options[t]=r}toggleTestMode(){this.testMode=!this.testMode}configuredMeasureEvent(t,r){this.userConfig.isHeadless||en(t,r)}setConsent(t){this._consent=t}withConsent(t){return this._consent?{...t,consent:{accepted:this._consent.accepted,text:this._consent.text}}:t}clearTimer(){clearTimeout(this.timer)}moveDownloadOptions(t){if(t.download_options_active){const r=t.download_options[0],n=t.download_options[1];this.setOption("search_from",this.formatDate(r)),this.setOption("search_to",this.formatDate(n))}delete t.download_options_active,delete t.download_options}setRules(t){const r=[];return t.required&&r.push({required:!0,message:"required"}),t.validation&&t.validation.forEach(n=>{switch(n.type){case"text":break;case"regex":r.push({pattern:n.value,message:"regex"});break}}),r}setSocket(t){this.socket=new WebSocket(t),this.socket.onclose=r=>this.reopenSocket(r),this.socket.onerror=()=>this.socketError(),this.socket.onmessage=r=>this.socketMessage(r),this.socket.onopen=()=>this.socketOpen()}spreadOptions(){const t=Object.keys(this.options).reduce((r,n)=>(this.options[n]!==null&&this.options[n]!==void 0&&(r[n]=this.options[n]),r),{});return Object.keys(t).length?{options:{...t}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.userConfig.socketTimeoutTime)}formatDate(t){return`${t.getFullYear()}-${`0${t.getMonth()+1}`.slice(-2)}-${`0${t.getDate()}`.slice(-2)}`}reopenSocket(t){this.setSocket(t.target.url)}reopenSocketAfterError(){if(!this.socketTimeoutAfterError){this.socketTimeoutAfterError=new Date().getTime()+12e4,this.setSocket(this.response.ws);const t=setInterval(()=>{this.isSocketOpen?clearInterval(t):new Date().getTime()<this.socketTimeoutAfterError?(this.socket.close(),this.setSocket(this.response.ws)):(clearInterval(t),this.socket.close(),this.loading=!1,this.emit("socket-error"),this.finalResponse="error")},2e3)}}socketClose(t){this.clearTimer(),this.twofa=null,this.emit("socket-close",event),t&&t(this),this.socket&&(this.socket.onclose=null,this.socket.close())}socketError(){this.isSocketOpen=!1,this.socketOpened?this.reopenSocketAfterError():(this.loading=!1,this.emit("socket-error"),this.finalResponse="error")}socketMessage(t){const r=JSON.parse(t.data);if(this.lastSocketMessage=r,this.clearTimer(),this.config.quickAnswer&&r.code===102){this.socketClose(()=>{this.finalResponse="success",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-quick-answer")}),this.configuredMeasureEvent("sync_success",{code:r.code,id_site:this.config.id_site});return}r.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),r.code===410&&(this.twofa=new h5({...r,id_site:this.config.id_site},this.httpService,!this.userConfig.isHeadless),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",r),this.startTimer(),r.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),(200<=r.code&&r.code<300||400<=r.code&&r.code<600&&r.code!==410)&&(r.code<300?(this.finalResponse="success",this.configuredMeasureEvent("sync_success",{code:r.code,id_site:this.config.id_site})):(this.finalResponse="error",this.configuredMeasureEvent("sync_error",{code:r.code,code_origin:"socket",id_site:this.config.id_site})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose()),!(400<=r.code&&r.code<600&&r.code!==410||200<=r.code&&r.code<300)&&this.twofa&&r.code!==410&&(this.twofa.loading=!0,this.status="twofa-loading")}socketOpen(){this.isSocketOpen=this.socketOpened=!0,this.socketTimeoutAfterError=void 0}socketTimeout(){this.socketClose(()=>{this.finalResponse="error",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-timeout")})}}const DH=class Ld extends p5{constructor(t,r,n,a){super(t,r,a),Dt(this,"input",[]),Dt(this,"backUpInputArray",[]),this.defaultParams=n,this.userConfig=a,this.allConnections.forEach(i=>{const s={rules:{},data:{}};Ll.includes(t.id_site)&&this.addDownloadOptions(i),i.fields.forEach(l=>{const f=l.name;Object.defineProperty(s.rules,f,{enumerable:!0,value:this.setRules(l),writable:!0}),s.data[f]=null}),i.name===Ld.statementParseInputName?this.backUpInputArray=[s]:this.input.push(s)})}get backUpConnection(){return this.allConnections.find(t=>t.name===Ld.statementParseInputName)}get backUpInput(){return this.backUpInputArray[0]}get connections(){return this.allConnections.filter(t=>t.name!==Ld.statementParseInputName)}get version(){return 4}get allConnections(){return this.config.input.map(t=>({name:t.name,label:t.label,fields:t.fields.map(r=>({...r.options.widget,name:r.name,identifier:r.options.api.identifier,required:r.required}))}))}connect(t,r,n=!1){const a=this.getConnectData(t,r,n);return this.startTimer(),this.http.post(this.config.endpoint,a).then(i=>(this.response=i,this.emit("login-success"),this.setSocket(i.ws),i)).catch(i=>(this.configuredMeasureEvent("sync_error",{code:i.response?i.response.status:i.toString(),code_origin:"endpoint",id_site:this.config.id_site}),n?this.backUpInput.data={}:this.input[t].data={},this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(i)))}getConnectData(t,r,n=!1){this.updateData(t,r,n);const a=t||0,i={...n?this.backUpInput.data:this.input[a].data};Ll.includes(this.config.id_site)&&this.moveDownloadOptions(i),this.testMode?this.setOption("allowMultipleRequests",!0):this.setOption("allowMultipleRequests",void 0);const s={...this.defaultParams,id_site:this.config.id_site,input_name:n?Ld.statementParseInputName:this.connections[t].name,input:i,...this.spreadOptions()};return this.config.request?Promise.resolve(s.input):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.userConfig.saveCredential||(s.save_credential=this.userConfig.saveCredential),this.testMode&&(s.test=1),this.withConsent(s))}getFields(t,r=!1){return r?this.connections[t].fields.filter(n=>!n.identifier):this.connections[t].fields}getBackUpFields(t=!1){var r;return t?this.backUpConnection.fields.filter(n=>!n.identifier):(r=this.backUpConnection)==null?void 0:r.fields}getBackUpRules(t=!1){if(t){const r={};return this.getBackUpFields(!0).forEach(n=>{r[n.name]=this.setRules(n)}),r}return this.backUpInput.rules}getOptions(){return this.connections}getRules(t,r=!1){if(r){const n={};return this.getFields(t,!0).forEach(a=>{n[a.name]=this.setRules(a)}),n}return this.input[t].rules}updateData(t,r,n=!1){if(n){this.backUpInput.data={...r};return}this.input[t].data={...r}}addDownloadOptions(t){t.fields.includes(Dl)||(t.fields.push(Dl),t.fields.push(Im))}};Dt(DH,"statementParseInputName","statement_account_parse");let LH=DH;function xH(e,t){return function(){return e.apply(t,arguments)}}const{toString:G_e}=Object.prototype,{getPrototypeOf:v5}=Object,{iterator:Lv,toStringTag:FH}=Symbol,xv=(e=>t=>{const r=G_e.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wa=e=>(e=e.toLowerCase(),t=>xv(t)===e),Fv=e=>t=>typeof t===e,{isArray:Wu}=Array,Gu=Fv("undefined");function Rd(e){return e!==null&&!Gu(e)&&e.constructor!==null&&!Gu(e.constructor)&&ri(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qH=wa("ArrayBuffer");function Y_e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qH(e.buffer),t}const Z_e=Fv("string"),ri=Fv("function"),$H=Fv("number"),Bd=e=>e!==null&&typeof e=="object",J_e=e=>e===!0||e===!1,qv=e=>{if(xv(e)!=="object")return!1;const t=v5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(FH in e)&&!(Lv in e)},X_e=e=>{if(!Bd(e)||Rd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Q_e=wa("Date"),e6e=wa("File"),t6e=e=>!!(e&&typeof e.uri<"u"),r6e=e=>e&&typeof e.getParts<"u",n6e=wa("Blob"),i6e=wa("FileList"),a6e=e=>Bd(e)&&ri(e.pipe);function o6e(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof hn<"u"?hn:{}}const UH=o6e(),zH=typeof UH.FormData<"u"?UH.FormData:void 0,s6e=e=>{let t;return e&&(zH&&e instanceof zH||ri(e.append)&&((t=xv(e))==="formdata"||t==="object"&&ri(e.toString)&&e.toString()==="[object FormData]"))},l6e=wa("URLSearchParams"),[u6e,c6e,f6e,d6e]=["ReadableStream","Request","Response","Headers"].map(wa),h6e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Od(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Wu(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Rd(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(n=0;n<s;n++)l=i[n],t.call(null,e[l],l,e)}}function VH(e,t){if(Rd(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:hn,HH=e=>!Gu(e)&&e!==Rl;function m5(){const{caseless:e,skipUndefined:t}=HH(this)&&this||{},r={},n=(a,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&VH(r,i)||i;qv(r[s])&&qv(a)?r[s]=m5(r[s],a):qv(a)?r[s]=m5({},a):Wu(a)?r[s]=a.slice():(!t||!Gu(a))&&(r[s]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Od(arguments[a],n);return r}const p6e=(e,t,r,{allOwnKeys:n}={})=>(Od(t,(a,i)=>{r&&ri(a)?Object.defineProperty(e,i,{value:xH(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),v6e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),m6e=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},g6e=(e,t,r,n)=>{let a,i,s;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!n||n(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=r!==!1&&v5(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},y6e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},b6e=e=>{if(!e)return null;if(Wu(e))return e;let t=e.length;if(!$H(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},w6e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&v5(Uint8Array)),_6e=(e,t)=>{const n=(e&&e[Lv]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},E6e=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},S6e=wa("HTMLFormElement"),C6e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),jH=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),M6e=wa("RegExp"),KH=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Od(r,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(n[i]=s||a)}),Object.defineProperties(e,n)},T6e=e=>{KH(e,(t,r)=>{if(ri(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ri(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},A6e=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Wu(e)?n(e):n(String(e).split(t)),r},I6e=()=>{},k6e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function R6e(e){return!!(e&&ri(e.append)&&e[FH]==="FormData"&&e[Lv])}const B6e=e=>{const t=new Array(10),r=(n,a)=>{if(Bd(n)){if(t.indexOf(n)>=0)return;if(Rd(n))return n;if(!("toJSON"in n)){t[a]=n;const i=Wu(n)?[]:{};return Od(n,(s,l)=>{const f=r(s,a+1);!Gu(f)&&(i[l]=f)}),t[a]=void 0,i}}return n};return r(e,0)},O6e=wa("AsyncFunction"),N6e=e=>e&&(Bd(e)||ri(e))&&ri(e.then)&&ri(e.catch),WH=((e,t)=>e?setImmediate:t?((r,n)=>(Rl.addEventListener("message",({source:a,data:i})=>{a===Rl&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Rl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ri(Rl.postMessage)),P6e=typeof queueMicrotask<"u"?queueMicrotask.bind(Rl):typeof ke<"u"&&ke.nextTick||WH,tt={isArray:Wu,isArrayBuffer:qH,isBuffer:Rd,isFormData:s6e,isArrayBufferView:Y_e,isString:Z_e,isNumber:$H,isBoolean:J_e,isObject:Bd,isPlainObject:qv,isEmptyObject:X_e,isReadableStream:u6e,isRequest:c6e,isResponse:f6e,isHeaders:d6e,isUndefined:Gu,isDate:Q_e,isFile:e6e,isReactNativeBlob:t6e,isReactNative:r6e,isBlob:n6e,isRegExp:M6e,isFunction:ri,isStream:a6e,isURLSearchParams:l6e,isTypedArray:w6e,isFileList:i6e,forEach:Od,merge:m5,extend:p6e,trim:h6e,stripBOM:v6e,inherits:m6e,toFlatObject:g6e,kindOf:xv,kindOfTest:wa,endsWith:y6e,toArray:b6e,forEachEntry:_6e,matchAll:E6e,isHTMLForm:S6e,hasOwnProperty:jH,hasOwnProp:jH,reduceDescriptors:KH,freezeMethods:T6e,toObjectSet:A6e,toCamelCase:C6e,noop:I6e,toFiniteNumber:k6e,findKey:VH,global:Rl,isContextDefined:HH,isSpecCompliantForm:R6e,toJSONObject:B6e,isAsyncFn:O6e,isThenable:N6e,setImmediate:WH,asap:P6e,isIterable:e=>e!=null&&ri(e[Lv])};let jt=class Cj extends Error{static from(t,r,n,a,i,s){const l=new Cj(t.message,r||t.code,n,a,i);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,r,n,a,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:tt.toJSONObject(this.config),code:this.code,status:this.status}}};jt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",jt.ERR_BAD_OPTION="ERR_BAD_OPTION",jt.ECONNABORTED="ECONNABORTED",jt.ETIMEDOUT="ETIMEDOUT",jt.ERR_NETWORK="ERR_NETWORK",jt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",jt.ERR_DEPRECATED="ERR_DEPRECATED",jt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",jt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",jt.ERR_CANCELED="ERR_CANCELED",jt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",jt.ERR_INVALID_URL="ERR_INVALID_URL";const D6e=null;function g5(e){return tt.isPlainObject(e)||tt.isArray(e)}function GH(e){return tt.endsWith(e,"[]")?e.slice(0,-2):e}function y5(e,t,r){return e?e.concat(t).map(function(a,i){return a=GH(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function L6e(e){return tt.isArray(e)&&!e.some(g5)}const x6e=tt.toFlatObject(tt,{},null,function(t){return/^is[A-Z]/.test(t)});function $v(e,t,r){if(!tt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=tt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!tt.isUndefined(T[_])});const n=r.metaTokens,a=r.visitor||h,i=r.dots,s=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&tt.isSpecCompliantForm(t);if(!tt.isFunction(a))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(tt.isDate(y))return y.toISOString();if(tt.isBoolean(y))return y.toString();if(!f&&tt.isBlob(y))throw new jt("Blob is not supported. Use a Buffer instead.");return tt.isArrayBuffer(y)||tt.isTypedArray(y)?f&&typeof Blob=="function"?new Blob([y]):Le.Buffer.from(y):y}function h(y,_,T){let w=y;if(tt.isReactNative(t)&&tt.isReactNativeBlob(y))return t.append(y5(T,_,i),d(y)),!1;if(y&&!T&&typeof y=="object"){if(tt.endsWith(_,"{}"))_=n?_:_.slice(0,-2),y=JSON.stringify(y);else if(tt.isArray(y)&&L6e(y)||(tt.isFileList(y)||tt.endsWith(_,"[]"))&&(w=tt.toArray(y)))return _=GH(_),w.forEach(function(k,B){!(tt.isUndefined(k)||k===null)&&t.append(s===!0?y5([_],B,i):s===null?_:_+"[]",d(k))}),!1}return g5(y)?!0:(t.append(y5(T,_,i),d(y)),!1)}const v=[],b=Object.assign(x6e,{defaultVisitor:h,convertValue:d,isVisitable:g5});function g(y,_){if(!tt.isUndefined(y)){if(v.indexOf(y)!==-1)throw Error("Circular reference detected in "+_.join("."));v.push(y),tt.forEach(y,function(w,M){(!(tt.isUndefined(w)||w===null)&&a.call(t,w,tt.isString(M)?M.trim():M,_,b))===!0&&g(w,_?_.concat(M):[M])}),v.pop()}}if(!tt.isObject(e))throw new TypeError("data must be an object");return g(e),t}function YH(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function b5(e,t){this._pairs=[],e&&$v(e,this,t)}const ZH=b5.prototype;ZH.append=function(t,r){this._pairs.push([t,r])},ZH.toString=function(t){const r=t?function(n){return t.call(this,n,YH)}:YH;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function F6e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function JH(e,t,r){if(!t)return e;const n=r&&r.encode||F6e,a=tt.isFunction(r)?{serialize:r}:r,i=a&&a.serialize;let s;if(i?s=i(t,a):s=tt.isURLSearchParams(t)?t.toString():new b5(t,a).toString(n),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class XH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){tt.forEach(this.handlers,function(n){n!==null&&t(n)})}}const w5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},q6e={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:b5,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_5=typeof window<"u"&&typeof document<"u",E5=typeof navigator=="object"&&navigator||void 0,$6e=_5&&(!E5||["ReactNative","NativeScript","NS"].indexOf(E5.product)<0),U6e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z6e=_5&&window.location.href||"http://localhost",kn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_5,hasStandardBrowserEnv:$6e,hasStandardBrowserWebWorkerEnv:U6e,navigator:E5,origin:z6e},Symbol.toStringTag,{value:"Module"})),...q6e};function V6e(e,t){return $v(e,new kn.classes.URLSearchParams,{visitor:function(r,n,a,i){return kn.isNode&&tt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function H6e(e){return tt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function j6e(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function QH(e){function t(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),f=i>=r.length;return s=!s&&tt.isArray(a)?a.length:s,f?(tt.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!l):((!a[s]||!tt.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],i)&&tt.isArray(a[s])&&(a[s]=j6e(a[s])),!l)}if(tt.isFormData(e)&&tt.isFunction(e.entries)){const r={};return tt.forEachEntry(e,(n,a)=>{t(H6e(n),a,r,0)}),r}return null}function K6e(e,t,r){if(tt.isString(e))try{return(t||JSON.parse)(e),tt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Nd={transitional:w5,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=tt.isObject(t);if(i&&tt.isHTMLForm(t)&&(t=new FormData(t)),tt.isFormData(t))return a?JSON.stringify(QH(t)):t;if(tt.isArrayBuffer(t)||tt.isBuffer(t)||tt.isStream(t)||tt.isFile(t)||tt.isBlob(t)||tt.isReadableStream(t))return t;if(tt.isArrayBufferView(t))return t.buffer;if(tt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return V6e(t,this.formSerializer).toString();if((l=tt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return $v(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),K6e(t)):t}],transformResponse:[function(t){const r=this.transitional||Nd.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(tt.isResponse(t)||tt.isReadableStream(t))return t;if(t&&tt.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?jt.from(l,jt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kn.classes.FormData,Blob:kn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tt.forEach(["delete","get","head","post","put","patch"],e=>{Nd.headers[e]={}});const W6e=tt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),G6e=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
895
895
|
`).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&W6e[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},ej=Symbol("internals");function Pd(e){return e&&String(e).trim().toLowerCase()}function Uv(e){return e===!1||e==null?e:tt.isArray(e)?e.map(Uv):String(e)}function Y6e(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Z6e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function S5(e,t,r,n,a){if(tt.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!tt.isString(t)){if(tt.isString(n))return t.indexOf(n)!==-1;if(tt.isRegExp(n))return n.test(t)}}function J6e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function X6e(e,t){const r=tt.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,s){return this[n].call(this,t,a,i,s)},configurable:!0})})}let ni=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(l,f,d){const h=Pd(f);if(!h)throw new Error("header name must be a non-empty string");const v=tt.findKey(a,h);(!v||a[v]===void 0||d===!0||d===void 0&&a[v]!==!1)&&(a[v||f]=Uv(l))}const s=(l,f)=>tt.forEach(l,(d,h)=>i(d,h,f));if(tt.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(tt.isString(t)&&(t=t.trim())&&!Z6e(t))s(G6e(t),r);else if(tt.isObject(t)&&tt.isIterable(t)){let l={},f,d;for(const h of t){if(!tt.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[d=h[0]]=(f=l[d])?tt.isArray(f)?[...f,h[1]]:[f,h[1]]:h[1]}s(l,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=Pd(t),t){const n=tt.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return Y6e(a);if(tt.isFunction(r))return r.call(this,a,n);if(tt.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pd(t),t){const n=tt.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||S5(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(s){if(s=Pd(s),s){const l=tt.findKey(n,s);l&&(!r||S5(n,n[l],l,r))&&(delete n[l],a=!0)}}return tt.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||S5(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return tt.forEach(this,(a,i)=>{const s=tt.findKey(n,i);if(s){r[s]=Uv(a),delete r[i];return}const l=t?J6e(i):String(i).trim();l!==i&&delete r[i],r[l]=Uv(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return tt.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&tt.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
896
896
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[ej]=this[ej]={accessors:{}}).accessors,a=this.prototype;function i(s){const l=Pd(s);n[l]||(X6e(a,s),n[l]=!0)}return tt.isArray(t)?t.forEach(i):i(t),this}};ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),tt.reduceDescriptors(ni.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),tt.freezeMethods(ni);function C5(e,t){const r=this||Nd,n=t||r,a=ni.from(n.headers);let i=n.data;return tt.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function tj(e){return!!(e&&e.__CANCEL__)}let Dd=class extends jt{constructor(t,r,n){super(t??"canceled",jt.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function rj(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new jt("Request failed with status code "+r.status,[jt.ERR_BAD_REQUEST,jt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Q6e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e2e(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),h=n[i];s||(s=d),r[a]=f,n[a]=d;let v=i,b=0;for(;v!==a;)b+=r[v++],v=v%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),d-s<t)return;const g=h&&d-h;return g?Math.round(b*1e3/g):void 0}}function t2e(e,t){let r=0,n=1e3/t,a,i;const s=(d,h=Date.now())=>{r=h,a=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const h=Date.now(),v=h-r;v>=n?s(d,h):(a=d,i||(i=setTimeout(()=>{i=null,s(a)},n-v)))},()=>a&&s(a)]}const zv=(e,t,r=3)=>{let n=0;const a=e2e(50,250);return t2e(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,f=s-n,d=a(f),h=s<=l;n=s;const v={loaded:s,total:l,progress:l?s/l:void 0,bytes:f,rate:d||void 0,estimated:d&&l&&h?(l-s)/d:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(v)},r)},nj=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ij=e=>(...t)=>tt.asap(()=>e(...t)),r2e=kn.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,kn.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(kn.origin),kn.navigator&&/(msie|trident)/i.test(kn.navigator.userAgent)):()=>!0,n2e=kn.hasStandardBrowserEnv?{write(e,t,r,n,a,i,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];tt.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),tt.isString(n)&&l.push(`path=${n}`),tt.isString(a)&&l.push(`domain=${a}`),i===!0&&l.push("secure"),tt.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function i2e(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function a2e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function aj(e,t,r){let n=!i2e(t);return e&&(n||r==!1)?a2e(e,t):t}const oj=e=>e instanceof ni?{...e}:e;function Bl(e,t){t=t||{};const r={};function n(d,h,v,b){return tt.isPlainObject(d)&&tt.isPlainObject(h)?tt.merge.call({caseless:b},d,h):tt.isPlainObject(h)?tt.merge({},h):tt.isArray(h)?h.slice():h}function a(d,h,v,b){if(tt.isUndefined(h)){if(!tt.isUndefined(d))return n(void 0,d,v,b)}else return n(d,h,v,b)}function i(d,h){if(!tt.isUndefined(h))return n(void 0,h)}function s(d,h){if(tt.isUndefined(h)){if(!tt.isUndefined(d))return n(void 0,d)}else return n(void 0,h)}function l(d,h,v){if(v in t)return n(d,h);if(v in e)return n(void 0,d)}const f={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,h,v)=>a(oj(d),oj(h),v,!0)};return tt.forEach(Object.keys({...e,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const v=tt.hasOwnProp(f,h)?f[h]:a,b=v(e[h],t[h],h);tt.isUndefined(b)&&v!==l||(r[h]=b)}),r}const sj=e=>{const t=Bl({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:l}=t;if(t.headers=s=ni.from(s),t.url=JH(aj(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),tt.isFormData(r)){if(kn.hasStandardBrowserEnv||kn.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(tt.isFunction(r.getHeaders)){const f=r.getHeaders(),d=["content-type","content-length"];Object.entries(f).forEach(([h,v])=>{d.includes(h.toLowerCase())&&s.set(h,v)})}}if(kn.hasStandardBrowserEnv&&(n&&tt.isFunction(n)&&(n=n(t)),n||n!==!1&&r2e(t.url))){const f=a&&i&&n2e.read(i);f&&s.set(a,f)}return t},o2e=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const a=sj(e);let i=a.data;const s=ni.from(a.headers).normalize();let{responseType:l,onUploadProgress:f,onDownloadProgress:d}=a,h,v,b,g,y;function _(){g&&g(),y&&y(),a.cancelToken&&a.cancelToken.unsubscribe(h),a.signal&&a.signal.removeEventListener("abort",h)}let T=new XMLHttpRequest;T.open(a.method.toUpperCase(),a.url,!0),T.timeout=a.timeout;function w(){if(!T)return;const k=ni.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),D={data:!l||l==="text"||l==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:k,config:e,request:T};rj(function(O){r(O),_()},function(O){n(O),_()},D),T=null}"onloadend"in T?T.onloadend=w:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(w)},T.onabort=function(){T&&(n(new jt("Request aborted",jt.ECONNABORTED,e,T)),T=null)},T.onerror=function(B){const D=B&&B.message?B.message:"Network Error",N=new jt(D,jt.ERR_NETWORK,e,T);N.event=B||null,n(N),T=null},T.ontimeout=function(){let B=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const D=a.transitional||w5;a.timeoutErrorMessage&&(B=a.timeoutErrorMessage),n(new jt(B,D.clarifyTimeoutError?jt.ETIMEDOUT:jt.ECONNABORTED,e,T)),T=null},i===void 0&&s.setContentType(null),"setRequestHeader"in T&&tt.forEach(s.toJSON(),function(B,D){T.setRequestHeader(D,B)}),tt.isUndefined(a.withCredentials)||(T.withCredentials=!!a.withCredentials),l&&l!=="json"&&(T.responseType=a.responseType),d&&([b,y]=zv(d,!0),T.addEventListener("progress",b)),f&&T.upload&&([v,g]=zv(f),T.upload.addEventListener("progress",v),T.upload.addEventListener("loadend",g)),(a.cancelToken||a.signal)&&(h=k=>{T&&(n(!k||k.type?new Dd(null,e,T):k),T.abort(),T=null)},a.cancelToken&&a.cancelToken.subscribe(h),a.signal&&(a.signal.aborted?h():a.signal.addEventListener("abort",h)));const M=Q6e(a.url);if(M&&kn.protocols.indexOf(M)===-1){n(new jt("Unsupported protocol "+M+":",jt.ERR_BAD_REQUEST,e));return}T.send(i||null)})},s2e=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(d){if(!a){a=!0,l();const h=d instanceof Error?d:this.reason;n.abort(h instanceof jt?h:new Dd(h instanceof Error?h.message:h))}};let s=t&&setTimeout(()=>{s=null,i(new jt(`timeout of ${t}ms exceeded`,jt.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>tt.asap(l),f}},l2e=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},u2e=async function*(e,t){for await(const r of c2e(e))yield*l2e(r,t)},c2e=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},lj=(e,t,r,n)=>{const a=u2e(e,t);let i=0,s,l=f=>{s||(s=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await a.next();if(d){l(),f.close();return}let v=h.byteLength;if(r){let b=i+=v;r(b)}f.enqueue(new Uint8Array(h))}catch(d){throw l(d),d}},cancel(f){return l(f),a.return()}},{highWaterMark:2})},uj=64*1024,{isFunction:Vv}=tt,f2e=(({Request:e,Response:t})=>({Request:e,Response:t}))(tt.global),{ReadableStream:cj,TextEncoder:fj}=tt.global,dj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},d2e=e=>{e=tt.merge.call({skipUndefined:!0},f2e,e);const{fetch:t,Request:r,Response:n}=e,a=t?Vv(t):typeof fetch=="function",i=Vv(r),s=Vv(n);if(!a)return!1;const l=a&&Vv(cj),f=a&&(typeof fj=="function"?(y=>_=>y.encode(_))(new fj):async y=>new Uint8Array(await new r(y).arrayBuffer())),d=i&&l&&dj(()=>{let y=!1;const _=new r(kn.origin,{body:new cj,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!_}),h=s&&l&&dj(()=>tt.isReadableStream(new n("").body)),v={stream:h&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!v[y]&&(v[y]=(_,T)=>{let w=_&&_[y];if(w)return w.call(_);throw new jt(`Response type '${y}' is not supported`,jt.ERR_NOT_SUPPORT,T)})});const b=async y=>{if(y==null)return 0;if(tt.isBlob(y))return y.size;if(tt.isSpecCompliantForm(y))return(await new r(kn.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(tt.isArrayBufferView(y)||tt.isArrayBuffer(y))return y.byteLength;if(tt.isURLSearchParams(y)&&(y=y+""),tt.isString(y))return(await f(y)).byteLength},g=async(y,_)=>{const T=tt.toFiniteNumber(y.getContentLength());return T??b(_)};return async y=>{let{url:_,method:T,data:w,signal:M,cancelToken:k,timeout:B,onDownloadProgress:D,onUploadProgress:N,responseType:O,headers:P,withCredentials:L="same-origin",fetchOptions:F}=sj(y),S=t||fetch;O=O?(O+"").toLowerCase():"text";let o=s2e([M,k&&k.toAbortSignal()],B),u=null;const p=o&&o.unsubscribe&&(()=>{o.unsubscribe()});let m;try{if(N&&d&&T!=="get"&&T!=="head"&&(m=await g(P,w))!==0){let I=new r(_,{method:"POST",body:w,duplex:"half"}),x;if(tt.isFormData(w)&&(x=I.headers.get("content-type"))&&P.setContentType(x),I.body){const[q,H]=nj(m,zv(ij(N)));w=lj(I.body,uj,q,H)}}tt.isString(L)||(L=L?"include":"omit");const E=i&&"credentials"in r.prototype,A={...F,signal:o,method:T.toUpperCase(),headers:P.normalize().toJSON(),body:w,duplex:"half",credentials:E?L:void 0};u=i&&new r(_,A);let R=await(i?S(u,F):S(_,A));const C=h&&(O==="stream"||O==="response");if(h&&(D||C&&p)){const I={};["status","statusText","headers"].forEach(Y=>{I[Y]=R[Y]});const x=tt.toFiniteNumber(R.headers.get("content-length")),[q,H]=D&&nj(x,zv(ij(D),!0))||[];R=new n(lj(R.body,uj,q,()=>{H&&H(),p&&p()}),I)}O=O||"text";let c=await v[tt.findKey(v,O)||"text"](R,y);return!C&&p&&p(),await new Promise((I,x)=>{rj(I,x,{data:c,headers:ni.from(R.headers),status:R.status,statusText:R.statusText,config:y,request:u})})}catch(E){throw p&&p(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new jt("Network Error",jt.ERR_NETWORK,y,u,E&&E.response),{cause:E.cause||E}):jt.from(E,E&&E.code,y,u,E&&E.response)}}},h2e=new Map,hj=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:a}=t,i=[n,a,r];let s=i.length,l=s,f,d,h=h2e;for(;l--;)f=i[l],d=h.get(f),d===void 0&&h.set(f,d=l?new Map:d2e(t)),h=d;return d};hj();const M5={http:D6e,xhr:o2e,fetch:{get:hj}};tt.forEach(M5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pj=e=>`- ${e}`,p2e=e=>tt.isFunction(e)||e===null||e===!1;function v2e(e,t){e=tt.isArray(e)?e:[e];const{length:r}=e;let n,a;const i={};for(let s=0;s<r;s++){n=e[s];let l;if(a=n,!p2e(n)&&(a=M5[(l=String(n)).toLowerCase()],a===void 0))throw new jt(`Unknown adapter '${l}'`);if(a&&(tt.isFunction(a)||(a=a.get(t))))break;i[l||"#"+s]=a}if(!a){const s=Object.entries(i).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?s.length>1?`since :
|
|
897
897
|
`+s.map(pj).join(`
|