@syncfy/authentication-widget 0.0.5 → 0.0.6

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.
@@ -681,7 +681,7 @@
681
681
  */os(sz,lz,"app");function fz(){const t=Ox({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"});y4(t),dr("load")}function dr(e,t){const r=y4();b4(r,e,{environment:{}.NODE_ENV,eventAction:e,...t||{}})}const Mo={prefix:"$",suffix:"",thousands:",",decimal:".",precision:2,allowBlank:!1,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER};function uz(e,t=Mo){typeof e=="number"&&(e=e.toFixed(x4(t.precision)));const r=e.indexOf("-")>=0?"-":"",n=E4(e),a=S4(n,t.precision),i=M4(a).split(".");let o=i[0];const l=i[1];return o=dz(o,t.thousands),t.prefix+r+pz(o,l,t.decimal)+t.suffix}function cz(e,t){const r=e.indexOf("-")>=0?-1:1,n=E4(e),a=S4(n,t);return parseFloat(a)*r}function E4(e){return M4(e).replace(/\D+/g,"")||"0"}function x4(e){return hz(0,e,20)}function hz(e,t,r){return Math.max(e,Math.min(t,r))}function S4(e,t){const r=Math.pow(10,t);return(parseFloat(e)/r).toFixed(x4(t))}function dz(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,`$1${t}`)}function pz(e,t,r){return t?e+r+t:e}function M4(e){return e?e.toString():""}function ul(e){this._maxSize=e,this.clear()}ul.prototype.clear=function(){this._size=0,this._values=Object.create(null)},ul.prototype.get=function(e){return this._values[e]},ul.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var vz=/[^.^\]^[]+|(?=\[\]|\.\.)/g,C4=/^\d+$/,mz=/^\d/,gz=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,yz=/^\s*(['"]?)(.*?)(\1)\s*$/,pg=512,T4=new ul(pg),A4=new ul(pg),I4=new ul(pg),cl={Cache:ul,split:mg,normalizePath:vg,setter:function(e){var t=vg(e);return A4.get(e)||A4.set(e,function(n,a){for(var i=0,o=t.length,l=n;i<o-1;){var f=t[i];if(f==="__proto__"||f==="constructor"||f==="prototype")return n;l=l[t[i++]]}l[t[i]]=a})},getter:function(e,t){var r=vg(e);return I4.get(e)||I4.set(e,function(a){for(var i=0,o=r.length;i<o;)if(a!=null||!t)a=a[r[i++]];else return;return a})},join:function(e){return e.reduce(function(t,r){return t+(gg(r)||C4.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){bz(Array.isArray(e)?e:mg(e),t,r)}};function vg(e){return T4.get(e)||T4.set(e,mg(e).map(function(t){return t.replace(yz,"$2")}))}function mg(e){return e.match(vz)||[""]}function bz(e,t,r){var n=e.length,a,i,o,l;for(i=0;i<n;i++)a=e[i],a&&(Ez(a)&&(a='"'+a+'"'),l=gg(a),o=!l&&/^\d+$/.test(a),t.call(r,a,l,o,i,e))}function gg(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function _z(e){return e.match(mz)&&!e.match(C4)}function wz(e){return gz.test(e)}function Ez(e){return!gg(e)&&(_z(e)||wz(e))}const xz=/[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,gd=e=>e.match(xz)||[],yd=e=>e[0].toUpperCase()+e.slice(1),yg=(e,t)=>gd(e).join(t).toLowerCase(),B4=e=>gd(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var bg={words:gd,upperFirst:yd,camelCase:B4,pascalCase:e=>yd(B4(e)),snakeCase:e=>yg(e,"_"),kebabCase:e=>yg(e,"-"),sentenceCase:e=>yd(yg(e," ")),titleCase:e=>gd(e).map(yd).join(" ")},_g={exports:{}};_g.exports=function(e){return k4(Sz(e),e)},_g.exports.array=k4;function k4(e,t){var r=e.length,n=new Array(r),a={},i=r,o=Mz(t),l=Cz(e);for(t.forEach(function(u){if(!l.has(u[0])||!l.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||f(e[i],i,new Set);return n;function f(u,d,m){if(m.has(u)){var v;try{v=", node was:"+JSON.stringify(u)}catch{v=""}throw new Error("Cyclic dependency"+v)}if(!l.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[d]){a[d]=!0;var y=o.get(u)||new Set;if(y=Array.from(y),d=y.length){m.add(u);do{var _=y[--d];f(_,l.get(_),m)}while(d);m.delete(u)}n[--r]=u}}}function Sz(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var a=e[r];t.add(a[0]),t.add(a[1])}return Array.from(t)}function Mz(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var a=e[r];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}function Cz(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var Tz=_g.exports;const Az=od(Tz),Iz=Object.prototype.toString,Bz=Error.prototype.toString,kz=RegExp.prototype.toString,Nz=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Oz=/^Symbol\((.*)\)(.*)$/;function Rz(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function N4(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Rz(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Nz.call(e).replace(Oz,"Symbol($1)");const n=Iz.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Bz.call(e)+"]":n==="RegExp"?kz.call(e):null}function hl(e,t){let r=N4(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=N4(this[n],t);return i!==null?i:a},2)}function O4(e){return e==null?[]:[].concat(e)}let Pz=/\$\{\s*(\w+)\s*\}/g;class Wn extends Error{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(Pz,(a,i)=>hl(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],O4(t).forEach(i=>{Wn.isError(i)?(this.errors.push(...i.errors),this.inner=this.inner.concat(i.inner.length?i.inner:i)):this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Wn)}}let Co={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 \`${hl(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${hl(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${hl(r,!0)}\``+a}},ca={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",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ls={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"},wg={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Eg={isValue:"${path} field must be ${value}"},xg={noUnknown:"${path} field has unspecified keys: ${unknown}"},bd={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:Co,string:ca,number:ls,date:wg,object:xg,array:bd,boolean:Eg});const ic=e=>e&&e.__isYupSchema__;class _d{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,o=typeof n=="function"?n:(...l)=>l.every(f=>f===n);return new _d(t,(l,f)=>{var u;let d=o(...l)?a:i;return(u=d==null?void 0:d(f))!=null?u: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==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!ic(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const wd={context:"$",value:"."};class dl{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]===wd.context,this.isValue=this.key[0]===wd.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?wd.context:this.isValue?wd.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&cl.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==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}dl.prototype.__isYupRef=!0;const ha=e=>e==null;function Bf(e){function t({value:r,path:n="",options:a,originalValue:i,schema:o},l,f){const{name:u,test:d,params:m,message:v,skipAbsent:y}=e;let{parent:_,context:E,abortEarly:C=o.spec.abortEarly}=a;function T(U){return dl.isRef(U)?U.getValue(r,_,E):U}function I(U={}){const M=Object.assign({value:r,originalValue:i,label:o.spec.label,path:U.path||n,spec:o.spec},m,U.params);for(const h of Object.keys(M))M[h]=T(M[h]);const s=new Wn(Wn.formatError(U.message||v,M),r,M.path,U.type||u);return s.params=M,s}const k=C?l:f;let N={path:n,parent:_,type:u,from:a.from,createError:I,resolve:T,options:a,originalValue:i,schema:o};const O=U=>{Wn.isError(U)?k(U):U?f(null):k(I())},P=U=>{Wn.isError(U)?k(U):l(U)},z=y&&ha(r);if(!a.sync){try{Promise.resolve(z?!0:d.call(N,r,N)).then(O,P)}catch(U){P(U)}return}let V;try{var L;if(V=z?!0:d.call(N,r,N),typeof((L=V)==null?void 0:L.then)=="function")throw new Error(`Validation test of type: "${N.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(U){P(U);return}O(V)}return t.OPTIONS=e,t}function Fz(e,t,r,n=r){let a,i,o;return t?(cl.forEach(t,(l,f,u)=>{let d=f?l.slice(1,l.length-1):l;e=e.resolve({context:n,parent:a,value:r});let m=e.type==="tuple",v=u?parseInt(d,10):0;if(e.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&v>=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[v],e=m?e.spec.types[v]:e.innerType}if(!u){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=r,r=r&&r[d],e=e.fields[d]}i=d,o=f?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Ed extends Set{describe(){const t=[];for(const r of this.values())t.push(dl.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 Ed(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function kf(e,t=new Map){if(ic(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]=kf(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,kf(a,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(kf(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,a]of Object.entries(e))r[n]=kf(a,t)}else throw Error(`Unable to clone ${e}`);return r}let li=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 Ed,this._blacklist=new Ed,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Co.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,optional:!0,coerce:!0},t==null?void 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=kf(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(o=>{i.test(o.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;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})}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&&ha(i))return i;let o=hl(t),l=hl(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
682
682
 
683
683
  attempted value: ${o}
684
- `+(l!==o?`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:o=t,strict:l=this.spec.strict}=r,f=t;l||(f=this._cast(f,Object.assign({assert:!1},r)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:i,value:f,originalValue:o,options:r,tests:u},n,d=>{if(d.length)return a(d,f);this.runTests({path:i,value:f,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:l,path:f,options:u}=t,d=E=>{a||(a=!0,r(E,o))},m=E=>{a||(a=!0,n(E,o))},v=i.length,y=[];if(!v)return m([]);let _={value:o,originalValue:l,path:f,options:u,schema:this};for(let E=0;E<i.length;E++){const C=i[E];C(_,d,function(I){I&&(y=y.concat(I)),--v<=0&&m(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:a,originalParent:i,options:o}){const l=t??r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof l=="number";let u=n[l];const d=Object.assign({},o,{strict:!0,parent:n,value:u,originalValue:i[l],key:void 0,[f?"index":"key"]:l,path:f||l.includes(".")?`${a||""}[${u?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(m,v,y)=>this.resolve(d)._validate(u,d,v,y)}validate(t,r){let n=this.resolve(Object.assign({},r,{value:t}));return new Promise((a,i)=>n._validate(t,r,(o,l)=>{Wn.isError(o)&&(o.value=l),i(o)},(o,l)=>{o.length?i(new Wn(o,l)):a(l)}))}validateSync(t,r){let n=this.resolve(Object.assign({},r,{value:t})),a;return n._validate(t,Object.assign({},r,{sync:!0}),(i,o)=>{throw Wn.isError(i)&&(i.value=o),i},(i,o)=>{if(i.length)throw new Wn(i,t);a=o}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Wn.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Wn.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):kf(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=Bf({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=Bf({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Co.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Co.notNull){return this.nullability(!1,t)}required(t=Co.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=Co.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Bf(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(o=>!(o.OPTIONS.name===r.name&&(i||o.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=O4(t).map(i=>new dl(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _d(a,r):_d.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Bf({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=Co.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Bf({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=Co.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Bf({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!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:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,u,d)=>d.findIndex(m=>m.name===f.name)===u)}}};li.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])li.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=Fz(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])li.prototype[e]=li.prototype.oneOf;for(const e of["not","nope"])li.prototype[e]=li.prototype.notOneOf;const Lz=()=>!0;function R4(e){return new P4(e)}class P4 extends li{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Lz},t))}}R4.prototype=P4.prototype;function In(){return new F4}class F4 extends li{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=Eg.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return ha(r)||r===!0}})}isFalse(t=Eg.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return ha(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)}}In.prototype=F4.prototype;let Dz=/^[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])?)*$/,$z=/^((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,zz=/^(?:[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,Uz=e=>ha(e)||e===e.trim(),qz={}.toString();function wr(){return new L4}class L4 extends li{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===qz?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Co.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=ca.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=ca.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=ca.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||ca.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=ca.email){return this.matches(Dz,{name:"email",message:t,excludeEmptyString:!0})}url(t=ca.url){return this.matches($z,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ca.uuid){return this.matches(zz,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ca.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Uz})}lowercase(t=ca.lowercase){return this.transform(r=>ha(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ha(r)||r===r.toLowerCase()})}uppercase(t=ca.uppercase){return this.transform(r=>ha(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ha(r)||r===r.toUpperCase()})}}wr.prototype=L4.prototype;let Vz=e=>e!=+e;function xd(){return new D4}class D4 extends li{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Vz(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=ls.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=ls.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=ls.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=ls.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=ls.positive){return this.moreThan(0,t)}negative(t=ls.negative){return this.lessThan(0,t)}integer(t=ls.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>ha(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=>ha(a)?a:Math[t](a))}}xd.prototype=D4.prototype;var Hz=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function jz(e){var t=[1,4,5,6,7,10,11],r=0,n,a;if(a=Hz.exec(e)){for(var i=0,o;o=t[i];++i)a[o]=+a[o]||0;a[2]=(+a[2]||1)-1,a[3]=+a[3]||1,a[7]=a[7]?String(a[7]).substr(0,3):0,(a[8]===void 0||a[8]==="")&&(a[9]===void 0||a[9]==="")?n=+new Date(a[1],a[2],a[3],a[4],a[5],a[6],a[7]):(a[8]!=="Z"&&a[9]!==void 0&&(r=a[10]*60+a[11],a[9]==="+"&&(r=0-r)),n=Date.UTC(a[1],a[2],a[3],a[4],a[5]+r,a[6],a[7]))}else n=Date.parse?Date.parse(e):NaN;return n}let Kz=new Date(""),Wz=e=>Object.prototype.toString.call(e)==="[object Date]";class Sd extends li{constructor(){super({type:"date",check(t){return Wz(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=jz(t),isNaN(t)?Sd.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(dl.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=wg.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=wg.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)}})}}Sd.INVALID_DATE=Kz,Sd.prototype;function Gz(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,l])=>`${o}-${l}`));function i(o,l){let f=cl.split(o)[0];n.add(f),a.has(`${l}-${f}`)||r.push([l,f])}for(const o of Object.keys(e)){let l=e[o];n.add(o),dl.isRef(l)&&l.isSibling?i(l.path,o):ic(l)&&"deps"in l&&l.deps.forEach(f=>i(f,o))}return Az.array(Array.from(n),r).reverse()}function $4(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 z4(e){return(t,r)=>$4(e,t)-$4(e,r)}const U4=(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 Md(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Md(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Md(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Md)}):"optional"in e?e.optional():e}const Zz=(e,t)=>{const r=[...cl.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=cl.getter(cl.join(r),!0)(e);return!!(a&&n in a)};let q4=e=>Object.prototype.toString.call(e)==="[object Object]";function Yz(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jz=z4([]);function da(e){return new V4(e)}class V4 extends li{constructor(t){super({type:"object",check(r){return q4(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jz,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,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),f={},u=Object.assign({},r,{parent:f,__validating:r.__validating||!1}),d=!1;for(const m of l){let v=i[m],y=m in a;if(v){let _,E=a[m];u.path=(r.path?`${r.path}.`:"")+m,v=v.resolve({value:E,context:r.context,parent:f});let C=v instanceof li?v.spec:void 0,T=C==null?void 0:C.strict;if(C!=null&&C.strip){d=d||m in a;continue}_=!r.__validating||!T?v.cast(a[m],u):a[m],_!==void 0&&(f[m]=_)}else y&&!o&&(f[m]=a[m]);(y!==m in f||f[m]!==a[m])&&(d=!0)}return d?f:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(f,u)=>{if(!l||!q4(u)){a(f,u);return}o=o||u;let d=[];for(let m of this._nodes){let v=this.fields[m];!v||dl.isRef(v)||d.push(v.asNestedTest({options:r,key:m,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:d,value:u,originalValue:o,options:r},n,m=>{a(m.sort(this._sortErrors).concat(f),u)})})}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 o=n[a];n[a]=o===void 0?i:o}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 o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gz(t,r),n._sortErrors=z4(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 Md(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=cl.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return Zz(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(U4)}noUnknown(t=!0,r=xg.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=Yz(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=xg.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(bg.camelCase)}snakeCase(){return this.transformKeys(bg.snakeCase)}constantCase(){return this.transformKeys(t=>bg.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}da.prototype=V4.prototype;function fs(e){return new H4(e)}class H4 extends li{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((o,l)=>{const f=this.innerType.cast(o,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return f!==o&&(a=!0),f});return a?i:n}_validate(t,r={},n,a){var i;let o=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(f,u)=>{var d;if(!l||!o||!this._typeCheck(u)){a(f,u);return}let m=new Array(u.length);for(let y=0;y<u.length;y++){var v;m[y]=o.asNestedTest({options:r,index:y,parent:u,parentPath:r.path,originalParent:(v=r.originalValue)!=null?v:t})}this.runTests({value:u,tests:m,originalValue:(d=r.originalValue)!=null?d:t,options:r},n,y=>a(y.concat(f),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(U4)}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(!ic(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+hl(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=bd.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||bd.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||bd.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){let r=super.describe(t);if(this.innerType){var n;let a=t;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),r.innerType=this.innerType.describe(a)}return r}}fs.prototype=H4.prototype;function j4(e){return new Sg(e)}class Sg{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let a=this.builder(r,n);if(!ic(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 Sg(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,o=a[n??r];return this._resolve(o,Object.assign({},i,{value:o,parent:a})).asNestedTest(t)}validate(t,r){return this._resolve(t,r).validate(t,r)}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return this._resolve(r,n).validateAt(t,r,n)}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){return this._resolve(t,r).isValid(t,r)}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}}const Mg=da().noUnknown().shape({locale:wr().oneOf(["es","en"]),navigation:da().noUnknown().shape({disableFormAutocomplete:In(),displayBusinessSites:In(),displayErrorsInToast:In(),displayLogoImages:In(),displayLongDescription:In(),displayPersonalSites:In(),displaySiteOrganizations:fs().of(wr()),displaySiteOrganizationTypes:fs().of(wr()),displaySites:fs().of(wr()),displayStatusInToast:In(),enableBackNavigation:In(),enableTwofaBackNavigation:In(),formButtonsDisabledStyle:In(),formShowPasswordStyle:wr().oneOf(["icon","none","text"]),hideSelectCountry:In(),hideSiteOrganizations:fs().of(wr()),hideSiteOrganizationTypes:fs().of(wr()),hideSites:fs().of(wr()),oneSiteFlow:In(),quickAnswer:In(),returnToSiteFormOnUserError:j4(e=>typeof e=="object"?fs().of(xd().oneOf([401,403,411])):In()),selectClass:wr(),socketTimeout:xd().min(1),toastDuration:xd().min(0),toastPosition:wr().oneOf(["bottom-left","bottom-right","top-left","top-right"])}),entrypoint:da().noUnknown().shape({account:wr(),country:wr(),credential:wr(),site:wr(),siteOrganizationType:wr(),transfer:wr()}),__internal__:da().noUnknown().shape({apiBaseUrl:wr(),apiEnv:wr().oneOf(["development","production"]),assetsBaseUrl:wr(),plaidSites:In(),defaultHttpParams:da()})}),Xz=da().shape({token:wr().required(),element:j4(e=>{switch(typeof e){case"string":return wr().test("isElement","${path} is not an Element",t=>{if(!document.querySelector(t))throw new Wn(`Invalid selector: Element "${t}" not found.`);return!0});case"object":return da().test("isElement","${path} is not an Element",t=>{if(!JF(t))throw new Wn("Invalid element: Object should be a valid HtmlElement.");return!0});default:wr()}}),refreshTokenFunction:R4().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),enableTestMode:In(),strict:da().noUnknown().nullable().shape({authorization:da().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required()}),body:da().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:Mg}).strict().noUnknown();let Cg={git:{dirty:!1,raw:"v0.0.5-0-g405162e",hash:"g405162e",distance:0,tag:"v0.0.5",semver:{options:{loose:!1,includePrerelease:!1},loose:!1,raw:"v0.0.5",major:0,minor:0,patch:5,prerelease:[],build:[],version:"0.0.5"},suffix:"0-g405162e",semverString:"0.0.5"}};function ac(){let e=`${Cg.git.tag}.${Cg.git.distance}`;return{}.NODE_ENV==="production"?e=`${e}-beta`:e=`${e}-${Cg.git.hash}`,e}function Qz(e,t){const r=parseInt("0x4",16),n="38060000000000000000000000000000000000000000000F00000000000000000000000000000000000D9802010000010101000000000000";let a;return console.log("OBTEINING BRIDGE SCRIPTS"),console.log("TOKEN",e),console.log("CHALLENGE",t),eU().then(()=>(console.log("BRIDGE SCRIPTS OK"),a=new digipass.nativebridge.DP110,new Promise((o,l)=>{console.log(" PROCESSING BRIDGE CONNECTION"),a.onError(()=>(console.log(" ERROR ON BRIDGE CONNECTION"),l("bridge.not_ready"))),a.onReady(f=>{console.log("BRIDGE CONNECTION READY"),console.log("DATA VERSION",f.versionCode),console.log("BRIDGE VERSION",a.versionCode),f.versionCode<a.versionCode&&l("bridge.host_update_available");const u=a.isReady();if(console.log("BRIDGE CONNECTION READY VERIFICATION",u),u)console.log("COMMAND_ID",r),a.getTokenInfo(r,function(d){if(console.log("BRIDGE CONNECTION getTokenInfo",d,d.returnCode),d.returnCode!==0)return l(`bridge.${Math.abs(d.returnCode)}`);console.log("STATIC_VECTOR",n),a.generateOTP(n,t,function(m){if(console.log("BRIDGE CONNECTION generateOTP",m,m.returnCode),m.returnCode!==0)return l(`bridge.${Math.abs(m.returnCode)}`);o({token:`${e}XX${m.otp}XX${d.info}XX${f.versionCode}`,challenge:t})})});else return Promise.reject("bridge.not_ready")})})))}function eU(){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 tU(){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?Cd(!1,!1):console.log("*Error "+t.returnCode+`*
684
+ `+(l!==o?`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:o=t,strict:l=this.spec.strict}=r,f=t;l||(f=this._cast(f,Object.assign({assert:!1},r)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:i,value:f,originalValue:o,options:r,tests:u},n,d=>{if(d.length)return a(d,f);this.runTests({path:i,value:f,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:l,path:f,options:u}=t,d=E=>{a||(a=!0,r(E,o))},m=E=>{a||(a=!0,n(E,o))},v=i.length,y=[];if(!v)return m([]);let _={value:o,originalValue:l,path:f,options:u,schema:this};for(let E=0;E<i.length;E++){const C=i[E];C(_,d,function(I){I&&(y=y.concat(I)),--v<=0&&m(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:a,originalParent:i,options:o}){const l=t??r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof l=="number";let u=n[l];const d=Object.assign({},o,{strict:!0,parent:n,value:u,originalValue:i[l],key:void 0,[f?"index":"key"]:l,path:f||l.includes(".")?`${a||""}[${u?l:`"${l}"`}]`:(a?`${a}.`:"")+t});return(m,v,y)=>this.resolve(d)._validate(u,d,v,y)}validate(t,r){let n=this.resolve(Object.assign({},r,{value:t}));return new Promise((a,i)=>n._validate(t,r,(o,l)=>{Wn.isError(o)&&(o.value=l),i(o)},(o,l)=>{o.length?i(new Wn(o,l)):a(l)}))}validateSync(t,r){let n=this.resolve(Object.assign({},r,{value:t})),a;return n._validate(t,Object.assign({},r,{sync:!0}),(i,o)=>{throw Wn.isError(i)&&(i.value=o),i},(i,o)=>{if(i.length)throw new Wn(i,t);a=o}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Wn.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Wn.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):kf(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=Bf({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=Bf({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Co.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Co.notNull){return this.nullability(!1,t)}required(t=Co.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=Co.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Bf(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(o=>!(o.OPTIONS.name===r.name&&(i||o.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=O4(t).map(i=>new dl(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _d(a,r):_d.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Bf({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=Co.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Bf({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=Co.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Bf({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!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:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,u,d)=>d.findIndex(m=>m.name===f.name)===u)}}};li.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])li.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=Fz(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])li.prototype[e]=li.prototype.oneOf;for(const e of["not","nope"])li.prototype[e]=li.prototype.notOneOf;const Lz=()=>!0;function R4(e){return new P4(e)}class P4 extends li{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Lz},t))}}R4.prototype=P4.prototype;function In(){return new F4}class F4 extends li{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=Eg.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return ha(r)||r===!0}})}isFalse(t=Eg.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return ha(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)}}In.prototype=F4.prototype;let Dz=/^[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])?)*$/,$z=/^((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,zz=/^(?:[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,Uz=e=>ha(e)||e===e.trim(),qz={}.toString();function wr(){return new L4}class L4 extends li{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===qz?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Co.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=ca.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=ca.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=ca.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||ca.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=ca.email){return this.matches(Dz,{name:"email",message:t,excludeEmptyString:!0})}url(t=ca.url){return this.matches($z,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ca.uuid){return this.matches(zz,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ca.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Uz})}lowercase(t=ca.lowercase){return this.transform(r=>ha(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ha(r)||r===r.toLowerCase()})}uppercase(t=ca.uppercase){return this.transform(r=>ha(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ha(r)||r===r.toUpperCase()})}}wr.prototype=L4.prototype;let Vz=e=>e!=+e;function xd(){return new D4}class D4 extends li{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Vz(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=ls.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=ls.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=ls.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=ls.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=ls.positive){return this.moreThan(0,t)}negative(t=ls.negative){return this.lessThan(0,t)}integer(t=ls.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>ha(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=>ha(a)?a:Math[t](a))}}xd.prototype=D4.prototype;var Hz=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function jz(e){var t=[1,4,5,6,7,10,11],r=0,n,a;if(a=Hz.exec(e)){for(var i=0,o;o=t[i];++i)a[o]=+a[o]||0;a[2]=(+a[2]||1)-1,a[3]=+a[3]||1,a[7]=a[7]?String(a[7]).substr(0,3):0,(a[8]===void 0||a[8]==="")&&(a[9]===void 0||a[9]==="")?n=+new Date(a[1],a[2],a[3],a[4],a[5],a[6],a[7]):(a[8]!=="Z"&&a[9]!==void 0&&(r=a[10]*60+a[11],a[9]==="+"&&(r=0-r)),n=Date.UTC(a[1],a[2],a[3],a[4],a[5]+r,a[6],a[7]))}else n=Date.parse?Date.parse(e):NaN;return n}let Kz=new Date(""),Wz=e=>Object.prototype.toString.call(e)==="[object Date]";class Sd extends li{constructor(){super({type:"date",check(t){return Wz(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=jz(t),isNaN(t)?Sd.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(dl.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=wg.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=wg.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)}})}}Sd.INVALID_DATE=Kz,Sd.prototype;function Gz(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,l])=>`${o}-${l}`));function i(o,l){let f=cl.split(o)[0];n.add(f),a.has(`${l}-${f}`)||r.push([l,f])}for(const o of Object.keys(e)){let l=e[o];n.add(o),dl.isRef(l)&&l.isSibling?i(l.path,o):ic(l)&&"deps"in l&&l.deps.forEach(f=>i(f,o))}return Az.array(Array.from(n),r).reverse()}function $4(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 z4(e){return(t,r)=>$4(e,t)-$4(e,r)}const U4=(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 Md(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Md(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Md(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Md)}):"optional"in e?e.optional():e}const Zz=(e,t)=>{const r=[...cl.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=cl.getter(cl.join(r),!0)(e);return!!(a&&n in a)};let q4=e=>Object.prototype.toString.call(e)==="[object Object]";function Yz(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jz=z4([]);function da(e){return new V4(e)}class V4 extends li{constructor(t){super({type:"object",check(r){return q4(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jz,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,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),f={},u=Object.assign({},r,{parent:f,__validating:r.__validating||!1}),d=!1;for(const m of l){let v=i[m],y=m in a;if(v){let _,E=a[m];u.path=(r.path?`${r.path}.`:"")+m,v=v.resolve({value:E,context:r.context,parent:f});let C=v instanceof li?v.spec:void 0,T=C==null?void 0:C.strict;if(C!=null&&C.strip){d=d||m in a;continue}_=!r.__validating||!T?v.cast(a[m],u):a[m],_!==void 0&&(f[m]=_)}else y&&!o&&(f[m]=a[m]);(y!==m in f||f[m]!==a[m])&&(d=!0)}return d?f:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(f,u)=>{if(!l||!q4(u)){a(f,u);return}o=o||u;let d=[];for(let m of this._nodes){let v=this.fields[m];!v||dl.isRef(v)||d.push(v.asNestedTest({options:r,key:m,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:d,value:u,originalValue:o,options:r},n,m=>{a(m.sort(this._sortErrors).concat(f),u)})})}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 o=n[a];n[a]=o===void 0?i:o}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 o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gz(t,r),n._sortErrors=z4(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 Md(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=cl.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return Zz(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(U4)}noUnknown(t=!0,r=xg.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=Yz(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=xg.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(bg.camelCase)}snakeCase(){return this.transformKeys(bg.snakeCase)}constantCase(){return this.transformKeys(t=>bg.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}da.prototype=V4.prototype;function fs(e){return new H4(e)}class H4 extends li{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((o,l)=>{const f=this.innerType.cast(o,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return f!==o&&(a=!0),f});return a?i:n}_validate(t,r={},n,a){var i;let o=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(f,u)=>{var d;if(!l||!o||!this._typeCheck(u)){a(f,u);return}let m=new Array(u.length);for(let y=0;y<u.length;y++){var v;m[y]=o.asNestedTest({options:r,index:y,parent:u,parentPath:r.path,originalParent:(v=r.originalValue)!=null?v:t})}this.runTests({value:u,tests:m,originalValue:(d=r.originalValue)!=null?d:t,options:r},n,y=>a(y.concat(f),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(U4)}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(!ic(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+hl(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=bd.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||bd.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||bd.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){let r=super.describe(t);if(this.innerType){var n;let a=t;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),r.innerType=this.innerType.describe(a)}return r}}fs.prototype=H4.prototype;function j4(e){return new Sg(e)}class Sg{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let a=this.builder(r,n);if(!ic(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 Sg(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,o=a[n??r];return this._resolve(o,Object.assign({},i,{value:o,parent:a})).asNestedTest(t)}validate(t,r){return this._resolve(t,r).validate(t,r)}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return this._resolve(r,n).validateAt(t,r,n)}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){return this._resolve(t,r).isValid(t,r)}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}}const Mg=da().noUnknown().shape({locale:wr().oneOf(["es","en"]),navigation:da().noUnknown().shape({disableFormAutocomplete:In(),displayBusinessSites:In(),displayErrorsInToast:In(),displayLogoImages:In(),displayLongDescription:In(),displayPersonalSites:In(),displaySiteOrganizations:fs().of(wr()),displaySiteOrganizationTypes:fs().of(wr()),displaySites:fs().of(wr()),displayStatusInToast:In(),enableBackNavigation:In(),enableTwofaBackNavigation:In(),formButtonsDisabledStyle:In(),formShowPasswordStyle:wr().oneOf(["icon","none","text"]),hideSelectCountry:In(),hideSiteOrganizations:fs().of(wr()),hideSiteOrganizationTypes:fs().of(wr()),hideSites:fs().of(wr()),oneSiteFlow:In(),quickAnswer:In(),returnToSiteFormOnUserError:j4(e=>typeof e=="object"?fs().of(xd().oneOf([401,403,411])):In()),selectClass:wr(),socketTimeout:xd().min(1),toastDuration:xd().min(0),toastPosition:wr().oneOf(["bottom-left","bottom-right","top-left","top-right"])}),entrypoint:da().noUnknown().shape({account:wr(),country:wr(),credential:wr(),site:wr(),siteOrganizationType:wr(),transfer:wr()}),__internal__:da().noUnknown().shape({apiBaseUrl:wr(),apiEnv:wr().oneOf(["development","production"]),assetsBaseUrl:wr(),plaidSites:In(),defaultHttpParams:da()})}),Xz=da().shape({token:wr().required(),element:j4(e=>{switch(typeof e){case"string":return wr().test("isElement","${path} is not an Element",t=>{if(!document.querySelector(t))throw new Wn(`Invalid selector: Element "${t}" not found.`);return!0});case"object":return da().test("isElement","${path} is not an Element",t=>{if(!JF(t))throw new Wn("Invalid element: Object should be a valid HtmlElement.");return!0});default:wr()}}),refreshTokenFunction:R4().test("isFunction","${path} is not a function",e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!0),enableTestMode:In(),strict:da().noUnknown().nullable().shape({authorization:da().noUnknown().required().shape({type:wr().oneOf(["jwk"]).required(),key:wr().required()}),body:da().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:Mg}).strict().noUnknown();let Cg={git:{dirty:!1,raw:"v0.0.6-0-g7912f63",hash:"g7912f63",distance:0,tag:"v0.0.6",semver:{options:{loose:!1,includePrerelease:!1},loose:!1,raw:"v0.0.6",major:0,minor:0,patch:6,prerelease:[],build:[],version:"0.0.6"},suffix:"0-g7912f63",semverString:"0.0.6"}};function ac(){let e=`${Cg.git.tag}.${Cg.git.distance}`;return{}.NODE_ENV==="production"?e=`${e}-beta`:e=`${e}-${Cg.git.hash}`,e}function Qz(e,t){const r=parseInt("0x4",16),n="38060000000000000000000000000000000000000000000F00000000000000000000000000000000000D9802010000010101000000000000";let a;return console.log("OBTEINING BRIDGE SCRIPTS"),console.log("TOKEN",e),console.log("CHALLENGE",t),eU().then(()=>(console.log("BRIDGE SCRIPTS OK"),a=new digipass.nativebridge.DP110,new Promise((o,l)=>{console.log(" PROCESSING BRIDGE CONNECTION"),a.onError(()=>(console.log(" ERROR ON BRIDGE CONNECTION"),l("bridge.not_ready"))),a.onReady(f=>{console.log("BRIDGE CONNECTION READY"),console.log("DATA VERSION",f.versionCode),console.log("BRIDGE VERSION",a.versionCode),f.versionCode<a.versionCode&&l("bridge.host_update_available");const u=a.isReady();if(console.log("BRIDGE CONNECTION READY VERIFICATION",u),u)console.log("COMMAND_ID",r),a.getTokenInfo(r,function(d){if(console.log("BRIDGE CONNECTION getTokenInfo",d,d.returnCode),d.returnCode!==0)return l(`bridge.${Math.abs(d.returnCode)}`);console.log("STATIC_VECTOR",n),a.generateOTP(n,t,function(m){if(console.log("BRIDGE CONNECTION generateOTP",m,m.returnCode),m.returnCode!==0)return l(`bridge.${Math.abs(m.returnCode)}`);o({token:`${e}XX${m.otp}XX${d.info}XX${f.versionCode}`,challenge:t})})});else return Promise.reject("bridge.not_ready")})})))}function eU(){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 tU(){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?Cd(!1,!1):console.log("*Error "+t.returnCode+`*
685
685
  `+t.returnMessage):e.timeoutValidation||(e.validOTP=!0,e.valFinalFlow=!0,e.token=t.otp,console.log(`#token: ${e.token}`),e.acceptB?Z4():(fU(),G4()))})}function rU(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,sU(e)})}function nU(e){const t=window.bridgeBluetooth;return new Promise((r,n)=>{t.resolve=r,t.reject=n,oU(e)})}function iU(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 aU().then(()=>new Promise((a,i)=>{r.resolve=a,r.reject=i,W4()}))}function aU(){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 K4(){const e=window.bridgeBluetooth;e.accesLogin?(console.log("End the process of pairing Bluetooth device and set fictitious value to user think the device works correctly"),e.cancelB||(e.valFinalFlow=!0,e.token="********",e.resolve(e.token)),e.accesLogin=!1):console.log('Confirm by choosing "YES" on your Bluetooth device')}function oU(e){const t=window.bridgeBluetooth,r=JSON.parse(e);r.estado!=="OK"?console.log("*Error "+r.codigoMensaje+`*
686
686
  `+r.descripcionMensaje):t.cancelB2||dU(r.requestMessage)}function sU(e){const t=JSON.parse(e);t.estado!=="OK"?console.log("*Error "+t.codigoMensaje+`*
687
687
  `+t.descripcionMensaje):pU(t.requestMessage)}function lU(){const e=window.bridgeBluetooth;if(!e.bridge.isReady()){e.bridge.reconnect();return}e.bridge.initializeDigipass(e.digipassSerial,function(t){t.returnCode!=0?console.log("*Error "+t.returnCode+`*
@@ -719,7 +719,7 @@ use chrome, FireFox or Internet Explorer 11`)}var t=Ht(),r=$f(),n=t.Buffer,a=t.k
719
719
  `,r},NC.decode=function(e){for(var t=[],r=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,a=/\r?\n/,i;i=r.exec(e),!!i;){var o=i[1];o==="NEW CERTIFICATE REQUEST"&&(o="CERTIFICATE REQUEST");var l={type:o,procType:null,contentDomain:null,dekInfo:null,headers:[],body:S0.util.decode64(i[3])};if(t.push(l),!!i[2]){for(var f=i[2].split(a),u=0;i&&u<f.length;){for(var d=f[u].replace(/\s+$/,""),m=u+1;m<f.length;++m){var v=f[m];if(!/\s/.test(v[0]))break;d+=v,u=m}if(i=d.match(n),i){for(var y={name:i[1],values:[]},_=i[2].split(","),E=0;E<_.length;++E)y.values.push(rQ(_[E]));if(l.procType)if(!l.contentDomain&&y.name==="Content-Domain")l.contentDomain=_[0]||"";else if(!l.dekInfo&&y.name==="DEK-Info"){if(y.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');l.dekInfo={algorithm:_[0],parameters:_[1]||null}}else l.headers.push(y);else{if(y.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(y.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');l.procType={version:_[0],type:_[1]}}}++u}if(l.procType==="ENCRYPTED"&&!l.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function M0(e){for(var t=e.name+": ",r=[],n=function(f,u){return" "+u},a=0;a<e.values.length;++a)r.push(e.values[a].replace(/^(\S+\r\n)/,n));t+=r.join(",")+`\r
720
720
  `;for(var i=0,o=-1,a=0;a<t.length;++a,++i)if(i>65&&o!==-1){var l=t[o];l===","?(++o,t=t.substr(0,o)+`\r
721
721
  `+t.substr(o)):t=t.substr(0,o)+`\r
722
- `+l+t.substr(o+1),i=a-o-1,o=-1,++a}else(t[a]===" "||t[a]===" "||t[a]===",")&&(o=a);return t}function rQ(e){return e.replace(/^\s+/,"")}var Ka=ur,OC=Ka.sha256=Ka.sha256||{};Ka.md.sha256=Ka.md.algorithms.sha256=OC,OC.create=function(){RC||nQ();var e=null,t=Ka.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i<a;++i)n.fullMessageLength.push(0);return t=Ka.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(a,i){i==="utf8"&&(a=Ka.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=o[1],o[1]=o[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(a),FC(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Ka.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=i&n.blockLength-1;a.putBytes(l2.substr(0,n.blockLength-o));for(var l,f,u=n.fullMessageLength[0]*8,d=0;d<n.fullMessageLength.length-1;++d)l=n.fullMessageLength[d+1]*8,f=l/4294967296>>>0,u+=f,a.putInt32(u>>>0),u=l>>>0;a.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};FC(m,r,a);var v=Ka.util.createBuffer();return v.putInt32(m.h0),v.putInt32(m.h1),v.putInt32(m.h2),v.putInt32(m.h3),v.putInt32(m.h4),v.putInt32(m.h5),v.putInt32(m.h6),v.putInt32(m.h7),v},n};var l2=null,RC=!1,PC=null;function nQ(){l2=String.fromCharCode(128),l2+=Ka.util.fillString(String.fromCharCode(0),64),PC=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],RC=!0}function FC(e,t,r){for(var n,a,i,o,l,f,u,d,m,v,y,_,E,C,T,I=r.length();I>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=t[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,a=t[u-15],a=(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[u]=n+t[u-7]+a+t[u-16]|0;for(d=e.h0,m=e.h1,v=e.h2,y=e.h3,_=e.h4,E=e.h5,C=e.h6,T=e.h7,u=0;u<64;++u)o=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),l=C^_&(E^C),i=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),f=d&m|v&(d^m),n=T+o+l+PC[u]+t[u],a=i+f,T=C,C=E,E=_,_=y+n>>>0,y=v,v=m,m=d,d=n+a>>>0;e.h0=e.h0+d|0,e.h1=e.h1+m|0,e.h2=e.h2+v|0,e.h3=e.h3+y|0,e.h4=e.h4+_|0,e.h5=e.h5+E|0,e.h6=e.h6+C|0,e.h7=e.h7+T|0,I-=64}}var Wa=ur,C0=null;Wa.util.isNodejs&&!Wa.options.usePureJavaScript&&!fe.versions["node-webkit"]&&(C0=wc());var iQ=Wa.prng=Wa.prng||{};iQ.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),a=0;a<32;++a)n[a]=r.create();t.pools=n,t.pool=0,t.generate=function(u,d){if(!d)return t.generateSync(u);var m=t.plugin.cipher,v=t.plugin.increment,y=t.plugin.formatKey,_=t.plugin.formatSeed,E=Wa.util.createBuffer();t.key=null,C();function C(T){if(T)return d(T);if(E.length()>=u)return d(null,E.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Wa.util.nextTick(function(){i(C)});var I=m(t.key,t.seed);t.generated+=I.length,E.putBytes(I),t.key=y(m(t.key,v(t.seed))),t.seed=_(m(t.key,t.seed)),Wa.util.setImmediate(C)}},t.generateSync=function(u){var d=t.plugin.cipher,m=t.plugin.increment,v=t.plugin.formatKey,y=t.plugin.formatSeed;t.key=null;for(var _=Wa.util.createBuffer();_.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&o();var E=d(t.key,t.seed);t.generated+=E.length,_.putBytes(E),t.key=v(d(t.key,m(t.seed))),t.seed=y(d(t.key,t.seed))}return _.getBytes(u)};function i(u){if(t.pools[0].messageLength>=32)return l(),u();var d=32-t.pools[0].messageLength<<5;t.seedFile(d,function(m,v){if(m)return u(m);t.collect(v),l(),u()})}function o(){if(t.pools[0].messageLength>=32)return l();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),l()}function l(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var d=1,m=0;m<32;++m)t.reseeds%d===0&&(u.update(t.pools[m].digest().getBytes()),t.pools[m].start()),d=d<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var v=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(v),t.generated=0}function f(u){var d=null,m=Wa.util.globalScope,v=m.crypto||m.msCrypto;v&&v.getRandomValues&&(d=function(O){return v.getRandomValues(O)});var y=Wa.util.createBuffer();if(d)for(;y.length()<u;){var _=Math.max(1,Math.min(u-y.length(),65536)/4),E=new Uint32Array(Math.floor(_));try{d(E);for(var C=0;C<E.length;++C)y.putInt32(E[C])}catch(O){if(!(typeof QuotaExceededError<"u"&&O instanceof QuotaExceededError))throw O}}if(y.length()<u)for(var T,I,k,N=Math.floor(Math.random()*65536);y.length()<u;){I=16807*(N&65535),T=16807*(N>>16),I+=(T&32767)<<16,I+=T>>15,I=(I&2147483647)+(I>>31),N=I&4294967295;for(var C=0;C<3;++C)k=N>>>(C<<3),k^=Math.floor(Math.random()*256),y.putByte(k&255)}return y.getBytes(u)}return C0?(t.seedFile=function(u,d){C0.randomBytes(u,function(m,v){if(m)return d(m);d(null,v.toString())})},t.seedFileSync=function(u){return C0.randomBytes(u).toString()}):(t.seedFile=function(u,d){try{d(null,f(u))}catch(m){d(m)}},t.seedFileSync=f),t.collect=function(u){for(var d=u.length,m=0;m<d;++m)t.pools[t.pool].update(u.substr(m,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,d){for(var m="",v=0;v<d;v+=8)m+=String.fromCharCode(u>>v&255);t.collect(m)},t.registerWorker=function(u){if(u===self)t.seedFile=function(m,v){function y(_){var E=_.data;E.forge&&E.forge.prng&&(self.removeEventListener("message",y),v(E.forge.prng.err,E.forge.prng.bytes))}self.addEventListener("message",y),self.postMessage({forge:{prng:{needed:m}}})};else{var d=function(m){var v=m.data;v.forge&&v.forge.prng&&t.seedFile(v.forge.prng.needed,function(y,_){u.postMessage({forge:{prng:{err:y,bytes:_}}})})};u.addEventListener("message",d)}},t};var Sn=ur;(function(){if(Sn.random&&Sn.random.getBytes){Sn.random;return}(function(e){var t={},r=new Array(4),n=Sn.util.createBuffer();t.formatKey=function(m){var v=Sn.util.createBuffer(m);return m=new Array(4),m[0]=v.getInt32(),m[1]=v.getInt32(),m[2]=v.getInt32(),m[3]=v.getInt32(),Sn.aes._expandKey(m,!1)},t.formatSeed=function(m){var v=Sn.util.createBuffer(m);return m=new Array(4),m[0]=v.getInt32(),m[1]=v.getInt32(),m[2]=v.getInt32(),m[3]=v.getInt32(),m},t.cipher=function(m,v){return Sn.aes._updateBlock(m,v,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},t.increment=function(m){return++m[3],m},t.md=Sn.md.sha256;function a(){var m=Sn.prng.create(t);return m.getBytes=function(v,y){return m.generate(v,y)},m.getBytesSync=function(v){return m.generate(v)},m}var i=a(),o=null,l=Sn.util.globalScope,f=l.crypto||l.msCrypto;if(f&&f.getRandomValues&&(o=function(m){return f.getRandomValues(m)}),Sn.options.usePureJavaScript||!Sn.util.isNodejs&&!o){if(i.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var d in navigator)try{typeof navigator[d]=="string"&&(u+=navigator[d])}catch{}i.collect(u),u=null}e&&(e().mousemove(function(m){i.collectInt(m.clientX,16),i.collectInt(m.clientY,16)}),e().keypress(function(m){i.collectInt(m.charCode,8)}))}if(!Sn.random)Sn.random=i;else for(var d in i)Sn.random[d]=i[d];Sn.random.createInstance=a,Sn.random})(typeof jQuery<"u"?jQuery:null)})();var Ga=ur,LC=Ga.sha1=Ga.sha1||{};Ga.md.sha1=Ga.md.algorithms.sha1=LC,LC.create=function(){DC||aQ();var e=null,t=Ga.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i<a;++i)n.fullMessageLength.push(0);return t=Ga.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(a,i){i==="utf8"&&(a=Ga.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=o[1],o[1]=o[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(a),$C(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Ga.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=i&n.blockLength-1;a.putBytes(f2.substr(0,n.blockLength-o));for(var l,f,u=n.fullMessageLength[0]*8,d=0;d<n.fullMessageLength.length-1;++d)l=n.fullMessageLength[d+1]*8,f=l/4294967296>>>0,u+=f,a.putInt32(u>>>0),u=l>>>0;a.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};$C(m,r,a);var v=Ga.util.createBuffer();return v.putInt32(m.h0),v.putInt32(m.h1),v.putInt32(m.h2),v.putInt32(m.h3),v.putInt32(m.h4),v},n};var f2=null,DC=!1;function aQ(){f2=String.fromCharCode(128),f2+=Ga.util.fillString(String.fromCharCode(0),64),DC=!0}function $C(e,t,r){for(var n,a,i,o,l,f,u,d,m=r.length();m>=64;){for(a=e.h0,i=e.h1,o=e.h2,l=e.h3,f=e.h4,d=0;d<16;++d)n=r.getInt32(),t[d]=n,u=l^i&(o^l),n=(a<<5|a>>>27)+u+f+1518500249+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<20;++d)n=t[d-3]^t[d-8]^t[d-14]^t[d-16],n=n<<1|n>>>31,t[d]=n,u=l^i&(o^l),n=(a<<5|a>>>27)+u+f+1518500249+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<32;++d)n=t[d-3]^t[d-8]^t[d-14]^t[d-16],n=n<<1|n>>>31,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+1859775393+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<40;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+1859775393+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<60;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i&o|l&(i^o),n=(a<<5|a>>>27)+u+f+2400959708+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<80;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+3395469782+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+o|0,e.h3=e.h3+l|0,e.h4=e.h4+f|0,m-=64}}var Za=ur,zC=Za.pkcs1=Za.pkcs1||{};zC.encode_rsa_oaep=function(e,t,r){var n,a,i,o;typeof r=="string"?(n=r,a=arguments[3]||void 0,i=arguments[4]||void 0):r&&(n=r.label||void 0,a=r.seed||void 0,i=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md)),i?i.start():i=Za.md.sha1.create(),o||(o=i);var l=Math.ceil(e.n.bitLength()/8),f=l-2*i.digestLength-2;if(t.length>f){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=f,u}n||(n=""),i.update(n,"raw");for(var d=i.digest(),m="",v=f-t.length,y=0;y<v;y++)m+="\0";var _=d.getBytes()+m+""+t;if(!a)a=Za.random.getBytes(i.digestLength);else if(a.length!==i.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=a.length,u.digestLength=i.digestLength,u}var E=T0(a,l-i.digestLength-1,o),C=Za.util.xorBytes(_,E,_.length),T=T0(C,i.digestLength,o),I=Za.util.xorBytes(a,T,a.length);return"\0"+I+C},zC.decode_rsa_oaep=function(e,t,r){var n,a,i;typeof r=="string"?(n=r,a=arguments[3]||void 0):r&&(n=r.label||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(i=r.mgf1.md));var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var C=new Error("RSAES-OAEP encoded message length is invalid.");throw C.length=t.length,C.expectedLength=o,C}if(a===void 0?a=Za.md.sha1.create():a.start(),i||(i=a),o<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),a.update(n,"raw");for(var l=a.digest().getBytes(),f=t.charAt(0),u=t.substring(1,a.digestLength+1),d=t.substring(1+a.digestLength),m=T0(d,a.digestLength,i),v=Za.util.xorBytes(u,m,u.length),y=T0(v,o-a.digestLength-1,i),_=Za.util.xorBytes(d,y,d.length),E=_.substring(0,a.digestLength),C=f!=="\0",T=0;T<a.digestLength;++T)C|=l.charAt(T)!==E.charAt(T);for(var I=1,k=a.digestLength,N=a.digestLength;N<_.length;N++){var O=_.charCodeAt(N),P=O&1^1,z=I?65534:0;C|=O&z,I=I&P,k+=I}if(C||_.charCodeAt(k)!==1)throw new Error("Invalid RSAES-OAEP padding.");return _.substring(k+1)};function T0(e,t,r){r||(r=Za.md.sha1.create());for(var n="",a=Math.ceil(t/r.digestLength),i=0;i<a;++i){var o=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);r.start(),r.update(e+o),n+=r.digest().getBytes()}return n.substring(0,t)}var Qr=ur;Qr.des=Qr.des||{},Qr.des.startEncrypting=function(e,t,r,n){var a=A0({key:e,output:r,decrypt:!1,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a},Qr.des.createEncryptionCipher=function(e,t){return A0({key:e,output:null,decrypt:!1,mode:t})},Qr.des.startDecrypting=function(e,t,r,n){var a=A0({key:e,output:r,decrypt:!0,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a},Qr.des.createDecryptionCipher=function(e,t){return A0({key:e,output:null,decrypt:!0,mode:t})},Qr.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(n,a){return UC(r._keys,n,a,!1)},decrypt:function(n,a){return UC(r._keys,n,a,!0)}}}),r._init=!1},Qr.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Qr.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=pQ(t),this._init=!0}},Ya("DES-ECB",Qr.cipher.modes.ecb),Ya("DES-CBC",Qr.cipher.modes.cbc),Ya("DES-CFB",Qr.cipher.modes.cfb),Ya("DES-OFB",Qr.cipher.modes.ofb),Ya("DES-CTR",Qr.cipher.modes.ctr),Ya("3DES-ECB",Qr.cipher.modes.ecb),Ya("3DES-CBC",Qr.cipher.modes.cbc),Ya("3DES-CFB",Qr.cipher.modes.cfb),Ya("3DES-OFB",Qr.cipher.modes.ofb),Ya("3DES-CTR",Qr.cipher.modes.ctr);function Ya(e,t){var r=function(){return new Qr.des.Algorithm(e,t)};Qr.cipher.registerAlgorithm(e,r)}var oQ=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],sQ=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],lQ=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],fQ=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],uQ=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],cQ=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],hQ=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],dQ=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function pQ(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],f=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],d=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],y=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],_=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],E=e.length()>8?3:1,C=[],T=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],I=0,k,N=0;N<E;N++){var O=e.getInt32(),P=e.getInt32();k=(O>>>4^P)&252645135,P^=k,O^=k<<4,k=(P>>>-16^O)&65535,O^=k,P^=k<<-16,k=(O>>>2^P)&858993459,P^=k,O^=k<<2,k=(P>>>-16^O)&65535,O^=k,P^=k<<-16,k=(O>>>1^P)&1431655765,P^=k,O^=k<<1,k=(P>>>8^O)&16711935,O^=k,P^=k<<8,k=(O>>>1^P)&1431655765,P^=k,O^=k<<1,k=O<<8|P>>>20&240,O=P<<24|P<<8&16711680|P>>>8&65280|P>>>24&240,P=k;for(var z=0;z<T.length;++z){T[z]?(O=O<<2|O>>>26,P=P<<2|P>>>26):(O=O<<1|O>>>27,P=P<<1|P>>>27),O&=-15,P&=-15;var V=t[O>>>28]|r[O>>>24&15]|n[O>>>20&15]|a[O>>>16&15]|i[O>>>12&15]|o[O>>>8&15]|l[O>>>4&15],L=f[P>>>28]|u[P>>>24&15]|d[P>>>20&15]|m[P>>>16&15]|v[P>>>12&15]|y[P>>>8&15]|_[P>>>4&15];k=(L>>>16^V)&65535,C[I++]=V^k,C[I++]=L^k<<16}}return C}function UC(e,t,r,n){var a=e.length===32?3:9,i;a===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var o,l=t[0],f=t[1];o=(l>>>4^f)&252645135,f^=o,l^=o<<4,o=(l>>>16^f)&65535,f^=o,l^=o<<16,o=(f>>>2^l)&858993459,l^=o,f^=o<<2,o=(f>>>8^l)&16711935,l^=o,f^=o<<8,o=(l>>>1^f)&1431655765,f^=o,l^=o<<1,l=l<<1|l>>>31,f=f<<1|f>>>31;for(var u=0;u<a;u+=3){for(var d=i[u+1],m=i[u+2],v=i[u];v!=d;v+=m){var y=f^e[v],_=(f>>>4|f<<28)^e[v+1];o=l,l=f,f=o^(sQ[y>>>24&63]|fQ[y>>>16&63]|cQ[y>>>8&63]|dQ[y&63]|oQ[_>>>24&63]|lQ[_>>>16&63]|uQ[_>>>8&63]|hQ[_&63])}o=l,l=f,f=o}l=l>>>1|l<<31,f=f>>>1|f<<31,o=(l>>>1^f)&1431655765,f^=o,l^=o<<1,o=(f>>>8^l)&16711935,l^=o,f^=o<<8,o=(f>>>2^l)&858993459,l^=o,f^=o<<2,o=(l>>>16^f)&65535,f^=o,l^=o<<16,o=(l>>>4^f)&252645135,f^=o,l^=o<<4,r[0]=l,r[1]=f}function A0(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,n;e.decrypt?n=Qr.cipher.createDecipher(r,e.key):n=Qr.cipher.createCipher(r,e.key);var a=n.start;return n.start=function(i,o){var l=null;o instanceof Qr.util.ByteBuffer&&(l=o,o={}),o=o||{},o.output=l,o.iv=i,a.call(n,o)},n}var Hf=ur,ct=Hf.asn1,jf=Hf.pkcs7asn1=Hf.pkcs7asn1||{};Hf.pkcs7=Hf.pkcs7||{},Hf.pkcs7.asn1=jf;var qC={name:"ContentInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};jf.contentInfoValidator=qC;var VC={name:"EncryptedContentInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};jf.envelopedDataValidator={name:"EnvelopedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(VC)},jf.encryptedDataValidator={name:"EncryptedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"}].concat(VC)};var vQ={name:"SignerInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:ct.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};jf.signedDataValidator={name:"SignedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},qC,{name:"SignedData.Certificates",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:ct.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,capture:"signerInfos",optional:!0,value:[vQ]}]},jf.recipientInfoValidator={name:"RecipientInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var I0=ur;I0.mgf=I0.mgf||{},I0.mgf.mgf1=I0.mgf1;var El=ur,mQ=El.pss=El.pss||{};mQ.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,n=t.digestLength,a=e.salt||null;typeof a=="string"&&(a=El.util.createBuffer(a));var i;if("saltLength"in e)i=e.saltLength;else if(a!==null)i=a.length();else throw new Error("Salt length not specified or specific salt not given.");if(a!==null&&a.length()!==i)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||El.random,l={};return l.encode=function(f,u){var d,m=u-1,v=Math.ceil(m/8),y=f.digest().getBytes();if(v<n+i+2)throw new Error("Message is too long to encrypt.");var _;a===null?_=o.getBytesSync(i):_=a.bytes();var E=new El.util.ByteBuffer;E.fillWithByte(0,8),E.putBytes(y),E.putBytes(_),t.start(),t.update(E.getBytes());var C=t.digest().getBytes(),T=new El.util.ByteBuffer;T.fillWithByte(0,v-i-n-2),T.putByte(1),T.putBytes(_);var I=T.getBytes(),k=v-n-1,N=r.generate(C,k),O="";for(d=0;d<k;d++)O+=String.fromCharCode(I.charCodeAt(d)^N.charCodeAt(d));var P=65280>>8*v-m&255;return O=String.fromCharCode(O.charCodeAt(0)&~P)+O.substr(1),O+C+String.fromCharCode(188)},l.verify=function(f,u,d){var m,v=d-1,y=Math.ceil(v/8);if(u=u.substr(-y),y<n+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(y-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var _=y-n-1,E=u.substr(0,_),C=u.substr(_,n),T=65280>>8*y-v&255;if(E.charCodeAt(0)&T)throw new Error("Bits beyond keysize not zero as expected.");var I=r.generate(C,_),k="";for(m=0;m<_;m++)k+=String.fromCharCode(E.charCodeAt(m)^I.charCodeAt(m));k=String.fromCharCode(k.charCodeAt(0)&~T)+k.substr(1);var N=y-n-i-2;for(m=0;m<N;m++)if(k.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(k.charCodeAt(N)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var O=k.substr(-i),P=new El.util.ByteBuffer;P.fillWithByte(0,8),P.putBytes(f),P.putBytes(O),t.start(),t.update(P.getBytes());var z=t.digest().getBytes();return C===z},l};var u2=ur;u2.jsbn=u2.jsbn||{};var No;function Xe(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}u2.jsbn.BigInteger=Xe;function ar(){return new Xe(null)}function gQ(e,t,r,n,a,i){for(;--i>=0;){var o=t*this.data[e++]+r.data[n]+a;a=Math.floor(o/67108864),r.data[n++]=o&67108863}return a}function yQ(e,t,r,n,a,i){for(var o=t&32767,l=t>>15;--i>=0;){var f=this.data[e]&32767,u=this.data[e++]>>15,d=l*f+u*o;f=o*f+((d&32767)<<15)+r.data[n]+(a&1073741823),a=(f>>>30)+(d>>>15)+l*u+(a>>>30),r.data[n++]=f&1073741823}return a}function HC(e,t,r,n,a,i){for(var o=t&16383,l=t>>14;--i>=0;){var f=this.data[e]&16383,u=this.data[e++]>>14,d=l*f+u*o;f=o*f+((d&16383)<<14)+r.data[n]+a,a=(f>>28)+(d>>14)+l*u,r.data[n++]=f&268435455}return a}typeof navigator>"u"?(Xe.prototype.am=HC,No=28):navigator.appName=="Microsoft Internet Explorer"?(Xe.prototype.am=yQ,No=30):navigator.appName!="Netscape"?(Xe.prototype.am=gQ,No=26):(Xe.prototype.am=HC,No=28),Xe.prototype.DB=No,Xe.prototype.DM=(1<<No)-1,Xe.prototype.DV=1<<No;var c2=52;Xe.prototype.FV=Math.pow(2,c2),Xe.prototype.F1=c2-No,Xe.prototype.F2=2*No-c2;var bQ="0123456789abcdefghijklmnopqrstuvwxyz",B0=new Array,Kf,Ui;for(Kf="0".charCodeAt(0),Ui=0;Ui<=9;++Ui)B0[Kf++]=Ui;for(Kf="a".charCodeAt(0),Ui=10;Ui<36;++Ui)B0[Kf++]=Ui;for(Kf="A".charCodeAt(0),Ui=10;Ui<36;++Ui)B0[Kf++]=Ui;function jC(e){return bQ.charAt(e)}function KC(e,t){var r=B0[e.charCodeAt(t)];return r??-1}function _Q(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function wQ(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function ps(e){var t=ar();return t.fromInt(e),t}function EQ(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,a=!1,i=0;--n>=0;){var o=r==8?e[n]&255:KC(e,n);if(o<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,i==0?this.data[this.t++]=o:i+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-i)-1)<<i,this.data[this.t++]=o>>this.DB-i):this.data[this.t-1]|=o<<i,i+=r,i>=this.DB&&(i-=this.DB)}r==8&&e[0]&128&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),a&&Xe.ZERO.subTo(this,this)}function xQ(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function SQ(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,n,a=!1,i="",o=this.t,l=this.DB-o*this.DB%t;if(o-- >0)for(l<this.DB&&(n=this.data[o]>>l)>0&&(a=!0,i=jC(n));o>=0;)l<t?(n=(this.data[o]&(1<<l)-1)<<t-l,n|=this.data[--o]>>(l+=this.DB-t)):(n=this.data[o]>>(l-=t)&r,l<=0&&(l+=this.DB,--o)),n>0&&(a=!0),a&&(i+=jC(n));return a?i:"0"}function MQ(){var e=ar();return Xe.ZERO.subTo(this,e),e}function CQ(){return this.s<0?this.negate():this}function TQ(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function k0(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function AQ(){return this.t<=0?0:this.DB*(this.t-1)+k0(this.data[this.t-1]^this.s&this.DM)}function IQ(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}function BQ(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s}function kQ(e,t){var r=e%this.DB,n=this.DB-r,a=(1<<n)-1,i=Math.floor(e/this.DB),o=this.s<<r&this.DM,l;for(l=this.t-1;l>=0;--l)t.data[l+i+1]=this.data[l]>>n|o,o=(this.data[l]&a)<<r;for(l=i-1;l>=0;--l)t.data[l]=0;t.data[i]=o,t.t=this.t+i+1,t.s=this.s,t.clamp()}function NQ(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,a=this.DB-n,i=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&i)<<a,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&i)<<a),t.t=this.t-r,t.clamp()}function OQ(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()}function RQ(e,t){var r=this.abs(),n=e.abs(),a=r.t;for(t.t=a+n.t;--a>=0;)t.data[a]=0;for(a=0;a<n.t;++a)t.data[a+r.t]=r.am(0,n.data[a],t,a,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&Xe.ZERO.subTo(t,t)}function PQ(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}function FQ(e,t,r){var n=e.abs();if(!(n.t<=0)){var a=this.abs();if(a.t<n.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ar());var i=ar(),o=this.s,l=e.s,f=this.DB-k0(n.data[n.t-1]);f>0?(n.lShiftTo(f,i),a.lShiftTo(f,r)):(n.copyTo(i),a.copyTo(r));var u=i.t,d=i.data[u-1];if(d!=0){var m=d*(1<<this.F1)+(u>1?i.data[u-2]>>this.F2:0),v=this.FV/m,y=(1<<this.F1)/m,_=1<<this.F2,E=r.t,C=E-u,T=t??ar();for(i.dlShiftTo(C,T),r.compareTo(T)>=0&&(r.data[r.t++]=1,r.subTo(T,r)),Xe.ONE.dlShiftTo(u,T),T.subTo(i,i);i.t<u;)i.data[i.t++]=0;for(;--C>=0;){var I=r.data[--E]==d?this.DM:Math.floor(r.data[E]*v+(r.data[E-1]+_)*y);if((r.data[E]+=i.am(0,I,r,C,0,u))<I)for(i.dlShiftTo(C,T),r.subTo(T,r);r.data[E]<--I;)r.subTo(T,r)}t!=null&&(r.drShiftTo(u,t),o!=l&&Xe.ZERO.subTo(t,t)),r.t=u,r.clamp(),f>0&&r.rShiftTo(f,r),o<0&&Xe.ZERO.subTo(r,r)}}}function LQ(e){var t=ar();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Xe.ZERO)>0&&e.subTo(t,t),t}function xl(e){this.m=e}function DQ(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function $Q(e){return e}function zQ(e){e.divRemTo(this.m,null,e)}function UQ(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function qQ(e,t){e.squareTo(t),this.reduce(t)}xl.prototype.convert=DQ,xl.prototype.revert=$Q,xl.prototype.reduce=zQ,xl.prototype.mulTo=UQ,xl.prototype.sqrTo=qQ;function VQ(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Sl(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function HQ(e){var t=ar();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Xe.ZERO)>0&&this.m.subTo(t,t),t}function jQ(e){var t=ar();return e.copyTo(t),this.reduce(t),t}function KQ(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767,n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function WQ(e,t){e.squareTo(t),this.reduce(t)}function GQ(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Sl.prototype.convert=HQ,Sl.prototype.revert=jQ,Sl.prototype.reduce=KQ,Sl.prototype.mulTo=GQ,Sl.prototype.sqrTo=WQ;function ZQ(){return(this.t>0?this.data[0]&1:this.s)==0}function YQ(e,t){if(e>4294967295||e<1)return Xe.ONE;var r=ar(),n=ar(),a=t.convert(this),i=k0(e)-1;for(a.copyTo(r);--i>=0;)if(t.sqrTo(r,n),(e&1<<i)>0)t.mulTo(n,a,r);else{var o=r;r=n,n=o}return t.revert(r)}function JQ(e,t){var r;return e<256||t.isEven()?r=new xl(t):r=new Sl(t),this.exp(e,r)}Xe.prototype.copyTo=_Q,Xe.prototype.fromInt=wQ,Xe.prototype.fromString=EQ,Xe.prototype.clamp=xQ,Xe.prototype.dlShiftTo=IQ,Xe.prototype.drShiftTo=BQ,Xe.prototype.lShiftTo=kQ,Xe.prototype.rShiftTo=NQ,Xe.prototype.subTo=OQ,Xe.prototype.multiplyTo=RQ,Xe.prototype.squareTo=PQ,Xe.prototype.divRemTo=FQ,Xe.prototype.invDigit=VQ,Xe.prototype.isEven=ZQ,Xe.prototype.exp=YQ,Xe.prototype.toString=SQ,Xe.prototype.negate=MQ,Xe.prototype.abs=CQ,Xe.prototype.compareTo=TQ,Xe.prototype.bitLength=AQ,Xe.prototype.mod=LQ,Xe.prototype.modPowInt=JQ,Xe.ZERO=ps(0),Xe.ONE=ps(1);function XQ(){var e=ar();return this.copyTo(e),e}function QQ(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function eee(){return this.t==0?this.s:this.data[0]<<24>>24}function tee(){return this.t==0?this.s:this.data[0]<<16>>16}function ree(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function nee(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function iee(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=ps(r),a=ar(),i=ar(),o="";for(this.divRemTo(n,a,i);a.signum()>0;)o=(r+i.intValue()).toString(e).substr(1)+o,a.divRemTo(n,a,i);return i.intValue().toString(e)+o}function aee(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),a=!1,i=0,o=0,l=0;l<e.length;++l){var f=KC(e,l);if(f<0){e.charAt(l)=="-"&&this.signum()==0&&(a=!0);continue}o=t*o+f,++i>=r&&(this.dMultiply(n),this.dAddOffset(o,0),i=0,o=0)}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(o,0)),a&&Xe.ZERO.subTo(this,this)}function oee(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(Xe.ONE.shiftLeft(e-1),h2,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(Xe.ONE.shiftLeft(e-1),this);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,this.fromString(n,256)}}function see(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,n,a=0;if(e-- >0)for(r<this.DB&&(n=this.data[e]>>r)!=(this.s&this.DM)>>r&&(t[a++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this.data[e]&(1<<r)-1)<<8-r,n|=this.data[--e]>>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(t[a++]=n);return t}function lee(e){return this.compareTo(e)==0}function fee(e){return this.compareTo(e)<0?this:e}function uee(e){return this.compareTo(e)>0?this:e}function cee(e,t,r){var n,a,i=Math.min(e.t,this.t);for(n=0;n<i;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(a=e.s&this.DM,n=i;n<this.t;++n)r.data[n]=t(this.data[n],a);r.t=this.t}else{for(a=this.s&this.DM,n=i;n<e.t;++n)r.data[n]=t(a,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}function hee(e,t){return e&t}function dee(e){var t=ar();return this.bitwiseTo(e,hee,t),t}function h2(e,t){return e|t}function pee(e){var t=ar();return this.bitwiseTo(e,h2,t),t}function WC(e,t){return e^t}function vee(e){var t=ar();return this.bitwiseTo(e,WC,t),t}function GC(e,t){return e&~t}function mee(e){var t=ar();return this.bitwiseTo(e,GC,t),t}function gee(){for(var e=ar(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function yee(e){var t=ar();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function bee(e){var t=ar();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function _ee(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function wee(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+_ee(this.data[e]);return this.s<0?this.t*this.DB:-1}function Eee(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function xee(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=Eee(this.data[r]^t);return e}function See(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function Mee(e,t){var r=Xe.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function Cee(e){return this.changeBit(e,h2)}function Tee(e){return this.changeBit(e,GC)}function Aee(e){return this.changeBit(e,WC)}function Iee(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()}function Bee(e){var t=ar();return this.addTo(e,t),t}function kee(e){var t=ar();return this.subTo(e,t),t}function Nee(e){var t=ar();return this.multiplyTo(e,t),t}function Oee(e){var t=ar();return this.divRemTo(e,t,null),t}function Ree(e){var t=ar();return this.divRemTo(e,null,t),t}function Pee(e){var t=ar(),r=ar();return this.divRemTo(e,t,r),new Array(t,r)}function Fee(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Lee(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function Ec(){}function ZC(e){return e}function Dee(e,t,r){e.multiplyTo(t,r)}function $ee(e,t){e.squareTo(t)}Ec.prototype.convert=ZC,Ec.prototype.revert=ZC,Ec.prototype.mulTo=Dee,Ec.prototype.sqrTo=$ee;function zee(e){return this.exp(e,new Ec)}function Uee(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var a;for(a=r.t-this.t;n<a;++n)r.data[n+this.t]=this.am(0,e.data[n],r,n,0,this.t);for(a=Math.min(e.t,t);n<a;++n)this.am(0,e.data[n],r,n,0,t-n);r.clamp()}function qee(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)}function Wf(e){this.r2=ar(),this.q3=ar(),Xe.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Vee(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ar();return e.copyTo(t),this.reduce(t),t}function Hee(e){return e}function jee(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Kee(e,t){e.squareTo(t),this.reduce(t)}function Wee(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Wf.prototype.convert=Vee,Wf.prototype.revert=Hee,Wf.prototype.reduce=jee,Wf.prototype.mulTo=Wee,Wf.prototype.sqrTo=Kee;function Gee(e,t){var r=e.bitLength(),n,a=ps(1),i;if(r<=0)return a;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?i=new xl(t):t.isEven()?i=new Wf(t):i=new Sl(t);var o=new Array,l=3,f=n-1,u=(1<<n)-1;if(o[1]=i.convert(this),n>1){var d=ar();for(i.sqrTo(o[1],d);l<=u;)o[l]=ar(),i.mulTo(d,o[l-2],o[l]),l+=2}var m=e.t-1,v,y=!0,_=ar(),E;for(r=k0(e.data[m])-1;m>=0;){for(r>=f?v=e.data[m]>>r-f&u:(v=(e.data[m]&(1<<r+1)-1)<<f-r,m>0&&(v|=e.data[m-1]>>this.DB+r-f)),l=n;!(v&1);)v>>=1,--l;if((r-=l)<0&&(r+=this.DB,--m),y)o[v].copyTo(a),y=!1;else{for(;l>1;)i.sqrTo(a,_),i.sqrTo(_,a),l-=2;l>0?i.sqrTo(a,_):(E=a,a=_,_=E),i.mulTo(_,o[v],a)}for(;m>=0&&!(e.data[m]&1<<r);)i.sqrTo(a,_),E=a,a=_,_=E,--r<0&&(r=this.DB-1,--m)}return i.revert(a)}function Zee(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var a=t.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return t;for(a<i&&(i=a),i>0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r}function Yee(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r}function Jee(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return Xe.ZERO;for(var r=e.clone(),n=this.clone(),a=ps(1),i=ps(0),o=ps(0),l=ps(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!a.isEven()||!i.isEven())&&(a.addTo(this,a),i.subTo(e,i)),a.rShiftTo(1,a)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),t?((!o.isEven()||!l.isEven())&&(o.addTo(this,o),l.subTo(e,l)),o.rShiftTo(1,o)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(n)>=0?(r.subTo(n,r),t&&a.subTo(o,a),i.subTo(l,i)):(n.subTo(r,n),t&&o.subTo(a,o),l.subTo(i,l))}if(n.compareTo(Xe.ONE)!=0)return Xe.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l}var ma=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Xee=(1<<26)/ma[ma.length-1];function Qee(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=ma[ma.length-1]){for(t=0;t<ma.length;++t)if(r.data[0]==ma[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<ma.length;){for(var n=ma[t],a=t+1;a<ma.length&&n<Xee;)n*=ma[a++];for(n=r.modInt(n);t<a;)if(n%ma[t++]==0)return!1}return r.millerRabin(e)}function ete(e){var t=this.subtract(Xe.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n=t.shiftRight(r),a=tte(),i,o=0;o<e;++o){do i=new Xe(this.bitLength(),a);while(i.compareTo(Xe.ONE)<=0||i.compareTo(t)>=0);var l=i.modPow(n,this);if(l.compareTo(Xe.ONE)!=0&&l.compareTo(t)!=0){for(var f=1;f++<r&&l.compareTo(t)!=0;)if(l=l.modPowInt(2,this),l.compareTo(Xe.ONE)==0)return!1;if(l.compareTo(t)!=0)return!1}}return!0}function tte(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}Xe.prototype.chunkSize=ree,Xe.prototype.toRadix=iee,Xe.prototype.fromRadix=aee,Xe.prototype.fromNumber=oee,Xe.prototype.bitwiseTo=cee,Xe.prototype.changeBit=Mee,Xe.prototype.addTo=Iee,Xe.prototype.dMultiply=Fee,Xe.prototype.dAddOffset=Lee,Xe.prototype.multiplyLowerTo=Uee,Xe.prototype.multiplyUpperTo=qee,Xe.prototype.modInt=Yee,Xe.prototype.millerRabin=ete,Xe.prototype.clone=XQ,Xe.prototype.intValue=QQ,Xe.prototype.byteValue=eee,Xe.prototype.shortValue=tee,Xe.prototype.signum=nee,Xe.prototype.toByteArray=see,Xe.prototype.equals=lee,Xe.prototype.min=fee,Xe.prototype.max=uee,Xe.prototype.and=dee,Xe.prototype.or=pee,Xe.prototype.xor=vee,Xe.prototype.andNot=mee,Xe.prototype.not=gee,Xe.prototype.shiftLeft=yee,Xe.prototype.shiftRight=bee,Xe.prototype.getLowestSetBit=wee,Xe.prototype.bitCount=xee,Xe.prototype.testBit=See,Xe.prototype.setBit=Cee,Xe.prototype.clearBit=Tee,Xe.prototype.flipBit=Aee,Xe.prototype.add=Bee,Xe.prototype.subtract=kee,Xe.prototype.multiply=Nee,Xe.prototype.divide=Oee,Xe.prototype.remainder=Ree,Xe.prototype.divideAndRemainder=Pee,Xe.prototype.modPow=Gee,Xe.prototype.modInverse=Jee,Xe.prototype.pow=zee,Xe.prototype.gcd=Zee,Xe.prototype.isProbablePrime=Qee;var vs=ur;(function(){if(vs.prime){vs.prime;return}var e=vs.prime=vs.prime||{},t=vs.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var a=function(m,v){return m|v};e.generateProbablePrime=function(m,v,y){typeof v=="function"&&(y=v,v={}),v=v||{};var _=v.algorithm||"PRIMEINC";typeof _=="string"&&(_={name:_}),_.options=_.options||{};var E=v.prng||vs.random,C={nextBytes:function(T){for(var I=E.getBytesSync(T.length),k=0;k<T.length;++k)T[k]=I.charCodeAt(k)}};if(_.name==="PRIMEINC")return i(m,C,_.options,y);throw new Error("Invalid prime generation algorithm: "+_.name)};function i(m,v,y,_){return"workers"in y?f(m,v,y,_):o(m,v,y,_)}function o(m,v,y,_){var E=u(m,v),C=0,T=d(E.bitLength());"millerRabinTests"in y&&(T=y.millerRabinTests);var I=10;"maxBlockTime"in y&&(I=y.maxBlockTime),l(E,m,v,C,T,I,_)}function l(m,v,y,_,E,C,T){var I=+new Date;do{if(m.bitLength()>v&&(m=u(v,y)),m.isProbablePrime(E))return T(null,m);m.dAddOffset(r[_++%8],0)}while(C<0||+new Date-I<C);vs.util.setImmediate(function(){l(m,v,y,_,E,C,T)})}function f(m,v,y,_){if(typeof Worker>"u")return o(m,v,y,_);var E=u(m,v),C=y.workers,T=y.workLoad||100,I=T*30/8,k=y.workerScript||"forge/prime.worker.js";if(C===-1)return vs.util.estimateCores(function(O,P){O&&(P=2),C=P-1,N()});N();function N(){C=Math.max(1,C);for(var O=[],P=0;P<C;++P)O[P]=new Worker(k);for(var P=0;P<C;++P)O[P].addEventListener("message",V);var z=!1;function V(L){if(!z){var U=L.data;if(U.found){for(var M=0;M<O.length;++M)O[M].terminate();return z=!0,_(null,new t(U.prime,16))}E.bitLength()>m&&(E=u(m,v));var s=E.toString(16);L.target.postMessage({hex:s,workLoad:T}),E.dAddOffset(I,0)}}}}function u(m,v){var y=new t(m,v),_=m-1;return y.testBit(_)||y.bitwiseTo(t.ONE.shiftLeft(_),a,y),y.dAddOffset(31-y.mod(n).byteValue(),0),y}function d(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}})();var St=ur;if(typeof or>"u")var or=St.jsbn.BigInteger;var d2=St.util.isNodejs?wc():null,Ne=St.asn1,qi=St.util;St.pki=St.pki||{},St.pki.rsa=St.rsa=St.rsa||{};var Lt=St.pki,rte=[6,4,2,4,2,4,6,2],nte={name:"PrivateKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},ite={name:"RSAPrivateKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},ate={name:"RSAPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},ote=St.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},ste={name:"DigestInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},lte=function(e){var t;if(e.algorithm in Lt.oids)t=Lt.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var n=Ne.oidToDer(t).getBytes(),a=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[]),i=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[]);i.value.push(Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,n)),i.value.push(Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,""));var o=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(o),Ne.toDer(a).getBytes()},YC=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(or.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(or.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var n;do n=new or(St.util.bytesToHex(St.random.getBytes(t.n.bitLength()/8)),16);while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(or.ONE));e=e.multiply(n.modPow(t.e,t.n)).mod(t.n);for(var a=e.mod(t.p).modPow(t.dP,t.p),i=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(i)<0;)a=a.add(t.p);var o=a.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i);return o=o.multiply(n.modInverse(t.n)).mod(t.n),o};Lt.rsa.encrypt=function(e,t,r){var n=r,a,i=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,a=JC(e,t,r)):(a=St.util.createBuffer(),a.putBytes(e));for(var o=new or(a.toHex(),16),l=YC(o,t,n),f=l.toString(16),u=St.util.createBuffer(),d=i-Math.ceil(f.length/2);d>0;)u.putByte(0),--d;return u.putBytes(St.util.hexToBytes(f)),u.getBytes()},Lt.rsa.decrypt=function(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var i=new Error("Encrypted message length is invalid.");throw i.length=e.length,i.expected=a,i}var o=new or(St.util.createBuffer(e).toHex(),16);if(o.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=YC(o,t,r),f=l.toString(16),u=St.util.createBuffer(),d=a-Math.ceil(f.length/2);d>0;)u.putByte(0),--d;return u.putBytes(St.util.hexToBytes(f)),n!==!1?N0(u.getBytes(),t,r):u.getBytes()},Lt.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var n=r.prng||St.random,a={nextBytes:function(l){for(var f=n.getBytesSync(l.length),u=0;u<l.length;++u)l[u]=f.charCodeAt(u)}},i=r.algorithm||"PRIMEINC",o;if(i==="PRIMEINC")o={algorithm:i,state:0,bits:e,rng:a,eInt:t||65537,e:new or(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},o.e.fromInt(o.eInt);else throw new Error("Invalid key generation algorithm: "+i);return o},Lt.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new or(null);r.fromInt(30);for(var n=0,a=function(m,v){return m|v},i=+new Date,o,l=0;e.keys===null&&(t<=0||l<t);){if(e.state===0){var f=e.p===null?e.pBits:e.qBits,u=f-1;e.pqState===0?(e.num=new or(f,e.rng),e.num.testBit(u)||e.num.bitwiseTo(or.ONE.shiftLeft(u),a,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),n=0,++e.pqState):e.pqState===1?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(ute(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(rte[n++%8],0):e.pqState===2?e.pqState=e.num.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(or.ONE),e.q1=e.q.subtract(or.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(or.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var d=e.e.modInverse(e.phi);e.keys={privateKey:Lt.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:Lt.rsa.setPublicKey(e.n,e.e)}}o=+new Date,l+=o-i,i=o}return e.keys!==null},Lt.rsa.generateKeyPair=function(e,t,r,n){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(n=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(n=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,n=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!St.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(n){if(XC("generateKeyPair"))return d2.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(l,f,u){if(l)return n(l);n(null,{privateKey:Lt.privateKeyFromPem(u),publicKey:Lt.publicKeyFromPem(f)})});if(QC("generateKey")&&QC("exportKey"))return qi.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tT(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(l){return qi.globalScope.crypto.subtle.exportKey("pkcs8",l.privateKey)}).then(void 0,function(l){n(l)}).then(function(l){if(l){var f=Lt.privateKeyFromAsn1(Ne.fromDer(St.util.createBuffer(l)));n(null,{privateKey:f,publicKey:Lt.setRsaPublicKey(f.n,f.e)})}});if(eT("generateKey")&&eT("exportKey")){var a=qi.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tT(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);a.oncomplete=function(l){var f=l.target.result,u=qi.globalScope.msCrypto.subtle.exportKey("pkcs8",f.privateKey);u.oncomplete=function(d){var m=d.target.result,v=Lt.privateKeyFromAsn1(Ne.fromDer(St.util.createBuffer(m)));n(null,{privateKey:v,publicKey:Lt.setRsaPublicKey(v.n,v.e)})},u.onerror=function(d){n(d)}},a.onerror=function(l){n(l)};return}}else if(XC("generateKeyPairSync")){var i=d2.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Lt.privateKeyFromPem(i.privateKey),publicKey:Lt.publicKeyFromPem(i.publicKey)}}}var o=Lt.rsa.createKeyPairGenerationState(e,t,r);if(!n)return Lt.rsa.stepKeyPairGenerationState(o,0),o.keys;fte(o,r,n)},Lt.setRsaPublicKey=Lt.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(n,a,i){if(typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSAES-PKCS1-V1_5"),a==="RSAES-PKCS1-V1_5")a={encode:function(l,f,u){return JC(l,f,2).getBytes()}};else if(a==="RSA-OAEP"||a==="RSAES-OAEP")a={encode:function(l,f){return St.pkcs1.encode_rsa_oaep(f,l,i)}};else if(["RAW","NONE","NULL",null].indexOf(a)!==-1)a={encode:function(l){return l}};else if(typeof a=="string")throw new Error('Unsupported encryption scheme: "'+a+'".');var o=a.encode(n,r,!0);return Lt.rsa.encrypt(o,r,!0)},r.verify=function(n,a,i,o){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),o===void 0&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:function(f,u){u=N0(u,r,!0);var d=Ne.fromDer(u,{parseAllBytes:o._parseAllDigestBytes}),m={},v=[];if(!Ne.validate(d,ste,m,v)){var y=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw y.errors=v,y}var _=Ne.derToOid(m.algorithmIdentifier);if(!(_===St.oids.md2||_===St.oids.md5||_===St.oids.sha1||_===St.oids.sha224||_===St.oids.sha256||_===St.oids.sha384||_===St.oids.sha512||_===St.oids["sha512-224"]||_===St.oids["sha512-256"])){var y=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw y.oid=_,y}if((_===St.oids.md2||_===St.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return f===m.digest}}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:function(f,u){return u=N0(u,r,!0),f===u}});var l=Lt.rsa.decrypt(a,r,!0,!1);return i.verify(n,l,r.n.bitLength())},r},Lt.setRsaPrivateKey=Lt.rsa.setPrivateKey=function(e,t,r,n,a,i,o,l){var f={n:e,e:t,d:r,p:n,q:a,dP:i,dQ:o,qInv:l};return f.decrypt=function(u,d,m){typeof d=="string"?d=d.toUpperCase():d===void 0&&(d="RSAES-PKCS1-V1_5");var v=Lt.rsa.decrypt(u,f,!1,!1);if(d==="RSAES-PKCS1-V1_5")d={decode:N0};else if(d==="RSA-OAEP"||d==="RSAES-OAEP")d={decode:function(y,_){return St.pkcs1.decode_rsa_oaep(_,y,m)}};else if(["RAW","NONE","NULL",null].indexOf(d)!==-1)d={decode:function(y){return y}};else throw new Error('Unsupported encryption scheme: "'+d+'".');return d.decode(v,f,!1)},f.sign=function(u,d){var m=!1;typeof d=="string"&&(d=d.toUpperCase()),d===void 0||d==="RSASSA-PKCS1-V1_5"?(d={encode:lte},m=1):(d==="NONE"||d==="NULL"||d===null)&&(d={encode:function(){return u}},m=1);var v=d.encode(u,f.n.bitLength());return Lt.rsa.encrypt(v,f,m)},f},Lt.wrapRsaPrivateKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ne.integerToDer(0).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Lt.oids.rsaEncryption).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,"")]),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,Ne.toDer(e).getBytes())])},Lt.privateKeyFromAsn1=function(e){var t={},r=[];if(Ne.validate(e,nte,t,r)&&(e=Ne.fromDer(St.util.createBuffer(t.privateKey))),t={},r=[],!Ne.validate(e,ite,t,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var a,i,o,l,f,u,d,m;return a=St.util.createBuffer(t.privateKeyModulus).toHex(),i=St.util.createBuffer(t.privateKeyPublicExponent).toHex(),o=St.util.createBuffer(t.privateKeyPrivateExponent).toHex(),l=St.util.createBuffer(t.privateKeyPrime1).toHex(),f=St.util.createBuffer(t.privateKeyPrime2).toHex(),u=St.util.createBuffer(t.privateKeyExponent1).toHex(),d=St.util.createBuffer(t.privateKeyExponent2).toHex(),m=St.util.createBuffer(t.privateKeyCoefficient).toHex(),Lt.setRsaPrivateKey(new or(a,16),new or(i,16),new or(o,16),new or(l,16),new or(f,16),new or(u,16),new or(d,16),new or(m,16))},Lt.privateKeyToAsn1=Lt.privateKeyToRSAPrivateKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ne.integerToDer(0).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.n)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.e)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.d)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.p)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.q)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.dP)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.dQ)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.qInv))])},Lt.publicKeyFromAsn1=function(e){var t={},r=[];if(Ne.validate(e,ote,t,r)){var n=Ne.derToOid(t.publicKeyOid);if(n!==Lt.oids.rsaEncryption){var a=new Error("Cannot read public key. Unknown OID.");throw a.oid=n,a}e=t.rsaPublicKey}if(r=[],!Ne.validate(e,ate,t,r)){var a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw a.errors=r,a}var i=St.util.createBuffer(t.publicKeyModulus).toHex(),o=St.util.createBuffer(t.publicKeyExponent).toHex();return Lt.setRsaPublicKey(new or(i,16),new or(o,16))},Lt.publicKeyToAsn1=Lt.publicKeyToSubjectPublicKeyInfo=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Lt.oids.rsaEncryption).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,"")]),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.BITSTRING,!1,[Lt.publicKeyToRSAPublicKey(e)])])},Lt.publicKeyToRSAPublicKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.n)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.e))])};function JC(e,t,r){var n=St.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=e.length,i.max=a-11,i}n.putByte(0),n.putByte(r);var o=a-3-e.length,l;if(r===0||r===1){l=r===0?0:255;for(var f=0;f<o;++f)n.putByte(l)}else for(;o>0;){for(var u=0,d=St.random.getBytes(o),f=0;f<o;++f)l=d.charCodeAt(f),l===0?++u:n.putByte(l);o=u}return n.putByte(0),n.putBytes(e),n}function N0(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8),i=St.util.createBuffer(e),o=i.getByte(),l=i.getByte();if(o!==0||r&&l!==0&&l!==1||!r&&l!=2||r&&l===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var f=0;if(l===0){f=a-3-n;for(var u=0;u<f;++u)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(l===1)for(f=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++f}else if(l===2)for(f=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++f}var d=i.getByte();if(d!==0||f!==a-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}function fte(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var n={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(n.prng=t.prng),a();function a(){i(e.pBits,function(l,f){if(l)return r(l);if(e.p=f,e.q!==null)return o(l,e.q);i(e.qBits,o)})}function i(l,f){St.prime.generateProbablePrime(l,n,f)}function o(l,f){if(l)return r(l);if(e.q=f,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)!==0){e.p=null,a();return}if(e.q.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)!==0){e.q=null,i(e.qBits,o);return}if(e.p1=e.p.subtract(or.ONE),e.q1=e.q.subtract(or.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(or.ONE)!==0){e.p=e.q=null,a();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,i(e.qBits,o);return}var d=e.e.modInverse(e.phi);e.keys={privateKey:Lt.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:Lt.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}}function Ja(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=St.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&!(r.charCodeAt(1)&128)||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function ute(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function XC(e){return St.util.isNodejs&&typeof d2[e]=="function"}function QC(e){return typeof qi.globalScope<"u"&&typeof qi.globalScope.crypto=="object"&&typeof qi.globalScope.crypto.subtle=="object"&&typeof qi.globalScope.crypto.subtle[e]=="function"}function eT(e){return typeof qi.globalScope<"u"&&typeof qi.globalScope.msCrypto=="object"&&typeof qi.globalScope.msCrypto.subtle=="object"&&typeof qi.globalScope.msCrypto.subtle[e]=="function"}function tT(e){for(var t=St.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}var Mt=ur,ee=Mt.asn1,at=Mt.pki=Mt.pki||{},nr=at.oids,nn={};nn.CN=nr.commonName,nn.commonName="CN",nn.C=nr.countryName,nn.countryName="C",nn.L=nr.localityName,nn.localityName="L",nn.ST=nr.stateOrProvinceName,nn.stateOrProvinceName="ST",nn.O=nr.organizationName,nn.organizationName="O",nn.OU=nr.organizationalUnitName,nn.organizationalUnitName="OU",nn.E=nr.emailAddress,nn.emailAddress="E";var rT=Mt.pki.rsa.publicKeyValidator,cte={name:"Certificate",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},rT,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:ee.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:ee.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:ee.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},hte={name:"rsapss",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:ee.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:ee.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:ee.Class.UNIVERSAL,type:ee.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:ee.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:ee.Class.UNIVERSAL,type:ee.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},dte={name:"CertificationRequestInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},rT,{name:"CertificationRequestInfo.attributes",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SET,constructed:!0}]}]}]},pte={name:"CertificationRequest",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[dte,{name:"CertificationRequest.signatureAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};at.RDNAttributesAsArray=function(e,t){for(var r=[],n,a,i,o=0;o<e.value.length;++o){n=e.value[o];for(var l=0;l<n.value.length;++l)i={},a=n.value[l],i.type=ee.derToOid(a.value[0].value),i.value=a.value[1].value,i.valueTagClass=a.value[1].type,i.type in nr&&(i.name=nr[i.type],i.name in nn&&(i.shortName=nn[i.name])),t&&(t.update(i.type),t.update(i.value)),r.push(i)}return r},at.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],a=ee.derToOid(n.value[0].value),i=n.value[1].value,o=0;o<i.length;++o){var l={};if(l.type=a,l.value=i[o].value,l.valueTagClass=i[o].type,l.type in nr&&(l.name=nr[l.type],l.name in nn&&(l.shortName=nn[l.name])),l.type===nr.extensionRequest){l.extensions=[];for(var f=0;f<l.value.length;++f)l.extensions.push(at.certificateExtensionFromAsn1(l.value[f]))}t.push(l)}return t};function ms(e,t){typeof t=="string"&&(t={shortName:t});for(var r=null,n,a=0;r===null&&a<e.attributes.length;++a)n=e.attributes[a],(t.type&&t.type===n.type||t.name&&t.name===n.name||t.shortName&&t.shortName===n.shortName)&&(r=n);return r}var O0=function(e,t,r){var n={};if(e!==nr["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:nr.sha1},mgf:{algorithmOid:nr.mgf1,hash:{algorithmOid:nr.sha1}},saltLength:20});var a={},i=[];if(!ee.validate(t,hte,a,i)){var o=new Error("Cannot read RSASSA-PSS parameter block.");throw o.errors=i,o}return a.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=ee.derToOid(a.hashOid)),a.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=ee.derToOid(a.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=ee.derToOid(a.maskGenHashOid)),a.saltLength!==void 0&&(n.saltLength=a.saltLength.charCodeAt(0)),n},R0=function(e){switch(nr[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Mt.md.sha1.create();case"md5WithRSAEncryption":return Mt.md.md5.create();case"sha256WithRSAEncryption":return Mt.md.sha256.create();case"sha384WithRSAEncryption":return Mt.md.sha384.create();case"sha512WithRSAEncryption":return Mt.md.sha512.create();case"RSASSA-PSS":return Mt.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},nT=function(e){var t=e.certificate,r;switch(t.signatureOid){case nr.sha1WithRSAEncryption:case nr.sha1WithRSASignature:break;case nr["RSASSA-PSS"]:var n,a;if(n=nr[t.signatureParameters.mgf.hash.algorithmOid],n===void 0||Mt.md[n]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=t.signatureParameters.mgf.hash.algorithmOid,i.name=n,i}if(a=nr[t.signatureParameters.mgf.algorithmOid],a===void 0||Mt.mgf[a]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=t.signatureParameters.mgf.algorithmOid,i.name=a,i}if(a=Mt.mgf[a].create(Mt.md[n].create()),n=nr[t.signatureParameters.hash.algorithmOid],n===void 0||Mt.md[n]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=t.signatureParameters.hash.algorithmOid,i.name=n,i}r=Mt.pss.create(Mt.md[n].create(),a,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,r)};at.certificateFromPem=function(e,t,r){var n=Mt.pem.decode(e)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var a=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw a.headerType=n.type,a}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=ee.fromDer(n.body,r);return at.certificateFromAsn1(i,t)},at.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:ee.toDer(at.certificateToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.publicKeyFromPem=function(e){var t=Mt.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=ee.fromDer(t.body);return at.publicKeyFromAsn1(n)},at.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:ee.toDer(at.publicKeyToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:ee.toDer(at.publicKeyToRSAPublicKey(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Mt.md.sha1.create(),n=t.type||"RSAPublicKey",a;switch(n){case"RSAPublicKey":a=ee.toDer(at.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":a=ee.toDer(at.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}r.start(),r.update(a);var i=r.digest();if(t.encoding==="hex"){var o=i.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i},at.certificationRequestFromPem=function(e,t,r){var n=Mt.pem.decode(e)[0];if(n.type!=="CERTIFICATE REQUEST"){var a=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw a.headerType=n.type,a}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=ee.fromDer(n.body,r);return at.certificationRequestFromAsn1(i,t)},at.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:ee.toDer(at.certificationRequestToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return ms(e.issuer,t)},e.issuer.addField=function(t){Vi([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return ms(e.subject,t)},e.subject.addField=function(t){Vi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){Vi(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){Vi(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)iT(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var r=null,n,a=0;r===null&&a<e.extensions.length;++a)n=e.extensions[a],(t.id&&n.id===t.id||t.name&&n.name===t.name)&&(r=n);return r},e.sign=function(t,r){e.md=r||Mt.md.sha1.create();var n=nr[e.md.algorithm+"WithRSAEncryption"];if(!n){var a=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=n,e.tbsCertificate=at.getTBSCertificate(e);var i=ee.toDer(e.tbsCertificate);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var n=t.issuer,a=e.subject,i=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw i.expectedIssuer=a.attributes,i.actualIssuer=n.attributes,i}var o=t.md;if(o===null){o=R0({signatureOid:t.signatureOid,type:"certificate"});var l=t.tbsCertificate||at.getTBSCertificate(t),f=ee.toDer(l);o.update(f.getBytes())}return o!==null&&(r=nT({certificate:e,md:o,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,n=e.issuer,a=t.subject;if(n.hash&&a.hash)r=n.hash===a.hash;else if(n.attributes.length===a.attributes.length){r=!0;for(var i,o,l=0;r&&l<n.attributes.length;++l)i=n.attributes[l],o=a.attributes[l],(i.type!==o.type||i.value!==o.value)&&(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return at.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=nr.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var n=e.extensions[r];if(n.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return Mt.util.hexToBytes(n.subjectKeyIdentifier)===a}}return!1},e},at.certificateFromAsn1=function(e,t){var r={},n=[];if(!ee.validate(e,cte,r,n)){var a=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw a.errors=n,a}var i=ee.derToOid(r.publicKeyOid);if(i!==at.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=at.createCertificate();o.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=Mt.util.createBuffer(r.certSerialNumber);o.serialNumber=l.toHex(),o.signatureOid=Mt.asn1.derToOid(r.certSignatureOid),o.signatureParameters=O0(o.signatureOid,r.certSignatureParams,!0),o.siginfo.algorithmOid=Mt.asn1.derToOid(r.certinfoSignatureOid),o.siginfo.parameters=O0(o.siginfo.algorithmOid,r.certinfoSignatureParams,!1),o.signature=r.certSignature;var f=[];if(r.certValidity1UTCTime!==void 0&&f.push(ee.utcTimeToDate(r.certValidity1UTCTime)),r.certValidity2GeneralizedTime!==void 0&&f.push(ee.generalizedTimeToDate(r.certValidity2GeneralizedTime)),r.certValidity3UTCTime!==void 0&&f.push(ee.utcTimeToDate(r.certValidity3UTCTime)),r.certValidity4GeneralizedTime!==void 0&&f.push(ee.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(o.validity.notBefore=f[0],o.validity.notAfter=f[1],o.tbsCertificate=r.tbsCertificate,t){o.md=R0({signatureOid:o.signatureOid,type:"certificate"});var u=ee.toDer(o.tbsCertificate);o.md.update(u.getBytes())}var d=Mt.md.sha1.create(),m=ee.toDer(r.certIssuer);d.update(m.getBytes()),o.issuer.getField=function(_){return ms(o.issuer,_)},o.issuer.addField=function(_){Vi([_]),o.issuer.attributes.push(_)},o.issuer.attributes=at.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(o.issuer.uniqueId=r.certIssuerUniqueId),o.issuer.hash=d.digest().toHex();var v=Mt.md.sha1.create(),y=ee.toDer(r.certSubject);return v.update(y.getBytes()),o.subject.getField=function(_){return ms(o.subject,_)},o.subject.addField=function(_){Vi([_]),o.subject.attributes.push(_)},o.subject.attributes=at.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(o.subject.uniqueId=r.certSubjectUniqueId),o.subject.hash=v.digest().toHex(),r.certExtensions?o.extensions=at.certificateExtensionsFromAsn1(r.certExtensions):o.extensions=[],o.publicKey=at.publicKeyFromAsn1(r.subjectPublicKeyInfo),o},at.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],a=0;a<n.value.length;++a)t.push(at.certificateExtensionFromAsn1(n.value[a]));return t},at.certificateExtensionFromAsn1=function(e){var t={};if(t.id=ee.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===ee.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in nr){if(t.name=nr[t.id],t.name==="keyUsage"){var r=ee.fromDer(t.value),n=0,a=0;r.value.length>1&&(n=r.value.charCodeAt(1),a=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var r=ee.fromDer(t.value);r.value.length>0&&r.value[0].type===ee.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;r.value.length>0&&r.value[0].type===ee.Type.INTEGER?i=r.value[0].value:r.value.length>1&&(i=r.value[1].value),i!==null&&(t.pathLenConstraint=ee.derToInteger(i))}else if(t.name==="extKeyUsage")for(var r=ee.fromDer(t.value),o=0;o<r.value.length;++o){var l=ee.derToOid(r.value[o].value);l in nr?t[nr[l]]=!0:t[l]=!0}else if(t.name==="nsCertType"){var r=ee.fromDer(t.value),n=0;r.value.length>1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var f,r=ee.fromDer(t.value),u=0;u<r.value.length;++u){f=r.value[u];var d={type:f.type,value:f.value};switch(t.altNames.push(d),f.type){case 1:case 2:case 6:break;case 7:d.ip=Mt.util.bytesToIP(f.value);break;case 8:d.oid=ee.derToOid(f.value);break}}}else if(t.name==="subjectKeyIdentifier"){var r=ee.fromDer(t.value);t.subjectKeyIdentifier=Mt.util.bytesToHex(r.value)}}return t},at.certificationRequestFromAsn1=function(e,t){var r={},n=[];if(!ee.validate(e,pte,r,n)){var a=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw a.errors=n,a}var i=ee.derToOid(r.publicKeyOid);if(i!==at.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=at.createCertificationRequest();if(o.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,o.signatureOid=Mt.asn1.derToOid(r.csrSignatureOid),o.signatureParameters=O0(o.signatureOid,r.csrSignatureParams,!0),o.siginfo.algorithmOid=Mt.asn1.derToOid(r.csrSignatureOid),o.siginfo.parameters=O0(o.siginfo.algorithmOid,r.csrSignatureParams,!1),o.signature=r.csrSignature,o.certificationRequestInfo=r.certificationRequestInfo,t){o.md=R0({signatureOid:o.signatureOid,type:"certification request"});var l=ee.toDer(o.certificationRequestInfo);o.md.update(l.getBytes())}var f=Mt.md.sha1.create();return o.subject.getField=function(u){return ms(o.subject,u)},o.subject.addField=function(u){Vi([u]),o.subject.attributes.push(u)},o.subject.attributes=at.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),o.subject.hash=f.digest().toHex(),o.publicKey=at.publicKeyFromAsn1(r.subjectPublicKeyInfo),o.getAttribute=function(u){return ms(o,u)},o.addAttribute=function(u){Vi([u]),o.attributes.push(u)},o.attributes=at.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),o},at.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return ms(e.subject,t)},e.subject.addField=function(t){Vi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return ms(e,t)},e.addAttribute=function(t){Vi([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){Vi(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){Vi(t),e.attributes=t},e.sign=function(t,r){e.md=r||Mt.md.sha1.create();var n=nr[e.md.algorithm+"WithRSAEncryption"];if(!n){var a=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=n,e.certificationRequestInfo=at.getCertificationRequestInfo(e);var i=ee.toDer(e.certificationRequestInfo);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(r===null){r=R0({signatureOid:e.signatureOid,type:"certification request"});var n=e.certificationRequestInfo||at.getCertificationRequestInfo(e),a=ee.toDer(n);r.update(a.getBytes())}return r!==null&&(t=nT({certificate:e,md:r,signature:e.signature})),t},e};function Gf(e){for(var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),r,n,a=e.attributes,i=0;i<a.length;++i){r=a[i];var o=r.value,l=ee.Type.PRINTABLESTRING;"valueTagClass"in r&&(l=r.valueTagClass,l===ee.Type.UTF8&&(o=Mt.util.encodeUtf8(o))),n=ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(r.type).getBytes()),ee.create(ee.Class.UNIVERSAL,l,!1,o)])]),t.value.push(n)}return t}function Vi(e){for(var t,r=0;r<e.length;++r){if(t=e[r],typeof t.name>"u"&&(t.type&&t.type in at.oids?t.name=at.oids[t.type]:t.shortName&&t.shortName in nn&&(t.name=at.oids[nn[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in at.oids)t.type=at.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in nn&&(t.shortName=nn[t.name]),t.type===nr.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=ee.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a<t.extensions.length;++a)t.value.push(at.certificateExtensionToAsn1(iT(t.extensions[a])))}if(typeof t.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}function iT(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in at.oids&&(e.name=at.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in at.oids)e.id=at.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,a=0,i=0;e.digitalSignature&&(a|=128,n=7),e.nonRepudiation&&(a|=64,n=6),e.keyEncipherment&&(a|=32,n=5),e.dataEncipherment&&(a|=16,n=4),e.keyAgreement&&(a|=8,n=3),e.keyCertSign&&(a|=4,n=2),e.cRLSign&&(a|=2,n=1),e.encipherOnly&&(a|=1,n=0),e.decipherOnly&&(i|=128,n=7);var o=String.fromCharCode(n);i!==0?o+=String.fromCharCode(a)+String.fromCharCode(i):a!==0&&(o+=String.fromCharCode(a)),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,o)}else if(e.name==="basicConstraints")e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var f in e)e[f]===!0&&(f in nr?l.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(nr[f]).getBytes())):f.indexOf(".")!==-1&&l.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(f).getBytes())))}else if(e.name==="nsCertType"){var n=0,a=0;e.client&&(a|=128,n=7),e.server&&(a|=64,n=6),e.email&&(a|=32,n=5),e.objsign&&(a|=16,n=4),e.reserved&&(a|=8,n=3),e.sslCA&&(a|=4,n=2),e.emailCA&&(a|=2,n=1),e.objCA&&(a|=1,n=0);var o=String.fromCharCode(n);a!==0&&(o+=String.fromCharCode(a)),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,o)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);for(var u,d=0;d<e.altNames.length;++d){u=e.altNames[d];var o=u.value;if(u.type===7&&u.ip){if(o=Mt.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=ee.oidToDer(ee.oidToDer(u.oid)):o=ee.oidToDer(o));e.value.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,u.type,!1,o))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var m=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=m.toHex(),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,m.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);var l=e.value.value;if(e.keyIdentifier){var v=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!1,v))}if(e.authorityCertIssuer){var y=[ee.create(ee.Class.CONTEXT_SPECIFIC,4,!0,[Gf(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,y))}if(e.serialNumber){var _=Mt.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!1,_))}}else if(e.name==="cRLDistributionPoints"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);for(var l=e.value.value,E=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),C=ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[]),u,d=0;d<e.altNames.length;++d){u=e.altNames[d];var o=u.value;if(u.type===7&&u.ip){if(o=Mt.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=ee.oidToDer(ee.oidToDer(u.oid)):o=ee.oidToDer(o));C.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,u.type,!1,o))}E.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[C])),l.push(E)}if(typeof e.value>"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function p2(e,t){switch(e){case nr["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.hash.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.mgf.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.mgf.hash.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(t.saltLength).getBytes())])),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,r);default:return ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")}}function vte(e){var t=ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n<r.length;++n){var a=r[n],i=a.value,o=ee.Type.UTF8;"valueTagClass"in a&&(o=a.valueTagClass),o===ee.Type.UTF8&&(i=Mt.util.encodeUtf8(i));var l=!1;"valueConstructed"in a&&(l=a.valueConstructed);var f=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(a.type).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,o,l,i)])]);t.value.push(f)}return t}var mte=new Date("1950-01-01T00:00:00Z"),gte=new Date("2050-01-01T00:00:00Z");function aT(e){return e>=mte&&e<gte?ee.create(ee.Class.UNIVERSAL,ee.Type.UTCTIME,!1,ee.dateToUtcTime(e)):ee.create(ee.Class.UNIVERSAL,ee.Type.GENERALIZEDTIME,!1,ee.dateToGeneralizedTime(e))}at.getTBSCertificate=function(e){var t=aT(e.validity.notBefore),r=aT(e.validity.notAfter),n=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.version).getBytes())]),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Mt.util.hexToBytes(e.serialNumber)),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.siginfo.algorithmOid).getBytes()),p2(e.siginfo.algorithmOid,e.siginfo.parameters)]),Gf(e.issuer),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,r]),Gf(e.subject),at.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&n.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&n.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&n.value.push(at.certificateExtensionsToAsn1(e.extensions)),n},at.getCertificationRequestInfo=function(e){var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.version).getBytes()),Gf(e.subject),at.publicKeyToAsn1(e.publicKey),vte(e)]);return t},at.distinguishedNameToAsn1=function(e){return Gf(e)},at.certificateToAsn1=function(e){var t=e.tbsCertificate||at.getTBSCertificate(e);return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.signatureOid).getBytes()),p2(e.signatureOid,e.signatureParameters)]),ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},at.certificateExtensionsToAsn1=function(e){var t=ee.create(ee.Class.CONTEXT_SPECIFIC,3,!0,[]),r=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(at.certificateExtensionToAsn1(e[n]));return t},at.certificateExtensionToAsn1=function(e){var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.id).getBytes())),e.critical&&t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return typeof e.value!="string"&&(r=ee.toDer(r).getBytes()),t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,r)),t},at.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||at.getCertificationRequestInfo(e);return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.signatureOid).getBytes()),p2(e.signatureOid,e.signatureParameters)]),ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},at.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(o){var l=r(o.issuer);return l},t.addCertificate=function(o){if(typeof o=="string"&&(o=Mt.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))if(o.subject.hash in t.certs){var l=t.certs[o.subject.hash];Mt.util.isArray(l)||(l=[l]),l.push(o),t.certs[o.subject.hash]=l}else t.certs[o.subject.hash]=o},t.hasCertificate=function(o){typeof o=="string"&&(o=Mt.pki.certificateFromPem(o));var l=r(o.subject);if(!l)return!1;Mt.util.isArray(l)||(l=[l]);for(var f=ee.toDer(at.certificateToAsn1(o)).getBytes(),u=0;u<l.length;++u){var d=ee.toDer(at.certificateToAsn1(l[u])).getBytes();if(f===d)return!0}return!1},t.listAllCertificates=function(){var o=[];for(var l in t.certs)if(t.certs.hasOwnProperty(l)){var f=t.certs[l];if(!Mt.util.isArray(f))o.push(f);else for(var u=0;u<f.length;++u)o.push(f[u])}return o},t.removeCertificate=function(o){var l;if(typeof o=="string"&&(o=Mt.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))return null;var f=r(o.subject);if(!Mt.util.isArray(f))return l=t.certs[o.subject.hash],delete t.certs[o.subject.hash],l;for(var u=ee.toDer(at.certificateToAsn1(o)).getBytes(),d=0;d<f.length;++d){var m=ee.toDer(at.certificateToAsn1(f[d])).getBytes();u===m&&(l=f[d],f.splice(d,1))}return f.length===0&&delete t.certs[o.subject.hash],l};function r(o){return n(o),t.certs[o.hash]||null}function n(o){if(!o.hash){var l=Mt.md.sha1.create();o.attributes=at.RDNAttributesAsArray(Gf(o),l),o.hash=l.digest().toHex()}}if(e)for(var a=0;a<e.length;++a){var i=e[a];t.addCertificate(i)}return t},at.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},at.verifyCertificateChain=function(e,t,r){typeof r=="function"&&(r={verify:r}),r=r||{},t=t.slice(0);var n=t.slice(0),a=r.validityCheckDate;typeof a>"u"&&(a=new Date);var i=!0,o=null,l=0;do{var f=t.shift(),u=null,d=!1;if(a&&(a<f.validity.notBefore||a>f.validity.notAfter)&&(o={message:"Certificate is not valid yet or has expired.",error:at.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:a}),o===null){if(u=t[0]||e.getIssuer(f),u===null&&f.isIssuer(f)&&(d=!0,u=f),u){var m=u;Mt.util.isArray(m)||(m=[m]);for(var v=!1;!v&&m.length>0;){u=m.shift();try{v=u.verify(f)}catch{}}v||(o={message:"Certificate signature is invalid.",error:at.certificateError.bad_certificate})}o===null&&(!u||d)&&!e.hasCertificate(f)&&(o={message:"Certificate is not trusted.",error:at.certificateError.unknown_ca})}if(o===null&&u&&!f.isIssuer(u)&&(o={message:"Certificate issuer is invalid.",error:at.certificateError.bad_certificate}),o===null)for(var y={keyUsage:!0,basicConstraints:!0},_=0;o===null&&_<f.extensions.length;++_){var E=f.extensions[_];E.critical&&!(E.name in y)&&(o={message:"Certificate has an unsupported critical extension.",error:at.certificateError.unsupported_certificate})}if(o===null&&(!i||t.length===0&&(!u||d))){var C=f.getExtension("basicConstraints"),T=f.getExtension("keyUsage");if(T!==null&&(!T.keyCertSign||C===null)&&(o={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:at.certificateError.bad_certificate}),o===null&&C!==null&&!C.cA&&(o={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:at.certificateError.bad_certificate}),o===null&&T!==null&&"pathLenConstraint"in C){var I=l-1;I>C.pathLenConstraint&&(o={message:"Certificate basicConstraints pathLenConstraint violated.",error:at.certificateError.bad_certificate})}}var k=o===null?!0:o.error,N=r.verify?r.verify(k,l,n):k;if(N===!0)o=null;else throw k===!0&&(o={message:"The application rejected the certificate.",error:at.certificateError.bad_certificate}),(N||N===0)&&(typeof N=="object"&&!Mt.util.isArray(N)?(N.message&&(o.message=N.message),N.error&&(o.error=N.error)):typeof N=="string"&&(o.error=N)),o;i=!1,++l}while(t.length>0);return!0};var lt=ur,xe=lt.asn1,Yn=lt.pkcs7=lt.pkcs7||{};Yn.messageFromPem=function(e){var t=lt.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=xe.fromDer(t.body);return Yn.messageFromAsn1(n)},Yn.messageToPem=function(e,t){var r={type:"PKCS7",body:xe.toDer(e.toAsn1()).getBytes()};return lt.pem.encode(r,{maxline:t})},Yn.messageFromAsn1=function(e){var t={},r=[];if(!xe.validate(e,Yn.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var a=xe.derToOid(t.contentType),i;switch(a){case lt.pki.oids.envelopedData:i=Yn.createEnvelopedData();break;case lt.pki.oids.encryptedData:i=Yn.createEncryptedData();break;case lt.pki.oids.signedData:i=Yn.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i},Yn.createSignedData=function(){var e=null;return e={type:lt.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(m2(e,n,Yn.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,i=0;i<a.length;++i)e.certificates.push(lt.pki.certificateFromAsn1(a[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var n=[],a=0;a<e.certificates.length;++a)n.push(lt.pki.certificateToAsn1(e.certificates[a]));var i=[],o=xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return n.length>0&&o.value[0].value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&o.value[0].value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,1,!0,i)),o.value[0].value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,e.signerInfos)),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),o])},addSigner:function(n){var a=n.issuer,i=n.serialNumber;if(n.certificate){var o=n.certificate;typeof o=="string"&&(o=lt.pki.certificateFromPem(o)),a=o.issuer.attributes,i=o.serialNumber}var l=n.key;if(!l)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof l=="string"&&(l=lt.pki.privateKeyFromPem(l));var f=n.digestAlgorithm||lt.pki.oids.sha1;switch(f){case lt.pki.oids.sha1:case lt.pki.oids.sha256:case lt.pki.oids.sha384:case lt.pki.oids.sha512:case lt.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+f)}var u=n.authenticatedAttributes||[];if(u.length>0){for(var d=!1,m=!1,v=0;v<u.length;++v){var y=u[v];if(!d&&y.type===lt.pki.oids.contentType){if(d=!0,m)break;continue}if(!m&&y.type===lt.pki.oids.messageDigest){if(m=!0,d)break;continue}}if(!d||!m)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:l,version:1,issuer:a,serialNumber:i,digestAlgorithm:f,signatureAlgorithm:lt.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(n){if(n=n||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(lt.pki.oids.data).getBytes())]),"content"in e)){var a;e.content instanceof lt.util.ByteBuffer?a=e.content.bytes():typeof e.content=="string"&&(a=lt.util.encodeUtf8(e.content)),n.detached?e.detachedContent=xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,a):e.contentInfo.value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,a)]))}if(e.signers.length!==0){var i=t();r(i)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(n){typeof n=="string"&&(n=lt.pki.certificateFromPem(n)),e.certificates.push(n)},addCertificateRevokationList:function(n){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var n={},a=0;a<e.signers.length;++a){var i=e.signers[a],o=i.digestAlgorithm;o in n||(n[o]=lt.md[lt.pki.oids[o]].create()),i.authenticatedAttributes.length===0?i.md=n[o]:i.md=lt.md[lt.pki.oids[o]].create()}e.digestAlgorithmIdentifiers=[];for(var o in n)e.digestAlgorithmIdentifiers.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(o).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")]));return n}function r(n){var a;if(e.detachedContent?a=e.detachedContent:(a=e.contentInfo.value[1],a=a.value[0]),!a)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=xe.derToOid(e.contentInfo.value[0].value),o=xe.toDer(a);o.getByte(),xe.getBerValueLength(o),o=o.getBytes();for(var l in n)n[l].start().update(o);for(var f=new Date,u=0;u<e.signers.length;++u){var d=e.signers[u];if(d.authenticatedAttributes.length===0){if(i!==lt.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{d.authenticatedAttributesAsn1=xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,[]),v=0;v<d.authenticatedAttributes.length;++v){var y=d.authenticatedAttributes[v];y.type===lt.pki.oids.messageDigest?y.value=n[d.digestAlgorithm].digest():y.type===lt.pki.oids.signingTime&&(y.value||(y.value=f)),m.value.push(v2(y)),d.authenticatedAttributesAsn1.value.push(v2(y))}o=xe.toDer(m).getBytes(),d.md.start().update(o)}d.signature=d.key.sign(d.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=xte(e.signers)}},Yn.createEncryptedData=function(){var e=null;return e={type:lt.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:lt.pki.oids["aes256-CBC"]},fromAsn1:function(t){m2(e,t,Yn.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),oT(e)}},e},Yn.createEnvelopedData=function(){var e=null;return e={type:lt.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:lt.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=m2(e,t,Yn.asn1.envelopedDataValidator);e.recipients=_te(r.recipientInfos.value)},toAsn1:function(){return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,wte(e.recipients)),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,Ste(e.encryptedContent))])])])},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var a=e.recipients[n],i=a.issuer;if(a.serialNumber===t.serialNumber&&i.length===r.length){for(var o=!0,l=0;l<r.length;++l)if(i[l].type!==r[l].type||i[l].value!==r[l].value){o=!1;break}if(o)return a}}return null},decrypt:function(t,r){if(e.encryptedContent.key===void 0&&t!==void 0&&r!==void 0)switch(t.encryptedContent.algorithm){case lt.pki.oids.rsaEncryption:case lt.pki.oids.desCBC:var n=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=lt.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}oT(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:lt.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(e.encryptedContent.content===void 0){r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var n,a,i;switch(r){case lt.pki.oids["aes128-CBC"]:n=16,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["aes192-CBC"]:n=24,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["aes256-CBC"]:n=32,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["des-EDE3-CBC"]:n=24,a=8,i=lt.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(t===void 0)t=lt.util.createBuffer(lt.random.getBytes(n));else if(t.length()!=n)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+n+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=lt.util.createBuffer(lt.random.getBytes(a));var o=i(t);if(o.start(e.encryptedContent.parameter.copy()),o.update(e.content),!o.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=o.output}for(var l=0;l<e.recipients.length;++l){var f=e.recipients[l];if(f.encryptedContent.content===void 0)switch(f.encryptedContent.algorithm){case lt.pki.oids.rsaEncryption:f.encryptedContent.content=f.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm)}}}},e};function yte(e){var t={},r=[];if(!xe.validate(e,Yn.asn1.recipientInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=r,n}return{version:t.version.charCodeAt(0),issuer:lt.pki.RDNAttributesAsArray(t.issuer),serialNumber:lt.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:xe.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function bte(e){return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[lt.pki.distinguishedNameToAsn1({attributes:e.issuer}),xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,lt.util.hexToBytes(e.serialNumber))]),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.encryptedContent.algorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")]),xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function _te(e){for(var t=[],r=0;r<e.length;++r)t.push(yte(e[r]));return t}function wte(e){for(var t=[],r=0;r<e.length;++r)t.push(bte(e[r]));return t}function Ete(e){var t=xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[lt.pki.distinguishedNameToAsn1({attributes:e.issuer}),xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,lt.util.hexToBytes(e.serialNumber))]),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.digestAlgorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.signatureAlgorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")])),t.value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=xe.create(xe.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<e.unauthenticatedAttributes.length;++n){var a=e.unauthenticatedAttributes[n];r.values.push(v2(a))}t.value.push(r)}return t}function xte(e){for(var t=[],r=0;r<e.length;++r)t.push(Ete(e[r]));return t}function v2(e){var t;if(e.type===lt.pki.oids.contentType)t=xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.value).getBytes());else if(e.type===lt.pki.oids.messageDigest)t=xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===lt.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),a=e.value;if(typeof a=="string"){var i=Date.parse(a);isNaN(i)?a.length===13?a=xe.utcTimeToDate(a):a=xe.generalizedTimeToDate(a):a=new Date(i)}a>=r&&a<n?t=xe.create(xe.Class.UNIVERSAL,xe.Type.UTCTIME,!1,xe.dateToUtcTime(a)):t=xe.create(xe.Class.UNIVERSAL,xe.Type.GENERALIZEDTIME,!1,xe.dateToGeneralizedTime(a))}return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,[t])])}function Ste(e){return[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(lt.pki.oids.data).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.algorithm).getBytes()),e.parameter?xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.content.getBytes())])]}function m2(e,t,r){var n={},a=[];if(!xe.validate(t,r,n,a)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var o=xe.derToOid(n.contentType);if(o!==lt.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var l="";if(lt.util.isArray(n.encryptedContent))for(var f=0;f<n.encryptedContent.length;++f){if(n.encryptedContent[f].type!==xe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");l+=n.encryptedContent[f].value}else l=n.encryptedContent;e.encryptedContent={algorithm:xe.derToOid(n.encAlgorithm),parameter:lt.util.createBuffer(n.encParameter.value),content:lt.util.createBuffer(l)}}if(n.content){var l="";if(lt.util.isArray(n.content))for(var f=0;f<n.content.length;++f){if(n.content[f].type!==xe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");l+=n.content[f].value}else l=n.content;e.content=lt.util.createBuffer(l)}return e.version=n.version.charCodeAt(0),e.rawCapture=n,n}function oT(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case lt.pki.oids["aes128-CBC"]:case lt.pki.oids["aes192-CBC"]:case lt.pki.oids["aes256-CBC"]:t=lt.aes.createDecryptionCipher(e.encryptedContent.key);break;case lt.pki.oids.desCBC:case lt.pki.oids["des-EDE3-CBC"]:t=lt.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var ui=ur,g2=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],sT=[1,2,3,5],Mte=function(e,t){return e<<t&65535|(e&65535)>>16-t},Cte=function(e,t){return(e&65535)>>t|e<<16-t&65535};ui.rc2=ui.rc2||{},ui.rc2.expandKey=function(e,t){typeof e=="string"&&(e=ui.util.createBuffer(e)),t=t||128;var r=e,n=e.length(),a=t,i=Math.ceil(a/8),o=255>>(a&7),l;for(l=n;l<128;l++)r.putByte(g2[r.at(l-1)+r.at(l-n)&255]);for(r.setAt(128-i,g2[r.at(128-i)&o]),l=127-i;l>=0;l--)r.setAt(l,g2[r.at(l+1)^r.at(l+i)]);return r};var lT=function(e,t,r){var n=!1,a=null,i=null,o=null,l,f,u,d,m=[];for(e=ui.rc2.expandKey(e,t),u=0;u<64;u++)m.push(e.getInt16Le());r?(l=function(_){for(u=0;u<4;u++)_[u]+=m[d]+(_[(u+3)%4]&_[(u+2)%4])+(~_[(u+3)%4]&_[(u+1)%4]),_[u]=Mte(_[u],sT[u]),d++},f=function(_){for(u=0;u<4;u++)_[u]+=m[_[(u+3)%4]&63]}):(l=function(_){for(u=3;u>=0;u--)_[u]=Cte(_[u],sT[u]),_[u]-=m[d]+(_[(u+3)%4]&_[(u+2)%4])+(~_[(u+3)%4]&_[(u+1)%4]),d--},f=function(_){for(u=3;u>=0;u--)_[u]-=m[_[(u+3)%4]&63]});var v=function(_){var E=[];for(u=0;u<4;u++){var C=a.getInt16Le();o!==null&&(r?C^=o.getInt16Le():o.putInt16Le(C)),E.push(C&65535)}d=r?0:63;for(var T=0;T<_.length;T++)for(var I=0;I<_[T][0];I++)_[T][1](E);for(u=0;u<4;u++)o!==null&&(r?o.putInt16Le(E[u]):E[u]^=o.getInt16Le()),i.putInt16Le(E[u])},y=null;return y={start:function(_,E){_&&typeof _=="string"&&(_=ui.util.createBuffer(_)),n=!1,a=ui.util.createBuffer(),i=E||new ui.util.createBuffer,o=_,y.output=i},update:function(_){for(n||a.putBuffer(_);a.length()>=8;)v([[5,l],[1,f],[6,l],[1,f],[5,l]])},finish:function(_){var E=!0;if(r)if(_)E=_(8,a,!r);else{var C=a.length()===8?8:8-a.length();a.fillWithByte(C,C)}if(E&&(n=!0,y.update()),!r&&(E=a.length()===0,E))if(_)E=_(8,i,!r);else{var T=i.length(),I=i.at(T-1);I>T?E=!1:i.truncate(I)}return E}},y};ui.rc2.startEncrypting=function(e,t,r){var n=ui.rc2.createEncryptionCipher(e,128);return n.start(t,r),n},ui.rc2.createEncryptionCipher=function(e,t){return lT(e,t,!0)},ui.rc2.startDecrypting=function(e,t,r){var n=ui.rc2.createDecryptionCipher(e,128);return n.start(t,r),n},ui.rc2.createDecryptionCipher=function(e,t){return lT(e,t,!1)};var dt=ur;if(typeof Tte>"u")var Tte=dt.jsbn.BigInteger;var Ge=dt.asn1,Ut=dt.pki=dt.pki||{};Ut.pbe=dt.pbe=dt.pbe||{};var Ml=Ut.oids,Ate={name:"EncryptedPrivateKeyInfo",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Ite={name:"PBES2Algorithms",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Bte={name:"pkcs-12PbeParams",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ut.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=dt.random.getBytesSync(r.saltSize),a=r.count,i=Ge.integerToDer(a),o,l,f;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,d,m;switch(r.algorithm){case"aes128":o=16,u=16,d=Ml["aes128-CBC"],m=dt.aes.createEncryptionCipher;break;case"aes192":o=24,u=16,d=Ml["aes192-CBC"],m=dt.aes.createEncryptionCipher;break;case"aes256":o=32,u=16,d=Ml["aes256-CBC"],m=dt.aes.createEncryptionCipher;break;case"des":o=8,u=8,d=Ml.desCBC,m=dt.des.createEncryptionCipher;break;default:var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=r.algorithm,v}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),_=cT(y),E=dt.pkcs5.pbkdf2(t,n,a,o,_),C=dt.random.getBytesSync(u),T=m(E);T.start(C),T.update(Ge.toDer(e)),T.finish(),f=T.output.getBytes();var I=kte(n,i,o,y);l=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml.pkcs5PBES2).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml.pkcs5PBKDF2).getBytes()),I]),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(d).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,C)])])])}else if(r.algorithm==="3des"){o=24;var k=new dt.util.ByteBuffer(n),E=Ut.pbe.generatePkcs12Key(t,k,1,a,o),C=Ut.pbe.generatePkcs12Key(t,k,2,a,o),T=dt.des.createEncryptionCipher(E);T.start(C),T.update(Ge.toDer(e)),T.finish(),f=T.output.getBytes(),l=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,n),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,i.getBytes())])])}else{var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=r.algorithm,v}var N=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[l,Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,f)]);return N},Ut.decryptPrivateKeyInfo=function(e,t){var r=null,n={},a=[];if(!Ge.validate(e,Ate,n,a)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var o=Ge.derToOid(n.encryptionOid),l=Ut.pbe.getCipher(o,n.encryptionParams,t),f=dt.util.createBuffer(n.encryptedData);return l.update(f),l.finish()&&(r=Ge.fromDer(l.output)),r},Ut.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:Ge.toDer(e).getBytes()};return dt.pem.encode(r,{maxline:t})},Ut.encryptedPrivateKeyFromPem=function(e){var t=dt.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Ge.fromDer(t.body)},Ut.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var n=Ut.wrapRsaPrivateKey(Ut.privateKeyToAsn1(e));return n=Ut.encryptPrivateKeyInfo(n,t,r),Ut.encryptedPrivateKeyToPem(n)}var a,i,o,l;switch(r.algorithm){case"aes128":a="AES-128-CBC",o=16,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",o=24,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",o=32,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",o=24,i=dt.random.getBytesSync(8),l=dt.des.createEncryptionCipher;break;case"des":a="DES-CBC",o=8,i=dt.random.getBytesSync(8),l=dt.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var u=dt.pbe.opensslDeriveBytes(t,i.substr(0,8),o),d=l(u);d.start(i),d.update(Ge.toDer(Ut.privateKeyToAsn1(e))),d.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:dt.util.bytesToHex(i).toUpperCase()},body:d.output.getBytes()};return dt.pem.encode(m)},Ut.decryptRsaPrivateKey=function(e,t){var r=null,n=dt.pem.decode(e)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,o;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,o=dt.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,o=dt.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,o=dt.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,o=dt.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,o=dt.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,o=function(m){return dt.rc2.createDecryptionCipher(m,40)};break;case"RC2-64-CBC":i=8,o=function(m){return dt.rc2.createDecryptionCipher(m,64)};break;case"RC2-128-CBC":i=16,o=function(m){return dt.rc2.createDecryptionCipher(m,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw a.algorithm=n.dekInfo.algorithm,a}var l=dt.util.hexToBytes(n.dekInfo.parameters),f=dt.pbe.opensslDeriveBytes(t,l.substr(0,8),i),u=o(f);if(u.start(l),u.update(dt.util.createBuffer(n.body)),u.finish())r=u.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=Ut.decryptPrivateKeyInfo(Ge.fromDer(r),t):r=Ge.fromDer(r),r!==null&&(r=Ut.privateKeyFromAsn1(r)),r},Ut.pbe.generatePkcs12Key=function(e,t,r,n,a,i){var o,l;if(typeof i>"u"||i===null){if(!("sha1"in dt.md))throw new Error('"sha1" hash algorithm unavailable.');i=dt.md.sha1.create()}var f=i.digestLength,u=i.blockLength,d=new dt.util.ByteBuffer,m=new dt.util.ByteBuffer;if(e!=null){for(l=0;l<e.length;l++)m.putInt16(e.charCodeAt(l));m.putInt16(0)}var v=m.length(),y=t.length(),_=new dt.util.ByteBuffer;_.fillWithByte(r,u);var E=u*Math.ceil(y/u),C=new dt.util.ByteBuffer;for(l=0;l<E;l++)C.putByte(t.at(l%y));var T=u*Math.ceil(v/u),I=new dt.util.ByteBuffer;for(l=0;l<T;l++)I.putByte(m.at(l%v));var k=C;k.putBuffer(I);for(var N=Math.ceil(a/f),O=1;O<=N;O++){var P=new dt.util.ByteBuffer;P.putBytes(_.bytes()),P.putBytes(k.bytes());for(var z=0;z<n;z++)i.start(),i.update(P.getBytes()),P=i.digest();var V=new dt.util.ByteBuffer;for(l=0;l<u;l++)V.putByte(P.at(l%f));var L=Math.ceil(y/u)+Math.ceil(v/u),U=new dt.util.ByteBuffer;for(o=0;o<L;o++){var M=new dt.util.ByteBuffer(k.getBytes(u)),s=511;for(l=V.length()-1;l>=0;l--)s=s>>8,s+=V.at(l)+M.at(l),M.setAt(l,s&255);U.putBuffer(M)}k=U,d.putBuffer(P)}return d.truncate(d.length()-a),d},Ut.pbe.getCipher=function(e,t,r){switch(e){case Ut.oids.pkcs5PBES2:return Ut.pbe.getCipherForPBES2(e,t,r);case Ut.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ut.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ut.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},Ut.pbe.getCipherForPBES2=function(e,t,r){var n={},a=[];if(!Ge.validate(t,Ite,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}if(e=Ge.derToOid(n.kdfOid),e!==Ut.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=e,i.supportedOids=["pkcs5PBKDF2"],i}if(e=Ge.derToOid(n.encOid),e!==Ut.oids["aes128-CBC"]&&e!==Ut.oids["aes192-CBC"]&&e!==Ut.oids["aes256-CBC"]&&e!==Ut.oids["des-EDE3-CBC"]&&e!==Ut.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var o=n.kdfSalt,l=dt.util.createBuffer(n.kdfIterationCount);l=l.getInt(l.length()<<3);var f,u;switch(Ut.oids[e]){case"aes128-CBC":f=16,u=dt.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,u=dt.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,u=dt.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,u=dt.des.createDecryptionCipher;break;case"desCBC":f=8,u=dt.des.createDecryptionCipher;break}var d=uT(n.prfOid),m=dt.pkcs5.pbkdf2(r,o,l,f,d),v=n.encIv,y=u(m);return y.start(v),y},Ut.pbe.getCipherForPKCS12PBE=function(e,t,r){var n={},a=[];if(!Ge.validate(t,Bte,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var o=dt.util.createBuffer(n.salt),l=dt.util.createBuffer(n.iterations);l=l.getInt(l.length()<<3);var f,u,d;switch(e){case Ut.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:f=24,u=8,d=dt.des.startDecrypting;break;case Ut.oids["pbewithSHAAnd40BitRC2-CBC"]:f=5,u=8,d=function(E,C){var T=dt.rc2.createDecryptionCipher(E,40);return T.start(C,null),T};break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=e,i}var m=uT(n.prfOid),v=Ut.pbe.generatePkcs12Key(r,o,1,l,f,m);m.start();var y=Ut.pbe.generatePkcs12Key(r,o,2,l,u,m);return d(v,y)},Ut.pbe.opensslDeriveBytes=function(e,t,r,n){if(typeof n>"u"||n===null){if(!("md5"in dt.md))throw new Error('"md5" hash algorithm unavailable.');n=dt.md.md5.create()}t===null&&(t="");for(var a=[fT(n,e+t)],i=16,o=1;i<r;++o,i+=16)a.push(fT(n,a[o-1]+e+t));return a.join("").substr(0,r)};function fT(e,t){return e.start().update(t).digest().getBytes()}function uT(e){var t;if(!e)t="hmacWithSHA1";else if(t=Ut.oids[Ge.derToOid(e)],!t){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}return cT(t)}function cT(e){var t=dt.md;switch(e){case"hmacWithSHA224":t=dt.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function kte(e,t,r,n){var a=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,e),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,t.getBytes())]);return n!=="hmacWithSHA1"&&a.value.push(Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,dt.util.hexToBytes(r.toString(16))),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ut.oids[n]).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.NULL,!1,"")])),a}var qr=ur,ye=qr.asn1,Xt=qr.pki,xc=qr.pkcs12=qr.pkcs12||{},hT={name:"ContentInfo",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},Nte={name:"PFX",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:ye.Class.UNIVERSAL,type:ye.Type.INTEGER,constructed:!1,capture:"version"},hT,{name:"PFX.macData",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:ye.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:ye.Class.UNIVERSAL,type:ye.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Ote={name:"SafeBag",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Rte={name:"Attribute",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SET,constructed:!0,capture:"values"}]},Pte={name:"CertBag",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:ye.Class.UNIVERSAL,type:ye.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Sc(e,t,r,n){for(var a=[],i=0;i<e.length;i++)for(var o=0;o<e[i].safeBags.length;o++){var l=e[i].safeBags[o];if(!(n!==void 0&&l.type!==n)){if(t===null){a.push(l);continue}l.attributes[t]!==void 0&&l.attributes[t].indexOf(r)>=0&&a.push(l)}}return a}xc.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},a=[];if(!ye.validate(e,Nte,n,a)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var o={version:n.version.charCodeAt(0),safeContents:[],getBags:function(C){var T={},I;return"localKeyId"in C?I=C.localKeyId:"localKeyIdHex"in C&&(I=qr.util.hexToBytes(C.localKeyIdHex)),I===void 0&&!("friendlyName"in C)&&"bagType"in C&&(T[C.bagType]=Sc(o.safeContents,null,null,C.bagType)),I!==void 0&&(T.localKeyId=Sc(o.safeContents,"localKeyId",I,C.bagType)),"friendlyName"in C&&(T.friendlyName=Sc(o.safeContents,"friendlyName",C.friendlyName,C.bagType)),T},getBagsByFriendlyName:function(C,T){return Sc(o.safeContents,"friendlyName",C,T)},getBagsByLocalKeyId:function(C,T){return Sc(o.safeContents,"localKeyId",C,T)}};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(ye.derToOid(n.contentType)!==Xt.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=ye.derToOid(n.contentType),i}var l=n.content.value[0];if(l.tagClass!==ye.Class.UNIVERSAL||l.type!==ye.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(l=y2(l),n.mac){var f=null,u=0,d=ye.derToOid(n.macAlgorithm);switch(d){case Xt.oids.sha1:f=qr.md.sha1.create(),u=20;break;case Xt.oids.sha256:f=qr.md.sha256.create(),u=32;break;case Xt.oids.sha384:f=qr.md.sha384.create(),u=48;break;case Xt.oids.sha512:f=qr.md.sha512.create(),u=64;break;case Xt.oids.md5:f=qr.md.md5.create(),u=16;break}if(f===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+d);var m=new qr.util.ByteBuffer(n.macSalt),v="macIterations"in n?parseInt(qr.util.bytesToHex(n.macIterations),16):1,y=xc.generateKey(r,m,3,v,u,f),_=qr.hmac.create();_.start(f,y),_.update(l.value);var E=_.getMac();if(E.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return Fte(o,l.value,t,r),o};function y2(e){if(e.composed||e.constructed){for(var t=qr.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function Fte(e,t,r,n){if(t=ye.fromDer(t,r),t.tagClass!==ye.Class.UNIVERSAL||t.type!==ye.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var a=0;a<t.value.length;a++){var i=t.value[a],o={},l=[];if(!ye.validate(i,hT,o,l)){var f=new Error("Cannot read ContentInfo.");throw f.errors=l,f}var u={encrypted:!1},d=null,m=o.content.value[0];switch(ye.derToOid(o.contentType)){case Xt.oids.data:if(m.tagClass!==ye.Class.UNIVERSAL||m.type!==ye.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");d=y2(m).value;break;case Xt.oids.encryptedData:d=Lte(m,n),u.encrypted=!0;break;default:var f=new Error("Unsupported PKCS#12 contentType.");throw f.contentType=ye.derToOid(o.contentType),f}u.safeBags=Dte(d,r,n),e.safeContents.push(u)}}function Lte(e,t){var r={},n=[];if(!ye.validate(e,qr.pkcs7.asn1.encryptedDataValidator,r,n)){var a=new Error("Cannot read EncryptedContentInfo.");throw a.errors=n,a}var i=ye.derToOid(r.contentType);if(i!==Xt.oids.data){var a=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw a.oid=i,a}i=ye.derToOid(r.encAlgorithm);var o=Xt.pbe.getCipher(i,r.encParameter,t),l=y2(r.encryptedContentAsn1),f=qr.util.createBuffer(l.value);if(o.update(f),!o.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return o.output.getBytes()}function Dte(e,t,r){if(!t&&e.length===0)return[];if(e=ye.fromDer(e,t),e.tagClass!==ye.Class.UNIVERSAL||e.type!==ye.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],a=0;a<e.value.length;a++){var i=e.value[a],o={},l=[];if(!ye.validate(i,Ote,o,l)){var f=new Error("Cannot read SafeBag.");throw f.errors=l,f}var u={type:ye.derToOid(o.bagId),attributes:$te(o.bagAttributes)};n.push(u);var d,m,v=o.bagValue.value[0];switch(u.type){case Xt.oids.pkcs8ShroudedKeyBag:if(v=Xt.decryptPrivateKeyInfo(v,r),v===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Xt.oids.keyBag:try{u.key=Xt.privateKeyFromAsn1(v)}catch{u.key=null,u.asn1=v}continue;case Xt.oids.certBag:d=Pte,m=function(){if(ye.derToOid(o.certId)!==Xt.oids.x509Certificate){var _=new Error("Unsupported certificate type, only X.509 supported.");throw _.oid=ye.derToOid(o.certId),_}var E=ye.fromDer(o.cert,t);try{u.cert=Xt.certificateFromAsn1(E,!0)}catch{u.cert=null,u.asn1=E}};break;default:var f=new Error("Unsupported PKCS#12 SafeBag type.");throw f.oid=u.type,f}if(d!==void 0&&!ye.validate(v,d,o,l)){var f=new Error("Cannot read PKCS#12 "+d.name);throw f.errors=l,f}m()}return n}function $te(e){var t={};if(e!==void 0)for(var r=0;r<e.length;++r){var n={},a=[];if(!ye.validate(e[r],Rte,n,a)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=a,i}var o=ye.derToOid(n.oid);if(Xt.oids[o]!==void 0){t[Xt.oids[o]]=[];for(var l=0;l<n.values.length;++l)t[Xt.oids[o]].push(n.values[l].value)}}return t}xc.toPkcs12Asn1=function(e,t,r,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var a=n.localKeyId,i;if(a!==null)a=qr.util.hexToBytes(a);else if(n.generateLocalKeyId)if(t){var o=qr.util.isArray(t)?t[0]:t;typeof o=="string"&&(o=Xt.certificateFromPem(o));var l=qr.md.sha1.create();l.update(ye.toDer(Xt.certificateToAsn1(o)).getBytes()),a=l.digest().getBytes()}else a=qr.random.getBytes(20);var f=[];a!==null&&f.push(ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.localKeyId).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,a)])])),"friendlyName"in n&&f.push(ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.friendlyName).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.BMPSTRING,!1,n.friendlyName)])])),f.length>0&&(i=ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,f));var u=[],d=[];t!==null&&(qr.util.isArray(t)?d=t:d=[t]);for(var m=[],v=0;v<d.length;++v){t=d[v],typeof t=="string"&&(t=Xt.certificateFromPem(t));var y=v===0?i:void 0,_=Xt.certificateToAsn1(t),E=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.certBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.x509Certificate).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(_).getBytes())])])]),y]);m.push(E)}if(m.length>0){var C=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,m),T=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(C).getBytes())])]);u.push(T)}var I=null;if(e!==null){var k=Xt.wrapRsaPrivateKey(Xt.privateKeyToAsn1(e));r===null?I=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.keyBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[k]),i]):I=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.pkcs8ShroudedKeyBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[Xt.encryptPrivateKeyInfo(k,r,n)]),i]);var N=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[I]),O=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(N).getBytes())])]);u.push(O)}var P=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,u),z;if(n.useMac){var l=qr.md.sha1.create(),V=new qr.util.ByteBuffer(qr.random.getBytes(n.saltSize)),L=n.count,e=xc.generateKey(r,V,3,L,20),U=qr.hmac.create();U.start(l,e),U.update(ye.toDer(P).getBytes());var M=U.getMac();z=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.sha1).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.NULL,!1,"")]),ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,M.getBytes())]),ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,V.getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.INTEGER,!1,ye.integerToDer(L).getBytes())])}return ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.INTEGER,!1,ye.integerToDer(3).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(P).getBytes())])]),z])},xc.generateKey=qr.pbe.generatePkcs12Key;var gs=ur,b2=gs.asn1,Zf=gs.pki=gs.pki||{};Zf.pemToDer=function(e){var t=gs.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return gs.util.createBuffer(t.body)},Zf.privateKeyFromPem=function(e){var t=gs.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=b2.fromDer(t.body);return Zf.privateKeyFromAsn1(n)},Zf.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:b2.toDer(Zf.privateKeyToAsn1(e)).getBytes()};return gs.pem.encode(r,{maxline:t})},Zf.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:b2.toDer(e).getBytes()};return gs.pem.encode(r,{maxline:t})};var Yr=ur,Mc=Yr.sha512=Yr.sha512||{};Yr.md.sha512=Yr.md.algorithms.sha512=Mc;var dT=Yr.sha384=Yr.sha512.sha384=Yr.sha512.sha384||{};dT.create=function(){return Mc.create("SHA-384")},Yr.md.sha384=Yr.md.algorithms.sha384=dT,Yr.sha512.sha256=Yr.sha512.sha256||{create:function(){return Mc.create("SHA-512/256")}},Yr.md["sha512/256"]=Yr.md.algorithms["sha512/256"]=Yr.sha512.sha256,Yr.sha512.sha224=Yr.sha512.sha224||{create:function(){return Mc.create("SHA-512/224")}},Yr.md["sha512/224"]=Yr.md.algorithms["sha512/224"]=Yr.sha512.sha224,Mc.create=function(e){if(pT||zte(),typeof e>"u"&&(e="SHA-512"),!(e in Cl))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Cl[e],r=null,n=Yr.util.createBuffer(),a=new Array(80),i=0;i<80;++i)a[i]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var l={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return l.start=function(){l.messageLength=0,l.fullMessageLength=l.messageLength128=[];for(var f=l.messageLengthSize/4,u=0;u<f;++u)l.fullMessageLength.push(0);n=Yr.util.createBuffer(),r=new Array(t.length);for(var u=0;u<t.length;++u)r[u]=t[u].slice(0);return l},l.start(),l.update=function(f,u){u==="utf8"&&(f=Yr.util.encodeUtf8(f));var d=f.length;l.messageLength+=d,d=[d/4294967296>>>0,d>>>0];for(var m=l.fullMessageLength.length-1;m>=0;--m)l.fullMessageLength[m]+=d[1],d[1]=d[0]+(l.fullMessageLength[m]/4294967296>>>0),l.fullMessageLength[m]=l.fullMessageLength[m]>>>0,d[0]=d[1]/4294967296>>>0;return n.putBytes(f),vT(r,a,n),(n.read>2048||n.length()===0)&&n.compact(),l},l.digest=function(){var f=Yr.util.createBuffer();f.putBytes(n.bytes());var u=l.fullMessageLength[l.fullMessageLength.length-1]+l.messageLengthSize,d=u&l.blockLength-1;f.putBytes(_2.substr(0,l.blockLength-d));for(var m,v,y=l.fullMessageLength[0]*8,_=0;_<l.fullMessageLength.length-1;++_)m=l.fullMessageLength[_+1]*8,v=m/4294967296>>>0,y+=v,f.putInt32(y>>>0),y=m>>>0;f.putInt32(y);for(var E=new Array(r.length),_=0;_<r.length;++_)E[_]=r[_].slice(0);vT(E,a,f);var C=Yr.util.createBuffer(),T;e==="SHA-512"?T=E.length:e==="SHA-384"?T=E.length-2:T=E.length-4;for(var _=0;_<T;++_)C.putInt32(E[_][0]),(_!==T-1||e!=="SHA-512/224")&&C.putInt32(E[_][1]);return C},l};var _2=null,pT=!1,w2=null,Cl=null;function zte(){_2=String.fromCharCode(128),_2+=Yr.util.fillString(String.fromCharCode(0),128),w2=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Cl={},Cl["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Cl["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Cl["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Cl["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],pT=!0}function vT(e,t,r){for(var n,a,i,o,l,f,u,d,m,v,y,_,E,C,T,I,k,N,O,P,z,V,L,U,M,s,h,p,g,b,w,A,x,c,S,B=r.length();B>=128;){for(g=0;g<16;++g)t[g][0]=r.getInt32()>>>0,t[g][1]=r.getInt32()>>>0;for(;g<80;++g)A=t[g-2],b=A[0],w=A[1],n=((b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6)>>>0,a=((b<<13|w>>>19)^(w<<3|b>>>29)^(b<<26|w>>>6))>>>0,c=t[g-15],b=c[0],w=c[1],i=((b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7)>>>0,o=((b<<31|w>>>1)^(b<<24|w>>>8)^(b<<25|w>>>7))>>>0,x=t[g-7],S=t[g-16],w=a+x[1]+o+S[1],t[g][0]=n+x[0]+i+S[0]+(w/4294967296>>>0)>>>0,t[g][1]=w>>>0;for(E=e[0][0],C=e[0][1],T=e[1][0],I=e[1][1],k=e[2][0],N=e[2][1],O=e[3][0],P=e[3][1],z=e[4][0],V=e[4][1],L=e[5][0],U=e[5][1],M=e[6][0],s=e[6][1],h=e[7][0],p=e[7][1],g=0;g<80;++g)u=((z>>>14|V<<18)^(z>>>18|V<<14)^(V>>>9|z<<23))>>>0,d=((z<<18|V>>>14)^(z<<14|V>>>18)^(V<<23|z>>>9))>>>0,m=(M^z&(L^M))>>>0,v=(s^V&(U^s))>>>0,l=((E>>>28|C<<4)^(C>>>2|E<<30)^(C>>>7|E<<25))>>>0,f=((E<<4|C>>>28)^(C<<30|E>>>2)^(C<<25|E>>>7))>>>0,y=(E&T|k&(E^T))>>>0,_=(C&I|N&(C^I))>>>0,w=p+d+v+w2[g][1]+t[g][1],n=h+u+m+w2[g][0]+t[g][0]+(w/4294967296>>>0)>>>0,a=w>>>0,w=f+_,i=l+y+(w/4294967296>>>0)>>>0,o=w>>>0,h=M,p=s,M=L,s=U,L=z,U=V,w=P+a,z=O+n+(w/4294967296>>>0)>>>0,V=w>>>0,O=k,P=N,k=T,N=I,T=E,I=C,w=a+o,E=n+i+(w/4294967296>>>0)>>>0,C=w>>>0;w=e[0][1]+C,e[0][0]=e[0][0]+E+(w/4294967296>>>0)>>>0,e[0][1]=w>>>0,w=e[1][1]+I,e[1][0]=e[1][0]+T+(w/4294967296>>>0)>>>0,e[1][1]=w>>>0,w=e[2][1]+N,e[2][0]=e[2][0]+k+(w/4294967296>>>0)>>>0,e[2][1]=w>>>0,w=e[3][1]+P,e[3][0]=e[3][0]+O+(w/4294967296>>>0)>>>0,e[3][1]=w>>>0,w=e[4][1]+V,e[4][0]=e[4][0]+z+(w/4294967296>>>0)>>>0,e[4][1]=w>>>0,w=e[5][1]+U,e[5][0]=e[5][0]+L+(w/4294967296>>>0)>>>0,e[5][1]=w>>>0,w=e[6][1]+s,e[6][0]=e[6][0]+M+(w/4294967296>>>0)>>>0,e[6][1]=w>>>0,w=e[7][1]+p,e[7][0]=e[7][0]+h+(w/4294967296>>>0)>>>0,e[7][1]=w>>>0,B-=128}}/*!
722
+ `+l+t.substr(o+1),i=a-o-1,o=-1,++a}else(t[a]===" "||t[a]===" "||t[a]===",")&&(o=a);return t}function rQ(e){return e.replace(/^\s+/,"")}var Ka=ur,OC=Ka.sha256=Ka.sha256||{};Ka.md.sha256=Ka.md.algorithms.sha256=OC,OC.create=function(){RC||nQ();var e=null,t=Ka.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i<a;++i)n.fullMessageLength.push(0);return t=Ka.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(a,i){i==="utf8"&&(a=Ka.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=o[1],o[1]=o[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(a),FC(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Ka.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=i&n.blockLength-1;a.putBytes(l2.substr(0,n.blockLength-o));for(var l,f,u=n.fullMessageLength[0]*8,d=0;d<n.fullMessageLength.length-1;++d)l=n.fullMessageLength[d+1]*8,f=l/4294967296>>>0,u+=f,a.putInt32(u>>>0),u=l>>>0;a.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};FC(m,r,a);var v=Ka.util.createBuffer();return v.putInt32(m.h0),v.putInt32(m.h1),v.putInt32(m.h2),v.putInt32(m.h3),v.putInt32(m.h4),v.putInt32(m.h5),v.putInt32(m.h6),v.putInt32(m.h7),v},n};var l2=null,RC=!1,PC=null;function nQ(){l2=String.fromCharCode(128),l2+=Ka.util.fillString(String.fromCharCode(0),64),PC=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],RC=!0}function FC(e,t,r){for(var n,a,i,o,l,f,u,d,m,v,y,_,E,C,T,I=r.length();I>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=t[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,a=t[u-15],a=(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[u]=n+t[u-7]+a+t[u-16]|0;for(d=e.h0,m=e.h1,v=e.h2,y=e.h3,_=e.h4,E=e.h5,C=e.h6,T=e.h7,u=0;u<64;++u)o=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),l=C^_&(E^C),i=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),f=d&m|v&(d^m),n=T+o+l+PC[u]+t[u],a=i+f,T=C,C=E,E=_,_=y+n>>>0,y=v,v=m,m=d,d=n+a>>>0;e.h0=e.h0+d|0,e.h1=e.h1+m|0,e.h2=e.h2+v|0,e.h3=e.h3+y|0,e.h4=e.h4+_|0,e.h5=e.h5+E|0,e.h6=e.h6+C|0,e.h7=e.h7+T|0,I-=64}}var Wa=ur,C0=null;Wa.util.isNodejs&&!Wa.options.usePureJavaScript&&!fe.versions["node-webkit"]&&(C0=wc());var iQ=Wa.prng=Wa.prng||{};iQ.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),a=0;a<32;++a)n[a]=r.create();t.pools=n,t.pool=0,t.generate=function(u,d){if(!d)return t.generateSync(u);var m=t.plugin.cipher,v=t.plugin.increment,y=t.plugin.formatKey,_=t.plugin.formatSeed,E=Wa.util.createBuffer();t.key=null,C();function C(T){if(T)return d(T);if(E.length()>=u)return d(null,E.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Wa.util.nextTick(function(){i(C)});var I=m(t.key,t.seed);t.generated+=I.length,E.putBytes(I),t.key=y(m(t.key,v(t.seed))),t.seed=_(m(t.key,t.seed)),Wa.util.setImmediate(C)}},t.generateSync=function(u){var d=t.plugin.cipher,m=t.plugin.increment,v=t.plugin.formatKey,y=t.plugin.formatSeed;t.key=null;for(var _=Wa.util.createBuffer();_.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&o();var E=d(t.key,t.seed);t.generated+=E.length,_.putBytes(E),t.key=v(d(t.key,m(t.seed))),t.seed=y(d(t.key,t.seed))}return _.getBytes(u)};function i(u){if(t.pools[0].messageLength>=32)return l(),u();var d=32-t.pools[0].messageLength<<5;t.seedFile(d,function(m,v){if(m)return u(m);t.collect(v),l(),u()})}function o(){if(t.pools[0].messageLength>=32)return l();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),l()}function l(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var d=1,m=0;m<32;++m)t.reseeds%d===0&&(u.update(t.pools[m].digest().getBytes()),t.pools[m].start()),d=d<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var v=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(v),t.generated=0}function f(u){var d=null,m=Wa.util.globalScope,v=m.crypto||m.msCrypto;v&&v.getRandomValues&&(d=function(O){return v.getRandomValues(O)});var y=Wa.util.createBuffer();if(d)for(;y.length()<u;){var _=Math.max(1,Math.min(u-y.length(),65536)/4),E=new Uint32Array(Math.floor(_));try{d(E);for(var C=0;C<E.length;++C)y.putInt32(E[C])}catch(O){if(!(typeof QuotaExceededError<"u"&&O instanceof QuotaExceededError))throw O}}if(y.length()<u)for(var T,I,k,N=Math.floor(Math.random()*65536);y.length()<u;){I=16807*(N&65535),T=16807*(N>>16),I+=(T&32767)<<16,I+=T>>15,I=(I&2147483647)+(I>>31),N=I&4294967295;for(var C=0;C<3;++C)k=N>>>(C<<3),k^=Math.floor(Math.random()*256),y.putByte(k&255)}return y.getBytes(u)}return C0?(t.seedFile=function(u,d){C0.randomBytes(u,function(m,v){if(m)return d(m);d(null,v.toString())})},t.seedFileSync=function(u){return C0.randomBytes(u).toString()}):(t.seedFile=function(u,d){try{d(null,f(u))}catch(m){d(m)}},t.seedFileSync=f),t.collect=function(u){for(var d=u.length,m=0;m<d;++m)t.pools[t.pool].update(u.substr(m,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,d){for(var m="",v=0;v<d;v+=8)m+=String.fromCharCode(u>>v&255);t.collect(m)},t.registerWorker=function(u){if(u===self)t.seedFile=function(m,v){function y(_){var E=_.data;E.forge&&E.forge.prng&&(self.removeEventListener("message",y),v(E.forge.prng.err,E.forge.prng.bytes))}self.addEventListener("message",y),self.postMessage({forge:{prng:{needed:m}}})};else{var d=function(m){var v=m.data;v.forge&&v.forge.prng&&t.seedFile(v.forge.prng.needed,function(y,_){u.postMessage({forge:{prng:{err:y,bytes:_}}})})};u.addEventListener("message",d)}},t};var Sn=ur;(function(){if(Sn.random&&Sn.random.getBytes){Sn.random;return}(function(e){var t={},r=new Array(4),n=Sn.util.createBuffer();t.formatKey=function(m){var v=Sn.util.createBuffer(m);return m=new Array(4),m[0]=v.getInt32(),m[1]=v.getInt32(),m[2]=v.getInt32(),m[3]=v.getInt32(),Sn.aes._expandKey(m,!1)},t.formatSeed=function(m){var v=Sn.util.createBuffer(m);return m=new Array(4),m[0]=v.getInt32(),m[1]=v.getInt32(),m[2]=v.getInt32(),m[3]=v.getInt32(),m},t.cipher=function(m,v){return Sn.aes._updateBlock(m,v,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},t.increment=function(m){return++m[3],m},t.md=Sn.md.sha256;function a(){var m=Sn.prng.create(t);return m.getBytes=function(v,y){return m.generate(v,y)},m.getBytesSync=function(v){return m.generate(v)},m}var i=a(),o=null,l=Sn.util.globalScope,f=l.crypto||l.msCrypto;if(f&&f.getRandomValues&&(o=function(m){return f.getRandomValues(m)}),Sn.options.usePureJavaScript||!Sn.util.isNodejs&&!o){if(i.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var d in navigator)try{typeof navigator[d]=="string"&&(u+=navigator[d])}catch{}i.collect(u),u=null}e&&(e().mousemove(function(m){i.collectInt(m.clientX,16),i.collectInt(m.clientY,16)}),e().keypress(function(m){i.collectInt(m.charCode,8)}))}if(!Sn.random)Sn.random=i;else for(var d in i)Sn.random[d]=i[d];Sn.random.createInstance=a,Sn.random})(typeof jQuery<"u"?jQuery:null)})();var Ga=ur,LC=Ga.sha1=Ga.sha1||{};Ga.md.sha1=Ga.md.algorithms.sha1=LC,LC.create=function(){DC||aQ();var e=null,t=Ga.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i<a;++i)n.fullMessageLength.push(0);return t=Ga.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(a,i){i==="utf8"&&(a=Ga.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=o[1],o[1]=o[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(a),$C(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Ga.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=i&n.blockLength-1;a.putBytes(f2.substr(0,n.blockLength-o));for(var l,f,u=n.fullMessageLength[0]*8,d=0;d<n.fullMessageLength.length-1;++d)l=n.fullMessageLength[d+1]*8,f=l/4294967296>>>0,u+=f,a.putInt32(u>>>0),u=l>>>0;a.putInt32(u);var m={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};$C(m,r,a);var v=Ga.util.createBuffer();return v.putInt32(m.h0),v.putInt32(m.h1),v.putInt32(m.h2),v.putInt32(m.h3),v.putInt32(m.h4),v},n};var f2=null,DC=!1;function aQ(){f2=String.fromCharCode(128),f2+=Ga.util.fillString(String.fromCharCode(0),64),DC=!0}function $C(e,t,r){for(var n,a,i,o,l,f,u,d,m=r.length();m>=64;){for(a=e.h0,i=e.h1,o=e.h2,l=e.h3,f=e.h4,d=0;d<16;++d)n=r.getInt32(),t[d]=n,u=l^i&(o^l),n=(a<<5|a>>>27)+u+f+1518500249+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<20;++d)n=t[d-3]^t[d-8]^t[d-14]^t[d-16],n=n<<1|n>>>31,t[d]=n,u=l^i&(o^l),n=(a<<5|a>>>27)+u+f+1518500249+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<32;++d)n=t[d-3]^t[d-8]^t[d-14]^t[d-16],n=n<<1|n>>>31,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+1859775393+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<40;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+1859775393+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<60;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i&o|l&(i^o),n=(a<<5|a>>>27)+u+f+2400959708+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;for(;d<80;++d)n=t[d-6]^t[d-16]^t[d-28]^t[d-32],n=n<<2|n>>>30,t[d]=n,u=i^o^l,n=(a<<5|a>>>27)+u+f+3395469782+n,f=l,l=o,o=(i<<30|i>>>2)>>>0,i=a,a=n;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+o|0,e.h3=e.h3+l|0,e.h4=e.h4+f|0,m-=64}}var Za=ur,zC=Za.pkcs1=Za.pkcs1||{};zC.encode_rsa_oaep=function(e,t,r){var n,a,i,o;typeof r=="string"?(n=r,a=arguments[3]||void 0,i=arguments[4]||void 0):r&&(n=r.label||void 0,a=r.seed||void 0,i=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md)),i?i.start():i=Za.md.sha1.create(),o||(o=i);var l=Math.ceil(e.n.bitLength()/8),f=l-2*i.digestLength-2;if(t.length>f){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=f,u}n||(n=""),i.update(n,"raw");for(var d=i.digest(),m="",v=f-t.length,y=0;y<v;y++)m+="\0";var _=d.getBytes()+m+""+t;if(!a)a=Za.random.getBytes(i.digestLength);else if(a.length!==i.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=a.length,u.digestLength=i.digestLength,u}var E=T0(a,l-i.digestLength-1,o),C=Za.util.xorBytes(_,E,_.length),T=T0(C,i.digestLength,o),I=Za.util.xorBytes(a,T,a.length);return"\0"+I+C},zC.decode_rsa_oaep=function(e,t,r){var n,a,i;typeof r=="string"?(n=r,a=arguments[3]||void 0):r&&(n=r.label||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(i=r.mgf1.md));var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var C=new Error("RSAES-OAEP encoded message length is invalid.");throw C.length=t.length,C.expectedLength=o,C}if(a===void 0?a=Za.md.sha1.create():a.start(),i||(i=a),o<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),a.update(n,"raw");for(var l=a.digest().getBytes(),f=t.charAt(0),u=t.substring(1,a.digestLength+1),d=t.substring(1+a.digestLength),m=T0(d,a.digestLength,i),v=Za.util.xorBytes(u,m,u.length),y=T0(v,o-a.digestLength-1,i),_=Za.util.xorBytes(d,y,d.length),E=_.substring(0,a.digestLength),C=f!=="\0",T=0;T<a.digestLength;++T)C|=l.charAt(T)!==E.charAt(T);for(var I=1,k=a.digestLength,N=a.digestLength;N<_.length;N++){var O=_.charCodeAt(N),P=O&1^1,z=I?65534:0;C|=O&z,I=I&P,k+=I}if(C||_.charCodeAt(k)!==1)throw new Error("Invalid RSAES-OAEP padding.");return _.substring(k+1)};function T0(e,t,r){r||(r=Za.md.sha1.create());for(var n="",a=Math.ceil(t/r.digestLength),i=0;i<a;++i){var o=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);r.start(),r.update(e+o),n+=r.digest().getBytes()}return n.substring(0,t)}var Qr=ur;Qr.des=Qr.des||{},Qr.des.startEncrypting=function(e,t,r,n){var a=A0({key:e,output:r,decrypt:!1,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a},Qr.des.createEncryptionCipher=function(e,t){return A0({key:e,output:null,decrypt:!1,mode:t})},Qr.des.startDecrypting=function(e,t,r,n){var a=A0({key:e,output:r,decrypt:!0,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a},Qr.des.createDecryptionCipher=function(e,t){return A0({key:e,output:null,decrypt:!0,mode:t})},Qr.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(n,a){return UC(r._keys,n,a,!1)},decrypt:function(n,a){return UC(r._keys,n,a,!0)}}}),r._init=!1},Qr.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Qr.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=pQ(t),this._init=!0}},Ya("DES-ECB",Qr.cipher.modes.ecb),Ya("DES-CBC",Qr.cipher.modes.cbc),Ya("DES-CFB",Qr.cipher.modes.cfb),Ya("DES-OFB",Qr.cipher.modes.ofb),Ya("DES-CTR",Qr.cipher.modes.ctr),Ya("3DES-ECB",Qr.cipher.modes.ecb),Ya("3DES-CBC",Qr.cipher.modes.cbc),Ya("3DES-CFB",Qr.cipher.modes.cfb),Ya("3DES-OFB",Qr.cipher.modes.ofb),Ya("3DES-CTR",Qr.cipher.modes.ctr);function Ya(e,t){var r=function(){return new Qr.des.Algorithm(e,t)};Qr.cipher.registerAlgorithm(e,r)}var oQ=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],sQ=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],lQ=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],fQ=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],uQ=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],cQ=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],hQ=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],dQ=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function pQ(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],f=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],d=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],y=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],_=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],E=e.length()>8?3:1,C=[],T=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],I=0,k,N=0;N<E;N++){var O=e.getInt32(),P=e.getInt32();k=(O>>>4^P)&252645135,P^=k,O^=k<<4,k=(P>>>-16^O)&65535,O^=k,P^=k<<-16,k=(O>>>2^P)&858993459,P^=k,O^=k<<2,k=(P>>>-16^O)&65535,O^=k,P^=k<<-16,k=(O>>>1^P)&1431655765,P^=k,O^=k<<1,k=(P>>>8^O)&16711935,O^=k,P^=k<<8,k=(O>>>1^P)&1431655765,P^=k,O^=k<<1,k=O<<8|P>>>20&240,O=P<<24|P<<8&16711680|P>>>8&65280|P>>>24&240,P=k;for(var z=0;z<T.length;++z){T[z]?(O=O<<2|O>>>26,P=P<<2|P>>>26):(O=O<<1|O>>>27,P=P<<1|P>>>27),O&=-15,P&=-15;var V=t[O>>>28]|r[O>>>24&15]|n[O>>>20&15]|a[O>>>16&15]|i[O>>>12&15]|o[O>>>8&15]|l[O>>>4&15],L=f[P>>>28]|u[P>>>24&15]|d[P>>>20&15]|m[P>>>16&15]|v[P>>>12&15]|y[P>>>8&15]|_[P>>>4&15];k=(L>>>16^V)&65535,C[I++]=V^k,C[I++]=L^k<<16}}return C}function UC(e,t,r,n){var a=e.length===32?3:9,i;a===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var o,l=t[0],f=t[1];o=(l>>>4^f)&252645135,f^=o,l^=o<<4,o=(l>>>16^f)&65535,f^=o,l^=o<<16,o=(f>>>2^l)&858993459,l^=o,f^=o<<2,o=(f>>>8^l)&16711935,l^=o,f^=o<<8,o=(l>>>1^f)&1431655765,f^=o,l^=o<<1,l=l<<1|l>>>31,f=f<<1|f>>>31;for(var u=0;u<a;u+=3){for(var d=i[u+1],m=i[u+2],v=i[u];v!=d;v+=m){var y=f^e[v],_=(f>>>4|f<<28)^e[v+1];o=l,l=f,f=o^(sQ[y>>>24&63]|fQ[y>>>16&63]|cQ[y>>>8&63]|dQ[y&63]|oQ[_>>>24&63]|lQ[_>>>16&63]|uQ[_>>>8&63]|hQ[_&63])}o=l,l=f,f=o}l=l>>>1|l<<31,f=f>>>1|f<<31,o=(l>>>1^f)&1431655765,f^=o,l^=o<<1,o=(f>>>8^l)&16711935,l^=o,f^=o<<8,o=(f>>>2^l)&858993459,l^=o,f^=o<<2,o=(l>>>16^f)&65535,f^=o,l^=o<<16,o=(l>>>4^f)&252645135,f^=o,l^=o<<4,r[0]=l,r[1]=f}function A0(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,n;e.decrypt?n=Qr.cipher.createDecipher(r,e.key):n=Qr.cipher.createCipher(r,e.key);var a=n.start;return n.start=function(i,o){var l=null;o instanceof Qr.util.ByteBuffer&&(l=o,o={}),o=o||{},o.output=l,o.iv=i,a.call(n,o)},n}var Hf=ur,ct=Hf.asn1,jf=Hf.pkcs7asn1=Hf.pkcs7asn1||{};Hf.pkcs7=Hf.pkcs7||{},Hf.pkcs7.asn1=jf;var qC={name:"ContentInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};jf.contentInfoValidator=qC;var VC={name:"EncryptedContentInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};jf.envelopedDataValidator={name:"EnvelopedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(VC)},jf.encryptedDataValidator={name:"EncryptedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"}].concat(VC)};var vQ={name:"SignerInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:ct.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};jf.signedDataValidator={name:"SignedData",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},qC,{name:"SignedData.Certificates",tagClass:ct.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:ct.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SET,capture:"signerInfos",optional:!0,value:[vQ]}]},jf.recipientInfoValidator={name:"RecipientInfo",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:ct.Class.UNIVERSAL,type:ct.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:ct.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:ct.Class.UNIVERSAL,type:ct.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var I0=ur;I0.mgf=I0.mgf||{},I0.mgf.mgf1=I0.mgf1;var El=ur,mQ=El.pss=El.pss||{};mQ.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,n=t.digestLength,a=e.salt||null;typeof a=="string"&&(a=El.util.createBuffer(a));var i;if("saltLength"in e)i=e.saltLength;else if(a!==null)i=a.length();else throw new Error("Salt length not specified or specific salt not given.");if(a!==null&&a.length()!==i)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||El.random,l={};return l.encode=function(f,u){var d,m=u-1,v=Math.ceil(m/8),y=f.digest().getBytes();if(v<n+i+2)throw new Error("Message is too long to encrypt.");var _;a===null?_=o.getBytesSync(i):_=a.bytes();var E=new El.util.ByteBuffer;E.fillWithByte(0,8),E.putBytes(y),E.putBytes(_),t.start(),t.update(E.getBytes());var C=t.digest().getBytes(),T=new El.util.ByteBuffer;T.fillWithByte(0,v-i-n-2),T.putByte(1),T.putBytes(_);var I=T.getBytes(),k=v-n-1,N=r.generate(C,k),O="";for(d=0;d<k;d++)O+=String.fromCharCode(I.charCodeAt(d)^N.charCodeAt(d));var P=65280>>8*v-m&255;return O=String.fromCharCode(O.charCodeAt(0)&~P)+O.substr(1),O+C+String.fromCharCode(188)},l.verify=function(f,u,d){var m,v=d-1,y=Math.ceil(v/8);if(u=u.substr(-y),y<n+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(y-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var _=y-n-1,E=u.substr(0,_),C=u.substr(_,n),T=65280>>8*y-v&255;if(E.charCodeAt(0)&T)throw new Error("Bits beyond keysize not zero as expected.");var I=r.generate(C,_),k="";for(m=0;m<_;m++)k+=String.fromCharCode(E.charCodeAt(m)^I.charCodeAt(m));k=String.fromCharCode(k.charCodeAt(0)&~T)+k.substr(1);var N=y-n-i-2;for(m=0;m<N;m++)if(k.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(k.charCodeAt(N)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var O=k.substr(-i),P=new El.util.ByteBuffer;P.fillWithByte(0,8),P.putBytes(f),P.putBytes(O),t.start(),t.update(P.getBytes());var z=t.digest().getBytes();return C===z},l};var u2=ur;u2.jsbn=u2.jsbn||{};var No;function Qe(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}u2.jsbn.BigInteger=Qe;function ar(){return new Qe(null)}function gQ(e,t,r,n,a,i){for(;--i>=0;){var o=t*this.data[e++]+r.data[n]+a;a=Math.floor(o/67108864),r.data[n++]=o&67108863}return a}function yQ(e,t,r,n,a,i){for(var o=t&32767,l=t>>15;--i>=0;){var f=this.data[e]&32767,u=this.data[e++]>>15,d=l*f+u*o;f=o*f+((d&32767)<<15)+r.data[n]+(a&1073741823),a=(f>>>30)+(d>>>15)+l*u+(a>>>30),r.data[n++]=f&1073741823}return a}function HC(e,t,r,n,a,i){for(var o=t&16383,l=t>>14;--i>=0;){var f=this.data[e]&16383,u=this.data[e++]>>14,d=l*f+u*o;f=o*f+((d&16383)<<14)+r.data[n]+a,a=(f>>28)+(d>>14)+l*u,r.data[n++]=f&268435455}return a}typeof navigator>"u"?(Qe.prototype.am=HC,No=28):navigator.appName=="Microsoft Internet Explorer"?(Qe.prototype.am=yQ,No=30):navigator.appName!="Netscape"?(Qe.prototype.am=gQ,No=26):(Qe.prototype.am=HC,No=28),Qe.prototype.DB=No,Qe.prototype.DM=(1<<No)-1,Qe.prototype.DV=1<<No;var c2=52;Qe.prototype.FV=Math.pow(2,c2),Qe.prototype.F1=c2-No,Qe.prototype.F2=2*No-c2;var bQ="0123456789abcdefghijklmnopqrstuvwxyz",B0=new Array,Kf,Ui;for(Kf="0".charCodeAt(0),Ui=0;Ui<=9;++Ui)B0[Kf++]=Ui;for(Kf="a".charCodeAt(0),Ui=10;Ui<36;++Ui)B0[Kf++]=Ui;for(Kf="A".charCodeAt(0),Ui=10;Ui<36;++Ui)B0[Kf++]=Ui;function jC(e){return bQ.charAt(e)}function KC(e,t){var r=B0[e.charCodeAt(t)];return r??-1}function _Q(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function wQ(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function ps(e){var t=ar();return t.fromInt(e),t}function EQ(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,a=!1,i=0;--n>=0;){var o=r==8?e[n]&255:KC(e,n);if(o<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,i==0?this.data[this.t++]=o:i+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-i)-1)<<i,this.data[this.t++]=o>>this.DB-i):this.data[this.t-1]|=o<<i,i+=r,i>=this.DB&&(i-=this.DB)}r==8&&e[0]&128&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),a&&Qe.ZERO.subTo(this,this)}function xQ(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function SQ(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,n,a=!1,i="",o=this.t,l=this.DB-o*this.DB%t;if(o-- >0)for(l<this.DB&&(n=this.data[o]>>l)>0&&(a=!0,i=jC(n));o>=0;)l<t?(n=(this.data[o]&(1<<l)-1)<<t-l,n|=this.data[--o]>>(l+=this.DB-t)):(n=this.data[o]>>(l-=t)&r,l<=0&&(l+=this.DB,--o)),n>0&&(a=!0),a&&(i+=jC(n));return a?i:"0"}function MQ(){var e=ar();return Qe.ZERO.subTo(this,e),e}function CQ(){return this.s<0?this.negate():this}function TQ(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function k0(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function AQ(){return this.t<=0?0:this.DB*(this.t-1)+k0(this.data[this.t-1]^this.s&this.DM)}function IQ(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}function BQ(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s}function kQ(e,t){var r=e%this.DB,n=this.DB-r,a=(1<<n)-1,i=Math.floor(e/this.DB),o=this.s<<r&this.DM,l;for(l=this.t-1;l>=0;--l)t.data[l+i+1]=this.data[l]>>n|o,o=(this.data[l]&a)<<r;for(l=i-1;l>=0;--l)t.data[l]=0;t.data[i]=o,t.t=this.t+i+1,t.s=this.s,t.clamp()}function NQ(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,a=this.DB-n,i=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&i)<<a,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&i)<<a),t.t=this.t-r,t.clamp()}function OQ(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()}function RQ(e,t){var r=this.abs(),n=e.abs(),a=r.t;for(t.t=a+n.t;--a>=0;)t.data[a]=0;for(a=0;a<n.t;++a)t.data[a+r.t]=r.am(0,n.data[a],t,a,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&Qe.ZERO.subTo(t,t)}function PQ(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}function FQ(e,t,r){var n=e.abs();if(!(n.t<=0)){var a=this.abs();if(a.t<n.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ar());var i=ar(),o=this.s,l=e.s,f=this.DB-k0(n.data[n.t-1]);f>0?(n.lShiftTo(f,i),a.lShiftTo(f,r)):(n.copyTo(i),a.copyTo(r));var u=i.t,d=i.data[u-1];if(d!=0){var m=d*(1<<this.F1)+(u>1?i.data[u-2]>>this.F2:0),v=this.FV/m,y=(1<<this.F1)/m,_=1<<this.F2,E=r.t,C=E-u,T=t??ar();for(i.dlShiftTo(C,T),r.compareTo(T)>=0&&(r.data[r.t++]=1,r.subTo(T,r)),Qe.ONE.dlShiftTo(u,T),T.subTo(i,i);i.t<u;)i.data[i.t++]=0;for(;--C>=0;){var I=r.data[--E]==d?this.DM:Math.floor(r.data[E]*v+(r.data[E-1]+_)*y);if((r.data[E]+=i.am(0,I,r,C,0,u))<I)for(i.dlShiftTo(C,T),r.subTo(T,r);r.data[E]<--I;)r.subTo(T,r)}t!=null&&(r.drShiftTo(u,t),o!=l&&Qe.ZERO.subTo(t,t)),r.t=u,r.clamp(),f>0&&r.rShiftTo(f,r),o<0&&Qe.ZERO.subTo(r,r)}}}function LQ(e){var t=ar();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Qe.ZERO)>0&&e.subTo(t,t),t}function xl(e){this.m=e}function DQ(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function $Q(e){return e}function zQ(e){e.divRemTo(this.m,null,e)}function UQ(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function qQ(e,t){e.squareTo(t),this.reduce(t)}xl.prototype.convert=DQ,xl.prototype.revert=$Q,xl.prototype.reduce=zQ,xl.prototype.mulTo=UQ,xl.prototype.sqrTo=qQ;function VQ(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Sl(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function HQ(e){var t=ar();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Qe.ZERO)>0&&this.m.subTo(t,t),t}function jQ(e){var t=ar();return e.copyTo(t),this.reduce(t),t}function KQ(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767,n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function WQ(e,t){e.squareTo(t),this.reduce(t)}function GQ(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Sl.prototype.convert=HQ,Sl.prototype.revert=jQ,Sl.prototype.reduce=KQ,Sl.prototype.mulTo=GQ,Sl.prototype.sqrTo=WQ;function ZQ(){return(this.t>0?this.data[0]&1:this.s)==0}function YQ(e,t){if(e>4294967295||e<1)return Qe.ONE;var r=ar(),n=ar(),a=t.convert(this),i=k0(e)-1;for(a.copyTo(r);--i>=0;)if(t.sqrTo(r,n),(e&1<<i)>0)t.mulTo(n,a,r);else{var o=r;r=n,n=o}return t.revert(r)}function JQ(e,t){var r;return e<256||t.isEven()?r=new xl(t):r=new Sl(t),this.exp(e,r)}Qe.prototype.copyTo=_Q,Qe.prototype.fromInt=wQ,Qe.prototype.fromString=EQ,Qe.prototype.clamp=xQ,Qe.prototype.dlShiftTo=IQ,Qe.prototype.drShiftTo=BQ,Qe.prototype.lShiftTo=kQ,Qe.prototype.rShiftTo=NQ,Qe.prototype.subTo=OQ,Qe.prototype.multiplyTo=RQ,Qe.prototype.squareTo=PQ,Qe.prototype.divRemTo=FQ,Qe.prototype.invDigit=VQ,Qe.prototype.isEven=ZQ,Qe.prototype.exp=YQ,Qe.prototype.toString=SQ,Qe.prototype.negate=MQ,Qe.prototype.abs=CQ,Qe.prototype.compareTo=TQ,Qe.prototype.bitLength=AQ,Qe.prototype.mod=LQ,Qe.prototype.modPowInt=JQ,Qe.ZERO=ps(0),Qe.ONE=ps(1);function XQ(){var e=ar();return this.copyTo(e),e}function QQ(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function eee(){return this.t==0?this.s:this.data[0]<<24>>24}function tee(){return this.t==0?this.s:this.data[0]<<16>>16}function ree(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function nee(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function iee(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=ps(r),a=ar(),i=ar(),o="";for(this.divRemTo(n,a,i);a.signum()>0;)o=(r+i.intValue()).toString(e).substr(1)+o,a.divRemTo(n,a,i);return i.intValue().toString(e)+o}function aee(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),a=!1,i=0,o=0,l=0;l<e.length;++l){var f=KC(e,l);if(f<0){e.charAt(l)=="-"&&this.signum()==0&&(a=!0);continue}o=t*o+f,++i>=r&&(this.dMultiply(n),this.dAddOffset(o,0),i=0,o=0)}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(o,0)),a&&Qe.ZERO.subTo(this,this)}function oee(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(Qe.ONE.shiftLeft(e-1),h2,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(Qe.ONE.shiftLeft(e-1),this);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,this.fromString(n,256)}}function see(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,n,a=0;if(e-- >0)for(r<this.DB&&(n=this.data[e]>>r)!=(this.s&this.DM)>>r&&(t[a++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this.data[e]&(1<<r)-1)<<8-r,n|=this.data[--e]>>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(t[a++]=n);return t}function lee(e){return this.compareTo(e)==0}function fee(e){return this.compareTo(e)<0?this:e}function uee(e){return this.compareTo(e)>0?this:e}function cee(e,t,r){var n,a,i=Math.min(e.t,this.t);for(n=0;n<i;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(a=e.s&this.DM,n=i;n<this.t;++n)r.data[n]=t(this.data[n],a);r.t=this.t}else{for(a=this.s&this.DM,n=i;n<e.t;++n)r.data[n]=t(a,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}function hee(e,t){return e&t}function dee(e){var t=ar();return this.bitwiseTo(e,hee,t),t}function h2(e,t){return e|t}function pee(e){var t=ar();return this.bitwiseTo(e,h2,t),t}function WC(e,t){return e^t}function vee(e){var t=ar();return this.bitwiseTo(e,WC,t),t}function GC(e,t){return e&~t}function mee(e){var t=ar();return this.bitwiseTo(e,GC,t),t}function gee(){for(var e=ar(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function yee(e){var t=ar();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function bee(e){var t=ar();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function _ee(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function wee(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+_ee(this.data[e]);return this.s<0?this.t*this.DB:-1}function Eee(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function xee(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=Eee(this.data[r]^t);return e}function See(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function Mee(e,t){var r=Qe.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function Cee(e){return this.changeBit(e,h2)}function Tee(e){return this.changeBit(e,GC)}function Aee(e){return this.changeBit(e,WC)}function Iee(e,t){for(var r=0,n=0,a=Math.min(e.t,this.t);r<a;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()}function Bee(e){var t=ar();return this.addTo(e,t),t}function kee(e){var t=ar();return this.subTo(e,t),t}function Nee(e){var t=ar();return this.multiplyTo(e,t),t}function Oee(e){var t=ar();return this.divRemTo(e,t,null),t}function Ree(e){var t=ar();return this.divRemTo(e,null,t),t}function Pee(e){var t=ar(),r=ar();return this.divRemTo(e,t,r),new Array(t,r)}function Fee(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Lee(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function Ec(){}function ZC(e){return e}function Dee(e,t,r){e.multiplyTo(t,r)}function $ee(e,t){e.squareTo(t)}Ec.prototype.convert=ZC,Ec.prototype.revert=ZC,Ec.prototype.mulTo=Dee,Ec.prototype.sqrTo=$ee;function zee(e){return this.exp(e,new Ec)}function Uee(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var a;for(a=r.t-this.t;n<a;++n)r.data[n+this.t]=this.am(0,e.data[n],r,n,0,this.t);for(a=Math.min(e.t,t);n<a;++n)this.am(0,e.data[n],r,n,0,t-n);r.clamp()}function qee(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)}function Wf(e){this.r2=ar(),this.q3=ar(),Qe.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Vee(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ar();return e.copyTo(t),this.reduce(t),t}function Hee(e){return e}function jee(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Kee(e,t){e.squareTo(t),this.reduce(t)}function Wee(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Wf.prototype.convert=Vee,Wf.prototype.revert=Hee,Wf.prototype.reduce=jee,Wf.prototype.mulTo=Wee,Wf.prototype.sqrTo=Kee;function Gee(e,t){var r=e.bitLength(),n,a=ps(1),i;if(r<=0)return a;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?i=new xl(t):t.isEven()?i=new Wf(t):i=new Sl(t);var o=new Array,l=3,f=n-1,u=(1<<n)-1;if(o[1]=i.convert(this),n>1){var d=ar();for(i.sqrTo(o[1],d);l<=u;)o[l]=ar(),i.mulTo(d,o[l-2],o[l]),l+=2}var m=e.t-1,v,y=!0,_=ar(),E;for(r=k0(e.data[m])-1;m>=0;){for(r>=f?v=e.data[m]>>r-f&u:(v=(e.data[m]&(1<<r+1)-1)<<f-r,m>0&&(v|=e.data[m-1]>>this.DB+r-f)),l=n;!(v&1);)v>>=1,--l;if((r-=l)<0&&(r+=this.DB,--m),y)o[v].copyTo(a),y=!1;else{for(;l>1;)i.sqrTo(a,_),i.sqrTo(_,a),l-=2;l>0?i.sqrTo(a,_):(E=a,a=_,_=E),i.mulTo(_,o[v],a)}for(;m>=0&&!(e.data[m]&1<<r);)i.sqrTo(a,_),E=a,a=_,_=E,--r<0&&(r=this.DB-1,--m)}return i.revert(a)}function Zee(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var a=t.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return t;for(a<i&&(i=a),i>0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r}function Yee(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r}function Jee(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return Qe.ZERO;for(var r=e.clone(),n=this.clone(),a=ps(1),i=ps(0),o=ps(0),l=ps(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!a.isEven()||!i.isEven())&&(a.addTo(this,a),i.subTo(e,i)),a.rShiftTo(1,a)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),t?((!o.isEven()||!l.isEven())&&(o.addTo(this,o),l.subTo(e,l)),o.rShiftTo(1,o)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(n)>=0?(r.subTo(n,r),t&&a.subTo(o,a),i.subTo(l,i)):(n.subTo(r,n),t&&o.subTo(a,o),l.subTo(i,l))}if(n.compareTo(Qe.ONE)!=0)return Qe.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l}var ma=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Xee=(1<<26)/ma[ma.length-1];function Qee(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=ma[ma.length-1]){for(t=0;t<ma.length;++t)if(r.data[0]==ma[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<ma.length;){for(var n=ma[t],a=t+1;a<ma.length&&n<Xee;)n*=ma[a++];for(n=r.modInt(n);t<a;)if(n%ma[t++]==0)return!1}return r.millerRabin(e)}function ete(e){var t=this.subtract(Qe.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n=t.shiftRight(r),a=tte(),i,o=0;o<e;++o){do i=new Qe(this.bitLength(),a);while(i.compareTo(Qe.ONE)<=0||i.compareTo(t)>=0);var l=i.modPow(n,this);if(l.compareTo(Qe.ONE)!=0&&l.compareTo(t)!=0){for(var f=1;f++<r&&l.compareTo(t)!=0;)if(l=l.modPowInt(2,this),l.compareTo(Qe.ONE)==0)return!1;if(l.compareTo(t)!=0)return!1}}return!0}function tte(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}Qe.prototype.chunkSize=ree,Qe.prototype.toRadix=iee,Qe.prototype.fromRadix=aee,Qe.prototype.fromNumber=oee,Qe.prototype.bitwiseTo=cee,Qe.prototype.changeBit=Mee,Qe.prototype.addTo=Iee,Qe.prototype.dMultiply=Fee,Qe.prototype.dAddOffset=Lee,Qe.prototype.multiplyLowerTo=Uee,Qe.prototype.multiplyUpperTo=qee,Qe.prototype.modInt=Yee,Qe.prototype.millerRabin=ete,Qe.prototype.clone=XQ,Qe.prototype.intValue=QQ,Qe.prototype.byteValue=eee,Qe.prototype.shortValue=tee,Qe.prototype.signum=nee,Qe.prototype.toByteArray=see,Qe.prototype.equals=lee,Qe.prototype.min=fee,Qe.prototype.max=uee,Qe.prototype.and=dee,Qe.prototype.or=pee,Qe.prototype.xor=vee,Qe.prototype.andNot=mee,Qe.prototype.not=gee,Qe.prototype.shiftLeft=yee,Qe.prototype.shiftRight=bee,Qe.prototype.getLowestSetBit=wee,Qe.prototype.bitCount=xee,Qe.prototype.testBit=See,Qe.prototype.setBit=Cee,Qe.prototype.clearBit=Tee,Qe.prototype.flipBit=Aee,Qe.prototype.add=Bee,Qe.prototype.subtract=kee,Qe.prototype.multiply=Nee,Qe.prototype.divide=Oee,Qe.prototype.remainder=Ree,Qe.prototype.divideAndRemainder=Pee,Qe.prototype.modPow=Gee,Qe.prototype.modInverse=Jee,Qe.prototype.pow=zee,Qe.prototype.gcd=Zee,Qe.prototype.isProbablePrime=Qee;var vs=ur;(function(){if(vs.prime){vs.prime;return}var e=vs.prime=vs.prime||{},t=vs.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var a=function(m,v){return m|v};e.generateProbablePrime=function(m,v,y){typeof v=="function"&&(y=v,v={}),v=v||{};var _=v.algorithm||"PRIMEINC";typeof _=="string"&&(_={name:_}),_.options=_.options||{};var E=v.prng||vs.random,C={nextBytes:function(T){for(var I=E.getBytesSync(T.length),k=0;k<T.length;++k)T[k]=I.charCodeAt(k)}};if(_.name==="PRIMEINC")return i(m,C,_.options,y);throw new Error("Invalid prime generation algorithm: "+_.name)};function i(m,v,y,_){return"workers"in y?f(m,v,y,_):o(m,v,y,_)}function o(m,v,y,_){var E=u(m,v),C=0,T=d(E.bitLength());"millerRabinTests"in y&&(T=y.millerRabinTests);var I=10;"maxBlockTime"in y&&(I=y.maxBlockTime),l(E,m,v,C,T,I,_)}function l(m,v,y,_,E,C,T){var I=+new Date;do{if(m.bitLength()>v&&(m=u(v,y)),m.isProbablePrime(E))return T(null,m);m.dAddOffset(r[_++%8],0)}while(C<0||+new Date-I<C);vs.util.setImmediate(function(){l(m,v,y,_,E,C,T)})}function f(m,v,y,_){if(typeof Worker>"u")return o(m,v,y,_);var E=u(m,v),C=y.workers,T=y.workLoad||100,I=T*30/8,k=y.workerScript||"forge/prime.worker.js";if(C===-1)return vs.util.estimateCores(function(O,P){O&&(P=2),C=P-1,N()});N();function N(){C=Math.max(1,C);for(var O=[],P=0;P<C;++P)O[P]=new Worker(k);for(var P=0;P<C;++P)O[P].addEventListener("message",V);var z=!1;function V(L){if(!z){var U=L.data;if(U.found){for(var M=0;M<O.length;++M)O[M].terminate();return z=!0,_(null,new t(U.prime,16))}E.bitLength()>m&&(E=u(m,v));var s=E.toString(16);L.target.postMessage({hex:s,workLoad:T}),E.dAddOffset(I,0)}}}}function u(m,v){var y=new t(m,v),_=m-1;return y.testBit(_)||y.bitwiseTo(t.ONE.shiftLeft(_),a,y),y.dAddOffset(31-y.mod(n).byteValue(),0),y}function d(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}})();var St=ur;if(typeof or>"u")var or=St.jsbn.BigInteger;var d2=St.util.isNodejs?wc():null,Ne=St.asn1,qi=St.util;St.pki=St.pki||{},St.pki.rsa=St.rsa=St.rsa||{};var Lt=St.pki,rte=[6,4,2,4,2,4,6,2],nte={name:"PrivateKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},ite={name:"RSAPrivateKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},ate={name:"RSAPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},ote=St.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},ste={name:"DigestInfo",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:Ne.Class.UNIVERSAL,type:Ne.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},lte=function(e){var t;if(e.algorithm in Lt.oids)t=Lt.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var n=Ne.oidToDer(t).getBytes(),a=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[]),i=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[]);i.value.push(Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,n)),i.value.push(Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,""));var o=Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(o),Ne.toDer(a).getBytes()},YC=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(or.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(or.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var n;do n=new or(St.util.bytesToHex(St.random.getBytes(t.n.bitLength()/8)),16);while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(or.ONE));e=e.multiply(n.modPow(t.e,t.n)).mod(t.n);for(var a=e.mod(t.p).modPow(t.dP,t.p),i=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(i)<0;)a=a.add(t.p);var o=a.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i);return o=o.multiply(n.modInverse(t.n)).mod(t.n),o};Lt.rsa.encrypt=function(e,t,r){var n=r,a,i=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,a=JC(e,t,r)):(a=St.util.createBuffer(),a.putBytes(e));for(var o=new or(a.toHex(),16),l=YC(o,t,n),f=l.toString(16),u=St.util.createBuffer(),d=i-Math.ceil(f.length/2);d>0;)u.putByte(0),--d;return u.putBytes(St.util.hexToBytes(f)),u.getBytes()},Lt.rsa.decrypt=function(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var i=new Error("Encrypted message length is invalid.");throw i.length=e.length,i.expected=a,i}var o=new or(St.util.createBuffer(e).toHex(),16);if(o.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=YC(o,t,r),f=l.toString(16),u=St.util.createBuffer(),d=a-Math.ceil(f.length/2);d>0;)u.putByte(0),--d;return u.putBytes(St.util.hexToBytes(f)),n!==!1?N0(u.getBytes(),t,r):u.getBytes()},Lt.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var n=r.prng||St.random,a={nextBytes:function(l){for(var f=n.getBytesSync(l.length),u=0;u<l.length;++u)l[u]=f.charCodeAt(u)}},i=r.algorithm||"PRIMEINC",o;if(i==="PRIMEINC")o={algorithm:i,state:0,bits:e,rng:a,eInt:t||65537,e:new or(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},o.e.fromInt(o.eInt);else throw new Error("Invalid key generation algorithm: "+i);return o},Lt.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new or(null);r.fromInt(30);for(var n=0,a=function(m,v){return m|v},i=+new Date,o,l=0;e.keys===null&&(t<=0||l<t);){if(e.state===0){var f=e.p===null?e.pBits:e.qBits,u=f-1;e.pqState===0?(e.num=new or(f,e.rng),e.num.testBit(u)||e.num.bitwiseTo(or.ONE.shiftLeft(u),a,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),n=0,++e.pqState):e.pqState===1?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(ute(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(rte[n++%8],0):e.pqState===2?e.pqState=e.num.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(or.ONE),e.q1=e.q.subtract(or.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(or.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var d=e.e.modInverse(e.phi);e.keys={privateKey:Lt.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:Lt.rsa.setPublicKey(e.n,e.e)}}o=+new Date,l+=o-i,i=o}return e.keys!==null},Lt.rsa.generateKeyPair=function(e,t,r,n){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(n=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(n=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,n=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!St.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(n){if(XC("generateKeyPair"))return d2.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(l,f,u){if(l)return n(l);n(null,{privateKey:Lt.privateKeyFromPem(u),publicKey:Lt.publicKeyFromPem(f)})});if(QC("generateKey")&&QC("exportKey"))return qi.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tT(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(l){return qi.globalScope.crypto.subtle.exportKey("pkcs8",l.privateKey)}).then(void 0,function(l){n(l)}).then(function(l){if(l){var f=Lt.privateKeyFromAsn1(Ne.fromDer(St.util.createBuffer(l)));n(null,{privateKey:f,publicKey:Lt.setRsaPublicKey(f.n,f.e)})}});if(eT("generateKey")&&eT("exportKey")){var a=qi.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tT(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);a.oncomplete=function(l){var f=l.target.result,u=qi.globalScope.msCrypto.subtle.exportKey("pkcs8",f.privateKey);u.oncomplete=function(d){var m=d.target.result,v=Lt.privateKeyFromAsn1(Ne.fromDer(St.util.createBuffer(m)));n(null,{privateKey:v,publicKey:Lt.setRsaPublicKey(v.n,v.e)})},u.onerror=function(d){n(d)}},a.onerror=function(l){n(l)};return}}else if(XC("generateKeyPairSync")){var i=d2.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Lt.privateKeyFromPem(i.privateKey),publicKey:Lt.publicKeyFromPem(i.publicKey)}}}var o=Lt.rsa.createKeyPairGenerationState(e,t,r);if(!n)return Lt.rsa.stepKeyPairGenerationState(o,0),o.keys;fte(o,r,n)},Lt.setRsaPublicKey=Lt.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(n,a,i){if(typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSAES-PKCS1-V1_5"),a==="RSAES-PKCS1-V1_5")a={encode:function(l,f,u){return JC(l,f,2).getBytes()}};else if(a==="RSA-OAEP"||a==="RSAES-OAEP")a={encode:function(l,f){return St.pkcs1.encode_rsa_oaep(f,l,i)}};else if(["RAW","NONE","NULL",null].indexOf(a)!==-1)a={encode:function(l){return l}};else if(typeof a=="string")throw new Error('Unsupported encryption scheme: "'+a+'".');var o=a.encode(n,r,!0);return Lt.rsa.encrypt(o,r,!0)},r.verify=function(n,a,i,o){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),o===void 0&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:function(f,u){u=N0(u,r,!0);var d=Ne.fromDer(u,{parseAllBytes:o._parseAllDigestBytes}),m={},v=[];if(!Ne.validate(d,ste,m,v)){var y=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw y.errors=v,y}var _=Ne.derToOid(m.algorithmIdentifier);if(!(_===St.oids.md2||_===St.oids.md5||_===St.oids.sha1||_===St.oids.sha224||_===St.oids.sha256||_===St.oids.sha384||_===St.oids.sha512||_===St.oids["sha512-224"]||_===St.oids["sha512-256"])){var y=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw y.oid=_,y}if((_===St.oids.md2||_===St.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return f===m.digest}}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:function(f,u){return u=N0(u,r,!0),f===u}});var l=Lt.rsa.decrypt(a,r,!0,!1);return i.verify(n,l,r.n.bitLength())},r},Lt.setRsaPrivateKey=Lt.rsa.setPrivateKey=function(e,t,r,n,a,i,o,l){var f={n:e,e:t,d:r,p:n,q:a,dP:i,dQ:o,qInv:l};return f.decrypt=function(u,d,m){typeof d=="string"?d=d.toUpperCase():d===void 0&&(d="RSAES-PKCS1-V1_5");var v=Lt.rsa.decrypt(u,f,!1,!1);if(d==="RSAES-PKCS1-V1_5")d={decode:N0};else if(d==="RSA-OAEP"||d==="RSAES-OAEP")d={decode:function(y,_){return St.pkcs1.decode_rsa_oaep(_,y,m)}};else if(["RAW","NONE","NULL",null].indexOf(d)!==-1)d={decode:function(y){return y}};else throw new Error('Unsupported encryption scheme: "'+d+'".');return d.decode(v,f,!1)},f.sign=function(u,d){var m=!1;typeof d=="string"&&(d=d.toUpperCase()),d===void 0||d==="RSASSA-PKCS1-V1_5"?(d={encode:lte},m=1):(d==="NONE"||d==="NULL"||d===null)&&(d={encode:function(){return u}},m=1);var v=d.encode(u,f.n.bitLength());return Lt.rsa.encrypt(v,f,m)},f},Lt.wrapRsaPrivateKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ne.integerToDer(0).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Lt.oids.rsaEncryption).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,"")]),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OCTETSTRING,!1,Ne.toDer(e).getBytes())])},Lt.privateKeyFromAsn1=function(e){var t={},r=[];if(Ne.validate(e,nte,t,r)&&(e=Ne.fromDer(St.util.createBuffer(t.privateKey))),t={},r=[],!Ne.validate(e,ite,t,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var a,i,o,l,f,u,d,m;return a=St.util.createBuffer(t.privateKeyModulus).toHex(),i=St.util.createBuffer(t.privateKeyPublicExponent).toHex(),o=St.util.createBuffer(t.privateKeyPrivateExponent).toHex(),l=St.util.createBuffer(t.privateKeyPrime1).toHex(),f=St.util.createBuffer(t.privateKeyPrime2).toHex(),u=St.util.createBuffer(t.privateKeyExponent1).toHex(),d=St.util.createBuffer(t.privateKeyExponent2).toHex(),m=St.util.createBuffer(t.privateKeyCoefficient).toHex(),Lt.setRsaPrivateKey(new or(a,16),new or(i,16),new or(o,16),new or(l,16),new or(f,16),new or(u,16),new or(d,16),new or(m,16))},Lt.privateKeyToAsn1=Lt.privateKeyToRSAPrivateKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ne.integerToDer(0).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.n)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.e)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.d)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.p)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.q)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.dP)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.dQ)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.qInv))])},Lt.publicKeyFromAsn1=function(e){var t={},r=[];if(Ne.validate(e,ote,t,r)){var n=Ne.derToOid(t.publicKeyOid);if(n!==Lt.oids.rsaEncryption){var a=new Error("Cannot read public key. Unknown OID.");throw a.oid=n,a}e=t.rsaPublicKey}if(r=[],!Ne.validate(e,ate,t,r)){var a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw a.errors=r,a}var i=St.util.createBuffer(t.publicKeyModulus).toHex(),o=St.util.createBuffer(t.publicKeyExponent).toHex();return Lt.setRsaPublicKey(new or(i,16),new or(o,16))},Lt.publicKeyToAsn1=Lt.publicKeyToSubjectPublicKeyInfo=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.OID,!1,Ne.oidToDer(Lt.oids.rsaEncryption).getBytes()),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.NULL,!1,"")]),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.BITSTRING,!1,[Lt.publicKeyToRSAPublicKey(e)])])},Lt.publicKeyToRSAPublicKey=function(e){return Ne.create(Ne.Class.UNIVERSAL,Ne.Type.SEQUENCE,!0,[Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.n)),Ne.create(Ne.Class.UNIVERSAL,Ne.Type.INTEGER,!1,Ja(e.e))])};function JC(e,t,r){var n=St.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=e.length,i.max=a-11,i}n.putByte(0),n.putByte(r);var o=a-3-e.length,l;if(r===0||r===1){l=r===0?0:255;for(var f=0;f<o;++f)n.putByte(l)}else for(;o>0;){for(var u=0,d=St.random.getBytes(o),f=0;f<o;++f)l=d.charCodeAt(f),l===0?++u:n.putByte(l);o=u}return n.putByte(0),n.putBytes(e),n}function N0(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8),i=St.util.createBuffer(e),o=i.getByte(),l=i.getByte();if(o!==0||r&&l!==0&&l!==1||!r&&l!=2||r&&l===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var f=0;if(l===0){f=a-3-n;for(var u=0;u<f;++u)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(l===1)for(f=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++f}else if(l===2)for(f=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++f}var d=i.getByte();if(d!==0||f!==a-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}function fte(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var n={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(n.prng=t.prng),a();function a(){i(e.pBits,function(l,f){if(l)return r(l);if(e.p=f,e.q!==null)return o(l,e.q);i(e.qBits,o)})}function i(l,f){St.prime.generateProbablePrime(l,n,f)}function o(l,f){if(l)return r(l);if(e.q=f,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)!==0){e.p=null,a();return}if(e.q.subtract(or.ONE).gcd(e.e).compareTo(or.ONE)!==0){e.q=null,i(e.qBits,o);return}if(e.p1=e.p.subtract(or.ONE),e.q1=e.q.subtract(or.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(or.ONE)!==0){e.p=e.q=null,a();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,i(e.qBits,o);return}var d=e.e.modInverse(e.phi);e.keys={privateKey:Lt.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:Lt.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}}function Ja(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=St.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&!(r.charCodeAt(1)&128)||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function ute(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function XC(e){return St.util.isNodejs&&typeof d2[e]=="function"}function QC(e){return typeof qi.globalScope<"u"&&typeof qi.globalScope.crypto=="object"&&typeof qi.globalScope.crypto.subtle=="object"&&typeof qi.globalScope.crypto.subtle[e]=="function"}function eT(e){return typeof qi.globalScope<"u"&&typeof qi.globalScope.msCrypto=="object"&&typeof qi.globalScope.msCrypto.subtle=="object"&&typeof qi.globalScope.msCrypto.subtle[e]=="function"}function tT(e){for(var t=St.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}var Mt=ur,ee=Mt.asn1,at=Mt.pki=Mt.pki||{},nr=at.oids,nn={};nn.CN=nr.commonName,nn.commonName="CN",nn.C=nr.countryName,nn.countryName="C",nn.L=nr.localityName,nn.localityName="L",nn.ST=nr.stateOrProvinceName,nn.stateOrProvinceName="ST",nn.O=nr.organizationName,nn.organizationName="O",nn.OU=nr.organizationalUnitName,nn.organizationalUnitName="OU",nn.E=nr.emailAddress,nn.emailAddress="E";var rT=Mt.pki.rsa.publicKeyValidator,cte={name:"Certificate",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:ee.Class.UNIVERSAL,type:ee.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},rT,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:ee.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:ee.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:ee.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},hte={name:"rsapss",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:ee.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:ee.Class.UNIVERSAL,type:ee.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:ee.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:ee.Class.UNIVERSAL,type:ee.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:ee.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:ee.Class.UNIVERSAL,type:ee.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},dte={name:"CertificationRequestInfo",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:ee.Class.UNIVERSAL,type:ee.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},rT,{name:"CertificationRequestInfo.attributes",tagClass:ee.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SET,constructed:!0}]}]}]},pte={name:"CertificationRequest",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[dte,{name:"CertificationRequest.signatureAlgorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:ee.Class.UNIVERSAL,type:ee.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:ee.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:ee.Class.UNIVERSAL,type:ee.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};at.RDNAttributesAsArray=function(e,t){for(var r=[],n,a,i,o=0;o<e.value.length;++o){n=e.value[o];for(var l=0;l<n.value.length;++l)i={},a=n.value[l],i.type=ee.derToOid(a.value[0].value),i.value=a.value[1].value,i.valueTagClass=a.value[1].type,i.type in nr&&(i.name=nr[i.type],i.name in nn&&(i.shortName=nn[i.name])),t&&(t.update(i.type),t.update(i.value)),r.push(i)}return r},at.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],a=ee.derToOid(n.value[0].value),i=n.value[1].value,o=0;o<i.length;++o){var l={};if(l.type=a,l.value=i[o].value,l.valueTagClass=i[o].type,l.type in nr&&(l.name=nr[l.type],l.name in nn&&(l.shortName=nn[l.name])),l.type===nr.extensionRequest){l.extensions=[];for(var f=0;f<l.value.length;++f)l.extensions.push(at.certificateExtensionFromAsn1(l.value[f]))}t.push(l)}return t};function ms(e,t){typeof t=="string"&&(t={shortName:t});for(var r=null,n,a=0;r===null&&a<e.attributes.length;++a)n=e.attributes[a],(t.type&&t.type===n.type||t.name&&t.name===n.name||t.shortName&&t.shortName===n.shortName)&&(r=n);return r}var O0=function(e,t,r){var n={};if(e!==nr["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:nr.sha1},mgf:{algorithmOid:nr.mgf1,hash:{algorithmOid:nr.sha1}},saltLength:20});var a={},i=[];if(!ee.validate(t,hte,a,i)){var o=new Error("Cannot read RSASSA-PSS parameter block.");throw o.errors=i,o}return a.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=ee.derToOid(a.hashOid)),a.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=ee.derToOid(a.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=ee.derToOid(a.maskGenHashOid)),a.saltLength!==void 0&&(n.saltLength=a.saltLength.charCodeAt(0)),n},R0=function(e){switch(nr[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Mt.md.sha1.create();case"md5WithRSAEncryption":return Mt.md.md5.create();case"sha256WithRSAEncryption":return Mt.md.sha256.create();case"sha384WithRSAEncryption":return Mt.md.sha384.create();case"sha512WithRSAEncryption":return Mt.md.sha512.create();case"RSASSA-PSS":return Mt.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},nT=function(e){var t=e.certificate,r;switch(t.signatureOid){case nr.sha1WithRSAEncryption:case nr.sha1WithRSASignature:break;case nr["RSASSA-PSS"]:var n,a;if(n=nr[t.signatureParameters.mgf.hash.algorithmOid],n===void 0||Mt.md[n]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=t.signatureParameters.mgf.hash.algorithmOid,i.name=n,i}if(a=nr[t.signatureParameters.mgf.algorithmOid],a===void 0||Mt.mgf[a]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=t.signatureParameters.mgf.algorithmOid,i.name=a,i}if(a=Mt.mgf[a].create(Mt.md[n].create()),n=nr[t.signatureParameters.hash.algorithmOid],n===void 0||Mt.md[n]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=t.signatureParameters.hash.algorithmOid,i.name=n,i}r=Mt.pss.create(Mt.md[n].create(),a,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,r)};at.certificateFromPem=function(e,t,r){var n=Mt.pem.decode(e)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var a=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw a.headerType=n.type,a}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=ee.fromDer(n.body,r);return at.certificateFromAsn1(i,t)},at.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:ee.toDer(at.certificateToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.publicKeyFromPem=function(e){var t=Mt.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=ee.fromDer(t.body);return at.publicKeyFromAsn1(n)},at.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:ee.toDer(at.publicKeyToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:ee.toDer(at.publicKeyToRSAPublicKey(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Mt.md.sha1.create(),n=t.type||"RSAPublicKey",a;switch(n){case"RSAPublicKey":a=ee.toDer(at.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":a=ee.toDer(at.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}r.start(),r.update(a);var i=r.digest();if(t.encoding==="hex"){var o=i.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i},at.certificationRequestFromPem=function(e,t,r){var n=Mt.pem.decode(e)[0];if(n.type!=="CERTIFICATE REQUEST"){var a=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw a.headerType=n.type,a}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=ee.fromDer(n.body,r);return at.certificationRequestFromAsn1(i,t)},at.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:ee.toDer(at.certificationRequestToAsn1(e)).getBytes()};return Mt.pem.encode(r,{maxline:t})},at.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return ms(e.issuer,t)},e.issuer.addField=function(t){Vi([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return ms(e.subject,t)},e.subject.addField=function(t){Vi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){Vi(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){Vi(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)iT(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var r=null,n,a=0;r===null&&a<e.extensions.length;++a)n=e.extensions[a],(t.id&&n.id===t.id||t.name&&n.name===t.name)&&(r=n);return r},e.sign=function(t,r){e.md=r||Mt.md.sha1.create();var n=nr[e.md.algorithm+"WithRSAEncryption"];if(!n){var a=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=n,e.tbsCertificate=at.getTBSCertificate(e);var i=ee.toDer(e.tbsCertificate);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var n=t.issuer,a=e.subject,i=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw i.expectedIssuer=a.attributes,i.actualIssuer=n.attributes,i}var o=t.md;if(o===null){o=R0({signatureOid:t.signatureOid,type:"certificate"});var l=t.tbsCertificate||at.getTBSCertificate(t),f=ee.toDer(l);o.update(f.getBytes())}return o!==null&&(r=nT({certificate:e,md:o,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,n=e.issuer,a=t.subject;if(n.hash&&a.hash)r=n.hash===a.hash;else if(n.attributes.length===a.attributes.length){r=!0;for(var i,o,l=0;r&&l<n.attributes.length;++l)i=n.attributes[l],o=a.attributes[l],(i.type!==o.type||i.value!==o.value)&&(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return at.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=nr.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var n=e.extensions[r];if(n.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return Mt.util.hexToBytes(n.subjectKeyIdentifier)===a}}return!1},e},at.certificateFromAsn1=function(e,t){var r={},n=[];if(!ee.validate(e,cte,r,n)){var a=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw a.errors=n,a}var i=ee.derToOid(r.publicKeyOid);if(i!==at.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=at.createCertificate();o.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=Mt.util.createBuffer(r.certSerialNumber);o.serialNumber=l.toHex(),o.signatureOid=Mt.asn1.derToOid(r.certSignatureOid),o.signatureParameters=O0(o.signatureOid,r.certSignatureParams,!0),o.siginfo.algorithmOid=Mt.asn1.derToOid(r.certinfoSignatureOid),o.siginfo.parameters=O0(o.siginfo.algorithmOid,r.certinfoSignatureParams,!1),o.signature=r.certSignature;var f=[];if(r.certValidity1UTCTime!==void 0&&f.push(ee.utcTimeToDate(r.certValidity1UTCTime)),r.certValidity2GeneralizedTime!==void 0&&f.push(ee.generalizedTimeToDate(r.certValidity2GeneralizedTime)),r.certValidity3UTCTime!==void 0&&f.push(ee.utcTimeToDate(r.certValidity3UTCTime)),r.certValidity4GeneralizedTime!==void 0&&f.push(ee.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(o.validity.notBefore=f[0],o.validity.notAfter=f[1],o.tbsCertificate=r.tbsCertificate,t){o.md=R0({signatureOid:o.signatureOid,type:"certificate"});var u=ee.toDer(o.tbsCertificate);o.md.update(u.getBytes())}var d=Mt.md.sha1.create(),m=ee.toDer(r.certIssuer);d.update(m.getBytes()),o.issuer.getField=function(_){return ms(o.issuer,_)},o.issuer.addField=function(_){Vi([_]),o.issuer.attributes.push(_)},o.issuer.attributes=at.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(o.issuer.uniqueId=r.certIssuerUniqueId),o.issuer.hash=d.digest().toHex();var v=Mt.md.sha1.create(),y=ee.toDer(r.certSubject);return v.update(y.getBytes()),o.subject.getField=function(_){return ms(o.subject,_)},o.subject.addField=function(_){Vi([_]),o.subject.attributes.push(_)},o.subject.attributes=at.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(o.subject.uniqueId=r.certSubjectUniqueId),o.subject.hash=v.digest().toHex(),r.certExtensions?o.extensions=at.certificateExtensionsFromAsn1(r.certExtensions):o.extensions=[],o.publicKey=at.publicKeyFromAsn1(r.subjectPublicKeyInfo),o},at.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],a=0;a<n.value.length;++a)t.push(at.certificateExtensionFromAsn1(n.value[a]));return t},at.certificateExtensionFromAsn1=function(e){var t={};if(t.id=ee.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===ee.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in nr){if(t.name=nr[t.id],t.name==="keyUsage"){var r=ee.fromDer(t.value),n=0,a=0;r.value.length>1&&(n=r.value.charCodeAt(1),a=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var r=ee.fromDer(t.value);r.value.length>0&&r.value[0].type===ee.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;r.value.length>0&&r.value[0].type===ee.Type.INTEGER?i=r.value[0].value:r.value.length>1&&(i=r.value[1].value),i!==null&&(t.pathLenConstraint=ee.derToInteger(i))}else if(t.name==="extKeyUsage")for(var r=ee.fromDer(t.value),o=0;o<r.value.length;++o){var l=ee.derToOid(r.value[o].value);l in nr?t[nr[l]]=!0:t[l]=!0}else if(t.name==="nsCertType"){var r=ee.fromDer(t.value),n=0;r.value.length>1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var f,r=ee.fromDer(t.value),u=0;u<r.value.length;++u){f=r.value[u];var d={type:f.type,value:f.value};switch(t.altNames.push(d),f.type){case 1:case 2:case 6:break;case 7:d.ip=Mt.util.bytesToIP(f.value);break;case 8:d.oid=ee.derToOid(f.value);break}}}else if(t.name==="subjectKeyIdentifier"){var r=ee.fromDer(t.value);t.subjectKeyIdentifier=Mt.util.bytesToHex(r.value)}}return t},at.certificationRequestFromAsn1=function(e,t){var r={},n=[];if(!ee.validate(e,pte,r,n)){var a=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw a.errors=n,a}var i=ee.derToOid(r.publicKeyOid);if(i!==at.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=at.createCertificationRequest();if(o.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,o.signatureOid=Mt.asn1.derToOid(r.csrSignatureOid),o.signatureParameters=O0(o.signatureOid,r.csrSignatureParams,!0),o.siginfo.algorithmOid=Mt.asn1.derToOid(r.csrSignatureOid),o.siginfo.parameters=O0(o.siginfo.algorithmOid,r.csrSignatureParams,!1),o.signature=r.csrSignature,o.certificationRequestInfo=r.certificationRequestInfo,t){o.md=R0({signatureOid:o.signatureOid,type:"certification request"});var l=ee.toDer(o.certificationRequestInfo);o.md.update(l.getBytes())}var f=Mt.md.sha1.create();return o.subject.getField=function(u){return ms(o.subject,u)},o.subject.addField=function(u){Vi([u]),o.subject.attributes.push(u)},o.subject.attributes=at.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),o.subject.hash=f.digest().toHex(),o.publicKey=at.publicKeyFromAsn1(r.subjectPublicKeyInfo),o.getAttribute=function(u){return ms(o,u)},o.addAttribute=function(u){Vi([u]),o.attributes.push(u)},o.attributes=at.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),o},at.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return ms(e.subject,t)},e.subject.addField=function(t){Vi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return ms(e,t)},e.addAttribute=function(t){Vi([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){Vi(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){Vi(t),e.attributes=t},e.sign=function(t,r){e.md=r||Mt.md.sha1.create();var n=nr[e.md.algorithm+"WithRSAEncryption"];if(!n){var a=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=n,e.certificationRequestInfo=at.getCertificationRequestInfo(e);var i=ee.toDer(e.certificationRequestInfo);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(r===null){r=R0({signatureOid:e.signatureOid,type:"certification request"});var n=e.certificationRequestInfo||at.getCertificationRequestInfo(e),a=ee.toDer(n);r.update(a.getBytes())}return r!==null&&(t=nT({certificate:e,md:r,signature:e.signature})),t},e};function Gf(e){for(var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),r,n,a=e.attributes,i=0;i<a.length;++i){r=a[i];var o=r.value,l=ee.Type.PRINTABLESTRING;"valueTagClass"in r&&(l=r.valueTagClass,l===ee.Type.UTF8&&(o=Mt.util.encodeUtf8(o))),n=ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(r.type).getBytes()),ee.create(ee.Class.UNIVERSAL,l,!1,o)])]),t.value.push(n)}return t}function Vi(e){for(var t,r=0;r<e.length;++r){if(t=e[r],typeof t.name>"u"&&(t.type&&t.type in at.oids?t.name=at.oids[t.type]:t.shortName&&t.shortName in nn&&(t.name=at.oids[nn[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in at.oids)t.type=at.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in nn&&(t.shortName=nn[t.name]),t.type===nr.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=ee.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a<t.extensions.length;++a)t.value.push(at.certificateExtensionToAsn1(iT(t.extensions[a])))}if(typeof t.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}function iT(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in at.oids&&(e.name=at.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in at.oids)e.id=at.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,a=0,i=0;e.digitalSignature&&(a|=128,n=7),e.nonRepudiation&&(a|=64,n=6),e.keyEncipherment&&(a|=32,n=5),e.dataEncipherment&&(a|=16,n=4),e.keyAgreement&&(a|=8,n=3),e.keyCertSign&&(a|=4,n=2),e.cRLSign&&(a|=2,n=1),e.encipherOnly&&(a|=1,n=0),e.decipherOnly&&(i|=128,n=7);var o=String.fromCharCode(n);i!==0?o+=String.fromCharCode(a)+String.fromCharCode(i):a!==0&&(o+=String.fromCharCode(a)),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,o)}else if(e.name==="basicConstraints")e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var f in e)e[f]===!0&&(f in nr?l.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(nr[f]).getBytes())):f.indexOf(".")!==-1&&l.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(f).getBytes())))}else if(e.name==="nsCertType"){var n=0,a=0;e.client&&(a|=128,n=7),e.server&&(a|=64,n=6),e.email&&(a|=32,n=5),e.objsign&&(a|=16,n=4),e.reserved&&(a|=8,n=3),e.sslCA&&(a|=4,n=2),e.emailCA&&(a|=2,n=1),e.objCA&&(a|=1,n=0);var o=String.fromCharCode(n);a!==0&&(o+=String.fromCharCode(a)),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,o)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);for(var u,d=0;d<e.altNames.length;++d){u=e.altNames[d];var o=u.value;if(u.type===7&&u.ip){if(o=Mt.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=ee.oidToDer(ee.oidToDer(u.oid)):o=ee.oidToDer(o));e.value.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,u.type,!1,o))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var m=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=m.toHex(),e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,m.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);var l=e.value.value;if(e.keyIdentifier){var v=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!1,v))}if(e.authorityCertIssuer){var y=[ee.create(ee.Class.CONTEXT_SPECIFIC,4,!0,[Gf(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,y))}if(e.serialNumber){var _=Mt.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);l.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!1,_))}}else if(e.name==="cRLDistributionPoints"){e.value=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);for(var l=e.value.value,E=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]),C=ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[]),u,d=0;d<e.altNames.length;++d){u=e.altNames[d];var o=u.value;if(u.type===7&&u.ip){if(o=Mt.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=ee.oidToDer(ee.oidToDer(u.oid)):o=ee.oidToDer(o));C.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,u.type,!1,o))}E.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[C])),l.push(E)}if(typeof e.value>"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function p2(e,t){switch(e){case nr["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.hash.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.mgf.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(t.mgf.hash.algorithmOid).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(t.saltLength).getBytes())])),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,r);default:return ee.create(ee.Class.UNIVERSAL,ee.Type.NULL,!1,"")}}function vte(e){var t=ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n<r.length;++n){var a=r[n],i=a.value,o=ee.Type.UTF8;"valueTagClass"in a&&(o=a.valueTagClass),o===ee.Type.UTF8&&(i=Mt.util.encodeUtf8(i));var l=!1;"valueConstructed"in a&&(l=a.valueConstructed);var f=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(a.type).getBytes()),ee.create(ee.Class.UNIVERSAL,ee.Type.SET,!0,[ee.create(ee.Class.UNIVERSAL,o,l,i)])]);t.value.push(f)}return t}var mte=new Date("1950-01-01T00:00:00Z"),gte=new Date("2050-01-01T00:00:00Z");function aT(e){return e>=mte&&e<gte?ee.create(ee.Class.UNIVERSAL,ee.Type.UTCTIME,!1,ee.dateToUtcTime(e)):ee.create(ee.Class.UNIVERSAL,ee.Type.GENERALIZEDTIME,!1,ee.dateToGeneralizedTime(e))}at.getTBSCertificate=function(e){var t=aT(e.validity.notBefore),r=aT(e.validity.notAfter),n=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.CONTEXT_SPECIFIC,0,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.version).getBytes())]),ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,Mt.util.hexToBytes(e.serialNumber)),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.siginfo.algorithmOid).getBytes()),p2(e.siginfo.algorithmOid,e.siginfo.parameters)]),Gf(e.issuer),ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,r]),Gf(e.subject),at.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&n.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,1,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&n.value.push(ee.create(ee.Class.CONTEXT_SPECIFIC,2,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&n.value.push(at.certificateExtensionsToAsn1(e.extensions)),n},at.getCertificationRequestInfo=function(e){var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.INTEGER,!1,ee.integerToDer(e.version).getBytes()),Gf(e.subject),at.publicKeyToAsn1(e.publicKey),vte(e)]);return t},at.distinguishedNameToAsn1=function(e){return Gf(e)},at.certificateToAsn1=function(e){var t=e.tbsCertificate||at.getTBSCertificate(e);return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.signatureOid).getBytes()),p2(e.signatureOid,e.signatureParameters)]),ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},at.certificateExtensionsToAsn1=function(e){var t=ee.create(ee.Class.CONTEXT_SPECIFIC,3,!0,[]),r=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(at.certificateExtensionToAsn1(e[n]));return t},at.certificateExtensionToAsn1=function(e){var t=ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[]);t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.id).getBytes())),e.critical&&t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return typeof e.value!="string"&&(r=ee.toDer(r).getBytes()),t.value.push(ee.create(ee.Class.UNIVERSAL,ee.Type.OCTETSTRING,!1,r)),t},at.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||at.getCertificationRequestInfo(e);return ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[t,ee.create(ee.Class.UNIVERSAL,ee.Type.SEQUENCE,!0,[ee.create(ee.Class.UNIVERSAL,ee.Type.OID,!1,ee.oidToDer(e.signatureOid).getBytes()),p2(e.signatureOid,e.signatureParameters)]),ee.create(ee.Class.UNIVERSAL,ee.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},at.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(o){var l=r(o.issuer);return l},t.addCertificate=function(o){if(typeof o=="string"&&(o=Mt.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))if(o.subject.hash in t.certs){var l=t.certs[o.subject.hash];Mt.util.isArray(l)||(l=[l]),l.push(o),t.certs[o.subject.hash]=l}else t.certs[o.subject.hash]=o},t.hasCertificate=function(o){typeof o=="string"&&(o=Mt.pki.certificateFromPem(o));var l=r(o.subject);if(!l)return!1;Mt.util.isArray(l)||(l=[l]);for(var f=ee.toDer(at.certificateToAsn1(o)).getBytes(),u=0;u<l.length;++u){var d=ee.toDer(at.certificateToAsn1(l[u])).getBytes();if(f===d)return!0}return!1},t.listAllCertificates=function(){var o=[];for(var l in t.certs)if(t.certs.hasOwnProperty(l)){var f=t.certs[l];if(!Mt.util.isArray(f))o.push(f);else for(var u=0;u<f.length;++u)o.push(f[u])}return o},t.removeCertificate=function(o){var l;if(typeof o=="string"&&(o=Mt.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))return null;var f=r(o.subject);if(!Mt.util.isArray(f))return l=t.certs[o.subject.hash],delete t.certs[o.subject.hash],l;for(var u=ee.toDer(at.certificateToAsn1(o)).getBytes(),d=0;d<f.length;++d){var m=ee.toDer(at.certificateToAsn1(f[d])).getBytes();u===m&&(l=f[d],f.splice(d,1))}return f.length===0&&delete t.certs[o.subject.hash],l};function r(o){return n(o),t.certs[o.hash]||null}function n(o){if(!o.hash){var l=Mt.md.sha1.create();o.attributes=at.RDNAttributesAsArray(Gf(o),l),o.hash=l.digest().toHex()}}if(e)for(var a=0;a<e.length;++a){var i=e[a];t.addCertificate(i)}return t},at.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},at.verifyCertificateChain=function(e,t,r){typeof r=="function"&&(r={verify:r}),r=r||{},t=t.slice(0);var n=t.slice(0),a=r.validityCheckDate;typeof a>"u"&&(a=new Date);var i=!0,o=null,l=0;do{var f=t.shift(),u=null,d=!1;if(a&&(a<f.validity.notBefore||a>f.validity.notAfter)&&(o={message:"Certificate is not valid yet or has expired.",error:at.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:a}),o===null){if(u=t[0]||e.getIssuer(f),u===null&&f.isIssuer(f)&&(d=!0,u=f),u){var m=u;Mt.util.isArray(m)||(m=[m]);for(var v=!1;!v&&m.length>0;){u=m.shift();try{v=u.verify(f)}catch{}}v||(o={message:"Certificate signature is invalid.",error:at.certificateError.bad_certificate})}o===null&&(!u||d)&&!e.hasCertificate(f)&&(o={message:"Certificate is not trusted.",error:at.certificateError.unknown_ca})}if(o===null&&u&&!f.isIssuer(u)&&(o={message:"Certificate issuer is invalid.",error:at.certificateError.bad_certificate}),o===null)for(var y={keyUsage:!0,basicConstraints:!0},_=0;o===null&&_<f.extensions.length;++_){var E=f.extensions[_];E.critical&&!(E.name in y)&&(o={message:"Certificate has an unsupported critical extension.",error:at.certificateError.unsupported_certificate})}if(o===null&&(!i||t.length===0&&(!u||d))){var C=f.getExtension("basicConstraints"),T=f.getExtension("keyUsage");if(T!==null&&(!T.keyCertSign||C===null)&&(o={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:at.certificateError.bad_certificate}),o===null&&C!==null&&!C.cA&&(o={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:at.certificateError.bad_certificate}),o===null&&T!==null&&"pathLenConstraint"in C){var I=l-1;I>C.pathLenConstraint&&(o={message:"Certificate basicConstraints pathLenConstraint violated.",error:at.certificateError.bad_certificate})}}var k=o===null?!0:o.error,N=r.verify?r.verify(k,l,n):k;if(N===!0)o=null;else throw k===!0&&(o={message:"The application rejected the certificate.",error:at.certificateError.bad_certificate}),(N||N===0)&&(typeof N=="object"&&!Mt.util.isArray(N)?(N.message&&(o.message=N.message),N.error&&(o.error=N.error)):typeof N=="string"&&(o.error=N)),o;i=!1,++l}while(t.length>0);return!0};var lt=ur,xe=lt.asn1,Yn=lt.pkcs7=lt.pkcs7||{};Yn.messageFromPem=function(e){var t=lt.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=xe.fromDer(t.body);return Yn.messageFromAsn1(n)},Yn.messageToPem=function(e,t){var r={type:"PKCS7",body:xe.toDer(e.toAsn1()).getBytes()};return lt.pem.encode(r,{maxline:t})},Yn.messageFromAsn1=function(e){var t={},r=[];if(!xe.validate(e,Yn.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var a=xe.derToOid(t.contentType),i;switch(a){case lt.pki.oids.envelopedData:i=Yn.createEnvelopedData();break;case lt.pki.oids.encryptedData:i=Yn.createEncryptedData();break;case lt.pki.oids.signedData:i=Yn.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i},Yn.createSignedData=function(){var e=null;return e={type:lt.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(m2(e,n,Yn.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,i=0;i<a.length;++i)e.certificates.push(lt.pki.certificateFromAsn1(a[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var n=[],a=0;a<e.certificates.length;++a)n.push(lt.pki.certificateToAsn1(e.certificates[a]));var i=[],o=xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return n.length>0&&o.value[0].value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&o.value[0].value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,1,!0,i)),o.value[0].value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,e.signerInfos)),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),o])},addSigner:function(n){var a=n.issuer,i=n.serialNumber;if(n.certificate){var o=n.certificate;typeof o=="string"&&(o=lt.pki.certificateFromPem(o)),a=o.issuer.attributes,i=o.serialNumber}var l=n.key;if(!l)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof l=="string"&&(l=lt.pki.privateKeyFromPem(l));var f=n.digestAlgorithm||lt.pki.oids.sha1;switch(f){case lt.pki.oids.sha1:case lt.pki.oids.sha256:case lt.pki.oids.sha384:case lt.pki.oids.sha512:case lt.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+f)}var u=n.authenticatedAttributes||[];if(u.length>0){for(var d=!1,m=!1,v=0;v<u.length;++v){var y=u[v];if(!d&&y.type===lt.pki.oids.contentType){if(d=!0,m)break;continue}if(!m&&y.type===lt.pki.oids.messageDigest){if(m=!0,d)break;continue}}if(!d||!m)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:l,version:1,issuer:a,serialNumber:i,digestAlgorithm:f,signatureAlgorithm:lt.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(n){if(n=n||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(lt.pki.oids.data).getBytes())]),"content"in e)){var a;e.content instanceof lt.util.ByteBuffer?a=e.content.bytes():typeof e.content=="string"&&(a=lt.util.encodeUtf8(e.content)),n.detached?e.detachedContent=xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,a):e.contentInfo.value.push(xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,a)]))}if(e.signers.length!==0){var i=t();r(i)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(n){typeof n=="string"&&(n=lt.pki.certificateFromPem(n)),e.certificates.push(n)},addCertificateRevokationList:function(n){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var n={},a=0;a<e.signers.length;++a){var i=e.signers[a],o=i.digestAlgorithm;o in n||(n[o]=lt.md[lt.pki.oids[o]].create()),i.authenticatedAttributes.length===0?i.md=n[o]:i.md=lt.md[lt.pki.oids[o]].create()}e.digestAlgorithmIdentifiers=[];for(var o in n)e.digestAlgorithmIdentifiers.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(o).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")]));return n}function r(n){var a;if(e.detachedContent?a=e.detachedContent:(a=e.contentInfo.value[1],a=a.value[0]),!a)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=xe.derToOid(e.contentInfo.value[0].value),o=xe.toDer(a);o.getByte(),xe.getBerValueLength(o),o=o.getBytes();for(var l in n)n[l].start().update(o);for(var f=new Date,u=0;u<e.signers.length;++u){var d=e.signers[u];if(d.authenticatedAttributes.length===0){if(i!==lt.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{d.authenticatedAttributesAsn1=xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,[]),v=0;v<d.authenticatedAttributes.length;++v){var y=d.authenticatedAttributes[v];y.type===lt.pki.oids.messageDigest?y.value=n[d.digestAlgorithm].digest():y.type===lt.pki.oids.signingTime&&(y.value||(y.value=f)),m.value.push(v2(y)),d.authenticatedAttributesAsn1.value.push(v2(y))}o=xe.toDer(m).getBytes(),d.md.start().update(o)}d.signature=d.key.sign(d.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=xte(e.signers)}},Yn.createEncryptedData=function(){var e=null;return e={type:lt.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:lt.pki.oids["aes256-CBC"]},fromAsn1:function(t){m2(e,t,Yn.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),oT(e)}},e},Yn.createEnvelopedData=function(){var e=null;return e={type:lt.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:lt.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=m2(e,t,Yn.asn1.envelopedDataValidator);e.recipients=_te(r.recipientInfos.value)},toAsn1:function(){return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,wte(e.recipients)),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,Ste(e.encryptedContent))])])])},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var a=e.recipients[n],i=a.issuer;if(a.serialNumber===t.serialNumber&&i.length===r.length){for(var o=!0,l=0;l<r.length;++l)if(i[l].type!==r[l].type||i[l].value!==r[l].value){o=!1;break}if(o)return a}}return null},decrypt:function(t,r){if(e.encryptedContent.key===void 0&&t!==void 0&&r!==void 0)switch(t.encryptedContent.algorithm){case lt.pki.oids.rsaEncryption:case lt.pki.oids.desCBC:var n=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=lt.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}oT(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:lt.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(e.encryptedContent.content===void 0){r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var n,a,i;switch(r){case lt.pki.oids["aes128-CBC"]:n=16,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["aes192-CBC"]:n=24,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["aes256-CBC"]:n=32,a=16,i=lt.aes.createEncryptionCipher;break;case lt.pki.oids["des-EDE3-CBC"]:n=24,a=8,i=lt.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(t===void 0)t=lt.util.createBuffer(lt.random.getBytes(n));else if(t.length()!=n)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+n+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=lt.util.createBuffer(lt.random.getBytes(a));var o=i(t);if(o.start(e.encryptedContent.parameter.copy()),o.update(e.content),!o.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=o.output}for(var l=0;l<e.recipients.length;++l){var f=e.recipients[l];if(f.encryptedContent.content===void 0)switch(f.encryptedContent.algorithm){case lt.pki.oids.rsaEncryption:f.encryptedContent.content=f.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm)}}}},e};function yte(e){var t={},r=[];if(!xe.validate(e,Yn.asn1.recipientInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=r,n}return{version:t.version.charCodeAt(0),issuer:lt.pki.RDNAttributesAsArray(t.issuer),serialNumber:lt.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:xe.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function bte(e){return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[lt.pki.distinguishedNameToAsn1({attributes:e.issuer}),xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,lt.util.hexToBytes(e.serialNumber))]),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.encryptedContent.algorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")]),xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function _te(e){for(var t=[],r=0;r<e.length;++r)t.push(yte(e[r]));return t}function wte(e){for(var t=[],r=0;r<e.length;++r)t.push(bte(e[r]));return t}function Ete(e){var t=xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,xe.integerToDer(e.version).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[lt.pki.distinguishedNameToAsn1({attributes:e.issuer}),xe.create(xe.Class.UNIVERSAL,xe.Type.INTEGER,!1,lt.util.hexToBytes(e.serialNumber))]),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.digestAlgorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.signatureAlgorithm).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.NULL,!1,"")])),t.value.push(xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=xe.create(xe.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<e.unauthenticatedAttributes.length;++n){var a=e.unauthenticatedAttributes[n];r.values.push(v2(a))}t.value.push(r)}return t}function xte(e){for(var t=[],r=0;r<e.length;++r)t.push(Ete(e[r]));return t}function v2(e){var t;if(e.type===lt.pki.oids.contentType)t=xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.value).getBytes());else if(e.type===lt.pki.oids.messageDigest)t=xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===lt.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),a=e.value;if(typeof a=="string"){var i=Date.parse(a);isNaN(i)?a.length===13?a=xe.utcTimeToDate(a):a=xe.generalizedTimeToDate(a):a=new Date(i)}a>=r&&a<n?t=xe.create(xe.Class.UNIVERSAL,xe.Type.UTCTIME,!1,xe.dateToUtcTime(a)):t=xe.create(xe.Class.UNIVERSAL,xe.Type.GENERALIZEDTIME,!1,xe.dateToGeneralizedTime(a))}return xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.type).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SET,!0,[t])])}function Ste(e){return[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(lt.pki.oids.data).getBytes()),xe.create(xe.Class.UNIVERSAL,xe.Type.SEQUENCE,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OID,!1,xe.oidToDer(e.algorithm).getBytes()),e.parameter?xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),xe.create(xe.Class.CONTEXT_SPECIFIC,0,!0,[xe.create(xe.Class.UNIVERSAL,xe.Type.OCTETSTRING,!1,e.content.getBytes())])]}function m2(e,t,r){var n={},a=[];if(!xe.validate(t,r,n,a)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var o=xe.derToOid(n.contentType);if(o!==lt.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var l="";if(lt.util.isArray(n.encryptedContent))for(var f=0;f<n.encryptedContent.length;++f){if(n.encryptedContent[f].type!==xe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");l+=n.encryptedContent[f].value}else l=n.encryptedContent;e.encryptedContent={algorithm:xe.derToOid(n.encAlgorithm),parameter:lt.util.createBuffer(n.encParameter.value),content:lt.util.createBuffer(l)}}if(n.content){var l="";if(lt.util.isArray(n.content))for(var f=0;f<n.content.length;++f){if(n.content[f].type!==xe.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");l+=n.content[f].value}else l=n.content;e.content=lt.util.createBuffer(l)}return e.version=n.version.charCodeAt(0),e.rawCapture=n,n}function oT(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case lt.pki.oids["aes128-CBC"]:case lt.pki.oids["aes192-CBC"]:case lt.pki.oids["aes256-CBC"]:t=lt.aes.createDecryptionCipher(e.encryptedContent.key);break;case lt.pki.oids.desCBC:case lt.pki.oids["des-EDE3-CBC"]:t=lt.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var ui=ur,g2=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],sT=[1,2,3,5],Mte=function(e,t){return e<<t&65535|(e&65535)>>16-t},Cte=function(e,t){return(e&65535)>>t|e<<16-t&65535};ui.rc2=ui.rc2||{},ui.rc2.expandKey=function(e,t){typeof e=="string"&&(e=ui.util.createBuffer(e)),t=t||128;var r=e,n=e.length(),a=t,i=Math.ceil(a/8),o=255>>(a&7),l;for(l=n;l<128;l++)r.putByte(g2[r.at(l-1)+r.at(l-n)&255]);for(r.setAt(128-i,g2[r.at(128-i)&o]),l=127-i;l>=0;l--)r.setAt(l,g2[r.at(l+1)^r.at(l+i)]);return r};var lT=function(e,t,r){var n=!1,a=null,i=null,o=null,l,f,u,d,m=[];for(e=ui.rc2.expandKey(e,t),u=0;u<64;u++)m.push(e.getInt16Le());r?(l=function(_){for(u=0;u<4;u++)_[u]+=m[d]+(_[(u+3)%4]&_[(u+2)%4])+(~_[(u+3)%4]&_[(u+1)%4]),_[u]=Mte(_[u],sT[u]),d++},f=function(_){for(u=0;u<4;u++)_[u]+=m[_[(u+3)%4]&63]}):(l=function(_){for(u=3;u>=0;u--)_[u]=Cte(_[u],sT[u]),_[u]-=m[d]+(_[(u+3)%4]&_[(u+2)%4])+(~_[(u+3)%4]&_[(u+1)%4]),d--},f=function(_){for(u=3;u>=0;u--)_[u]-=m[_[(u+3)%4]&63]});var v=function(_){var E=[];for(u=0;u<4;u++){var C=a.getInt16Le();o!==null&&(r?C^=o.getInt16Le():o.putInt16Le(C)),E.push(C&65535)}d=r?0:63;for(var T=0;T<_.length;T++)for(var I=0;I<_[T][0];I++)_[T][1](E);for(u=0;u<4;u++)o!==null&&(r?o.putInt16Le(E[u]):E[u]^=o.getInt16Le()),i.putInt16Le(E[u])},y=null;return y={start:function(_,E){_&&typeof _=="string"&&(_=ui.util.createBuffer(_)),n=!1,a=ui.util.createBuffer(),i=E||new ui.util.createBuffer,o=_,y.output=i},update:function(_){for(n||a.putBuffer(_);a.length()>=8;)v([[5,l],[1,f],[6,l],[1,f],[5,l]])},finish:function(_){var E=!0;if(r)if(_)E=_(8,a,!r);else{var C=a.length()===8?8:8-a.length();a.fillWithByte(C,C)}if(E&&(n=!0,y.update()),!r&&(E=a.length()===0,E))if(_)E=_(8,i,!r);else{var T=i.length(),I=i.at(T-1);I>T?E=!1:i.truncate(I)}return E}},y};ui.rc2.startEncrypting=function(e,t,r){var n=ui.rc2.createEncryptionCipher(e,128);return n.start(t,r),n},ui.rc2.createEncryptionCipher=function(e,t){return lT(e,t,!0)},ui.rc2.startDecrypting=function(e,t,r){var n=ui.rc2.createDecryptionCipher(e,128);return n.start(t,r),n},ui.rc2.createDecryptionCipher=function(e,t){return lT(e,t,!1)};var dt=ur;if(typeof Tte>"u")var Tte=dt.jsbn.BigInteger;var Ge=dt.asn1,Ut=dt.pki=dt.pki||{};Ut.pbe=dt.pbe=dt.pbe||{};var Ml=Ut.oids,Ate={name:"EncryptedPrivateKeyInfo",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Ite={name:"PBES2Algorithms",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Bte={name:"pkcs-12PbeParams",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Ge.Class.UNIVERSAL,type:Ge.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ut.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=dt.random.getBytesSync(r.saltSize),a=r.count,i=Ge.integerToDer(a),o,l,f;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,d,m;switch(r.algorithm){case"aes128":o=16,u=16,d=Ml["aes128-CBC"],m=dt.aes.createEncryptionCipher;break;case"aes192":o=24,u=16,d=Ml["aes192-CBC"],m=dt.aes.createEncryptionCipher;break;case"aes256":o=32,u=16,d=Ml["aes256-CBC"],m=dt.aes.createEncryptionCipher;break;case"des":o=8,u=8,d=Ml.desCBC,m=dt.des.createEncryptionCipher;break;default:var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=r.algorithm,v}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),_=cT(y),E=dt.pkcs5.pbkdf2(t,n,a,o,_),C=dt.random.getBytesSync(u),T=m(E);T.start(C),T.update(Ge.toDer(e)),T.finish(),f=T.output.getBytes();var I=kte(n,i,o,y);l=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml.pkcs5PBES2).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml.pkcs5PBKDF2).getBytes()),I]),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(d).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,C)])])])}else if(r.algorithm==="3des"){o=24;var k=new dt.util.ByteBuffer(n),E=Ut.pbe.generatePkcs12Key(t,k,1,a,o),C=Ut.pbe.generatePkcs12Key(t,k,2,a,o),T=dt.des.createEncryptionCipher(E);T.start(C),T.update(Ge.toDer(e)),T.finish(),f=T.output.getBytes(),l=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ml["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,n),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,i.getBytes())])])}else{var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=r.algorithm,v}var N=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[l,Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,f)]);return N},Ut.decryptPrivateKeyInfo=function(e,t){var r=null,n={},a=[];if(!Ge.validate(e,Ate,n,a)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var o=Ge.derToOid(n.encryptionOid),l=Ut.pbe.getCipher(o,n.encryptionParams,t),f=dt.util.createBuffer(n.encryptedData);return l.update(f),l.finish()&&(r=Ge.fromDer(l.output)),r},Ut.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:Ge.toDer(e).getBytes()};return dt.pem.encode(r,{maxline:t})},Ut.encryptedPrivateKeyFromPem=function(e){var t=dt.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Ge.fromDer(t.body)},Ut.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var n=Ut.wrapRsaPrivateKey(Ut.privateKeyToAsn1(e));return n=Ut.encryptPrivateKeyInfo(n,t,r),Ut.encryptedPrivateKeyToPem(n)}var a,i,o,l;switch(r.algorithm){case"aes128":a="AES-128-CBC",o=16,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",o=24,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",o=32,i=dt.random.getBytesSync(16),l=dt.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",o=24,i=dt.random.getBytesSync(8),l=dt.des.createEncryptionCipher;break;case"des":a="DES-CBC",o=8,i=dt.random.getBytesSync(8),l=dt.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var u=dt.pbe.opensslDeriveBytes(t,i.substr(0,8),o),d=l(u);d.start(i),d.update(Ge.toDer(Ut.privateKeyToAsn1(e))),d.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:dt.util.bytesToHex(i).toUpperCase()},body:d.output.getBytes()};return dt.pem.encode(m)},Ut.decryptRsaPrivateKey=function(e,t){var r=null,n=dt.pem.decode(e)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,o;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,o=dt.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,o=dt.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,o=dt.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,o=dt.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,o=dt.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,o=function(m){return dt.rc2.createDecryptionCipher(m,40)};break;case"RC2-64-CBC":i=8,o=function(m){return dt.rc2.createDecryptionCipher(m,64)};break;case"RC2-128-CBC":i=16,o=function(m){return dt.rc2.createDecryptionCipher(m,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw a.algorithm=n.dekInfo.algorithm,a}var l=dt.util.hexToBytes(n.dekInfo.parameters),f=dt.pbe.opensslDeriveBytes(t,l.substr(0,8),i),u=o(f);if(u.start(l),u.update(dt.util.createBuffer(n.body)),u.finish())r=u.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=Ut.decryptPrivateKeyInfo(Ge.fromDer(r),t):r=Ge.fromDer(r),r!==null&&(r=Ut.privateKeyFromAsn1(r)),r},Ut.pbe.generatePkcs12Key=function(e,t,r,n,a,i){var o,l;if(typeof i>"u"||i===null){if(!("sha1"in dt.md))throw new Error('"sha1" hash algorithm unavailable.');i=dt.md.sha1.create()}var f=i.digestLength,u=i.blockLength,d=new dt.util.ByteBuffer,m=new dt.util.ByteBuffer;if(e!=null){for(l=0;l<e.length;l++)m.putInt16(e.charCodeAt(l));m.putInt16(0)}var v=m.length(),y=t.length(),_=new dt.util.ByteBuffer;_.fillWithByte(r,u);var E=u*Math.ceil(y/u),C=new dt.util.ByteBuffer;for(l=0;l<E;l++)C.putByte(t.at(l%y));var T=u*Math.ceil(v/u),I=new dt.util.ByteBuffer;for(l=0;l<T;l++)I.putByte(m.at(l%v));var k=C;k.putBuffer(I);for(var N=Math.ceil(a/f),O=1;O<=N;O++){var P=new dt.util.ByteBuffer;P.putBytes(_.bytes()),P.putBytes(k.bytes());for(var z=0;z<n;z++)i.start(),i.update(P.getBytes()),P=i.digest();var V=new dt.util.ByteBuffer;for(l=0;l<u;l++)V.putByte(P.at(l%f));var L=Math.ceil(y/u)+Math.ceil(v/u),U=new dt.util.ByteBuffer;for(o=0;o<L;o++){var M=new dt.util.ByteBuffer(k.getBytes(u)),s=511;for(l=V.length()-1;l>=0;l--)s=s>>8,s+=V.at(l)+M.at(l),M.setAt(l,s&255);U.putBuffer(M)}k=U,d.putBuffer(P)}return d.truncate(d.length()-a),d},Ut.pbe.getCipher=function(e,t,r){switch(e){case Ut.oids.pkcs5PBES2:return Ut.pbe.getCipherForPBES2(e,t,r);case Ut.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ut.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ut.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},Ut.pbe.getCipherForPBES2=function(e,t,r){var n={},a=[];if(!Ge.validate(t,Ite,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}if(e=Ge.derToOid(n.kdfOid),e!==Ut.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=e,i.supportedOids=["pkcs5PBKDF2"],i}if(e=Ge.derToOid(n.encOid),e!==Ut.oids["aes128-CBC"]&&e!==Ut.oids["aes192-CBC"]&&e!==Ut.oids["aes256-CBC"]&&e!==Ut.oids["des-EDE3-CBC"]&&e!==Ut.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var o=n.kdfSalt,l=dt.util.createBuffer(n.kdfIterationCount);l=l.getInt(l.length()<<3);var f,u;switch(Ut.oids[e]){case"aes128-CBC":f=16,u=dt.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,u=dt.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,u=dt.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,u=dt.des.createDecryptionCipher;break;case"desCBC":f=8,u=dt.des.createDecryptionCipher;break}var d=uT(n.prfOid),m=dt.pkcs5.pbkdf2(r,o,l,f,d),v=n.encIv,y=u(m);return y.start(v),y},Ut.pbe.getCipherForPKCS12PBE=function(e,t,r){var n={},a=[];if(!Ge.validate(t,Bte,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var o=dt.util.createBuffer(n.salt),l=dt.util.createBuffer(n.iterations);l=l.getInt(l.length()<<3);var f,u,d;switch(e){case Ut.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:f=24,u=8,d=dt.des.startDecrypting;break;case Ut.oids["pbewithSHAAnd40BitRC2-CBC"]:f=5,u=8,d=function(E,C){var T=dt.rc2.createDecryptionCipher(E,40);return T.start(C,null),T};break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=e,i}var m=uT(n.prfOid),v=Ut.pbe.generatePkcs12Key(r,o,1,l,f,m);m.start();var y=Ut.pbe.generatePkcs12Key(r,o,2,l,u,m);return d(v,y)},Ut.pbe.opensslDeriveBytes=function(e,t,r,n){if(typeof n>"u"||n===null){if(!("md5"in dt.md))throw new Error('"md5" hash algorithm unavailable.');n=dt.md.md5.create()}t===null&&(t="");for(var a=[fT(n,e+t)],i=16,o=1;i<r;++o,i+=16)a.push(fT(n,a[o-1]+e+t));return a.join("").substr(0,r)};function fT(e,t){return e.start().update(t).digest().getBytes()}function uT(e){var t;if(!e)t="hmacWithSHA1";else if(t=Ut.oids[Ge.derToOid(e)],!t){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}return cT(t)}function cT(e){var t=dt.md;switch(e){case"hmacWithSHA224":t=dt.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function kte(e,t,r,n){var a=Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OCTETSTRING,!1,e),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,t.getBytes())]);return n!=="hmacWithSHA1"&&a.value.push(Ge.create(Ge.Class.UNIVERSAL,Ge.Type.INTEGER,!1,dt.util.hexToBytes(r.toString(16))),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.SEQUENCE,!0,[Ge.create(Ge.Class.UNIVERSAL,Ge.Type.OID,!1,Ge.oidToDer(Ut.oids[n]).getBytes()),Ge.create(Ge.Class.UNIVERSAL,Ge.Type.NULL,!1,"")])),a}var qr=ur,ye=qr.asn1,Xt=qr.pki,xc=qr.pkcs12=qr.pkcs12||{},hT={name:"ContentInfo",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},Nte={name:"PFX",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:ye.Class.UNIVERSAL,type:ye.Type.INTEGER,constructed:!1,capture:"version"},hT,{name:"PFX.macData",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:ye.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:ye.Class.UNIVERSAL,type:ye.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Ote={name:"SafeBag",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Rte={name:"Attribute",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SET,constructed:!0,capture:"values"}]},Pte={name:"CertBag",tagClass:ye.Class.UNIVERSAL,type:ye.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:ye.Class.UNIVERSAL,type:ye.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:ye.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:ye.Class.UNIVERSAL,type:ye.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Sc(e,t,r,n){for(var a=[],i=0;i<e.length;i++)for(var o=0;o<e[i].safeBags.length;o++){var l=e[i].safeBags[o];if(!(n!==void 0&&l.type!==n)){if(t===null){a.push(l);continue}l.attributes[t]!==void 0&&l.attributes[t].indexOf(r)>=0&&a.push(l)}}return a}xc.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},a=[];if(!ye.validate(e,Nte,n,a)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var o={version:n.version.charCodeAt(0),safeContents:[],getBags:function(C){var T={},I;return"localKeyId"in C?I=C.localKeyId:"localKeyIdHex"in C&&(I=qr.util.hexToBytes(C.localKeyIdHex)),I===void 0&&!("friendlyName"in C)&&"bagType"in C&&(T[C.bagType]=Sc(o.safeContents,null,null,C.bagType)),I!==void 0&&(T.localKeyId=Sc(o.safeContents,"localKeyId",I,C.bagType)),"friendlyName"in C&&(T.friendlyName=Sc(o.safeContents,"friendlyName",C.friendlyName,C.bagType)),T},getBagsByFriendlyName:function(C,T){return Sc(o.safeContents,"friendlyName",C,T)},getBagsByLocalKeyId:function(C,T){return Sc(o.safeContents,"localKeyId",C,T)}};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(ye.derToOid(n.contentType)!==Xt.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=ye.derToOid(n.contentType),i}var l=n.content.value[0];if(l.tagClass!==ye.Class.UNIVERSAL||l.type!==ye.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(l=y2(l),n.mac){var f=null,u=0,d=ye.derToOid(n.macAlgorithm);switch(d){case Xt.oids.sha1:f=qr.md.sha1.create(),u=20;break;case Xt.oids.sha256:f=qr.md.sha256.create(),u=32;break;case Xt.oids.sha384:f=qr.md.sha384.create(),u=48;break;case Xt.oids.sha512:f=qr.md.sha512.create(),u=64;break;case Xt.oids.md5:f=qr.md.md5.create(),u=16;break}if(f===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+d);var m=new qr.util.ByteBuffer(n.macSalt),v="macIterations"in n?parseInt(qr.util.bytesToHex(n.macIterations),16):1,y=xc.generateKey(r,m,3,v,u,f),_=qr.hmac.create();_.start(f,y),_.update(l.value);var E=_.getMac();if(E.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return Fte(o,l.value,t,r),o};function y2(e){if(e.composed||e.constructed){for(var t=qr.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function Fte(e,t,r,n){if(t=ye.fromDer(t,r),t.tagClass!==ye.Class.UNIVERSAL||t.type!==ye.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var a=0;a<t.value.length;a++){var i=t.value[a],o={},l=[];if(!ye.validate(i,hT,o,l)){var f=new Error("Cannot read ContentInfo.");throw f.errors=l,f}var u={encrypted:!1},d=null,m=o.content.value[0];switch(ye.derToOid(o.contentType)){case Xt.oids.data:if(m.tagClass!==ye.Class.UNIVERSAL||m.type!==ye.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");d=y2(m).value;break;case Xt.oids.encryptedData:d=Lte(m,n),u.encrypted=!0;break;default:var f=new Error("Unsupported PKCS#12 contentType.");throw f.contentType=ye.derToOid(o.contentType),f}u.safeBags=Dte(d,r,n),e.safeContents.push(u)}}function Lte(e,t){var r={},n=[];if(!ye.validate(e,qr.pkcs7.asn1.encryptedDataValidator,r,n)){var a=new Error("Cannot read EncryptedContentInfo.");throw a.errors=n,a}var i=ye.derToOid(r.contentType);if(i!==Xt.oids.data){var a=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw a.oid=i,a}i=ye.derToOid(r.encAlgorithm);var o=Xt.pbe.getCipher(i,r.encParameter,t),l=y2(r.encryptedContentAsn1),f=qr.util.createBuffer(l.value);if(o.update(f),!o.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return o.output.getBytes()}function Dte(e,t,r){if(!t&&e.length===0)return[];if(e=ye.fromDer(e,t),e.tagClass!==ye.Class.UNIVERSAL||e.type!==ye.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],a=0;a<e.value.length;a++){var i=e.value[a],o={},l=[];if(!ye.validate(i,Ote,o,l)){var f=new Error("Cannot read SafeBag.");throw f.errors=l,f}var u={type:ye.derToOid(o.bagId),attributes:$te(o.bagAttributes)};n.push(u);var d,m,v=o.bagValue.value[0];switch(u.type){case Xt.oids.pkcs8ShroudedKeyBag:if(v=Xt.decryptPrivateKeyInfo(v,r),v===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Xt.oids.keyBag:try{u.key=Xt.privateKeyFromAsn1(v)}catch{u.key=null,u.asn1=v}continue;case Xt.oids.certBag:d=Pte,m=function(){if(ye.derToOid(o.certId)!==Xt.oids.x509Certificate){var _=new Error("Unsupported certificate type, only X.509 supported.");throw _.oid=ye.derToOid(o.certId),_}var E=ye.fromDer(o.cert,t);try{u.cert=Xt.certificateFromAsn1(E,!0)}catch{u.cert=null,u.asn1=E}};break;default:var f=new Error("Unsupported PKCS#12 SafeBag type.");throw f.oid=u.type,f}if(d!==void 0&&!ye.validate(v,d,o,l)){var f=new Error("Cannot read PKCS#12 "+d.name);throw f.errors=l,f}m()}return n}function $te(e){var t={};if(e!==void 0)for(var r=0;r<e.length;++r){var n={},a=[];if(!ye.validate(e[r],Rte,n,a)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=a,i}var o=ye.derToOid(n.oid);if(Xt.oids[o]!==void 0){t[Xt.oids[o]]=[];for(var l=0;l<n.values.length;++l)t[Xt.oids[o]].push(n.values[l].value)}}return t}xc.toPkcs12Asn1=function(e,t,r,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var a=n.localKeyId,i;if(a!==null)a=qr.util.hexToBytes(a);else if(n.generateLocalKeyId)if(t){var o=qr.util.isArray(t)?t[0]:t;typeof o=="string"&&(o=Xt.certificateFromPem(o));var l=qr.md.sha1.create();l.update(ye.toDer(Xt.certificateToAsn1(o)).getBytes()),a=l.digest().getBytes()}else a=qr.random.getBytes(20);var f=[];a!==null&&f.push(ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.localKeyId).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,a)])])),"friendlyName"in n&&f.push(ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.friendlyName).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.BMPSTRING,!1,n.friendlyName)])])),f.length>0&&(i=ye.create(ye.Class.UNIVERSAL,ye.Type.SET,!0,f));var u=[],d=[];t!==null&&(qr.util.isArray(t)?d=t:d=[t]);for(var m=[],v=0;v<d.length;++v){t=d[v],typeof t=="string"&&(t=Xt.certificateFromPem(t));var y=v===0?i:void 0,_=Xt.certificateToAsn1(t),E=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.certBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.x509Certificate).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(_).getBytes())])])]),y]);m.push(E)}if(m.length>0){var C=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,m),T=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(C).getBytes())])]);u.push(T)}var I=null;if(e!==null){var k=Xt.wrapRsaPrivateKey(Xt.privateKeyToAsn1(e));r===null?I=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.keyBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[k]),i]):I=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.pkcs8ShroudedKeyBag).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[Xt.encryptPrivateKeyInfo(k,r,n)]),i]);var N=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[I]),O=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(N).getBytes())])]);u.push(O)}var P=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,u),z;if(n.useMac){var l=qr.md.sha1.create(),V=new qr.util.ByteBuffer(qr.random.getBytes(n.saltSize)),L=n.count,e=xc.generateKey(r,V,3,L,20),U=qr.hmac.create();U.start(l,e),U.update(ye.toDer(P).getBytes());var M=U.getMac();z=ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.sha1).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.NULL,!1,"")]),ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,M.getBytes())]),ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,V.getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.INTEGER,!1,ye.integerToDer(L).getBytes())])}return ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.INTEGER,!1,ye.integerToDer(3).getBytes()),ye.create(ye.Class.UNIVERSAL,ye.Type.SEQUENCE,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OID,!1,ye.oidToDer(Xt.oids.data).getBytes()),ye.create(ye.Class.CONTEXT_SPECIFIC,0,!0,[ye.create(ye.Class.UNIVERSAL,ye.Type.OCTETSTRING,!1,ye.toDer(P).getBytes())])]),z])},xc.generateKey=qr.pbe.generatePkcs12Key;var gs=ur,b2=gs.asn1,Zf=gs.pki=gs.pki||{};Zf.pemToDer=function(e){var t=gs.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return gs.util.createBuffer(t.body)},Zf.privateKeyFromPem=function(e){var t=gs.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=b2.fromDer(t.body);return Zf.privateKeyFromAsn1(n)},Zf.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:b2.toDer(Zf.privateKeyToAsn1(e)).getBytes()};return gs.pem.encode(r,{maxline:t})},Zf.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:b2.toDer(e).getBytes()};return gs.pem.encode(r,{maxline:t})};var Yr=ur,Mc=Yr.sha512=Yr.sha512||{};Yr.md.sha512=Yr.md.algorithms.sha512=Mc;var dT=Yr.sha384=Yr.sha512.sha384=Yr.sha512.sha384||{};dT.create=function(){return Mc.create("SHA-384")},Yr.md.sha384=Yr.md.algorithms.sha384=dT,Yr.sha512.sha256=Yr.sha512.sha256||{create:function(){return Mc.create("SHA-512/256")}},Yr.md["sha512/256"]=Yr.md.algorithms["sha512/256"]=Yr.sha512.sha256,Yr.sha512.sha224=Yr.sha512.sha224||{create:function(){return Mc.create("SHA-512/224")}},Yr.md["sha512/224"]=Yr.md.algorithms["sha512/224"]=Yr.sha512.sha224,Mc.create=function(e){if(pT||zte(),typeof e>"u"&&(e="SHA-512"),!(e in Cl))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Cl[e],r=null,n=Yr.util.createBuffer(),a=new Array(80),i=0;i<80;++i)a[i]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var l={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return l.start=function(){l.messageLength=0,l.fullMessageLength=l.messageLength128=[];for(var f=l.messageLengthSize/4,u=0;u<f;++u)l.fullMessageLength.push(0);n=Yr.util.createBuffer(),r=new Array(t.length);for(var u=0;u<t.length;++u)r[u]=t[u].slice(0);return l},l.start(),l.update=function(f,u){u==="utf8"&&(f=Yr.util.encodeUtf8(f));var d=f.length;l.messageLength+=d,d=[d/4294967296>>>0,d>>>0];for(var m=l.fullMessageLength.length-1;m>=0;--m)l.fullMessageLength[m]+=d[1],d[1]=d[0]+(l.fullMessageLength[m]/4294967296>>>0),l.fullMessageLength[m]=l.fullMessageLength[m]>>>0,d[0]=d[1]/4294967296>>>0;return n.putBytes(f),vT(r,a,n),(n.read>2048||n.length()===0)&&n.compact(),l},l.digest=function(){var f=Yr.util.createBuffer();f.putBytes(n.bytes());var u=l.fullMessageLength[l.fullMessageLength.length-1]+l.messageLengthSize,d=u&l.blockLength-1;f.putBytes(_2.substr(0,l.blockLength-d));for(var m,v,y=l.fullMessageLength[0]*8,_=0;_<l.fullMessageLength.length-1;++_)m=l.fullMessageLength[_+1]*8,v=m/4294967296>>>0,y+=v,f.putInt32(y>>>0),y=m>>>0;f.putInt32(y);for(var E=new Array(r.length),_=0;_<r.length;++_)E[_]=r[_].slice(0);vT(E,a,f);var C=Yr.util.createBuffer(),T;e==="SHA-512"?T=E.length:e==="SHA-384"?T=E.length-2:T=E.length-4;for(var _=0;_<T;++_)C.putInt32(E[_][0]),(_!==T-1||e!=="SHA-512/224")&&C.putInt32(E[_][1]);return C},l};var _2=null,pT=!1,w2=null,Cl=null;function zte(){_2=String.fromCharCode(128),_2+=Yr.util.fillString(String.fromCharCode(0),128),w2=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Cl={},Cl["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Cl["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Cl["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Cl["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],pT=!0}function vT(e,t,r){for(var n,a,i,o,l,f,u,d,m,v,y,_,E,C,T,I,k,N,O,P,z,V,L,U,M,s,h,p,g,b,w,A,x,c,S,B=r.length();B>=128;){for(g=0;g<16;++g)t[g][0]=r.getInt32()>>>0,t[g][1]=r.getInt32()>>>0;for(;g<80;++g)A=t[g-2],b=A[0],w=A[1],n=((b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6)>>>0,a=((b<<13|w>>>19)^(w<<3|b>>>29)^(b<<26|w>>>6))>>>0,c=t[g-15],b=c[0],w=c[1],i=((b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7)>>>0,o=((b<<31|w>>>1)^(b<<24|w>>>8)^(b<<25|w>>>7))>>>0,x=t[g-7],S=t[g-16],w=a+x[1]+o+S[1],t[g][0]=n+x[0]+i+S[0]+(w/4294967296>>>0)>>>0,t[g][1]=w>>>0;for(E=e[0][0],C=e[0][1],T=e[1][0],I=e[1][1],k=e[2][0],N=e[2][1],O=e[3][0],P=e[3][1],z=e[4][0],V=e[4][1],L=e[5][0],U=e[5][1],M=e[6][0],s=e[6][1],h=e[7][0],p=e[7][1],g=0;g<80;++g)u=((z>>>14|V<<18)^(z>>>18|V<<14)^(V>>>9|z<<23))>>>0,d=((z<<18|V>>>14)^(z<<14|V>>>18)^(V<<23|z>>>9))>>>0,m=(M^z&(L^M))>>>0,v=(s^V&(U^s))>>>0,l=((E>>>28|C<<4)^(C>>>2|E<<30)^(C>>>7|E<<25))>>>0,f=((E<<4|C>>>28)^(C<<30|E>>>2)^(C<<25|E>>>7))>>>0,y=(E&T|k&(E^T))>>>0,_=(C&I|N&(C^I))>>>0,w=p+d+v+w2[g][1]+t[g][1],n=h+u+m+w2[g][0]+t[g][0]+(w/4294967296>>>0)>>>0,a=w>>>0,w=f+_,i=l+y+(w/4294967296>>>0)>>>0,o=w>>>0,h=M,p=s,M=L,s=U,L=z,U=V,w=P+a,z=O+n+(w/4294967296>>>0)>>>0,V=w>>>0,O=k,P=N,k=T,N=I,T=E,I=C,w=a+o,E=n+i+(w/4294967296>>>0)>>>0,C=w>>>0;w=e[0][1]+C,e[0][0]=e[0][0]+E+(w/4294967296>>>0)>>>0,e[0][1]=w>>>0,w=e[1][1]+I,e[1][0]=e[1][0]+T+(w/4294967296>>>0)>>>0,e[1][1]=w>>>0,w=e[2][1]+N,e[2][0]=e[2][0]+k+(w/4294967296>>>0)>>>0,e[2][1]=w>>>0,w=e[3][1]+P,e[3][0]=e[3][0]+O+(w/4294967296>>>0)>>>0,e[3][1]=w>>>0,w=e[4][1]+V,e[4][0]=e[4][0]+z+(w/4294967296>>>0)>>>0,e[4][1]=w>>>0,w=e[5][1]+U,e[5][0]=e[5][0]+L+(w/4294967296>>>0)>>>0,e[5][1]=w>>>0,w=e[6][1]+s,e[6][0]=e[6][0]+M+(w/4294967296>>>0)>>>0,e[6][1]=w>>>0,w=e[7][1]+p,e[7][0]=e[7][0]+h+(w/4294967296>>>0)>>>0,e[7][1]=w>>>0,B-=128}}/*!
723
723
  * deps/forge.js - Forge Package Customization
724
724
  *
725
725
  * Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file.
@@ -832,10 +832,10 @@ use chrome, FireFox or Internet Explorer 11`)}var t=Ht(),r=$f(),n=t.Buffer,a=t.k
832
832
  `),a]);else{const i=[`[Vue warn]: ${e}`,...t];a.length&&i.push(`
833
833
  `,...vve(a)),console.warn(...i)}Yl()}function pve(){let e=ef[ef.length-1];if(!e)return[];const t=[];for(;e;){const r=t[0];r&&r.vnode===e?r.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function vve(e){const t=[];return e.forEach((r,n)=>{t.push(...n===0?[]:[`
834
834
  `],...mve(r))}),t}function mve({vnode:e,recurseCount:t}){const r=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${Sv(e.component,e.type,n)}`,i=">"+r;return e.props?[a,...gve(e.props),i]:[a+i]}function gve(e){const t=[],r=Object.keys(e);return r.slice(0,3).forEach(n=>{t.push(...l9(n,e[n]))}),r.length>3&&t.push(" ..."),t}function l9(e,t,r){return Bt(t)?(t=JSON.stringify(t),r?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?r?t:[`${e}=${t}`]:hr(t)?(t=l9(e,Tt(t.value),!0),r?t:[`${e}=Ref<`,t,">"]):bt(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Tt(t),r?t:[`${e}=`,t])}function yve(e,t){fe.env.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?tt(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&tt(`${t} is NaN - the duration expression might be incorrect.`))}const mw={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function Ho(e,t,r,n){let a;try{a=n?e(...n):e()}catch(i){lv(i,t,r)}return a}function na(e,t,r,n){if(bt(e)){const i=Ho(e,t,r,n);return i&&aw(i)&&i.catch(o=>{lv(o,t,r)}),i}const a=[];for(let i=0;i<e.length;i++)a.push(na(e[i],t,r,n));return a}function lv(e,t,r,n=!0){const a=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,l=fe.env.NODE_ENV!=="production"?mw[r]:r;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,o,l)===!1)return}i=i.parent}const f=t.appContext.config.errorHandler;if(f){Ho(f,null,10,[e,o,l]);return}}bve(e,r,a,n)}function bve(e,t,r,n=!0){if(fe.env.NODE_ENV!=="production"){const a=mw[t];if(r&&ov(r),tt(`Unhandled error${a?` during execution of ${a}`:""}`),r&&sv(),n)throw e;console.error(e)}else console.error(e)}let uh=!1,gw=!1;const Hn=[];let uo=0;const Cu=[];let co=null,Ls=0;const f9=Promise.resolve();let yw=null;const _ve=100;function kt(e){const t=yw||f9;return e?t.then(this?e.bind(this):e):t}function wve(e){let t=uo+1,r=Hn.length;for(;t<r;){const n=t+r>>>1;ch(Hn[n])<e?t=n+1:r=n}return t}function fv(e){(!Hn.length||!Hn.includes(e,uh&&e.allowRecurse?uo+1:uo))&&(e.id==null?Hn.push(e):Hn.splice(wve(e.id),0,e),u9())}function u9(){!uh&&!gw&&(gw=!0,yw=f9.then(p9))}function Eve(e){const t=Hn.indexOf(e);t>uo&&Hn.splice(t,1)}function c9(e){mt(e)?Cu.push(...e):(!co||!co.includes(e,e.allowRecurse?Ls+1:Ls))&&Cu.push(e),u9()}function h9(e,t=uh?uo+1:0){for(fe.env.NODE_ENV!=="production"&&(e=e||new Map);t<Hn.length;t++){const r=Hn[t];if(r&&r.pre){if(fe.env.NODE_ENV!=="production"&&bw(e,r))continue;Hn.splice(t,1),t--,r()}}}function d9(e){if(Cu.length){const t=[...new Set(Cu)];if(Cu.length=0,co){co.push(...t);return}for(co=t,fe.env.NODE_ENV!=="production"&&(e=e||new Map),co.sort((r,n)=>ch(r)-ch(n)),Ls=0;Ls<co.length;Ls++)fe.env.NODE_ENV!=="production"&&bw(e,co[Ls])||co[Ls]();co=null,Ls=0}}const ch=e=>e.id==null?1/0:e.id,xve=(e,t)=>{const r=ch(e)-ch(t);if(r===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return r};function p9(e){gw=!1,uh=!0,fe.env.NODE_ENV!=="production"&&(e=e||new Map),Hn.sort(xve);const t=fe.env.NODE_ENV!=="production"?r=>bw(e,r):an;try{for(uo=0;uo<Hn.length;uo++){const r=Hn[uo];if(r&&r.active!==!1){if(fe.env.NODE_ENV!=="production"&&t(r))continue;Ho(r,null,14)}}}finally{uo=0,Hn.length=0,d9(e),uh=!1,yw=null,(Hn.length||Cu.length)&&p9(e)}}function bw(e,t){if(!e.has(t))e.set(t,1);else{const r=e.get(t);if(r>_ve){const n=t.ownerInstance,a=n&&Ww(n.type);return tt(`Maximum recursive updates exceeded${a?` in component <${a}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,r+1)}}let Ds=!1;const Tu=new Set;fe.env.NODE_ENV!=="production"&&(Kp().__VUE_HMR_RUNTIME__={createRecord:_w(v9),rerender:_w(Cve),reload:_w(Tve)});const tf=new Map;function Sve(e){const t=e.type.__hmrId;let r=tf.get(t);r||(v9(t,e.type),r=tf.get(t)),r.instances.add(e)}function Mve(e){tf.get(e.type.__hmrId).instances.delete(e)}function v9(e,t){return tf.has(e)?!1:(tf.set(e,{initialDef:hh(t),instances:new Set}),!0)}function hh(e){return vk(e)?e.__vccOpts:e}function Cve(e,t){const r=tf.get(e);r&&(r.initialDef.render=t,[...r.instances].forEach(n=>{t&&(n.render=t,hh(n.type).render=t),n.renderCache=[],Ds=!0,n.update(),Ds=!1}))}function Tve(e,t){const r=tf.get(e);if(!r)return;t=hh(t),m9(r.initialDef,t);const n=[...r.instances];for(const a of n){const i=hh(a.type);Tu.has(i)||(i!==r.initialDef&&m9(i,t),Tu.add(i)),a.appContext.propsCache.delete(a.type),a.appContext.emitsCache.delete(a.type),a.appContext.optionsCache.delete(a.type),a.ceReload?(Tu.add(i),a.ceReload(t.styles),Tu.delete(i)):a.parent?fv(a.parent.update):a.appContext.reload?a.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}c9(()=>{for(const a of n)Tu.delete(hh(a.type))})}function m9(e,t){xr(e,t);for(const r in e)r!=="__file"&&!(r in t)&&delete e[r]}function _w(e){return(t,r)=>{try{return e(t,r)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ho,dh=[],ww=!1;function ph(e,...t){ho?ho.emit(e,...t):ww||dh.push({event:e,args:t})}function g9(e,t){var r,n;ho=e,ho?(ho.enabled=!0,dh.forEach(({event:a,args:i})=>ho.emit(a,...i)),dh=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{g9(i,t)}),setTimeout(()=>{ho||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ww=!0,dh=[])},3e3)):(ww=!0,dh=[])}function Ave(e,t){ph("app:init",e,t,{Fragment:wt,Text:zs,Comment:mn,Static:xh})}function Ive(e){ph("app:unmount",e)}const Bve=Ew("component:added"),y9=Ew("component:updated"),kve=Ew("component:removed"),Nve=e=>{ho&&typeof ho.cleanupBuffer=="function"&&!ho.cleanupBuffer(e)&&kve(e)};function Ew(e){return t=>{ph(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Ove=b9("perf:start"),Rve=b9("perf:end");function b9(e){return(t,r,n)=>{ph(e,t.appContext.app,t.uid,t,r,n)}}function Pve(e,t,r){ph("component:emit",e.appContext.app,e,t,r)}function Fve(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||yr;if(fe.env.NODE_ENV!=="production"){const{emitsOptions:d,propsOptions:[m]}=e;if(d)if(!(t in d))(!m||!(Ns(t)in m))&&tt(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Ns(t)}" prop.`);else{const v=d[t];bt(v)&&(v(...r)||tt(`Invalid event arguments: event validation failed for event "${t}".`))}}let a=r;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in n){const d=`${o==="modelValue"?"model":o}Modifiers`,{number:m,trim:v}=n[d]||yr;v&&(a=r.map(y=>Bt(y)?y.trim():y)),m&&(a=r.map(sw))}if(fe.env.NODE_ENV!=="production"&&Pve(e,t,a),fe.env.NODE_ENV!=="production"){const d=t.toLowerCase();d!==t&&n[Ns(d)]&&tt(`Event "${d}" is emitted in component ${Sv(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${lo(t)}" instead of "${t}".`)}let l,f=n[l=Ns(t)]||n[l=Ns(_a(t))];!f&&i&&(f=n[l=Ns(lo(t))]),f&&na(f,e,6,a);const u=n[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,na(u,e,6,a)}}function _9(e,t,r=!1){const n=t.emitsCache,a=n.get(e);if(a!==void 0)return a;const i=e.emits;let o={},l=!1;if(!bt(e)){const f=u=>{const d=_9(u,t,!0);d&&(l=!0,xr(o,d))};!r&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!l?(Dt(e)&&n.set(e,null),null):(mt(i)?i.forEach(f=>o[f]=null):xr(o,i),Dt(e)&&n.set(e,o),o)}function uv(e,t){return!e||!nh(t)?!1:(t=t.slice(2).replace(/Once$/,""),Kt(e,t[0].toLowerCase()+t.slice(1))||Kt(e,lo(t))||Kt(e,t))}let vn=null,w9=null;function cv(e){const t=vn;return vn=e,w9=e&&e.type.__scopeId||null,t}function rt(e,t=vn,r){if(!t||e._n)return e;const n=(...a)=>{n._d&&ik(-1);const i=cv(t);let o;try{o=e(...a)}finally{cv(i),n._d&&ik(1)}return fe.env.NODE_ENV!=="production"&&y9(t),o};return n._n=!0,n._c=!0,n._d=!0,n}let xw=!1;function hv(){xw=!0}function Sw(e){const{type:t,vnode:r,proxy:n,withProxy:a,props:i,propsOptions:[o],slots:l,attrs:f,emit:u,render:d,renderCache:m,data:v,setupState:y,ctx:_,inheritAttrs:E}=e;let C,T;const I=cv(e);fe.env.NODE_ENV!=="production"&&(xw=!1);try{if(r.shapeFlag&4){const O=a||n;C=Sa(d.call(O,O,m,i,y,v,_)),T=f}else{const O=t;fe.env.NODE_ENV!=="production"&&f===i&&hv(),C=Sa(O.length>1?O(i,fe.env.NODE_ENV!=="production"?{get attrs(){return hv(),f},slots:l,emit:u}:{attrs:f,slots:l,emit:u}):O(i,null)),T=t.props?f:Dve(f)}}catch(O){Sh.length=0,lv(O,e,1),C=ht(mn)}let k=C,N;if(fe.env.NODE_ENV!=="production"&&C.patchFlag>0&&C.patchFlag&2048&&([k,N]=Lve(C)),T&&E!==!1){const O=Object.keys(T),{shapeFlag:P}=k;if(O.length){if(P&7)o&&O.some(Up)&&(T=$ve(T,o)),k=xa(k,T);else if(fe.env.NODE_ENV!=="production"&&!xw&&k.type!==mn){const z=Object.keys(f),V=[],L=[];for(let U=0,M=z.length;U<M;U++){const s=z[U];nh(s)?Up(s)||V.push(s[2].toLowerCase()+s.slice(3)):L.push(s)}L.length&&tt(`Extraneous non-props attributes (${L.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),V.length&&tt(`Extraneous non-emits event listeners (${V.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return r.dirs&&(fe.env.NODE_ENV!=="production"&&!x9(k)&&tt("Runtime directive used on component with non-element root node. The directives will not function as intended."),k=xa(k),k.dirs=k.dirs?k.dirs.concat(r.dirs):r.dirs),r.transition&&(fe.env.NODE_ENV!=="production"&&!x9(k)&&tt("Component inside <Transition> renders non-element root node that cannot be animated."),k.transition=r.transition),fe.env.NODE_ENV!=="production"&&N?N(k):C=k,cv(I),C}const Lve=e=>{const t=e.children,r=e.dynamicChildren,n=E9(t);if(!n)return[e,void 0];const a=t.indexOf(n),i=r?r.indexOf(n):-1,o=l=>{t[a]=l,r&&(i>-1?r[i]=l:l.patchFlag>0&&(e.dynamicChildren=[...r,l]))};return[Sa(n),o]};function E9(e){let t;for(let r=0;r<e.length;r++){const n=e[r];if(Ea(n)){if(n.type!==mn||n.children==="v-if"){if(t)return;t=n}}else return}return t}const Dve=e=>{let t;for(const r in e)(r==="class"||r==="style"||nh(r))&&((t||(t={}))[r]=e[r]);return t},$ve=(e,t)=>{const r={};for(const n in e)(!Up(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r},x9=e=>e.shapeFlag&7||e.type===mn;function zve(e,t,r){const{props:n,children:a,component:i}=e,{props:o,children:l,patchFlag:f}=t,u=i.emitsOptions;if(fe.env.NODE_ENV!=="production"&&(a||l)&&Ds||t.dirs||t.transition)return!0;if(r&&f>=0){if(f&1024)return!0;if(f&16)return n?S9(n,o,u):!!o;if(f&8){const d=t.dynamicProps;for(let m=0;m<d.length;m++){const v=d[m];if(o[v]!==n[v]&&!uv(u,v))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?S9(n,o,u):!0:!!o;return!1}function S9(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const i=n[a];if(t[i]!==e[i]&&!uv(r,i))return!0}return!1}function Uve({vnode:e,parent:t},r){for(;t&&t.subTree===e;)(e=t.vnode).el=r,t=t.parent}const qve=e=>e.__isSuspense;function Vve(e,t){t&&t.pendingBranch?mt(e)?t.effects.push(...e):t.effects.push(e):c9(e)}function Hve(e,t){return Mw(e,null,t)}const dv={};function ut(e,t,r){return fe.env.NODE_ENV!=="production"&&!bt(t)&&tt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Mw(e,t,r)}function Mw(e,t,{immediate:r,deep:n,flush:a,onTrack:i,onTrigger:o}=yr){var l;fe.env.NODE_ENV!=="production"&&!t&&(r!==void 0&&tt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),n!==void 0&&tt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const f=O=>{tt("Invalid watch source: ",O,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=LB()===((l=gn)==null?void 0:l.scope)?gn:null;let d,m=!1,v=!1;if(hr(e)?(d=()=>e.value,m=iv(e)):Jl(e)?(d=()=>e,n=!0):mt(e)?(v=!0,m=e.some(O=>Jl(O)||iv(O)),d=()=>e.map(O=>{if(hr(O))return O.value;if(Jl(O))return rf(O);if(bt(O))return Ho(O,u,2);fe.env.NODE_ENV!=="production"&&f(O)})):bt(e)?t?d=()=>Ho(e,u,2):d=()=>{if(!(u&&u.isUnmounted))return y&&y(),na(e,u,3,[_])}:(d=an,fe.env.NODE_ENV!=="production"&&f(e)),t&&n){const O=d;d=()=>rf(O())}let y,_=O=>{y=k.onStop=()=>{Ho(O,u,4)}},E;if(Ch)if(_=an,t?r&&na(t,u,3,[d(),v?[]:void 0,_]):d(),a==="sync"){const O=Wme();E=O.__watcherHandles||(O.__watcherHandles=[])}else return an;let C=v?new Array(e.length).fill(dv):dv;const T=()=>{if(k.active)if(t){const O=k.run();(n||m||(v?O.some((P,z)=>ih(P,C[z])):ih(O,C)))&&(y&&y(),na(t,u,3,[O,C===dv?void 0:v&&C[0]===dv?[]:C,_]),C=O)}else k.run()};T.allowRecurse=!!t;let I;a==="sync"?I=T:a==="post"?I=()=>pi(T,u&&u.suspense):(T.pre=!0,u&&(T.id=u.uid),I=()=>fv(T));const k=new uw(d,I);fe.env.NODE_ENV!=="production"&&(k.onTrack=i,k.onTrigger=o),t?r?T():C=k.run():a==="post"?pi(k.run.bind(k),u&&u.suspense):k.run();const N=()=>{k.stop(),u&&u.scope&&nw(u.scope.effects,k)};return E&&E.push(N),N}function jve(e,t,r){const n=this.proxy,a=Bt(e)?e.includes(".")?M9(n,e):()=>n[e]:e.bind(n,n);let i;bt(t)?i=t:(i=t.handler,r=t);const o=gn;ku(this);const l=Mw(a,i.bind(n),r);return o?ku(o):lf(),l}function M9(e,t){const r=t.split(".");return()=>{let n=e;for(let a=0;a<r.length&&n;a++)n=n[r[a]];return n}}function rf(e,t){if(!Dt(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),hr(e))rf(e.value,t);else if(mt(e))for(let r=0;r<e.length;r++)rf(e[r],t);else if(BB(e)||Kl(e))e.forEach(r=>{rf(r,t)});else if(NB(e))for(const r in e)rf(e[r],t);return e}function C9(e){gpe(e)&&tt("Do not use built-in directive ids as custom directive id: "+e)}function tn(e,t){const r=vn;if(r===null)return fe.env.NODE_ENV!=="production"&&tt("withDirectives can only be used inside render functions."),e;const n=xv(r)||r.proxy,a=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,l,f,u=yr]=t[i];o&&(bt(o)&&(o={mounted:o,updated:o}),o.deep&&rf(l),a.push({dir:o,instance:n,value:l,oldValue:void 0,arg:f,modifiers:u}))}return e}function nf(e,t,r,n){const a=e.dirs,i=t&&t.dirs;for(let o=0;o<a.length;o++){const l=a[o];i&&(l.oldValue=i[o].value);let f=l.dir[n];f&&(Zl(),na(f,r,8,[e.el,l,e,t]),Yl())}}function T9(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ir(()=>{e.isMounted=!0}),fn(()=>{e.isUnmounting=!0}),e}const ia=[Function,Array],A9={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ia,onEnter:ia,onAfterEnter:ia,onEnterCancelled:ia,onBeforeLeave:ia,onLeave:ia,onAfterLeave:ia,onLeaveCancelled:ia,onBeforeAppear:ia,onAppear:ia,onAfterAppear:ia,onAppearCancelled:ia},Kve={name:"BaseTransition",props:A9,setup(e,{slots:t}){const r=rn(),n=T9();let a;return()=>{const i=t.default&&Tw(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){let E=!1;for(const C of i)if(C.type!==mn){if(fe.env.NODE_ENV!=="production"&&E){tt("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(o=C,E=!0,fe.env.NODE_ENV==="production")break}}const l=Tt(e),{mode:f}=l;if(fe.env.NODE_ENV!=="production"&&f&&f!=="in-out"&&f!=="out-in"&&f!=="default"&&tt(`invalid <transition> mode: ${f}`),n.isLeaving)return Cw(o);const u=B9(o);if(!u)return Cw(o);const d=vh(u,l,n,r);mh(u,d);const m=r.subTree,v=m&&B9(m);let y=!1;const{getTransitionKey:_}=u.type;if(_){const E=_();a===void 0?a=E:E!==a&&(a=E,y=!0)}if(v&&v.type!==mn&&(!sf(u,v)||y)){const E=vh(v,l,n,r);if(mh(v,E),f==="out-in")return n.isLeaving=!0,E.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},Cw(o);f==="in-out"&&u.type!==mn&&(E.delayLeave=(C,T,I)=>{const k=I9(n,v);k[String(v.key)]=v,C._leaveCb=()=>{T(),C._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=I})}return o}}};function I9(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function vh(e,t,r,n){const{appear:a,mode:i,persisted:o=!1,onBeforeEnter:l,onEnter:f,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:m,onLeave:v,onAfterLeave:y,onLeaveCancelled:_,onBeforeAppear:E,onAppear:C,onAfterAppear:T,onAppearCancelled:I}=t,k=String(e.key),N=I9(r,e),O=(V,L)=>{V&&na(V,n,9,L)},P=(V,L)=>{const U=L[1];O(V,L),mt(V)?V.every(M=>M.length<=1)&&U():V.length<=1&&U()},z={mode:i,persisted:o,beforeEnter(V){let L=l;if(!r.isMounted)if(a)L=E||l;else return;V._leaveCb&&V._leaveCb(!0);const U=N[k];U&&sf(e,U)&&U.el._leaveCb&&U.el._leaveCb(),O(L,[V])},enter(V){let L=f,U=u,M=d;if(!r.isMounted)if(a)L=C||f,U=T||u,M=I||d;else return;let s=!1;const h=V._enterCb=p=>{s||(s=!0,p?O(M,[V]):O(U,[V]),z.delayedLeave&&z.delayedLeave(),V._enterCb=void 0)};L?P(L,[V,h]):h()},leave(V,L){const U=String(e.key);if(V._enterCb&&V._enterCb(!0),r.isUnmounting)return L();O(m,[V]);let M=!1;const s=V._leaveCb=h=>{M||(M=!0,L(),h?O(_,[V]):O(y,[V]),V._leaveCb=void 0,N[U]===e&&delete N[U])};N[U]=e,v?P(v,[V,s]):s()},clone(V){return vh(V,t,r,n)}};return z}function Cw(e){if(yh(e))return e=xa(e),e.children=null,e}function B9(e){return yh(e)?e.children?e.children[0]:void 0:e}function mh(e,t){e.shapeFlag&6&&e.component?mh(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Tw(e,t=!1,r){let n=[],a=0;for(let i=0;i<e.length;i++){let o=e[i];const l=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===wt?(o.patchFlag&128&&a++,n=n.concat(Tw(o.children,t,l))):(t||o.type!==mn)&&n.push(l!=null?xa(o,{key:l}):o)}if(a>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function st(e,t){return bt(e)?(()=>xr({name:e.name},t,{setup:e}))():e}const gh=e=>!!e.type.__asyncLoader,yh=e=>e.type.__isKeepAlive;function Wve(e,t){N9(e,"a",t)}function k9(e,t){N9(e,"da",t)}function N9(e,t,r=gn){const n=e.__wdc||(e.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(pv(t,n,r),r){let a=r.parent;for(;a&&a.parent;)yh(a.parent.vnode)&&Gve(n,t,r,a),a=a.parent}}function Gve(e,t,r,n){const a=pv(t,e,n,!0);bh(()=>{nw(n[t],a)},r)}function pv(e,t,r=gn,n=!1){if(r){const a=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(r.isUnmounted)return;Zl(),ku(r);const l=na(t,r,e,o);return lf(),Yl(),l});return n?a.unshift(i):a.push(i),i}else if(fe.env.NODE_ENV!=="production"){const a=Ns(mw[e].replace(/ hook$/,""));tt(`${a} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const jo=e=>(t,r=gn)=>(!Ch||e==="sp")&&pv(e,(...n)=>t(...n),r),Aw=jo("bm"),ir=jo("m"),Zve=jo("bu"),Au=jo("u"),fn=jo("bum"),bh=jo("um"),Yve=jo("sp"),Jve=jo("rtg"),Xve=jo("rtc");function Qve(e,t=gn){pv("ec",e,t)}const vv="components",eme="directives";function po(e,t){return Bw(vv,e,!0,t)||e}const O9=Symbol.for("v-ndc");function ni(e){return Bt(e)?Bw(vv,e,!1)||e:e||O9}function Iw(e){return Bw(eme,e)}function Bw(e,t,r=!0,n=!1){const a=vn||gn;if(a){const i=a.type;if(e===vv){const l=Ww(i,!1);if(l&&(l===t||l===_a(t)||l===Wl(_a(t))))return i}const o=R9(a[e]||i[e],t)||R9(a.appContext[e],t);if(!o&&n)return i;if(fe.env.NODE_ENV!=="production"&&r&&!o){const l=e===vv?`
835
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";tt(`Failed to resolve ${e.slice(0,-1)}: ${t}${l}`)}return o}else fe.env.NODE_ENV!=="production"&&tt(`resolve${Wl(e.slice(0,-1))} can only be used in render() or setup().`)}function R9(e,t){return e&&(e[t]||e[_a(t)]||e[Wl(_a(t))])}function jn(e,t,r,n){let a;const i=r&&r[n];if(mt(e)||Bt(e)){a=new Array(e.length);for(let o=0,l=e.length;o<l;o++)a[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){fe.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&tt(`The v-for range expect an integer value but got ${e}.`),a=new Array(e);for(let o=0;o<e;o++)a[o]=t(o+1,o,void 0,i&&i[o])}else if(Dt(e))if(e[Symbol.iterator])a=Array.from(e,(o,l)=>t(o,l,void 0,i&&i[l]));else{const o=Object.keys(e);a=new Array(o.length);for(let l=0,f=o.length;l<f;l++){const u=o[l];a[l]=t(e[u],u,l,i&&i[l])}}else a=[];return r&&(r[n]=a),a}function kw(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(mt(n))for(let a=0;a<n.length;a++)e[n[a].name]=n[a].fn;else n&&(e[n.name]=n.key?(...a)=>{const i=n.fn(...a);return i&&(i.key=n.key),i}:n.fn)}return e}function Ot(e,t,r={},n,a){if(vn.isCE||vn.parent&&gh(vn.parent)&&vn.parent.isCE)return t!=="default"&&(r.name=t),ht("slot",r,n&&n());let i=e[t];fe.env.NODE_ENV!=="production"&&i&&i.length>1&&(tt("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),i=()=>[]),i&&i._c&&(i._d=!1),me();const o=i&&P9(i(r)),l=Qe(wt,{key:r.key||o&&o.key||`_${t}`},o||(n?n():[]),o&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function P9(e){return e.some(t=>Ea(t)?!(t.type===mn||t.type===wt&&!P9(t.children)):!0)?e:null}function tme(e,t){const r={};if(fe.env.NODE_ENV!=="production"&&!Dt(e))return tt("v-on with no argument expects an object value."),r;for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:Ns(n)]=e[n];return r}const Nw=e=>e?uk(e)?xv(e)||e.proxy:Nw(e.parent):null,af=xr(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>fe.env.NODE_ENV!=="production"?sh(e.props):e.props,$attrs:e=>fe.env.NODE_ENV!=="production"?sh(e.attrs):e.attrs,$slots:e=>fe.env.NODE_ENV!=="production"?sh(e.slots):e.slots,$refs:e=>fe.env.NODE_ENV!=="production"?sh(e.refs):e.refs,$parent:e=>Nw(e.parent),$root:e=>Nw(e.root),$emit:e=>e.emit,$options:e=>Fw(e),$forceUpdate:e=>e.f||(e.f=()=>fv(e.update)),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>jve.bind(e)}),Ow=e=>e==="_"||e==="$",Rw=(e,t)=>e!==yr&&!e.__isScriptSetup&&Kt(e,t),F9={get({_:e},t){const{ctx:r,setupState:n,data:a,props:i,accessCache:o,type:l,appContext:f}=e;if(fe.env.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return a[t];case 4:return r[t];case 3:return i[t]}else{if(Rw(n,t))return o[t]=1,n[t];if(a!==yr&&Kt(a,t))return o[t]=2,a[t];if((u=e.propsOptions[0])&&Kt(u,t))return o[t]=3,i[t];if(r!==yr&&Kt(r,t))return o[t]=4,r[t];Pw&&(o[t]=0)}}const d=af[t];let m,v;if(d)return t==="$attrs"?(Nn(e,"get",t),fe.env.NODE_ENV!=="production"&&hv()):fe.env.NODE_ENV!=="production"&&t==="$slots"&&Nn(e,"get",t),d(e);if((m=l.__cssModules)&&(m=m[t]))return m;if(r!==yr&&Kt(r,t))return o[t]=4,r[t];if(v=f.config.globalProperties,Kt(v,t))return v[t];fe.env.NODE_ENV!=="production"&&vn&&(!Bt(t)||t.indexOf("__v")!==0)&&(a!==yr&&Ow(t[0])&&Kt(a,t)?tt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===vn&&tt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,r){const{data:n,setupState:a,ctx:i}=e;return Rw(a,t)?(a[t]=r,!0):fe.env.NODE_ENV!=="production"&&a.__isScriptSetup&&Kt(a,t)?(tt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):n!==yr&&Kt(n,t)?(n[t]=r,!0):Kt(e.props,t)?(fe.env.NODE_ENV!=="production"&&tt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(fe.env.NODE_ENV!=="production"&&tt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(fe.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:r}):i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:a,propsOptions:i}},o){let l;return!!r[o]||e!==yr&&Kt(e,o)||Rw(t,o)||(l=i[0])&&Kt(l,o)||Kt(n,o)||Kt(af,o)||Kt(a.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Kt(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};fe.env.NODE_ENV!=="production"&&(F9.ownKeys=e=>(tt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function rme(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(af).forEach(r=>{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:()=>af[r](e),set:an})}),t}function nme(e){const{ctx:t,propsOptions:[r]}=e;r&&Object.keys(r).forEach(n=>{Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>e.props[n],set:an})})}function ime(e){const{ctx:t,setupState:r}=e;Object.keys(Tt(r)).forEach(n=>{if(!r.__isScriptSetup){if(Ow(n[0])){tt(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r[n],set:an})}})}function mv(){return D9().slots}function L9(){return D9().attrs}function D9(){const e=rn();return fe.env.NODE_ENV!=="production"&&!e&&tt("useContext() called without active instance."),e.setupContext||(e.setupContext=pk(e))}function $9(e){return mt(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function ame(){const e=Object.create(null);return(t,r)=>{e[r]?tt(`${t} property "${r}" is already defined in ${e[r]}.`):e[r]=t}}let Pw=!0;function ome(e){const t=Fw(e),r=e.proxy,n=e.ctx;Pw=!1,t.beforeCreate&&z9(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:o,watch:l,provide:f,inject:u,created:d,beforeMount:m,mounted:v,beforeUpdate:y,updated:_,activated:E,deactivated:C,beforeDestroy:T,beforeUnmount:I,destroyed:k,unmounted:N,render:O,renderTracked:P,renderTriggered:z,errorCaptured:V,serverPrefetch:L,expose:U,inheritAttrs:M,components:s,directives:h,filters:p}=t,g=fe.env.NODE_ENV!=="production"?ame():null;if(fe.env.NODE_ENV!=="production"){const[w]=e.propsOptions;if(w)for(const A in w)g("Props",A)}if(u&&sme(u,n,g),o)for(const w in o){const A=o[w];bt(A)?(fe.env.NODE_ENV!=="production"?Object.defineProperty(n,w,{value:A.bind(r),configurable:!0,enumerable:!0,writable:!0}):n[w]=A.bind(r),fe.env.NODE_ENV!=="production"&&g("Methods",w)):fe.env.NODE_ENV!=="production"&&tt(`Method "${w}" has type "${typeof A}" in the component definition. Did you reference the function correctly?`)}if(a){fe.env.NODE_ENV!=="production"&&!bt(a)&&tt("The data option must be a function. Plain object usage is no longer supported.");const w=a.call(r,r);if(fe.env.NODE_ENV!=="production"&&aw(w)&&tt("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Dt(w))fe.env.NODE_ENV!=="production"&&tt("data() should return an object.");else if(e.data=Vn(w),fe.env.NODE_ENV!=="production")for(const A in w)g("Data",A),Ow(A[0])||Object.defineProperty(n,A,{configurable:!0,enumerable:!0,get:()=>w[A],set:an})}if(Pw=!0,i)for(const w in i){const A=i[w],x=bt(A)?A.bind(r,r):bt(A.get)?A.get.bind(r,r):an;fe.env.NODE_ENV!=="production"&&x===an&&tt(`Computed property "${w}" has no getter.`);const c=!bt(A)&&bt(A.set)?A.set.bind(r):fe.env.NODE_ENV!=="production"?()=>{tt(`Write operation failed: computed property "${w}" is readonly.`)}:an,S=Ee({get:x,set:c});Object.defineProperty(n,w,{enumerable:!0,configurable:!0,get:()=>S.value,set:B=>S.value=B}),fe.env.NODE_ENV!=="production"&&g("Computed",w)}if(l)for(const w in l)U9(l[w],n,r,w);if(f){const w=bt(f)?f.call(r):f;Reflect.ownKeys(w).forEach(A=>{un(A,w[A])})}d&&z9(d,e,"c");function b(w,A){mt(A)?A.forEach(x=>w(x.bind(r))):A&&w(A.bind(r))}if(b(Aw,m),b(ir,v),b(Zve,y),b(Au,_),b(Wve,E),b(k9,C),b(Qve,V),b(Xve,P),b(Jve,z),b(fn,I),b(bh,N),b(Yve,L),mt(U))if(U.length){const w=e.exposed||(e.exposed={});U.forEach(A=>{Object.defineProperty(w,A,{get:()=>r[A],set:x=>r[A]=x})})}else e.exposed||(e.exposed={});O&&e.render===an&&(e.render=O),M!=null&&(e.inheritAttrs=M),s&&(e.components=s),h&&(e.directives=h)}function sme(e,t,r=an){mt(e)&&(e=Lw(e));for(const n in e){const a=e[n];let i;Dt(a)?"default"in a?i=At(a.from||n,a.default,!0):i=At(a.from||n):i=At(a),hr(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i,fe.env.NODE_ENV!=="production"&&r("Inject",n)}}function z9(e,t,r){na(mt(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function U9(e,t,r,n){const a=n.includes(".")?M9(r,n):()=>r[n];if(Bt(e)){const i=t[e];bt(i)?ut(a,i):fe.env.NODE_ENV!=="production"&&tt(`Invalid watch handler specified by key "${e}"`,i)}else if(bt(e))ut(a,e.bind(r));else if(Dt(e))if(mt(e))e.forEach(i=>U9(i,t,r,n));else{const i=bt(e.handler)?e.handler.bind(r):t[e.handler];bt(i)?ut(a,i,e):fe.env.NODE_ENV!=="production"&&tt(`Invalid watch handler specified by key "${e.handler}"`,i)}else fe.env.NODE_ENV!=="production"&&tt(`Invalid watch option: "${n}"`,e)}function Fw(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let f;return l?f=l:!a.length&&!r&&!n?f=t:(f={},a.length&&a.forEach(u=>gv(f,u,o,!0)),gv(f,t,o)),Dt(t)&&i.set(t,f),f}function gv(e,t,r,n=!1){const{mixins:a,extends:i}=t;i&&gv(e,i,r,!0),a&&a.forEach(o=>gv(e,o,r,!0));for(const o in t)if(n&&o==="expose")fe.env.NODE_ENV!=="production"&&tt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const l=lme[o]||r&&r[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const lme={data:q9,props:V9,emits:V9,methods:_h,computed:_h,beforeCreate:ii,created:ii,beforeMount:ii,mounted:ii,beforeUpdate:ii,updated:ii,beforeDestroy:ii,beforeUnmount:ii,destroyed:ii,unmounted:ii,activated:ii,deactivated:ii,errorCaptured:ii,serverPrefetch:ii,components:_h,directives:_h,watch:ume,provide:q9,inject:fme};function q9(e,t){return t?e?function(){return xr(bt(e)?e.call(this,this):e,bt(t)?t.call(this,this):t)}:t:e}function fme(e,t){return _h(Lw(e),Lw(t))}function Lw(e){if(mt(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function ii(e,t){return e?[...new Set([].concat(e,t))]:t}function _h(e,t){return e?xr(Object.create(null),e,t):t}function V9(e,t){return e?mt(e)&&mt(t)?[...new Set([...e,...t])]:xr(Object.create(null),$9(e),$9(t??{})):t}function ume(e,t){if(!e)return t;if(!t)return e;const r=xr(Object.create(null),e);for(const n in t)r[n]=ii(e[n],t[n]);return r}function H9(){return{app:null,config:{isNativeTag:IB,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cme=0;function hme(e,t){return function(n,a=null){bt(n)||(n=xr({},n)),a!=null&&!Dt(a)&&(fe.env.NODE_ENV!=="production"&&tt("root props passed to app.mount() must be an object."),a=null);const i=H9();fe.env.NODE_ENV!=="production"&&Object.defineProperty(i.config,"unwrapInjectedRef",{get(){return!0},set(){tt("app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.")}});const o=new Set;let l=!1;const f=i.app={_uid:cme++,_component:n,_props:a,_container:null,_context:i,_instance:null,version:mk,get config(){return i.config},set config(u){fe.env.NODE_ENV!=="production"&&tt("app.config cannot be replaced. Modify individual options instead.")},use(u,...d){return o.has(u)?fe.env.NODE_ENV!=="production"&&tt("Plugin has already been applied to target app."):u&&bt(u.install)?(o.add(u),u.install(f,...d)):bt(u)?(o.add(u),u(f,...d)):fe.env.NODE_ENV!=="production"&&tt('A plugin must either be a function or an object with an "install" function.'),f},mixin(u){return i.mixins.includes(u)?fe.env.NODE_ENV!=="production"&&tt("Mixin has already been applied to target app"+(u.name?`: ${u.name}`:"")):i.mixins.push(u),f},component(u,d){return fe.env.NODE_ENV!=="production"&&jw(u,i.config),d?(fe.env.NODE_ENV!=="production"&&i.components[u]&&tt(`Component "${u}" has already been registered in target app.`),i.components[u]=d,f):i.components[u]},directive(u,d){return fe.env.NODE_ENV!=="production"&&C9(u),d?(fe.env.NODE_ENV!=="production"&&i.directives[u]&&tt(`Directive "${u}" has already been registered in target app.`),i.directives[u]=d,f):i.directives[u]},mount(u,d,m){if(l)fe.env.NODE_ENV!=="production"&&tt("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{fe.env.NODE_ENV!=="production"&&u.__vue_app__&&tt("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const v=ht(n,a);return v.appContext=i,fe.env.NODE_ENV!=="production"&&(i.reload=()=>{e(xa(v),u,m)}),d&&t?t(v,u):e(v,u,m),l=!0,f._container=u,u.__vue_app__=f,fe.env.NODE_ENV!=="production"&&(f._instance=v.component,Ave(f,mk)),xv(v.component)||v.component.proxy}},unmount(){l?(e(null,f._container),fe.env.NODE_ENV!=="production"&&(f._instance=null,Ive(f)),delete f._container.__vue_app__):fe.env.NODE_ENV!=="production"&&tt("Cannot unmount an app that is not mounted.")},provide(u,d){return fe.env.NODE_ENV!=="production"&&u in i.provides&&tt(`App already provides property with key "${String(u)}". It will be overwritten with the new value.`),i.provides[u]=d,f},runWithContext(u){yv=f;try{return u()}finally{yv=null}}};return f}}let yv=null;function un(e,t){if(!gn)fe.env.NODE_ENV!=="production"&&tt("provide() can only be used inside setup().");else{let r=gn.provides;const n=gn.parent&&gn.parent.provides;n===r&&(r=gn.provides=Object.create(n)),r[e]=t}}function At(e,t,r=!1){const n=gn||vn;if(n||yv){const a=n?n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:yv._context.provides;if(a&&e in a)return a[e];if(arguments.length>1)return r&&bt(t)?t.call(n&&n.proxy):t;fe.env.NODE_ENV!=="production"&&tt(`injection "${String(e)}" not found.`)}else fe.env.NODE_ENV!=="production"&&tt("inject() can only be used inside setup() or functional components.")}function dme(e,t,r,n=!1){const a={},i={};jp(i,wv,1),e.propsDefaults=Object.create(null),j9(e,t,a,i);for(const o in e.propsOptions[0])o in a||(a[o]=void 0);fe.env.NODE_ENV!=="production"&&Y9(t||{},a,e),r?e.props=n?a:sve(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function pme(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vme(e,t,r,n){const{props:a,attrs:i,vnode:{patchFlag:o}}=e,l=Tt(a),[f]=e.propsOptions;let u=!1;if(!(fe.env.NODE_ENV!=="production"&&pme(e))&&(n||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let m=0;m<d.length;m++){let v=d[m];if(uv(e.emitsOptions,v))continue;const y=t[v];if(f)if(Kt(i,v))y!==i[v]&&(i[v]=y,u=!0);else{const _=_a(v);a[_]=Dw(f,l,_,y,e,!1)}else y!==i[v]&&(i[v]=y,u=!0)}}}else{j9(e,t,a,i)&&(u=!0);let d;for(const m in l)(!t||!Kt(t,m)&&((d=lo(m))===m||!Kt(t,d)))&&(f?r&&(r[m]!==void 0||r[d]!==void 0)&&(a[m]=Dw(f,l,m,void 0,e,!0)):delete a[m]);if(i!==l)for(const m in i)(!t||!Kt(t,m))&&(delete i[m],u=!0)}u&&fo(e,"set","$attrs"),fe.env.NODE_ENV!=="production"&&Y9(t||{},a,e)}function j9(e,t,r,n){const[a,i]=e.propsOptions;let o=!1,l;if(t)for(let f in t){if(Vp(f))continue;const u=t[f];let d;a&&Kt(a,d=_a(f))?!i||!i.includes(d)?r[d]=u:(l||(l={}))[d]=u:uv(e.emitsOptions,f)||(!(f in n)||u!==n[f])&&(n[f]=u,o=!0)}if(i){const f=Tt(r),u=l||yr;for(let d=0;d<i.length;d++){const m=i[d];r[m]=Dw(a,f,m,u[m],e,!Kt(u,m))}}return o}function Dw(e,t,r,n,a,i){const o=e[r];if(o!=null){const l=Kt(o,"default");if(l&&n===void 0){const f=o.default;if(o.type!==Function&&!o.skipFactory&&bt(f)){const{propsDefaults:u}=a;r in u?n=u[r]:(ku(a),n=u[r]=f.call(null,t),lf())}else n=f}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===lo(r))&&(n=!0))}return n}function K9(e,t,r=!1){const n=t.propsCache,a=n.get(e);if(a)return a;const i=e.props,o={},l=[];let f=!1;if(!bt(e)){const d=m=>{f=!0;const[v,y]=K9(m,t,!0);xr(o,v),y&&l.push(...y)};!r&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!f)return Dt(e)&&n.set(e,Eu),Eu;if(mt(i))for(let d=0;d<i.length;d++){fe.env.NODE_ENV!=="production"&&!Bt(i[d])&&tt("props must be strings when using array syntax.",i[d]);const m=_a(i[d]);W9(m)&&(o[m]=yr)}else if(i){fe.env.NODE_ENV!=="production"&&!Dt(i)&&tt("invalid props options",i);for(const d in i){const m=_a(d);if(W9(m)){const v=i[d],y=o[m]=mt(v)||bt(v)?{type:v}:xr({},v);if(y){const _=Z9(Boolean,y.type),E=Z9(String,y.type);y[0]=_>-1,y[1]=E<0||_<E,(_>-1||Kt(y,"default"))&&l.push(m)}}}}const u=[o,l];return Dt(e)&&n.set(e,u),u}function W9(e){return e[0]!=="$"?!0:(fe.env.NODE_ENV!=="production"&&tt(`Invalid prop name: "${e}" is a reserved property.`),!1)}function $w(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function G9(e,t){return $w(e)===$w(t)}function Z9(e,t){return mt(t)?t.findIndex(r=>G9(r,e)):bt(t)&&G9(t,e)?0:-1}function Y9(e,t,r){const n=Tt(t),a=r.propsOptions[0];for(const i in a){let o=a[i];o!=null&&mme(i,n[i],o,!Kt(e,i)&&!Kt(e,lo(i)))}}function mme(e,t,r,n){const{type:a,required:i,validator:o,skipCheck:l}=r;if(i&&n){tt('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(a!=null&&a!==!0&&!l){let f=!1;const u=mt(a)?a:[a],d=[];for(let m=0;m<u.length&&!f;m++){const{valid:v,expectedType:y}=yme(t,u[m]);d.push(y||""),f=v}if(!f){tt(bme(e,t,d));return}}o&&!o(t)&&tt('Invalid prop: custom validator check failed for prop "'+e+'".')}}const gme=ks("String,Number,Boolean,Function,Symbol,BigInt");function yme(e,t){let r;const n=$w(t);if(gme(n)){const a=typeof e;r=a===n.toLowerCase(),!r&&a==="object"&&(r=e instanceof t)}else n==="Object"?r=Dt(e):n==="Array"?r=mt(e):n==="null"?r=e===null:r=e instanceof t;return{valid:r,expectedType:n}}function bme(e,t,r){let n=`Invalid prop: type check failed for prop "${e}". Expected ${r.map(Wl).join(" | ")}`;const a=r[0],i=xu(t),o=J9(t,a),l=J9(t,i);return r.length===1&&X9(a)&&!_me(a,i)&&(n+=` with value ${o}`),n+=`, got ${i} `,X9(i)&&(n+=`with value ${l}.`),n}function J9(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function X9(e){return["string","number","boolean"].some(r=>e.toLowerCase()===r)}function _me(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Q9=e=>e[0]==="_"||e==="$stable",zw=e=>mt(e)?e.map(Sa):[Sa(e)],wme=(e,t,r)=>{if(t._n)return t;const n=rt((...a)=>(fe.env.NODE_ENV!=="production"&&gn&&tt(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),zw(t(...a))),r);return n._c=!1,n},ek=(e,t,r)=>{const n=e._ctx;for(const a in e){if(Q9(a))continue;const i=e[a];if(bt(i))t[a]=wme(a,i,n);else if(i!=null){fe.env.NODE_ENV!=="production"&&tt(`Non-function value encountered for slot "${a}". Prefer function slots for better performance.`);const o=zw(i);t[a]=()=>o}}},tk=(e,t)=>{fe.env.NODE_ENV!=="production"&&!yh(e.vnode)&&tt("Non-function value encountered for default slot. Prefer function slots for better performance.");const r=zw(t);e.slots.default=()=>r},Eme=(e,t)=>{if(e.vnode.shapeFlag&32){const r=t._;r?(e.slots=Tt(t),jp(t,"_",r)):ek(t,e.slots={})}else e.slots={},t&&tk(e,t);jp(e.slots,wv,1)},xme=(e,t,r)=>{const{vnode:n,slots:a}=e;let i=!0,o=yr;if(n.shapeFlag&32){const l=t._;l?fe.env.NODE_ENV!=="production"&&Ds?(xr(a,t),fo(e,"set","$slots")):r&&l===1?i=!1:(xr(a,t),!r&&l===1&&delete a._):(i=!t.$stable,ek(t,a)),o=t}else t&&(tk(e,t),o={default:1});if(i)for(const l in a)!Q9(l)&&!(l in o)&&delete a[l]};function Uw(e,t,r,n,a=!1){if(mt(e)){e.forEach((v,y)=>Uw(v,t&&(mt(t)?t[y]:t),r,n,a));return}if(gh(n)&&!a)return;const i=n.shapeFlag&4?xv(n.component)||n.component.proxy:n.el,o=a?null:i,{i:l,r:f}=e;if(fe.env.NODE_ENV!=="production"&&!l){tt("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,d=l.refs===yr?l.refs={}:l.refs,m=l.setupState;if(u!=null&&u!==f&&(Bt(u)?(d[u]=null,Kt(m,u)&&(m[u]=null)):hr(u)&&(u.value=null)),bt(f))Ho(f,l,12,[o,d]);else{const v=Bt(f),y=hr(f);if(v||y){const _=()=>{if(e.f){const E=v?Kt(m,f)?m[f]:d[f]:f.value;a?mt(E)&&nw(E,i):mt(E)?E.includes(i)||E.push(i):v?(d[f]=[i],Kt(m,f)&&(m[f]=d[f])):(f.value=[i],e.k&&(d[e.k]=f.value))}else v?(d[f]=o,Kt(m,f)&&(m[f]=o)):y?(f.value=o,e.k&&(d[e.k]=o)):fe.env.NODE_ENV!=="production"&&tt("Invalid template ref type:",f,`(${typeof f})`)};o?(_.id=-1,pi(_,r)):_()}else fe.env.NODE_ENV!=="production"&&tt("Invalid template ref type:",f,`(${typeof f})`)}}let wh,$s;function Ko(e,t){e.appContext.config.performance&&bv()&&$s.mark(`vue-${t}-${e.uid}`),fe.env.NODE_ENV!=="production"&&Ove(e,t,bv()?$s.now():Date.now())}function Wo(e,t){if(e.appContext.config.performance&&bv()){const r=`vue-${t}-${e.uid}`,n=r+":end";$s.mark(n),$s.measure(`<${Sv(e,e.type)}> ${t}`,r,n),$s.clearMarks(r),$s.clearMarks(n)}fe.env.NODE_ENV!=="production"&&Rve(e,t,bv()?$s.now():Date.now())}function bv(){return wh!==void 0||(typeof window<"u"&&window.performance?(wh=!0,$s=window.performance):wh=!1),wh}function Sme(){const e=[];if(fe.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
835
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";tt(`Failed to resolve ${e.slice(0,-1)}: ${t}${l}`)}return o}else fe.env.NODE_ENV!=="production"&&tt(`resolve${Wl(e.slice(0,-1))} can only be used in render() or setup().`)}function R9(e,t){return e&&(e[t]||e[_a(t)]||e[Wl(_a(t))])}function jn(e,t,r,n){let a;const i=r&&r[n];if(mt(e)||Bt(e)){a=new Array(e.length);for(let o=0,l=e.length;o<l;o++)a[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){fe.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&tt(`The v-for range expect an integer value but got ${e}.`),a=new Array(e);for(let o=0;o<e;o++)a[o]=t(o+1,o,void 0,i&&i[o])}else if(Dt(e))if(e[Symbol.iterator])a=Array.from(e,(o,l)=>t(o,l,void 0,i&&i[l]));else{const o=Object.keys(e);a=new Array(o.length);for(let l=0,f=o.length;l<f;l++){const u=o[l];a[l]=t(e[u],u,l,i&&i[l])}}else a=[];return r&&(r[n]=a),a}function kw(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(mt(n))for(let a=0;a<n.length;a++)e[n[a].name]=n[a].fn;else n&&(e[n.name]=n.key?(...a)=>{const i=n.fn(...a);return i&&(i.key=n.key),i}:n.fn)}return e}function Ot(e,t,r={},n,a){if(vn.isCE||vn.parent&&gh(vn.parent)&&vn.parent.isCE)return t!=="default"&&(r.name=t),ht("slot",r,n&&n());let i=e[t];fe.env.NODE_ENV!=="production"&&i&&i.length>1&&(tt("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),i=()=>[]),i&&i._c&&(i._d=!1),me();const o=i&&P9(i(r)),l=et(wt,{key:r.key||o&&o.key||`_${t}`},o||(n?n():[]),o&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function P9(e){return e.some(t=>Ea(t)?!(t.type===mn||t.type===wt&&!P9(t.children)):!0)?e:null}function tme(e,t){const r={};if(fe.env.NODE_ENV!=="production"&&!Dt(e))return tt("v-on with no argument expects an object value."),r;for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:Ns(n)]=e[n];return r}const Nw=e=>e?uk(e)?xv(e)||e.proxy:Nw(e.parent):null,af=xr(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>fe.env.NODE_ENV!=="production"?sh(e.props):e.props,$attrs:e=>fe.env.NODE_ENV!=="production"?sh(e.attrs):e.attrs,$slots:e=>fe.env.NODE_ENV!=="production"?sh(e.slots):e.slots,$refs:e=>fe.env.NODE_ENV!=="production"?sh(e.refs):e.refs,$parent:e=>Nw(e.parent),$root:e=>Nw(e.root),$emit:e=>e.emit,$options:e=>Fw(e),$forceUpdate:e=>e.f||(e.f=()=>fv(e.update)),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>jve.bind(e)}),Ow=e=>e==="_"||e==="$",Rw=(e,t)=>e!==yr&&!e.__isScriptSetup&&Kt(e,t),F9={get({_:e},t){const{ctx:r,setupState:n,data:a,props:i,accessCache:o,type:l,appContext:f}=e;if(fe.env.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return a[t];case 4:return r[t];case 3:return i[t]}else{if(Rw(n,t))return o[t]=1,n[t];if(a!==yr&&Kt(a,t))return o[t]=2,a[t];if((u=e.propsOptions[0])&&Kt(u,t))return o[t]=3,i[t];if(r!==yr&&Kt(r,t))return o[t]=4,r[t];Pw&&(o[t]=0)}}const d=af[t];let m,v;if(d)return t==="$attrs"?(Nn(e,"get",t),fe.env.NODE_ENV!=="production"&&hv()):fe.env.NODE_ENV!=="production"&&t==="$slots"&&Nn(e,"get",t),d(e);if((m=l.__cssModules)&&(m=m[t]))return m;if(r!==yr&&Kt(r,t))return o[t]=4,r[t];if(v=f.config.globalProperties,Kt(v,t))return v[t];fe.env.NODE_ENV!=="production"&&vn&&(!Bt(t)||t.indexOf("__v")!==0)&&(a!==yr&&Ow(t[0])&&Kt(a,t)?tt(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===vn&&tt(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,r){const{data:n,setupState:a,ctx:i}=e;return Rw(a,t)?(a[t]=r,!0):fe.env.NODE_ENV!=="production"&&a.__isScriptSetup&&Kt(a,t)?(tt(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):n!==yr&&Kt(n,t)?(n[t]=r,!0):Kt(e.props,t)?(fe.env.NODE_ENV!=="production"&&tt(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(fe.env.NODE_ENV!=="production"&&tt(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(fe.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:r}):i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:a,propsOptions:i}},o){let l;return!!r[o]||e!==yr&&Kt(e,o)||Rw(t,o)||(l=i[0])&&Kt(l,o)||Kt(n,o)||Kt(af,o)||Kt(a.config.globalProperties,o)},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Kt(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};fe.env.NODE_ENV!=="production"&&(F9.ownKeys=e=>(tt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function rme(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(af).forEach(r=>{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:()=>af[r](e),set:an})}),t}function nme(e){const{ctx:t,propsOptions:[r]}=e;r&&Object.keys(r).forEach(n=>{Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>e.props[n],set:an})})}function ime(e){const{ctx:t,setupState:r}=e;Object.keys(Tt(r)).forEach(n=>{if(!r.__isScriptSetup){if(Ow(n[0])){tt(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r[n],set:an})}})}function mv(){return D9().slots}function L9(){return D9().attrs}function D9(){const e=rn();return fe.env.NODE_ENV!=="production"&&!e&&tt("useContext() called without active instance."),e.setupContext||(e.setupContext=pk(e))}function $9(e){return mt(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function ame(){const e=Object.create(null);return(t,r)=>{e[r]?tt(`${t} property "${r}" is already defined in ${e[r]}.`):e[r]=t}}let Pw=!0;function ome(e){const t=Fw(e),r=e.proxy,n=e.ctx;Pw=!1,t.beforeCreate&&z9(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:o,watch:l,provide:f,inject:u,created:d,beforeMount:m,mounted:v,beforeUpdate:y,updated:_,activated:E,deactivated:C,beforeDestroy:T,beforeUnmount:I,destroyed:k,unmounted:N,render:O,renderTracked:P,renderTriggered:z,errorCaptured:V,serverPrefetch:L,expose:U,inheritAttrs:M,components:s,directives:h,filters:p}=t,g=fe.env.NODE_ENV!=="production"?ame():null;if(fe.env.NODE_ENV!=="production"){const[w]=e.propsOptions;if(w)for(const A in w)g("Props",A)}if(u&&sme(u,n,g),o)for(const w in o){const A=o[w];bt(A)?(fe.env.NODE_ENV!=="production"?Object.defineProperty(n,w,{value:A.bind(r),configurable:!0,enumerable:!0,writable:!0}):n[w]=A.bind(r),fe.env.NODE_ENV!=="production"&&g("Methods",w)):fe.env.NODE_ENV!=="production"&&tt(`Method "${w}" has type "${typeof A}" in the component definition. Did you reference the function correctly?`)}if(a){fe.env.NODE_ENV!=="production"&&!bt(a)&&tt("The data option must be a function. Plain object usage is no longer supported.");const w=a.call(r,r);if(fe.env.NODE_ENV!=="production"&&aw(w)&&tt("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Dt(w))fe.env.NODE_ENV!=="production"&&tt("data() should return an object.");else if(e.data=Vn(w),fe.env.NODE_ENV!=="production")for(const A in w)g("Data",A),Ow(A[0])||Object.defineProperty(n,A,{configurable:!0,enumerable:!0,get:()=>w[A],set:an})}if(Pw=!0,i)for(const w in i){const A=i[w],x=bt(A)?A.bind(r,r):bt(A.get)?A.get.bind(r,r):an;fe.env.NODE_ENV!=="production"&&x===an&&tt(`Computed property "${w}" has no getter.`);const c=!bt(A)&&bt(A.set)?A.set.bind(r):fe.env.NODE_ENV!=="production"?()=>{tt(`Write operation failed: computed property "${w}" is readonly.`)}:an,S=Ee({get:x,set:c});Object.defineProperty(n,w,{enumerable:!0,configurable:!0,get:()=>S.value,set:B=>S.value=B}),fe.env.NODE_ENV!=="production"&&g("Computed",w)}if(l)for(const w in l)U9(l[w],n,r,w);if(f){const w=bt(f)?f.call(r):f;Reflect.ownKeys(w).forEach(A=>{un(A,w[A])})}d&&z9(d,e,"c");function b(w,A){mt(A)?A.forEach(x=>w(x.bind(r))):A&&w(A.bind(r))}if(b(Aw,m),b(ir,v),b(Zve,y),b(Au,_),b(Wve,E),b(k9,C),b(Qve,V),b(Xve,P),b(Jve,z),b(fn,I),b(bh,N),b(Yve,L),mt(U))if(U.length){const w=e.exposed||(e.exposed={});U.forEach(A=>{Object.defineProperty(w,A,{get:()=>r[A],set:x=>r[A]=x})})}else e.exposed||(e.exposed={});O&&e.render===an&&(e.render=O),M!=null&&(e.inheritAttrs=M),s&&(e.components=s),h&&(e.directives=h)}function sme(e,t,r=an){mt(e)&&(e=Lw(e));for(const n in e){const a=e[n];let i;Dt(a)?"default"in a?i=At(a.from||n,a.default,!0):i=At(a.from||n):i=At(a),hr(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i,fe.env.NODE_ENV!=="production"&&r("Inject",n)}}function z9(e,t,r){na(mt(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function U9(e,t,r,n){const a=n.includes(".")?M9(r,n):()=>r[n];if(Bt(e)){const i=t[e];bt(i)?ut(a,i):fe.env.NODE_ENV!=="production"&&tt(`Invalid watch handler specified by key "${e}"`,i)}else if(bt(e))ut(a,e.bind(r));else if(Dt(e))if(mt(e))e.forEach(i=>U9(i,t,r,n));else{const i=bt(e.handler)?e.handler.bind(r):t[e.handler];bt(i)?ut(a,i,e):fe.env.NODE_ENV!=="production"&&tt(`Invalid watch handler specified by key "${e.handler}"`,i)}else fe.env.NODE_ENV!=="production"&&tt(`Invalid watch option: "${n}"`,e)}function Fw(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let f;return l?f=l:!a.length&&!r&&!n?f=t:(f={},a.length&&a.forEach(u=>gv(f,u,o,!0)),gv(f,t,o)),Dt(t)&&i.set(t,f),f}function gv(e,t,r,n=!1){const{mixins:a,extends:i}=t;i&&gv(e,i,r,!0),a&&a.forEach(o=>gv(e,o,r,!0));for(const o in t)if(n&&o==="expose")fe.env.NODE_ENV!=="production"&&tt('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const l=lme[o]||r&&r[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const lme={data:q9,props:V9,emits:V9,methods:_h,computed:_h,beforeCreate:ii,created:ii,beforeMount:ii,mounted:ii,beforeUpdate:ii,updated:ii,beforeDestroy:ii,beforeUnmount:ii,destroyed:ii,unmounted:ii,activated:ii,deactivated:ii,errorCaptured:ii,serverPrefetch:ii,components:_h,directives:_h,watch:ume,provide:q9,inject:fme};function q9(e,t){return t?e?function(){return xr(bt(e)?e.call(this,this):e,bt(t)?t.call(this,this):t)}:t:e}function fme(e,t){return _h(Lw(e),Lw(t))}function Lw(e){if(mt(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function ii(e,t){return e?[...new Set([].concat(e,t))]:t}function _h(e,t){return e?xr(Object.create(null),e,t):t}function V9(e,t){return e?mt(e)&&mt(t)?[...new Set([...e,...t])]:xr(Object.create(null),$9(e),$9(t??{})):t}function ume(e,t){if(!e)return t;if(!t)return e;const r=xr(Object.create(null),e);for(const n in t)r[n]=ii(e[n],t[n]);return r}function H9(){return{app:null,config:{isNativeTag:IB,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cme=0;function hme(e,t){return function(n,a=null){bt(n)||(n=xr({},n)),a!=null&&!Dt(a)&&(fe.env.NODE_ENV!=="production"&&tt("root props passed to app.mount() must be an object."),a=null);const i=H9();fe.env.NODE_ENV!=="production"&&Object.defineProperty(i.config,"unwrapInjectedRef",{get(){return!0},set(){tt("app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.")}});const o=new Set;let l=!1;const f=i.app={_uid:cme++,_component:n,_props:a,_container:null,_context:i,_instance:null,version:mk,get config(){return i.config},set config(u){fe.env.NODE_ENV!=="production"&&tt("app.config cannot be replaced. Modify individual options instead.")},use(u,...d){return o.has(u)?fe.env.NODE_ENV!=="production"&&tt("Plugin has already been applied to target app."):u&&bt(u.install)?(o.add(u),u.install(f,...d)):bt(u)?(o.add(u),u(f,...d)):fe.env.NODE_ENV!=="production"&&tt('A plugin must either be a function or an object with an "install" function.'),f},mixin(u){return i.mixins.includes(u)?fe.env.NODE_ENV!=="production"&&tt("Mixin has already been applied to target app"+(u.name?`: ${u.name}`:"")):i.mixins.push(u),f},component(u,d){return fe.env.NODE_ENV!=="production"&&jw(u,i.config),d?(fe.env.NODE_ENV!=="production"&&i.components[u]&&tt(`Component "${u}" has already been registered in target app.`),i.components[u]=d,f):i.components[u]},directive(u,d){return fe.env.NODE_ENV!=="production"&&C9(u),d?(fe.env.NODE_ENV!=="production"&&i.directives[u]&&tt(`Directive "${u}" has already been registered in target app.`),i.directives[u]=d,f):i.directives[u]},mount(u,d,m){if(l)fe.env.NODE_ENV!=="production"&&tt("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{fe.env.NODE_ENV!=="production"&&u.__vue_app__&&tt("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const v=ht(n,a);return v.appContext=i,fe.env.NODE_ENV!=="production"&&(i.reload=()=>{e(xa(v),u,m)}),d&&t?t(v,u):e(v,u,m),l=!0,f._container=u,u.__vue_app__=f,fe.env.NODE_ENV!=="production"&&(f._instance=v.component,Ave(f,mk)),xv(v.component)||v.component.proxy}},unmount(){l?(e(null,f._container),fe.env.NODE_ENV!=="production"&&(f._instance=null,Ive(f)),delete f._container.__vue_app__):fe.env.NODE_ENV!=="production"&&tt("Cannot unmount an app that is not mounted.")},provide(u,d){return fe.env.NODE_ENV!=="production"&&u in i.provides&&tt(`App already provides property with key "${String(u)}". It will be overwritten with the new value.`),i.provides[u]=d,f},runWithContext(u){yv=f;try{return u()}finally{yv=null}}};return f}}let yv=null;function un(e,t){if(!gn)fe.env.NODE_ENV!=="production"&&tt("provide() can only be used inside setup().");else{let r=gn.provides;const n=gn.parent&&gn.parent.provides;n===r&&(r=gn.provides=Object.create(n)),r[e]=t}}function At(e,t,r=!1){const n=gn||vn;if(n||yv){const a=n?n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:yv._context.provides;if(a&&e in a)return a[e];if(arguments.length>1)return r&&bt(t)?t.call(n&&n.proxy):t;fe.env.NODE_ENV!=="production"&&tt(`injection "${String(e)}" not found.`)}else fe.env.NODE_ENV!=="production"&&tt("inject() can only be used inside setup() or functional components.")}function dme(e,t,r,n=!1){const a={},i={};jp(i,wv,1),e.propsDefaults=Object.create(null),j9(e,t,a,i);for(const o in e.propsOptions[0])o in a||(a[o]=void 0);fe.env.NODE_ENV!=="production"&&Y9(t||{},a,e),r?e.props=n?a:sve(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function pme(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vme(e,t,r,n){const{props:a,attrs:i,vnode:{patchFlag:o}}=e,l=Tt(a),[f]=e.propsOptions;let u=!1;if(!(fe.env.NODE_ENV!=="production"&&pme(e))&&(n||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let m=0;m<d.length;m++){let v=d[m];if(uv(e.emitsOptions,v))continue;const y=t[v];if(f)if(Kt(i,v))y!==i[v]&&(i[v]=y,u=!0);else{const _=_a(v);a[_]=Dw(f,l,_,y,e,!1)}else y!==i[v]&&(i[v]=y,u=!0)}}}else{j9(e,t,a,i)&&(u=!0);let d;for(const m in l)(!t||!Kt(t,m)&&((d=lo(m))===m||!Kt(t,d)))&&(f?r&&(r[m]!==void 0||r[d]!==void 0)&&(a[m]=Dw(f,l,m,void 0,e,!0)):delete a[m]);if(i!==l)for(const m in i)(!t||!Kt(t,m))&&(delete i[m],u=!0)}u&&fo(e,"set","$attrs"),fe.env.NODE_ENV!=="production"&&Y9(t||{},a,e)}function j9(e,t,r,n){const[a,i]=e.propsOptions;let o=!1,l;if(t)for(let f in t){if(Vp(f))continue;const u=t[f];let d;a&&Kt(a,d=_a(f))?!i||!i.includes(d)?r[d]=u:(l||(l={}))[d]=u:uv(e.emitsOptions,f)||(!(f in n)||u!==n[f])&&(n[f]=u,o=!0)}if(i){const f=Tt(r),u=l||yr;for(let d=0;d<i.length;d++){const m=i[d];r[m]=Dw(a,f,m,u[m],e,!Kt(u,m))}}return o}function Dw(e,t,r,n,a,i){const o=e[r];if(o!=null){const l=Kt(o,"default");if(l&&n===void 0){const f=o.default;if(o.type!==Function&&!o.skipFactory&&bt(f)){const{propsDefaults:u}=a;r in u?n=u[r]:(ku(a),n=u[r]=f.call(null,t),lf())}else n=f}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===lo(r))&&(n=!0))}return n}function K9(e,t,r=!1){const n=t.propsCache,a=n.get(e);if(a)return a;const i=e.props,o={},l=[];let f=!1;if(!bt(e)){const d=m=>{f=!0;const[v,y]=K9(m,t,!0);xr(o,v),y&&l.push(...y)};!r&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!f)return Dt(e)&&n.set(e,Eu),Eu;if(mt(i))for(let d=0;d<i.length;d++){fe.env.NODE_ENV!=="production"&&!Bt(i[d])&&tt("props must be strings when using array syntax.",i[d]);const m=_a(i[d]);W9(m)&&(o[m]=yr)}else if(i){fe.env.NODE_ENV!=="production"&&!Dt(i)&&tt("invalid props options",i);for(const d in i){const m=_a(d);if(W9(m)){const v=i[d],y=o[m]=mt(v)||bt(v)?{type:v}:xr({},v);if(y){const _=Z9(Boolean,y.type),E=Z9(String,y.type);y[0]=_>-1,y[1]=E<0||_<E,(_>-1||Kt(y,"default"))&&l.push(m)}}}}const u=[o,l];return Dt(e)&&n.set(e,u),u}function W9(e){return e[0]!=="$"?!0:(fe.env.NODE_ENV!=="production"&&tt(`Invalid prop name: "${e}" is a reserved property.`),!1)}function $w(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function G9(e,t){return $w(e)===$w(t)}function Z9(e,t){return mt(t)?t.findIndex(r=>G9(r,e)):bt(t)&&G9(t,e)?0:-1}function Y9(e,t,r){const n=Tt(t),a=r.propsOptions[0];for(const i in a){let o=a[i];o!=null&&mme(i,n[i],o,!Kt(e,i)&&!Kt(e,lo(i)))}}function mme(e,t,r,n){const{type:a,required:i,validator:o,skipCheck:l}=r;if(i&&n){tt('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(a!=null&&a!==!0&&!l){let f=!1;const u=mt(a)?a:[a],d=[];for(let m=0;m<u.length&&!f;m++){const{valid:v,expectedType:y}=yme(t,u[m]);d.push(y||""),f=v}if(!f){tt(bme(e,t,d));return}}o&&!o(t)&&tt('Invalid prop: custom validator check failed for prop "'+e+'".')}}const gme=ks("String,Number,Boolean,Function,Symbol,BigInt");function yme(e,t){let r;const n=$w(t);if(gme(n)){const a=typeof e;r=a===n.toLowerCase(),!r&&a==="object"&&(r=e instanceof t)}else n==="Object"?r=Dt(e):n==="Array"?r=mt(e):n==="null"?r=e===null:r=e instanceof t;return{valid:r,expectedType:n}}function bme(e,t,r){let n=`Invalid prop: type check failed for prop "${e}". Expected ${r.map(Wl).join(" | ")}`;const a=r[0],i=xu(t),o=J9(t,a),l=J9(t,i);return r.length===1&&X9(a)&&!_me(a,i)&&(n+=` with value ${o}`),n+=`, got ${i} `,X9(i)&&(n+=`with value ${l}.`),n}function J9(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function X9(e){return["string","number","boolean"].some(r=>e.toLowerCase()===r)}function _me(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Q9=e=>e[0]==="_"||e==="$stable",zw=e=>mt(e)?e.map(Sa):[Sa(e)],wme=(e,t,r)=>{if(t._n)return t;const n=rt((...a)=>(fe.env.NODE_ENV!=="production"&&gn&&tt(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),zw(t(...a))),r);return n._c=!1,n},ek=(e,t,r)=>{const n=e._ctx;for(const a in e){if(Q9(a))continue;const i=e[a];if(bt(i))t[a]=wme(a,i,n);else if(i!=null){fe.env.NODE_ENV!=="production"&&tt(`Non-function value encountered for slot "${a}". Prefer function slots for better performance.`);const o=zw(i);t[a]=()=>o}}},tk=(e,t)=>{fe.env.NODE_ENV!=="production"&&!yh(e.vnode)&&tt("Non-function value encountered for default slot. Prefer function slots for better performance.");const r=zw(t);e.slots.default=()=>r},Eme=(e,t)=>{if(e.vnode.shapeFlag&32){const r=t._;r?(e.slots=Tt(t),jp(t,"_",r)):ek(t,e.slots={})}else e.slots={},t&&tk(e,t);jp(e.slots,wv,1)},xme=(e,t,r)=>{const{vnode:n,slots:a}=e;let i=!0,o=yr;if(n.shapeFlag&32){const l=t._;l?fe.env.NODE_ENV!=="production"&&Ds?(xr(a,t),fo(e,"set","$slots")):r&&l===1?i=!1:(xr(a,t),!r&&l===1&&delete a._):(i=!t.$stable,ek(t,a)),o=t}else t&&(tk(e,t),o={default:1});if(i)for(const l in a)!Q9(l)&&!(l in o)&&delete a[l]};function Uw(e,t,r,n,a=!1){if(mt(e)){e.forEach((v,y)=>Uw(v,t&&(mt(t)?t[y]:t),r,n,a));return}if(gh(n)&&!a)return;const i=n.shapeFlag&4?xv(n.component)||n.component.proxy:n.el,o=a?null:i,{i:l,r:f}=e;if(fe.env.NODE_ENV!=="production"&&!l){tt("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,d=l.refs===yr?l.refs={}:l.refs,m=l.setupState;if(u!=null&&u!==f&&(Bt(u)?(d[u]=null,Kt(m,u)&&(m[u]=null)):hr(u)&&(u.value=null)),bt(f))Ho(f,l,12,[o,d]);else{const v=Bt(f),y=hr(f);if(v||y){const _=()=>{if(e.f){const E=v?Kt(m,f)?m[f]:d[f]:f.value;a?mt(E)&&nw(E,i):mt(E)?E.includes(i)||E.push(i):v?(d[f]=[i],Kt(m,f)&&(m[f]=d[f])):(f.value=[i],e.k&&(d[e.k]=f.value))}else v?(d[f]=o,Kt(m,f)&&(m[f]=o)):y?(f.value=o,e.k&&(d[e.k]=o)):fe.env.NODE_ENV!=="production"&&tt("Invalid template ref type:",f,`(${typeof f})`)};o?(_.id=-1,pi(_,r)):_()}else fe.env.NODE_ENV!=="production"&&tt("Invalid template ref type:",f,`(${typeof f})`)}}let wh,$s;function Ko(e,t){e.appContext.config.performance&&bv()&&$s.mark(`vue-${t}-${e.uid}`),fe.env.NODE_ENV!=="production"&&Ove(e,t,bv()?$s.now():Date.now())}function Wo(e,t){if(e.appContext.config.performance&&bv()){const r=`vue-${t}-${e.uid}`,n=r+":end";$s.mark(n),$s.measure(`<${Sv(e,e.type)}> ${t}`,r,n),$s.clearMarks(r),$s.clearMarks(n)}fe.env.NODE_ENV!=="production"&&Rve(e,t,bv()?$s.now():Date.now())}function bv(){return wh!==void 0||(typeof window<"u"&&window.performance?(wh=!0,$s=window.performance):wh=!1),wh}function Sme(){const e=[];if(fe.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
836
836
 
837
- For more details, see https://link.vuejs.org/feature-flags.`)}}const pi=Vve;function Mme(e){return Cme(e)}function Cme(e,t){Sme();const r=Kp();r.__VUE__=!0,fe.env.NODE_ENV!=="production"&&g9(r.__VUE_DEVTOOLS_GLOBAL_HOOK__,r);const{insert:n,remove:a,patchProp:i,createElement:o,createText:l,createComment:f,setText:u,setElementText:d,parentNode:m,nextSibling:v,setScopeId:y=an,insertStaticContent:_}=e,E=(j,ae,se,q=null,D=null,F=null,$=!1,re=null,Q=fe.env.NODE_ENV!=="production"&&Ds?!1:!!ae.dynamicChildren)=>{if(j===ae)return;j&&!sf(j,ae)&&(q=ue(j),R(j,D,F,!0),j=null),ae.patchFlag===-2&&(Q=!1,ae.dynamicChildren=null);const{type:te,ref:le,shapeFlag:Z}=ae;switch(te){case zs:C(j,ae,se,q);break;case mn:T(j,ae,se,q);break;case xh:j==null?I(ae,se,q,$):fe.env.NODE_ENV!=="production"&&k(j,ae,se,$);break;case wt:h(j,ae,se,q,D,F,$,re,Q);break;default:Z&1?P(j,ae,se,q,D,F,$,re,Q):Z&6?p(j,ae,se,q,D,F,$,re,Q):Z&64||Z&128?te.process(j,ae,se,q,D,F,$,re,Q,ce):fe.env.NODE_ENV!=="production"&&tt("Invalid VNode type:",te,`(${typeof te})`)}le!=null&&D&&Uw(le,j&&j.ref,F,ae||j,!ae)},C=(j,ae,se,q)=>{if(j==null)n(ae.el=l(ae.children),se,q);else{const D=ae.el=j.el;ae.children!==j.children&&u(D,ae.children)}},T=(j,ae,se,q)=>{j==null?n(ae.el=f(ae.children||""),se,q):ae.el=j.el},I=(j,ae,se,q)=>{[j.el,j.anchor]=_(j.children,ae,se,q,j.el,j.anchor)},k=(j,ae,se,q)=>{if(ae.children!==j.children){const D=v(j.anchor);O(j),[ae.el,ae.anchor]=_(ae.children,se,D,q)}else ae.el=j.el,ae.anchor=j.anchor},N=({el:j,anchor:ae},se,q)=>{let D;for(;j&&j!==ae;)D=v(j),n(j,se,q),j=D;n(ae,se,q)},O=({el:j,anchor:ae})=>{let se;for(;j&&j!==ae;)se=v(j),a(j),j=se;a(ae)},P=(j,ae,se,q,D,F,$,re,Q)=>{$=$||ae.type==="svg",j==null?z(ae,se,q,D,F,$,re,Q):U(j,ae,D,F,$,re,Q)},z=(j,ae,se,q,D,F,$,re)=>{let Q,te;const{type:le,props:Z,shapeFlag:K,transition:pe,dirs:ie}=j;if(Q=j.el=o(j.type,F,Z&&Z.is,Z),K&8?d(Q,j.children):K&16&&L(j.children,Q,null,q,D,F&&le!=="foreignObject",$,re),ie&&nf(j,null,q,"created"),V(Q,j,j.scopeId,$,q),Z){for(const Ye in Z)Ye!=="value"&&!Vp(Ye)&&i(Q,Ye,null,Z[Ye],F,j.children,q,D,Y);"value"in Z&&i(Q,"value",null,Z.value),(te=Z.onVnodeBeforeMount)&&vo(te,q,j)}fe.env.NODE_ENV!=="production"&&(Object.defineProperty(Q,"__vnode",{value:j,enumerable:!1}),Object.defineProperty(Q,"__vueParentComponent",{value:q,enumerable:!1})),ie&&nf(j,null,q,"beforeMount");const ve=(!D||D&&!D.pendingBranch)&&pe&&!pe.persisted;ve&&pe.beforeEnter(Q),n(Q,ae,se),((te=Z&&Z.onVnodeMounted)||ve||ie)&&pi(()=>{te&&vo(te,q,j),ve&&pe.enter(Q),ie&&nf(j,null,q,"mounted")},D)},V=(j,ae,se,q,D)=>{if(se&&y(j,se),q)for(let F=0;F<q.length;F++)y(j,q[F]);if(D){let F=D.subTree;if(fe.env.NODE_ENV!=="production"&&F.patchFlag>0&&F.patchFlag&2048&&(F=E9(F.children)||F),ae===F){const $=D.vnode;V(j,$,$.scopeId,$.slotScopeIds,D.parent)}}},L=(j,ae,se,q,D,F,$,re,Q=0)=>{for(let te=Q;te<j.length;te++){const le=j[te]=re?Us(j[te]):Sa(j[te]);E(null,le,ae,se,q,D,F,$,re)}},U=(j,ae,se,q,D,F,$)=>{const re=ae.el=j.el;let{patchFlag:Q,dynamicChildren:te,dirs:le}=ae;Q|=j.patchFlag&16;const Z=j.props||yr,K=ae.props||yr;let pe;se&&of(se,!1),(pe=K.onVnodeBeforeUpdate)&&vo(pe,se,ae,j),le&&nf(ae,j,se,"beforeUpdate"),se&&of(se,!0),fe.env.NODE_ENV!=="production"&&Ds&&(Q=0,$=!1,te=null);const ie=D&&ae.type!=="foreignObject";if(te?(M(j.dynamicChildren,te,re,se,q,ie,F),fe.env.NODE_ENV!=="production"&&Eh(j,ae)):$||x(j,ae,re,null,se,q,ie,F,!1),Q>0){if(Q&16)s(re,ae,Z,K,se,q,D);else if(Q&2&&Z.class!==K.class&&i(re,"class",null,K.class,D),Q&4&&i(re,"style",Z.style,K.style,D),Q&8){const ve=ae.dynamicProps;for(let Ye=0;Ye<ve.length;Ye++){const Se=ve[Ye],Ce=Z[Se],Je=K[Se];(Je!==Ce||Se==="value")&&i(re,Se,Ce,Je,D,j.children,se,q,Y)}}Q&1&&j.children!==ae.children&&d(re,ae.children)}else!$&&te==null&&s(re,ae,Z,K,se,q,D);((pe=K.onVnodeUpdated)||le)&&pi(()=>{pe&&vo(pe,se,ae,j),le&&nf(ae,j,se,"updated")},q)},M=(j,ae,se,q,D,F,$)=>{for(let re=0;re<ae.length;re++){const Q=j[re],te=ae[re],le=Q.el&&(Q.type===wt||!sf(Q,te)||Q.shapeFlag&70)?m(Q.el):se;E(Q,te,le,null,q,D,F,$,!0)}},s=(j,ae,se,q,D,F,$)=>{if(se!==q){if(se!==yr)for(const re in se)!Vp(re)&&!(re in q)&&i(j,re,se[re],null,$,ae.children,D,F,Y);for(const re in q){if(Vp(re))continue;const Q=q[re],te=se[re];Q!==te&&re!=="value"&&i(j,re,te,Q,$,ae.children,D,F,Y)}"value"in q&&i(j,"value",se.value,q.value)}},h=(j,ae,se,q,D,F,$,re,Q)=>{const te=ae.el=j?j.el:l(""),le=ae.anchor=j?j.anchor:l("");let{patchFlag:Z,dynamicChildren:K,slotScopeIds:pe}=ae;fe.env.NODE_ENV!=="production"&&(Ds||Z&2048)&&(Z=0,Q=!1,K=null),pe&&(re=re?re.concat(pe):pe),j==null?(n(te,se,q),n(le,se,q),L(ae.children,se,le,D,F,$,re,Q)):Z>0&&Z&64&&K&&j.dynamicChildren?(M(j.dynamicChildren,K,se,D,F,$,re),fe.env.NODE_ENV!=="production"?Eh(j,ae):(ae.key!=null||D&&ae===D.subTree)&&Eh(j,ae,!0)):x(j,ae,se,le,D,F,$,re,Q)},p=(j,ae,se,q,D,F,$,re,Q)=>{ae.slotScopeIds=re,j==null?ae.shapeFlag&512?D.ctx.activate(ae,se,q,$,Q):g(ae,se,q,D,F,$,Q):b(j,ae,Q)},g=(j,ae,se,q,D,F,$)=>{const re=j.component=Dme(j,q,D);if(fe.env.NODE_ENV!=="production"&&re.type.__hmrId&&Sve(re),fe.env.NODE_ENV!=="production"&&(ov(j),Ko(re,"mount")),yh(j)&&(re.ctx.renderer=ce),fe.env.NODE_ENV!=="production"&&Ko(re,"init"),zme(re),fe.env.NODE_ENV!=="production"&&Wo(re,"init"),re.asyncDep){if(D&&D.registerDep(re,w),!j.el){const Q=re.subTree=ht(mn);T(null,Q,ae,se)}return}w(re,j,ae,se,D,F,$),fe.env.NODE_ENV!=="production"&&(sv(),Wo(re,"mount"))},b=(j,ae,se)=>{const q=ae.component=j.component;if(zve(j,ae,se))if(q.asyncDep&&!q.asyncResolved){fe.env.NODE_ENV!=="production"&&ov(ae),A(q,ae,se),fe.env.NODE_ENV!=="production"&&sv();return}else q.next=ae,Eve(q.update),q.update();else ae.el=j.el,q.vnode=ae},w=(j,ae,se,q,D,F,$)=>{const re=()=>{if(j.isMounted){let{next:le,bu:Z,u:K,parent:pe,vnode:ie}=j,ve=le,Ye;fe.env.NODE_ENV!=="production"&&ov(le||j.vnode),of(j,!1),le?(le.el=ie.el,A(j,le,$)):le=ie,Z&&Su(Z),(Ye=le.props&&le.props.onVnodeBeforeUpdate)&&vo(Ye,pe,le,ie),of(j,!0),fe.env.NODE_ENV!=="production"&&Ko(j,"render");const Se=Sw(j);fe.env.NODE_ENV!=="production"&&Wo(j,"render");const Ce=j.subTree;j.subTree=Se,fe.env.NODE_ENV!=="production"&&Ko(j,"patch"),E(Ce,Se,m(Ce.el),ue(Ce),j,D,F),fe.env.NODE_ENV!=="production"&&Wo(j,"patch"),le.el=Se.el,ve===null&&Uve(j,Se.el),K&&pi(K,D),(Ye=le.props&&le.props.onVnodeUpdated)&&pi(()=>vo(Ye,pe,le,ie),D),fe.env.NODE_ENV!=="production"&&y9(j),fe.env.NODE_ENV!=="production"&&sv()}else{let le;const{el:Z,props:K}=ae,{bm:pe,m:ie,parent:ve}=j,Ye=gh(ae);if(of(j,!1),pe&&Su(pe),!Ye&&(le=K&&K.onVnodeBeforeMount)&&vo(le,ve,ae),of(j,!0),Z&&J){const Se=()=>{fe.env.NODE_ENV!=="production"&&Ko(j,"render"),j.subTree=Sw(j),fe.env.NODE_ENV!=="production"&&Wo(j,"render"),fe.env.NODE_ENV!=="production"&&Ko(j,"hydrate"),J(Z,j.subTree,j,D,null),fe.env.NODE_ENV!=="production"&&Wo(j,"hydrate")};Ye?ae.type.__asyncLoader().then(()=>!j.isUnmounted&&Se()):Se()}else{fe.env.NODE_ENV!=="production"&&Ko(j,"render");const Se=j.subTree=Sw(j);fe.env.NODE_ENV!=="production"&&Wo(j,"render"),fe.env.NODE_ENV!=="production"&&Ko(j,"patch"),E(null,Se,se,q,j,D,F),fe.env.NODE_ENV!=="production"&&Wo(j,"patch"),ae.el=Se.el}if(ie&&pi(ie,D),!Ye&&(le=K&&K.onVnodeMounted)){const Se=ae;pi(()=>vo(le,ve,Se),D)}(ae.shapeFlag&256||ve&&gh(ve.vnode)&&ve.vnode.shapeFlag&256)&&j.a&&pi(j.a,D),j.isMounted=!0,fe.env.NODE_ENV!=="production"&&Bve(j),ae=se=q=null}},Q=j.effect=new uw(re,()=>fv(te),j.scope),te=j.update=()=>Q.run();te.id=j.uid,of(j,!0),fe.env.NODE_ENV!=="production"&&(Q.onTrack=j.rtc?le=>Su(j.rtc,le):void 0,Q.onTrigger=j.rtg?le=>Su(j.rtg,le):void 0,te.ownerInstance=j),te()},A=(j,ae,se)=>{ae.component=j;const q=j.vnode.props;j.vnode=ae,j.next=null,vme(j,ae.props,q,se),xme(j,ae.children,se),Zl(),h9(),Yl()},x=(j,ae,se,q,D,F,$,re,Q=!1)=>{const te=j&&j.children,le=j?j.shapeFlag:0,Z=ae.children,{patchFlag:K,shapeFlag:pe}=ae;if(K>0){if(K&128){S(te,Z,se,q,D,F,$,re,Q);return}else if(K&256){c(te,Z,se,q,D,F,$,re,Q);return}}pe&8?(le&16&&Y(te,D,F),Z!==te&&d(se,Z)):le&16?pe&16?S(te,Z,se,q,D,F,$,re,Q):Y(te,D,F,!0):(le&8&&d(se,""),pe&16&&L(Z,se,q,D,F,$,re,Q))},c=(j,ae,se,q,D,F,$,re,Q)=>{j=j||Eu,ae=ae||Eu;const te=j.length,le=ae.length,Z=Math.min(te,le);let K;for(K=0;K<Z;K++){const pe=ae[K]=Q?Us(ae[K]):Sa(ae[K]);E(j[K],pe,se,null,D,F,$,re,Q)}te>le?Y(j,D,F,!0,!1,Z):L(ae,se,q,D,F,$,re,Q,Z)},S=(j,ae,se,q,D,F,$,re,Q)=>{let te=0;const le=ae.length;let Z=j.length-1,K=le-1;for(;te<=Z&&te<=K;){const pe=j[te],ie=ae[te]=Q?Us(ae[te]):Sa(ae[te]);if(sf(pe,ie))E(pe,ie,se,null,D,F,$,re,Q);else break;te++}for(;te<=Z&&te<=K;){const pe=j[Z],ie=ae[K]=Q?Us(ae[K]):Sa(ae[K]);if(sf(pe,ie))E(pe,ie,se,null,D,F,$,re,Q);else break;Z--,K--}if(te>Z){if(te<=K){const pe=K+1,ie=pe<le?ae[pe].el:q;for(;te<=K;)E(null,ae[te]=Q?Us(ae[te]):Sa(ae[te]),se,ie,D,F,$,re,Q),te++}}else if(te>K)for(;te<=Z;)R(j[te],D,F,!0),te++;else{const pe=te,ie=te,ve=new Map;for(te=ie;te<=K;te++){const we=ae[te]=Q?Us(ae[te]):Sa(ae[te]);we.key!=null&&(fe.env.NODE_ENV!=="production"&&ve.has(we.key)&&tt("Duplicate keys found during update:",JSON.stringify(we.key),"Make sure keys are unique."),ve.set(we.key,te))}let Ye,Se=0;const Ce=K-ie+1;let Je=!1,he=0;const be=new Array(Ce);for(te=0;te<Ce;te++)be[te]=0;for(te=pe;te<=Z;te++){const we=j[te];if(Se>=Ce){R(we,D,F,!0);continue}let Be;if(we.key!=null)Be=ve.get(we.key);else for(Ye=ie;Ye<=K;Ye++)if(be[Ye-ie]===0&&sf(we,ae[Ye])){Be=Ye;break}Be===void 0?R(we,D,F,!0):(be[Be-ie]=te+1,Be>=he?he=Be:Je=!0,E(we,ae[Be],se,null,D,F,$,re,Q),Se++)}const it=Je?Tme(be):Eu;for(Ye=it.length-1,te=Ce-1;te>=0;te--){const we=ie+te,Be=ae[we],gt=we+1<le?ae[we+1].el:q;be[te]===0?E(null,Be,se,gt,D,F,$,re,Q):Je&&(Ye<0||te!==it[Ye]?B(Be,se,gt,2):Ye--)}}},B=(j,ae,se,q,D=null)=>{const{el:F,type:$,transition:re,children:Q,shapeFlag:te}=j;if(te&6){B(j.component.subTree,ae,se,q);return}if(te&128){j.suspense.move(ae,se,q);return}if(te&64){$.move(j,ae,se,ce);return}if($===wt){n(F,ae,se);for(let Z=0;Z<Q.length;Z++)B(Q[Z],ae,se,q);n(j.anchor,ae,se);return}if($===xh){N(j,ae,se);return}if(q!==2&&te&1&&re)if(q===0)re.beforeEnter(F),n(F,ae,se),pi(()=>re.enter(F),D);else{const{leave:Z,delayLeave:K,afterLeave:pe}=re,ie=()=>n(F,ae,se),ve=()=>{Z(F,()=>{ie(),pe&&pe()})};K?K(F,ie,ve):ve()}else n(F,ae,se)},R=(j,ae,se,q=!1,D=!1)=>{const{type:F,props:$,ref:re,children:Q,dynamicChildren:te,shapeFlag:le,patchFlag:Z,dirs:K}=j;if(re!=null&&Uw(re,null,se,j,!0),le&256){ae.ctx.deactivate(j);return}const pe=le&1&&K,ie=!gh(j);let ve;if(ie&&(ve=$&&$.onVnodeBeforeUnmount)&&vo(ve,ae,j),le&6)G(j.component,se,q);else{if(le&128){j.suspense.unmount(se,q);return}pe&&nf(j,null,ae,"beforeUnmount"),le&64?j.type.remove(j,ae,se,D,ce,q):te&&(F!==wt||Z>0&&Z&64)?Y(te,ae,se,!1,!0):(F===wt&&Z&384||!D&&le&16)&&Y(Q,ae,se),q&&H(j)}(ie&&(ve=$&&$.onVnodeUnmounted)||pe)&&pi(()=>{ve&&vo(ve,ae,j),pe&&nf(j,null,ae,"unmounted")},se)},H=j=>{const{type:ae,el:se,anchor:q,transition:D}=j;if(ae===wt){fe.env.NODE_ENV!=="production"&&j.patchFlag>0&&j.patchFlag&2048&&D&&!D.persisted?j.children.forEach($=>{$.type===mn?a($.el):H($)}):X(se,q);return}if(ae===xh){O(j);return}const F=()=>{a(se),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(j.shapeFlag&1&&D&&!D.persisted){const{leave:$,delayLeave:re}=D,Q=()=>$(se,F);re?re(j.el,F,Q):Q()}else F()},X=(j,ae)=>{let se;for(;j!==ae;)se=v(j),a(j),j=se;a(ae)},G=(j,ae,se)=>{fe.env.NODE_ENV!=="production"&&j.type.__hmrId&&Mve(j);const{bum:q,scope:D,update:F,subTree:$,um:re}=j;q&&Su(q),D.stop(),F&&(F.active=!1,R($,j,ae,se)),re&&pi(re,ae),pi(()=>{j.isUnmounted=!0},ae),ae&&ae.pendingBranch&&!ae.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===ae.pendingId&&(ae.deps--,ae.deps===0&&ae.resolve()),fe.env.NODE_ENV!=="production"&&Nve(j)},Y=(j,ae,se,q=!1,D=!1,F=0)=>{for(let $=F;$<j.length;$++)R(j[$],ae,se,q,D)},ue=j=>j.shapeFlag&6?ue(j.component.subTree):j.shapeFlag&128?j.suspense.next():v(j.anchor||j.el),oe=(j,ae,se)=>{j==null?ae._vnode&&R(ae._vnode,null,null,!0):E(ae._vnode||null,j,ae,null,null,null,se),h9(),d9(),ae._vnode=j},ce={p:E,um:R,m:B,r:H,mt:g,mc:L,pc:x,pbc:M,n:ue,o:e};let ne,J;return t&&([ne,J]=t(ce)),{render:oe,hydrate:ne,createApp:hme(oe,ne)}}function of({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function Eh(e,t,r=!1){const n=e.children,a=t.children;if(mt(n)&&mt(a))for(let i=0;i<n.length;i++){const o=n[i];let l=a[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[i]=Us(a[i]),l.el=o.el),r||Eh(o,l)),l.type===zs&&(l.el=o.el),fe.env.NODE_ENV!=="production"&&l.type===mn&&!l.el&&(l.el=o.el)}}function Tme(e){const t=e.slice(),r=[0];let n,a,i,o,l;const f=e.length;for(n=0;n<f;n++){const u=e[n];if(u!==0){if(a=r[r.length-1],e[a]<u){t[n]=a,r.push(n);continue}for(i=0,o=r.length-1;i<o;)l=i+o>>1,e[r[l]]<u?i=l+1:o=l;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}const Ame=e=>e.__isTeleport,Iu=e=>e&&(e.disabled||e.disabled===""),rk=e=>typeof SVGElement<"u"&&e instanceof SVGElement,qw=(e,t)=>{const r=e&&e.to;if(Bt(r))if(t){const n=t(r);return n||fe.env.NODE_ENV!=="production"&&tt(`Failed to locate Teleport target with selector "${r}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),n}else return fe.env.NODE_ENV!=="production"&&tt("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return fe.env.NODE_ENV!=="production"&&!r&&!Iu(e)&&tt(`Invalid Teleport target: ${r}`),r},Ime={__isTeleport:!0,process(e,t,r,n,a,i,o,l,f,u){const{mc:d,pc:m,pbc:v,o:{insert:y,querySelector:_,createText:E,createComment:C}}=u,T=Iu(t.props);let{shapeFlag:I,children:k,dynamicChildren:N}=t;if(fe.env.NODE_ENV!=="production"&&Ds&&(f=!1,N=null),e==null){const O=t.el=fe.env.NODE_ENV!=="production"?C("teleport start"):E(""),P=t.anchor=fe.env.NODE_ENV!=="production"?C("teleport end"):E("");y(O,r,n),y(P,r,n);const z=t.target=qw(t.props,_),V=t.targetAnchor=E("");z?(y(V,z),o=o||rk(z)):fe.env.NODE_ENV!=="production"&&!T&&tt("Invalid Teleport target on mount:",z,`(${typeof z})`);const L=(U,M)=>{I&16&&d(k,U,M,a,i,o,l,f)};T?L(r,P):z&&L(z,V)}else{t.el=e.el;const O=t.anchor=e.anchor,P=t.target=e.target,z=t.targetAnchor=e.targetAnchor,V=Iu(e.props),L=V?r:P,U=V?O:z;if(o=o||rk(P),N?(v(e.dynamicChildren,N,L,a,i,o,l),Eh(e,t,!0)):f||m(e,t,L,U,a,i,o,l,!1),T)V||_v(t,r,O,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=qw(t.props,_);M?_v(t,M,null,u,0):fe.env.NODE_ENV!=="production"&&tt("Invalid Teleport target on update:",P,`(${typeof P})`)}else V&&_v(t,P,z,u,1)}nk(t)},remove(e,t,r,n,{um:a,o:{remove:i}},o){const{shapeFlag:l,children:f,anchor:u,targetAnchor:d,target:m,props:v}=e;if(m&&i(d),(o||!Iu(v))&&(i(u),l&16))for(let y=0;y<f.length;y++){const _=f[y];a(_,t,r,!0,!!_.dynamicChildren)}},move:_v,hydrate:Bme};function _v(e,t,r,{o:{insert:n},m:a},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:l,shapeFlag:f,children:u,props:d}=e,m=i===2;if(m&&n(o,t,r),(!m||Iu(d))&&f&16)for(let v=0;v<u.length;v++)a(u[v],t,r,2);m&&n(l,t,r)}function Bme(e,t,r,n,a,i,{o:{nextSibling:o,parentNode:l,querySelector:f}},u){const d=t.target=qw(t.props,f);if(d){const m=d._lpa||d.firstChild;if(t.shapeFlag&16)if(Iu(t.props))t.anchor=u(o(e),t,l(e),r,n,a,i),t.targetAnchor=m;else{t.anchor=o(e);let v=m;for(;v;)if(v=o(v),v&&v.nodeType===8&&v.data==="teleport anchor"){t.targetAnchor=v,d._lpa=t.targetAnchor&&o(t.targetAnchor);break}u(m,t,d,r,n,a,i)}nk(t)}return t.anchor&&o(t.anchor)}const kme=Ime;function nk(e){const t=e.ctx;if(t&&t.ut){let r=e.children[0].el;for(;r!==e.targetAnchor;)r.nodeType===1&&r.setAttribute("data-v-owner",t.uid),r=r.nextSibling;t.ut()}}const wt=Symbol.for("v-fgt"),zs=Symbol.for("v-txt"),mn=Symbol.for("v-cmt"),xh=Symbol.for("v-stc"),Sh=[];let wa=null;function me(e=!1){Sh.push(wa=e?null:[])}function Nme(){Sh.pop(),wa=Sh[Sh.length-1]||null}let Mh=1;function ik(e){Mh+=e}function ak(e){return e.dynamicChildren=Mh>0?wa||Eu:null,Nme(),Mh>0&&wa&&wa.push(e),e}function Fe(e,t,r,n,a,i){return ak(Ue(e,t,r,n,a,i,!0))}function Qe(e,t,r,n,a){return ak(ht(e,t,r,n,a,!0))}function Ea(e){return e?e.__v_isVNode===!0:!1}function sf(e,t){return fe.env.NODE_ENV!=="production"&&t.shapeFlag&6&&Tu.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const Ome=(...e)=>sk(...e),wv="__vInternal",ok=({key:e})=>e??null,Ev=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Bt(e)||hr(e)||bt(e)?{i:vn,r:e,k:t,f:!!r}:e:null);function Ue(e,t=null,r=null,n=0,a=null,i=e===wt?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ok(t),ref:t&&Ev(t),scopeId:w9,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:vn};return l?(Vw(f,r),i&128&&e.normalize(f)):r&&(f.shapeFlag|=Bt(r)?8:16),fe.env.NODE_ENV!=="production"&&f.key!==f.key&&tt("VNode created with invalid key (NaN). VNode type:",f.type),Mh>0&&!o&&wa&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&wa.push(f),f}const ht=fe.env.NODE_ENV!=="production"?Ome:sk;function sk(e,t=null,r=null,n=0,a=null,i=!1){if((!e||e===O9)&&(fe.env.NODE_ENV!=="production"&&!e&&tt(`Invalid vnode type when creating vnode: ${e}.`),e=mn),Ea(e)){const l=xa(e,t,!0);return r&&Vw(l,r),Mh>0&&!i&&wa&&(l.shapeFlag&6?wa[wa.indexOf(e)]=l:wa.push(l)),l.patchFlag|=-2,l}if(vk(e)&&(e=e.__vccOpts),t){t=Rme(t);let{class:l,style:f}=t;l&&!Bt(l)&&(t.class=Te(l)),Dt(f)&&(av(f)&&!mt(f)&&(f=xr({},f)),t.style=on(f))}const o=Bt(e)?1:qve(e)?128:Ame(e)?64:Dt(e)?4:bt(e)?2:0;return fe.env.NODE_ENV!=="production"&&o&4&&av(e)&&(e=Tt(e),tt("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
838
- Component that was made reactive: `,e)),Ue(e,t,r,n,a,o,i,!0)}function Rme(e){return e?av(e)||wv in e?xr({},e):e:null}function xa(e,t,r=!1){const{props:n,ref:a,patchFlag:i,children:o}=e,l=t?Ai(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ok(l),ref:t&&t.ref?r&&a?mt(a)?a.concat(Ev(t)):[a,Ev(t)]:Ev(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:fe.env.NODE_ENV!=="production"&&i===-1&&mt(o)?o.map(lk):o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==wt?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xa(e.ssContent),ssFallback:e.ssFallback&&xa(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function lk(e){const t=xa(e);return mt(e.children)&&(t.children=e.children.map(lk)),t}function br(e=" ",t=0){return ht(zs,null,e,t)}function Pme(e,t){const r=ht(xh,null,e);return r.staticCount=t,r}function et(e="",t=!1){return t?(me(),Qe(mn,null,e)):ht(mn,null,e)}function Sa(e){return e==null||typeof e=="boolean"?ht(mn):mt(e)?ht(wt,null,e.slice()):typeof e=="object"?Us(e):ht(zs,null,String(e))}function Us(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xa(e)}function Vw(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(mt(t))r=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),Vw(e,a()),a._c&&(a._d=!0));return}else{r=32;const a=t._;!a&&!(wv in t)?t._ctx=vn:a===3&&vn&&(vn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else bt(t)?(t={default:t,_ctx:vn},r=32):(t=String(t),n&64?(r=16,t=[br(t)]):r=8);e.children=t,e.shapeFlag|=r}function Ai(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Te([t.class,n.class]));else if(a==="style")t.style=on([t.style,n.style]);else if(nh(a)){const i=t[a],o=n[a];o&&i!==o&&!(mt(i)&&i.includes(o))&&(t[a]=i?[].concat(i,o):o)}else a!==""&&(t[a]=n[a])}return t}function vo(e,t,r,n=null){na(e,t,7,[r,n])}const Fme=H9();let Lme=0;function Dme(e,t,r){const n=e.type,a=(t?t.appContext:e.appContext)||Fme,i={uid:Lme++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new FB(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:K9(n,a),emitsOptions:_9(n,a),emit:null,emitted:null,propsDefaults:yr,inheritAttrs:n.inheritAttrs,ctx:yr,data:yr,props:yr,attrs:yr,slots:yr,refs:yr,setupState:yr,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return fe.env.NODE_ENV!=="production"?i.ctx=rme(i):i.ctx={_:i},i.root=t?t.root:i,i.emit=Fve.bind(null,i),e.ce&&e.ce(i),i}let gn=null;const rn=()=>gn||vn;let Hw,Bu,fk="__VUE_INSTANCE_SETTERS__";(Bu=Kp()[fk])||(Bu=Kp()[fk]=[]),Bu.push(e=>gn=e),Hw=e=>{Bu.length>1?Bu.forEach(t=>t(e)):Bu[0](e)};const ku=e=>{Hw(e),e.scope.on()},lf=()=>{gn&&gn.scope.off(),Hw(null)},$me=ks("slot,component");function jw(e,t){const r=t.isNativeTag||IB;($me(e)||r(e))&&tt("Do not use built-in or reserved HTML elements as component id: "+e)}function uk(e){return e.vnode.shapeFlag&4}let Ch=!1;function zme(e,t=!1){Ch=t;const{props:r,children:n}=e.vnode,a=uk(e);dme(e,r,a,t),Eme(e,n);const i=a?Ume(e,t):void 0;return Ch=!1,i}function Ume(e,t){var r;const n=e.type;if(fe.env.NODE_ENV!=="production"){if(n.name&&jw(n.name,e.appContext.config),n.components){const i=Object.keys(n.components);for(let o=0;o<i.length;o++)jw(i[o],e.appContext.config)}if(n.directives){const i=Object.keys(n.directives);for(let o=0;o<i.length;o++)C9(i[o])}n.compilerOptions&&qme()&&tt('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=n9(new Proxy(e.ctx,F9)),fe.env.NODE_ENV!=="production"&&nme(e);const{setup:a}=n;if(a){const i=e.setupContext=a.length>1?pk(e):null;ku(e),Zl();const o=Ho(a,e,0,[fe.env.NODE_ENV!=="production"?sh(e.props):e.props,i]);if(Yl(),lf(),aw(o)){if(o.then(lf,lf),t)return o.then(l=>{ck(e,l,t)}).catch(l=>{lv(l,e,0)});if(e.asyncDep=o,fe.env.NODE_ENV!=="production"&&!e.suspense){const l=(r=n.name)!=null?r:"Anonymous";tt(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else ck(e,o,t)}else hk(e,t)}function ck(e,t,r){bt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Dt(t)?(fe.env.NODE_ENV!=="production"&&Ea(t)&&tt("setup() should not return VNodes directly - return a render function instead."),fe.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=o9(t),fe.env.NODE_ENV!=="production"&&ime(e)):fe.env.NODE_ENV!=="production"&&t!==void 0&&tt(`setup() should return an object. Received: ${t===null?"null":typeof t}`),hk(e,r)}let Kw;const qme=()=>!Kw;function hk(e,t,r){const n=e.type;if(!e.render){if(!t&&Kw&&!n.render){const a=n.template||Fw(e).template;if(a){fe.env.NODE_ENV!=="production"&&Ko(e,"compile");const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:f}=n,u=xr(xr({isCustomElement:i,delimiters:l},o),f);n.render=Kw(a,u),fe.env.NODE_ENV!=="production"&&Wo(e,"compile")}}e.render=n.render||an}ku(e),Zl(),ome(e),Yl(),lf(),fe.env.NODE_ENV!=="production"&&!n.render&&e.render===an&&!t&&(n.template?tt('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):tt("Component is missing template or render function."))}function dk(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,fe.env.NODE_ENV!=="production"?{get(t,r){return hv(),Nn(e,"get","$attrs"),t[r]},set(){return tt("setupContext.attrs is readonly."),!1},deleteProperty(){return tt("setupContext.attrs is readonly."),!1}}:{get(t,r){return Nn(e,"get","$attrs"),t[r]}}))}function Vme(e){return e.slotsProxy||(e.slotsProxy=new Proxy(e.slots,{get(t,r){return Nn(e,"get","$slots"),t[r]}}))}function pk(e){const t=r=>{if(fe.env.NODE_ENV!=="production"&&(e.exposed&&tt("expose() should be called only once per setup()."),r!=null)){let n=typeof r;n==="object"&&(mt(r)?n="array":hr(r)&&(n="ref")),n!=="object"&&tt(`expose() should be passed a plain object, received ${n}.`)}e.exposed=r||{}};return fe.env.NODE_ENV!=="production"?Object.freeze({get attrs(){return dk(e)},get slots(){return Vme(e)},get emit(){return(r,...n)=>e.emit(r,...n)},expose:t}):{get attrs(){return dk(e)},slots:e.slots,emit:e.emit,expose:t}}function xv(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(o9(n9(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in af)return af[r](e)},has(t,r){return r in t||r in af}}))}const Hme=/(?:^|[-_])(\w)/g,jme=e=>e.replace(Hme,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ww(e,t=!0){return bt(e)?e.displayName||e.name:e.name||t&&e.__name}function Sv(e,t,r=!1){let n=Ww(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e&&e.parent){const a=i=>{for(const o in i)if(i[o]===t)return o};n=a(e.components||e.parent.type.components)||a(e.appContext.components)}return n?jme(n):r?"App":"Anonymous"}function vk(e){return bt(e)&&"__vccOpts"in e}const Ee=(e,t)=>dve(e,t,Ch);function vt(e,t,r){const n=arguments.length;return n===2?Dt(t)&&!mt(t)?Ea(t)?ht(e,null,[t]):ht(e,t):ht(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ea(r)&&(r=[r]),ht(e,t,r))}const Kme=Symbol.for("v-scx"),Wme=()=>{{const e=At(Kme);return e||fe.env.NODE_ENV!=="production"&&tt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Gw(e){return!!(e&&e.__v_isShallow)}function Gme(){if(fe.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},r={style:"color:#b62e24"},n={style:"color:#9d288c"},a={header(m){return Dt(m)?m.__isVue?["div",e,"VueInstance"]:hr(m)?["div",{},["span",e,d(m)],"<",l(m.value),">"]:Jl(m)?["div",{},["span",e,Gw(m)?"ShallowReactive":"Reactive"],"<",l(m),`>${Fs(m)?" (readonly)":""}`]:Fs(m)?["div",{},["span",e,Gw(m)?"ShallowReadonly":"Readonly"],"<",l(m),">"]:null:null},hasBody(m){return m&&m.__isVue},body(m){if(m&&m.__isVue)return["div",{},...i(m.$)]}};function i(m){const v=[];m.type.props&&m.props&&v.push(o("props",Tt(m.props))),m.setupState!==yr&&v.push(o("setup",m.setupState)),m.data!==yr&&v.push(o("data",Tt(m.data)));const y=f(m,"computed");y&&v.push(o("computed",y));const _=f(m,"inject");return _&&v.push(o("injected",_)),v.push(["div",{},["span",{style:n.style+";opacity:0.66"},"$ (internal): "],["object",{object:m}]]),v}function o(m,v){return v=xr({},v),Object.keys(v).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},m],["div",{style:"padding-left:1.25em"},...Object.keys(v).map(y=>["div",{},["span",n,y+": "],l(v[y],!1)])]]:["span",{}]}function l(m,v=!0){return typeof m=="number"?["span",t,m]:typeof m=="string"?["span",r,JSON.stringify(m)]:typeof m=="boolean"?["span",n,m]:Dt(m)?["object",{object:v?Tt(m):m}]:["span",r,String(m)]}function f(m,v){const y=m.type;if(bt(y))return;const _={};for(const E in m.ctx)u(y,E,v)&&(_[E]=m.ctx[E]);return _}function u(m,v,y){const _=m[y];if(mt(_)&&_.includes(v)||Dt(_)&&v in _||m.extends&&u(m.extends,v,y)||m.mixins&&m.mixins.some(E=>u(E,v,y)))return!0}function d(m){return Gw(m)?"ShallowRef":m.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(a):window.devtoolsFormatters=[a]}const mk="3.3.4",Zme="http://www.w3.org/2000/svg",ff=typeof document<"u"?document:null,gk=ff&&ff.createElement("template"),Yme={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const a=t?ff.createElementNS(Zme,e):ff.createElement(e,r?{is:r}:void 0);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>ff.createTextNode(e),createComment:e=>ff.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ff.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,a,i){const o=r?r.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===i||!(a=a.nextSibling)););else{gk.innerHTML=n?`<svg>${e}</svg>`:e;const l=gk.content;if(n){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function Jme(e,t,r){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function Xme(e,t,r){const n=e.style,a=Bt(r);if(r&&!a){if(t&&!Bt(t))for(const i in t)r[i]==null&&Zw(n,i,"");for(const i in r)Zw(n,i,r[i])}else{const i=n.display;a?t!==r&&(n.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(n.display=i)}}const Qme=/[^\\];\s*$/,yk=/\s*!important$/;function Zw(e,t,r){if(mt(r))r.forEach(n=>Zw(e,t,n));else if(r==null&&(r=""),fe.env.NODE_ENV!=="production"&&Qme.test(r)&&tt(`Unexpected semicolon at the end of '${t}' style value: '${r}'`),t.startsWith("--"))e.setProperty(t,r);else{const n=ege(e,t);yk.test(r)?e.setProperty(lo(n),r.replace(yk,""),"important"):e[n]=r}}const bk=["Webkit","Moz","ms"],Yw={};function ege(e,t){const r=Yw[t];if(r)return r;let n=_a(t);if(n!=="filter"&&n in e)return Yw[t]=n;n=Wl(n);for(let a=0;a<bk.length;a++){const i=bk[a]+n;if(i in e)return Yw[t]=i}return t}const _k="http://www.w3.org/1999/xlink";function tge(e,t,r,n,a){if(n&&t.startsWith("xlink:"))r==null?e.removeAttributeNS(_k,t.slice(6,t.length)):e.setAttributeNS(_k,t,r);else{const i=Ipe(t);r==null||i&&!RB(r)?e.removeAttribute(t):e.setAttribute(t,i?"":r)}}function rge(e,t,r,n,a,i,o){if(t==="innerHTML"||t==="textContent"){n&&o(n,a,i),e[t]=r??"";return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){e._value=r;const u=l==="OPTION"?e.getAttribute("value"):e.value,d=r??"";u!==d&&(e.value=d),r==null&&e.removeAttribute(t);return}let f=!1;if(r===""||r==null){const u=typeof e[t];u==="boolean"?r=RB(r):r==null&&u==="string"?(r="",f=!0):u==="number"&&(r=0,f=!0)}try{e[t]=r}catch(u){fe.env.NODE_ENV!=="production"&&!f&&tt(`Failed setting prop "${t}" on <${l.toLowerCase()}>: value ${r} is invalid.`,u)}f&&e.removeAttribute(t)}function Nu(e,t,r,n){e.addEventListener(t,r,n)}function nge(e,t,r,n){e.removeEventListener(t,r,n)}function ige(e,t,r,n,a=null){const i=e._vei||(e._vei={}),o=i[t];if(n&&o)o.value=n;else{const[l,f]=age(t);if(n){const u=i[t]=lge(n,a);Nu(e,l,u,f)}else o&&(nge(e,l,o,f),i[t]=void 0)}}const wk=/(?:Once|Passive|Capture)$/;function age(e){let t;if(wk.test(e)){t={};let n;for(;n=e.match(wk);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):lo(e.slice(2)),t]}let Jw=0;const oge=Promise.resolve(),sge=()=>Jw||(oge.then(()=>Jw=0),Jw=Date.now());function lge(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;na(fge(n,r.value),t,5,[n])};return r.value=e,r.attached=sge(),r}function fge(e,t){if(mt(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const Ek=/^on[a-z]/,uge=(e,t,r,n,a=!1,i,o,l,f)=>{t==="class"?Jme(e,n,a):t==="style"?Xme(e,r,n):nh(t)?Up(t)||ige(e,t,r,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cge(e,t,n,a))?rge(e,t,n,i,o,l,f):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),tge(e,t,n,a))};function cge(e,t,r,n){return n?!!(t==="innerHTML"||t==="textContent"||t in e&&Ek.test(t)&&bt(r)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Ek.test(t)&&Bt(r)?!1:t in e}const qs="transition",Th="animation",aa=(e,{slots:t})=>vt(Kve,Mk(e),t);aa.displayName="Transition";const xk={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hge=aa.props=xr({},A9,xk),uf=(e,t=[])=>{mt(e)?e.forEach(r=>r(...t)):e&&e(...t)},Sk=e=>e?mt(e)?e.some(t=>t.length>1):e.length>1:!1;function Mk(e){const t={};for(const s in e)s in xk||(t[s]=e[s]);if(e.css===!1)return t;const{name:r="v",type:n,duration:a,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:f=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:m=`${r}-leave-from`,leaveActiveClass:v=`${r}-leave-active`,leaveToClass:y=`${r}-leave-to`}=e,_=dge(a),E=_&&_[0],C=_&&_[1],{onBeforeEnter:T,onEnter:I,onEnterCancelled:k,onLeave:N,onLeaveCancelled:O,onBeforeAppear:P=T,onAppear:z=I,onAppearCancelled:V=k}=t,L=(s,h,p)=>{Vs(s,h?d:l),Vs(s,h?u:o),p&&p()},U=(s,h)=>{s._isLeaving=!1,Vs(s,m),Vs(s,y),Vs(s,v),h&&h()},M=s=>(h,p)=>{const g=s?z:I,b=()=>L(h,s,p);uf(g,[h,b]),Ck(()=>{Vs(h,s?f:i),Go(h,s?d:l),Sk(g)||Tk(h,n,E,b)})};return xr(t,{onBeforeEnter(s){uf(T,[s]),Go(s,i),Go(s,o)},onBeforeAppear(s){uf(P,[s]),Go(s,f),Go(s,u)},onEnter:M(!1),onAppear:M(!0),onLeave(s,h){s._isLeaving=!0;const p=()=>U(s,h);Go(s,m),kk(),Go(s,v),Ck(()=>{s._isLeaving&&(Vs(s,m),Go(s,y),Sk(N)||Tk(s,n,C,p))}),uf(N,[s,p])},onEnterCancelled(s){L(s,!1),uf(k,[s])},onAppearCancelled(s){L(s,!0),uf(V,[s])},onLeaveCancelled(s){U(s),uf(O,[s])}})}function dge(e){if(e==null)return null;if(Dt(e))return[Xw(e.enter),Xw(e.leave)];{const t=Xw(e);return[t,t]}}function Xw(e){const t=_pe(e);return fe.env.NODE_ENV!=="production"&&yve(t,"<transition> explicit duration"),t}function Go(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e._vtc||(e._vtc=new Set)).add(t)}function Vs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const{_vtc:r}=e;r&&(r.delete(t),r.size||(e._vtc=void 0))}function Ck(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let pge=0;function Tk(e,t,r,n){const a=e._endId=++pge,i=()=>{a===e._endId&&n()};if(r)return setTimeout(i,r);const{type:o,timeout:l,propCount:f}=Ak(e,t);if(!o)return n();const u=o+"end";let d=0;const m=()=>{e.removeEventListener(u,v),i()},v=y=>{y.target===e&&++d>=f&&m()};setTimeout(()=>{d<f&&m()},l+1),e.addEventListener(u,v)}function Ak(e,t){const r=window.getComputedStyle(e),n=_=>(r[_]||"").split(", "),a=n(`${qs}Delay`),i=n(`${qs}Duration`),o=Ik(a,i),l=n(`${Th}Delay`),f=n(`${Th}Duration`),u=Ik(l,f);let d=null,m=0,v=0;t===qs?o>0&&(d=qs,m=o,v=i.length):t===Th?u>0&&(d=Th,m=u,v=f.length):(m=Math.max(o,u),d=m>0?o>u?qs:Th:null,v=d?d===qs?i.length:f.length:0);const y=d===qs&&/\b(transform|all)(,|$)/.test(n(`${qs}Property`).toString());return{type:d,timeout:m,propCount:v,hasTransform:y}}function Ik(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Bk(r)+Bk(e[n])))}function Bk(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function kk(){return document.body.offsetHeight}const Nk=new WeakMap,Ok=new WeakMap,Rk={name:"TransitionGroup",props:xr({},hge,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=rn(),n=T9();let a,i;return Au(()=>{if(!a.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!_ge(a[0].el,r.vnode.el,o))return;a.forEach(gge),a.forEach(yge);const l=a.filter(bge);kk(),l.forEach(f=>{const u=f.el,d=u.style;Go(u,o),d.transform=d.webkitTransform=d.transitionDuration="";const m=u._moveCb=v=>{v&&v.target!==u||(!v||/transform$/.test(v.propertyName))&&(u.removeEventListener("transitionend",m),u._moveCb=null,Vs(u,o))};u.addEventListener("transitionend",m)})}),()=>{const o=Tt(e),l=Mk(o);let f=o.tag||wt;a=i,i=t.default?Tw(t.default()):[];for(let u=0;u<i.length;u++){const d=i[u];d.key!=null?mh(d,vh(d,l,n,r)):fe.env.NODE_ENV!=="production"&&tt("<TransitionGroup> children must be keyed.")}if(a)for(let u=0;u<a.length;u++){const d=a[u];mh(d,vh(d,l,n,r)),Nk.set(d,d.el.getBoundingClientRect())}return ht(f,null,i)}}},vge=e=>delete e.mode;Rk.props;const mge=Rk;function gge(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function yge(e){Ok.set(e,e.el.getBoundingClientRect())}function bge(e){const t=Nk.get(e),r=Ok.get(e),n=t.left-r.left,a=t.top-r.top;if(n||a){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${n}px,${a}px)`,i.transitionDuration="0s",e}}function _ge(e,t,r){const n=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(n);const{hasTransform:i}=Ak(n);return a.removeChild(n),i}const Pk=e=>{const t=e.props["onUpdate:modelValue"]||!1;return mt(t)?r=>Su(t,r):t};function wge(e){e.target.composing=!0}function Fk(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ege={created(e,{modifiers:{lazy:t,trim:r,number:n}},a){e._assign=Pk(a);const i=n||a.props&&a.props.type==="number";Nu(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;r&&(l=l.trim()),i&&(l=sw(l)),e._assign(l)}),r&&Nu(e,"change",()=>{e.value=e.value.trim()}),t||(Nu(e,"compositionstart",wge),Nu(e,"compositionend",Fk),Nu(e,"change",Fk))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:r,trim:n,number:a}},i){if(e._assign=Pk(i),e.composing||document.activeElement===e&&e.type!=="range"&&(r||n&&e.value.trim()===t||(a||e.type==="number")&&sw(e.value)===t))return;const o=t??"";e.value!==o&&(e.value=o)}},xge=["ctrl","shift","alt","meta"],Sge={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xge.some(r=>e[`${r}Key`]&&!t.includes(r))},Cn=(e,t)=>(r,...n)=>{for(let a=0;a<t.length;a++){const i=Sge[t[a]];if(i&&i(r,t))return}return e(r,...n)},Mge={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ma=(e,t)=>r=>{if(!("key"in r))return;const n=lo(r.key);if(t.some(a=>a===n||Mge[a]===n))return e(r)},vi={beforeMount(e,{value:t},{transition:r}){e._vod=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):Ah(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),Ah(e,!0),n.enter(e)):n.leave(e,()=>{Ah(e,!1)}):Ah(e,t))},beforeUnmount(e,{value:t}){Ah(e,t)}};function Ah(e,t){e.style.display=t?e._vod:"none"}const Cge=xr({patchProp:uge},Yme);let Lk;function Dk(){return Lk||(Lk=Mme(Cge))}const $k=(...e)=>{Dk().render(...e)},zk=(...e)=>{const t=Dk().createApp(...e);fe.env.NODE_ENV!=="production"&&(Tge(t),Age(t));const{mount:r}=t;return t.mount=n=>{const a=Ige(n);if(!a)return;const i=t._component;!bt(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.innerHTML="";const o=r(a,!1,a instanceof SVGElement);return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},t};function Tge(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Tpe(t)||Ape(t),writable:!1})}function Age(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){tt("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const r=e.config.compilerOptions,n='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return tt(n),r},set(){tt(n)}})}}function Ige(e){if(Bt(e)){const t=document.querySelector(e);return fe.env.NODE_ENV!=="production"&&!t&&tt(`Failed to mount app: mount target selector "${e}" returned null.`),t}return fe.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&tt('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function Bge(){Gme()}fe.env.NODE_ENV!=="production"&&Bge();var kge=Object.defineProperty,Nge=(e,t,r)=>t in e?kge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uk=(e,t,r)=>(Nge(e,typeof t!="symbol"?t+"":t,r),r);const ai={debug:!1,masked:!1,prefix:"",suffix:"",thousands:",",decimal:".",precision:2,disableNegative:!1,disabled:!1,min:null,max:null,allowBlank:!1,minimumNumberOfCharacters:0,modelModifiers:{number:!1},shouldRound:!0,focusOnRight:!1},qk=["+","-"],Vk=["decimal","thousands","prefix","suffix"];function Zo(e){return Math.max(0,Math.min(e,1e3))}function Mv(e,t){return e=e.padStart(t+1,"0"),t===0?e:`${e.slice(0,-t)}.${e.slice(-t)}`}function Hk(e){return e=e?e.toString():"",e.replace(/\D+/g,"")||"0"}function Oge(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,`$1${t}`)}function Rge(e,t,r){return t?e+r+t:e}function Ih(e,t){return qk.includes(e)?(console.warn(`v-money3 "${t}" property don't accept "${e}" as a value.`),!1):/\d/g.test(e)?(console.warn(`v-money3 "${t}" property don't accept "${e}" (any number) as a value.`),!1):!0}function Pge(e){for(const t of Vk)if(!Ih(e[t],t))return!1;return!0}function Cv(e){for(const t of Vk){e[t]=e[t].replace(/\d+/g,"");for(const r of qk)e[t]=e[t].replaceAll(r,"")}return e}function jk(e){const t=e.length,r=e.indexOf(".");return t-(r+1)}function Kk(e){return e.replace(/^(-?)0+(?!\.)(.+)/,"$1$2")}function Wk(e){return/^-?[\d]+$/g.test(e)}function Gk(e){return/^-?[\d]+(\.[\d]+)$/g.test(e)}function Zk(e,t,r){return t>e.length-1?e:e.substring(0,t)+r+e.substring(t+1)}function Yk(e,t){const r=t-jk(e);if(r>=0)return e;let n=e.slice(0,r);const a=e.slice(r);if(n.charAt(n.length-1)==="."&&(n=n.slice(0,-1)),parseInt(a.charAt(0),10)>=5){for(let i=n.length-1;i>=0;i-=1){const o=n.charAt(i);if(o!=="."&&o!=="-"){const l=parseInt(o,10)+1;if(l<10)return Zk(n,i,l);n=Zk(n,i,"0")}}return`1${n}`}return n}function Jk(e,t){const r=()=>{e.setSelectionRange(t,t)};e===document.activeElement&&(r(),setTimeout(r,1))}function Xk(e){return new Event(e,{bubbles:!0,cancelable:!1})}function Wt({debug:e=!1},...t){e&&console.log(...t)}class Tv{constructor(t){Uk(this,"number",0n),Uk(this,"decimal",0),this.setNumber(t)}getNumber(){return this.number}getDecimalPrecision(){return this.decimal}setNumber(t){this.decimal=0,typeof t=="bigint"?this.number=t:typeof t=="number"?this.setupString(t.toString()):this.setupString(t)}toFixed(t=0,r=!0){let n=this.toString();const a=t-this.getDecimalPrecision();return a>0?(n.includes(".")||(n+="."),n.padEnd(n.length+a,"0")):a<0?r?Yk(n,t):n.slice(0,a):n}toString(){let t=this.number.toString();if(this.decimal){let r=!1;return t.charAt(0)==="-"&&(t=t.substring(1),r=!0),t=t.padStart(t.length+this.decimal,"0"),t=`${t.slice(0,-this.decimal)}.${t.slice(-this.decimal)}`,t=Kk(t),(r?"-":"")+t}return t}lessThan(t){const[r,n]=this.adjustComparisonNumbers(t);return r<n}biggerThan(t){const[r,n]=this.adjustComparisonNumbers(t);return r>n}isEqual(t){const[r,n]=this.adjustComparisonNumbers(t);return r===n}setupString(t){if(t=Kk(t),Wk(t))this.number=BigInt(t);else if(Gk(t))this.decimal=jk(t),this.number=BigInt(t.replace(".",""));else throw new Error(`BigNumber has received and invalid format for the constructor: ${t}`)}adjustComparisonNumbers(t){let r;t.constructor.name!=="BigNumber"?r=new Tv(t):r=t;const n=this.getDecimalPrecision()-r.getDecimalPrecision();let a=this.getNumber(),i=r.getNumber();return n>0?i=r.getNumber()*10n**BigInt(n):n<0&&(a=this.getNumber()*10n**BigInt(n*-1)),[a,i]}}function Qw(e,t=ai,r=""){if(Wt(t,"utils format() - caller",r),Wt(t,"utils format() - input1",e),e==null)e="";else if(typeof e=="number")t.shouldRound?e=e.toFixed(Zo(t.precision)):e=e.toFixed(Zo(t.precision)+1).slice(0,-1);else if(t.modelModifiers&&t.modelModifiers.number&&Wk(e))e=Number(e).toFixed(Zo(t.precision));else if(!t.disableNegative&&e==="-")return e;Wt(t,"utils format() - input2",e);const n=t.disableNegative?"":e.indexOf("-")>=0?"-":"";let a=e.replace(t.prefix,"").replace(t.suffix,"");Wt(t,"utils format() - filtered",a),!t.precision&&t.thousands!=="."&&Gk(a)&&(a=Yk(a,0),Wt(t,"utils format() - !opt.precision && isValidFloat()",a));const i=Hk(a);Wt(t,"utils format() - numbers",i),Wt(t,"utils format() - numbersToCurrency",n+Mv(i,t.precision));const o=new Tv(n+Mv(i,t.precision));Wt(t,"utils format() - bigNumber1",o.toString()),t.max&&o.biggerThan(t.max)&&o.setNumber(t.max),t.min&&o.lessThan(t.min)&&o.setNumber(t.min);const l=o.toFixed(Zo(t.precision),t.shouldRound);if(Wt(t,"utils format() - bigNumber2",o.toFixed(Zo(t.precision))),/^0(\.0+)?$/g.test(l)&&t.allowBlank)return"";let[f,u]=l.split(".");const d=u!==void 0?u.length:0;f=f.padStart(t.minimumNumberOfCharacters-d,"0"),f=Oge(f,t.thousands);const m=t.prefix+Rge(f,u,t.decimal)+t.suffix;return Wt(t,"utils format() - output",m),m}function eE(e,t=ai,r=""){if(Wt(t,"utils unformat() - caller",r),Wt(t,"utils unformat() - input",e),!t.disableNegative&&e==="-")return Wt(t,"utils unformat() - return netagive symbol",e),e;const n=t.disableNegative?"":e.indexOf("-")>=0?"-":"",a=e.replace(t.prefix,"").replace(t.suffix,"");Wt(t,"utils unformat() - filtered",a);const i=Hk(a);Wt(t,"utils unformat() - numbers",i);const o=new Tv(n+Mv(i,t.precision));Wt(t,"utils unformat() - bigNumber1",i.toString()),t.max&&o.biggerThan(t.max)&&o.setNumber(t.max),t.min&&o.lessThan(t.min)&&o.setNumber(t.min);let l=o.toFixed(Zo(t.precision),t.shouldRound);return t.modelModifiers&&t.modelModifiers.number&&(l=parseFloat(l)),Wt(t,"utils unformat() - output",l),l}const tE=(e,t,r)=>{if(Wt(t,"directive setValue() - caller",r),!Pge(t)){Wt(t,"directive setValue() - validateRestrictedOptions() return false. Stopping here...",e.value);return}let n=e.value.length-(e.selectionEnd||0);e.value=Qw(e.value,t,r),n=Math.max(n,t.suffix.length),n=e.value.length-n,n=Math.max(n,t.prefix.length),Jk(e,n),e.dispatchEvent(Xk("change"))},Qk=(e,t)=>{const r=e.currentTarget,n=e.code==="Backspace"||e.code==="Delete",a=r.value.length-(r.selectionEnd||0)===0;if(Wt(t,"directive onkeydown() - el.value",r.value),Wt(t,"directive onkeydown() - backspacePressed",n),Wt(t,"directive onkeydown() - isAtEndPosition",a),t.allowBlank&&n&&a&&eE(r.value,t,"directive onkeydown allowBlank")===0&&(Wt(t,'directive onkeydown() - set el.value = ""',r.value),r.value="",r.dispatchEvent(Xk("change"))),Wt(t,"directive onkeydown() - e.key",e.key),e.key==="+"){Wt(t,"directive onkeydown() - unformat el.value",r.value);let i=eE(r.value,t,"directive onkeydown +");typeof i=="string"&&(i=parseFloat(i)),i<0&&(r.value=String(i*-1))}},eN=(e,t)=>{const r=e.currentTarget;Wt(t,"directive oninput()",r.value),/^[1-9]$/.test(r.value)&&(r.value=Mv(r.value,Zo(t.precision)),Wt(t,"directive oninput() - is 1-9",r.value)),tE(r,t,"directive oninput")},tN=(e,t)=>{const r=e.currentTarget;Wt(t,"directive onFocus()",r.value),t.focusOnRight&&Jk(r,r.value.length-t.suffix.length)},rN={mounted(e,t){if(!t.value)return;const r=Cv({...ai,...t.value});if(Wt(r,"directive mounted() - opt",r),e.tagName.toLocaleUpperCase()!=="INPUT"){const n=e.getElementsByTagName("input");n.length!==1||(e=n[0])}e.onkeydown=n=>{Qk(n,r)},e.oninput=n=>{eN(n,r)},e.onfocus=n=>{tN(n,r)},Wt(r,"directive mounted() - el.value",e.value),tE(e,r,"directive mounted")},updated(e,t){if(!t.value)return;const r=Cv({...ai,...t.value});e.onkeydown=n=>{Qk(n,r)},e.oninput=n=>{eN(n,r)},e.onfocus=n=>{tN(n,r)},Wt(r,"directive updated() - el.value",e.value),Wt(r,"directive updated() - opt",r),tE(e,r,"directive updated")},beforeUnmount(e){e.onkeydown=null,e.oninput=null,e.onfocus=null}},Fge=["id","value","disabled"],Lge={inheritAttrs:!1,name:"Money3",directives:{money3:rN}},Dge=st({...Lge,props:{debug:{required:!1,type:Boolean,default:!1},id:{required:!1,type:[Number,String],default:()=>{const e=rn();return e?e.uid:null}},modelValue:{required:!0,type:[Number,String]},modelModifiers:{required:!1,type:Object,default:()=>({number:!1})},masked:{type:Boolean,default:!1},precision:{type:Number,default:()=>ai.precision},decimal:{type:String,default:()=>ai.decimal,validator(e){return Ih(e,"decimal")}},thousands:{type:String,default:()=>ai.thousands,validator(e){return Ih(e,"thousands")}},prefix:{type:String,default:()=>ai.prefix,validator(e){return Ih(e,"prefix")}},suffix:{type:String,default:()=>ai.suffix,validator(e){return Ih(e,"suffix")}},disableNegative:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},max:{type:[Number,String],default:()=>ai.max},min:{type:[Number,String],default:()=>ai.min},allowBlank:{type:Boolean,default:()=>ai.allowBlank},minimumNumberOfCharacters:{type:Number,default:()=>ai.minimumNumberOfCharacters},shouldRound:{type:Boolean,default:()=>ai.shouldRound},focusOnRight:{type:Boolean,default:()=>ai.focusOnRight}},emits:["update:model-value"],setup(e,{emit:t}){const r=e,{modelValue:n,modelModifiers:a,masked:i,precision:o,shouldRound:l,focusOnRight:f}=Ql(r);Wt(r,"component setup()",r);let u=n.value;(r.disableNegative||u!=="-")&&a.value&&a.value.number&&(l.value?u=Number(n.value).toFixed(Zo(o.value)):u=Number(n.value).toFixed(Zo(o.value)+1).slice(0,-1));const d=Re(Qw(u,r,"component setup"));Wt(r,"component setup() - data.formattedValue",d.value),ut(n,m);function m(C){Wt(r,"component watch() -> value",C);const T=Qw(C,Cv({...r}),"component watch");T!==d.value&&(Wt(r,"component watch() changed -> formatted",T),d.value=T)}let v=null;function y(C){let T=C.target.value;Wt(r,"component change() -> evt.target.value",T),i.value&&!a.value.number||(T=eE(T,Cv({...r}),"component change")),T!==v&&(v=T,Wt(r,"component change() -> update:model-value",T),t("update:model-value",T))}const _=L9(),E=Ee(()=>{const C={..._};return delete C["onUpdate:modelValue"],C});return(C,T)=>{const I=Iw("money3");return tn((me(),Fe("input",Ai({id:`${e.id}`},W(E),{type:"tel",class:"v-money3",value:d.value,disabled:r.disabled,onChange:y}),null,16,Fge)),[[I,{precision:W(o),decimal:r.decimal,thousands:r.thousands,prefix:r.prefix,suffix:r.suffix,disableNegative:r.disableNegative,min:r.min,max:r.max,allowBlank:r.allowBlank,minimumNumberOfCharacters:r.minimumNumberOfCharacters,debug:r.debug,modelModifiers:W(a),shouldRound:W(l),focusOnRight:W(f)}]])}}}),$ge={install(e){e.component("money3",Dge),e.directive("money3",rN)}};/*!
837
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const pi=Vve;function Mme(e){return Cme(e)}function Cme(e,t){Sme();const r=Kp();r.__VUE__=!0,fe.env.NODE_ENV!=="production"&&g9(r.__VUE_DEVTOOLS_GLOBAL_HOOK__,r);const{insert:n,remove:a,patchProp:i,createElement:o,createText:l,createComment:f,setText:u,setElementText:d,parentNode:m,nextSibling:v,setScopeId:y=an,insertStaticContent:_}=e,E=(j,ae,se,q=null,D=null,F=null,$=!1,re=null,Q=fe.env.NODE_ENV!=="production"&&Ds?!1:!!ae.dynamicChildren)=>{if(j===ae)return;j&&!sf(j,ae)&&(q=ue(j),R(j,D,F,!0),j=null),ae.patchFlag===-2&&(Q=!1,ae.dynamicChildren=null);const{type:te,ref:le,shapeFlag:Z}=ae;switch(te){case zs:C(j,ae,se,q);break;case mn:T(j,ae,se,q);break;case xh:j==null?I(ae,se,q,$):fe.env.NODE_ENV!=="production"&&k(j,ae,se,$);break;case wt:h(j,ae,se,q,D,F,$,re,Q);break;default:Z&1?P(j,ae,se,q,D,F,$,re,Q):Z&6?p(j,ae,se,q,D,F,$,re,Q):Z&64||Z&128?te.process(j,ae,se,q,D,F,$,re,Q,ce):fe.env.NODE_ENV!=="production"&&tt("Invalid VNode type:",te,`(${typeof te})`)}le!=null&&D&&Uw(le,j&&j.ref,F,ae||j,!ae)},C=(j,ae,se,q)=>{if(j==null)n(ae.el=l(ae.children),se,q);else{const D=ae.el=j.el;ae.children!==j.children&&u(D,ae.children)}},T=(j,ae,se,q)=>{j==null?n(ae.el=f(ae.children||""),se,q):ae.el=j.el},I=(j,ae,se,q)=>{[j.el,j.anchor]=_(j.children,ae,se,q,j.el,j.anchor)},k=(j,ae,se,q)=>{if(ae.children!==j.children){const D=v(j.anchor);O(j),[ae.el,ae.anchor]=_(ae.children,se,D,q)}else ae.el=j.el,ae.anchor=j.anchor},N=({el:j,anchor:ae},se,q)=>{let D;for(;j&&j!==ae;)D=v(j),n(j,se,q),j=D;n(ae,se,q)},O=({el:j,anchor:ae})=>{let se;for(;j&&j!==ae;)se=v(j),a(j),j=se;a(ae)},P=(j,ae,se,q,D,F,$,re,Q)=>{$=$||ae.type==="svg",j==null?z(ae,se,q,D,F,$,re,Q):U(j,ae,D,F,$,re,Q)},z=(j,ae,se,q,D,F,$,re)=>{let Q,te;const{type:le,props:Z,shapeFlag:K,transition:pe,dirs:ie}=j;if(Q=j.el=o(j.type,F,Z&&Z.is,Z),K&8?d(Q,j.children):K&16&&L(j.children,Q,null,q,D,F&&le!=="foreignObject",$,re),ie&&nf(j,null,q,"created"),V(Q,j,j.scopeId,$,q),Z){for(const Ye in Z)Ye!=="value"&&!Vp(Ye)&&i(Q,Ye,null,Z[Ye],F,j.children,q,D,Y);"value"in Z&&i(Q,"value",null,Z.value),(te=Z.onVnodeBeforeMount)&&vo(te,q,j)}fe.env.NODE_ENV!=="production"&&(Object.defineProperty(Q,"__vnode",{value:j,enumerable:!1}),Object.defineProperty(Q,"__vueParentComponent",{value:q,enumerable:!1})),ie&&nf(j,null,q,"beforeMount");const ve=(!D||D&&!D.pendingBranch)&&pe&&!pe.persisted;ve&&pe.beforeEnter(Q),n(Q,ae,se),((te=Z&&Z.onVnodeMounted)||ve||ie)&&pi(()=>{te&&vo(te,q,j),ve&&pe.enter(Q),ie&&nf(j,null,q,"mounted")},D)},V=(j,ae,se,q,D)=>{if(se&&y(j,se),q)for(let F=0;F<q.length;F++)y(j,q[F]);if(D){let F=D.subTree;if(fe.env.NODE_ENV!=="production"&&F.patchFlag>0&&F.patchFlag&2048&&(F=E9(F.children)||F),ae===F){const $=D.vnode;V(j,$,$.scopeId,$.slotScopeIds,D.parent)}}},L=(j,ae,se,q,D,F,$,re,Q=0)=>{for(let te=Q;te<j.length;te++){const le=j[te]=re?Us(j[te]):Sa(j[te]);E(null,le,ae,se,q,D,F,$,re)}},U=(j,ae,se,q,D,F,$)=>{const re=ae.el=j.el;let{patchFlag:Q,dynamicChildren:te,dirs:le}=ae;Q|=j.patchFlag&16;const Z=j.props||yr,K=ae.props||yr;let pe;se&&of(se,!1),(pe=K.onVnodeBeforeUpdate)&&vo(pe,se,ae,j),le&&nf(ae,j,se,"beforeUpdate"),se&&of(se,!0),fe.env.NODE_ENV!=="production"&&Ds&&(Q=0,$=!1,te=null);const ie=D&&ae.type!=="foreignObject";if(te?(M(j.dynamicChildren,te,re,se,q,ie,F),fe.env.NODE_ENV!=="production"&&Eh(j,ae)):$||x(j,ae,re,null,se,q,ie,F,!1),Q>0){if(Q&16)s(re,ae,Z,K,se,q,D);else if(Q&2&&Z.class!==K.class&&i(re,"class",null,K.class,D),Q&4&&i(re,"style",Z.style,K.style,D),Q&8){const ve=ae.dynamicProps;for(let Ye=0;Ye<ve.length;Ye++){const Se=ve[Ye],Ce=Z[Se],Je=K[Se];(Je!==Ce||Se==="value")&&i(re,Se,Ce,Je,D,j.children,se,q,Y)}}Q&1&&j.children!==ae.children&&d(re,ae.children)}else!$&&te==null&&s(re,ae,Z,K,se,q,D);((pe=K.onVnodeUpdated)||le)&&pi(()=>{pe&&vo(pe,se,ae,j),le&&nf(ae,j,se,"updated")},q)},M=(j,ae,se,q,D,F,$)=>{for(let re=0;re<ae.length;re++){const Q=j[re],te=ae[re],le=Q.el&&(Q.type===wt||!sf(Q,te)||Q.shapeFlag&70)?m(Q.el):se;E(Q,te,le,null,q,D,F,$,!0)}},s=(j,ae,se,q,D,F,$)=>{if(se!==q){if(se!==yr)for(const re in se)!Vp(re)&&!(re in q)&&i(j,re,se[re],null,$,ae.children,D,F,Y);for(const re in q){if(Vp(re))continue;const Q=q[re],te=se[re];Q!==te&&re!=="value"&&i(j,re,te,Q,$,ae.children,D,F,Y)}"value"in q&&i(j,"value",se.value,q.value)}},h=(j,ae,se,q,D,F,$,re,Q)=>{const te=ae.el=j?j.el:l(""),le=ae.anchor=j?j.anchor:l("");let{patchFlag:Z,dynamicChildren:K,slotScopeIds:pe}=ae;fe.env.NODE_ENV!=="production"&&(Ds||Z&2048)&&(Z=0,Q=!1,K=null),pe&&(re=re?re.concat(pe):pe),j==null?(n(te,se,q),n(le,se,q),L(ae.children,se,le,D,F,$,re,Q)):Z>0&&Z&64&&K&&j.dynamicChildren?(M(j.dynamicChildren,K,se,D,F,$,re),fe.env.NODE_ENV!=="production"?Eh(j,ae):(ae.key!=null||D&&ae===D.subTree)&&Eh(j,ae,!0)):x(j,ae,se,le,D,F,$,re,Q)},p=(j,ae,se,q,D,F,$,re,Q)=>{ae.slotScopeIds=re,j==null?ae.shapeFlag&512?D.ctx.activate(ae,se,q,$,Q):g(ae,se,q,D,F,$,Q):b(j,ae,Q)},g=(j,ae,se,q,D,F,$)=>{const re=j.component=Dme(j,q,D);if(fe.env.NODE_ENV!=="production"&&re.type.__hmrId&&Sve(re),fe.env.NODE_ENV!=="production"&&(ov(j),Ko(re,"mount")),yh(j)&&(re.ctx.renderer=ce),fe.env.NODE_ENV!=="production"&&Ko(re,"init"),zme(re),fe.env.NODE_ENV!=="production"&&Wo(re,"init"),re.asyncDep){if(D&&D.registerDep(re,w),!j.el){const Q=re.subTree=ht(mn);T(null,Q,ae,se)}return}w(re,j,ae,se,D,F,$),fe.env.NODE_ENV!=="production"&&(sv(),Wo(re,"mount"))},b=(j,ae,se)=>{const q=ae.component=j.component;if(zve(j,ae,se))if(q.asyncDep&&!q.asyncResolved){fe.env.NODE_ENV!=="production"&&ov(ae),A(q,ae,se),fe.env.NODE_ENV!=="production"&&sv();return}else q.next=ae,Eve(q.update),q.update();else ae.el=j.el,q.vnode=ae},w=(j,ae,se,q,D,F,$)=>{const re=()=>{if(j.isMounted){let{next:le,bu:Z,u:K,parent:pe,vnode:ie}=j,ve=le,Ye;fe.env.NODE_ENV!=="production"&&ov(le||j.vnode),of(j,!1),le?(le.el=ie.el,A(j,le,$)):le=ie,Z&&Su(Z),(Ye=le.props&&le.props.onVnodeBeforeUpdate)&&vo(Ye,pe,le,ie),of(j,!0),fe.env.NODE_ENV!=="production"&&Ko(j,"render");const Se=Sw(j);fe.env.NODE_ENV!=="production"&&Wo(j,"render");const Ce=j.subTree;j.subTree=Se,fe.env.NODE_ENV!=="production"&&Ko(j,"patch"),E(Ce,Se,m(Ce.el),ue(Ce),j,D,F),fe.env.NODE_ENV!=="production"&&Wo(j,"patch"),le.el=Se.el,ve===null&&Uve(j,Se.el),K&&pi(K,D),(Ye=le.props&&le.props.onVnodeUpdated)&&pi(()=>vo(Ye,pe,le,ie),D),fe.env.NODE_ENV!=="production"&&y9(j),fe.env.NODE_ENV!=="production"&&sv()}else{let le;const{el:Z,props:K}=ae,{bm:pe,m:ie,parent:ve}=j,Ye=gh(ae);if(of(j,!1),pe&&Su(pe),!Ye&&(le=K&&K.onVnodeBeforeMount)&&vo(le,ve,ae),of(j,!0),Z&&J){const Se=()=>{fe.env.NODE_ENV!=="production"&&Ko(j,"render"),j.subTree=Sw(j),fe.env.NODE_ENV!=="production"&&Wo(j,"render"),fe.env.NODE_ENV!=="production"&&Ko(j,"hydrate"),J(Z,j.subTree,j,D,null),fe.env.NODE_ENV!=="production"&&Wo(j,"hydrate")};Ye?ae.type.__asyncLoader().then(()=>!j.isUnmounted&&Se()):Se()}else{fe.env.NODE_ENV!=="production"&&Ko(j,"render");const Se=j.subTree=Sw(j);fe.env.NODE_ENV!=="production"&&Wo(j,"render"),fe.env.NODE_ENV!=="production"&&Ko(j,"patch"),E(null,Se,se,q,j,D,F),fe.env.NODE_ENV!=="production"&&Wo(j,"patch"),ae.el=Se.el}if(ie&&pi(ie,D),!Ye&&(le=K&&K.onVnodeMounted)){const Se=ae;pi(()=>vo(le,ve,Se),D)}(ae.shapeFlag&256||ve&&gh(ve.vnode)&&ve.vnode.shapeFlag&256)&&j.a&&pi(j.a,D),j.isMounted=!0,fe.env.NODE_ENV!=="production"&&Bve(j),ae=se=q=null}},Q=j.effect=new uw(re,()=>fv(te),j.scope),te=j.update=()=>Q.run();te.id=j.uid,of(j,!0),fe.env.NODE_ENV!=="production"&&(Q.onTrack=j.rtc?le=>Su(j.rtc,le):void 0,Q.onTrigger=j.rtg?le=>Su(j.rtg,le):void 0,te.ownerInstance=j),te()},A=(j,ae,se)=>{ae.component=j;const q=j.vnode.props;j.vnode=ae,j.next=null,vme(j,ae.props,q,se),xme(j,ae.children,se),Zl(),h9(),Yl()},x=(j,ae,se,q,D,F,$,re,Q=!1)=>{const te=j&&j.children,le=j?j.shapeFlag:0,Z=ae.children,{patchFlag:K,shapeFlag:pe}=ae;if(K>0){if(K&128){S(te,Z,se,q,D,F,$,re,Q);return}else if(K&256){c(te,Z,se,q,D,F,$,re,Q);return}}pe&8?(le&16&&Y(te,D,F),Z!==te&&d(se,Z)):le&16?pe&16?S(te,Z,se,q,D,F,$,re,Q):Y(te,D,F,!0):(le&8&&d(se,""),pe&16&&L(Z,se,q,D,F,$,re,Q))},c=(j,ae,se,q,D,F,$,re,Q)=>{j=j||Eu,ae=ae||Eu;const te=j.length,le=ae.length,Z=Math.min(te,le);let K;for(K=0;K<Z;K++){const pe=ae[K]=Q?Us(ae[K]):Sa(ae[K]);E(j[K],pe,se,null,D,F,$,re,Q)}te>le?Y(j,D,F,!0,!1,Z):L(ae,se,q,D,F,$,re,Q,Z)},S=(j,ae,se,q,D,F,$,re,Q)=>{let te=0;const le=ae.length;let Z=j.length-1,K=le-1;for(;te<=Z&&te<=K;){const pe=j[te],ie=ae[te]=Q?Us(ae[te]):Sa(ae[te]);if(sf(pe,ie))E(pe,ie,se,null,D,F,$,re,Q);else break;te++}for(;te<=Z&&te<=K;){const pe=j[Z],ie=ae[K]=Q?Us(ae[K]):Sa(ae[K]);if(sf(pe,ie))E(pe,ie,se,null,D,F,$,re,Q);else break;Z--,K--}if(te>Z){if(te<=K){const pe=K+1,ie=pe<le?ae[pe].el:q;for(;te<=K;)E(null,ae[te]=Q?Us(ae[te]):Sa(ae[te]),se,ie,D,F,$,re,Q),te++}}else if(te>K)for(;te<=Z;)R(j[te],D,F,!0),te++;else{const pe=te,ie=te,ve=new Map;for(te=ie;te<=K;te++){const we=ae[te]=Q?Us(ae[te]):Sa(ae[te]);we.key!=null&&(fe.env.NODE_ENV!=="production"&&ve.has(we.key)&&tt("Duplicate keys found during update:",JSON.stringify(we.key),"Make sure keys are unique."),ve.set(we.key,te))}let Ye,Se=0;const Ce=K-ie+1;let Je=!1,he=0;const be=new Array(Ce);for(te=0;te<Ce;te++)be[te]=0;for(te=pe;te<=Z;te++){const we=j[te];if(Se>=Ce){R(we,D,F,!0);continue}let Be;if(we.key!=null)Be=ve.get(we.key);else for(Ye=ie;Ye<=K;Ye++)if(be[Ye-ie]===0&&sf(we,ae[Ye])){Be=Ye;break}Be===void 0?R(we,D,F,!0):(be[Be-ie]=te+1,Be>=he?he=Be:Je=!0,E(we,ae[Be],se,null,D,F,$,re,Q),Se++)}const it=Je?Tme(be):Eu;for(Ye=it.length-1,te=Ce-1;te>=0;te--){const we=ie+te,Be=ae[we],gt=we+1<le?ae[we+1].el:q;be[te]===0?E(null,Be,se,gt,D,F,$,re,Q):Je&&(Ye<0||te!==it[Ye]?B(Be,se,gt,2):Ye--)}}},B=(j,ae,se,q,D=null)=>{const{el:F,type:$,transition:re,children:Q,shapeFlag:te}=j;if(te&6){B(j.component.subTree,ae,se,q);return}if(te&128){j.suspense.move(ae,se,q);return}if(te&64){$.move(j,ae,se,ce);return}if($===wt){n(F,ae,se);for(let Z=0;Z<Q.length;Z++)B(Q[Z],ae,se,q);n(j.anchor,ae,se);return}if($===xh){N(j,ae,se);return}if(q!==2&&te&1&&re)if(q===0)re.beforeEnter(F),n(F,ae,se),pi(()=>re.enter(F),D);else{const{leave:Z,delayLeave:K,afterLeave:pe}=re,ie=()=>n(F,ae,se),ve=()=>{Z(F,()=>{ie(),pe&&pe()})};K?K(F,ie,ve):ve()}else n(F,ae,se)},R=(j,ae,se,q=!1,D=!1)=>{const{type:F,props:$,ref:re,children:Q,dynamicChildren:te,shapeFlag:le,patchFlag:Z,dirs:K}=j;if(re!=null&&Uw(re,null,se,j,!0),le&256){ae.ctx.deactivate(j);return}const pe=le&1&&K,ie=!gh(j);let ve;if(ie&&(ve=$&&$.onVnodeBeforeUnmount)&&vo(ve,ae,j),le&6)G(j.component,se,q);else{if(le&128){j.suspense.unmount(se,q);return}pe&&nf(j,null,ae,"beforeUnmount"),le&64?j.type.remove(j,ae,se,D,ce,q):te&&(F!==wt||Z>0&&Z&64)?Y(te,ae,se,!1,!0):(F===wt&&Z&384||!D&&le&16)&&Y(Q,ae,se),q&&H(j)}(ie&&(ve=$&&$.onVnodeUnmounted)||pe)&&pi(()=>{ve&&vo(ve,ae,j),pe&&nf(j,null,ae,"unmounted")},se)},H=j=>{const{type:ae,el:se,anchor:q,transition:D}=j;if(ae===wt){fe.env.NODE_ENV!=="production"&&j.patchFlag>0&&j.patchFlag&2048&&D&&!D.persisted?j.children.forEach($=>{$.type===mn?a($.el):H($)}):X(se,q);return}if(ae===xh){O(j);return}const F=()=>{a(se),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(j.shapeFlag&1&&D&&!D.persisted){const{leave:$,delayLeave:re}=D,Q=()=>$(se,F);re?re(j.el,F,Q):Q()}else F()},X=(j,ae)=>{let se;for(;j!==ae;)se=v(j),a(j),j=se;a(ae)},G=(j,ae,se)=>{fe.env.NODE_ENV!=="production"&&j.type.__hmrId&&Mve(j);const{bum:q,scope:D,update:F,subTree:$,um:re}=j;q&&Su(q),D.stop(),F&&(F.active=!1,R($,j,ae,se)),re&&pi(re,ae),pi(()=>{j.isUnmounted=!0},ae),ae&&ae.pendingBranch&&!ae.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===ae.pendingId&&(ae.deps--,ae.deps===0&&ae.resolve()),fe.env.NODE_ENV!=="production"&&Nve(j)},Y=(j,ae,se,q=!1,D=!1,F=0)=>{for(let $=F;$<j.length;$++)R(j[$],ae,se,q,D)},ue=j=>j.shapeFlag&6?ue(j.component.subTree):j.shapeFlag&128?j.suspense.next():v(j.anchor||j.el),oe=(j,ae,se)=>{j==null?ae._vnode&&R(ae._vnode,null,null,!0):E(ae._vnode||null,j,ae,null,null,null,se),h9(),d9(),ae._vnode=j},ce={p:E,um:R,m:B,r:H,mt:g,mc:L,pc:x,pbc:M,n:ue,o:e};let ne,J;return t&&([ne,J]=t(ce)),{render:oe,hydrate:ne,createApp:hme(oe,ne)}}function of({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function Eh(e,t,r=!1){const n=e.children,a=t.children;if(mt(n)&&mt(a))for(let i=0;i<n.length;i++){const o=n[i];let l=a[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[i]=Us(a[i]),l.el=o.el),r||Eh(o,l)),l.type===zs&&(l.el=o.el),fe.env.NODE_ENV!=="production"&&l.type===mn&&!l.el&&(l.el=o.el)}}function Tme(e){const t=e.slice(),r=[0];let n,a,i,o,l;const f=e.length;for(n=0;n<f;n++){const u=e[n];if(u!==0){if(a=r[r.length-1],e[a]<u){t[n]=a,r.push(n);continue}for(i=0,o=r.length-1;i<o;)l=i+o>>1,e[r[l]]<u?i=l+1:o=l;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}const Ame=e=>e.__isTeleport,Iu=e=>e&&(e.disabled||e.disabled===""),rk=e=>typeof SVGElement<"u"&&e instanceof SVGElement,qw=(e,t)=>{const r=e&&e.to;if(Bt(r))if(t){const n=t(r);return n||fe.env.NODE_ENV!=="production"&&tt(`Failed to locate Teleport target with selector "${r}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),n}else return fe.env.NODE_ENV!=="production"&&tt("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return fe.env.NODE_ENV!=="production"&&!r&&!Iu(e)&&tt(`Invalid Teleport target: ${r}`),r},Ime={__isTeleport:!0,process(e,t,r,n,a,i,o,l,f,u){const{mc:d,pc:m,pbc:v,o:{insert:y,querySelector:_,createText:E,createComment:C}}=u,T=Iu(t.props);let{shapeFlag:I,children:k,dynamicChildren:N}=t;if(fe.env.NODE_ENV!=="production"&&Ds&&(f=!1,N=null),e==null){const O=t.el=fe.env.NODE_ENV!=="production"?C("teleport start"):E(""),P=t.anchor=fe.env.NODE_ENV!=="production"?C("teleport end"):E("");y(O,r,n),y(P,r,n);const z=t.target=qw(t.props,_),V=t.targetAnchor=E("");z?(y(V,z),o=o||rk(z)):fe.env.NODE_ENV!=="production"&&!T&&tt("Invalid Teleport target on mount:",z,`(${typeof z})`);const L=(U,M)=>{I&16&&d(k,U,M,a,i,o,l,f)};T?L(r,P):z&&L(z,V)}else{t.el=e.el;const O=t.anchor=e.anchor,P=t.target=e.target,z=t.targetAnchor=e.targetAnchor,V=Iu(e.props),L=V?r:P,U=V?O:z;if(o=o||rk(P),N?(v(e.dynamicChildren,N,L,a,i,o,l),Eh(e,t,!0)):f||m(e,t,L,U,a,i,o,l,!1),T)V||_v(t,r,O,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=qw(t.props,_);M?_v(t,M,null,u,0):fe.env.NODE_ENV!=="production"&&tt("Invalid Teleport target on update:",P,`(${typeof P})`)}else V&&_v(t,P,z,u,1)}nk(t)},remove(e,t,r,n,{um:a,o:{remove:i}},o){const{shapeFlag:l,children:f,anchor:u,targetAnchor:d,target:m,props:v}=e;if(m&&i(d),(o||!Iu(v))&&(i(u),l&16))for(let y=0;y<f.length;y++){const _=f[y];a(_,t,r,!0,!!_.dynamicChildren)}},move:_v,hydrate:Bme};function _v(e,t,r,{o:{insert:n},m:a},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:l,shapeFlag:f,children:u,props:d}=e,m=i===2;if(m&&n(o,t,r),(!m||Iu(d))&&f&16)for(let v=0;v<u.length;v++)a(u[v],t,r,2);m&&n(l,t,r)}function Bme(e,t,r,n,a,i,{o:{nextSibling:o,parentNode:l,querySelector:f}},u){const d=t.target=qw(t.props,f);if(d){const m=d._lpa||d.firstChild;if(t.shapeFlag&16)if(Iu(t.props))t.anchor=u(o(e),t,l(e),r,n,a,i),t.targetAnchor=m;else{t.anchor=o(e);let v=m;for(;v;)if(v=o(v),v&&v.nodeType===8&&v.data==="teleport anchor"){t.targetAnchor=v,d._lpa=t.targetAnchor&&o(t.targetAnchor);break}u(m,t,d,r,n,a,i)}nk(t)}return t.anchor&&o(t.anchor)}const kme=Ime;function nk(e){const t=e.ctx;if(t&&t.ut){let r=e.children[0].el;for(;r!==e.targetAnchor;)r.nodeType===1&&r.setAttribute("data-v-owner",t.uid),r=r.nextSibling;t.ut()}}const wt=Symbol.for("v-fgt"),zs=Symbol.for("v-txt"),mn=Symbol.for("v-cmt"),xh=Symbol.for("v-stc"),Sh=[];let wa=null;function me(e=!1){Sh.push(wa=e?null:[])}function Nme(){Sh.pop(),wa=Sh[Sh.length-1]||null}let Mh=1;function ik(e){Mh+=e}function ak(e){return e.dynamicChildren=Mh>0?wa||Eu:null,Nme(),Mh>0&&wa&&wa.push(e),e}function Fe(e,t,r,n,a,i){return ak(Ue(e,t,r,n,a,i,!0))}function et(e,t,r,n,a){return ak(ht(e,t,r,n,a,!0))}function Ea(e){return e?e.__v_isVNode===!0:!1}function sf(e,t){return fe.env.NODE_ENV!=="production"&&t.shapeFlag&6&&Tu.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const Ome=(...e)=>sk(...e),wv="__vInternal",ok=({key:e})=>e??null,Ev=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Bt(e)||hr(e)||bt(e)?{i:vn,r:e,k:t,f:!!r}:e:null);function Ue(e,t=null,r=null,n=0,a=null,i=e===wt?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ok(t),ref:t&&Ev(t),scopeId:w9,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:vn};return l?(Vw(f,r),i&128&&e.normalize(f)):r&&(f.shapeFlag|=Bt(r)?8:16),fe.env.NODE_ENV!=="production"&&f.key!==f.key&&tt("VNode created with invalid key (NaN). VNode type:",f.type),Mh>0&&!o&&wa&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&wa.push(f),f}const ht=fe.env.NODE_ENV!=="production"?Ome:sk;function sk(e,t=null,r=null,n=0,a=null,i=!1){if((!e||e===O9)&&(fe.env.NODE_ENV!=="production"&&!e&&tt(`Invalid vnode type when creating vnode: ${e}.`),e=mn),Ea(e)){const l=xa(e,t,!0);return r&&Vw(l,r),Mh>0&&!i&&wa&&(l.shapeFlag&6?wa[wa.indexOf(e)]=l:wa.push(l)),l.patchFlag|=-2,l}if(vk(e)&&(e=e.__vccOpts),t){t=Rme(t);let{class:l,style:f}=t;l&&!Bt(l)&&(t.class=Te(l)),Dt(f)&&(av(f)&&!mt(f)&&(f=xr({},f)),t.style=on(f))}const o=Bt(e)?1:qve(e)?128:Ame(e)?64:Dt(e)?4:bt(e)?2:0;return fe.env.NODE_ENV!=="production"&&o&4&&av(e)&&(e=Tt(e),tt("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
838
+ Component that was made reactive: `,e)),Ue(e,t,r,n,a,o,i,!0)}function Rme(e){return e?av(e)||wv in e?xr({},e):e:null}function xa(e,t,r=!1){const{props:n,ref:a,patchFlag:i,children:o}=e,l=t?Ai(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ok(l),ref:t&&t.ref?r&&a?mt(a)?a.concat(Ev(t)):[a,Ev(t)]:Ev(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:fe.env.NODE_ENV!=="production"&&i===-1&&mt(o)?o.map(lk):o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==wt?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xa(e.ssContent),ssFallback:e.ssFallback&&xa(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function lk(e){const t=xa(e);return mt(e.children)&&(t.children=e.children.map(lk)),t}function br(e=" ",t=0){return ht(zs,null,e,t)}function Pme(e,t){const r=ht(xh,null,e);return r.staticCount=t,r}function Xe(e="",t=!1){return t?(me(),et(mn,null,e)):ht(mn,null,e)}function Sa(e){return e==null||typeof e=="boolean"?ht(mn):mt(e)?ht(wt,null,e.slice()):typeof e=="object"?Us(e):ht(zs,null,String(e))}function Us(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xa(e)}function Vw(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(mt(t))r=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),Vw(e,a()),a._c&&(a._d=!0));return}else{r=32;const a=t._;!a&&!(wv in t)?t._ctx=vn:a===3&&vn&&(vn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else bt(t)?(t={default:t,_ctx:vn},r=32):(t=String(t),n&64?(r=16,t=[br(t)]):r=8);e.children=t,e.shapeFlag|=r}function Ai(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Te([t.class,n.class]));else if(a==="style")t.style=on([t.style,n.style]);else if(nh(a)){const i=t[a],o=n[a];o&&i!==o&&!(mt(i)&&i.includes(o))&&(t[a]=i?[].concat(i,o):o)}else a!==""&&(t[a]=n[a])}return t}function vo(e,t,r,n=null){na(e,t,7,[r,n])}const Fme=H9();let Lme=0;function Dme(e,t,r){const n=e.type,a=(t?t.appContext:e.appContext)||Fme,i={uid:Lme++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new FB(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:K9(n,a),emitsOptions:_9(n,a),emit:null,emitted:null,propsDefaults:yr,inheritAttrs:n.inheritAttrs,ctx:yr,data:yr,props:yr,attrs:yr,slots:yr,refs:yr,setupState:yr,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return fe.env.NODE_ENV!=="production"?i.ctx=rme(i):i.ctx={_:i},i.root=t?t.root:i,i.emit=Fve.bind(null,i),e.ce&&e.ce(i),i}let gn=null;const rn=()=>gn||vn;let Hw,Bu,fk="__VUE_INSTANCE_SETTERS__";(Bu=Kp()[fk])||(Bu=Kp()[fk]=[]),Bu.push(e=>gn=e),Hw=e=>{Bu.length>1?Bu.forEach(t=>t(e)):Bu[0](e)};const ku=e=>{Hw(e),e.scope.on()},lf=()=>{gn&&gn.scope.off(),Hw(null)},$me=ks("slot,component");function jw(e,t){const r=t.isNativeTag||IB;($me(e)||r(e))&&tt("Do not use built-in or reserved HTML elements as component id: "+e)}function uk(e){return e.vnode.shapeFlag&4}let Ch=!1;function zme(e,t=!1){Ch=t;const{props:r,children:n}=e.vnode,a=uk(e);dme(e,r,a,t),Eme(e,n);const i=a?Ume(e,t):void 0;return Ch=!1,i}function Ume(e,t){var r;const n=e.type;if(fe.env.NODE_ENV!=="production"){if(n.name&&jw(n.name,e.appContext.config),n.components){const i=Object.keys(n.components);for(let o=0;o<i.length;o++)jw(i[o],e.appContext.config)}if(n.directives){const i=Object.keys(n.directives);for(let o=0;o<i.length;o++)C9(i[o])}n.compilerOptions&&qme()&&tt('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=n9(new Proxy(e.ctx,F9)),fe.env.NODE_ENV!=="production"&&nme(e);const{setup:a}=n;if(a){const i=e.setupContext=a.length>1?pk(e):null;ku(e),Zl();const o=Ho(a,e,0,[fe.env.NODE_ENV!=="production"?sh(e.props):e.props,i]);if(Yl(),lf(),aw(o)){if(o.then(lf,lf),t)return o.then(l=>{ck(e,l,t)}).catch(l=>{lv(l,e,0)});if(e.asyncDep=o,fe.env.NODE_ENV!=="production"&&!e.suspense){const l=(r=n.name)!=null?r:"Anonymous";tt(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else ck(e,o,t)}else hk(e,t)}function ck(e,t,r){bt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Dt(t)?(fe.env.NODE_ENV!=="production"&&Ea(t)&&tt("setup() should not return VNodes directly - return a render function instead."),fe.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=o9(t),fe.env.NODE_ENV!=="production"&&ime(e)):fe.env.NODE_ENV!=="production"&&t!==void 0&&tt(`setup() should return an object. Received: ${t===null?"null":typeof t}`),hk(e,r)}let Kw;const qme=()=>!Kw;function hk(e,t,r){const n=e.type;if(!e.render){if(!t&&Kw&&!n.render){const a=n.template||Fw(e).template;if(a){fe.env.NODE_ENV!=="production"&&Ko(e,"compile");const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:f}=n,u=xr(xr({isCustomElement:i,delimiters:l},o),f);n.render=Kw(a,u),fe.env.NODE_ENV!=="production"&&Wo(e,"compile")}}e.render=n.render||an}ku(e),Zl(),ome(e),Yl(),lf(),fe.env.NODE_ENV!=="production"&&!n.render&&e.render===an&&!t&&(n.template?tt('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):tt("Component is missing template or render function."))}function dk(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,fe.env.NODE_ENV!=="production"?{get(t,r){return hv(),Nn(e,"get","$attrs"),t[r]},set(){return tt("setupContext.attrs is readonly."),!1},deleteProperty(){return tt("setupContext.attrs is readonly."),!1}}:{get(t,r){return Nn(e,"get","$attrs"),t[r]}}))}function Vme(e){return e.slotsProxy||(e.slotsProxy=new Proxy(e.slots,{get(t,r){return Nn(e,"get","$slots"),t[r]}}))}function pk(e){const t=r=>{if(fe.env.NODE_ENV!=="production"&&(e.exposed&&tt("expose() should be called only once per setup()."),r!=null)){let n=typeof r;n==="object"&&(mt(r)?n="array":hr(r)&&(n="ref")),n!=="object"&&tt(`expose() should be passed a plain object, received ${n}.`)}e.exposed=r||{}};return fe.env.NODE_ENV!=="production"?Object.freeze({get attrs(){return dk(e)},get slots(){return Vme(e)},get emit(){return(r,...n)=>e.emit(r,...n)},expose:t}):{get attrs(){return dk(e)},slots:e.slots,emit:e.emit,expose:t}}function xv(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(o9(n9(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in af)return af[r](e)},has(t,r){return r in t||r in af}}))}const Hme=/(?:^|[-_])(\w)/g,jme=e=>e.replace(Hme,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ww(e,t=!0){return bt(e)?e.displayName||e.name:e.name||t&&e.__name}function Sv(e,t,r=!1){let n=Ww(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e&&e.parent){const a=i=>{for(const o in i)if(i[o]===t)return o};n=a(e.components||e.parent.type.components)||a(e.appContext.components)}return n?jme(n):r?"App":"Anonymous"}function vk(e){return bt(e)&&"__vccOpts"in e}const Ee=(e,t)=>dve(e,t,Ch);function vt(e,t,r){const n=arguments.length;return n===2?Dt(t)&&!mt(t)?Ea(t)?ht(e,null,[t]):ht(e,t):ht(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ea(r)&&(r=[r]),ht(e,t,r))}const Kme=Symbol.for("v-scx"),Wme=()=>{{const e=At(Kme);return e||fe.env.NODE_ENV!=="production"&&tt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Gw(e){return!!(e&&e.__v_isShallow)}function Gme(){if(fe.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},r={style:"color:#b62e24"},n={style:"color:#9d288c"},a={header(m){return Dt(m)?m.__isVue?["div",e,"VueInstance"]:hr(m)?["div",{},["span",e,d(m)],"<",l(m.value),">"]:Jl(m)?["div",{},["span",e,Gw(m)?"ShallowReactive":"Reactive"],"<",l(m),`>${Fs(m)?" (readonly)":""}`]:Fs(m)?["div",{},["span",e,Gw(m)?"ShallowReadonly":"Readonly"],"<",l(m),">"]:null:null},hasBody(m){return m&&m.__isVue},body(m){if(m&&m.__isVue)return["div",{},...i(m.$)]}};function i(m){const v=[];m.type.props&&m.props&&v.push(o("props",Tt(m.props))),m.setupState!==yr&&v.push(o("setup",m.setupState)),m.data!==yr&&v.push(o("data",Tt(m.data)));const y=f(m,"computed");y&&v.push(o("computed",y));const _=f(m,"inject");return _&&v.push(o("injected",_)),v.push(["div",{},["span",{style:n.style+";opacity:0.66"},"$ (internal): "],["object",{object:m}]]),v}function o(m,v){return v=xr({},v),Object.keys(v).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},m],["div",{style:"padding-left:1.25em"},...Object.keys(v).map(y=>["div",{},["span",n,y+": "],l(v[y],!1)])]]:["span",{}]}function l(m,v=!0){return typeof m=="number"?["span",t,m]:typeof m=="string"?["span",r,JSON.stringify(m)]:typeof m=="boolean"?["span",n,m]:Dt(m)?["object",{object:v?Tt(m):m}]:["span",r,String(m)]}function f(m,v){const y=m.type;if(bt(y))return;const _={};for(const E in m.ctx)u(y,E,v)&&(_[E]=m.ctx[E]);return _}function u(m,v,y){const _=m[y];if(mt(_)&&_.includes(v)||Dt(_)&&v in _||m.extends&&u(m.extends,v,y)||m.mixins&&m.mixins.some(E=>u(E,v,y)))return!0}function d(m){return Gw(m)?"ShallowRef":m.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(a):window.devtoolsFormatters=[a]}const mk="3.3.4",Zme="http://www.w3.org/2000/svg",ff=typeof document<"u"?document:null,gk=ff&&ff.createElement("template"),Yme={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const a=t?ff.createElementNS(Zme,e):ff.createElement(e,r?{is:r}:void 0);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>ff.createTextNode(e),createComment:e=>ff.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ff.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,a,i){const o=r?r.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===i||!(a=a.nextSibling)););else{gk.innerHTML=n?`<svg>${e}</svg>`:e;const l=gk.content;if(n){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function Jme(e,t,r){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function Xme(e,t,r){const n=e.style,a=Bt(r);if(r&&!a){if(t&&!Bt(t))for(const i in t)r[i]==null&&Zw(n,i,"");for(const i in r)Zw(n,i,r[i])}else{const i=n.display;a?t!==r&&(n.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(n.display=i)}}const Qme=/[^\\];\s*$/,yk=/\s*!important$/;function Zw(e,t,r){if(mt(r))r.forEach(n=>Zw(e,t,n));else if(r==null&&(r=""),fe.env.NODE_ENV!=="production"&&Qme.test(r)&&tt(`Unexpected semicolon at the end of '${t}' style value: '${r}'`),t.startsWith("--"))e.setProperty(t,r);else{const n=ege(e,t);yk.test(r)?e.setProperty(lo(n),r.replace(yk,""),"important"):e[n]=r}}const bk=["Webkit","Moz","ms"],Yw={};function ege(e,t){const r=Yw[t];if(r)return r;let n=_a(t);if(n!=="filter"&&n in e)return Yw[t]=n;n=Wl(n);for(let a=0;a<bk.length;a++){const i=bk[a]+n;if(i in e)return Yw[t]=i}return t}const _k="http://www.w3.org/1999/xlink";function tge(e,t,r,n,a){if(n&&t.startsWith("xlink:"))r==null?e.removeAttributeNS(_k,t.slice(6,t.length)):e.setAttributeNS(_k,t,r);else{const i=Ipe(t);r==null||i&&!RB(r)?e.removeAttribute(t):e.setAttribute(t,i?"":r)}}function rge(e,t,r,n,a,i,o){if(t==="innerHTML"||t==="textContent"){n&&o(n,a,i),e[t]=r??"";return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){e._value=r;const u=l==="OPTION"?e.getAttribute("value"):e.value,d=r??"";u!==d&&(e.value=d),r==null&&e.removeAttribute(t);return}let f=!1;if(r===""||r==null){const u=typeof e[t];u==="boolean"?r=RB(r):r==null&&u==="string"?(r="",f=!0):u==="number"&&(r=0,f=!0)}try{e[t]=r}catch(u){fe.env.NODE_ENV!=="production"&&!f&&tt(`Failed setting prop "${t}" on <${l.toLowerCase()}>: value ${r} is invalid.`,u)}f&&e.removeAttribute(t)}function Nu(e,t,r,n){e.addEventListener(t,r,n)}function nge(e,t,r,n){e.removeEventListener(t,r,n)}function ige(e,t,r,n,a=null){const i=e._vei||(e._vei={}),o=i[t];if(n&&o)o.value=n;else{const[l,f]=age(t);if(n){const u=i[t]=lge(n,a);Nu(e,l,u,f)}else o&&(nge(e,l,o,f),i[t]=void 0)}}const wk=/(?:Once|Passive|Capture)$/;function age(e){let t;if(wk.test(e)){t={};let n;for(;n=e.match(wk);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):lo(e.slice(2)),t]}let Jw=0;const oge=Promise.resolve(),sge=()=>Jw||(oge.then(()=>Jw=0),Jw=Date.now());function lge(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;na(fge(n,r.value),t,5,[n])};return r.value=e,r.attached=sge(),r}function fge(e,t){if(mt(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const Ek=/^on[a-z]/,uge=(e,t,r,n,a=!1,i,o,l,f)=>{t==="class"?Jme(e,n,a):t==="style"?Xme(e,r,n):nh(t)?Up(t)||ige(e,t,r,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cge(e,t,n,a))?rge(e,t,n,i,o,l,f):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),tge(e,t,n,a))};function cge(e,t,r,n){return n?!!(t==="innerHTML"||t==="textContent"||t in e&&Ek.test(t)&&bt(r)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Ek.test(t)&&Bt(r)?!1:t in e}const qs="transition",Th="animation",aa=(e,{slots:t})=>vt(Kve,Mk(e),t);aa.displayName="Transition";const xk={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hge=aa.props=xr({},A9,xk),uf=(e,t=[])=>{mt(e)?e.forEach(r=>r(...t)):e&&e(...t)},Sk=e=>e?mt(e)?e.some(t=>t.length>1):e.length>1:!1;function Mk(e){const t={};for(const s in e)s in xk||(t[s]=e[s]);if(e.css===!1)return t;const{name:r="v",type:n,duration:a,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:f=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:m=`${r}-leave-from`,leaveActiveClass:v=`${r}-leave-active`,leaveToClass:y=`${r}-leave-to`}=e,_=dge(a),E=_&&_[0],C=_&&_[1],{onBeforeEnter:T,onEnter:I,onEnterCancelled:k,onLeave:N,onLeaveCancelled:O,onBeforeAppear:P=T,onAppear:z=I,onAppearCancelled:V=k}=t,L=(s,h,p)=>{Vs(s,h?d:l),Vs(s,h?u:o),p&&p()},U=(s,h)=>{s._isLeaving=!1,Vs(s,m),Vs(s,y),Vs(s,v),h&&h()},M=s=>(h,p)=>{const g=s?z:I,b=()=>L(h,s,p);uf(g,[h,b]),Ck(()=>{Vs(h,s?f:i),Go(h,s?d:l),Sk(g)||Tk(h,n,E,b)})};return xr(t,{onBeforeEnter(s){uf(T,[s]),Go(s,i),Go(s,o)},onBeforeAppear(s){uf(P,[s]),Go(s,f),Go(s,u)},onEnter:M(!1),onAppear:M(!0),onLeave(s,h){s._isLeaving=!0;const p=()=>U(s,h);Go(s,m),kk(),Go(s,v),Ck(()=>{s._isLeaving&&(Vs(s,m),Go(s,y),Sk(N)||Tk(s,n,C,p))}),uf(N,[s,p])},onEnterCancelled(s){L(s,!1),uf(k,[s])},onAppearCancelled(s){L(s,!0),uf(V,[s])},onLeaveCancelled(s){U(s),uf(O,[s])}})}function dge(e){if(e==null)return null;if(Dt(e))return[Xw(e.enter),Xw(e.leave)];{const t=Xw(e);return[t,t]}}function Xw(e){const t=_pe(e);return fe.env.NODE_ENV!=="production"&&yve(t,"<transition> explicit duration"),t}function Go(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e._vtc||(e._vtc=new Set)).add(t)}function Vs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const{_vtc:r}=e;r&&(r.delete(t),r.size||(e._vtc=void 0))}function Ck(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let pge=0;function Tk(e,t,r,n){const a=e._endId=++pge,i=()=>{a===e._endId&&n()};if(r)return setTimeout(i,r);const{type:o,timeout:l,propCount:f}=Ak(e,t);if(!o)return n();const u=o+"end";let d=0;const m=()=>{e.removeEventListener(u,v),i()},v=y=>{y.target===e&&++d>=f&&m()};setTimeout(()=>{d<f&&m()},l+1),e.addEventListener(u,v)}function Ak(e,t){const r=window.getComputedStyle(e),n=_=>(r[_]||"").split(", "),a=n(`${qs}Delay`),i=n(`${qs}Duration`),o=Ik(a,i),l=n(`${Th}Delay`),f=n(`${Th}Duration`),u=Ik(l,f);let d=null,m=0,v=0;t===qs?o>0&&(d=qs,m=o,v=i.length):t===Th?u>0&&(d=Th,m=u,v=f.length):(m=Math.max(o,u),d=m>0?o>u?qs:Th:null,v=d?d===qs?i.length:f.length:0);const y=d===qs&&/\b(transform|all)(,|$)/.test(n(`${qs}Property`).toString());return{type:d,timeout:m,propCount:v,hasTransform:y}}function Ik(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Bk(r)+Bk(e[n])))}function Bk(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function kk(){return document.body.offsetHeight}const Nk=new WeakMap,Ok=new WeakMap,Rk={name:"TransitionGroup",props:xr({},hge,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=rn(),n=T9();let a,i;return Au(()=>{if(!a.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!_ge(a[0].el,r.vnode.el,o))return;a.forEach(gge),a.forEach(yge);const l=a.filter(bge);kk(),l.forEach(f=>{const u=f.el,d=u.style;Go(u,o),d.transform=d.webkitTransform=d.transitionDuration="";const m=u._moveCb=v=>{v&&v.target!==u||(!v||/transform$/.test(v.propertyName))&&(u.removeEventListener("transitionend",m),u._moveCb=null,Vs(u,o))};u.addEventListener("transitionend",m)})}),()=>{const o=Tt(e),l=Mk(o);let f=o.tag||wt;a=i,i=t.default?Tw(t.default()):[];for(let u=0;u<i.length;u++){const d=i[u];d.key!=null?mh(d,vh(d,l,n,r)):fe.env.NODE_ENV!=="production"&&tt("<TransitionGroup> children must be keyed.")}if(a)for(let u=0;u<a.length;u++){const d=a[u];mh(d,vh(d,l,n,r)),Nk.set(d,d.el.getBoundingClientRect())}return ht(f,null,i)}}},vge=e=>delete e.mode;Rk.props;const mge=Rk;function gge(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function yge(e){Ok.set(e,e.el.getBoundingClientRect())}function bge(e){const t=Nk.get(e),r=Ok.get(e),n=t.left-r.left,a=t.top-r.top;if(n||a){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${n}px,${a}px)`,i.transitionDuration="0s",e}}function _ge(e,t,r){const n=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(n);const{hasTransform:i}=Ak(n);return a.removeChild(n),i}const Pk=e=>{const t=e.props["onUpdate:modelValue"]||!1;return mt(t)?r=>Su(t,r):t};function wge(e){e.target.composing=!0}function Fk(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ege={created(e,{modifiers:{lazy:t,trim:r,number:n}},a){e._assign=Pk(a);const i=n||a.props&&a.props.type==="number";Nu(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;r&&(l=l.trim()),i&&(l=sw(l)),e._assign(l)}),r&&Nu(e,"change",()=>{e.value=e.value.trim()}),t||(Nu(e,"compositionstart",wge),Nu(e,"compositionend",Fk),Nu(e,"change",Fk))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:r,trim:n,number:a}},i){if(e._assign=Pk(i),e.composing||document.activeElement===e&&e.type!=="range"&&(r||n&&e.value.trim()===t||(a||e.type==="number")&&sw(e.value)===t))return;const o=t??"";e.value!==o&&(e.value=o)}},xge=["ctrl","shift","alt","meta"],Sge={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xge.some(r=>e[`${r}Key`]&&!t.includes(r))},Cn=(e,t)=>(r,...n)=>{for(let a=0;a<t.length;a++){const i=Sge[t[a]];if(i&&i(r,t))return}return e(r,...n)},Mge={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ma=(e,t)=>r=>{if(!("key"in r))return;const n=lo(r.key);if(t.some(a=>a===n||Mge[a]===n))return e(r)},vi={beforeMount(e,{value:t},{transition:r}){e._vod=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):Ah(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),Ah(e,!0),n.enter(e)):n.leave(e,()=>{Ah(e,!1)}):Ah(e,t))},beforeUnmount(e,{value:t}){Ah(e,t)}};function Ah(e,t){e.style.display=t?e._vod:"none"}const Cge=xr({patchProp:uge},Yme);let Lk;function Dk(){return Lk||(Lk=Mme(Cge))}const $k=(...e)=>{Dk().render(...e)},zk=(...e)=>{const t=Dk().createApp(...e);fe.env.NODE_ENV!=="production"&&(Tge(t),Age(t));const{mount:r}=t;return t.mount=n=>{const a=Ige(n);if(!a)return;const i=t._component;!bt(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.innerHTML="";const o=r(a,!1,a instanceof SVGElement);return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},t};function Tge(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Tpe(t)||Ape(t),writable:!1})}function Age(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){tt("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const r=e.config.compilerOptions,n='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return tt(n),r},set(){tt(n)}})}}function Ige(e){if(Bt(e)){const t=document.querySelector(e);return fe.env.NODE_ENV!=="production"&&!t&&tt(`Failed to mount app: mount target selector "${e}" returned null.`),t}return fe.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&tt('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function Bge(){Gme()}fe.env.NODE_ENV!=="production"&&Bge();var kge=Object.defineProperty,Nge=(e,t,r)=>t in e?kge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uk=(e,t,r)=>(Nge(e,typeof t!="symbol"?t+"":t,r),r);const ai={debug:!1,masked:!1,prefix:"",suffix:"",thousands:",",decimal:".",precision:2,disableNegative:!1,disabled:!1,min:null,max:null,allowBlank:!1,minimumNumberOfCharacters:0,modelModifiers:{number:!1},shouldRound:!0,focusOnRight:!1},qk=["+","-"],Vk=["decimal","thousands","prefix","suffix"];function Zo(e){return Math.max(0,Math.min(e,1e3))}function Mv(e,t){return e=e.padStart(t+1,"0"),t===0?e:`${e.slice(0,-t)}.${e.slice(-t)}`}function Hk(e){return e=e?e.toString():"",e.replace(/\D+/g,"")||"0"}function Oge(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,`$1${t}`)}function Rge(e,t,r){return t?e+r+t:e}function Ih(e,t){return qk.includes(e)?(console.warn(`v-money3 "${t}" property don't accept "${e}" as a value.`),!1):/\d/g.test(e)?(console.warn(`v-money3 "${t}" property don't accept "${e}" (any number) as a value.`),!1):!0}function Pge(e){for(const t of Vk)if(!Ih(e[t],t))return!1;return!0}function Cv(e){for(const t of Vk){e[t]=e[t].replace(/\d+/g,"");for(const r of qk)e[t]=e[t].replaceAll(r,"")}return e}function jk(e){const t=e.length,r=e.indexOf(".");return t-(r+1)}function Kk(e){return e.replace(/^(-?)0+(?!\.)(.+)/,"$1$2")}function Wk(e){return/^-?[\d]+$/g.test(e)}function Gk(e){return/^-?[\d]+(\.[\d]+)$/g.test(e)}function Zk(e,t,r){return t>e.length-1?e:e.substring(0,t)+r+e.substring(t+1)}function Yk(e,t){const r=t-jk(e);if(r>=0)return e;let n=e.slice(0,r);const a=e.slice(r);if(n.charAt(n.length-1)==="."&&(n=n.slice(0,-1)),parseInt(a.charAt(0),10)>=5){for(let i=n.length-1;i>=0;i-=1){const o=n.charAt(i);if(o!=="."&&o!=="-"){const l=parseInt(o,10)+1;if(l<10)return Zk(n,i,l);n=Zk(n,i,"0")}}return`1${n}`}return n}function Jk(e,t){const r=()=>{e.setSelectionRange(t,t)};e===document.activeElement&&(r(),setTimeout(r,1))}function Xk(e){return new Event(e,{bubbles:!0,cancelable:!1})}function Wt({debug:e=!1},...t){e&&console.log(...t)}class Tv{constructor(t){Uk(this,"number",0n),Uk(this,"decimal",0),this.setNumber(t)}getNumber(){return this.number}getDecimalPrecision(){return this.decimal}setNumber(t){this.decimal=0,typeof t=="bigint"?this.number=t:typeof t=="number"?this.setupString(t.toString()):this.setupString(t)}toFixed(t=0,r=!0){let n=this.toString();const a=t-this.getDecimalPrecision();return a>0?(n.includes(".")||(n+="."),n.padEnd(n.length+a,"0")):a<0?r?Yk(n,t):n.slice(0,a):n}toString(){let t=this.number.toString();if(this.decimal){let r=!1;return t.charAt(0)==="-"&&(t=t.substring(1),r=!0),t=t.padStart(t.length+this.decimal,"0"),t=`${t.slice(0,-this.decimal)}.${t.slice(-this.decimal)}`,t=Kk(t),(r?"-":"")+t}return t}lessThan(t){const[r,n]=this.adjustComparisonNumbers(t);return r<n}biggerThan(t){const[r,n]=this.adjustComparisonNumbers(t);return r>n}isEqual(t){const[r,n]=this.adjustComparisonNumbers(t);return r===n}setupString(t){if(t=Kk(t),Wk(t))this.number=BigInt(t);else if(Gk(t))this.decimal=jk(t),this.number=BigInt(t.replace(".",""));else throw new Error(`BigNumber has received and invalid format for the constructor: ${t}`)}adjustComparisonNumbers(t){let r;t.constructor.name!=="BigNumber"?r=new Tv(t):r=t;const n=this.getDecimalPrecision()-r.getDecimalPrecision();let a=this.getNumber(),i=r.getNumber();return n>0?i=r.getNumber()*10n**BigInt(n):n<0&&(a=this.getNumber()*10n**BigInt(n*-1)),[a,i]}}function Qw(e,t=ai,r=""){if(Wt(t,"utils format() - caller",r),Wt(t,"utils format() - input1",e),e==null)e="";else if(typeof e=="number")t.shouldRound?e=e.toFixed(Zo(t.precision)):e=e.toFixed(Zo(t.precision)+1).slice(0,-1);else if(t.modelModifiers&&t.modelModifiers.number&&Wk(e))e=Number(e).toFixed(Zo(t.precision));else if(!t.disableNegative&&e==="-")return e;Wt(t,"utils format() - input2",e);const n=t.disableNegative?"":e.indexOf("-")>=0?"-":"";let a=e.replace(t.prefix,"").replace(t.suffix,"");Wt(t,"utils format() - filtered",a),!t.precision&&t.thousands!=="."&&Gk(a)&&(a=Yk(a,0),Wt(t,"utils format() - !opt.precision && isValidFloat()",a));const i=Hk(a);Wt(t,"utils format() - numbers",i),Wt(t,"utils format() - numbersToCurrency",n+Mv(i,t.precision));const o=new Tv(n+Mv(i,t.precision));Wt(t,"utils format() - bigNumber1",o.toString()),t.max&&o.biggerThan(t.max)&&o.setNumber(t.max),t.min&&o.lessThan(t.min)&&o.setNumber(t.min);const l=o.toFixed(Zo(t.precision),t.shouldRound);if(Wt(t,"utils format() - bigNumber2",o.toFixed(Zo(t.precision))),/^0(\.0+)?$/g.test(l)&&t.allowBlank)return"";let[f,u]=l.split(".");const d=u!==void 0?u.length:0;f=f.padStart(t.minimumNumberOfCharacters-d,"0"),f=Oge(f,t.thousands);const m=t.prefix+Rge(f,u,t.decimal)+t.suffix;return Wt(t,"utils format() - output",m),m}function eE(e,t=ai,r=""){if(Wt(t,"utils unformat() - caller",r),Wt(t,"utils unformat() - input",e),!t.disableNegative&&e==="-")return Wt(t,"utils unformat() - return netagive symbol",e),e;const n=t.disableNegative?"":e.indexOf("-")>=0?"-":"",a=e.replace(t.prefix,"").replace(t.suffix,"");Wt(t,"utils unformat() - filtered",a);const i=Hk(a);Wt(t,"utils unformat() - numbers",i);const o=new Tv(n+Mv(i,t.precision));Wt(t,"utils unformat() - bigNumber1",i.toString()),t.max&&o.biggerThan(t.max)&&o.setNumber(t.max),t.min&&o.lessThan(t.min)&&o.setNumber(t.min);let l=o.toFixed(Zo(t.precision),t.shouldRound);return t.modelModifiers&&t.modelModifiers.number&&(l=parseFloat(l)),Wt(t,"utils unformat() - output",l),l}const tE=(e,t,r)=>{if(Wt(t,"directive setValue() - caller",r),!Pge(t)){Wt(t,"directive setValue() - validateRestrictedOptions() return false. Stopping here...",e.value);return}let n=e.value.length-(e.selectionEnd||0);e.value=Qw(e.value,t,r),n=Math.max(n,t.suffix.length),n=e.value.length-n,n=Math.max(n,t.prefix.length),Jk(e,n),e.dispatchEvent(Xk("change"))},Qk=(e,t)=>{const r=e.currentTarget,n=e.code==="Backspace"||e.code==="Delete",a=r.value.length-(r.selectionEnd||0)===0;if(Wt(t,"directive onkeydown() - el.value",r.value),Wt(t,"directive onkeydown() - backspacePressed",n),Wt(t,"directive onkeydown() - isAtEndPosition",a),t.allowBlank&&n&&a&&eE(r.value,t,"directive onkeydown allowBlank")===0&&(Wt(t,'directive onkeydown() - set el.value = ""',r.value),r.value="",r.dispatchEvent(Xk("change"))),Wt(t,"directive onkeydown() - e.key",e.key),e.key==="+"){Wt(t,"directive onkeydown() - unformat el.value",r.value);let i=eE(r.value,t,"directive onkeydown +");typeof i=="string"&&(i=parseFloat(i)),i<0&&(r.value=String(i*-1))}},eN=(e,t)=>{const r=e.currentTarget;Wt(t,"directive oninput()",r.value),/^[1-9]$/.test(r.value)&&(r.value=Mv(r.value,Zo(t.precision)),Wt(t,"directive oninput() - is 1-9",r.value)),tE(r,t,"directive oninput")},tN=(e,t)=>{const r=e.currentTarget;Wt(t,"directive onFocus()",r.value),t.focusOnRight&&Jk(r,r.value.length-t.suffix.length)},rN={mounted(e,t){if(!t.value)return;const r=Cv({...ai,...t.value});if(Wt(r,"directive mounted() - opt",r),e.tagName.toLocaleUpperCase()!=="INPUT"){const n=e.getElementsByTagName("input");n.length!==1||(e=n[0])}e.onkeydown=n=>{Qk(n,r)},e.oninput=n=>{eN(n,r)},e.onfocus=n=>{tN(n,r)},Wt(r,"directive mounted() - el.value",e.value),tE(e,r,"directive mounted")},updated(e,t){if(!t.value)return;const r=Cv({...ai,...t.value});e.onkeydown=n=>{Qk(n,r)},e.oninput=n=>{eN(n,r)},e.onfocus=n=>{tN(n,r)},Wt(r,"directive updated() - el.value",e.value),Wt(r,"directive updated() - opt",r),tE(e,r,"directive updated")},beforeUnmount(e){e.onkeydown=null,e.oninput=null,e.onfocus=null}},Fge=["id","value","disabled"],Lge={inheritAttrs:!1,name:"Money3",directives:{money3:rN}},Dge=st({...Lge,props:{debug:{required:!1,type:Boolean,default:!1},id:{required:!1,type:[Number,String],default:()=>{const e=rn();return e?e.uid:null}},modelValue:{required:!0,type:[Number,String]},modelModifiers:{required:!1,type:Object,default:()=>({number:!1})},masked:{type:Boolean,default:!1},precision:{type:Number,default:()=>ai.precision},decimal:{type:String,default:()=>ai.decimal,validator(e){return Ih(e,"decimal")}},thousands:{type:String,default:()=>ai.thousands,validator(e){return Ih(e,"thousands")}},prefix:{type:String,default:()=>ai.prefix,validator(e){return Ih(e,"prefix")}},suffix:{type:String,default:()=>ai.suffix,validator(e){return Ih(e,"suffix")}},disableNegative:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},max:{type:[Number,String],default:()=>ai.max},min:{type:[Number,String],default:()=>ai.min},allowBlank:{type:Boolean,default:()=>ai.allowBlank},minimumNumberOfCharacters:{type:Number,default:()=>ai.minimumNumberOfCharacters},shouldRound:{type:Boolean,default:()=>ai.shouldRound},focusOnRight:{type:Boolean,default:()=>ai.focusOnRight}},emits:["update:model-value"],setup(e,{emit:t}){const r=e,{modelValue:n,modelModifiers:a,masked:i,precision:o,shouldRound:l,focusOnRight:f}=Ql(r);Wt(r,"component setup()",r);let u=n.value;(r.disableNegative||u!=="-")&&a.value&&a.value.number&&(l.value?u=Number(n.value).toFixed(Zo(o.value)):u=Number(n.value).toFixed(Zo(o.value)+1).slice(0,-1));const d=Re(Qw(u,r,"component setup"));Wt(r,"component setup() - data.formattedValue",d.value),ut(n,m);function m(C){Wt(r,"component watch() -> value",C);const T=Qw(C,Cv({...r}),"component watch");T!==d.value&&(Wt(r,"component watch() changed -> formatted",T),d.value=T)}let v=null;function y(C){let T=C.target.value;Wt(r,"component change() -> evt.target.value",T),i.value&&!a.value.number||(T=eE(T,Cv({...r}),"component change")),T!==v&&(v=T,Wt(r,"component change() -> update:model-value",T),t("update:model-value",T))}const _=L9(),E=Ee(()=>{const C={..._};return delete C["onUpdate:modelValue"],C});return(C,T)=>{const I=Iw("money3");return tn((me(),Fe("input",Ai({id:`${e.id}`},W(E),{type:"tel",class:"v-money3",value:d.value,disabled:r.disabled,onChange:y}),null,16,Fge)),[[I,{precision:W(o),decimal:r.decimal,thousands:r.thousands,prefix:r.prefix,suffix:r.suffix,disableNegative:r.disableNegative,min:r.min,max:r.max,allowBlank:r.allowBlank,minimumNumberOfCharacters:r.minimumNumberOfCharacters,debug:r.debug,modelModifiers:W(a),shouldRound:W(l),focusOnRight:W(f)}]])}}}),$ge={install(e){e.component("money3",Dge),e.directive("money3",rN)}};/*!
839
839
  * shared v9.4.1
840
840
  * (c) 2023 kazuya kawaguchi
841
841
  * Released under the MIT License.
@@ -851,7 +851,7 @@ For more detail, please visit: ${a}
851
851
  usage: app.provide(ID_INJECTION_KEY, {
852
852
  prefix: number,
853
853
  current: number,
854
- })`);const r=e3();return Ee(()=>W(e)||`${r.value}-id-${t.prefix}-${t.current++}`)};let Wu=[];const eP=e=>{const t=e;t.key===bn.esc&&Wu.forEach(r=>r(t))},s6e=e=>{ir(()=>{Wu.length===0&&document.addEventListener("keydown",eP),hn&&Wu.push(e)}),fn(()=>{Wu=Wu.filter(t=>t!==e),Wu.length===0&&hn&&document.removeEventListener("keydown",eP)})};let tP;const rP=()=>{const e=e3(),t=QR(),r=Ee(()=>`${e.value}-popper-container-${t.prefix}`),n=Ee(()=>`#${r.value}`);return{id:r,selector:n}},l6e=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},f6e=()=>{const{id:e,selector:t}=rP();return Aw(()=>{hn&&(fe.env.NODE_ENV==="test"||!tP&&!document.body.querySelector(t.value))&&(tP=l6e(e.value))}),{id:e,selector:t}},u6e=Kr({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),c6e=({showAfter:e,hideAfter:t,autoClose:r,open:n,close:a})=>{const{registerTimeout:i}=XR(),{registerTimeout:o,cancelTimeout:l}=XR();return{onOpen:d=>{i(()=>{n(d);const m=W(r);ka(m)&&m>0&&o(()=>{a(d)},m)},W(e))},onClose:d=>{l(),i(()=>{a(d)},W(t))}}},nP=Symbol("elForwardRef"),h6e=e=>{un(nP,{setForwardRef:r=>{e.value=r}})},d6e=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),iP=Re(0),aP=2e3,oP=Symbol("zIndexContextKey"),sP=e=>{const t=e||(rn()?At(oP,void 0):void 0),r=Ee(()=>{const i=W(t);return ka(i)?i:aP}),n=Ee(()=>r.value+iP.value);return{initialZIndex:r,currentZIndex:n,nextZIndex:()=>(iP.value++,n.value)}};function p6e(e){const t=Re();function r(){if(e.value==null)return;const{selectionStart:a,selectionEnd:i,value:o}=e.value;if(a==null||i==null)return;const l=o.slice(0,Math.max(0,a)),f=o.slice(Math.max(0,i));t.value={selectionStart:a,selectionEnd:i,value:o,beforeTxt:l,afterTxt:f}}function n(){if(e.value==null||t.value==null)return;const{value:a}=e.value,{beforeTxt:i,afterTxt:o,selectionStart:l}=t.value;if(i==null||o==null||l==null)return;let f=a.length;if(a.endsWith(o))f=a.length-o.length;else if(a.startsWith(i))f=i.length;else{const u=i[l-1],d=a.indexOf(u,l-1);d!==-1&&(f=d+1)}e.value.setSelectionRange(f,f)}return[r,n]}const h3=Xv({type:String,values:Hh,required:!1}),lP=Symbol("size"),v6e=()=>{const e=At(lP,{});return Ee(()=>W(e.size)||"")};function m6e(e,{afterFocus:t,afterBlur:r}={}){const n=rn(),{emit:a}=n,i=Xl(),o=Re(!1),l=d=>{o.value||(o.value=!0,a("focus",d),t==null||t())},f=d=>{var m;d.relatedTarget&&((m=i.value)!=null&&m.contains(d.relatedTarget))||(o.value=!1,a("blur",d),r==null||r())},u=()=>{var d;(d=e.value)==null||d.focus()};return ut(i,d=>{d&&d.setAttribute("tabindex","-1")}),Jo(i,"click",u),{wrapperRef:i,isFocused:o,handleFocus:l,handleBlur:f}}const fP=Symbol(),lm=Re();function d3(e,t=void 0){const r=rn()?At(fP,lm):lm;return e?Ee(()=>{var n,a;return(a=(n=r.value)==null?void 0:n[e])!=null?a:t}):r}function uP(e,t){const r=d3(),n=Qt(e,Ee(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||rm})),a=tm(Ee(()=>{var l;return(l=r.value)==null?void 0:l.locale})),i=sP(Ee(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||aP})),o=Ee(()=>{var l;return W(t)||((l=r.value)==null?void 0:l.size)||""});return cP(Ee(()=>W(r)||{})),{ns:n,locale:a,zIndex:i,size:o}}const cP=(e,t,r=!1)=>{var n;const a=!!rn(),i=a?d3():void 0,o=(n=t==null?void 0:t.provide)!=null?n:a?un:void 0;if(!o){yn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=Ee(()=>{const f=W(e);return i!=null&&i.value?g6e(i.value,f):f});return o(fP,l),o(AR,Ee(()=>l.value.locale)),o(IR,Ee(()=>l.value.namespace)),o(oP,Ee(()=>l.value.zIndex)),o(lP,{size:Ee(()=>l.value.size||"")}),(r||!lm.value)&&(lm.value=l.value),l},g6e=(e,t)=>{var r;const n=[...new Set([...YE(e),...YE(t)])],a={};for(const i of n)a[i]=(r=t[i])!=null?r:e[i];return a},y6e=Kr({a11y:{type:Boolean,default:!0},locale:{type:$t(Object)},size:h3,button:{type:$t(Object)},experimentalFeatures:{type:$t(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:$t(Object)},zIndex:Number,namespace:{type:String,default:"el"}}),b6e={},_6e=st({name:"ElConfigProvider",props:y6e,setup(e,{slots:t}){ut(()=>e.message,n=>{Object.assign(b6e,n??{})},{immediate:!0,deep:!0});const r=cP(e);return()=>Ot(t,"default",{config:r==null?void 0:r.value})}}),w6e=Ni(_6e);var vr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const E6e=Kr({size:{type:$t([Number,String])},color:{type:String}}),x6e=st({name:"ElIcon",inheritAttrs:!1}),S6e=st({...x6e,props:E6e,setup(e){const t=e,r=Qt("icon"),n=Ee(()=>{const{size:a,color:i}=t;return!a&&!i?{}:{fontSize:pR(a)?void 0:Vh(a),"--color":i}});return(a,i)=>(me(),Fe("i",Ai({class:W(r).b(),style:W(n)},a.$attrs),[Ot(a.$slots,"default")],16))}});var M6e=vr(S6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Rn=Ni(M6e),C6e=["light","dark"],T6e=Kr({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:YE(Qv),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:C6e,default:"light"}}),A6e={close:e=>e instanceof MouseEvent},I6e=st({name:"ElAlert"}),B6e=st({...I6e,props:T6e,emits:A6e,setup(e,{emit:t}){const r=e,{Close:n}=Uxe,a=mv(),i=Qt("alert"),o=Re(!0),l=Ee(()=>Qv[r.type]),f=Ee(()=>[i.e("icon"),{[i.is("big")]:!!r.description||!!a.default}]),u=Ee(()=>({[i.is("bold")]:r.description||a.default})),d=m=>{o.value=!1,t("close",m)};return(m,v)=>(me(),Qe(aa,{name:W(i).b("fade"),persisted:""},{default:rt(()=>[tn(Ue("div",{class:Te([W(i).b(),W(i).m(m.type),W(i).is("center",m.center),W(i).is(m.effect)]),role:"alert"},[m.showIcon&&W(l)?(me(),Qe(W(Rn),{key:0,class:Te(W(f))},{default:rt(()=>[(me(),Qe(ni(W(l))))]),_:1},8,["class"])):et("v-if",!0),Ue("div",{class:Te(W(i).e("content"))},[m.title||m.$slots.title?(me(),Fe("span",{key:0,class:Te([W(i).e("title"),W(u)])},[Ot(m.$slots,"title",{},()=>[br(ot(m.title),1)])],2)):et("v-if",!0),m.$slots.default||m.description?(me(),Fe("p",{key:1,class:Te(W(i).e("description"))},[Ot(m.$slots,"default",{},()=>[br(ot(m.description),1)])],2)):et("v-if",!0),m.closable?(me(),Fe(wt,{key:2},[m.closeText?(me(),Fe("div",{key:0,class:Te([W(i).e("close-btn"),W(i).is("customed")]),onClick:d},ot(m.closeText),3)):(me(),Qe(W(Rn),{key:1,class:Te(W(i).e("close-btn")),onClick:d},{default:rt(()=>[ht(W(n))]),_:1},8,["class"]))],64)):et("v-if",!0)],2)],2),[[vi,o.value]])]),_:3},8,["name"]))}});var k6e=vr(B6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);const N6e=Ni(k6e),Gu=Symbol("formContextKey"),Ef=Symbol("formItemContextKey"),Zu=(e,t={})=>{const r=Re(void 0),n=t.prop?r:kR("size"),a=t.global?r:v6e(),i=t.form?{size:void 0}:At(Gu,void 0),o=t.formItem?{size:void 0}:At(Ef,void 0);return Ee(()=>n.value||W(e)||(o==null?void 0:o.size)||(i==null?void 0:i.size)||a.value||"")},p3=e=>{const t=kR("disabled"),r=At(Gu,void 0);return Ee(()=>t.value||W(e)||(r==null?void 0:r.disabled)||!1)},v3=()=>{const e=At(Gu,void 0),t=At(Ef,void 0);return{form:e,formItem:t}},O6e=(e,{formItemContext:t,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=Re(!1)),n||(n=Re(!1));const a=Re();let i;const o=Ee(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return ir(()=>{i=ut([ra(e,"id"),r],([l,f])=>{const u=l??(f?void 0:c3().value);u!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(n!=null&&n.value)&&!f&&u&&t.addInputId(u)),a.value=u)},{immediate:!0})}),bh(()=>{i&&i(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:o,inputId:a}},R6e=Kr({size:{type:String,values:Hh},disabled:Boolean}),P6e=Kr({...R6e,model:Object,rules:{type:$t(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),F6e={validate:(e,t,r)=>(mt(e)||Bt(e))&&Yv(t)&&Bt(r)},L6e="ElForm";function D6e(){const e=Re([]),t=Ee(()=>{if(!e.value.length)return"0";const i=Math.max(...e.value);return i?`${i}px`:""});function r(i){const o=e.value.indexOf(i);return o===-1&&t.value==="0"&&yn(L6e,`unexpected width ${i}`),o}function n(i,o){if(i&&o){const l=r(o);e.value.splice(l,1,i)}else i&&e.value.push(i)}function a(i){const o=r(i);o>-1&&e.value.splice(o,1)}return{autoLabelWidth:t,registerLabelWidth:n,deregisterLabelWidth:a}}const fm=(e,t)=>{const r=UE(t);return r.length>0?e.filter(n=>n.prop&&r.includes(n.prop)):e},um="ElForm",$6e=st({name:um}),z6e=st({...$6e,props:P6e,emits:F6e,setup(e,{expose:t,emit:r}){const n=e,a=[],i=Zu(),o=Qt("form"),l=Ee(()=>{const{labelPosition:I,inline:k}=n;return[o.b(),o.m(i.value||"default"),{[o.m(`label-${I}`)]:I,[o.m("inline")]:k}]}),f=I=>{a.push(I)},u=I=>{I.prop&&a.splice(a.indexOf(I),1)},d=(I=[])=>{if(!n.model){yn(um,"model is required for resetFields to work.");return}fm(a,I).forEach(k=>k.resetField())},m=(I=[])=>{fm(a,I).forEach(k=>k.clearValidate())},v=Ee(()=>{const I=!!n.model;return I||yn(um,"model is required for validate to work."),I}),y=I=>{if(a.length===0)return[];const k=fm(a,I);return k.length?k:(yn(um,"please pass correct props!"),[])},_=async I=>C(void 0,I),E=async(I=[])=>{if(!v.value)return!1;const k=y(I);if(k.length===0)return!0;let N={};for(const O of k)try{await O.validate("")}catch(P){N={...N,...P}}return Object.keys(N).length===0?!0:Promise.reject(N)},C=async(I=[],k)=>{const N=!bt(k);try{const O=await E(I);return O===!0&&(k==null||k(O)),O}catch(O){if(O instanceof Error)throw O;const P=O;return n.scrollToError&&T(Object.keys(P)[0]),k==null||k(!1,P),N&&Promise.reject(P)}},T=I=>{var k;const N=fm(a,I)[0];N&&((k=N.$el)==null||k.scrollIntoView(n.scrollIntoViewOptions))};return ut(()=>n.rules,()=>{n.validateOnRuleChange&&_().catch(I=>yn(I))},{deep:!0}),un(Gu,Vn({...Ql(n),emit:r,resetFields:d,clearValidate:m,validateField:C,addField:f,removeField:u,...D6e()})),t({validate:_,validateField:C,resetFields:d,clearValidate:m,scrollToField:T}),(I,k)=>(me(),Fe("form",{class:Te(W(l))},[Ot(I.$slots,"default")],2))}});var U6e=vr(z6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xf.apply(this,arguments)}function q6e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xh(e,t)}function m3(e){return m3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},m3(e)}function Xh(e,t){return Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xh(e,t)}function V6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cm(e,t,r){return V6e()?cm=Reflect.construct.bind():cm=function(a,i,o){var l=[null];l.push.apply(l,i);var f=Function.bind.apply(a,l),u=new f;return o&&Xh(u,o.prototype),u},cm.apply(null,arguments)}function H6e(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function g3(e){var t=typeof Map=="function"?new Map:void 0;return g3=function(n){if(n===null||!H6e(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return cm(n,arguments,m3(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Xh(a,n)},g3(e)}var j6e=/%[sdj%]/g,hP=function(){};typeof fe<"u"&&fe.env&&fe.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(hP=function(t,r){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&r.every(function(n){return typeof n=="string"})&&console.warn(t,r)});function y3(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Oi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var a=0,i=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var o=e.replace(j6e,function(l){if(l==="%%")return"%";if(a>=i)return l;switch(l){case"%s":return String(r[a++]);case"%d":return Number(r[a++]);case"%j":try{return JSON.stringify(r[a++])}catch{return"[Circular]"}break;default:return l}});return o}return e}function K6e(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function _n(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||K6e(t)&&typeof e=="string"&&!e)}function W6e(e,t,r){var n=[],a=0,i=e.length;function o(l){n.push.apply(n,l||[]),a++,a===i&&r(n)}e.forEach(function(l){t(l,o)})}function dP(e,t,r){var n=0,a=e.length;function i(o){if(o&&o.length){r(o);return}var l=n;n=n+1,l<a?t(e[l],i):r([])}i([])}function G6e(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var pP=function(e){q6e(t,e);function t(r,n){var a;return a=e.call(this,"Async Validation Error")||this,a.errors=r,a.fields=n,a}return t}(g3(Error));function Z6e(e,t,r,n,a){if(t.first){var i=new Promise(function(v,y){var _=function(T){return n(T),T.length?y(new pP(T,y3(T))):v(a)},E=G6e(e);dP(E,r,_)});return i.catch(function(v){return v}),i}var o=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),f=l.length,u=0,d=[],m=new Promise(function(v,y){var _=function(C){if(d.push.apply(d,C),u++,u===f)return n(d),d.length?y(new pP(d,y3(d))):v(a)};l.length||(n(d),v(a)),l.forEach(function(E){var C=e[E];o.indexOf(E)!==-1?dP(C,r,_):W6e(C,r,_)})});return m.catch(function(v){return v}),m}function Y6e(e){return!!(e&&e.message!==void 0)}function J6e(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function vP(e,t){return function(r){var n;return e.fullFields?n=J6e(t,e.fullFields):n=t[r.field||e.fullField],Y6e(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function mP(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=xf({},e[r],n):e[r]=n}}return e}var gP=function(t,r,n,a,i,o){t.required&&(!n.hasOwnProperty(t.field)||_n(r,o||t.type))&&a.push(Oi(i.messages.required,t.fullField))},X6e=function(t,r,n,a,i){(/^\s+$/.test(r)||r==="")&&a.push(Oi(i.messages.whitespace,t.fullField))},hm,Q6e=function(){if(hm)return hm;var e="[a-fA-F\\d:]",t=function(N){return N&&N.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=(`
854
+ })`);const r=e3();return Ee(()=>W(e)||`${r.value}-id-${t.prefix}-${t.current++}`)};let Wu=[];const eP=e=>{const t=e;t.key===bn.esc&&Wu.forEach(r=>r(t))},s6e=e=>{ir(()=>{Wu.length===0&&document.addEventListener("keydown",eP),hn&&Wu.push(e)}),fn(()=>{Wu=Wu.filter(t=>t!==e),Wu.length===0&&hn&&document.removeEventListener("keydown",eP)})};let tP;const rP=()=>{const e=e3(),t=QR(),r=Ee(()=>`${e.value}-popper-container-${t.prefix}`),n=Ee(()=>`#${r.value}`);return{id:r,selector:n}},l6e=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},f6e=()=>{const{id:e,selector:t}=rP();return Aw(()=>{hn&&(fe.env.NODE_ENV==="test"||!tP&&!document.body.querySelector(t.value))&&(tP=l6e(e.value))}),{id:e,selector:t}},u6e=Kr({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),c6e=({showAfter:e,hideAfter:t,autoClose:r,open:n,close:a})=>{const{registerTimeout:i}=XR(),{registerTimeout:o,cancelTimeout:l}=XR();return{onOpen:d=>{i(()=>{n(d);const m=W(r);ka(m)&&m>0&&o(()=>{a(d)},m)},W(e))},onClose:d=>{l(),i(()=>{a(d)},W(t))}}},nP=Symbol("elForwardRef"),h6e=e=>{un(nP,{setForwardRef:r=>{e.value=r}})},d6e=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),iP=Re(0),aP=2e3,oP=Symbol("zIndexContextKey"),sP=e=>{const t=e||(rn()?At(oP,void 0):void 0),r=Ee(()=>{const i=W(t);return ka(i)?i:aP}),n=Ee(()=>r.value+iP.value);return{initialZIndex:r,currentZIndex:n,nextZIndex:()=>(iP.value++,n.value)}};function p6e(e){const t=Re();function r(){if(e.value==null)return;const{selectionStart:a,selectionEnd:i,value:o}=e.value;if(a==null||i==null)return;const l=o.slice(0,Math.max(0,a)),f=o.slice(Math.max(0,i));t.value={selectionStart:a,selectionEnd:i,value:o,beforeTxt:l,afterTxt:f}}function n(){if(e.value==null||t.value==null)return;const{value:a}=e.value,{beforeTxt:i,afterTxt:o,selectionStart:l}=t.value;if(i==null||o==null||l==null)return;let f=a.length;if(a.endsWith(o))f=a.length-o.length;else if(a.startsWith(i))f=i.length;else{const u=i[l-1],d=a.indexOf(u,l-1);d!==-1&&(f=d+1)}e.value.setSelectionRange(f,f)}return[r,n]}const h3=Xv({type:String,values:Hh,required:!1}),lP=Symbol("size"),v6e=()=>{const e=At(lP,{});return Ee(()=>W(e.size)||"")};function m6e(e,{afterFocus:t,afterBlur:r}={}){const n=rn(),{emit:a}=n,i=Xl(),o=Re(!1),l=d=>{o.value||(o.value=!0,a("focus",d),t==null||t())},f=d=>{var m;d.relatedTarget&&((m=i.value)!=null&&m.contains(d.relatedTarget))||(o.value=!1,a("blur",d),r==null||r())},u=()=>{var d;(d=e.value)==null||d.focus()};return ut(i,d=>{d&&d.setAttribute("tabindex","-1")}),Jo(i,"click",u),{wrapperRef:i,isFocused:o,handleFocus:l,handleBlur:f}}const fP=Symbol(),lm=Re();function d3(e,t=void 0){const r=rn()?At(fP,lm):lm;return e?Ee(()=>{var n,a;return(a=(n=r.value)==null?void 0:n[e])!=null?a:t}):r}function uP(e,t){const r=d3(),n=Qt(e,Ee(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||rm})),a=tm(Ee(()=>{var l;return(l=r.value)==null?void 0:l.locale})),i=sP(Ee(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||aP})),o=Ee(()=>{var l;return W(t)||((l=r.value)==null?void 0:l.size)||""});return cP(Ee(()=>W(r)||{})),{ns:n,locale:a,zIndex:i,size:o}}const cP=(e,t,r=!1)=>{var n;const a=!!rn(),i=a?d3():void 0,o=(n=t==null?void 0:t.provide)!=null?n:a?un:void 0;if(!o){yn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=Ee(()=>{const f=W(e);return i!=null&&i.value?g6e(i.value,f):f});return o(fP,l),o(AR,Ee(()=>l.value.locale)),o(IR,Ee(()=>l.value.namespace)),o(oP,Ee(()=>l.value.zIndex)),o(lP,{size:Ee(()=>l.value.size||"")}),(r||!lm.value)&&(lm.value=l.value),l},g6e=(e,t)=>{var r;const n=[...new Set([...YE(e),...YE(t)])],a={};for(const i of n)a[i]=(r=t[i])!=null?r:e[i];return a},y6e=Kr({a11y:{type:Boolean,default:!0},locale:{type:$t(Object)},size:h3,button:{type:$t(Object)},experimentalFeatures:{type:$t(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:$t(Object)},zIndex:Number,namespace:{type:String,default:"el"}}),b6e={},_6e=st({name:"ElConfigProvider",props:y6e,setup(e,{slots:t}){ut(()=>e.message,n=>{Object.assign(b6e,n??{})},{immediate:!0,deep:!0});const r=cP(e);return()=>Ot(t,"default",{config:r==null?void 0:r.value})}}),w6e=Ni(_6e);var vr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const E6e=Kr({size:{type:$t([Number,String])},color:{type:String}}),x6e=st({name:"ElIcon",inheritAttrs:!1}),S6e=st({...x6e,props:E6e,setup(e){const t=e,r=Qt("icon"),n=Ee(()=>{const{size:a,color:i}=t;return!a&&!i?{}:{fontSize:pR(a)?void 0:Vh(a),"--color":i}});return(a,i)=>(me(),Fe("i",Ai({class:W(r).b(),style:W(n)},a.$attrs),[Ot(a.$slots,"default")],16))}});var M6e=vr(S6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Rn=Ni(M6e),C6e=["light","dark"],T6e=Kr({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:YE(Qv),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:C6e,default:"light"}}),A6e={close:e=>e instanceof MouseEvent},I6e=st({name:"ElAlert"}),B6e=st({...I6e,props:T6e,emits:A6e,setup(e,{emit:t}){const r=e,{Close:n}=Uxe,a=mv(),i=Qt("alert"),o=Re(!0),l=Ee(()=>Qv[r.type]),f=Ee(()=>[i.e("icon"),{[i.is("big")]:!!r.description||!!a.default}]),u=Ee(()=>({[i.is("bold")]:r.description||a.default})),d=m=>{o.value=!1,t("close",m)};return(m,v)=>(me(),et(aa,{name:W(i).b("fade"),persisted:""},{default:rt(()=>[tn(Ue("div",{class:Te([W(i).b(),W(i).m(m.type),W(i).is("center",m.center),W(i).is(m.effect)]),role:"alert"},[m.showIcon&&W(l)?(me(),et(W(Rn),{key:0,class:Te(W(f))},{default:rt(()=>[(me(),et(ni(W(l))))]),_:1},8,["class"])):Xe("v-if",!0),Ue("div",{class:Te(W(i).e("content"))},[m.title||m.$slots.title?(me(),Fe("span",{key:0,class:Te([W(i).e("title"),W(u)])},[Ot(m.$slots,"title",{},()=>[br(ot(m.title),1)])],2)):Xe("v-if",!0),m.$slots.default||m.description?(me(),Fe("p",{key:1,class:Te(W(i).e("description"))},[Ot(m.$slots,"default",{},()=>[br(ot(m.description),1)])],2)):Xe("v-if",!0),m.closable?(me(),Fe(wt,{key:2},[m.closeText?(me(),Fe("div",{key:0,class:Te([W(i).e("close-btn"),W(i).is("customed")]),onClick:d},ot(m.closeText),3)):(me(),et(W(Rn),{key:1,class:Te(W(i).e("close-btn")),onClick:d},{default:rt(()=>[ht(W(n))]),_:1},8,["class"]))],64)):Xe("v-if",!0)],2)],2),[[vi,o.value]])]),_:3},8,["name"]))}});var k6e=vr(B6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);const N6e=Ni(k6e),Gu=Symbol("formContextKey"),Ef=Symbol("formItemContextKey"),Zu=(e,t={})=>{const r=Re(void 0),n=t.prop?r:kR("size"),a=t.global?r:v6e(),i=t.form?{size:void 0}:At(Gu,void 0),o=t.formItem?{size:void 0}:At(Ef,void 0);return Ee(()=>n.value||W(e)||(o==null?void 0:o.size)||(i==null?void 0:i.size)||a.value||"")},p3=e=>{const t=kR("disabled"),r=At(Gu,void 0);return Ee(()=>t.value||W(e)||(r==null?void 0:r.disabled)||!1)},v3=()=>{const e=At(Gu,void 0),t=At(Ef,void 0);return{form:e,formItem:t}},O6e=(e,{formItemContext:t,disableIdGeneration:r,disableIdManagement:n})=>{r||(r=Re(!1)),n||(n=Re(!1));const a=Re();let i;const o=Ee(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return ir(()=>{i=ut([ra(e,"id"),r],([l,f])=>{const u=l??(f?void 0:c3().value);u!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(n!=null&&n.value)&&!f&&u&&t.addInputId(u)),a.value=u)},{immediate:!0})}),bh(()=>{i&&i(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:o,inputId:a}},R6e=Kr({size:{type:String,values:Hh},disabled:Boolean}),P6e=Kr({...R6e,model:Object,rules:{type:$t(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),F6e={validate:(e,t,r)=>(mt(e)||Bt(e))&&Yv(t)&&Bt(r)},L6e="ElForm";function D6e(){const e=Re([]),t=Ee(()=>{if(!e.value.length)return"0";const i=Math.max(...e.value);return i?`${i}px`:""});function r(i){const o=e.value.indexOf(i);return o===-1&&t.value==="0"&&yn(L6e,`unexpected width ${i}`),o}function n(i,o){if(i&&o){const l=r(o);e.value.splice(l,1,i)}else i&&e.value.push(i)}function a(i){const o=r(i);o>-1&&e.value.splice(o,1)}return{autoLabelWidth:t,registerLabelWidth:n,deregisterLabelWidth:a}}const fm=(e,t)=>{const r=UE(t);return r.length>0?e.filter(n=>n.prop&&r.includes(n.prop)):e},um="ElForm",$6e=st({name:um}),z6e=st({...$6e,props:P6e,emits:F6e,setup(e,{expose:t,emit:r}){const n=e,a=[],i=Zu(),o=Qt("form"),l=Ee(()=>{const{labelPosition:I,inline:k}=n;return[o.b(),o.m(i.value||"default"),{[o.m(`label-${I}`)]:I,[o.m("inline")]:k}]}),f=I=>{a.push(I)},u=I=>{I.prop&&a.splice(a.indexOf(I),1)},d=(I=[])=>{if(!n.model){yn(um,"model is required for resetFields to work.");return}fm(a,I).forEach(k=>k.resetField())},m=(I=[])=>{fm(a,I).forEach(k=>k.clearValidate())},v=Ee(()=>{const I=!!n.model;return I||yn(um,"model is required for validate to work."),I}),y=I=>{if(a.length===0)return[];const k=fm(a,I);return k.length?k:(yn(um,"please pass correct props!"),[])},_=async I=>C(void 0,I),E=async(I=[])=>{if(!v.value)return!1;const k=y(I);if(k.length===0)return!0;let N={};for(const O of k)try{await O.validate("")}catch(P){N={...N,...P}}return Object.keys(N).length===0?!0:Promise.reject(N)},C=async(I=[],k)=>{const N=!bt(k);try{const O=await E(I);return O===!0&&(k==null||k(O)),O}catch(O){if(O instanceof Error)throw O;const P=O;return n.scrollToError&&T(Object.keys(P)[0]),k==null||k(!1,P),N&&Promise.reject(P)}},T=I=>{var k;const N=fm(a,I)[0];N&&((k=N.$el)==null||k.scrollIntoView(n.scrollIntoViewOptions))};return ut(()=>n.rules,()=>{n.validateOnRuleChange&&_().catch(I=>yn(I))},{deep:!0}),un(Gu,Vn({...Ql(n),emit:r,resetFields:d,clearValidate:m,validateField:C,addField:f,removeField:u,...D6e()})),t({validate:_,validateField:C,resetFields:d,clearValidate:m,scrollToField:T}),(I,k)=>(me(),Fe("form",{class:Te(W(l))},[Ot(I.$slots,"default")],2))}});var U6e=vr(z6e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function xf(){return xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xf.apply(this,arguments)}function q6e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xh(e,t)}function m3(e){return m3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},m3(e)}function Xh(e,t){return Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xh(e,t)}function V6e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cm(e,t,r){return V6e()?cm=Reflect.construct.bind():cm=function(a,i,o){var l=[null];l.push.apply(l,i);var f=Function.bind.apply(a,l),u=new f;return o&&Xh(u,o.prototype),u},cm.apply(null,arguments)}function H6e(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function g3(e){var t=typeof Map=="function"?new Map:void 0;return g3=function(n){if(n===null||!H6e(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return cm(n,arguments,m3(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Xh(a,n)},g3(e)}var j6e=/%[sdj%]/g,hP=function(){};typeof fe<"u"&&fe.env&&fe.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(hP=function(t,r){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&r.every(function(n){return typeof n=="string"})&&console.warn(t,r)});function y3(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Oi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var a=0,i=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var o=e.replace(j6e,function(l){if(l==="%%")return"%";if(a>=i)return l;switch(l){case"%s":return String(r[a++]);case"%d":return Number(r[a++]);case"%j":try{return JSON.stringify(r[a++])}catch{return"[Circular]"}break;default:return l}});return o}return e}function K6e(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function _n(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||K6e(t)&&typeof e=="string"&&!e)}function W6e(e,t,r){var n=[],a=0,i=e.length;function o(l){n.push.apply(n,l||[]),a++,a===i&&r(n)}e.forEach(function(l){t(l,o)})}function dP(e,t,r){var n=0,a=e.length;function i(o){if(o&&o.length){r(o);return}var l=n;n=n+1,l<a?t(e[l],i):r([])}i([])}function G6e(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var pP=function(e){q6e(t,e);function t(r,n){var a;return a=e.call(this,"Async Validation Error")||this,a.errors=r,a.fields=n,a}return t}(g3(Error));function Z6e(e,t,r,n,a){if(t.first){var i=new Promise(function(v,y){var _=function(T){return n(T),T.length?y(new pP(T,y3(T))):v(a)},E=G6e(e);dP(E,r,_)});return i.catch(function(v){return v}),i}var o=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),f=l.length,u=0,d=[],m=new Promise(function(v,y){var _=function(C){if(d.push.apply(d,C),u++,u===f)return n(d),d.length?y(new pP(d,y3(d))):v(a)};l.length||(n(d),v(a)),l.forEach(function(E){var C=e[E];o.indexOf(E)!==-1?dP(C,r,_):W6e(C,r,_)})});return m.catch(function(v){return v}),m}function Y6e(e){return!!(e&&e.message!==void 0)}function J6e(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function vP(e,t){return function(r){var n;return e.fullFields?n=J6e(t,e.fullFields):n=t[r.field||e.fullField],Y6e(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function mP(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=xf({},e[r],n):e[r]=n}}return e}var gP=function(t,r,n,a,i,o){t.required&&(!n.hasOwnProperty(t.field)||_n(r,o||t.type))&&a.push(Oi(i.messages.required,t.fullField))},X6e=function(t,r,n,a,i){(/^\s+$/.test(r)||r==="")&&a.push(Oi(i.messages.whitespace,t.fullField))},hm,Q6e=function(){if(hm)return hm;var e="[a-fA-F\\d:]",t=function(N){return N&&N.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=(`
855
855
  (?:
856
856
  (?:`+n+":){7}(?:"+n+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
857
857
  (?:`+n+":){6}(?:"+r+"|:"+n+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
@@ -862,7 +862,7 @@ usage: app.provide(ID_INJECTION_KEY, {
862
862
  (?:`+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
863
863
  (?::(?:(?::`+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
864
864
  )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
865
- `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+r+"$)|(?:^"+a+"$)"),o=new RegExp("^"+r+"$"),l=new RegExp("^"+a+"$"),f=function(N){return N&&N.exact?i:new RegExp("(?:"+t(N)+r+t(N)+")|(?:"+t(N)+a+t(N)+")","g")};f.v4=function(k){return k&&k.exact?o: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 u="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",m=f.v4().source,v=f.v6().source,y="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",E="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",C="(?::\\d{2,5})?",T='(?:[/?#][^\\s"]*)?',I="(?:"+u+"|www\\.)"+d+"(?:localhost|"+m+"|"+v+"|"+y+_+E+")"+C+T;return hm=new RegExp("(?:^"+I+"$)","i"),hm},yP={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},Qh={integer:function(t){return Qh.number(t)&&parseInt(t,10)===t},float:function(t){return Qh.number(t)&&!Qh.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"&&!Qh.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(yP.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Q6e())},hex:function(t){return typeof t=="string"&&!!t.match(yP.hex)}},eSe=function(t,r,n,a,i){if(t.required&&r===void 0){gP(t,r,n,a,i);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;o.indexOf(l)>-1?Qh[l](r)||a.push(Oi(i.messages.types[l],t.fullField,t.type)):l&&typeof r!==t.type&&a.push(Oi(i.messages.types[l],t.fullField,t.type))},tSe=function(t,r,n,a,i){var o=typeof t.len=="number",l=typeof t.min=="number",f=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=r,m=null,v=typeof r=="number",y=typeof r=="string",_=Array.isArray(r);if(v?m="number":y?m="string":_&&(m="array"),!m)return!1;_&&(d=r.length),y&&(d=r.replace(u,"_").length),o?d!==t.len&&a.push(Oi(i.messages[m].len,t.fullField,t.len)):l&&!f&&d<t.min?a.push(Oi(i.messages[m].min,t.fullField,t.min)):f&&!l&&d>t.max?a.push(Oi(i.messages[m].max,t.fullField,t.max)):l&&f&&(d<t.min||d>t.max)&&a.push(Oi(i.messages[m].range,t.fullField,t.min,t.max))},Yu="enum",rSe=function(t,r,n,a,i){t[Yu]=Array.isArray(t[Yu])?t[Yu]:[],t[Yu].indexOf(r)===-1&&a.push(Oi(i.messages[Yu],t.fullField,t[Yu].join(", ")))},nSe=function(t,r,n,a,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||a.push(Oi(i.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var o=new RegExp(t.pattern);o.test(r)||a.push(Oi(i.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},er={required:gP,whitespace:X6e,type:eSe,range:tSe,enum:rSe,pattern:nSe},iSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"string")&&!t.required)return n();er.required(t,r,a,o,i,"string"),_n(r,"string")||(er.type(t,r,a,o,i),er.range(t,r,a,o,i),er.pattern(t,r,a,o,i),t.whitespace===!0&&er.whitespace(t,r,a,o,i))}n(o)},aSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},oSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r===""&&(r=void 0),_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},sSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},lSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),_n(r)||er.type(t,r,a,o,i)}n(o)},fSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},uSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},cSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r==null&&!t.required)return n();er.required(t,r,a,o,i,"array"),r!=null&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},hSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},dSe="enum",pSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er[dSe](t,r,a,o,i)}n(o)},vSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"string")&&!t.required)return n();er.required(t,r,a,o,i),_n(r,"string")||er.pattern(t,r,a,o,i)}n(o)},mSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"date")&&!t.required)return n();if(er.required(t,r,a,o,i),!_n(r,"date")){var f;r instanceof Date?f=r:f=new Date(r),er.type(t,f,a,o,i),f&&er.range(t,f.getTime(),a,o,i)}}n(o)},gSe=function(t,r,n,a,i){var o=[],l=Array.isArray(r)?"array":typeof r;er.required(t,r,a,o,i,l),n(o)},b3=function(t,r,n,a,i){var o=t.type,l=[],f=t.required||!t.required&&a.hasOwnProperty(t.field);if(f){if(_n(r,o)&&!t.required)return n();er.required(t,r,a,l,i,o),_n(r,o)||er.type(t,r,a,l,i)}n(l)},ySe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i)}n(o)},ed={string:iSe,method:aSe,number:oSe,boolean:sSe,regexp:lSe,integer:fSe,float:uSe,array:cSe,object:hSe,enum:pSe,pattern:vSe,date:mSe,url:b3,hex:b3,email:b3,required:gSe,any:ySe};function _3(){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 w3=_3(),td=function(){function e(r){this.rules=null,this._messages=w3,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 o=n[i];a.rules[i]=Array.isArray(o)?o:[o]})},t.messages=function(n){return n&&(this._messages=mP(_3(),n)),this._messages},t.validate=function(n,a,i){var o=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var l=n,f=a,u=i;if(typeof f=="function"&&(u=f,f={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function d(E){var C=[],T={};function I(N){if(Array.isArray(N)){var O;C=(O=C).concat.apply(O,N)}else C.push(N)}for(var k=0;k<E.length;k++)I(E[k]);C.length?(T=y3(C),u(C,T)):u(null,l)}if(f.messages){var m=this.messages();m===w3&&(m=_3()),mP(m,f.messages),f.messages=m}else f.messages=this.messages();var v={},y=f.keys||Object.keys(this.rules);y.forEach(function(E){var C=o.rules[E],T=l[E];C.forEach(function(I){var k=I;typeof k.transform=="function"&&(l===n&&(l=xf({},l)),T=l[E]=k.transform(T)),typeof k=="function"?k={validator:k}:k=xf({},k),k.validator=o.getValidationMethod(k),k.validator&&(k.field=E,k.fullField=k.fullField||E,k.type=o.getType(k),v[E]=v[E]||[],v[E].push({rule:k,value:T,source:l,field:E}))})});var _={};return Z6e(v,f,function(E,C){var T=E.rule,I=(T.type==="object"||T.type==="array")&&(typeof T.fields=="object"||typeof T.defaultField=="object");I=I&&(T.required||!T.required&&E.value),T.field=E.field;function k(P,z){return xf({},z,{fullField:T.fullField+"."+P,fullFields:T.fullFields?[].concat(T.fullFields,[P]):[P]})}function N(P){P===void 0&&(P=[]);var z=Array.isArray(P)?P:[P];!f.suppressWarning&&z.length&&e.warning("async-validator:",z),z.length&&T.message!==void 0&&(z=[].concat(T.message));var V=z.map(vP(T,l));if(f.first&&V.length)return _[T.field]=1,C(V);if(!I)C(V);else{if(T.required&&!E.value)return T.message!==void 0?V=[].concat(T.message).map(vP(T,l)):f.error&&(V=[f.error(T,Oi(f.messages.required,T.field))]),C(V);var L={};T.defaultField&&Object.keys(E.value).map(function(s){L[s]=T.defaultField}),L=xf({},L,E.rule.fields);var U={};Object.keys(L).forEach(function(s){var h=L[s],p=Array.isArray(h)?h:[h];U[s]=p.map(k.bind(null,s))});var M=new e(U);M.messages(f.messages),E.rule.options&&(E.rule.options.messages=f.messages,E.rule.options.error=f.error),M.validate(E.value,E.rule.options||f,function(s){var h=[];V&&V.length&&h.push.apply(h,V),s&&s.length&&h.push.apply(h,s),C(h.length?h:null)})}}var O;if(T.asyncValidator)O=T.asyncValidator(T,E.value,N,E.source,f);else if(T.validator){try{O=T.validator(T,E.value,N,E.source,f)}catch(P){console.error==null||console.error(P),f.suppressValidatorError||setTimeout(function(){throw P},0),N(P.message)}O===!0?N():O===!1?N(typeof T.message=="function"?T.message(T.fullField||T.field):T.message||(T.fullField||T.field)+" fails"):O instanceof Array?N(O):O instanceof Error&&N(O.message)}O&&O.then&&O.then(function(){return N()},function(P){return N(P)})},function(E){d(E)},l)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!ed.hasOwnProperty(n.type))throw new Error(Oi("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"?ed.required:ed[this.getType(n)]||void 0},e}();td.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");ed[t]=r},td.warning=hP,td.messages=w3,td.validators=ed;const bSe=["","error","validating","success"],_Se=Kr({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:$t([String,Array])},required:{type:Boolean,default:void 0},rules:{type:$t([Object,Array])},error:String,validateStatus:{type:String,values:bSe},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Hh}}),bP="ElLabelWrap";var wSe=st({name:bP,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const r=At(Gu,void 0),n=At(Ef);n||zu(bP,"usage: <el-form-item><label-wrap /></el-form-item>");const a=Qt("form"),i=Re(),o=Re(0),l=()=>{var d;if((d=i.value)!=null&&d.firstElementChild){const m=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(m))}else return 0},f=(d="update")=>{kt(()=>{t.default&&e.isAutoWidth&&(d==="update"?o.value=l():d==="remove"&&(r==null||r.deregisterLabelWidth(o.value)))})},u=()=>f("update");return ir(()=>{u()}),fn(()=>{f("remove")}),Au(()=>u()),ut(o,(d,m)=>{e.updateAll&&(r==null||r.registerLabelWidth(d,m))}),Fu(Ee(()=>{var d,m;return(m=(d=i.value)==null?void 0:d.firstElementChild)!=null?m:null}),u),()=>{var d,m;if(!t)return null;const{isAutoWidth:v}=e;if(v){const y=r==null?void 0:r.autoLabelWidth,_=n==null?void 0:n.hasLabel,E={};if(_&&y&&y!=="auto"){const C=Math.max(0,Number.parseInt(y,10)-o.value),T=r.labelPosition==="left"?"marginRight":"marginLeft";C&&(E[T]=`${C}px`)}return ht("div",{ref:i,class:[a.be("item","label-wrap")],style:E},[(d=t.default)==null?void 0:d.call(t)])}else return ht(wt,{ref:i},[(m=t.default)==null?void 0:m.call(t)])}}});const ESe=["role","aria-labelledby"],xSe=st({name:"ElFormItem"}),SSe=st({...xSe,props:_Se,setup(e,{expose:t}){const r=e,n=mv(),a=At(Gu,void 0),i=At(Ef,void 0),o=Zu(void 0,{formItem:!1}),l=Qt("form-item"),f=c3().value,u=Re([]),d=Re(""),m=Pye(d,100),v=Re(""),y=Re();let _,E=!1;const C=Ee(()=>{if((a==null?void 0:a.labelPosition)==="top")return{};const Y=Vh(r.labelWidth||(a==null?void 0:a.labelWidth)||"");return Y?{width:Y}:{}}),T=Ee(()=>{if((a==null?void 0:a.labelPosition)==="top"||a!=null&&a.inline)return{};if(!r.label&&!r.labelWidth&&L)return{};const Y=Vh(r.labelWidth||(a==null?void 0:a.labelWidth)||"");return!r.label&&!n.label?{marginLeft:Y}:{}}),I=Ee(()=>[l.b(),l.m(o.value),l.is("error",d.value==="error"),l.is("validating",d.value==="validating"),l.is("success",d.value==="success"),l.is("required",p.value||r.required),l.is("no-asterisk",a==null?void 0:a.hideRequiredAsterisk),(a==null?void 0:a.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:a==null?void 0:a.statusIcon}]),k=Ee(()=>Yv(r.inlineMessage)?r.inlineMessage:(a==null?void 0:a.inlineMessage)||!1),N=Ee(()=>[l.e("error"),{[l.em("error","inline")]:k.value}]),O=Ee(()=>r.prop?Bt(r.prop)?r.prop:r.prop.join("."):""),P=Ee(()=>!!(r.label||n.label)),z=Ee(()=>r.for||u.value.length===1?u.value[0]:void 0),V=Ee(()=>!z.value&&P.value),L=!!i,U=Ee(()=>{const Y=a==null?void 0:a.model;if(!(!Y||!r.prop))return JE(Y,r.prop).value}),M=Ee(()=>{const{required:Y}=r,ue=[];r.rules&&ue.push(...UE(r.rules));const oe=a==null?void 0:a.rules;if(oe&&r.prop){const ce=JE(oe,r.prop).value;ce&&ue.push(...UE(ce))}if(Y!==void 0){const ce=ue.map((ne,J)=>[ne,J]).filter(([ne])=>Object.keys(ne).includes("required"));if(ce.length>0)for(const[ne,J]of ce)ne.required!==Y&&(ue[J]={...ne,required:Y});else ue.push({required:Y})}return ue}),s=Ee(()=>M.value.length>0),h=Y=>M.value.filter(oe=>!oe.trigger||!Y?!0:Array.isArray(oe.trigger)?oe.trigger.includes(Y):oe.trigger===Y).map(({trigger:oe,...ce})=>ce),p=Ee(()=>M.value.some(Y=>Y.required)),g=Ee(()=>{var Y;return m.value==="error"&&r.showMessage&&((Y=a==null?void 0:a.showMessage)!=null?Y:!0)}),b=Ee(()=>`${r.label||""}${(a==null?void 0:a.labelSuffix)||""}`),w=Y=>{d.value=Y},A=Y=>{var ue,oe;const{errors:ce,fields:ne}=Y;(!ce||!ne)&&console.error(Y),w("error"),v.value=ce?(oe=(ue=ce==null?void 0:ce[0])==null?void 0:ue.message)!=null?oe:`${r.prop} is required`:"",a==null||a.emit("validate",r.prop,!1,v.value)},x=()=>{w("success"),a==null||a.emit("validate",r.prop,!0,"")},c=async Y=>{const ue=O.value;return new td({[ue]:Y}).validate({[ue]:U.value},{firstFields:!0}).then(()=>(x(),!0)).catch(ce=>(A(ce),Promise.reject(ce)))},S=async(Y,ue)=>{if(E||!r.prop)return!1;const oe=bt(ue);if(!s.value)return ue==null||ue(!1),!1;const ce=h(Y);return ce.length===0?(ue==null||ue(!0),!0):(w("validating"),c(ce).then(()=>(ue==null||ue(!0),!0)).catch(ne=>{const{fields:J}=ne;return ue==null||ue(!1,J),oe?!1:Promise.reject(J)}))},B=()=>{w(""),v.value="",E=!1},R=async()=>{const Y=a==null?void 0:a.model;if(!Y||!r.prop)return;const ue=JE(Y,r.prop);E=!0,ue.value=iR(_),await kt(),B(),E=!1},H=Y=>{u.value.includes(Y)||u.value.push(Y)},X=Y=>{u.value=u.value.filter(ue=>ue!==Y)};ut(()=>r.error,Y=>{v.value=Y||"",w(Y?"error":"")},{immediate:!0}),ut(()=>r.validateStatus,Y=>w(Y||""));const G=Vn({...Ql(r),$el:y,size:o,validateState:d,labelId:f,inputIds:u,isGroup:V,hasLabel:P,addInputId:H,removeInputId:X,resetField:R,clearValidate:B,validate:S});return un(Ef,G),ir(()=>{r.prop&&(a==null||a.addField(G),_=iR(U.value))}),fn(()=>{a==null||a.removeField(G)}),t({size:o,validateMessage:v,validateState:d,validate:S,clearValidate:B,resetField:R}),(Y,ue)=>{var oe;return me(),Fe("div",{ref_key:"formItemRef",ref:y,class:Te(W(I)),role:W(V)?"group":void 0,"aria-labelledby":W(V)?W(f):void 0},[ht(W(wSe),{"is-auto-width":W(C).width==="auto","update-all":((oe=W(a))==null?void 0:oe.labelWidth)==="auto"},{default:rt(()=>[W(P)?(me(),Qe(ni(W(z)?"label":"div"),{key:0,id:W(f),for:W(z),class:Te(W(l).e("label")),style:on(W(C))},{default:rt(()=>[Ot(Y.$slots,"label",{label:W(b)},()=>[br(ot(W(b)),1)])]),_:3},8,["id","for","class","style"])):et("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),Ue("div",{class:Te(W(l).e("content")),style:on(W(T))},[Ot(Y.$slots,"default"),ht(mge,{name:`${W(l).namespace.value}-zoom-in-top`},{default:rt(()=>[W(g)?Ot(Y.$slots,"error",{key:0,error:v.value},()=>[Ue("div",{class:Te(W(N))},ot(v.value),3)]):et("v-if",!0)]),_:3},8,["name"])],6)],10,ESe)}}});var _P=vr(SSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const wP=Ni(U6e,{FormItem:_P}),E3=bf(_P);let Ra;const MSe=`
865
+ `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+r+"$)|(?:^"+a+"$)"),o=new RegExp("^"+r+"$"),l=new RegExp("^"+a+"$"),f=function(N){return N&&N.exact?i:new RegExp("(?:"+t(N)+r+t(N)+")|(?:"+t(N)+a+t(N)+")","g")};f.v4=function(k){return k&&k.exact?o: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 u="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",m=f.v4().source,v=f.v6().source,y="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",E="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",C="(?::\\d{2,5})?",T='(?:[/?#][^\\s"]*)?',I="(?:"+u+"|www\\.)"+d+"(?:localhost|"+m+"|"+v+"|"+y+_+E+")"+C+T;return hm=new RegExp("(?:^"+I+"$)","i"),hm},yP={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},Qh={integer:function(t){return Qh.number(t)&&parseInt(t,10)===t},float:function(t){return Qh.number(t)&&!Qh.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"&&!Qh.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(yP.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Q6e())},hex:function(t){return typeof t=="string"&&!!t.match(yP.hex)}},eSe=function(t,r,n,a,i){if(t.required&&r===void 0){gP(t,r,n,a,i);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;o.indexOf(l)>-1?Qh[l](r)||a.push(Oi(i.messages.types[l],t.fullField,t.type)):l&&typeof r!==t.type&&a.push(Oi(i.messages.types[l],t.fullField,t.type))},tSe=function(t,r,n,a,i){var o=typeof t.len=="number",l=typeof t.min=="number",f=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=r,m=null,v=typeof r=="number",y=typeof r=="string",_=Array.isArray(r);if(v?m="number":y?m="string":_&&(m="array"),!m)return!1;_&&(d=r.length),y&&(d=r.replace(u,"_").length),o?d!==t.len&&a.push(Oi(i.messages[m].len,t.fullField,t.len)):l&&!f&&d<t.min?a.push(Oi(i.messages[m].min,t.fullField,t.min)):f&&!l&&d>t.max?a.push(Oi(i.messages[m].max,t.fullField,t.max)):l&&f&&(d<t.min||d>t.max)&&a.push(Oi(i.messages[m].range,t.fullField,t.min,t.max))},Yu="enum",rSe=function(t,r,n,a,i){t[Yu]=Array.isArray(t[Yu])?t[Yu]:[],t[Yu].indexOf(r)===-1&&a.push(Oi(i.messages[Yu],t.fullField,t[Yu].join(", ")))},nSe=function(t,r,n,a,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||a.push(Oi(i.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var o=new RegExp(t.pattern);o.test(r)||a.push(Oi(i.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},er={required:gP,whitespace:X6e,type:eSe,range:tSe,enum:rSe,pattern:nSe},iSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"string")&&!t.required)return n();er.required(t,r,a,o,i,"string"),_n(r,"string")||(er.type(t,r,a,o,i),er.range(t,r,a,o,i),er.pattern(t,r,a,o,i),t.whitespace===!0&&er.whitespace(t,r,a,o,i))}n(o)},aSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},oSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r===""&&(r=void 0),_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},sSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},lSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),_n(r)||er.type(t,r,a,o,i)}n(o)},fSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},uSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},cSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(r==null&&!t.required)return n();er.required(t,r,a,o,i,"array"),r!=null&&(er.type(t,r,a,o,i),er.range(t,r,a,o,i))}n(o)},hSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er.type(t,r,a,o,i)}n(o)},dSe="enum",pSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i),r!==void 0&&er[dSe](t,r,a,o,i)}n(o)},vSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"string")&&!t.required)return n();er.required(t,r,a,o,i),_n(r,"string")||er.pattern(t,r,a,o,i)}n(o)},mSe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r,"date")&&!t.required)return n();if(er.required(t,r,a,o,i),!_n(r,"date")){var f;r instanceof Date?f=r:f=new Date(r),er.type(t,f,a,o,i),f&&er.range(t,f.getTime(),a,o,i)}}n(o)},gSe=function(t,r,n,a,i){var o=[],l=Array.isArray(r)?"array":typeof r;er.required(t,r,a,o,i,l),n(o)},b3=function(t,r,n,a,i){var o=t.type,l=[],f=t.required||!t.required&&a.hasOwnProperty(t.field);if(f){if(_n(r,o)&&!t.required)return n();er.required(t,r,a,l,i,o),_n(r,o)||er.type(t,r,a,l,i)}n(l)},ySe=function(t,r,n,a,i){var o=[],l=t.required||!t.required&&a.hasOwnProperty(t.field);if(l){if(_n(r)&&!t.required)return n();er.required(t,r,a,o,i)}n(o)},ed={string:iSe,method:aSe,number:oSe,boolean:sSe,regexp:lSe,integer:fSe,float:uSe,array:cSe,object:hSe,enum:pSe,pattern:vSe,date:mSe,url:b3,hex:b3,email:b3,required:gSe,any:ySe};function _3(){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 w3=_3(),td=function(){function e(r){this.rules=null,this._messages=w3,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 o=n[i];a.rules[i]=Array.isArray(o)?o:[o]})},t.messages=function(n){return n&&(this._messages=mP(_3(),n)),this._messages},t.validate=function(n,a,i){var o=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var l=n,f=a,u=i;if(typeof f=="function"&&(u=f,f={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function d(E){var C=[],T={};function I(N){if(Array.isArray(N)){var O;C=(O=C).concat.apply(O,N)}else C.push(N)}for(var k=0;k<E.length;k++)I(E[k]);C.length?(T=y3(C),u(C,T)):u(null,l)}if(f.messages){var m=this.messages();m===w3&&(m=_3()),mP(m,f.messages),f.messages=m}else f.messages=this.messages();var v={},y=f.keys||Object.keys(this.rules);y.forEach(function(E){var C=o.rules[E],T=l[E];C.forEach(function(I){var k=I;typeof k.transform=="function"&&(l===n&&(l=xf({},l)),T=l[E]=k.transform(T)),typeof k=="function"?k={validator:k}:k=xf({},k),k.validator=o.getValidationMethod(k),k.validator&&(k.field=E,k.fullField=k.fullField||E,k.type=o.getType(k),v[E]=v[E]||[],v[E].push({rule:k,value:T,source:l,field:E}))})});var _={};return Z6e(v,f,function(E,C){var T=E.rule,I=(T.type==="object"||T.type==="array")&&(typeof T.fields=="object"||typeof T.defaultField=="object");I=I&&(T.required||!T.required&&E.value),T.field=E.field;function k(P,z){return xf({},z,{fullField:T.fullField+"."+P,fullFields:T.fullFields?[].concat(T.fullFields,[P]):[P]})}function N(P){P===void 0&&(P=[]);var z=Array.isArray(P)?P:[P];!f.suppressWarning&&z.length&&e.warning("async-validator:",z),z.length&&T.message!==void 0&&(z=[].concat(T.message));var V=z.map(vP(T,l));if(f.first&&V.length)return _[T.field]=1,C(V);if(!I)C(V);else{if(T.required&&!E.value)return T.message!==void 0?V=[].concat(T.message).map(vP(T,l)):f.error&&(V=[f.error(T,Oi(f.messages.required,T.field))]),C(V);var L={};T.defaultField&&Object.keys(E.value).map(function(s){L[s]=T.defaultField}),L=xf({},L,E.rule.fields);var U={};Object.keys(L).forEach(function(s){var h=L[s],p=Array.isArray(h)?h:[h];U[s]=p.map(k.bind(null,s))});var M=new e(U);M.messages(f.messages),E.rule.options&&(E.rule.options.messages=f.messages,E.rule.options.error=f.error),M.validate(E.value,E.rule.options||f,function(s){var h=[];V&&V.length&&h.push.apply(h,V),s&&s.length&&h.push.apply(h,s),C(h.length?h:null)})}}var O;if(T.asyncValidator)O=T.asyncValidator(T,E.value,N,E.source,f);else if(T.validator){try{O=T.validator(T,E.value,N,E.source,f)}catch(P){console.error==null||console.error(P),f.suppressValidatorError||setTimeout(function(){throw P},0),N(P.message)}O===!0?N():O===!1?N(typeof T.message=="function"?T.message(T.fullField||T.field):T.message||(T.fullField||T.field)+" fails"):O instanceof Array?N(O):O instanceof Error&&N(O.message)}O&&O.then&&O.then(function(){return N()},function(P){return N(P)})},function(E){d(E)},l)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!ed.hasOwnProperty(n.type))throw new Error(Oi("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"?ed.required:ed[this.getType(n)]||void 0},e}();td.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");ed[t]=r},td.warning=hP,td.messages=w3,td.validators=ed;const bSe=["","error","validating","success"],_Se=Kr({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:$t([String,Array])},required:{type:Boolean,default:void 0},rules:{type:$t([Object,Array])},error:String,validateStatus:{type:String,values:bSe},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Hh}}),bP="ElLabelWrap";var wSe=st({name:bP,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const r=At(Gu,void 0),n=At(Ef);n||zu(bP,"usage: <el-form-item><label-wrap /></el-form-item>");const a=Qt("form"),i=Re(),o=Re(0),l=()=>{var d;if((d=i.value)!=null&&d.firstElementChild){const m=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(m))}else return 0},f=(d="update")=>{kt(()=>{t.default&&e.isAutoWidth&&(d==="update"?o.value=l():d==="remove"&&(r==null||r.deregisterLabelWidth(o.value)))})},u=()=>f("update");return ir(()=>{u()}),fn(()=>{f("remove")}),Au(()=>u()),ut(o,(d,m)=>{e.updateAll&&(r==null||r.registerLabelWidth(d,m))}),Fu(Ee(()=>{var d,m;return(m=(d=i.value)==null?void 0:d.firstElementChild)!=null?m:null}),u),()=>{var d,m;if(!t)return null;const{isAutoWidth:v}=e;if(v){const y=r==null?void 0:r.autoLabelWidth,_=n==null?void 0:n.hasLabel,E={};if(_&&y&&y!=="auto"){const C=Math.max(0,Number.parseInt(y,10)-o.value),T=r.labelPosition==="left"?"marginRight":"marginLeft";C&&(E[T]=`${C}px`)}return ht("div",{ref:i,class:[a.be("item","label-wrap")],style:E},[(d=t.default)==null?void 0:d.call(t)])}else return ht(wt,{ref:i},[(m=t.default)==null?void 0:m.call(t)])}}});const ESe=["role","aria-labelledby"],xSe=st({name:"ElFormItem"}),SSe=st({...xSe,props:_Se,setup(e,{expose:t}){const r=e,n=mv(),a=At(Gu,void 0),i=At(Ef,void 0),o=Zu(void 0,{formItem:!1}),l=Qt("form-item"),f=c3().value,u=Re([]),d=Re(""),m=Pye(d,100),v=Re(""),y=Re();let _,E=!1;const C=Ee(()=>{if((a==null?void 0:a.labelPosition)==="top")return{};const Y=Vh(r.labelWidth||(a==null?void 0:a.labelWidth)||"");return Y?{width:Y}:{}}),T=Ee(()=>{if((a==null?void 0:a.labelPosition)==="top"||a!=null&&a.inline)return{};if(!r.label&&!r.labelWidth&&L)return{};const Y=Vh(r.labelWidth||(a==null?void 0:a.labelWidth)||"");return!r.label&&!n.label?{marginLeft:Y}:{}}),I=Ee(()=>[l.b(),l.m(o.value),l.is("error",d.value==="error"),l.is("validating",d.value==="validating"),l.is("success",d.value==="success"),l.is("required",p.value||r.required),l.is("no-asterisk",a==null?void 0:a.hideRequiredAsterisk),(a==null?void 0:a.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:a==null?void 0:a.statusIcon}]),k=Ee(()=>Yv(r.inlineMessage)?r.inlineMessage:(a==null?void 0:a.inlineMessage)||!1),N=Ee(()=>[l.e("error"),{[l.em("error","inline")]:k.value}]),O=Ee(()=>r.prop?Bt(r.prop)?r.prop:r.prop.join("."):""),P=Ee(()=>!!(r.label||n.label)),z=Ee(()=>r.for||u.value.length===1?u.value[0]:void 0),V=Ee(()=>!z.value&&P.value),L=!!i,U=Ee(()=>{const Y=a==null?void 0:a.model;if(!(!Y||!r.prop))return JE(Y,r.prop).value}),M=Ee(()=>{const{required:Y}=r,ue=[];r.rules&&ue.push(...UE(r.rules));const oe=a==null?void 0:a.rules;if(oe&&r.prop){const ce=JE(oe,r.prop).value;ce&&ue.push(...UE(ce))}if(Y!==void 0){const ce=ue.map((ne,J)=>[ne,J]).filter(([ne])=>Object.keys(ne).includes("required"));if(ce.length>0)for(const[ne,J]of ce)ne.required!==Y&&(ue[J]={...ne,required:Y});else ue.push({required:Y})}return ue}),s=Ee(()=>M.value.length>0),h=Y=>M.value.filter(oe=>!oe.trigger||!Y?!0:Array.isArray(oe.trigger)?oe.trigger.includes(Y):oe.trigger===Y).map(({trigger:oe,...ce})=>ce),p=Ee(()=>M.value.some(Y=>Y.required)),g=Ee(()=>{var Y;return m.value==="error"&&r.showMessage&&((Y=a==null?void 0:a.showMessage)!=null?Y:!0)}),b=Ee(()=>`${r.label||""}${(a==null?void 0:a.labelSuffix)||""}`),w=Y=>{d.value=Y},A=Y=>{var ue,oe;const{errors:ce,fields:ne}=Y;(!ce||!ne)&&console.error(Y),w("error"),v.value=ce?(oe=(ue=ce==null?void 0:ce[0])==null?void 0:ue.message)!=null?oe:`${r.prop} is required`:"",a==null||a.emit("validate",r.prop,!1,v.value)},x=()=>{w("success"),a==null||a.emit("validate",r.prop,!0,"")},c=async Y=>{const ue=O.value;return new td({[ue]:Y}).validate({[ue]:U.value},{firstFields:!0}).then(()=>(x(),!0)).catch(ce=>(A(ce),Promise.reject(ce)))},S=async(Y,ue)=>{if(E||!r.prop)return!1;const oe=bt(ue);if(!s.value)return ue==null||ue(!1),!1;const ce=h(Y);return ce.length===0?(ue==null||ue(!0),!0):(w("validating"),c(ce).then(()=>(ue==null||ue(!0),!0)).catch(ne=>{const{fields:J}=ne;return ue==null||ue(!1,J),oe?!1:Promise.reject(J)}))},B=()=>{w(""),v.value="",E=!1},R=async()=>{const Y=a==null?void 0:a.model;if(!Y||!r.prop)return;const ue=JE(Y,r.prop);E=!0,ue.value=iR(_),await kt(),B(),E=!1},H=Y=>{u.value.includes(Y)||u.value.push(Y)},X=Y=>{u.value=u.value.filter(ue=>ue!==Y)};ut(()=>r.error,Y=>{v.value=Y||"",w(Y?"error":"")},{immediate:!0}),ut(()=>r.validateStatus,Y=>w(Y||""));const G=Vn({...Ql(r),$el:y,size:o,validateState:d,labelId:f,inputIds:u,isGroup:V,hasLabel:P,addInputId:H,removeInputId:X,resetField:R,clearValidate:B,validate:S});return un(Ef,G),ir(()=>{r.prop&&(a==null||a.addField(G),_=iR(U.value))}),fn(()=>{a==null||a.removeField(G)}),t({size:o,validateMessage:v,validateState:d,validate:S,clearValidate:B,resetField:R}),(Y,ue)=>{var oe;return me(),Fe("div",{ref_key:"formItemRef",ref:y,class:Te(W(I)),role:W(V)?"group":void 0,"aria-labelledby":W(V)?W(f):void 0},[ht(W(wSe),{"is-auto-width":W(C).width==="auto","update-all":((oe=W(a))==null?void 0:oe.labelWidth)==="auto"},{default:rt(()=>[W(P)?(me(),et(ni(W(z)?"label":"div"),{key:0,id:W(f),for:W(z),class:Te(W(l).e("label")),style:on(W(C))},{default:rt(()=>[Ot(Y.$slots,"label",{label:W(b)},()=>[br(ot(W(b)),1)])]),_:3},8,["id","for","class","style"])):Xe("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),Ue("div",{class:Te(W(l).e("content")),style:on(W(T))},[Ot(Y.$slots,"default"),ht(mge,{name:`${W(l).namespace.value}-zoom-in-top`},{default:rt(()=>[W(g)?Ot(Y.$slots,"error",{key:0,error:v.value},()=>[Ue("div",{class:Te(W(N))},ot(v.value),3)]):Xe("v-if",!0)]),_:3},8,["name"])],6)],10,ESe)}}});var _P=vr(SSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const wP=Ni(U6e,{FormItem:_P}),E3=bf(_P);let Ra;const MSe=`
866
866
  height:0 !important;
867
867
  visibility:hidden !important;
868
868
  ${Kye()?"":"overflow:hidden !important;"}
@@ -870,6 +870,6 @@ usage: app.provide(ID_INJECTION_KEY, {
870
870
  z-index:-1000 !important;
871
871
  top:0 !important;
872
872
  right:0 !important;
873
- `,CSe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function TSe(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:CSe.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:a,boxSizing:r}}function EP(e,t=1,r){var n;Ra||(Ra=document.createElement("textarea"),document.body.appendChild(Ra));const{paddingSize:a,borderSize:i,boxSizing:o,contextStyle:l}=TSe(e);Ra.setAttribute("style",`${l};${MSe}`),Ra.value=e.value||e.placeholder||"";let f=Ra.scrollHeight;const u={};o==="border-box"?f=f+i:o==="content-box"&&(f=f-a),Ra.value="";const d=Ra.scrollHeight-a;if(ka(t)){let m=d*t;o==="border-box"&&(m=m+a+i),f=Math.max(m,f),u.minHeight=`${m}px`}if(ka(r)){let m=d*r;o==="border-box"&&(m=m+a+i),f=Math.min(m,f)}return u.height=`${f}px`,(n=Ra.parentNode)==null||n.removeChild(Ra),Ra=void 0,u}const ASe=Kr({id:{type:String,default:void 0},size:h3,disabled:Boolean,modelValue:{type:$t([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:$t([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:oa},prefixIcon:{type:oa},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:$t([Object,Array,String]),default:()=>TR({})},autofocus:{type:Boolean,default:!1}}),ISe={[Na]:e=>Bt(e),input:e=>Bt(e),change:e=>Bt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},BSe=["role"],kSe=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],NSe=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],OSe=st({name:"ElInput",inheritAttrs:!1}),RSe=st({...OSe,props:ASe,emits:ISe,setup(e,{expose:t,emit:r}){const n=e,a=L9(),i=mv(),o=Ee(()=>{const K={};return n.containerRole==="combobox"&&(K["aria-haspopup"]=a["aria-haspopup"],K["aria-owns"]=a["aria-owns"],K["aria-expanded"]=a["aria-expanded"]),K}),l=Ee(()=>[n.type==="textarea"?C.b():E.b(),E.m(y.value),E.is("disabled",_.value),E.is("exceed",H.value),{[E.b("group")]:i.prepend||i.append,[E.bm("group","append")]:i.append,[E.bm("group","prepend")]:i.prepend,[E.m("prefix")]:i.prefix||n.prefixIcon,[E.m("suffix")]:i.suffix||n.suffixIcon||n.clearable||n.showPassword,[E.bm("suffix","password-clear")]:c.value&&S.value},a.class]),f=Ee(()=>[E.e("wrapper"),E.is("focus",U.value)]),u=Gxe({excludeKeys:Ee(()=>Object.keys(o.value))}),{form:d,formItem:m}=v3(),{inputId:v}=O6e(n,{formItemContext:m}),y=Zu(),_=p3(),E=Qt("input"),C=Qt("textarea"),T=Xl(),I=Xl(),k=Re(!1),N=Re(!1),O=Re(!1),P=Re(),z=Xl(n.inputStyle),V=Ee(()=>T.value||I.value),{wrapperRef:L,isFocused:U,handleFocus:M,handleBlur:s}=m6e(V,{afterBlur(){var K;n.validateEvent&&((K=m==null?void 0:m.validate)==null||K.call(m,"blur").catch(pe=>yn(pe)))}}),h=Ee(()=>{var K;return(K=d==null?void 0:d.statusIcon)!=null?K:!1}),p=Ee(()=>(m==null?void 0:m.validateState)||""),g=Ee(()=>p.value&&SR[p.value]),b=Ee(()=>O.value?Oxe:oxe),w=Ee(()=>[a.style,n.inputStyle]),A=Ee(()=>[n.inputStyle,z.value,{resize:n.resize}]),x=Ee(()=>$u(n.modelValue)?"":String(n.modelValue)),c=Ee(()=>n.clearable&&!_.value&&!n.readonly&&!!x.value&&(U.value||k.value)),S=Ee(()=>n.showPassword&&!_.value&&!n.readonly&&!!x.value&&(!!x.value||U.value)),B=Ee(()=>n.showWordLimit&&!!u.value.maxlength&&(n.type==="text"||n.type==="textarea")&&!_.value&&!n.readonly&&!n.showPassword),R=Ee(()=>x.value.length),H=Ee(()=>!!B.value&&R.value>Number(u.value.maxlength)),X=Ee(()=>!!i.suffix||!!n.suffixIcon||c.value||n.showPassword||B.value||!!p.value&&h.value),[G,Y]=p6e(T);Fu(I,K=>{if(ce(),!B.value||n.resize!=="both")return;const pe=K[0],{width:ie}=pe.contentRect;P.value={right:`calc(100% - ${ie+15+6}px)`}});const ue=()=>{const{type:K,autosize:pe}=n;if(!(!hn||K!=="textarea"||!I.value))if(pe){const ie=Dt(pe)?pe.minRows:void 0,ve=Dt(pe)?pe.maxRows:void 0,Ye=EP(I.value,ie,ve);z.value={overflowY:"hidden",...Ye},kt(()=>{I.value.offsetHeight,z.value=Ye})}else z.value={minHeight:EP(I.value).minHeight}},ce=(K=>{let pe=!1;return()=>{var ie;if(pe||!n.autosize)return;((ie=I.value)==null?void 0:ie.offsetParent)===null||(K(),pe=!0)}})(ue),ne=()=>{const K=V.value,pe=n.formatter?n.formatter(x.value):x.value;!K||K.value===pe||(K.value=pe)},J=async K=>{G();let{value:pe}=K.target;if(n.formatter&&(pe=n.parser?n.parser(pe):pe),!N.value){if(pe===x.value){ne();return}r(Na,pe),r("input",pe),await kt(),ne(),Y()}},j=K=>{r("change",K.target.value)},ae=K=>{r("compositionstart",K),N.value=!0},se=K=>{var pe;r("compositionupdate",K);const ie=(pe=K.target)==null?void 0:pe.value,ve=ie[ie.length-1]||"";N.value=!CR(ve)},q=K=>{r("compositionend",K),N.value&&(N.value=!1,J(K))},D=()=>{O.value=!O.value,F()},F=async()=>{var K;await kt(),(K=V.value)==null||K.focus()},$=()=>{var K;return(K=V.value)==null?void 0:K.blur()},re=K=>{k.value=!1,r("mouseleave",K)},Q=K=>{k.value=!0,r("mouseenter",K)},te=K=>{r("keydown",K)},le=()=>{var K;(K=V.value)==null||K.select()},Z=()=>{r(Na,""),r("change",""),r("clear"),r("input","")};return ut(()=>n.modelValue,()=>{var K;kt(()=>ue()),n.validateEvent&&((K=m==null?void 0:m.validate)==null||K.call(m,"change").catch(pe=>yn(pe)))}),ut(x,()=>ne()),ut(()=>n.type,async()=>{await kt(),ne(),ue()}),ir(()=>{!n.formatter&&n.parser&&yn("ElInput","If you set the parser, you also need to set the formatter."),ne(),kt(ue)}),t({input:T,textarea:I,ref:V,textareaStyle:A,autosize:ra(n,"autosize"),focus:F,blur:$,select:le,clear:Z,resizeTextarea:ue}),(K,pe)=>tn((me(),Fe("div",Ai(W(o),{class:W(l),style:W(w),role:K.containerRole,onMouseenter:Q,onMouseleave:re}),[et(" input "),K.type!=="textarea"?(me(),Fe(wt,{key:0},[et(" prepend slot "),K.$slots.prepend?(me(),Fe("div",{key:0,class:Te(W(E).be("group","prepend"))},[Ot(K.$slots,"prepend")],2)):et("v-if",!0),Ue("div",{ref_key:"wrapperRef",ref:L,class:Te(W(f))},[et(" prefix slot "),K.$slots.prefix||K.prefixIcon?(me(),Fe("span",{key:0,class:Te(W(E).e("prefix"))},[Ue("span",{class:Te(W(E).e("prefix-inner"))},[Ot(K.$slots,"prefix"),K.prefixIcon?(me(),Qe(W(Rn),{key:0,class:Te(W(E).e("icon"))},{default:rt(()=>[(me(),Qe(ni(K.prefixIcon)))]),_:1},8,["class"])):et("v-if",!0)],2)],2)):et("v-if",!0),Ue("input",Ai({id:W(v),ref_key:"input",ref:T,class:W(E).e("inner")},W(u),{type:K.showPassword?O.value?"text":"password":K.type,disabled:W(_),formatter:K.formatter,parser:K.parser,readonly:K.readonly,autocomplete:K.autocomplete,tabindex:K.tabindex,"aria-label":K.label,placeholder:K.placeholder,style:K.inputStyle,form:n.form,autofocus:n.autofocus,onCompositionstart:ae,onCompositionupdate:se,onCompositionend:q,onInput:J,onFocus:pe[0]||(pe[0]=(...ie)=>W(M)&&W(M)(...ie)),onBlur:pe[1]||(pe[1]=(...ie)=>W(s)&&W(s)(...ie)),onChange:j,onKeydown:te}),null,16,kSe),et(" suffix slot "),W(X)?(me(),Fe("span",{key:1,class:Te(W(E).e("suffix"))},[Ue("span",{class:Te(W(E).e("suffix-inner"))},[!W(c)||!W(S)||!W(B)?(me(),Fe(wt,{key:0},[Ot(K.$slots,"suffix"),K.suffixIcon?(me(),Qe(W(Rn),{key:0,class:Te(W(E).e("icon"))},{default:rt(()=>[(me(),Qe(ni(K.suffixIcon)))]),_:1},8,["class"])):et("v-if",!0)],64)):et("v-if",!0),W(c)?(me(),Qe(W(Rn),{key:1,class:Te([W(E).e("icon"),W(E).e("clear")]),onMousedown:Cn(W(an),["prevent"]),onClick:Z},{default:rt(()=>[ht(W(XE))]),_:1},8,["class","onMousedown"])):et("v-if",!0),W(S)?(me(),Qe(W(Rn),{key:2,class:Te([W(E).e("icon"),W(E).e("password")]),onClick:D},{default:rt(()=>[(me(),Qe(ni(W(b))))]),_:1},8,["class"])):et("v-if",!0),W(B)?(me(),Fe("span",{key:3,class:Te(W(E).e("count"))},[Ue("span",{class:Te(W(E).e("count-inner"))},ot(W(R))+" / "+ot(W(u).maxlength),3)],2)):et("v-if",!0),W(p)&&W(g)&&W(h)?(me(),Qe(W(Rn),{key:4,class:Te([W(E).e("icon"),W(E).e("validateIcon"),W(E).is("loading",W(p)==="validating")])},{default:rt(()=>[(me(),Qe(ni(W(g))))]),_:1},8,["class"])):et("v-if",!0)],2)],2)):et("v-if",!0)],2),et(" append slot "),K.$slots.append?(me(),Fe("div",{key:1,class:Te(W(E).be("group","append"))},[Ot(K.$slots,"append")],2)):et("v-if",!0)],64)):(me(),Fe(wt,{key:1},[et(" textarea "),Ue("textarea",Ai({id:W(v),ref_key:"textarea",ref:I,class:W(C).e("inner")},W(u),{tabindex:K.tabindex,disabled:W(_),readonly:K.readonly,autocomplete:K.autocomplete,style:W(A),"aria-label":K.label,placeholder:K.placeholder,form:n.form,autofocus:n.autofocus,onCompositionstart:ae,onCompositionupdate:se,onCompositionend:q,onInput:J,onFocus:pe[2]||(pe[2]=(...ie)=>W(M)&&W(M)(...ie)),onBlur:pe[3]||(pe[3]=(...ie)=>W(s)&&W(s)(...ie)),onChange:j,onKeydown:te}),null,16,NSe),W(B)?(me(),Fe("span",{key:0,style:on(P.value),class:Te(W(E).e("count"))},ot(W(R))+" / "+ot(W(u).maxlength),7)):et("v-if",!0)],64))],16,BSe)),[[vi,K.type!=="hidden"]])}});var PSe=vr(RSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const dm=Ni(PSe),Ju=4,FSe={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},LSe=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),xP=Symbol("scrollbarContextKey"),DSe=Kr({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$Se="Thumb";var SP=vr(st({__name:"thumb",props:DSe,setup(e){const t=e,r=At(xP),n=Qt("scrollbar");r||zu($Se,"can not inject scrollbar context");const a=Re(),i=Re(),o=Re({}),l=Re(!1);let f=!1,u=!1,d=hn?document.onselectstart:null;const m=Ee(()=>FSe[t.vertical?"vertical":"horizontal"]),v=Ee(()=>LSe({size:t.size,move:t.move,bar:m.value})),y=Ee(()=>a.value[m.value.offset]**2/r.wrapElement[m.value.scrollSize]/t.ratio/i.value[m.value.offset]),_=P=>{var z;if(P.stopPropagation(),P.ctrlKey||[1,2].includes(P.button))return;(z=window.getSelection())==null||z.removeAllRanges(),C(P);const V=P.currentTarget;V&&(o.value[m.value.axis]=V[m.value.offset]-(P[m.value.client]-V.getBoundingClientRect()[m.value.direction]))},E=P=>{if(!i.value||!a.value||!r.wrapElement)return;const z=Math.abs(P.target.getBoundingClientRect()[m.value.direction]-P[m.value.client]),V=i.value[m.value.offset]/2,L=(z-V)*100*y.value/a.value[m.value.offset];r.wrapElement[m.value.scroll]=L*r.wrapElement[m.value.scrollSize]/100},C=P=>{P.stopImmediatePropagation(),f=!0,document.addEventListener("mousemove",T),document.addEventListener("mouseup",I),d=document.onselectstart,document.onselectstart=()=>!1},T=P=>{if(!a.value||!i.value||f===!1)return;const z=o.value[m.value.axis];if(!z)return;const V=(a.value.getBoundingClientRect()[m.value.direction]-P[m.value.client])*-1,L=i.value[m.value.offset]-z,U=(V-L)*100*y.value/a.value[m.value.offset];r.wrapElement[m.value.scroll]=U*r.wrapElement[m.value.scrollSize]/100},I=()=>{f=!1,o.value[m.value.axis]=0,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",I),O(),u&&(l.value=!1)},k=()=>{u=!1,l.value=!!t.size},N=()=>{u=!0,l.value=f};fn(()=>{O(),document.removeEventListener("mouseup",I)});const O=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return Jo(ra(r,"scrollbarElement"),"mousemove",k),Jo(ra(r,"scrollbarElement"),"mouseleave",N),(P,z)=>(me(),Qe(aa,{name:W(n).b("fade"),persisted:""},{default:rt(()=>[tn(Ue("div",{ref_key:"instance",ref:a,class:Te([W(n).e("bar"),W(n).is(W(m).key)]),onMousedown:E},[Ue("div",{ref_key:"thumb",ref:i,class:Te(W(n).e("thumb")),style:on(W(v)),onMousedown:_},null,38)],34),[[vi,P.always||l.value]])]),_:1},8,["name"]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const zSe=Kr({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var USe=vr(st({__name:"bar",props:zSe,setup(e,{expose:t}){const r=e,n=Re(0),a=Re(0);return t({handleScroll:o=>{if(o){const l=o.offsetHeight-Ju,f=o.offsetWidth-Ju;a.value=o.scrollTop*100/l*r.ratioY,n.value=o.scrollLeft*100/f*r.ratioX}}}),(o,l)=>(me(),Fe(wt,null,[ht(SP,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),ht(SP,{move:a.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const qSe=Kr({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:$t([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),VSe={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(ka)},x3="ElScrollbar",HSe=st({name:x3}),jSe=st({...HSe,props:qSe,emits:VSe,setup(e,{expose:t,emit:r}){const n=e,a=Qt("scrollbar");let i,o;const l=Re(),f=Re(),u=Re(),d=Re("0"),m=Re("0"),v=Re(),y=Re(1),_=Re(1),E=Ee(()=>{const z={};return n.height&&(z.height=Vh(n.height)),n.maxHeight&&(z.maxHeight=Vh(n.maxHeight)),[n.wrapStyle,z]}),C=Ee(()=>[n.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!n.native}]),T=Ee(()=>[a.e("view"),n.viewClass]),I=()=>{var z;f.value&&((z=v.value)==null||z.handleScroll(f.value),r("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function k(z,V){Dt(z)?f.value.scrollTo(z):ka(z)&&ka(V)&&f.value.scrollTo(z,V)}const N=z=>{if(!ka(z)){yn(x3,"value must be a number");return}f.value.scrollTop=z},O=z=>{if(!ka(z)){yn(x3,"value must be a number");return}f.value.scrollLeft=z},P=()=>{if(!f.value)return;const z=f.value.offsetHeight-Ju,V=f.value.offsetWidth-Ju,L=z**2/f.value.scrollHeight,U=V**2/f.value.scrollWidth,M=Math.max(L,n.minSize),s=Math.max(U,n.minSize);y.value=L/(z-L)/(M/(z-M)),_.value=U/(V-U)/(s/(V-s)),m.value=M+Ju<z?`${M}px`:"",d.value=s+Ju<V?`${s}px`:""};return ut(()=>n.noresize,z=>{z?(i==null||i(),o==null||o()):({stop:i}=Fu(u,P),o=Jo("resize",P))},{immediate:!0}),ut(()=>[n.maxHeight,n.height],()=>{n.native||kt(()=>{var z;P(),f.value&&((z=v.value)==null||z.handleScroll(f.value))})}),un(xP,Vn({scrollbarElement:l,wrapElement:f})),ir(()=>{n.native||kt(()=>{P()})}),Au(()=>P()),t({wrapRef:f,update:P,scrollTo:k,setScrollTop:N,setScrollLeft:O,handleScroll:I}),(z,V)=>(me(),Fe("div",{ref_key:"scrollbarRef",ref:l,class:Te(W(a).b())},[Ue("div",{ref_key:"wrapRef",ref:f,class:Te(W(C)),style:on(W(E)),onScroll:I},[(me(),Qe(ni(z.tag),{ref_key:"resizeRef",ref:u,class:Te(W(T)),style:on(z.viewStyle)},{default:rt(()=>[Ot(z.$slots,"default")]),_:3},8,["class","style"]))],38),z.native?et("v-if",!0):(me(),Qe(USe,{key:0,ref_key:"barRef",ref:v,height:m.value,width:d.value,always:z.always,"ratio-x":_.value,"ratio-y":y.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var KSe=vr(jSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const WSe=Ni(KSe),S3=Symbol("popper"),MP=Symbol("popperContent"),CP=Kr({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),GSe=st({name:"ElPopper",inheritAttrs:!1}),ZSe=st({...GSe,props:CP,setup(e,{expose:t}){const r=e,n=Re(),a=Re(),i=Re(),o=Re(),l=Ee(()=>r.role),f={triggerRef:n,popperInstanceRef:a,contentRef:i,referenceRef:o,role:l};return t(f),un(S3,f),(u,d)=>Ot(u.$slots,"default")}});var YSe=vr(ZSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const TP=Kr({arrowOffset:{type:Number,default:5}}),JSe=st({name:"ElPopperArrow",inheritAttrs:!1}),XSe=st({...JSe,props:TP,setup(e,{expose:t}){const r=e,n=Qt("popper"),{arrowOffset:a,arrowRef:i,arrowStyle:o}=At(MP,void 0);return ut(()=>r.arrowOffset,l=>{a.value=l}),fn(()=>{i.value=void 0}),t({arrowRef:i}),(l,f)=>(me(),Fe("span",{ref_key:"arrowRef",ref:i,class:Te(W(n).e("arrow")),style:on(W(o)),"data-popper-arrow":""},null,6))}});var QSe=vr(XSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const M3="ElOnlyChild",e8e=st({name:M3,setup(e,{slots:t,attrs:r}){var n;const a=At(nP),i=d6e((n=a==null?void 0:a.setForwardRef)!=null?n:an);return()=>{var o;const l=(o=t.default)==null?void 0:o.call(t,r);if(!l)return null;if(l.length>1)return yn(M3,"requires exact only one valid child."),null;const f=AP(l);return f?tn(xa(f,r),[[i]]):(yn(M3,"no valid child node found"),null)}}});function AP(e){if(!e)return null;const t=e;for(const r of t){if(Dt(r))switch(r.type){case mn:continue;case zs:case"svg":return IP(r);case wt:return AP(r.children);default:return r}return IP(r)}return null}function IP(e){const t=Qt("only-child");return ht("span",{class:t.e("content")},[e])}const BP=Kr({virtualRef:{type:$t(Object)},virtualTriggering:Boolean,onMouseenter:{type:$t(Function)},onMouseleave:{type:$t(Function)},onClick:{type:$t(Function)},onKeydown:{type:$t(Function)},onFocus:{type:$t(Function)},onBlur:{type:$t(Function)},onContextmenu:{type:$t(Function)},id:String,open:Boolean}),t8e=st({name:"ElPopperTrigger",inheritAttrs:!1}),r8e=st({...t8e,props:BP,setup(e,{expose:t}){const r=e,{role:n,triggerRef:a}=At(S3,void 0);h6e(a);const i=Ee(()=>l.value?r.id:void 0),o=Ee(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=Ee(()=>{if(n&&n.value!=="tooltip")return n.value}),f=Ee(()=>l.value?`${r.open}`:void 0);let u;return ir(()=>{ut(()=>r.virtualRef,d=>{d&&(a.value=Ws(d))},{immediate:!0}),ut(a,(d,m)=>{u==null||u(),u=void 0,gf(d)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(v=>{var y;const _=r[v];_&&(d.addEventListener(v.slice(2).toLowerCase(),_),(y=m==null?void 0:m.removeEventListener)==null||y.call(m,v.slice(2).toLowerCase(),_))}),u=ut([i,o,l,f],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((y,_)=>{$u(v[_])?d.removeAttribute(y):d.setAttribute(y,v[_])})},{immediate:!0})),gf(m)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>m.removeAttribute(v))},{immediate:!0})}),fn(()=>{u==null||u(),u=void 0}),t({triggerRef:a}),(d,m)=>d.virtualTriggering?et("v-if",!0):(me(),Qe(W(e8e),Ai({key:0},d.$attrs,{"aria-controls":W(i),"aria-describedby":W(o),"aria-expanded":W(f),"aria-haspopup":W(l)}),{default:rt(()=>[Ot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var n8e=vr(r8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const C3="focus-trap.focus-after-trapped",T3="focus-trap.focus-after-released",i8e="focus-trap.focusout-prevented",kP={cancelable:!0,bubbles:!1},a8e={cancelable:!0,bubbles:!1},NP="focusAfterTrapped",OP="focusAfterReleased",o8e=Symbol("elFocusTrap"),A3=Re(),pm=Re(0),I3=Re(0);let vm=0;const RP=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},PP=(e,t)=>{for(const r of e)if(!s8e(r,t))return r},s8e=(e,t)=>{if(fe.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},l8e=e=>{const t=RP(e),r=PP(t,e),n=PP(t.reverse(),e);return[r,n]},f8e=e=>e instanceof HTMLInputElement&&"select"in e,Ys=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),I3.value=window.performance.now(),e!==r&&f8e(e)&&t&&e.select()}};function FP(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const u8e=()=>{let e=[];return{push:n=>{const a=e[0];a&&n!==a&&a.pause(),e=FP(e,n),e.unshift(n)},remove:n=>{var a,i;e=FP(e,n),(i=(a=e[0])==null?void 0:a.resume)==null||i.call(a)}}},c8e=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(Ys(n,t),document.activeElement!==r)return},LP=u8e(),h8e=()=>pm.value>I3.value,mm=()=>{A3.value="pointer",pm.value=window.performance.now()},DP=()=>{A3.value="keyboard",pm.value=window.performance.now()},d8e=()=>(ir(()=>{vm===0&&(document.addEventListener("mousedown",mm),document.addEventListener("touchstart",mm),document.addEventListener("keydown",DP)),vm++}),fn(()=>{vm--,vm<=0&&(document.removeEventListener("mousedown",mm),document.removeEventListener("touchstart",mm),document.removeEventListener("keydown",DP))}),{focusReason:A3,lastUserFocusTimestamp:pm,lastAutomatedFocusTimestamp:I3}),gm=e=>new CustomEvent(i8e,{...a8e,detail:e}),p8e=st({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[NP,OP,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=Re();let n,a;const{focusReason:i}=d8e();s6e(_=>{e.trapped&&!o.paused&&t("release-requested",_)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=_=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:E,altKey:C,ctrlKey:T,metaKey:I,currentTarget:k,shiftKey:N}=_,{loop:O}=e,P=E===bn.tab&&!C&&!T&&!I,z=document.activeElement;if(P&&z){const V=k,[L,U]=l8e(V);if(L&&U){if(!N&&z===U){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||(_.preventDefault(),O&&Ys(L,!0))}else if(N&&[L,V].includes(z)){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||(_.preventDefault(),O&&Ys(U,!0))}}else if(z===V){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||_.preventDefault()}}};un(o8e,{focusTrapRef:r,onKeydown:l}),ut(()=>e.focusTrapEl,_=>{_&&(r.value=_)},{immediate:!0}),ut([r],([_],[E])=>{_&&(_.addEventListener("keydown",l),_.addEventListener("focusin",d),_.addEventListener("focusout",m)),E&&(E.removeEventListener("keydown",l),E.removeEventListener("focusin",d),E.removeEventListener("focusout",m))});const f=_=>{t(NP,_)},u=_=>t(OP,_),d=_=>{const E=W(r);if(!E)return;const C=_.target,T=_.relatedTarget,I=C&&E.contains(C);e.trapped||T&&E.contains(T)||(n=T),I&&t("focusin",_),!o.paused&&e.trapped&&(I?a=C:Ys(a,!0))},m=_=>{const E=W(r);if(!(o.paused||!E))if(e.trapped){const C=_.relatedTarget;!$u(C)&&!E.contains(C)&&setTimeout(()=>{if(!o.paused&&e.trapped){const T=gm({focusReason:i.value});t("focusout-prevented",T),T.defaultPrevented||Ys(a,!0)}},0)}else{const C=_.target;C&&E.contains(C)||t("focusout",_)}};async function v(){await kt();const _=W(r);if(_){LP.push(o);const E=_.contains(document.activeElement)?n:document.activeElement;if(n=E,!_.contains(E)){const T=new Event(C3,kP);_.addEventListener(C3,f),_.dispatchEvent(T),T.defaultPrevented||kt(()=>{let I=e.focusStartEl;Bt(I)||(Ys(I),document.activeElement!==I&&(I="first")),I==="first"&&c8e(RP(_),!0),(document.activeElement===E||I==="container")&&Ys(_)})}}}function y(){const _=W(r);if(_){_.removeEventListener(C3,f);const E=new CustomEvent(T3,{...kP,detail:{focusReason:i.value}});_.addEventListener(T3,u),_.dispatchEvent(E),!E.defaultPrevented&&(i.value=="keyboard"||!h8e()||_.contains(document.activeElement))&&Ys(n??document.body),_.removeEventListener(T3,u),LP.remove(o)}}return ir(()=>{e.trapped&&v(),ut(()=>e.trapped,_=>{_?v():y()})}),fn(()=>{e.trapped&&y()}),{onKeydown:l}}});function v8e(e,t,r,n,a,i){return Ot(e.$slots,"default",{handleKeydown:e.onKeydown})}var m8e=vr(p8e,[["render",v8e],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const g8e=["fixed","absolute"],y8e=Kr({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:$t(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:nm,default:"bottom"},popperOptions:{type:$t(Object),default:()=>({})},strategy:{type:String,values:g8e,default:"absolute"}}),$P=Kr({...y8e,id:String,style:{type:$t([String,Array,Object])},className:{type:$t([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:$t([String,Array,Object])},popperStyle:{type:$t([String,Array,Object])},referenceEl:{type:$t(Object)},triggerTargetEl:{type:$t(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),b8e={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},_8e=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:a}=e,i={placement:r,strategy:n,...a,modifiers:[...E8e(e),...t]};return x8e(i,a==null?void 0:a.modifiers),i},w8e=e=>{if(hn)return Ws(e)};function E8e(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function x8e(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const S8e=0,M8e=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:a}=At(S3,void 0),i=Re(),o=Re(),l=Ee(()=>({name:"eventListeners",enabled:!!e.visible})),f=Ee(()=>{var T;const I=W(i),k=(T=W(o))!=null?T:S8e;return{name:"arrow",enabled:!h3e(I),options:{element:I,padding:k}}}),u=Ee(()=>({onFirstUpdate:()=>{_()},..._8e(e,[W(f),W(l)])})),d=Ee(()=>w8e(e.referenceEl)||W(n)),{attributes:m,state:v,styles:y,update:_,forceUpdate:E,instanceRef:C}=i6e(d,r,u);return ut(C,T=>t.value=T),ir(()=>{ut(()=>{var T;return(T=W(d))==null?void 0:T.getBoundingClientRect()},()=>{_()})}),{attributes:m,arrowRef:i,contentRef:r,instanceRef:C,state:v,styles:y,role:a,forceUpdate:E,update:_}},C8e=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:a}=sP(),i=Qt("popper"),o=Ee(()=>W(t).popper),l=Re(e.zIndex||a()),f=Ee(()=>[i.b(),i.is("pure",e.pure),i.is(e.effect),e.popperClass]),u=Ee(()=>[{zIndex:W(l)},W(r).popper,e.popperStyle||{}]),d=Ee(()=>n.value==="dialog"?"false":void 0),m=Ee(()=>W(r).arrow||{});return{ariaModal:d,arrowStyle:m,contentAttrs:o,contentClass:f,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=e.zIndex||a()}}},T8e=(e,t)=>{const r=Re(!1),n=Re();return{focusStartRef:n,trapped:r,onFocusAfterReleased:u=>{var d;((d=u.detail)==null?void 0:d.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!r.value&&(u.target&&(n.value=u.target),r.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},A8e=st({name:"ElPopperContent"}),I8e=st({...A8e,props:$P,emits:b8e,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:a,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:l,onFocusInTrap:f,onFocusoutPrevented:u,onReleaseRequested:d}=T8e(n,r),{attributes:m,arrowRef:v,contentRef:y,styles:_,instanceRef:E,role:C,update:T}=M8e(n),{ariaModal:I,arrowStyle:k,contentAttrs:N,contentClass:O,contentStyle:P,updateZIndex:z}=C8e(n,{styles:_,attributes:m,role:C}),V=At(Ef,void 0),L=Re();un(MP,{arrowStyle:k,arrowRef:v,arrowOffset:L}),V&&(V.addInputId||V.removeInputId)&&un(Ef,{...V,addInputId:an,removeInputId:an});let U;const M=(h=!0)=>{T(),h&&z()},s=()=>{M(!1),n.visible&&n.focusOnShow?i.value=!0:n.visible===!1&&(i.value=!1)};return ir(()=>{ut(()=>n.triggerTargetEl,(h,p)=>{U==null||U(),U=void 0;const g=W(h||y.value),b=W(p||y.value);gf(g)&&(U=ut([C,()=>n.ariaLabel,I,()=>n.id],w=>{["role","aria-label","aria-modal","id"].forEach((A,x)=>{$u(w[x])?g.removeAttribute(A):g.setAttribute(A,w[x])})},{immediate:!0})),b!==g&&gf(b)&&["role","aria-label","aria-modal","id"].forEach(w=>{b.removeAttribute(w)})},{immediate:!0}),ut(()=>n.visible,s,{immediate:!0})}),fn(()=>{U==null||U(),U=void 0}),t({popperContentRef:y,popperInstanceRef:E,updatePopper:M,contentStyle:P}),(h,p)=>(me(),Fe("div",Ai({ref_key:"contentRef",ref:y},W(N),{style:W(P),class:W(O),tabindex:"-1",onMouseenter:p[0]||(p[0]=g=>h.$emit("mouseenter",g)),onMouseleave:p[1]||(p[1]=g=>h.$emit("mouseleave",g))}),[ht(W(m8e),{trapped:W(i),"trap-on-focus-in":!0,"focus-trap-el":W(y),"focus-start-el":W(a),onFocusAfterTrapped:W(l),onFocusAfterReleased:W(o),onFocusin:W(f),onFocusoutPrevented:W(u),onReleaseRequested:W(d)},{default:rt(()=>[Ot(h.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var B8e=vr(I8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const k8e=Ni(YSe),B3=Symbol("elTooltip"),k3=Kr({...u6e,...$P,appendTo:{type:$t([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:$t(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),zP=Kr({...BP,disabled:Boolean,trigger:{type:$t([String,Array]),default:"hover"},triggerKeys:{type:$t(Array),default:()=>[bn.enter,bn.space]}}),{useModelToggleProps:N8e,useModelToggleEmits:O8e,useModelToggle:R8e}=BR("visible"),P8e=Kr({...CP,...N8e,...k3,...zP,...TP,showArrow:{type:Boolean,default:!0}}),F8e=[...O8e,"before-show","before-hide","show","hide","open","close"],L8e=(e,t)=>mt(e)?e.includes(t):e===t,Xu=(e,t,r)=>n=>{L8e(W(e),t)&&r(n)},D8e=st({name:"ElTooltipTrigger"}),$8e=st({...D8e,props:zP,setup(e,{expose:t}){const r=e,n=Qt("tooltip"),{controlled:a,id:i,open:o,onOpen:l,onClose:f,onToggle:u}=At(B3,void 0),d=Re(null),m=()=>{if(W(a)||r.disabled)return!0},v=ra(r,"trigger"),y=Yo(m,Xu(v,"hover",l)),_=Yo(m,Xu(v,"hover",f)),E=Yo(m,Xu(v,"click",N=>{N.button===0&&u(N)})),C=Yo(m,Xu(v,"focus",l)),T=Yo(m,Xu(v,"focus",f)),I=Yo(m,Xu(v,"contextmenu",N=>{N.preventDefault(),u(N)})),k=Yo(m,N=>{const{code:O}=N;r.triggerKeys.includes(O)&&(N.preventDefault(),u(N))});return t({triggerRef:d}),(N,O)=>(me(),Qe(W(n8e),{id:W(i),"virtual-ref":N.virtualRef,open:W(o),"virtual-triggering":N.virtualTriggering,class:Te(W(n).e("trigger")),onBlur:W(T),onClick:W(E),onContextmenu:W(I),onFocus:W(C),onMouseenter:W(y),onMouseleave:W(_),onKeydown:W(k)},{default:rt(()=>[Ot(N.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var z8e=vr($8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const U8e=st({name:"ElTooltipContent",inheritAttrs:!1}),q8e=st({...U8e,props:k3,setup(e,{expose:t}){const r=e,{selector:n}=rP(),a=Qt("tooltip"),i=Re(null),o=Re(!1),{controlled:l,id:f,open:u,trigger:d,onClose:m,onOpen:v,onShow:y,onHide:_,onBeforeShow:E,onBeforeHide:C}=At(B3,void 0),T=Ee(()=>r.transition||`${a.namespace.value}-fade-in-linear`),I=Ee(()=>fe.env.NODE_ENV==="test"?!0:r.persistent);fn(()=>{o.value=!0});const k=Ee(()=>W(I)?!0:W(u)),N=Ee(()=>r.disabled?!1:W(u)),O=Ee(()=>r.appendTo||n.value),P=Ee(()=>{var w;return(w=r.style)!=null?w:{}}),z=Ee(()=>!W(u)),V=()=>{_()},L=()=>{if(W(l))return!0},U=Yo(L,()=>{r.enterable&&W(d)==="hover"&&v()}),M=Yo(L,()=>{W(d)==="hover"&&m()}),s=()=>{var w,A;(A=(w=i.value)==null?void 0:w.updatePopper)==null||A.call(w),E==null||E()},h=()=>{C==null||C()},p=()=>{y(),b=Lye(Ee(()=>{var w;return(w=i.value)==null?void 0:w.popperContentRef}),()=>{if(W(l))return;W(d)!=="hover"&&m()})},g=()=>{r.virtualTriggering||m()};let b;return ut(()=>W(u),w=>{w||b==null||b()},{flush:"post"}),ut(()=>r.content,()=>{var w,A;(A=(w=i.value)==null?void 0:w.updatePopper)==null||A.call(w)}),t({contentRef:i}),(w,A)=>(me(),Qe(kme,{disabled:!w.teleported,to:W(O)},[ht(aa,{name:W(T),onAfterLeave:V,onBeforeEnter:s,onAfterEnter:p,onBeforeLeave:h},{default:rt(()=>[W(k)?tn((me(),Qe(W(B8e),Ai({key:0,id:W(f),ref_key:"contentRef",ref:i},w.$attrs,{"aria-label":w.ariaLabel,"aria-hidden":W(z),"boundaries-padding":w.boundariesPadding,"fallback-placements":w.fallbackPlacements,"gpu-acceleration":w.gpuAcceleration,offset:w.offset,placement:w.placement,"popper-options":w.popperOptions,strategy:w.strategy,effect:w.effect,enterable:w.enterable,pure:w.pure,"popper-class":w.popperClass,"popper-style":[w.popperStyle,W(P)],"reference-el":w.referenceEl,"trigger-target-el":w.triggerTargetEl,visible:W(N),"z-index":w.zIndex,onMouseenter:W(U),onMouseleave:W(M),onBlur:g,onClose:W(m)}),{default:rt(()=>[o.value?et("v-if",!0):Ot(w.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[vi,W(N)]]):et("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var V8e=vr(q8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const H8e=["innerHTML"],j8e={key:1},K8e=st({name:"ElTooltip"}),W8e=st({...K8e,props:P8e,emits:F8e,setup(e,{expose:t,emit:r}){const n=e;f6e();const a=c3(),i=Re(),o=Re(),l=()=>{var T;const I=W(i);I&&((T=I.popperInstanceRef)==null||T.update())},f=Re(!1),u=Re(),{show:d,hide:m,hasUpdateHandler:v}=R8e({indicator:f,toggleReason:u}),{onOpen:y,onClose:_}=c6e({showAfter:ra(n,"showAfter"),hideAfter:ra(n,"hideAfter"),autoClose:ra(n,"autoClose"),open:d,close:m}),E=Ee(()=>Yv(n.visible)&&!v.value);un(B3,{controlled:E,id:a,open:dw(f),trigger:ra(n,"trigger"),onOpen:T=>{y(T)},onClose:T=>{_(T)},onToggle:T=>{W(f)?_(T):y(T)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:l}),ut(()=>n.disabled,T=>{T&&f.value&&(f.value=!1)});const C=T=>{var I,k;const N=(k=(I=o.value)==null?void 0:I.contentRef)==null?void 0:k.popperContentRef,O=(T==null?void 0:T.relatedTarget)||document.activeElement;return N&&N.contains(O)};return k9(()=>f.value&&m()),t({popperRef:i,contentRef:o,isFocusInsideContent:C,updatePopper:l,onOpen:y,onClose:_,hide:m}),(T,I)=>(me(),Qe(W(k8e),{ref_key:"popperRef",ref:i,role:T.role},{default:rt(()=>[ht(z8e,{disabled:T.disabled,trigger:T.trigger,"trigger-keys":T.triggerKeys,"virtual-ref":T.virtualRef,"virtual-triggering":T.virtualTriggering},{default:rt(()=>[T.$slots.default?Ot(T.$slots,"default",{key:0}):et("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ht(V8e,{ref_key:"contentRef",ref:o,"aria-label":T.ariaLabel,"boundaries-padding":T.boundariesPadding,content:T.content,disabled:T.disabled,effect:T.effect,enterable:T.enterable,"fallback-placements":T.fallbackPlacements,"hide-after":T.hideAfter,"gpu-acceleration":T.gpuAcceleration,offset:T.offset,persistent:T.persistent,"popper-class":T.popperClass,"popper-style":T.popperStyle,placement:T.placement,"popper-options":T.popperOptions,pure:T.pure,"raw-content":T.rawContent,"reference-el":T.referenceEl,"trigger-target-el":T.triggerTargetEl,"show-after":T.showAfter,strategy:T.strategy,teleported:T.teleported,transition:T.transition,"virtual-triggering":T.virtualTriggering,"z-index":T.zIndex,"append-to":T.appendTo},{default:rt(()=>[Ot(T.$slots,"content",{},()=>[T.rawContent?(me(),Fe("span",{key:0,innerHTML:T.content},null,8,H8e)):(me(),Fe("span",j8e,ot(T.content),1))]),T.showArrow?(me(),Qe(W(QSe),{key:0,"arrow-offset":T.arrowOffset},null,8,["arrow-offset"])):et("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var G8e=vr(W8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const N3=Ni(G8e),UP=Symbol("buttonGroupContextKey"),Z8e=(e,t)=>{QE({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},Ee(()=>e.type==="text"));const r=At(UP,void 0),n=d3("button"),{form:a}=v3(),i=Zu(Ee(()=>r==null?void 0:r.size)),o=p3(),l=Re(),f=mv(),u=Ee(()=>e.type||(r==null?void 0:r.type)||""),d=Ee(()=>{var _,E,C;return(C=(E=e.autoInsertSpace)!=null?E:(_=n.value)==null?void 0:_.autoInsertSpace)!=null?C:!1}),m=Ee(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),v=Ee(()=>{var _;const E=(_=f.default)==null?void 0:_.call(f);if(d.value&&(E==null?void 0:E.length)===1){const C=E[0];if((C==null?void 0:C.type)===zs){const T=C.children;return/^\p{Unified_Ideograph}{2}$/u.test(T.trim())}}return!1});return{_disabled:o,_size:i,_type:u,_ref:l,_props:m,shouldAddSpace:v,handleClick:_=>{e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",_)}}},O3=Kr({size:h3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:oa},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:oa,default:()=>_R},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:$t([String,Object]),default:"button"}}),Y8e={click:e=>e instanceof MouseEvent};function Pn(e,t){J8e(e)&&(e="100%");var r=X8e(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ym(e){return Math.min(1,Math.max(0,e))}function J8e(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function X8e(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qP(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function bm(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Sf(e){return e.length===1?"0"+e:String(e)}function Q8e(e,t,r){return{r:Pn(e,255)*255,g:Pn(t,255)*255,b:Pn(r,255)*255}}function VP(e,t,r){e=Pn(e,255),t=Pn(t,255),r=Pn(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,o=0,l=(n+a)/2;if(n===a)o=0,i=0;else{var f=n-a;switch(o=l>.5?f/(2-n-a):f/(n+a),n){case e:i=(t-r)/f+(t<r?6:0);break;case t:i=(r-e)/f+2;break;case r:i=(e-t)/f+4;break}i/=6}return{h:i,s:o,l}}function R3(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function eMe(e,t,r){var n,a,i;if(e=Pn(e,360),t=Pn(t,100),r=Pn(r,100),t===0)a=r,i=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;n=R3(l,o,e+1/3),a=R3(l,o,e),i=R3(l,o,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function HP(e,t,r){e=Pn(e,255),t=Pn(t,255),r=Pn(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,o=n,l=n-a,f=n===0?0:l/n;if(n===a)i=0;else{switch(n){case e:i=(t-r)/l+(t<r?6:0);break;case t:i=(r-e)/l+2;break;case r:i=(e-t)/l+4;break}i/=6}return{h:i,s:f,v:o}}function tMe(e,t,r){e=Pn(e,360)*6,t=Pn(t,100),r=Pn(r,100);var n=Math.floor(e),a=e-n,i=r*(1-t),o=r*(1-a*t),l=r*(1-(1-a)*t),f=n%6,u=[r,o,i,i,l,r][f],d=[l,r,r,o,i,i][f],m=[i,i,l,r,r,o][f];return{r:u*255,g:d*255,b:m*255}}function jP(e,t,r,n){var a=[Sf(Math.round(e).toString(16)),Sf(Math.round(t).toString(16)),Sf(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function rMe(e,t,r,n,a){var i=[Sf(Math.round(e).toString(16)),Sf(Math.round(t).toString(16)),Sf(Math.round(r).toString(16)),Sf(nMe(n))];return a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function nMe(e){return Math.round(parseFloat(e)*255).toString(16)}function KP(e){return Ri(e)/255}function Ri(e){return parseInt(e,16)}function iMe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var P3={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function aMe(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,l=!1;return typeof e=="string"&&(e=lMe(e)),typeof e=="object"&&(ts(e.r)&&ts(e.g)&&ts(e.b)?(t=Q8e(e.r,e.g,e.b),o=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ts(e.h)&&ts(e.s)&&ts(e.v)?(n=bm(e.s),a=bm(e.v),t=tMe(e.h,n,a),o=!0,l="hsv"):ts(e.h)&&ts(e.s)&&ts(e.l)&&(n=bm(e.s),i=bm(e.l),t=eMe(e.h,n,i),o=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=qP(r),{ok:o,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var oMe="[-\\+]?\\d+%?",sMe="[-\\+]?\\d*\\.\\d+%?",Js="(?:".concat(sMe,")|(?:").concat(oMe,")"),F3="[\\s|\\(]+(".concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")\\s*\\)?"),L3="[\\s|\\(]+(".concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")\\s*\\)?"),Pa={CSS_UNIT:new RegExp(Js),rgb:new RegExp("rgb"+F3),rgba:new RegExp("rgba"+L3),hsl:new RegExp("hsl"+F3),hsla:new RegExp("hsla"+L3),hsv:new RegExp("hsv"+F3),hsva:new RegExp("hsva"+L3),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function lMe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(P3[e])e=P3[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Pa.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Pa.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Pa.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Pa.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Pa.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Pa.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Pa.hex8.exec(e),r?{r:Ri(r[1]),g:Ri(r[2]),b:Ri(r[3]),a:KP(r[4]),format:t?"name":"hex8"}:(r=Pa.hex6.exec(e),r?{r:Ri(r[1]),g:Ri(r[2]),b:Ri(r[3]),format:t?"name":"hex"}:(r=Pa.hex4.exec(e),r?{r:Ri(r[1]+r[1]),g:Ri(r[2]+r[2]),b:Ri(r[3]+r[3]),a:KP(r[4]+r[4]),format:t?"name":"hex8"}:(r=Pa.hex3.exec(e),r?{r:Ri(r[1]+r[1]),g:Ri(r[2]+r[2]),b:Ri(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ts(e){return!!Pa.CSS_UNIT.exec(String(e))}var WP=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=iMe(t)),this.originalInput=t;var a=aMe(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,i=t.r/255,o=t.g/255,l=t.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=qP(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=HP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=HP(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=VP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=VP(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rMe(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Pn(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Pn(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),r=0,n=Object.entries(P3);r<n.length;r++){var a=n[r],i=a[0],o=a[1];if(t===o)return i}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,a=this.a<1&&this.a>=0,i=!r&&a&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=ym(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=ym(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=ym(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=ym(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,i=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(new e(n));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(new e({h:n,s:a,v:i})),i=(i+l)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],i=360/t,o=1;o<t;o++)a.push(new e({h:(n+o*i)%360,s:r.s,l:r.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Xs(e,t=20){return e.mix("#141414",t).toString()}function fMe(e){const t=p3(),r=Qt("button");return Ee(()=>{let n={};const a=e.color;if(a){const i=new WP(a),o=e.dark?i.tint(20).toString():Xs(i,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Xs(i,90):i.tint(90).toString(),"text-color":a,"border-color":e.dark?Xs(i,50):i.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Xs(i,90):i.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Xs(i,50):i.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Xs(i,80):i.tint(80).toString());else{const l=e.dark?Xs(i,30):i.tint(30).toString(),f=i.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":a,"text-color":f,"border-color":a,"hover-bg-color":l,"hover-text-color":f,"hover-border-color":l,"active-bg-color":o,"active-border-color":o}),t.value){const u=e.dark?Xs(i,50):i.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const uMe=st({name:"ElButton"}),cMe=st({...uMe,props:O3,emits:Y8e,setup(e,{expose:t,emit:r}){const n=e,a=fMe(n),i=Qt("button"),{_ref:o,_size:l,_type:f,_disabled:u,_props:d,shouldAddSpace:m,handleClick:v}=Z8e(n,r);return t({ref:o,size:l,type:f,disabled:u,shouldAddSpace:m}),(y,_)=>(me(),Qe(ni(y.tag),Ai({ref_key:"_ref",ref:o},W(d),{class:[W(i).b(),W(i).m(W(f)),W(i).m(W(l)),W(i).is("disabled",W(u)),W(i).is("loading",y.loading),W(i).is("plain",y.plain),W(i).is("round",y.round),W(i).is("circle",y.circle),W(i).is("text",y.text),W(i).is("link",y.link),W(i).is("has-bg",y.bg)],style:W(a),onClick:W(v)}),{default:rt(()=>[y.loading?(me(),Fe(wt,{key:0},[y.$slots.loading?Ot(y.$slots,"loading",{key:0}):(me(),Qe(W(Rn),{key:1,class:Te(W(i).is("loading"))},{default:rt(()=>[(me(),Qe(ni(y.loadingIcon)))]),_:1},8,["class"]))],64)):y.icon||y.$slots.icon?(me(),Qe(W(Rn),{key:1},{default:rt(()=>[y.icon?(me(),Qe(ni(y.icon),{key:0})):Ot(y.$slots,"icon",{key:1})]),_:3})):et("v-if",!0),y.$slots.default?(me(),Fe("span",{key:2,class:Te({[W(i).em("text","expand")]:W(m)})},[Ot(y.$slots,"default")],2)):et("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var hMe=vr(cMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const dMe={size:O3.size,type:O3.type},pMe=st({name:"ElButtonGroup"}),vMe=st({...pMe,props:dMe,setup(e){const t=e;un(UP,Vn({size:ra(t,"size"),type:ra(t,"type")}));const r=Qt("button");return(n,a)=>(me(),Fe("div",{class:Te(`${W(r).b("group")}`)},[Ot(n.$slots,"default")],2))}});var GP=vr(vMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Xr=Ni(hMe,{ButtonGroup:GP});bf(GP);const Qs=new Map;let ZP;hn&&(document.addEventListener("mousedown",e=>ZP=e),document.addEventListener("mouseup",e=>{for(const t of Qs.values())for(const{documentHandler:r}of t)r(e,ZP)}));function YP(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:gf(t.arg)&&r.push(t.arg),function(n,a){const i=t.instance.popperRef,o=n.target,l=a==null?void 0:a.target,f=!t||!t.instance,u=!o||!l,d=e.contains(o)||e.contains(l),m=e===o,v=r.length&&r.some(_=>_==null?void 0:_.contains(o))||r.length&&r.includes(l),y=i&&(i.contains(o)||i.contains(l));f||u||d||m||v||y||t.value(n,a)}}const mMe={beforeMount(e,t){Qs.has(e)||Qs.set(e,[]),Qs.get(e).push({documentHandler:YP(e,t),bindingFn:t.value})},updated(e,t){Qs.has(e)||Qs.set(e,[]);const r=Qs.get(e),n=r.findIndex(i=>i.bindingFn===t.oldValue),a={documentHandler:YP(e,t),bindingFn:t.value};n>=0?r.splice(n,1,a):r.push(a)},unmounted(e){Qs.delete(e)}},JP=Kr({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:Hh,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),gMe={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},yMe=st({name:"ElTag"}),bMe=st({...yMe,props:JP,emits:gMe,setup(e,{emit:t}){const r=e,n=Zu(),a=Qt("tag"),i=Ee(()=>{const{type:f,hit:u,effect:d,closable:m,round:v}=r;return[a.b(),a.is("closable",m),a.m(f),a.m(n.value),a.m(d),a.is("hit",u),a.is("round",v)]}),o=f=>{t("close",f)},l=f=>{t("click",f)};return(f,u)=>f.disableTransitions?(me(),Fe("span",{key:0,class:Te(W(i)),style:on({backgroundColor:f.color}),onClick:l},[Ue("span",{class:Te(W(a).e("content"))},[Ot(f.$slots,"default")],2),f.closable?(me(),Qe(W(Rn),{key:0,class:Te(W(a).e("close")),onClick:Cn(o,["stop"])},{default:rt(()=>[ht(W(Jv))]),_:1},8,["class","onClick"])):et("v-if",!0)],6)):(me(),Qe(aa,{key:1,name:`${W(a).namespace.value}-zoom-in-center`,appear:""},{default:rt(()=>[Ue("span",{class:Te(W(i)),style:on({backgroundColor:f.color}),onClick:l},[Ue("span",{class:Te(W(a).e("content"))},[Ot(f.$slots,"default")],2),f.closable?(me(),Qe(W(Rn),{key:0,class:Te(W(a).e("close")),onClick:Cn(o,["stop"])},{default:rt(()=>[ht(W(Jv))]),_:1},8,["class","onClick"])):et("v-if",!0)],6)]),_:3},8,["name"]))}});var _Me=vr(bMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const wMe=Ni(_Me),EMe=st({name:"ElCollapseTransition"}),xMe=st({...EMe,setup(e){const t=Qt("collapse-transition"),r=a=>{a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom},n={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0},enter(a){a.dataset.oldOverflow=a.style.overflow,a.scrollHeight!==0?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight=0,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom,a.style.overflow="hidden"},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},enterCancelled(a){r(a)},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.maxHeight=`${a.scrollHeight}px`,a.style.overflow="hidden"},leave(a){a.scrollHeight!==0&&(a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0)},afterLeave(a){r(a)},leaveCancelled(a){r(a)}};return(a,i)=>(me(),Qe(aa,Ai({name:W(t).b()},tme(n)),{default:rt(()=>[Ot(a.$slots,"default")]),_:3},16,["name"]))}});var _m=vr(xMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);_m.install=e=>{e.component(_m.name,_m)};const SMe=_m,MMe=Kr({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},icon:{type:oa}}),CMe={click:e=>e instanceof MouseEvent},TMe=["href"],AMe=st({name:"ElLink"}),IMe=st({...AMe,props:MMe,emits:CMe,setup(e,{emit:t}){const r=e,n=Qt("link"),a=Ee(()=>[n.b(),n.m(r.type),n.is("disabled",r.disabled),n.is("underline",r.underline&&!r.disabled)]);function i(o){r.disabled||t("click",o)}return(o,l)=>(me(),Fe("a",{class:Te(W(a)),href:o.disabled||!o.href?void 0:o.href,onClick:i},[o.icon?(me(),Qe(W(Rn),{key:0},{default:rt(()=>[(me(),Qe(ni(o.icon)))]),_:1})):et("v-if",!0),o.$slots.default?(me(),Fe("span",{key:1,class:Te(W(n).e("inner"))},[Ot(o.$slots,"default")],2)):et("v-if",!0),o.$slots.icon?Ot(o.$slots,"icon",{key:2}):et("v-if",!0)],10,TMe))}});var BMe=vr(IMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/link/src/link.vue"]]);const kMe=Ni(BMe);let NMe=class{constructor(t,r){this.parent=t,this.domNode=r,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=>{let a=!1;switch(n.code){case bn.down:{this.gotoSubIndex(this.subIndex+1),a=!0;break}case bn.up:{this.gotoSubIndex(this.subIndex-1),a=!0;break}case bn.tab:{Pv(t,"mouseleave");break}case bn.enter:case bn.space:{a=!0,n.currentTarget.click();break}}return a&&(n.preventDefault(),n.stopPropagation()),!1})})}},OMe=class{constructor(t,r){this.domNode=t,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 NMe(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let r=!1;switch(t.code){case bn.down:{Pv(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),r=!0;break}case bn.up:{Pv(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),r=!0;break}case bn.tab:{Pv(t.currentTarget,"mouseleave");break}case bn.enter:case bn.space:{r=!0,t.currentTarget.click();break}}r&&t.preventDefault()})}},RMe=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 OMe(n,t)})}};const PMe=st({name:"ElMenuCollapseTransition",setup(){const e=Qt("menu");return{listeners:{onBeforeEnter:r=>r.style.opacity="0.2",onEnter(r,n){Uu(r,`${e.namespace.value}-opacity-transition`),r.style.opacity="1",n()},onAfterEnter(r){yf(r,`${e.namespace.value}-opacity-transition`),r.style.opacity=""},onBeforeLeave(r){r.dataset||(r.dataset={}),y3e(r,e.m("collapse"))?(yf(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),Uu(r,e.m("collapse"))):(Uu(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),yf(r,e.m("collapse"))),r.style.width=`${r.scrollWidth}px`,r.style.overflow="hidden"},onLeave(r){Uu(r,"horizontal-collapse-transition"),r.style.width=`${r.dataset.scrollWidth}px`}}}}});function FMe(e,t,r,n,a,i){return me(),Qe(aa,Ai({mode:"out-in"},e.listeners),{default:rt(()=>[Ot(e.$slots,"default")]),_:3},16)}var LMe=vr(PMe,[["render",FMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function XP(e,t){const r=Ee(()=>{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:Ee(()=>{let a=e.parent;for(;a&&!["ElMenu","ElSubMenu"].includes(a.type.name);)a=a.parent;return a}),indexPath:r}}function DMe(e){return Ee(()=>{const r=e.backgroundColor;return r?new WP(r).shade(20).toString():""})}const QP=(e,t)=>{const r=Qt("menu");return Ee(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":DMe(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},$Me=Kr({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},teleported:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6},expandCloseIcon:{type:oa},expandOpenIcon:{type:oa},collapseCloseIcon:{type:oa},collapseOpenIcon:{type:oa}}),wm="ElSubMenu";var D3=st({name:wm,props:$Me,setup(e,{slots:t,expose:r}){QE({from:"popper-append-to-body",replacement:"teleported",scope:wm,version:"2.3.0",ref:"https://element-plus.org/en-US/component/menu.html#submenu-attributes"},Ee(()=>e.popperAppendToBody!==void 0));const n=rn(),{indexPath:a,parentMenu:i}=XP(n,Ee(()=>e.index)),o=Qt("menu"),l=Qt("sub-menu"),f=At("rootMenu");f||zu(wm,"can not inject root menu");const u=At(`subMenu:${i.value.uid}`);u||zu(wm,"can not inject sub menu");const d=Re({}),m=Re({});let v;const y=Re(!1),_=Re(),E=Re(null),C=Ee(()=>M.value==="horizontal"&&I.value?"bottom-start":"right-start"),T=Ee(()=>M.value==="horizontal"&&I.value||M.value==="vertical"&&!f.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?P.value?e.expandOpenIcon:e.expandCloseIcon:gR:e.collapseCloseIcon&&e.collapseOpenIcon?P.value?e.collapseOpenIcon:e.collapseCloseIcon:B3e),I=Ee(()=>u.level===0),k=Ee(()=>{var c;const S=(c=e.teleported)!=null?c:e.popperAppendToBody;return S===void 0?I.value:S}),N=Ee(()=>f.props.collapse?`${o.namespace.value}-zoom-in-left`:`${o.namespace.value}-zoom-in-top`),O=Ee(()=>M.value==="horizontal"&&I.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"]),P=Ee(()=>f.openedMenus.includes(e.index)),z=Ee(()=>{let c=!1;return Object.values(d.value).forEach(S=>{S.active&&(c=!0)}),Object.values(m.value).forEach(S=>{S.active&&(c=!0)}),c}),V=Ee(()=>f.props.backgroundColor||""),L=Ee(()=>f.props.activeTextColor||""),U=Ee(()=>f.props.textColor||""),M=Ee(()=>f.props.mode),s=Vn({index:e.index,indexPath:a,active:z}),h=QP(f.props,u.level+1),p=Ee(()=>M.value!=="horizontal"?{color:U.value}:{borderBottomColor:z.value?f.props.activeTextColor?L.value:"":"transparent",color:z.value?L.value:U.value}),g=()=>{var c,S,B;return(B=(S=(c=E.value)==null?void 0:c.popperRef)==null?void 0:S.popperInstanceRef)==null?void 0:B.destroy()},b=c=>{c||g()},w=()=>{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:z.value})},A=(c,S=e.showTimeout)=>{var B;c.type!=="focus"&&(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||e.disabled||(u.mouseInChild.value=!0,v==null||v(),{stop:v}=xE(()=>{f.openMenu(e.index,a.value)},S),k.value&&((B=i.value.vnode.el)==null||B.dispatchEvent(new MouseEvent("mouseenter")))))},x=(c=!1)=>{var S,B;f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||(v==null||v(),u.mouseInChild.value=!1,{stop:v}=xE(()=>!y.value&&f.closeMenu(e.index,a.value),e.hideTimeout),k.value&&c&&((S=n.parent)==null?void 0:S.type.name)==="ElSubMenu"&&((B=u.handleMouseleave)==null||B.call(u,!0)))};ut(()=>f.props.collapse,c=>b(!!c));{const c=B=>{m.value[B.index]=B},S=B=>{delete m.value[B.index]};un(`subMenu:${n.uid}`,{addSubMenu:c,removeSubMenu:S,handleMouseleave:x,mouseInChild:y,level:u.level+1})}return r({opened:P}),ir(()=>{f.addSubMenu(s),u.addSubMenu(s)}),fn(()=>{u.removeSubMenu(s),f.removeSubMenu(s)}),()=>{var c;const S=[(c=t.title)==null?void 0:c.call(t),vt(Rn,{class:l.e("icon-arrow"),style:{transform:P.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&f.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Bt(T.value)?vt(n.appContext.components[T.value]):vt(T.value)})],B=f.isMenuPopup?vt(N3,{ref:E,visible:P.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:C.value,teleported:k.value,fallbackPlacements:O.value,transition:N.value,gpuAcceleration:!1},{content:()=>{var R;return vt("div",{class:[o.m(M.value),o.m("popup-container"),e.popperClass],onMouseenter:H=>A(H,100),onMouseleave:()=>x(!0),onFocus:H=>A(H,100)},[vt("ul",{class:[o.b(),o.m("popup"),o.m(`popup-${C.value}`)],style:h.value},[(R=t.default)==null?void 0:R.call(t)])])},default:()=>vt("div",{class:l.e("title"),style:[p.value,{backgroundColor:V.value}],onClick:w},S)}):vt(wt,{},[vt("div",{class:l.e("title"),style:[p.value,{backgroundColor:V.value}],ref:_,onClick:w},S),vt(SMe,{},{default:()=>{var R;return tn(vt("ul",{role:"menu",class:[o.b(),o.m("inline")],style:h.value},[(R=t.default)==null?void 0:R.call(t)]),[[vi,P.value]])}})]);return vt("li",{class:[l.b(),l.is("active",z.value),l.is("opened",P.value),l.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:P.value,onMouseenter:A,onMouseleave:()=>x(!0),onFocus:A},[B])}}});const zMe=Kr({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:$t(Array),default:()=>TR([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperEffect:{type:String,values:["dark","light"],default:"dark"}}),$3=e=>Array.isArray(e)&&e.every(t=>Bt(t));var UMe=st({name:"ElMenu",props:zMe,emits:{close:(e,t)=>Bt(e)&&$3(t),open:(e,t)=>Bt(e)&&$3(t),select:(e,t,r,n)=>Bt(e)&&$3(t)&&Dt(r)&&(n===void 0||n instanceof Promise)},setup(e,{emit:t,slots:r,expose:n}){const a=rn(),i=a.appContext.config.globalProperties.$router,o=Re(),l=Qt("menu"),f=Qt("sub-menu"),u=Re(-1),d=Re(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),m=Re(e.defaultActive),v=Re({}),y=Re({}),_=Ee(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),E=()=>{const M=m.value&&v.value[m.value];if(!M||e.mode==="horizontal"||e.collapse)return;M.indexPath.forEach(h=>{const p=y.value[h];p&&C(h,p.indexPath)})},C=(M,s)=>{d.value.includes(M)||(e.uniqueOpened&&(d.value=d.value.filter(h=>s.includes(h))),d.value.push(M),t("open",M,s))},T=M=>{const s=d.value.indexOf(M);s!==-1&&d.value.splice(s,1)},I=(M,s)=>{T(M),t("close",M,s)},k=({index:M,indexPath:s})=>{d.value.includes(M)?I(M,s):C(M,s)},N=M=>{(e.mode==="horizontal"||e.collapse)&&(d.value=[]);const{index:s,indexPath:h}=M;if(!($u(s)||$u(h)))if(e.router&&i){const p=M.route||s,g=i.push(p).then(b=>(b||(m.value=s),b));t("select",s,h,{index:s,indexPath:h,route:p},g)}else m.value=s,t("select",s,h,{index:s,indexPath:h})},O=M=>{const s=v.value,h=s[M]||m.value&&s[m.value]||s[e.defaultActive];h?m.value=h.index:m.value=M},P=()=>{var M,s;if(!o.value)return-1;const h=Array.from((s=(M=o.value)==null?void 0:M.childNodes)!=null?s:[]).filter(c=>c.nodeName!=="#comment"&&(c.nodeName!=="#text"||c.nodeValue)),p=64,g=Number.parseInt(getComputedStyle(o.value).paddingLeft,10),b=Number.parseInt(getComputedStyle(o.value).paddingRight,10),w=o.value.clientWidth-g-b;let A=0,x=0;return h.forEach((c,S)=>{A+=c.offsetWidth||0,A<=w-p&&(x=S+1)}),x===h.length?-1:x},z=(M,s=33.34)=>{let h;return()=>{h&&clearTimeout(h),h=setTimeout(()=>{M()},s)}};let V=!0;const L=()=>{const M=()=>{u.value=-1,kt(()=>{u.value=P()})};V?M():z(M)(),V=!1};ut(()=>e.defaultActive,M=>{v.value[M]||(m.value=""),O(M)}),ut(()=>e.collapse,M=>{M&&(d.value=[])}),ut(v.value,E);let U;Hve(()=>{e.mode==="horizontal"&&e.ellipsis?U=Fu(o,L).stop:U==null||U()});{const M=g=>{y.value[g.index]=g},s=g=>{delete y.value[g.index]};un("rootMenu",Vn({props:e,openedMenus:d,items:v,subMenus:y,activeIndex:m,isMenuPopup:_,addMenuItem:g=>{v.value[g.index]=g},removeMenuItem:g=>{delete v.value[g.index]},addSubMenu:M,removeSubMenu:s,openMenu:C,closeMenu:I,handleMenuItemClick:N,handleSubMenuClick:k})),un(`subMenu:${a.uid}`,{addSubMenu:M,removeSubMenu:s,mouseInChild:Re(!1),level:0})}return ir(()=>{e.mode==="horizontal"&&new RMe(a.vnode.el,l.namespace.value)}),n({open:s=>{const{indexPath:h}=y.value[s];h.forEach(p=>C(p,h))},close:T,handleResize:L}),()=>{var M,s;let h=(s=(M=r.default)==null?void 0:M.call(r))!=null?s:[];const p=[];if(e.mode==="horizontal"&&o.value){const w=em(h),A=u.value===-1?w:w.slice(0,u.value),x=u.value===-1?[]:w.slice(u.value);x!=null&&x.length&&e.ellipsis&&(h=A,p.push(vt(D3,{index:"sub-menu-more",class:f.e("hide-arrow")},{title:()=>vt(Rn,{class:f.e("icon-more")},{default:()=>vt(Exe)}),default:()=>x})))}const g=QP(e,0),b=vt("ul",{key:String(e.collapse),role:"menubar",ref:o,style:g.value,class:{[l.b()]:!0,[l.m(e.mode)]:!0,[l.m("collapse")]:e.collapse}},[...h,...p]);return e.collapseTransition&&e.mode==="vertical"?vt(LMe,()=>b):b}}});const qMe=Kr({index:{type:$t([String,null]),default:null},route:{type:$t([String,Object])},disabled:Boolean}),VMe={click:e=>Bt(e.index)&&Array.isArray(e.indexPath)},z3="ElMenuItem",HMe=st({name:z3,components:{ElTooltip:N3},props:qMe,emits:VMe,setup(e,{emit:t}){const r=rn(),n=At("rootMenu"),a=Qt("menu"),i=Qt("menu-item");n||zu(z3,"can not inject root menu");const{parentMenu:o,indexPath:l}=XP(r,ra(e,"index")),f=At(`subMenu:${o.value.uid}`);f||zu(z3,"can not inject sub menu");const u=Ee(()=>e.index===n.activeIndex),d=Vn({index:e.index,indexPath:l,active:u}),m=()=>{e.disabled||(n.handleMenuItemClick({index:e.index,indexPath:l.value,route:e.route}),t("click",d))};return ir(()=>{f.addSubMenu(d),n.addMenuItem(d)}),fn(()=>{f.removeSubMenu(d),n.removeMenuItem(d)}),{parentMenu:o,rootMenu:n,active:u,nsMenu:a,nsMenuItem:i,handleClick:m}}});function jMe(e,t,r,n,a,i){const o=po("el-tooltip");return me(),Fe("li",{class:Te([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...l)=>e.handleClick&&e.handleClick(...l))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(me(),Qe(o,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:rt(()=>[Ot(e.$slots,"title")]),default:rt(()=>[Ue("div",{class:Te(e.nsMenu.be("tooltip","trigger"))},[Ot(e.$slots,"default")],2)]),_:3},8,["effect"])):(me(),Fe(wt,{key:1},[Ot(e.$slots,"default"),Ot(e.$slots,"title")],64))],2)}var eF=vr(HMe,[["render",jMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const KMe=st({name:"ElMenuItemGroup",props:{title:String},setup(){return{ns:Qt("menu-item-group")}}});function WMe(e,t,r,n,a,i){return me(),Fe("li",{class:Te(e.ns.b())},[Ue("div",{class:Te(e.ns.e("title"))},[e.$slots.title?Ot(e.$slots,"title",{key:1}):(me(),Fe(wt,{key:0},[br(ot(e.title),1)],64))],2),Ue("ul",null,[Ot(e.$slots,"default")])],2)}var tF=vr(KMe,[["render",WMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const rF=Ni(UMe,{MenuItem:eF,MenuItemGroup:tF,SubMenu:D3}),nF=bf(eF);bf(tF),bf(D3);const iF=Symbol("ElSelectGroup"),Em=Symbol("ElSelect");function GMe(e,t){const r=At(Em),n=At(iF,{disabled:!1}),a=Ee(()=>Object.prototype.toString.call(e.value).toLowerCase()==="[object object]"),i=Ee(()=>r.props.multiple?m(r.props.modelValue,e.value):v(e.value,r.props.modelValue)),o=Ee(()=>{if(r.props.multiple){const E=r.props.modelValue||[];return!i.value&&E.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),l=Ee(()=>e.label||(a.value?"":e.value)),f=Ee(()=>e.value||e.label||""),u=Ee(()=>e.disabled||t.groupDisabled||o.value),d=rn(),m=(E=[],C)=>{if(a.value){const T=r.props.valueKey;return E&&E.some(I=>Tt(bi(I,T))===bi(C,T))}else return E&&E.includes(C)},v=(E,C)=>{if(a.value){const{valueKey:T}=r.props;return bi(E,T)===bi(C,T)}else return E===C},y=()=>{!e.disabled&&!n.disabled&&(r.hoverIndex=r.optionsArray.indexOf(d.proxy))};ut(()=>l.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),ut(()=>e.value,(E,C)=>{const{remote:T,valueKey:I}=r.props;if(Object.is(E,C)||(r.onOptionDestroy(C,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!T){if(I&&typeof E=="object"&&typeof C=="object"&&E[I]===C[I])return;r.setSelected()}}),ut(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0});const{queryChange:_}=Tt(r);return ut(_,E=>{const{query:C}=W(E),T=new RegExp(m3e(C),"i");t.visible=T.test(l.value)||e.created,t.visible||r.filteredOptionsCount--},{immediate:!0}),{select:r,currentLabel:l,currentValue:f,itemSelected:i,isDisabled:u,hoverItem:y}}const ZMe=st({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Qt("select"),r=Ee(()=>[t.be("dropdown","item"),t.is("disabled",W(o)),{selected:W(i),hover:W(d)}]),n=Vn({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:a,itemSelected:i,isDisabled:o,select:l,hoverItem:f}=GMe(e,n),{visible:u,hover:d}=Ql(n),m=rn().proxy;l.onOptionCreate(m),fn(()=>{const y=m.value,{selected:_}=l,C=(l.props.multiple?_:[_]).some(T=>T.value===m.value);kt(()=>{l.cachedOptions.get(y)===m&&!C&&l.cachedOptions.delete(y)}),l.onOptionDestroy(y,m)});function v(){e.disabled!==!0&&n.groupDisabled!==!0&&l.handleOptionSelect(m)}return{ns:t,containerKls:r,currentLabel:a,itemSelected:i,isDisabled:o,select:l,hoverItem:f,visible:u,hover:d,selectOptionClick:v,states:n}}});function YMe(e,t,r,n,a,i){return tn((me(),Fe("li",{class:Te(e.containerKls),onMouseenter:t[0]||(t[0]=(...o)=>e.hoverItem&&e.hoverItem(...o)),onClick:t[1]||(t[1]=Cn((...o)=>e.selectOptionClick&&e.selectOptionClick(...o),["stop"]))},[Ot(e.$slots,"default",{},()=>[Ue("span",null,ot(e.currentLabel),1)])],34)),[[vi,e.visible]])}var U3=vr(ZMe,[["render",YMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const JMe=st({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=At(Em),t=Qt("select"),r=Ee(()=>e.props.popperClass),n=Ee(()=>e.props.multiple),a=Ee(()=>e.props.fitInputWidth),i=Re("");function o(){var l;i.value=`${(l=e.selectWrapper)==null?void 0:l.offsetWidth}px`}return ir(()=>{o(),Fu(e.selectWrapper,o)}),{ns:t,minWidth:i,popperClass:r,isMultiple:n,isFitInputWidth:a}}});function XMe(e,t,r,n,a,i){return me(),Fe("div",{class:Te([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:on({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[Ot(e.$slots,"default")],6)}var QMe=vr(JMe,[["render",XMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);function e5e(e){const{t}=tm();return Vn({options:new Map,cachedOptions:new Map,disabledOptions:new Map,createdLabel:null,createdSelected:!1,selected:e.multiple?[]:{},inputLength:20,inputWidth:0,optionsCount:0,filteredOptionsCount:0,visible:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,cachedPlaceHolder:"",currentPlaceholder:t("el.select.placeholder"),menuVisibleOnFocus:!1,isOnComposition:!1,prefixWidth:11,mouseEnter:!1,focused:!1})}const t5e=(e,t,r)=>{const{t:n}=tm(),a=Qt("select");QE({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},Ee(()=>e.suffixTransition===!1));const i=Re(null),o=Re(null),l=Re(null),f=Re(null),u=Re(null),d=Re(null),m=Re(null),v=Re(null),y=Re(-1),_=Xl({query:""}),E=Xl(""),C=Re([]);let T=0;const{form:I,formItem:k}=v3(),N=Ee(()=>!e.filterable||e.multiple||!t.visible),O=Ee(()=>e.disabled||(I==null?void 0:I.disabled)),P=Ee(()=>{const de=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!=="";return e.clearable&&!O.value&&t.inputHovering&&de}),z=Ee(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),V=Ee(()=>a.is("reverse",z.value&&t.visible&&e.suffixTransition)),L=Ee(()=>(I==null?void 0:I.statusIcon)&&(k==null?void 0:k.validateState)&&SR[k==null?void 0:k.validateState]),U=Ee(()=>e.remote?300:0),M=Ee(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&t.query===""&&t.options.size===0?!1:e.filterable&&t.query&&t.options.size>0&&t.filteredOptionsCount===0?e.noMatchText||n("el.select.noMatch"):t.options.size===0?e.noDataText||n("el.select.noData"):null),s=Ee(()=>{const de=Array.from(t.options.values()),Ve=[];return C.value.forEach(_e=>{const Ae=de.findIndex(xt=>xt.currentLabel===_e);Ae>-1&&Ve.push(de[Ae])}),Ve.length>=de.length?Ve:de}),h=Ee(()=>Array.from(t.cachedOptions.values())),p=Ee(()=>{const de=s.value.filter(Ve=>!Ve.created).some(Ve=>Ve.currentLabel===t.query);return e.filterable&&e.allowCreate&&t.query!==""&&!de}),g=Zu(),b=Ee(()=>["small"].includes(g.value)?"small":"default"),w=Ee({get(){return t.visible&&M.value!==!1},set(de){t.visible=de}});ut([()=>O.value,()=>g.value,()=>I==null?void 0:I.size],()=>{kt(()=>{A()})}),ut(()=>e.placeholder,de=>{t.cachedPlaceHolder=t.currentPlaceholder=de,e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(t.currentPlaceholder="")}),ut(()=>e.modelValue,(de,Ve)=>{e.multiple&&(A(),de&&de.length>0||o.value&&t.query!==""?t.currentPlaceholder="":t.currentPlaceholder=t.cachedPlaceHolder,e.filterable&&!e.reserveKeyword&&(t.query="",x(t.query))),B(),e.filterable&&!e.multiple&&(t.inputLength=20),!dR(de,Ve)&&e.validateEvent&&(k==null||k.validate("change").catch(_e=>yn(_e)))},{flush:"post",deep:!0}),ut(()=>t.visible,de=>{var Ve,_e,Ae,xt,ke;de?((_e=(Ve=f.value)==null?void 0:Ve.updatePopper)==null||_e.call(Ve),e.filterable&&(t.filteredOptionsCount=t.optionsCount,t.query=e.remote?"":t.selectedLabel,(xt=(Ae=l.value)==null?void 0:Ae.focus)==null||xt.call(Ae),e.multiple?(ke=o.value)==null||ke.focus():t.selectedLabel&&(t.currentPlaceholder=`${t.selectedLabel}`,t.selectedLabel=""),x(t.query),!e.multiple&&!e.remote&&(_.value.query="",fh(_),fh(E)))):(e.filterable&&(bt(e.filterMethod)&&e.filterMethod(""),bt(e.remoteMethod)&&e.remoteMethod("")),t.query="",t.previousQuery=null,t.selectedLabel="",t.inputLength=20,t.menuVisibleOnFocus=!1,H(),kt(()=>{o.value&&o.value.value===""&&t.selected.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}),e.multiple||(t.selected&&(e.filterable&&e.allowCreate&&t.createdSelected&&t.createdLabel?t.selectedLabel=t.createdLabel:t.selectedLabel=t.selected.currentLabel,e.filterable&&(t.query=t.selectedLabel)),e.filterable&&(t.currentPlaceholder=t.cachedPlaceHolder))),r.emit("visible-change",de)}),ut(()=>t.options.entries(),()=>{var de,Ve,_e;if(!hn)return;(Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de),e.multiple&&A();const Ae=((_e=m.value)==null?void 0:_e.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!pR(e.modelValue)||!Array.from(Ae).includes(document.activeElement))&&B(),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&S()},{flush:"post"}),ut(()=>t.hoverIndex,de=>{ka(de)&&de>-1?y.value=s.value[de]||{}:y.value={},s.value.forEach(Ve=>{Ve.hover=y.value===Ve})});const A=()=>{kt(()=>{var de,Ve;if(!i.value)return;const _e=i.value.$el.querySelector("input");T=T||(_e.clientHeight>0?_e.clientHeight+2:0);const Ae=d.value,xt=Hxe(g.value||(I==null?void 0:I.size)),ke=g.value||xt===T||T<=0?xt:T;!(_e.offsetParent===null)&&(_e.style.height=`${(t.selected.length===0?ke:Math.max(Ae?Ae.clientHeight+(Ae.clientHeight>ke?6:0):0,ke))-2}px`),t.visible&&M.value!==!1&&((Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de))})},x=async de=>{if(!(t.previousQuery===de||t.isOnComposition)){if(t.previousQuery===null&&(bt(e.filterMethod)||bt(e.remoteMethod))){t.previousQuery=de;return}t.previousQuery=de,kt(()=>{var Ve,_e;t.visible&&((_e=(Ve=f.value)==null?void 0:Ve.updatePopper)==null||_e.call(Ve))}),t.hoverIndex=-1,e.multiple&&e.filterable&&kt(()=>{if(!O.value){const Ve=o.value.value.length*15+20;t.inputLength=e.collapseTags?Math.min(50,Ve):Ve,c()}A()}),e.remote&&bt(e.remoteMethod)?(t.hoverIndex=-1,e.remoteMethod(de)):bt(e.filterMethod)?(e.filterMethod(de),fh(E)):(t.filteredOptionsCount=t.optionsCount,_.value.query=de,fh(_),fh(E)),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&(await kt(),S())}},c=()=>{t.currentPlaceholder!==""&&(t.currentPlaceholder=o.value.value?"":t.cachedPlaceHolder)},S=()=>{const de=s.value.filter(Ae=>Ae.visible&&!Ae.disabled&&!Ae.states.groupDisabled),Ve=de.find(Ae=>Ae.created),_e=de[0];t.hoverIndex=q(s.value,Ve||_e)},B=()=>{var de;if(e.multiple)t.selectedLabel="";else{const _e=R(e.modelValue);(de=_e.props)!=null&&de.created?(t.createdLabel=_e.props.value,t.createdSelected=!0):t.createdSelected=!1,t.selectedLabel=_e.currentLabel,t.selected=_e,e.filterable&&(t.query=t.selectedLabel);return}const Ve=[];Array.isArray(e.modelValue)&&e.modelValue.forEach(_e=>{Ve.push(R(_e))}),t.selected=Ve,kt(()=>{A()})},R=de=>{let Ve;const _e=xu(de).toLowerCase()==="object",Ae=xu(de).toLowerCase()==="null",xt=xu(de).toLowerCase()==="undefined";for(let It=t.cachedOptions.size-1;It>=0;It--){const Oe=h.value[It];if(_e?bi(Oe.value,e.valueKey)===bi(de,e.valueKey):Oe.value===de){Ve={value:de,currentLabel:Oe.currentLabel,isDisabled:Oe.isDisabled};break}}if(Ve)return Ve;const ke=_e?de.label:!Ae&&!xt?de:"",qe={value:de,currentLabel:ke};return e.multiple&&(qe.hitState=!1),qe},H=()=>{setTimeout(()=>{const de=e.valueKey;e.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(Ve=>s.value.findIndex(_e=>bi(_e,de)===bi(Ve,de)))):t.hoverIndex=-1:t.hoverIndex=s.value.findIndex(Ve=>be(Ve)===be(t.selected))},300)},X=()=>{var de,Ve;G(),(Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de),e.multiple&&A()},G=()=>{var de;t.inputWidth=(de=i.value)==null?void 0:de.$el.offsetWidth},Y=()=>{e.filterable&&t.query!==t.selectedLabel&&(t.query=t.selectedLabel,x(t.query))},ue=hR(()=>{Y()},U.value),oe=hR(de=>{x(de.target.value)},U.value),ce=de=>{dR(e.modelValue,de)||r.emit(MR,de)},ne=de=>c3e(de,Ve=>!t.disabledOptions.has(Ve)),J=de=>{if(de.code!==bn.delete){if(de.target.value.length<=0&&!te()){const Ve=e.modelValue.slice(),_e=ne(Ve);if(_e<0)return;Ve.splice(_e,1),r.emit(Na,Ve),ce(Ve)}de.target.value.length===1&&e.modelValue.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}},j=(de,Ve)=>{const _e=t.selected.indexOf(Ve);if(_e>-1&&!O.value){const Ae=e.modelValue.slice();Ae.splice(_e,1),r.emit(Na,Ae),ce(Ae),r.emit("remove-tag",Ve.value)}de.stopPropagation(),pe()},ae=de=>{de.stopPropagation();const Ve=e.multiple?[]:"";if(!Bt(Ve))for(const _e of t.selected)_e.isDisabled&&Ve.push(_e.value);r.emit(Na,Ve),ce(Ve),t.hoverIndex=-1,t.visible=!1,r.emit("clear"),pe()},se=de=>{var Ve;if(e.multiple){const _e=(e.modelValue||[]).slice(),Ae=q(_e,de.value);Ae>-1?_e.splice(Ae,1):(e.multipleLimit<=0||_e.length<e.multipleLimit)&&_e.push(de.value),r.emit(Na,_e),ce(_e),de.created&&(t.query="",x(""),t.inputLength=20),e.filterable&&((Ve=o.value)==null||Ve.focus())}else r.emit(Na,de.value),ce(de.value),t.visible=!1;D(),!t.visible&&kt(()=>{F(de)})},q=(de=[],Ve)=>{if(!Dt(Ve))return de.indexOf(Ve);const _e=e.valueKey;let Ae=-1;return de.some((xt,ke)=>Tt(bi(xt,_e))===bi(Ve,_e)?(Ae=ke,!0):!1),Ae},D=()=>{const de=o.value||i.value;de&&(de==null||de.focus())},F=de=>{var Ve,_e,Ae,xt,ke;const qe=Array.isArray(de)?de[0]:de;let It=null;if(qe!=null&&qe.value){const Oe=s.value.filter(ze=>ze.value===qe.value);Oe.length>0&&(It=Oe[0].$el)}if(f.value&&It){const Oe=(xt=(Ae=(_e=(Ve=f.value)==null?void 0:Ve.popperRef)==null?void 0:_e.contentRef)==null?void 0:Ae.querySelector)==null?void 0:xt.call(Ae,`.${a.be("dropdown","wrap")}`);Oe&&b3e(Oe,It)}(ke=v.value)==null||ke.handleScroll()},$=de=>{t.optionsCount++,t.filteredOptionsCount++,t.options.set(de.value,de),t.cachedOptions.set(de.value,de),de.disabled&&t.disabledOptions.set(de.value,de)},re=(de,Ve)=>{t.options.get(de)===Ve&&(t.optionsCount--,t.filteredOptionsCount--,t.options.delete(de))},Q=de=>{de.code!==bn.backspace&&te(!1),t.inputLength=o.value.value.length*15+20,A()},te=de=>{if(!Array.isArray(t.selected))return;const Ve=ne(t.selected.map(Ae=>Ae.value)),_e=t.selected[Ve];if(_e)return de===!0||de===!1?(_e.hitState=de,de):(_e.hitState=!_e.hitState,_e.hitState)},le=de=>{const Ve=de.target.value;if(de.type==="compositionend")t.isOnComposition=!1,kt(()=>x(Ve));else{const _e=Ve[Ve.length-1]||"";t.isOnComposition=!CR(_e)}},Z=()=>{kt(()=>F(t.selected))},K=de=>{t.focused||((e.automaticDropdown||e.filterable)&&(e.filterable&&!t.visible&&(t.menuVisibleOnFocus=!0),t.visible=!0),t.focused=!0,r.emit("focus",de))},pe=()=>{var de,Ve;t.visible?(de=o.value||i.value)==null||de.focus():(Ve=i.value)==null||Ve.focus()},ie=()=>{var de,Ve,_e;t.visible=!1,(de=i.value)==null||de.blur(),(_e=(Ve=l.value)==null?void 0:Ve.blur)==null||_e.call(Ve)},ve=de=>{var Ve,_e,Ae;(Ve=f.value)!=null&&Ve.isFocusInsideContent(de)||(_e=u.value)!=null&&_e.isFocusInsideContent(de)||(Ae=m.value)!=null&&Ae.contains(de.relatedTarget)||(t.visible&&Se(),t.focused=!1,r.emit("blur",de))},Ye=de=>{ae(de)},Se=()=>{t.visible=!1},Ce=de=>{t.visible&&(de.preventDefault(),de.stopPropagation(),t.visible=!1)},Je=de=>{de&&!t.mouseEnter||O.value||(t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:(!f.value||!f.value.isFocusInsideContent())&&(t.visible=!t.visible),pe())},he=()=>{t.visible?s.value[t.hoverIndex]&&se(s.value[t.hoverIndex]):Je()},be=de=>Dt(de.value)?bi(de.value,e.valueKey):de.value,it=Ee(()=>s.value.filter(de=>de.visible).every(de=>de.disabled)),we=Ee(()=>e.multiple?t.selected.slice(0,e.maxCollapseTags):[]),Be=Ee(()=>e.multiple?t.selected.slice(e.maxCollapseTags):[]),gt=de=>{if(!t.visible){t.visible=!0;return}if(!(t.options.size===0||t.filteredOptionsCount===0)&&!t.isOnComposition&&!it.value){de==="next"?(t.hoverIndex++,t.hoverIndex===t.options.size&&(t.hoverIndex=0)):de==="prev"&&(t.hoverIndex--,t.hoverIndex<0&&(t.hoverIndex=t.options.size-1));const Ve=s.value[t.hoverIndex];(Ve.disabled===!0||Ve.states.groupDisabled===!0||!Ve.visible)&&gt(de),kt(()=>F(y.value))}},Ie=()=>{t.mouseEnter=!0},He=()=>{t.mouseEnter=!1},Rt=(de,Ve)=>{var _e,Ae;j(de,Ve),(Ae=(_e=u.value)==null?void 0:_e.updatePopper)==null||Ae.call(_e)},Pe=Ee(()=>({maxWidth:`${W(t.inputWidth)-32-(L.value?22:0)}px`,width:"100%"}));return{optionList:C,optionsArray:s,selectSize:g,handleResize:X,debouncedOnInputChange:ue,debouncedQueryChange:oe,deletePrevTag:J,deleteTag:j,deleteSelected:ae,handleOptionSelect:se,scrollToOption:F,readonly:N,resetInputHeight:A,showClose:P,iconComponent:z,iconReverse:V,showNewOption:p,collapseTagSize:b,setSelected:B,managePlaceholder:c,selectDisabled:O,emptyText:M,toggleLastOptionHitState:te,resetInputState:Q,handleComposition:le,onOptionCreate:$,onOptionDestroy:re,handleMenuEnter:Z,handleFocus:K,focus:pe,blur:ie,handleBlur:ve,handleClearClick:Ye,handleClose:Se,handleKeydownEscape:Ce,toggleMenu:Je,selectOption:he,getValueKey:be,navigateOptions:gt,handleDeleteTooltipTag:Rt,dropMenuVisible:w,queryChange:_,groupQueryChange:E,showTagList:we,collapseTagList:Be,selectTagsStyle:Pe,reference:i,input:o,iOSInput:l,tooltipRef:f,tagTooltipRef:u,tags:d,selectWrapper:m,scrollbar:v,handleMouseEnter:Ie,handleMouseLeave:He}};var r5e=st({name:"ElOptions",emits:["update-options"],setup(e,{slots:t,emit:r}){let n=[];function a(i,o){if(i.length!==o.length)return!1;for(const[l]of i.entries())if(i[l]!=o[l])return!1;return!0}return()=>{var i,o;const l=(i=t.default)==null?void 0:i.call(t),f=[];function u(d){Array.isArray(d)&&d.forEach(m=>{var v,y,_,E;const C=(v=(m==null?void 0:m.type)||{})==null?void 0:v.name;C==="ElOptionGroup"?u(!Bt(m.children)&&!Array.isArray(m.children)&&bt((y=m.children)==null?void 0:y.default)?(_=m.children)==null?void 0:_.default():m.children):C==="ElOption"?f.push((E=m.props)==null?void 0:E.label):Array.isArray(m.children)&&u(m.children)})}return l.length&&u((o=l[0])==null?void 0:o.children),a(f,n)||(n=f,r("update-options",f)),l}}});const aF="ElSelect",n5e=st({name:aF,componentName:aF,components:{ElInput:dm,ElSelectMenu:QMe,ElOption:U3,ElOptions:r5e,ElTag:wMe,ElScrollbar:WSe,ElTooltip:N3,ElIcon:Rn},directives:{ClickOutside:mMe},props:{name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:{type:String,validator:jxe},effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:k3.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:oa,default:XE},fitInputWidth:Boolean,suffixIcon:{type:oa,default:gR},tagType:{...JP.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:String,values:nm,default:"bottom-start"},ariaLabel:{type:String,default:void 0}},emits:[Na,MR,"remove-tag","clear","visible-change","focus","blur"],setup(e,t){const r=Qt("select"),n=Qt("input"),{t:a}=tm(),i=e5e(e),{optionList:o,optionsArray:l,selectSize:f,readonly:u,handleResize:d,collapseTagSize:m,debouncedOnInputChange:v,debouncedQueryChange:y,deletePrevTag:_,deleteTag:E,deleteSelected:C,handleOptionSelect:T,scrollToOption:I,setSelected:k,resetInputHeight:N,managePlaceholder:O,showClose:P,selectDisabled:z,iconComponent:V,iconReverse:L,showNewOption:U,emptyText:M,toggleLastOptionHitState:s,resetInputState:h,handleComposition:p,onOptionCreate:g,onOptionDestroy:b,handleMenuEnter:w,handleFocus:A,focus:x,blur:c,handleBlur:S,handleClearClick:B,handleClose:R,handleKeydownEscape:H,toggleMenu:X,selectOption:G,getValueKey:Y,navigateOptions:ue,handleDeleteTooltipTag:oe,dropMenuVisible:ce,reference:ne,input:J,iOSInput:j,tooltipRef:ae,tagTooltipRef:se,tags:q,selectWrapper:D,scrollbar:F,queryChange:$,groupQueryChange:re,handleMouseEnter:Q,handleMouseLeave:te,showTagList:le,collapseTagList:Z,selectTagsStyle:K}=t5e(e,i,t),{inputWidth:pe,selected:ie,inputLength:ve,filteredOptionsCount:Ye,visible:Se,selectedLabel:Ce,hoverIndex:Je,query:he,inputHovering:be,currentPlaceholder:it,menuVisibleOnFocus:we,isOnComposition:Be,options:gt,cachedOptions:Ie,optionsCount:He,prefixWidth:Rt}=Ql(i),Pe=Ee(()=>{const ze=[r.b()],Nt=W(f);return Nt&&ze.push(r.m(Nt)),e.disabled&&ze.push(r.m("disabled")),ze}),de=Ee(()=>[r.e("tags"),r.is("disabled",W(z))]),Ve=Ee(()=>[r.b("tags-wrapper"),{"has-prefix":W(Rt)&&W(ie).length}]),_e=Ee(()=>[r.e("input"),r.is(W(f)),r.is("disabled",W(z))]),Ae=Ee(()=>[r.e("input"),r.is(W(f)),r.em("input","iOS")]),xt=Ee(()=>[r.is("empty",!e.allowCreate&&!!W(he)&&W(Ye)===0)]),ke=Ee(()=>({maxWidth:`${W(pe)>123?W(pe)-123:W(pe)-75}px`})),qe=Ee(()=>({marginLeft:`${W(Rt)}px`,flexGrow:1,width:`${W(ve)/(W(pe)-32)}%`,maxWidth:`${W(pe)-42}px`}));un(Em,Vn({props:e,options:gt,optionsArray:l,cachedOptions:Ie,optionsCount:He,filteredOptionsCount:Ye,hoverIndex:Je,handleOptionSelect:T,onOptionCreate:g,onOptionDestroy:b,selectWrapper:D,selected:ie,setSelected:k,queryChange:$,groupQueryChange:re})),ir(()=>{i.cachedPlaceHolder=it.value=e.placeholder||(()=>a("el.select.placeholder")),e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(it.value=""),Fu(D,d),e.remote&&e.multiple&&N(),kt(()=>{const ze=ne.value&&ne.value.$el;if(ze&&(pe.value=ze.getBoundingClientRect().width,t.slots.prefix)){const Nt=ze.querySelector(`.${n.e("prefix")}`);Rt.value=Math.max(Nt.getBoundingClientRect().width+11,30)}}),k()}),e.multiple&&!Array.isArray(e.modelValue)&&t.emit(Na,[]),!e.multiple&&Array.isArray(e.modelValue)&&t.emit(Na,"");const It=Ee(()=>{var ze,Nt;return(Nt=(ze=ae.value)==null?void 0:ze.popperRef)==null?void 0:Nt.contentRef});return{isIOS:Bye,onOptionsRendered:ze=>{o.value=ze},prefixWidth:Rt,selectSize:f,readonly:u,handleResize:d,collapseTagSize:m,debouncedOnInputChange:v,debouncedQueryChange:y,deletePrevTag:_,deleteTag:E,handleDeleteTooltipTag:oe,deleteSelected:C,handleOptionSelect:T,scrollToOption:I,inputWidth:pe,selected:ie,inputLength:ve,filteredOptionsCount:Ye,visible:Se,selectedLabel:Ce,hoverIndex:Je,query:he,inputHovering:be,currentPlaceholder:it,menuVisibleOnFocus:we,isOnComposition:Be,options:gt,resetInputHeight:N,managePlaceholder:O,showClose:P,selectDisabled:z,iconComponent:V,iconReverse:L,showNewOption:U,emptyText:M,toggleLastOptionHitState:s,resetInputState:h,handleComposition:p,handleMenuEnter:w,handleFocus:A,focus:x,blur:c,handleBlur:S,handleClearClick:B,handleClose:R,handleKeydownEscape:H,toggleMenu:X,selectOption:G,getValueKey:Y,navigateOptions:ue,dropMenuVisible:ce,reference:ne,input:J,iOSInput:j,tooltipRef:ae,popperPaneRef:It,tags:q,selectWrapper:D,scrollbar:F,wrapperKls:Pe,tagsKls:de,tagWrapperKls:Ve,inputKls:_e,iOSInputKls:Ae,scrollbarKls:xt,selectTagsStyle:K,nsSelect:r,tagTextStyle:ke,inputStyle:qe,handleMouseEnter:Q,handleMouseLeave:te,showTagList:le,collapseTagList:Z,tagTooltipRef:se}}}),i5e=["disabled","autocomplete","aria-label"],a5e=["disabled"],o5e={style:{height:"100%",display:"flex","justify-content":"center","align-items":"center"}};function s5e(e,t,r,n,a,i){const o=po("el-tag"),l=po("el-tooltip"),f=po("el-icon"),u=po("el-input"),d=po("el-option"),m=po("el-options"),v=po("el-scrollbar"),y=po("el-select-menu"),_=Iw("click-outside");return tn((me(),Fe("div",{ref:"selectWrapper",class:Te(e.wrapperKls),onMouseenter:t[22]||(t[22]=(...E)=>e.handleMouseEnter&&e.handleMouseEnter(...E)),onMouseleave:t[23]||(t[23]=(...E)=>e.handleMouseLeave&&e.handleMouseLeave(...E)),onClick:t[24]||(t[24]=Cn((...E)=>e.toggleMenu&&e.toggleMenu(...E),["stop"]))},[ht(l,{ref:"tooltipRef",visible:e.dropMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onShow:e.handleMenuEnter},{default:rt(()=>[Ue("div",{class:"select-trigger",onMouseenter:t[20]||(t[20]=E=>e.inputHovering=!0),onMouseleave:t[21]||(t[21]=E=>e.inputHovering=!1)},[e.multiple?(me(),Fe("div",{key:0,ref:"tags",tabindex:"-1",class:Te(e.tagsKls),style:on(e.selectTagsStyle),onClick:t[15]||(t[15]=(...E)=>e.focus&&e.focus(...E))},[e.collapseTags&&e.selected.length?(me(),Qe(aa,{key:0,onAfterLeave:e.resetInputHeight},{default:rt(()=>[Ue("span",{class:Te(e.tagWrapperKls)},[(me(!0),Fe(wt,null,jn(e.showTagList,E=>(me(),Qe(o,{key:e.getValueKey(E),closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",onClose:C=>e.deleteTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on(e.tagTextStyle)},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128)),e.selected.length>e.maxCollapseTags?(me(),Qe(o,{key:0,closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":""},{default:rt(()=>[e.collapseTagsTooltip?(me(),Qe(l,{key:0,ref:"tagTooltipRef",disabled:e.dropMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text"))},"+ "+ot(e.selected.length-e.maxCollapseTags),3)]),content:rt(()=>[Ue("div",{class:Te(e.nsSelect.e("collapse-tags"))},[(me(!0),Fe(wt,null,jn(e.collapseTagList,E=>(me(),Fe("div",{key:e.getValueKey(E),class:Te(e.nsSelect.e("collapse-tag"))},[ht(o,{class:"in-tooltip",closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",style:{margin:"2px"},onClose:C=>e.handleDeleteTooltipTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on({maxWidth:e.inputWidth-75+"px"})},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):(me(),Fe("span",{key:1,class:Te(e.nsSelect.e("tags-text"))},"+ "+ot(e.selected.length-e.maxCollapseTags),3))]),_:1},8,["size","type"])):et("v-if",!0)],2)]),_:1},8,["onAfterLeave"])):et("v-if",!0),e.collapseTags?et("v-if",!0):(me(),Qe(aa,{key:1,onAfterLeave:e.resetInputHeight},{default:rt(()=>[Ue("span",{class:Te(e.tagWrapperKls),style:on(e.prefixWidth&&e.selected.length?{marginLeft:`${e.prefixWidth}px`}:"")},[(me(!0),Fe(wt,null,jn(e.selected,E=>(me(),Qe(o,{key:e.getValueKey(E),closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",onClose:C=>e.deleteTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on({maxWidth:e.inputWidth-75+"px"})},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128))],6)]),_:1},8,["onAfterLeave"])),e.filterable&&!e.selectDisabled?tn((me(),Fe("input",{key:2,ref:"input","onUpdate:modelValue":t[0]||(t[0]=E=>e.query=E),type:"text",class:Te(e.inputKls),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:on(e.inputStyle),"aria-label":e.ariaLabel,onFocus:t[1]||(t[1]=(...E)=>e.handleFocus&&e.handleFocus(...E)),onBlur:t[2]||(t[2]=(...E)=>e.handleBlur&&e.handleBlur(...E)),onKeyup:t[3]||(t[3]=(...E)=>e.managePlaceholder&&e.managePlaceholder(...E)),onKeydown:[t[4]||(t[4]=(...E)=>e.resetInputState&&e.resetInputState(...E)),t[5]||(t[5]=Ma(Cn(E=>e.navigateOptions("next"),["prevent"]),["down"])),t[6]||(t[6]=Ma(Cn(E=>e.navigateOptions("prev"),["prevent"]),["up"])),t[7]||(t[7]=Ma((...E)=>e.handleKeydownEscape&&e.handleKeydownEscape(...E),["esc"])),t[8]||(t[8]=Ma(Cn((...E)=>e.selectOption&&e.selectOption(...E),["stop","prevent"]),["enter"])),t[9]||(t[9]=Ma((...E)=>e.deletePrevTag&&e.deletePrevTag(...E),["delete"])),t[10]||(t[10]=Ma(E=>e.visible=!1,["tab"]))],onCompositionstart:t[11]||(t[11]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onCompositionupdate:t[12]||(t[12]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onCompositionend:t[13]||(t[13]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onInput:t[14]||(t[14]=(...E)=>e.debouncedQueryChange&&e.debouncedQueryChange(...E))},null,46,i5e)),[[Ege,e.query]]):et("v-if",!0)],6)):et("v-if",!0),et(" fix: https://github.com/element-plus/element-plus/issues/11415 "),e.isIOS&&!e.multiple&&e.filterable&&e.readonly?(me(),Fe("input",{key:1,ref:"iOSInput",class:Te(e.iOSInputKls),disabled:e.selectDisabled,type:"text"},null,10,a5e)):et("v-if",!0),ht(u,{id:e.id,ref:"reference",modelValue:e.selectedLabel,"onUpdate:modelValue":t[16]||(t[16]=E=>e.selectedLabel=E),type:"text",placeholder:typeof e.currentPlaceholder=="function"?e.currentPlaceholder():e.currentPlaceholder,name:e.name,autocomplete:e.autocomplete,size:e.selectSize,disabled:e.selectDisabled,readonly:e.readonly,"validate-event":!1,class:Te([e.nsSelect.is("focus",e.visible)]),tabindex:e.multiple&&e.filterable?-1:void 0,label:e.ariaLabel,onFocus:e.handleFocus,onBlur:e.handleBlur,onInput:e.debouncedOnInputChange,onPaste:e.debouncedOnInputChange,onCompositionstart:e.handleComposition,onCompositionupdate:e.handleComposition,onCompositionend:e.handleComposition,onKeydown:[t[17]||(t[17]=Ma(Cn(E=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[18]||(t[18]=Ma(Cn(E=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),Ma(Cn(e.selectOption,["stop","prevent"]),["enter"]),Ma(e.handleKeydownEscape,["esc"]),t[19]||(t[19]=Ma(E=>e.visible=!1,["tab"]))]},kw({suffix:rt(()=>[e.iconComponent&&!e.showClose?(me(),Qe(f,{key:0,class:Te([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:rt(()=>[(me(),Qe(ni(e.iconComponent)))]),_:1},8,["class"])):et("v-if",!0),e.showClose&&e.clearIcon?(me(),Qe(f,{key:1,class:Te([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:rt(()=>[(me(),Qe(ni(e.clearIcon)))]),_:1},8,["class","onClick"])):et("v-if",!0)]),_:2},[e.$slots.prefix?{name:"prefix",fn:rt(()=>[Ue("div",o5e,[Ot(e.$slots,"prefix")])])}:void 0]),1032,["id","modelValue","placeholder","name","autocomplete","size","disabled","readonly","class","tabindex","label","onFocus","onBlur","onInput","onPaste","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown"])],32)]),content:rt(()=>[ht(y,null,{default:rt(()=>[tn(ht(v,{ref:"scrollbar",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:Te(e.scrollbarKls)},{default:rt(()=>[e.showNewOption?(me(),Qe(d,{key:0,value:e.query,created:!0},null,8,["value"])):et("v-if",!0),ht(m,{onUpdateOptions:e.onOptionsRendered},{default:rt(()=>[Ot(e.$slots,"default")]),_:3},8,["onUpdateOptions"])]),_:3},8,["wrap-class","view-class","class"]),[[vi,e.options.size>0&&!e.loading]]),e.emptyText&&(!e.allowCreate||e.loading||e.allowCreate&&e.options.size===0)?(me(),Fe(wt,{key:0},[e.$slots.empty?Ot(e.$slots,"empty",{key:0}):(me(),Fe("p",{key:1,class:Te(e.nsSelect.be("dropdown","empty"))},ot(e.emptyText),3))],64)):et("v-if",!0)]),_:3})]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onShow"])],34)),[[_,e.handleClose,e.popperPaneRef]])}var l5e=vr(n5e,[["render",s5e],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const f5e=st({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Qt("select"),r=Re(!0),n=rn(),a=Re([]);un(iF,Vn({...Ql(e)}));const i=At(Em);ir(()=>{a.value=o(n.subTree)});const o=f=>{const u=[];return Array.isArray(f.children)&&f.children.forEach(d=>{var m;d.type&&d.type.name==="ElOption"&&d.component&&d.component.proxy?u.push(d.component.proxy):(m=d.children)!=null&&m.length&&u.push(...o(d))}),u},{groupQueryChange:l}=Tt(i);return ut(l,()=>{r.value=a.value.some(f=>f.visible===!0)},{flush:"post"}),{visible:r,ns:t}}});function u5e(e,t,r,n,a,i){return tn((me(),Fe("ul",{class:Te(e.ns.be("group","wrap"))},[Ue("li",{class:Te(e.ns.be("group","title"))},ot(e.label),3),Ue("li",null,[Ue("ul",{class:Te(e.ns.b("group"))},[Ot(e.$slots,"default")],2)])],2)),[[vi,e.visible]])}var oF=vr(f5e,[["render",u5e],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const xm=Ni(l5e,{Option:U3,OptionGroup:oF}),Sm=bf(U3);bf(oF);function c5e(e){let t;const r=Re(!1),n=Vn({...e,originalPosition:"",originalOverflow:"",visible:!1});function a(v){n.text=v}function i(){const v=n.parent,y=m.ns;if(!v.vLoadingAddClassList){let _=v.getAttribute("loading-number");_=Number.parseInt(_)-1,_?v.setAttribute("loading-number",_.toString()):(yf(v,y.bm("parent","relative")),v.removeAttribute("loading-number")),yf(v,y.bm("parent","hidden"))}o(),d.unmount()}function o(){var v,y;(y=(v=m.$el)==null?void 0:v.parentNode)==null||y.removeChild(m.$el)}function l(){var v;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(f,400),n.visible=!1,(v=e.closed)==null||v.call(e))}function f(){if(!r.value)return;const v=n.parent;r.value=!1,v.vLoadingAddClassList=void 0,i()}const u=st({name:"ElLoading",setup(v,{expose:y}){const{ns:_,zIndex:E}=uP("loading");return y({ns:_,zIndex:E}),()=>{const C=n.spinner||n.svg,T=vt("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...C?{innerHTML:C}:{}},[vt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),I=n.text?vt("p",{class:_.b("text")},[n.text]):void 0;return vt(aa,{name:_.b("fade"),onAfterLeave:f},{default:rt(()=>[tn(ht("div",{style:{backgroundColor:n.background||""},class:[_.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[vt("div",{class:_.b("spinner")},[T,I])]),[[vi,n.visible]])])})}}}),d=zk(u),m=d.mount(document.createElement("div"));return{...Ql(n),setText:a,removeElLoadingChild:o,close:l,handleAfterLeave:f,vm:m,get $el(){return m.$el}}}let Mm;const h5e=function(e={}){if(!hn)return;const t=d5e(e);if(t.fullscreen&&Mm)return Mm;const r=c5e({...t,closed:()=>{var a;(a=t.closed)==null||a.call(t),t.fullscreen&&(Mm=void 0)}});p5e(t,t.parent,r),sF(t,t.parent,r),t.parent.vLoadingAddClassList=()=>sF(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),kt(()=>r.visible.value=t.visible),t.fullscreen&&(Mm=r),r},d5e=e=>{var t,r,n,a;let i;return Bt(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,target:i}},p5e=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(e.fullscreen)r.originalPosition.value=qh(document.body,"position"),r.originalOverflow.value=qh(document.body,"overflow"),a.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=qh(document.body,"position"),await kt();for(const i of["top","left"]){const o=i==="top"?"scrollTop":"scrollLeft";a[i]=`${e.target.getBoundingClientRect()[i]+document.body[o]+document.documentElement[o]-Number.parseInt(qh(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${e.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=qh(t,"position");for(const[i,o]of Object.entries(a))r.$el.style[i]=o},sF=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?yf(t,n.bm("parent","relative")):Uu(t,n.bm("parent","relative")),e.fullscreen&&e.lock?Uu(t,n.bm("parent","hidden")):yf(t,n.bm("parent","hidden"))},q3=Symbol("ElLoading"),lF=(e,t)=>{var r,n,a,i;const o=t.instance,l=v=>Dt(t.value)?t.value[v]:void 0,f=v=>{const y=Bt(v)&&(o==null?void 0:o[v])||v;return y&&Re(y)},u=v=>f(l(v)||e.getAttribute(`element-loading-${lo(v)}`)),d=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,m={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:e,body:(a=l("body"))!=null?a:t.modifiers.body,lock:(i=l("lock"))!=null?i:t.modifiers.lock};e[q3]={options:m,instance:h5e(m)}},v5e=(e,t)=>{for(const r of Object.keys(t))hr(t[r])&&(t[r].value=e[r])},Mf={mounted(e,t){t.value&&lF(e,t)},updated(e,t){const r=e[q3];t.oldValue!==t.value&&(t.value&&!t.oldValue?lF(e,t):t.value&&t.oldValue?Dt(t.value)&&v5e(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[q3])==null||t.instance.close()}},fF=["success","info","warning","error"],m5e=Kr({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:oa},id:{type:String,default:""},message:{type:$t([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:$t(Function),default:()=>{}},onClose:{type:$t(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:[...fF,""],default:""},zIndex:Number}),g5e={destroy:()=>!0},y5e=["id"],b5e=["textContent"],_5e={key:0},w5e=["innerHTML"],E5e=st({name:"ElNotification"}),x5e=st({...E5e,props:m5e,emits:g5e,setup(e,{expose:t}){const r=e,{ns:n,zIndex:a}=uP("notification"),{nextZIndex:i,currentZIndex:o}=a,{Close:l}=zxe,f=Re(!1);let u;const d=Ee(()=>{const k=r.type;return k&&Qv[r.type]?n.m(k):""}),m=Ee(()=>r.type&&Qv[r.type]||r.icon),v=Ee(()=>r.position.endsWith("right")?"right":"left"),y=Ee(()=>r.position.startsWith("top")?"top":"bottom"),_=Ee(()=>{var k;return{[y.value]:`${r.offset}px`,zIndex:(k=r.zIndex)!=null?k:o.value}});function E(){r.duration>0&&({stop:u}=xE(()=>{f.value&&T()},r.duration))}function C(){u==null||u()}function T(){f.value=!1}function I({code:k}){k===bn.delete||k===bn.backspace?C():k===bn.esc?f.value&&T():E()}return ir(()=>{E(),i(),f.value=!0}),Jo(document,"keydown",I),t({visible:f,close:T}),(k,N)=>(me(),Qe(aa,{name:W(n).b("fade"),onBeforeLeave:k.onClose,onAfterLeave:N[1]||(N[1]=O=>k.$emit("destroy")),persisted:""},{default:rt(()=>[tn(Ue("div",{id:k.id,class:Te([W(n).b(),k.customClass,W(v)]),style:on(W(_)),role:"alert",onMouseenter:C,onMouseleave:E,onClick:N[0]||(N[0]=(...O)=>k.onClick&&k.onClick(...O))},[W(m)?(me(),Qe(W(Rn),{key:0,class:Te([W(n).e("icon"),W(d)])},{default:rt(()=>[(me(),Qe(ni(W(m))))]),_:1},8,["class"])):et("v-if",!0),Ue("div",{class:Te(W(n).e("group"))},[Ue("h2",{class:Te(W(n).e("title")),textContent:ot(k.title)},null,10,b5e),tn(Ue("div",{class:Te(W(n).e("content")),style:on(k.title?void 0:{margin:0})},[Ot(k.$slots,"default",{},()=>[k.dangerouslyUseHTMLString?(me(),Fe(wt,{key:1},[et(" Caution here, message could've been compromised, never use user's input as message "),Ue("p",{innerHTML:k.message},null,8,w5e)],2112)):(me(),Fe("p",_5e,ot(k.message),1))])],6),[[vi,k.message]]),k.showClose?(me(),Qe(W(Rn),{key:0,class:Te(W(n).e("closeBtn")),onClick:Cn(T,["stop"])},{default:rt(()=>[ht(W(l))]),_:1},8,["class","onClick"])):et("v-if",!0)],2)],46,y5e),[[vi,f.value]])]),_:3},8,["name","onBeforeLeave"]))}});var S5e=vr(x5e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);const Cm={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},V3=16;let M5e=1;const Qu=function(e={},t=null){if(!hn)return{close:()=>{}};(typeof e=="string"||Ea(e))&&(e={message:e});const r=e.position||"top-right";let n=e.offset||0;Cm[r].forEach(({vm:d})=>{var m;n+=(((m=d.el)==null?void 0:m.offsetHeight)||0)+V3}),n+=V3;const a=`notification_${M5e++}`,i=e.onClose,o={...e,offset:n,id:a,onClose:()=>{C5e(a,r,i)}};let l=document.body;gf(e.appendTo)?l=e.appendTo:Bt(e.appendTo)&&(l=document.querySelector(e.appendTo)),gf(l)||(yn("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),l=document.body);const f=document.createElement("div"),u=ht(S5e,o,Ea(o.message)?{default:()=>o.message}:null);return u.appContext=t??Qu._context,u.props.onDestroy=()=>{$k(null,f)},$k(u,f),Cm[r].push({vm:u}),l.appendChild(f.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};fF.forEach(e=>{Qu[e]=(t={})=>((typeof t=="string"||Ea(t))&&(t={message:t}),Qu({...t,type:e}))});function C5e(e,t,r){const n=Cm[t],a=n.findIndex(({vm:u})=>{var d;return((d=u.component)==null?void 0:d.props.id)===e});if(a===-1)return;const{vm:i}=n[a];if(!i)return;r==null||r(i);const o=i.el.offsetHeight,l=t.split("-")[0];n.splice(a,1);const f=n.length;if(!(f<1))for(let u=a;u<f;u++){const{el:d,component:m}=n[u].vm,v=Number.parseInt(d.style[l],10)-o-V3;m.props.offset=v}}function T5e(){for(const e of Object.values(Cm))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}Qu.closeAll=T5e,Qu._context=null;const Vt=qxe(Qu,"$notify");/*! Element Plus v2.3.14 */var A5e={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new 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",week:"week",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"},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"},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"}}};/*! Element Plus v2.3.14 */var I5e={name:"es",el:{colorpicker:{confirm:"Confirmar",clear:"Despejar"},datepicker:{now:"Ahora",today:"Hoy",cancel:"Cancelar",clear:"Despejar",confirm:"Confirmar",selectDate:"Seleccionar fecha",selectTime:"Seleccionar hora",startDate:"Fecha Incial",startTime:"Hora Inicial",endDate:"Fecha Final",endTime:"Hora Final",prevYear:"Año Anterior",nextYear:"Próximo Año",prevMonth:"Mes Anterior",nextMonth:"Próximo 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é",thu:"jue",fri:"vie",sat:"sáb"},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"}},select:{loading:"Cargando",noMatch:"No hay datos que coincidan",noData:"Sin datos",placeholder:"Seleccionar"},cascader:{noMatch:"No hay datos que coincidan",loading:"Cargando",placeholder:"Seleccionar",noData:"Sin datos"},pagination:{goto:"Ir a",pagesize:"/página",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"},messagebox:{confirm:"Aceptar",cancel:"Cancelar",error:"Entrada inválida"},upload:{deleteTip:"Pulse Eliminar para retirar",delete:"Eliminar",preview:"Vista Previa",continue:"Continuar"},table:{emptyText:"Sin Datos",confirmFilter:"Confirmar",resetFilter:"Reiniciar",clearFilter:"Despejar",sumText:"Suma"},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ículos",hasCheckedFormat:"{checked}/{total} revisados"},image:{error:"HA FALLADO"},pageHeader:{title:"Volver"},popconfirm:{confirmButtonText:"Si",cancelButtonText:"No"}}};const B5e={key:0,fill:"#31383e",stroke:"#31383e",width:"24",height:"24"},k5e=[Ue("path",{d:"M11.672 3.891L3.563 12l8.109 8.109-1.781 1.781L0 11.999l9.891-9.891z"},null,-1)],N5e={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 129 129"},O5e=[Ue("path",{d:"M7.6 121.4c.8.8 1.8 1.2 2.9 1.2s2.1-.4 2.9-1.2l51.1-51.1 51.1 51.1c.8.8 1.8 1.2 2.9 1.2 1 0 2.1-.4 2.9-1.2 1.6-1.6 1.6-4.2 0-5.8L70.3 64.5l51.1-51.1c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8 0L64.5 58.7 13.4 7.6C11.8 6 9.2 6 7.6 7.6s-1.6 4.2 0 5.8l51.1 51.1-51.1 51.1c-1.6 1.6-1.6 4.2 0 5.8z"},null,-1)],R5e={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},P5e=[Ue("circle",{cx:"25",cy:"25",r:"25",fill:"#d75a4a"},null,-1),Ue("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)],F5e={key:3,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},L5e=[Ue("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)],D5e={key:4,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},$5e=[Ue("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)],z5e={key:5,width:"27",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U5e=[Pme('<path d="M13.069 1.886c3.491 2.404 9.057 3.57 11.43 3.978a23.013 23.013 0 01-11.447 22.46A23.015 23.015 0 011.468 8.33c0-.8.046-1.62.136-2.45 2.423-.386 8.097-1.51 11.465-3.995zM13.029 0C9.482 3.51.294 4.584.294 4.584A24.578 24.578 0 000 8.331C0 17.73 5.292 25.885 13.052 30c7.76-4.115 13.051-12.27 13.051-21.669 0-1.275-.104-2.523-.292-3.747 0 0-8.947-1.182-12.782-4.584z" fill="#34974A"></path><path d="M13.069 1.886c3.491 2.404 9.057 3.57 11.43 3.978a23.013 23.013 0 01-11.447 22.46A23.015 23.015 0 011.468 8.33c0-.8.046-1.62.136-2.45 2.423-.386 8.097-1.51 11.465-3.995zM13.029 0C9.482 3.51.294 4.584.294 4.584A24.578 24.578 0 000 8.331C0 17.73 5.292 25.885 13.052 30c7.76-4.115 13.051-12.27 13.051-21.669 0-1.275-.104-2.523-.292-3.747 0 0-8.947-1.182-12.782-4.584z" fill="url(#paint0_linear)"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.036 10.396c0-.88.072-1.744.203-2.592 0 0 6.346-.741 8.797-3.165 2.649 2.35 8.83 3.165 8.83 3.165.127.848.201 1.711.201 2.592 0 6.49-3.656 12.122-9.015 14.964-5.36-2.842-9.016-8.474-9.016-14.964zm13.133 1.812a.541.541 0 010 .759l-4.04 4.04-.76.759a.542.542 0 01-.758 0l-.76-.76-2.02-2.02a.541.541 0 010-.758l.76-.76a.541.541 0 01.758 0l1.641 1.647 3.66-3.666a.542.542 0 01.76 0l.759.759z" fill="#34974A"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.036 10.396c0-.88.072-1.744.203-2.592 0 0 6.346-.741 8.797-3.165 2.649 2.35 8.83 3.165 8.83 3.165.127.848.201 1.711.201 2.592 0 6.49-3.656 12.122-9.015 14.964-5.36-2.842-9.016-8.474-9.016-14.964zm13.133 1.812a.541.541 0 010 .759l-4.04 4.04-.76.759a.542.542 0 01-.758 0l-.76-.76-2.02-2.02a.541.541 0 010-.758l.76-.76a.541.541 0 01.758 0l1.641 1.647 3.66-3.666a.542.542 0 01.76 0l.759.759z" fill="url(#paint1_linear)"></path><defs><linearGradient id="paint0_linear" x1="13.052" y1="0" x2="13.052" y2="30" gradientUnits="userSpaceOnUse"><stop stop-opacity="0"></stop><stop offset="1" stop-opacity=".2"></stop></linearGradient><linearGradient id="paint1_linear" x1="13.052" y1="4.639" x2="13.052" y2="25.36" gradientUnits="userSpaceOnUse"><stop stop-opacity=".25"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"></stop></linearGradient></defs>',5)],q5e={key:6,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},V5e=[Ue("circle",{cx:"25",cy:"25",r:"25",fill:"#25ae88"},null,-1),Ue("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)],H5e={key:7,xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",fill:"none"},j5e=[Ue("path",{d:"M5.516 4l2.275-2.274a.715.715 0 000-1.011L7.285.209a.715.715 0 00-1.01 0L4 2.484 1.726.209a.715.715 0 00-1.011 0L.209.715a.715.715 0 000 1.01L2.484 4 .209 6.274a.715.715 0 000 1.011l.506.506c.279.279.732.279 1.01 0L4 5.516l2.274 2.275c.28.279.732.279 1.011 0l.506-.506a.715.715 0 000-1.01L5.516 4z",fill:"#FEFEFE"},null,-1)],Fa=st({__name:"CustomIcon",props:{icon:{}},setup(e){const t=e;return(r,n)=>t.icon==="back"?(me(),Fe("svg",B5e,k5e)):t.icon==="close"?(me(),Fe("svg",N5e,O5e)):t.icon==="error"?(me(),Fe("svg",R5e,P5e)):t.icon==="eye"?(me(),Fe("svg",F5e,L5e)):t.icon==="eye-slash"?(me(),Fe("svg",D5e,$5e)):t.icon==="shield"?(me(),Fe("svg",z5e,U5e)):t.icon==="success"?(me(),Fe("svg",q5e,V5e)):t.icon==="times"?(me(),Fe("svg",H5e,j5e)):et("",!0)}}),bIe="",_Ie="",K5e=st({__name:"FinalResponse",props:{longMessage:{default:""},message:{default:""},oneSiteFlow:{type:Boolean,default:!1},retryButton:{type:Boolean,default:!1},type:{default:"error"}},emits:["accept","retry"],setup(e,{emit:t}){const r=e,{t:n}=yi();return(a,i)=>(me(),Fe("div",{class:Te(a.$style["final-response-container"])},[Ue("div",{class:Te(a.$style["icon-container"])},[ht(Fa,{icon:r.type},null,8,["icon"])],2),Ue("h2",{class:Te(a.$style["final-response-message"])},ot(r.message),3),Ue("p",{class:Te(a.$style["final-response-message"])},ot(r.longMessage),3),r.oneSiteFlow?et("",!0):(me(),Qe(W(Xr),{key:0,onClick:i[0]||(i[0]=o=>t("accept"))},{default:rt(()=>[br(ot(W(n)("common.accept")),1)]),_:1})),r.retryButton?(me(),Qe(W(Xr),{key:1,onClick:i[1]||(i[1]=o=>t("retry"))},{default:rt(()=>[br(ot(W(n)("common.retry")),1)]),_:1})):et("",!0)],2))}}),W5e={"final-response-container":"pb-w-sync_final-response-container","icon-container":"pb-w-sync_icon-container","final-response-message":"pb-w-sync_final-response-message"},Fn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},uF=Fn(K5e,[["__cssModules",{$style:W5e}]]),EIe="",xIe="",SIe="",MIe="",CIe="",TIe="",AIe="",IIe="",BIe="",kIe="",G5e=Fn(st({__name:"InstitutionFilters",props:{countryId:{},filteredCountries:{},filteredOrganizationTypes:{},showCountries:{type:Boolean},organizationTypeId:{},selectClass:{}},emits:["update:countryId","update:organizationTypeId"],setup(e,{emit:t}){const r=e,{t:n}=yi();function a(o){dr("open_country",{id_country:o}),t("update:countryId",o)}function i(o){dr("open_site_organization_type",{id_site_organization_type:o}),t("update:organizationTypeId",o)}return(o,l)=>(me(),Fe("div",null,[Ue("div",{class:Te(o.$style["widget-country"])},[o.showCountries?(me(),Qe(W(xm),{key:0,value:r.countryId,"popper-class":r.selectClass,onChange:a},{default:rt(()=>[(me(!0),Fe(wt,null,jn(o.filteredCountries,f=>(me(),Qe(W(Sm),{key:f.id_country,value:f.id_country,label:f.name},null,8,["value","label"]))),128))]),_:1},8,["value","popper-class"])):et("",!0)],2),ht(W(rF),{class:Te(o.$style["organization-types-list"]),"default-active":r.organizationTypeId,onSelect:l[0]||(l[0]=f=>i(f))},{default:rt(()=>[(me(!0),Fe(wt,null,jn(o.filteredOrganizationTypes,f=>(me(),Qe(W(nF),{key:f.id_site_organization_type,index:f.id_site_organization_type},{default:rt(()=>[br(ot(W(n)(`common.${f.label}`)),1)]),_:2},1032,["index"]))),128))]),_:1},8,["class","default-active"])]))}}),[["__cssModules",{$style:{"organization-types-list":"pb-w-sync_organization-types-list","widget-country":"pb-w-sync_widget-country"}}]]),Z5e=["onClick"],Y5e=["alt","src"],J5e={key:1},cF=Fn(st({__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=At(ta),{t:a}=yi();let i=0;ir(()=>{r.items.length>0&&r.showLogo&&(i=0,n("images-loading"))}),ut(()=>r.items,f=>{f.length>0&&r.showLogo&&(i=0,n("images-loading"))});function o(){i++,i===r.items.length&&n("images-loaded")}function l(f){t("select",f)}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["organization-sites-container"])},[f.showPlaidSitesButton?(me(),Fe("div",{key:0,class:Te(f.$style["widget-plaid-container"])},[ht(W(Xr),{type:"primary",onClick:u[0]||(u[0]=()=>W(n)("__internal__.plaid-sites-clicked"))},{default:rt(()=>[br(ot(W(a)("common.find_your_institution")),1)]),_:1})],2)):(me(),Fe(wt,{key:1},[Ue("h2",null,ot(W(a)("common.choose_institution")),1),Ue("div",{class:Te(f.$style["organization-sites"])},[(me(!0),Fe(wt,null,jn(f.items,(d,m)=>(me(),Fe("button",{key:`${d.id_site_organization}-${m}`,class:Te(f.$style["organization-button"]),type:"button",onClick:()=>l(d)},[f.showLogo?(me(),Fe("img",{key:0,alt:d.name,src:`${f.assetsPath}${d.small_cover}`,onLoad:o},null,40,Y5e)):(me(),Fe("span",J5e,ot(d.name),1))],10,Z5e))),128))],2)],64))],2))}}),[["__cssModules",{$style:{"organization-sites-container":"pb-w-sync_organization-sites-container","widget-plaid-container":"pb-w-sync_widget-plaid-container","organization-sites":"pb-w-sync_organization-sites","organization-button":"pb-w-sync_organization-button"}}]]),X5e=["for"],Q5e=["accept","name"],eCe=Fn(st({__name:"FileInput",props:{credential:{},displayError:{type:Boolean},idSite:{}},emits:["input"],setup(e,{emit:t}){const r=e,n=Re(null),a=Re(null),i=Re(!1),o=Ee(()=>i.value&&!a.value);ut(()=>r.displayError,v=>{v&&(i.value=!0)});function l(v){const y=new FileReader;y.onload=_=>{a.value={file:_.target.result,info:{type:v.type,name:v.name}},t("input",_.target.result)},y.readAsDataURL(v)}function f(v){v.preventDefault(),v.dataTransfer.files[0]&&l(v.dataTransfer.files[0])}function u(v){const y=v.srcElement.value;v.preventDefault(),v.stopPropagation(),y.length>0&&l(v.target.files[0])}function d(v){v.stopPropagation(),v.preventDefault(),setTimeout(()=>{i.value=!0},2e3)}function m(v){v.preventDefault(),n.value.click(),setTimeout(()=>{i.value=!0},5e3)}return(v,y)=>(me(),Fe("div",{class:Te(v.$style["upload-document"])},[Ue("label",{class:Te(v.$style["upload-document-label"]),for:`${r.idSite}[${r.credential.name}]`},ot(r.credential.label),11,X5e),Ue("div",{class:Te([v.$style["upload-document-input"],{[v.$style["upload-document-input-error"]]:o.value}]),onClick:y[0]||(y[0]=_=>m(_)),onDrop:y[1]||(y[1]=_=>f(_)),onDragover:y[2]||(y[2]=_=>d(_))},[Ue("button",{class:Te(v.$style["upload-document-button"])},ot(v.$t("file.choose")),3),Ue("span",{class:Te(v.$style["upload-document-name"])},ot(a.value?a.value.info.name:v.$t("file.no_chosen")),3)],34),o.value?(me(),Fe("div",{key:0,class:Te(v.$style["upload-document-required-error"])},ot(r.credential.label)+" "+ot(v.$t("file.required")),3)):et("",!0),Ue("input",{ref_key:"fileInput",ref:n,type:"file","data-testid":"file-input",accept:r.credential.accept,style:{position:"absolute",left:"-99999999px"},name:`${r.idSite}[${r.credential.name}]`,onClick:y[3]||(y[3]=_=>_.stopPropagation()),onChange:y[4]||(y[4]=_=>u(_))},null,40,Q5e)],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-input-error":"pb-w-sync_upload-document-input-error","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"}}]]),UIe="",qIe="",VIe="",HIe="",tCe=["src"],rCe={class:"el-form-item__error"},hF=Fn(st({__name:"SiteForm",props:{assetsPath:{default:"https://s.paybook.com"},buttonDisabledStyle:{type:Boolean,default:!1},disableFormAutocomplete:{type:Boolean,default:!1},errorMessage:{default:null},hideBackButton:{type:Boolean,default:!1},loaderMessage:{default:""},oneSiteFlow:{type:Boolean,default:!1},selectClass:{default:""},showLogo:{type:Boolean,default:!0},showPasswordStyle:{default:"icon"},site:{},testMode:{type:Boolean,default:!1}},emits:["back","error","success","valid"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),i=Re("0"),o=Re(!1);let l=Re({...n.site.config.version===1?n.site.data:n.site.input[i.value].data}),f=Re(!0),u=Re(!1),d=Re(!1),m=0,v,y={};const _=Re(null),E=Re(null),C=Ee(()=>{switch(n.site.config.version){case 3:return n.site.config.input[i.value].fields;case 1:return n.site.config.credentials;default:return null}}),T=Ee(()=>{switch(n.site.config.version){case 3:return n.site.input[i.value].rules;case 1:return n.site.rules;default:return null}}),I=Ee(()=>n.site.config.version===3?n.site.config.input.length>1:!1),{t:k}=yi();fn(()=>{clearTimeout(v)}),ir(()=>{n.showLogo&&a("images-loading"),z(),M(),n.site.on("status-update",s=>{s==="loading"?o.value=!0:o.value=!1})});function N(){r("back")}function O(s){return!!l.value[s]}function P(){clearTimeout(v),n.testMode&&(m<2?(m+=1,v=setTimeout(()=>{m=0},500)):(n.site.toggleTestMode(),m=0))}function z(){_.value[0].focus()}function V(){a("images-loaded")}function L(s){n.site.updateData(Number.parseInt(s),l.value),i.value=s,l.value={...n.site.input[i.value].data},kt(()=>{z()})}function U(){let s;f.value?d.value=!0:(r("valid"),a("submitted"),n.site.config.version===1?s=n.site.connect(l.value):s=n.site.connect(Number.parseInt(i.value),l.value),s.then(h=>(r("success",h),n.site.config.request||a("updated",n.site.response),h)).catch(h=>{r("error",h)}))}function M(s,h){s&&(y[s]=h),f.value=Object.keys(T.value).reduce((p,g)=>T.value[g].length===0?p:p||!y[g],!1)}return t({siteForm:E}),(s,h)=>(me(),Fe("div",{class:Te(s.$style["site-form"])},[tn(Ue("div",{class:Te(s.$style["widget-form-loader"])},null,2),[[vi,o.value],[W(Mf),o.value&&{text:n.loaderMessage}]]),Ue("div",{class:Te(s.$style["site-header-form"])},[n.site.testMode?(me(),Qe(W(N6e),{key:0,center:"",closable:!1,effect:"dark"},{default:rt(()=>[br(ot(W(k)("common.test_mode")),1)]),_:1})):et("",!0),n.showLogo?(me(),Fe("img",{key:1,alt:"",class:Te(s.$style["site-cover"]),src:`${n.assetsPath}${n.site.config.organizationSite.cover}`,onLoad:V},null,42,tCe)):et("",!0),Ue("h2",{onClick:P},ot(n.site.config.name),1)],2),n.errorMessage?(me(),Fe("div",{key:0,class:Te(s.$style["auth-error"])},[Ue("h3",null,ot(n.errorMessage.short),1),Ue("p",null,ot(n.errorMessage.long),1)],2)):et("",!0),I.value?(me(),Qe(W(rF),{key:1,"default-active":"0",mode:"horizontal",onSelect:L},{default:rt(()=>[(me(!0),Fe(wt,null,jn(n.site.config.input,(p,g)=>(me(),Qe(W(nF),{key:g,index:`${g}`},{default:rt(()=>[br(ot(p.label),1)]),_:2},1032,["index"]))),128))]),_:1})):et("",!0),ht(W(wP),{ref_key:"siteForm",ref:E,"label-position":"top",disabled:o.value,model:W(l),rules:T.value,autocomplete:n.disableFormAutocomplete?"off":"on",name:`${n.site.config.id_site}`,onSubmit:Cn(U,["prevent"]),onValidate:M},{default:rt(()=>[(me(!0),Fe(wt,null,jn(C.value,(p,g)=>(me(),Fe(wt,{key:`${g}-${p.name}`},[p.type==="file"?(me(),Qe(eCe,{ref_for:!0,ref_key:"firstInput",ref:_,key:`${g}-${p.name}`,credential:p,"display-error":W(d),"id-site":n.site.config.id_site,onInput:b=>{W(l)[p.name]=b,M(p.name,!0)}},null,8,["credential","display-error","id-site","onInput"])):(me(),Qe(W(E3),{key:1,label:p.label,prop:p.name,for:`${n.site.config.id_site}[${p.name}]`},{error:rt(({error:b})=>[Ue("div",rCe,ot(W(k)(`form_errors.${b}`,{label:p.label})),1)]),default:rt(()=>[p.type==="text"||p.type==="password"?(me(),Qe(W(dm),{key:0,ref_for:!0,ref_key:"firstInput",ref:_,modelValue:W(l)[p.name],"onUpdate:modelValue":b=>W(l)[p.name]=b,"data-testid":"site-input",autocomplete:p.name==="password"?`${n.site.config.id_site} new-password`:n.disableFormAutocomplete?"off":`${n.site.config.id_site} ${p.name}`,name:`${n.site.config.id_site}[${p.name}]`,type:p.type==="password"&&W(u)?"text":p.type},kw({_:2},[p.type==="password"&&n.showPasswordStyle==="icon"?{name:"append",fn:rt(()=>[ht(W(Xr),{class:Te(s.$style["icon-eye"]),onClick:h[0]||(h[0]=()=>{hr(u)?u.value=!W(u):u=!W(u)})},{default:rt(()=>[W(u)?(me(),Qe(Fa,{key:1,icon:"eye-slash"})):(me(),Qe(Fa,{key:0,icon:"eye"}))]),_:1},8,["class"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","autocomplete","name","type"])):et("",!0),p.type==="select"?(me(),Qe(W(xm),{key:1,ref_for:!0,ref_key:"firstInput",ref:_,modelValue:W(l)[p.name],"onUpdate:modelValue":b=>W(l)[p.name]=b,"data-testid":"site-select","popper-class":n.selectClass,autocomplete:n.disableFormAutocomplete?"off":`${n.site.config.id_site} ${p.name}`},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),Qe(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","popper-class","autocomplete"])):et("",!0)]),_:2},1032,["label","prop","for"])),p.type==="password"&&n.showPasswordStyle==="text"&&O(p.name)?(me(),Qe(W(Xr),{key:`${g} -${p.name} -toggle`,class:Te(s.$style["show-hide"]),onClick:h[1]||(h[1]=()=>{hr(u)?u.value=!W(u):u=!W(u)})},{default:rt(()=>[br(ot(W(k)(`common.${W(u)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):et("",!0)],64))),128)),Ue("div",{class:Te(s.$style["button-container"])},[n.hideBackButton?et("",!0):(me(),Qe(W(Xr),{key:0,"data-testid":"site-back",class:Te({[s.$style["one-site-flow-back"]]:n.oneSiteFlow}),"native-type":"button",onClick:N},{default:rt(()=>[br(ot(W(k)("common.back")),1)]),_:1},8,["class"])),ht(W(Xr),{"data-testid":"site-button",disabled:n.buttonDisabledStyle&&W(f),type:"primary","native-type":"submit"},{default:rt(()=>[br(ot(W(k)("common.next")),1)]),_:1},8,["disabled"])],2)]),_:1},8,["disabled","model","rules","autocomplete","name","onSubmit"]),Ue("div",{class:Te(s.$style["secure-message-wrapper"])},[Ue("div",{class:Te(s.$style["secure-message-container"])},[ht(Fa,{icon:"shield"}),Ue("p",null,ot(W(k)("common.secure_message")),1)],2)],2)],2))}}),[["__cssModules",{$style:{"auth-error":"pb-w-sync_auth-error","icon-eye":"pb-w-sync_icon-eye","one-site-flow-back":"pb-w-sync_one-site-flow-back","show-hide":"pb-w-sync_show-hide","site-form":"pb-w-sync_site-form","site-header-form":"pb-w-sync_site-header-form","site-cover":"pb-w-sync_site-cover","secure-message-container":"pb-w-sync_secure-message-container","secure-message-wrapper":"pb-w-sync_secure-message-wrapper","button-container":"pb-w-sync_button-container","widget-form-loader":"pb-w-sync_widget-form-loader"}}]]),nCe=["onClick"],iCe=["src"],dF=Fn(st({__name:"SitesList",props:{assetsPath:{},items:{},showLogo:{type:Boolean}},emits:["back","select"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i=0;ir(()=>{r.items.length>1&&r.showLogo&&(i=0,n("images-loading"))});function o(){i++,i===r.items.length&&r.items.length>1&&n("images-loaded")}function l(f){t("select",f)}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["sites-container"])},[Ue("h2",null,ot(W(a)("common.choose_institution")),1),Ue("div",{class:Te(f.$style.sites)},[(me(!0),Fe(wt,null,jn(f.items,(d,m)=>(me(),Fe("button",{key:`${d.id_site}-${m}`,type:"button",onClick:()=>l(d)},[Ue("div",{class:Te(f.$style["site-inner"])},[f.showLogo?(me(),Fe("div",{key:0,class:Te(f.$style.avatar)},[Ue("img",{alt:"",src:`${f.assetsPath}${d.organizationSite.avatar}`,onLoad:o},null,40,iCe)],2)):et("",!0),Ue("span",{class:Te(f.$style["site-name"])},ot(d.name),3)],2)],8,nCe))),128))],2),ht(W(Xr),{onClick:u[0]||(u[0]=()=>t("back"))},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})],2))}}),[["__cssModules",{$style:{"sites-container":"pb-w-sync_sites-container",sites:"pb-w-sync_sites","site-inner":"pb-w-sync_site-inner",avatar:"pb-w-sync_avatar","site-name":"pb-w-sync_site-name"}}]]),pF=Fn(st({__name:"TheModal",props:{mobile:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(e,{emit:t}){const r=e,n=At(ta);function a(){dr("close"),t("update:visible",!1),n("closed")}return(i,o)=>tn((me(),Fe("div",{class:Te(i.$style["modal-container"])},[Ue("div",{class:Te(i.$style["modal-overlay-backdrop"]),onClick:a},null,2),Ue("div",{class:Te(i.$style["modal-wrapper"])},[Ue("div",{class:Te([i.$style.modal,{[i.$style["is-mobile"]]:r.mobile}])},[Ot(i.$slots,"default")],2)],2)],2)),[[vi,i.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"}}]]),aCe=["onClick"],oCe=["src"],sCe=Fn(st({__name:"MultipleImages",props:{credential:{default:()=>({type:"options",name:"token",label:"Por favor, revisa las imágenes que se te presentan y selecciona la correcta",options:[]})},modelValue:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=At(ta);let a=0;const i=Ee(()=>{const f=Math.sqrt(r.credential.options.length);return f%1===0?[f,f]:o(Math.floor(f))});ir(()=>{n("images-loading")});function o(f){if(r.credential.options.length%f===0){const u=r.credential.options.length/f;return[f,u]}return o(f-1)}function l(){a++,a===r.credential.options.length&&n("images-loaded")}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["multiple-images-container"])},[Ue("div",{class:Te(f.$style["multiple-images-wrapper"])},[(me(!0),Fe(wt,null,jn(i.value[0],d=>(me(),Fe("div",{key:d,class:Te(f.$style["credential-options-row"])},[(me(!0),Fe(wt,null,jn(i.value[1],m=>(me(),Fe("div",{key:m,class:Te([f.$style["credential-options-col"],{[f.$style.selected]:f.modelValue===f.credential.options[m-1+(d-1)*i.value[1]].value}]),onClick:v=>t("update:modelValue",f.credential.options[m-1+(d-1)*i.value[1]].value)},[Ue("img",{class:Te(f.$style["credental-options-img"]),src:f.credential.options[m-1+(d-1)*i.value[1]].imgBase64File||f.credential.options[m-1+(d-1)*i.value[1]].imgURL,onLoad:l},null,42,oCe)],10,aCe))),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"}}]]),lCe={key:0},fCe=["src"],uCe={key:1},cCe=["src","onLoad"],H3=Fn(st({__name:"TwofaForm",props:{buttonDisabledStyle:{type:Boolean},disableFormAutocomplete:{type:Boolean},enableBackNavigation:{type:Boolean},loaderMessage:{},selectClass:{},showPasswordStyle:{},twofa:{}},emits:["back","error"],setup(e,{emit:t}){const r=e,n=At(ta),a=At(tw),i=Re({}),o=Re({...r.twofa.data}),l=Re({}),f=Re([]),u=Re(!1);let d=0,m=!0,v=!1,y={};const _=Ee(()=>r.twofa.config.twofa.reduce((s,h)=>h.imgBase64File?s+1:s,0)),E=Re(null),C=Re(null);function T(){r.twofa.defineRules(a),z(),r.twofa.on("loading",()=>{u.value=!0}),r.twofa.on("token-received",()=>{o.value={...r.twofa.data}})}ir(()=>{r.twofa.on("twofa-device-error",s=>{t("error",s)}),_.value&&n("images-loading"),O(),M(),r.twofa.config.twofa.forEach(s=>{["connection","challenge"].includes(s.type)&&M(s.name,!0)})});function I(s){return l.value[s]||{}}function k(s){return!!o[s]}function N(s){const h=f.value[s];h&&(l.value={...l.value,[s]:{width:`${h.naturalWidth}px`}},kt(P))}function O(){E.value&&E.value[0].focus()}function P(){d++,d===_.value&&n("images-loaded")}function z(){const s={};r.twofa.config.twofa&&r.twofa.config.twofa.length&&r.twofa.config.twofa.forEach(h=>{h.type==="accounts"&&(s[h.name]=[])}),i.value=s}function V(s){return["text","password","textOptions","accounts","options"].includes(s)}function L(s){o.value={...o.value,[s]:i.value[s].join()}}function U(){C.value.validate(s=>{s&&(n("submitted"),r.twofa.authenticate({...o.value}).then(h=>h).catch(h=>{t("error",h)}))})}function M(s,h){s&&(y[s]=h),m=Object.getOwnPropertyNames(r.twofa.rules).reduce((p,g)=>g==="__ob__"||r.twofa.rules[g].length===0?p:p||!y[g],!1)}return T(),(s,h)=>(me(),Fe("div",{class:Te(s.$style["twofa-form"])},[u.value?tn((me(),Fe("div",{key:0,class:Te(s.$style["widget-form-loader"])},null,2)),[[W(Mf),{text:r.loaderMessage}]]):et("",!0),r.twofa?(me(),Qe(W(wP),{key:1,ref_key:"twofaForm",ref:C,"label-position":"top",disabled:u.value,model:o.value,rules:r.twofa.rules,name:`twofa-${r.twofa.config.id_site}`,autocomplete:r.disableFormAutocomplete?"off":"on",onSubmit:Cn(U,["prevent"]),onValidate:M},{default:rt(()=>[(me(!0),Fe(wt,null,jn(r.twofa.config.twofa,(p,g)=>(me(),Fe(wt,{key:`${g}-${p.name}`},[p.type==="externalAction"?(me(),Fe("div",lCe,[Ue("label",{class:Te(s.$style["external-action-label"])},ot(p.label),3),Ue("div",{class:Te(s.$style["external-action-img-container"])},[p.imgBase64File?(me(),Fe("img",{key:0,alt:"",src:p.imgBase64File,onLoad:P},null,40,fCe)):et("",!0)],2)])):p.type==="instructions"?(me(),Fe("div",uCe,[Ue("label",{class:Te(s.$style["external-action-label"])},ot(p.label),3)])):p.type!=="connection"&&p.type!=="challenge"?(me(),Qe(W(E3),{key:2,label:p.label,prop:p.name,for:`twofa-${r.twofa.config.id_site}[${p.name}]`},{default:rt(()=>[p.imgBase64File?(me(),Fe("img",{key:0,ref_for:!0,ref_key:"imageWithoutSize",ref:f,src:p.imgBase64File,class:Te(s.$style["input-image"]),style:on(I(g)),alt:"",onLoad:b=>N(g)},null,46,cCe)):et("",!0),V(p.type)?(me(),Qe(W(dm),{key:1,ref_for:!0,ref:g===0&&"firstInput",modelValue:o.value[p.name],"onUpdate:modelValue":b=>o.value[p.name]=b,"data-testid":"twofa-input",name:`twofa-${r.twofa.config.id_site}[${p.name}]`,autocomplete:p.name==="password"?`${r.twofa.config.id_site} new-password`:r.disableFormAutocomplete?"off":`${r.twofa.config.id_site} ${p.name}`,disabled:p.disabled,type:p.type==="password"&&W(v)?"text":p.type},kw({_:2},[p.type==="password"&&r.showPasswordStyle==="icon"?{name:"append",fn:rt(()=>[ht(W(Xr),{class:Te(s.$style["icon-eye-twofa"]),onClick:h[0]||(h[0]=()=>{hr(v)?v.value=!W(v):v=!W(v)})},{default:rt(()=>[W(v)?(me(),Qe(Fa,{key:1,icon:"eye-slash"})):(me(),Qe(Fa,{key:0,icon:"eye"}))]),_:1},8,["class"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","name","autocomplete","disabled","type"])):et("",!0),p.type==="textOptions"?(me(),Qe(W(xm),{key:2,ref_for:!0,ref:g===0&&"firstInput",modelValue:o.value[p.name],"onUpdate:modelValue":b=>o.value[p.name]=b,"data-testid":"twofa-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${p.name}`,name:`twofa-${r.twofa.config.id_site}[${p.name}]`,"popper-class":r.selectClass},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),Qe(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class"])):et("",!0),p.type==="accounts"?(me(),Qe(W(xm),{key:3,ref_for:!0,ref:g===0&&"firstInput",modelValue:i.value[p.name],"onUpdate:modelValue":b=>i.value[p.name]=b,"data-testid":"twofa-multi-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${p.name}`,filterable:"",multiple:"",name:`twofa-${r.twofa.config.id_site}[${p.name}]`,"popper-class":r.selectClass,onChange:()=>L(p.name)},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),Qe(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class","onChange"])):et("",!0),p.type==="options"?(me(),Qe(sCe,{key:4,modelValue:o.value[p.name],"onUpdate:modelValue":[b=>o.value[p.name]=b,()=>{M(p.name,!0)}],credential:p},null,8,["modelValue","onUpdate:modelValue","credential"])):et("",!0)]),_:2},1032,["label","prop","for"])):et("",!0),p.type==="password"&&r.showPasswordStyle==="text"&&k(p.name)?(me(),Qe(W(Xr),{key:`${g}-${p.name}-toggle`,class:Te(s.$style["show-hide"]),onClick:h[1]||(h[1]=()=>{hr(v)?v.value=!W(v):v=!W(v)})},{default:rt(()=>[br(ot(W(a)(`common.${W(v)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):et("",!0)],64))),128)),Ue("div",{class:Te(s.$style["twofa-buttons"])},[r.enableBackNavigation?(me(),Qe(W(Xr),{key:0,"native-type":"button","data-testid":"twofa-back",onClick:h[2]||(h[2]=()=>{t("back")})},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})):et("",!0),r.twofa.displaySubmitButton?(me(),Qe(W(Xr),{key:1,disabled:r.buttonDisabledStyle&&W(m),"data-testid":"twofa-button","native-type":"submit",type:"primary"},{default:rt(()=>[br(ot(W(a)("common.next")),1)]),_:1},8,["disabled"])):et("",!0)],2)]),_:1},8,["disabled","model","rules","name","autocomplete","onSubmit"])):et("",!0)],2))}}),[["__cssModules",{$style:{"icon-eye-twofa":"pb-w-sync_icon-eye-twofa","input-image":"pb-w-sync_input-image","show-hide":"pb-w-sync_show-hide","twofa-form":"pb-w-sync_twofa-form","twofa-buttons":"pb-w-sync_twofa-buttons","widget-form-loader":"pb-w-sync_widget-form-loader","external-action-img-container":"pb-w-sync_external-action-img-container","external-action-label":"pb-w-sync_external-action-label"}}]]),hCe=["src"],dCe=[Ue("div",{class:"pb-w-sync_widget-avatar-loader"},null,-1)],pCe=st({__name:"AvatarLoader",props:{avatar:{default:""},showAvatar:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!0}},emits:["imagesLoaded","imagesLoading"],setup(e,{emit:t}){const r=e;return ir(()=>{r.showAvatar&&t("imagesLoading")}),(n,a)=>n.showAvatar||n.showLoader?(me(),Fe("div",{key:0,class:Te(n.$style["widget-avatar-container"])},[n.showAvatar?(me(),Fe("div",{key:0,class:Te(n.$style["widget-avatar-inner"])},[Ue("div",{class:Te(n.$style["widget-avatar-mask"])},[Ue("img",{alt:"",src:n.avatar,onLoad:a[0]||(a[0]=()=>t("imagesLoaded"))},null,40,hCe)],2)],2)):et("",!0),n.showLoader?(me(),Fe("div",{key:1,class:Te(n.$style["widget-avatar-loader-container"])},dCe,2)):et("",!0)],2)):et("",!0)}}),vCe={"widget-avatar-container":"pb-w-sync_widget-avatar-container","widget-avatar-inner":"pb-w-sync_widget-avatar-inner","widget-avatar-mask":"pb-w-sync_widget-avatar-mask","widget-avatar-loader-container":"pb-w-sync_widget-avatar-loader-container"},c7e="",mCe=Fn(pCe,[["__cssModules",{$style:vCe}]]);function vF(){const e=Re(!1);function t(){kt(()=>{e.value=rh.device.type==="mobile"||window.innerWidth<600})}return ir(()=>{t(),window.addEventListener("resize",t)}),bh(()=>window.removeEventListener("resize",t)),{mobile:e}}const d7e="",Gt=Fn(st({__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 O,P,z;const r=e;un(ta,r.rootEmit),un(tw,r.t);let n=Re(r.initLongMessage||((O=r.messagesUpdater)==null?void 0:O.getMessages().long)||""),a=Re(r.initMessage||((P=r.messagesUpdater)==null?void 0:P.getMessages().short)||""),i=null,o=Re(r.displayLongDescription||!1),l=Re(!1),f=Re((z=r.item)==null?void 0:z.status),u=Re(r.item&&(r.item.config||r.item.request)?r.item.config?r.item.config.name:r.item.request.description:r.initTitle);const{mobile:d}=vF(),m=Ee(()=>r.item&&r.item.config?`${r.assetsPath}${r.item.config.avatar}`:""),v=Ee(()=>r.item?d.value?f.value==="twofa":(f.value==="twofa"||f.value==="twofa-loading")&&!r.hideForm:!1),y=Ee(()=>r.item?r.type==="info"&&f.value!=="twofa":r.type==="info"),_=Ee(()=>r.item?f.value!=="twofa-loading":!0);function E(){r.messagesUpdater&&r.messagesUpdater.subscribe(()=>{const V=r.messagesUpdater.getMessages();n.value=V.long,a.value=V.short}),r.item&&(r.item.on("twofa",()=>{f.value="twofa",l.value=!0}),r.item.on("twofa-loading",()=>{f.value="twofa-loading",l.value=!1}))}ir(()=>{kt(()=>{r.type!=="info"&&d.value&&(l.value=!0,I())})});function C(){clearTimeout(i)}function T(){return Math.round(r.duration*.75)}function I(){d.value&&r.duration>0&&(i=setTimeout(()=>{l.value=!1},T()))}function k(){r.type!=="info"&&d.value&&(l.value=!l.value,C())}function N(){o.value=!o.value}return E(),(V,L)=>(me(),Fe("div",null,[Ue("div",{class:Te([V.$style["site-indentifier"],{[V.$style["is-mobile"]]:W(d)}]),onClick:k,onMouseleave:I},[ht(mCe,{avatar:m.value,"show-avatar":V.showLogo||W(d),"show-loader":y.value,onImagesLoaded:L[0]||(L[0]=()=>t("imagesLoaded")),onImagesLoading:L[1]||(L[1]=()=>t("imagesLoading"))},null,8,["avatar","show-avatar","show-loader"]),!W(d)||W(l)?(me(),Fe("div",{key:0,class:Te([V.$style["site-identifier-description"],{[V.$style["with-loader"]]:y.value||V.showLogo}])},[Ue("span",{class:Te([V.$style["site-name"],V.$style[r.type]])},ot(W(u)),3),_.value?(me(),Fe("p",{key:0,class:Te(V.$style["site-identifier-message"])},ot(W(a)),3)):et("",!0),W(o)?(me(),Fe("p",{key:1,class:Te(V.$style["site-identifier-long-message"])},ot(W(n)),3)):et("",!0),r.type!=="info"?(me(),Fe("div",{key:2,class:Te(V.$style["widget-notification-show-more-container"])},[W(n)?(me(),Qe(W(kMe),{key:0,type:"primary",onClick:Cn(N,["stop"])},{default:rt(()=>[br(ot(r.t("common.show",{msg:r.t(`common.${W(o)?"less":"more"}`)})),1)]),_:1},8,["onClick"])):et("",!0)],2)):et("",!0)],2)):et("",!0)],34),v.value?(me(),Fe("div",{key:0,class:Te(V.$style["notification-form"])},[ht(H3,{"button-disabled-style":V.buttonDisabledStyle,"disable-form-autocomplete":V.disableFormAutocomplete,"enable-back-navigation":V.enableBackNavigation,"loader-message":W(a),"select-class":V.selectClass,"show-password-style":V.showPasswordStyle,twofa:r.item.twofa,onBack:L[2]||(L[2]=()=>t("back")),onError:L[3]||(L[3]=U=>t("error",U))},null,8,["button-disabled-style","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-password-style","twofa"])],2)):et("",!0)]))}}),[["__cssModules",{$style:{"site-indentifier":"pb-w-sync_site-indentifier","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","is-mobile":"pb-w-sync_is-mobile","widget-avatar-container":"pb-w-sync_widget-avatar-container","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container","notification-form":"pb-w-sync_notification-form"}}]]),gCe=Ue("div",null,null,-1),mF=Fn(st({__name:"UnauthorizedNotification",props:{initMessage:{default:""},initTitle:{default:""},refreshTokenFunction:{},t:{}},emits:["closed","closeNotification","refreshToken","refreshTokenError"],setup(e,{emit:t}){const r=e;let n=Re(!1);const{mobile:a}=vF();fn(()=>{t("closed")});function i(){n.value=!0,r.refreshTokenFunction().then(({token:o,strict:l})=>{if(typeof o!="string")throw new Error("Refresh token is not valid. Promise should return a valid token.");return new Promise(f=>{t("refreshToken",{token:o,strict:l,resolve:f})})}).catch(()=>{t("refreshTokenError")}).finally(()=>{n.value=!1})}return(o,l)=>(me(),Fe("div",null,[Ue("div",{class:Te([o.$style["site-indentifier"],{[o.$style["is-mobile"]]:W(a)}])},[gCe,Ue("div",{class:Te([o.$style["site-identifier-description"],o.$style["with-loader"]])},[Ue("span",{class:Te([o.$style["site-name"],o.$style.error])},ot(r.initTitle),3),Ue("p",{class:Te(o.$style["site-identifier-message"])},ot(r.initMessage),3),Ue("div",{class:Te(o.$style["unauthorized-button-container"])},[tn((me(),Qe(W(Xr),{disabled:W(n),type:"primary",onClick:Cn(i,["stop"])},{default:rt(()=>[br(ot(r.t("common.refresh")),1)]),_:1},8,["disabled","onClick"])),[[W(Mf),W(n)]]),ht(W(Xr),{disabled:W(n),onClick:l[0]||(l[0]=Cn(()=>{t("closeNotification")},["stop"]))},{default:rt(()=>[br(ot(r.t("common.cancel")),1)]),_:1},8,["disabled"])],2)],2)],2)]))}}),[["__cssModules",{$style:{"site-indentifier":"pb-w-sync_site-indentifier","site-identifier-description":"pb-w-sync_site-identifier-description","with-loader":"pb-w-sync_with-loader","site-name":"pb-w-sync_site-name","site-identifier-message":"pb-w-sync_site-identifier-message","is-mobile":"pb-w-sync_is-mobile","unauthorized-icon-cotainer":"pb-w-sync_unauthorized-icon-cotainer","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container","unauthorized-icon":"pb-w-sync_unauthorized-icon","unauthorized-button-container":"pb-w-sync_unauthorized-button-container"}}]]);function gF(e,t){return function(){return e.apply(t,arguments)}}const{toString:yCe}=Object.prototype,{getPrototypeOf:j3}=Object,Tm=(e=>t=>{const r=yCe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Eo=e=>(e=e.toLowerCase(),t=>Tm(t)===e),Am=e=>t=>typeof t===e,{isArray:ec}=Array,rd=Am("undefined");function bCe(e){return e!==null&&!rd(e)&&e.constructor!==null&&!rd(e.constructor)&&ua(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yF=Eo("ArrayBuffer");function _Ce(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yF(e.buffer),t}const wCe=Am("string"),ua=Am("function"),bF=Am("number"),Im=e=>e!==null&&typeof e=="object",ECe=e=>e===!0||e===!1,Bm=e=>{if(Tm(e)!=="object")return!1;const t=j3(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xCe=Eo("Date"),SCe=Eo("File"),MCe=Eo("Blob"),CCe=Eo("FileList"),TCe=e=>Im(e)&&ua(e.pipe),ACe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ua(e.append)&&((t=Tm(e))==="formdata"||t==="object"&&ua(e.toString)&&e.toString()==="[object FormData]"))},ICe=Eo("URLSearchParams"),BCe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nd(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ec(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(n=0;n<o;n++)l=i[n],t.call(null,e[l],l,e)}}function _F(e,t){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 wF=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:wn)(),EF=e=>!rd(e)&&e!==wF;function K3(){const{caseless:e}=EF(this)&&this||{},t={},r=(n,a)=>{const i=e&&_F(t,a)||a;Bm(t[i])&&Bm(n)?t[i]=K3(t[i],n):Bm(n)?t[i]=K3({},n):ec(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&nd(arguments[n],r);return t}const kCe=(e,t,r,{allOwnKeys:n}={})=>(nd(t,(a,i)=>{r&&ua(a)?e[i]=gF(a,r):e[i]=a},{allOwnKeys:n}),e),NCe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),OCe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},RCe=(e,t,r,n)=>{let a,i,o;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&j3(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},PCe=(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},FCe=e=>{if(!e)return null;if(ec(e))return e;let t=e.length;if(!bF(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},LCe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&j3(Uint8Array)),DCe=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},$Ce=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},zCe=Eo("HTMLFormElement"),UCe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),xF=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),qCe=Eo("RegExp"),SF=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nd(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},VCe=e=>{SF(e,(t,r)=>{if(ua(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ua(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+"'")})}})},HCe=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return ec(e)?n(e):n(String(e).split(t)),r},jCe=()=>{},KCe=(e,t)=>(e=+e,Number.isFinite(e)?e:t),W3="abcdefghijklmnopqrstuvwxyz",MF="0123456789",CF={DIGIT:MF,ALPHA:W3,ALPHA_DIGIT:W3+W3.toUpperCase()+MF},WCe=(e=16,t=CF.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function GCe(e){return!!(e&&ua(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ZCe=e=>{const t=new Array(10),r=(n,a)=>{if(Im(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=ec(n)?[]:{};return nd(n,(o,l)=>{const f=r(o,a+1);!rd(f)&&(i[l]=f)}),t[a]=void 0,i}}return n};return r(e,0)},YCe=Eo("AsyncFunction"),Ze={isArray:ec,isArrayBuffer:yF,isBuffer:bCe,isFormData:ACe,isArrayBufferView:_Ce,isString:wCe,isNumber:bF,isBoolean:ECe,isObject:Im,isPlainObject:Bm,isUndefined:rd,isDate:xCe,isFile:SCe,isBlob:MCe,isRegExp:qCe,isFunction:ua,isStream:TCe,isURLSearchParams:ICe,isTypedArray:LCe,isFileList:CCe,forEach:nd,merge:K3,extend:kCe,trim:BCe,stripBOM:NCe,inherits:OCe,toFlatObject:RCe,kindOf:Tm,kindOfTest:Eo,endsWith:PCe,toArray:FCe,forEachEntry:DCe,matchAll:$Ce,isHTMLForm:zCe,hasOwnProperty:xF,hasOwnProp:xF,reduceDescriptors:SF,freezeMethods:VCe,toObjectSet:HCe,toCamelCase:UCe,noop:jCe,toFiniteNumber:KCe,findKey:_F,global:wF,isContextDefined:EF,ALPHABET:CF,generateString:WCe,isSpecCompliantForm:GCe,toJSONObject:ZCe,isAsyncFn:YCe,isThenable:e=>e&&(Im(e)||ua(e))&&ua(e.then)&&ua(e.catch)};function sr(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}Ze.inherits(sr,Error,{toJSON:function(){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:Ze.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const TF=sr.prototype,AF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{AF[e]={value:e}}),Object.defineProperties(sr,AF),Object.defineProperty(TF,"isAxiosError",{value:!0}),sr.from=(e,t,r,n,a,i)=>{const o=Object.create(TF);return Ze.toFlatObject(e,o,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),sr.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const JCe=null;function G3(e){return Ze.isPlainObject(e)||Ze.isArray(e)}function IF(e){return Ze.endsWith(e,"[]")?e.slice(0,-2):e}function BF(e,t,r){return e?e.concat(t).map(function(a,i){return a=IF(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function XCe(e){return Ze.isArray(e)&&!e.some(G3)}const QCe=Ze.toFlatObject(Ze,{},null,function(t){return/^is[A-Z]/.test(t)});function km(e,t,r){if(!Ze.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Ze.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,C){return!Ze.isUndefined(C[E])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&Ze.isSpecCompliantForm(t);if(!Ze.isFunction(a))throw new TypeError("visitor must be a function");function u(_){if(_===null)return"";if(Ze.isDate(_))return _.toISOString();if(!f&&Ze.isBlob(_))throw new sr("Blob is not supported. Use a Buffer instead.");return Ze.isArrayBuffer(_)||Ze.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):ge.Buffer.from(_):_}function d(_,E,C){let T=_;if(_&&!C&&typeof _=="object"){if(Ze.endsWith(E,"{}"))E=n?E:E.slice(0,-2),_=JSON.stringify(_);else if(Ze.isArray(_)&&XCe(_)||(Ze.isFileList(_)||Ze.endsWith(E,"[]"))&&(T=Ze.toArray(_)))return E=IF(E),T.forEach(function(k,N){!(Ze.isUndefined(k)||k===null)&&t.append(o===!0?BF([E],N,i):o===null?E:E+"[]",u(k))}),!1}return G3(_)?!0:(t.append(BF(C,E,i),u(_)),!1)}const m=[],v=Object.assign(QCe,{defaultVisitor:d,convertValue:u,isVisitable:G3});function y(_,E){if(!Ze.isUndefined(_)){if(m.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(_),Ze.forEach(_,function(T,I){(!(Ze.isUndefined(T)||T===null)&&a.call(t,T,Ze.isString(I)?I.trim():I,E,v))===!0&&y(T,E?E.concat(I):[I])}),m.pop()}}if(!Ze.isObject(e))throw new TypeError("data must be an object");return y(e),t}function kF(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Z3(e,t){this._pairs=[],e&&km(e,this,t)}const NF=Z3.prototype;NF.append=function(t,r){this._pairs.push([t,r])},NF.toString=function(t){const r=t?function(n){return t.call(this,n,kF)}:kF;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function eTe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OF(e,t,r){if(!t)return e;const n=r&&r.encode||eTe,a=r&&r.serialize;let i;if(a?i=a(t,r):i=Ze.isURLSearchParams(t)?t.toString():new Z3(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class tTe{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){Ze.forEach(this.handlers,function(n){n!==null&&t(n)})}}const RF=tTe,PF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rTe=typeof URLSearchParams<"u"?URLSearchParams:Z3,nTe=typeof FormData<"u"?FormData:null,iTe=typeof Blob<"u"?Blob:null,aTe=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),oTe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),La={isBrowser:!0,classes:{URLSearchParams:rTe,FormData:nTe,Blob:iTe},isStandardBrowserEnv:aTe,isStandardBrowserWebWorkerEnv:oTe,protocols:["http","https","file","blob","url","data"]};function sTe(e,t){return km(e,new La.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return La.isNode&&Ze.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function lTe(e){return Ze.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fTe(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 FF(e){function t(r,n,a,i){let o=r[i++];const l=Number.isFinite(+o),f=i>=r.length;return o=!o&&Ze.isArray(a)?a.length:o,f?(Ze.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!Ze.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&Ze.isArray(a[o])&&(a[o]=fTe(a[o])),!l)}if(Ze.isFormData(e)&&Ze.isFunction(e.entries)){const r={};return Ze.forEachEntry(e,(n,a)=>{t(lTe(n),a,r,0)}),r}return null}function uTe(e,t,r){if(Ze.isString(e))try{return(t||JSON.parse)(e),Ze.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Y3={transitional:PF,adapter:La.isNode?"http":"xhr",transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=Ze.isObject(t);if(i&&Ze.isHTMLForm(t)&&(t=new FormData(t)),Ze.isFormData(t))return a&&a?JSON.stringify(FF(t)):t;if(Ze.isArrayBuffer(t)||Ze.isBuffer(t)||Ze.isStream(t)||Ze.isFile(t)||Ze.isBlob(t))return t;if(Ze.isArrayBufferView(t))return t.buffer;if(Ze.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 sTe(t,this.formSerializer).toString();if((l=Ze.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return km(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),uTe(t)):t}],transformResponse:[function(t){const r=this.transitional||Y3.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&Ze.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?sr.from(l,sr.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:La.classes.FormData,Blob:La.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ze.forEach(["delete","get","head","post","put","patch"],e=>{Y3.headers[e]={}});const J3=Y3,cTe=Ze.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"]),hTe=e=>{const t={};let r,n,a;return e&&e.split(`
873
+ `,CSe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function TSe(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:CSe.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:a,boxSizing:r}}function EP(e,t=1,r){var n;Ra||(Ra=document.createElement("textarea"),document.body.appendChild(Ra));const{paddingSize:a,borderSize:i,boxSizing:o,contextStyle:l}=TSe(e);Ra.setAttribute("style",`${l};${MSe}`),Ra.value=e.value||e.placeholder||"";let f=Ra.scrollHeight;const u={};o==="border-box"?f=f+i:o==="content-box"&&(f=f-a),Ra.value="";const d=Ra.scrollHeight-a;if(ka(t)){let m=d*t;o==="border-box"&&(m=m+a+i),f=Math.max(m,f),u.minHeight=`${m}px`}if(ka(r)){let m=d*r;o==="border-box"&&(m=m+a+i),f=Math.min(m,f)}return u.height=`${f}px`,(n=Ra.parentNode)==null||n.removeChild(Ra),Ra=void 0,u}const ASe=Kr({id:{type:String,default:void 0},size:h3,disabled:Boolean,modelValue:{type:$t([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:$t([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:oa},prefixIcon:{type:oa},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:$t([Object,Array,String]),default:()=>TR({})},autofocus:{type:Boolean,default:!1}}),ISe={[Na]:e=>Bt(e),input:e=>Bt(e),change:e=>Bt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},BSe=["role"],kSe=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],NSe=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],OSe=st({name:"ElInput",inheritAttrs:!1}),RSe=st({...OSe,props:ASe,emits:ISe,setup(e,{expose:t,emit:r}){const n=e,a=L9(),i=mv(),o=Ee(()=>{const K={};return n.containerRole==="combobox"&&(K["aria-haspopup"]=a["aria-haspopup"],K["aria-owns"]=a["aria-owns"],K["aria-expanded"]=a["aria-expanded"]),K}),l=Ee(()=>[n.type==="textarea"?C.b():E.b(),E.m(y.value),E.is("disabled",_.value),E.is("exceed",H.value),{[E.b("group")]:i.prepend||i.append,[E.bm("group","append")]:i.append,[E.bm("group","prepend")]:i.prepend,[E.m("prefix")]:i.prefix||n.prefixIcon,[E.m("suffix")]:i.suffix||n.suffixIcon||n.clearable||n.showPassword,[E.bm("suffix","password-clear")]:c.value&&S.value},a.class]),f=Ee(()=>[E.e("wrapper"),E.is("focus",U.value)]),u=Gxe({excludeKeys:Ee(()=>Object.keys(o.value))}),{form:d,formItem:m}=v3(),{inputId:v}=O6e(n,{formItemContext:m}),y=Zu(),_=p3(),E=Qt("input"),C=Qt("textarea"),T=Xl(),I=Xl(),k=Re(!1),N=Re(!1),O=Re(!1),P=Re(),z=Xl(n.inputStyle),V=Ee(()=>T.value||I.value),{wrapperRef:L,isFocused:U,handleFocus:M,handleBlur:s}=m6e(V,{afterBlur(){var K;n.validateEvent&&((K=m==null?void 0:m.validate)==null||K.call(m,"blur").catch(pe=>yn(pe)))}}),h=Ee(()=>{var K;return(K=d==null?void 0:d.statusIcon)!=null?K:!1}),p=Ee(()=>(m==null?void 0:m.validateState)||""),g=Ee(()=>p.value&&SR[p.value]),b=Ee(()=>O.value?Oxe:oxe),w=Ee(()=>[a.style,n.inputStyle]),A=Ee(()=>[n.inputStyle,z.value,{resize:n.resize}]),x=Ee(()=>$u(n.modelValue)?"":String(n.modelValue)),c=Ee(()=>n.clearable&&!_.value&&!n.readonly&&!!x.value&&(U.value||k.value)),S=Ee(()=>n.showPassword&&!_.value&&!n.readonly&&!!x.value&&(!!x.value||U.value)),B=Ee(()=>n.showWordLimit&&!!u.value.maxlength&&(n.type==="text"||n.type==="textarea")&&!_.value&&!n.readonly&&!n.showPassword),R=Ee(()=>x.value.length),H=Ee(()=>!!B.value&&R.value>Number(u.value.maxlength)),X=Ee(()=>!!i.suffix||!!n.suffixIcon||c.value||n.showPassword||B.value||!!p.value&&h.value),[G,Y]=p6e(T);Fu(I,K=>{if(ce(),!B.value||n.resize!=="both")return;const pe=K[0],{width:ie}=pe.contentRect;P.value={right:`calc(100% - ${ie+15+6}px)`}});const ue=()=>{const{type:K,autosize:pe}=n;if(!(!hn||K!=="textarea"||!I.value))if(pe){const ie=Dt(pe)?pe.minRows:void 0,ve=Dt(pe)?pe.maxRows:void 0,Ye=EP(I.value,ie,ve);z.value={overflowY:"hidden",...Ye},kt(()=>{I.value.offsetHeight,z.value=Ye})}else z.value={minHeight:EP(I.value).minHeight}},ce=(K=>{let pe=!1;return()=>{var ie;if(pe||!n.autosize)return;((ie=I.value)==null?void 0:ie.offsetParent)===null||(K(),pe=!0)}})(ue),ne=()=>{const K=V.value,pe=n.formatter?n.formatter(x.value):x.value;!K||K.value===pe||(K.value=pe)},J=async K=>{G();let{value:pe}=K.target;if(n.formatter&&(pe=n.parser?n.parser(pe):pe),!N.value){if(pe===x.value){ne();return}r(Na,pe),r("input",pe),await kt(),ne(),Y()}},j=K=>{r("change",K.target.value)},ae=K=>{r("compositionstart",K),N.value=!0},se=K=>{var pe;r("compositionupdate",K);const ie=(pe=K.target)==null?void 0:pe.value,ve=ie[ie.length-1]||"";N.value=!CR(ve)},q=K=>{r("compositionend",K),N.value&&(N.value=!1,J(K))},D=()=>{O.value=!O.value,F()},F=async()=>{var K;await kt(),(K=V.value)==null||K.focus()},$=()=>{var K;return(K=V.value)==null?void 0:K.blur()},re=K=>{k.value=!1,r("mouseleave",K)},Q=K=>{k.value=!0,r("mouseenter",K)},te=K=>{r("keydown",K)},le=()=>{var K;(K=V.value)==null||K.select()},Z=()=>{r(Na,""),r("change",""),r("clear"),r("input","")};return ut(()=>n.modelValue,()=>{var K;kt(()=>ue()),n.validateEvent&&((K=m==null?void 0:m.validate)==null||K.call(m,"change").catch(pe=>yn(pe)))}),ut(x,()=>ne()),ut(()=>n.type,async()=>{await kt(),ne(),ue()}),ir(()=>{!n.formatter&&n.parser&&yn("ElInput","If you set the parser, you also need to set the formatter."),ne(),kt(ue)}),t({input:T,textarea:I,ref:V,textareaStyle:A,autosize:ra(n,"autosize"),focus:F,blur:$,select:le,clear:Z,resizeTextarea:ue}),(K,pe)=>tn((me(),Fe("div",Ai(W(o),{class:W(l),style:W(w),role:K.containerRole,onMouseenter:Q,onMouseleave:re}),[Xe(" input "),K.type!=="textarea"?(me(),Fe(wt,{key:0},[Xe(" prepend slot "),K.$slots.prepend?(me(),Fe("div",{key:0,class:Te(W(E).be("group","prepend"))},[Ot(K.$slots,"prepend")],2)):Xe("v-if",!0),Ue("div",{ref_key:"wrapperRef",ref:L,class:Te(W(f))},[Xe(" prefix slot "),K.$slots.prefix||K.prefixIcon?(me(),Fe("span",{key:0,class:Te(W(E).e("prefix"))},[Ue("span",{class:Te(W(E).e("prefix-inner"))},[Ot(K.$slots,"prefix"),K.prefixIcon?(me(),et(W(Rn),{key:0,class:Te(W(E).e("icon"))},{default:rt(()=>[(me(),et(ni(K.prefixIcon)))]),_:1},8,["class"])):Xe("v-if",!0)],2)],2)):Xe("v-if",!0),Ue("input",Ai({id:W(v),ref_key:"input",ref:T,class:W(E).e("inner")},W(u),{type:K.showPassword?O.value?"text":"password":K.type,disabled:W(_),formatter:K.formatter,parser:K.parser,readonly:K.readonly,autocomplete:K.autocomplete,tabindex:K.tabindex,"aria-label":K.label,placeholder:K.placeholder,style:K.inputStyle,form:n.form,autofocus:n.autofocus,onCompositionstart:ae,onCompositionupdate:se,onCompositionend:q,onInput:J,onFocus:pe[0]||(pe[0]=(...ie)=>W(M)&&W(M)(...ie)),onBlur:pe[1]||(pe[1]=(...ie)=>W(s)&&W(s)(...ie)),onChange:j,onKeydown:te}),null,16,kSe),Xe(" suffix slot "),W(X)?(me(),Fe("span",{key:1,class:Te(W(E).e("suffix"))},[Ue("span",{class:Te(W(E).e("suffix-inner"))},[!W(c)||!W(S)||!W(B)?(me(),Fe(wt,{key:0},[Ot(K.$slots,"suffix"),K.suffixIcon?(me(),et(W(Rn),{key:0,class:Te(W(E).e("icon"))},{default:rt(()=>[(me(),et(ni(K.suffixIcon)))]),_:1},8,["class"])):Xe("v-if",!0)],64)):Xe("v-if",!0),W(c)?(me(),et(W(Rn),{key:1,class:Te([W(E).e("icon"),W(E).e("clear")]),onMousedown:Cn(W(an),["prevent"]),onClick:Z},{default:rt(()=>[ht(W(XE))]),_:1},8,["class","onMousedown"])):Xe("v-if",!0),W(S)?(me(),et(W(Rn),{key:2,class:Te([W(E).e("icon"),W(E).e("password")]),onClick:D},{default:rt(()=>[(me(),et(ni(W(b))))]),_:1},8,["class"])):Xe("v-if",!0),W(B)?(me(),Fe("span",{key:3,class:Te(W(E).e("count"))},[Ue("span",{class:Te(W(E).e("count-inner"))},ot(W(R))+" / "+ot(W(u).maxlength),3)],2)):Xe("v-if",!0),W(p)&&W(g)&&W(h)?(me(),et(W(Rn),{key:4,class:Te([W(E).e("icon"),W(E).e("validateIcon"),W(E).is("loading",W(p)==="validating")])},{default:rt(()=>[(me(),et(ni(W(g))))]),_:1},8,["class"])):Xe("v-if",!0)],2)],2)):Xe("v-if",!0)],2),Xe(" append slot "),K.$slots.append?(me(),Fe("div",{key:1,class:Te(W(E).be("group","append"))},[Ot(K.$slots,"append")],2)):Xe("v-if",!0)],64)):(me(),Fe(wt,{key:1},[Xe(" textarea "),Ue("textarea",Ai({id:W(v),ref_key:"textarea",ref:I,class:W(C).e("inner")},W(u),{tabindex:K.tabindex,disabled:W(_),readonly:K.readonly,autocomplete:K.autocomplete,style:W(A),"aria-label":K.label,placeholder:K.placeholder,form:n.form,autofocus:n.autofocus,onCompositionstart:ae,onCompositionupdate:se,onCompositionend:q,onInput:J,onFocus:pe[2]||(pe[2]=(...ie)=>W(M)&&W(M)(...ie)),onBlur:pe[3]||(pe[3]=(...ie)=>W(s)&&W(s)(...ie)),onChange:j,onKeydown:te}),null,16,NSe),W(B)?(me(),Fe("span",{key:0,style:on(P.value),class:Te(W(E).e("count"))},ot(W(R))+" / "+ot(W(u).maxlength),7)):Xe("v-if",!0)],64))],16,BSe)),[[vi,K.type!=="hidden"]])}});var PSe=vr(RSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const dm=Ni(PSe),Ju=4,FSe={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},LSe=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),xP=Symbol("scrollbarContextKey"),DSe=Kr({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$Se="Thumb";var SP=vr(st({__name:"thumb",props:DSe,setup(e){const t=e,r=At(xP),n=Qt("scrollbar");r||zu($Se,"can not inject scrollbar context");const a=Re(),i=Re(),o=Re({}),l=Re(!1);let f=!1,u=!1,d=hn?document.onselectstart:null;const m=Ee(()=>FSe[t.vertical?"vertical":"horizontal"]),v=Ee(()=>LSe({size:t.size,move:t.move,bar:m.value})),y=Ee(()=>a.value[m.value.offset]**2/r.wrapElement[m.value.scrollSize]/t.ratio/i.value[m.value.offset]),_=P=>{var z;if(P.stopPropagation(),P.ctrlKey||[1,2].includes(P.button))return;(z=window.getSelection())==null||z.removeAllRanges(),C(P);const V=P.currentTarget;V&&(o.value[m.value.axis]=V[m.value.offset]-(P[m.value.client]-V.getBoundingClientRect()[m.value.direction]))},E=P=>{if(!i.value||!a.value||!r.wrapElement)return;const z=Math.abs(P.target.getBoundingClientRect()[m.value.direction]-P[m.value.client]),V=i.value[m.value.offset]/2,L=(z-V)*100*y.value/a.value[m.value.offset];r.wrapElement[m.value.scroll]=L*r.wrapElement[m.value.scrollSize]/100},C=P=>{P.stopImmediatePropagation(),f=!0,document.addEventListener("mousemove",T),document.addEventListener("mouseup",I),d=document.onselectstart,document.onselectstart=()=>!1},T=P=>{if(!a.value||!i.value||f===!1)return;const z=o.value[m.value.axis];if(!z)return;const V=(a.value.getBoundingClientRect()[m.value.direction]-P[m.value.client])*-1,L=i.value[m.value.offset]-z,U=(V-L)*100*y.value/a.value[m.value.offset];r.wrapElement[m.value.scroll]=U*r.wrapElement[m.value.scrollSize]/100},I=()=>{f=!1,o.value[m.value.axis]=0,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",I),O(),u&&(l.value=!1)},k=()=>{u=!1,l.value=!!t.size},N=()=>{u=!0,l.value=f};fn(()=>{O(),document.removeEventListener("mouseup",I)});const O=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return Jo(ra(r,"scrollbarElement"),"mousemove",k),Jo(ra(r,"scrollbarElement"),"mouseleave",N),(P,z)=>(me(),et(aa,{name:W(n).b("fade"),persisted:""},{default:rt(()=>[tn(Ue("div",{ref_key:"instance",ref:a,class:Te([W(n).e("bar"),W(n).is(W(m).key)]),onMousedown:E},[Ue("div",{ref_key:"thumb",ref:i,class:Te(W(n).e("thumb")),style:on(W(v)),onMousedown:_},null,38)],34),[[vi,P.always||l.value]])]),_:1},8,["name"]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const zSe=Kr({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var USe=vr(st({__name:"bar",props:zSe,setup(e,{expose:t}){const r=e,n=Re(0),a=Re(0);return t({handleScroll:o=>{if(o){const l=o.offsetHeight-Ju,f=o.offsetWidth-Ju;a.value=o.scrollTop*100/l*r.ratioY,n.value=o.scrollLeft*100/f*r.ratioX}}}),(o,l)=>(me(),Fe(wt,null,[ht(SP,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),ht(SP,{move:a.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const qSe=Kr({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:$t([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),VSe={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(ka)},x3="ElScrollbar",HSe=st({name:x3}),jSe=st({...HSe,props:qSe,emits:VSe,setup(e,{expose:t,emit:r}){const n=e,a=Qt("scrollbar");let i,o;const l=Re(),f=Re(),u=Re(),d=Re("0"),m=Re("0"),v=Re(),y=Re(1),_=Re(1),E=Ee(()=>{const z={};return n.height&&(z.height=Vh(n.height)),n.maxHeight&&(z.maxHeight=Vh(n.maxHeight)),[n.wrapStyle,z]}),C=Ee(()=>[n.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!n.native}]),T=Ee(()=>[a.e("view"),n.viewClass]),I=()=>{var z;f.value&&((z=v.value)==null||z.handleScroll(f.value),r("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function k(z,V){Dt(z)?f.value.scrollTo(z):ka(z)&&ka(V)&&f.value.scrollTo(z,V)}const N=z=>{if(!ka(z)){yn(x3,"value must be a number");return}f.value.scrollTop=z},O=z=>{if(!ka(z)){yn(x3,"value must be a number");return}f.value.scrollLeft=z},P=()=>{if(!f.value)return;const z=f.value.offsetHeight-Ju,V=f.value.offsetWidth-Ju,L=z**2/f.value.scrollHeight,U=V**2/f.value.scrollWidth,M=Math.max(L,n.minSize),s=Math.max(U,n.minSize);y.value=L/(z-L)/(M/(z-M)),_.value=U/(V-U)/(s/(V-s)),m.value=M+Ju<z?`${M}px`:"",d.value=s+Ju<V?`${s}px`:""};return ut(()=>n.noresize,z=>{z?(i==null||i(),o==null||o()):({stop:i}=Fu(u,P),o=Jo("resize",P))},{immediate:!0}),ut(()=>[n.maxHeight,n.height],()=>{n.native||kt(()=>{var z;P(),f.value&&((z=v.value)==null||z.handleScroll(f.value))})}),un(xP,Vn({scrollbarElement:l,wrapElement:f})),ir(()=>{n.native||kt(()=>{P()})}),Au(()=>P()),t({wrapRef:f,update:P,scrollTo:k,setScrollTop:N,setScrollLeft:O,handleScroll:I}),(z,V)=>(me(),Fe("div",{ref_key:"scrollbarRef",ref:l,class:Te(W(a).b())},[Ue("div",{ref_key:"wrapRef",ref:f,class:Te(W(C)),style:on(W(E)),onScroll:I},[(me(),et(ni(z.tag),{ref_key:"resizeRef",ref:u,class:Te(W(T)),style:on(z.viewStyle)},{default:rt(()=>[Ot(z.$slots,"default")]),_:3},8,["class","style"]))],38),z.native?Xe("v-if",!0):(me(),et(USe,{key:0,ref_key:"barRef",ref:v,height:m.value,width:d.value,always:z.always,"ratio-x":_.value,"ratio-y":y.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var KSe=vr(jSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const WSe=Ni(KSe),S3=Symbol("popper"),MP=Symbol("popperContent"),CP=Kr({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),GSe=st({name:"ElPopper",inheritAttrs:!1}),ZSe=st({...GSe,props:CP,setup(e,{expose:t}){const r=e,n=Re(),a=Re(),i=Re(),o=Re(),l=Ee(()=>r.role),f={triggerRef:n,popperInstanceRef:a,contentRef:i,referenceRef:o,role:l};return t(f),un(S3,f),(u,d)=>Ot(u.$slots,"default")}});var YSe=vr(ZSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const TP=Kr({arrowOffset:{type:Number,default:5}}),JSe=st({name:"ElPopperArrow",inheritAttrs:!1}),XSe=st({...JSe,props:TP,setup(e,{expose:t}){const r=e,n=Qt("popper"),{arrowOffset:a,arrowRef:i,arrowStyle:o}=At(MP,void 0);return ut(()=>r.arrowOffset,l=>{a.value=l}),fn(()=>{i.value=void 0}),t({arrowRef:i}),(l,f)=>(me(),Fe("span",{ref_key:"arrowRef",ref:i,class:Te(W(n).e("arrow")),style:on(W(o)),"data-popper-arrow":""},null,6))}});var QSe=vr(XSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const M3="ElOnlyChild",e8e=st({name:M3,setup(e,{slots:t,attrs:r}){var n;const a=At(nP),i=d6e((n=a==null?void 0:a.setForwardRef)!=null?n:an);return()=>{var o;const l=(o=t.default)==null?void 0:o.call(t,r);if(!l)return null;if(l.length>1)return yn(M3,"requires exact only one valid child."),null;const f=AP(l);return f?tn(xa(f,r),[[i]]):(yn(M3,"no valid child node found"),null)}}});function AP(e){if(!e)return null;const t=e;for(const r of t){if(Dt(r))switch(r.type){case mn:continue;case zs:case"svg":return IP(r);case wt:return AP(r.children);default:return r}return IP(r)}return null}function IP(e){const t=Qt("only-child");return ht("span",{class:t.e("content")},[e])}const BP=Kr({virtualRef:{type:$t(Object)},virtualTriggering:Boolean,onMouseenter:{type:$t(Function)},onMouseleave:{type:$t(Function)},onClick:{type:$t(Function)},onKeydown:{type:$t(Function)},onFocus:{type:$t(Function)},onBlur:{type:$t(Function)},onContextmenu:{type:$t(Function)},id:String,open:Boolean}),t8e=st({name:"ElPopperTrigger",inheritAttrs:!1}),r8e=st({...t8e,props:BP,setup(e,{expose:t}){const r=e,{role:n,triggerRef:a}=At(S3,void 0);h6e(a);const i=Ee(()=>l.value?r.id:void 0),o=Ee(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=Ee(()=>{if(n&&n.value!=="tooltip")return n.value}),f=Ee(()=>l.value?`${r.open}`:void 0);let u;return ir(()=>{ut(()=>r.virtualRef,d=>{d&&(a.value=Ws(d))},{immediate:!0}),ut(a,(d,m)=>{u==null||u(),u=void 0,gf(d)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(v=>{var y;const _=r[v];_&&(d.addEventListener(v.slice(2).toLowerCase(),_),(y=m==null?void 0:m.removeEventListener)==null||y.call(m,v.slice(2).toLowerCase(),_))}),u=ut([i,o,l,f],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((y,_)=>{$u(v[_])?d.removeAttribute(y):d.setAttribute(y,v[_])})},{immediate:!0})),gf(m)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>m.removeAttribute(v))},{immediate:!0})}),fn(()=>{u==null||u(),u=void 0}),t({triggerRef:a}),(d,m)=>d.virtualTriggering?Xe("v-if",!0):(me(),et(W(e8e),Ai({key:0},d.$attrs,{"aria-controls":W(i),"aria-describedby":W(o),"aria-expanded":W(f),"aria-haspopup":W(l)}),{default:rt(()=>[Ot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var n8e=vr(r8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const C3="focus-trap.focus-after-trapped",T3="focus-trap.focus-after-released",i8e="focus-trap.focusout-prevented",kP={cancelable:!0,bubbles:!1},a8e={cancelable:!0,bubbles:!1},NP="focusAfterTrapped",OP="focusAfterReleased",o8e=Symbol("elFocusTrap"),A3=Re(),pm=Re(0),I3=Re(0);let vm=0;const RP=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},PP=(e,t)=>{for(const r of e)if(!s8e(r,t))return r},s8e=(e,t)=>{if(fe.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},l8e=e=>{const t=RP(e),r=PP(t,e),n=PP(t.reverse(),e);return[r,n]},f8e=e=>e instanceof HTMLInputElement&&"select"in e,Ys=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),I3.value=window.performance.now(),e!==r&&f8e(e)&&t&&e.select()}};function FP(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const u8e=()=>{let e=[];return{push:n=>{const a=e[0];a&&n!==a&&a.pause(),e=FP(e,n),e.unshift(n)},remove:n=>{var a,i;e=FP(e,n),(i=(a=e[0])==null?void 0:a.resume)==null||i.call(a)}}},c8e=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(Ys(n,t),document.activeElement!==r)return},LP=u8e(),h8e=()=>pm.value>I3.value,mm=()=>{A3.value="pointer",pm.value=window.performance.now()},DP=()=>{A3.value="keyboard",pm.value=window.performance.now()},d8e=()=>(ir(()=>{vm===0&&(document.addEventListener("mousedown",mm),document.addEventListener("touchstart",mm),document.addEventListener("keydown",DP)),vm++}),fn(()=>{vm--,vm<=0&&(document.removeEventListener("mousedown",mm),document.removeEventListener("touchstart",mm),document.removeEventListener("keydown",DP))}),{focusReason:A3,lastUserFocusTimestamp:pm,lastAutomatedFocusTimestamp:I3}),gm=e=>new CustomEvent(i8e,{...a8e,detail:e}),p8e=st({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[NP,OP,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=Re();let n,a;const{focusReason:i}=d8e();s6e(_=>{e.trapped&&!o.paused&&t("release-requested",_)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=_=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:E,altKey:C,ctrlKey:T,metaKey:I,currentTarget:k,shiftKey:N}=_,{loop:O}=e,P=E===bn.tab&&!C&&!T&&!I,z=document.activeElement;if(P&&z){const V=k,[L,U]=l8e(V);if(L&&U){if(!N&&z===U){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||(_.preventDefault(),O&&Ys(L,!0))}else if(N&&[L,V].includes(z)){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||(_.preventDefault(),O&&Ys(U,!0))}}else if(z===V){const s=gm({focusReason:i.value});t("focusout-prevented",s),s.defaultPrevented||_.preventDefault()}}};un(o8e,{focusTrapRef:r,onKeydown:l}),ut(()=>e.focusTrapEl,_=>{_&&(r.value=_)},{immediate:!0}),ut([r],([_],[E])=>{_&&(_.addEventListener("keydown",l),_.addEventListener("focusin",d),_.addEventListener("focusout",m)),E&&(E.removeEventListener("keydown",l),E.removeEventListener("focusin",d),E.removeEventListener("focusout",m))});const f=_=>{t(NP,_)},u=_=>t(OP,_),d=_=>{const E=W(r);if(!E)return;const C=_.target,T=_.relatedTarget,I=C&&E.contains(C);e.trapped||T&&E.contains(T)||(n=T),I&&t("focusin",_),!o.paused&&e.trapped&&(I?a=C:Ys(a,!0))},m=_=>{const E=W(r);if(!(o.paused||!E))if(e.trapped){const C=_.relatedTarget;!$u(C)&&!E.contains(C)&&setTimeout(()=>{if(!o.paused&&e.trapped){const T=gm({focusReason:i.value});t("focusout-prevented",T),T.defaultPrevented||Ys(a,!0)}},0)}else{const C=_.target;C&&E.contains(C)||t("focusout",_)}};async function v(){await kt();const _=W(r);if(_){LP.push(o);const E=_.contains(document.activeElement)?n:document.activeElement;if(n=E,!_.contains(E)){const T=new Event(C3,kP);_.addEventListener(C3,f),_.dispatchEvent(T),T.defaultPrevented||kt(()=>{let I=e.focusStartEl;Bt(I)||(Ys(I),document.activeElement!==I&&(I="first")),I==="first"&&c8e(RP(_),!0),(document.activeElement===E||I==="container")&&Ys(_)})}}}function y(){const _=W(r);if(_){_.removeEventListener(C3,f);const E=new CustomEvent(T3,{...kP,detail:{focusReason:i.value}});_.addEventListener(T3,u),_.dispatchEvent(E),!E.defaultPrevented&&(i.value=="keyboard"||!h8e()||_.contains(document.activeElement))&&Ys(n??document.body),_.removeEventListener(T3,u),LP.remove(o)}}return ir(()=>{e.trapped&&v(),ut(()=>e.trapped,_=>{_?v():y()})}),fn(()=>{e.trapped&&y()}),{onKeydown:l}}});function v8e(e,t,r,n,a,i){return Ot(e.$slots,"default",{handleKeydown:e.onKeydown})}var m8e=vr(p8e,[["render",v8e],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);const g8e=["fixed","absolute"],y8e=Kr({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:$t(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:nm,default:"bottom"},popperOptions:{type:$t(Object),default:()=>({})},strategy:{type:String,values:g8e,default:"absolute"}}),$P=Kr({...y8e,id:String,style:{type:$t([String,Array,Object])},className:{type:$t([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:$t([String,Array,Object])},popperStyle:{type:$t([String,Array,Object])},referenceEl:{type:$t(Object)},triggerTargetEl:{type:$t(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),b8e={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},_8e=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:a}=e,i={placement:r,strategy:n,...a,modifiers:[...E8e(e),...t]};return x8e(i,a==null?void 0:a.modifiers),i},w8e=e=>{if(hn)return Ws(e)};function E8e(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function x8e(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const S8e=0,M8e=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:a}=At(S3,void 0),i=Re(),o=Re(),l=Ee(()=>({name:"eventListeners",enabled:!!e.visible})),f=Ee(()=>{var T;const I=W(i),k=(T=W(o))!=null?T:S8e;return{name:"arrow",enabled:!h3e(I),options:{element:I,padding:k}}}),u=Ee(()=>({onFirstUpdate:()=>{_()},..._8e(e,[W(f),W(l)])})),d=Ee(()=>w8e(e.referenceEl)||W(n)),{attributes:m,state:v,styles:y,update:_,forceUpdate:E,instanceRef:C}=i6e(d,r,u);return ut(C,T=>t.value=T),ir(()=>{ut(()=>{var T;return(T=W(d))==null?void 0:T.getBoundingClientRect()},()=>{_()})}),{attributes:m,arrowRef:i,contentRef:r,instanceRef:C,state:v,styles:y,role:a,forceUpdate:E,update:_}},C8e=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:a}=sP(),i=Qt("popper"),o=Ee(()=>W(t).popper),l=Re(e.zIndex||a()),f=Ee(()=>[i.b(),i.is("pure",e.pure),i.is(e.effect),e.popperClass]),u=Ee(()=>[{zIndex:W(l)},W(r).popper,e.popperStyle||{}]),d=Ee(()=>n.value==="dialog"?"false":void 0),m=Ee(()=>W(r).arrow||{});return{ariaModal:d,arrowStyle:m,contentAttrs:o,contentClass:f,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=e.zIndex||a()}}},T8e=(e,t)=>{const r=Re(!1),n=Re();return{focusStartRef:n,trapped:r,onFocusAfterReleased:u=>{var d;((d=u.detail)==null?void 0:d.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!r.value&&(u.target&&(n.value=u.target),r.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},A8e=st({name:"ElPopperContent"}),I8e=st({...A8e,props:$P,emits:b8e,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:a,trapped:i,onFocusAfterReleased:o,onFocusAfterTrapped:l,onFocusInTrap:f,onFocusoutPrevented:u,onReleaseRequested:d}=T8e(n,r),{attributes:m,arrowRef:v,contentRef:y,styles:_,instanceRef:E,role:C,update:T}=M8e(n),{ariaModal:I,arrowStyle:k,contentAttrs:N,contentClass:O,contentStyle:P,updateZIndex:z}=C8e(n,{styles:_,attributes:m,role:C}),V=At(Ef,void 0),L=Re();un(MP,{arrowStyle:k,arrowRef:v,arrowOffset:L}),V&&(V.addInputId||V.removeInputId)&&un(Ef,{...V,addInputId:an,removeInputId:an});let U;const M=(h=!0)=>{T(),h&&z()},s=()=>{M(!1),n.visible&&n.focusOnShow?i.value=!0:n.visible===!1&&(i.value=!1)};return ir(()=>{ut(()=>n.triggerTargetEl,(h,p)=>{U==null||U(),U=void 0;const g=W(h||y.value),b=W(p||y.value);gf(g)&&(U=ut([C,()=>n.ariaLabel,I,()=>n.id],w=>{["role","aria-label","aria-modal","id"].forEach((A,x)=>{$u(w[x])?g.removeAttribute(A):g.setAttribute(A,w[x])})},{immediate:!0})),b!==g&&gf(b)&&["role","aria-label","aria-modal","id"].forEach(w=>{b.removeAttribute(w)})},{immediate:!0}),ut(()=>n.visible,s,{immediate:!0})}),fn(()=>{U==null||U(),U=void 0}),t({popperContentRef:y,popperInstanceRef:E,updatePopper:M,contentStyle:P}),(h,p)=>(me(),Fe("div",Ai({ref_key:"contentRef",ref:y},W(N),{style:W(P),class:W(O),tabindex:"-1",onMouseenter:p[0]||(p[0]=g=>h.$emit("mouseenter",g)),onMouseleave:p[1]||(p[1]=g=>h.$emit("mouseleave",g))}),[ht(W(m8e),{trapped:W(i),"trap-on-focus-in":!0,"focus-trap-el":W(y),"focus-start-el":W(a),onFocusAfterTrapped:W(l),onFocusAfterReleased:W(o),onFocusin:W(f),onFocusoutPrevented:W(u),onReleaseRequested:W(d)},{default:rt(()=>[Ot(h.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var B8e=vr(I8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const k8e=Ni(YSe),B3=Symbol("elTooltip"),k3=Kr({...u6e,...$P,appendTo:{type:$t([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:$t(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),zP=Kr({...BP,disabled:Boolean,trigger:{type:$t([String,Array]),default:"hover"},triggerKeys:{type:$t(Array),default:()=>[bn.enter,bn.space]}}),{useModelToggleProps:N8e,useModelToggleEmits:O8e,useModelToggle:R8e}=BR("visible"),P8e=Kr({...CP,...N8e,...k3,...zP,...TP,showArrow:{type:Boolean,default:!0}}),F8e=[...O8e,"before-show","before-hide","show","hide","open","close"],L8e=(e,t)=>mt(e)?e.includes(t):e===t,Xu=(e,t,r)=>n=>{L8e(W(e),t)&&r(n)},D8e=st({name:"ElTooltipTrigger"}),$8e=st({...D8e,props:zP,setup(e,{expose:t}){const r=e,n=Qt("tooltip"),{controlled:a,id:i,open:o,onOpen:l,onClose:f,onToggle:u}=At(B3,void 0),d=Re(null),m=()=>{if(W(a)||r.disabled)return!0},v=ra(r,"trigger"),y=Yo(m,Xu(v,"hover",l)),_=Yo(m,Xu(v,"hover",f)),E=Yo(m,Xu(v,"click",N=>{N.button===0&&u(N)})),C=Yo(m,Xu(v,"focus",l)),T=Yo(m,Xu(v,"focus",f)),I=Yo(m,Xu(v,"contextmenu",N=>{N.preventDefault(),u(N)})),k=Yo(m,N=>{const{code:O}=N;r.triggerKeys.includes(O)&&(N.preventDefault(),u(N))});return t({triggerRef:d}),(N,O)=>(me(),et(W(n8e),{id:W(i),"virtual-ref":N.virtualRef,open:W(o),"virtual-triggering":N.virtualTriggering,class:Te(W(n).e("trigger")),onBlur:W(T),onClick:W(E),onContextmenu:W(I),onFocus:W(C),onMouseenter:W(y),onMouseleave:W(_),onKeydown:W(k)},{default:rt(()=>[Ot(N.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var z8e=vr($8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const U8e=st({name:"ElTooltipContent",inheritAttrs:!1}),q8e=st({...U8e,props:k3,setup(e,{expose:t}){const r=e,{selector:n}=rP(),a=Qt("tooltip"),i=Re(null),o=Re(!1),{controlled:l,id:f,open:u,trigger:d,onClose:m,onOpen:v,onShow:y,onHide:_,onBeforeShow:E,onBeforeHide:C}=At(B3,void 0),T=Ee(()=>r.transition||`${a.namespace.value}-fade-in-linear`),I=Ee(()=>fe.env.NODE_ENV==="test"?!0:r.persistent);fn(()=>{o.value=!0});const k=Ee(()=>W(I)?!0:W(u)),N=Ee(()=>r.disabled?!1:W(u)),O=Ee(()=>r.appendTo||n.value),P=Ee(()=>{var w;return(w=r.style)!=null?w:{}}),z=Ee(()=>!W(u)),V=()=>{_()},L=()=>{if(W(l))return!0},U=Yo(L,()=>{r.enterable&&W(d)==="hover"&&v()}),M=Yo(L,()=>{W(d)==="hover"&&m()}),s=()=>{var w,A;(A=(w=i.value)==null?void 0:w.updatePopper)==null||A.call(w),E==null||E()},h=()=>{C==null||C()},p=()=>{y(),b=Lye(Ee(()=>{var w;return(w=i.value)==null?void 0:w.popperContentRef}),()=>{if(W(l))return;W(d)!=="hover"&&m()})},g=()=>{r.virtualTriggering||m()};let b;return ut(()=>W(u),w=>{w||b==null||b()},{flush:"post"}),ut(()=>r.content,()=>{var w,A;(A=(w=i.value)==null?void 0:w.updatePopper)==null||A.call(w)}),t({contentRef:i}),(w,A)=>(me(),et(kme,{disabled:!w.teleported,to:W(O)},[ht(aa,{name:W(T),onAfterLeave:V,onBeforeEnter:s,onAfterEnter:p,onBeforeLeave:h},{default:rt(()=>[W(k)?tn((me(),et(W(B8e),Ai({key:0,id:W(f),ref_key:"contentRef",ref:i},w.$attrs,{"aria-label":w.ariaLabel,"aria-hidden":W(z),"boundaries-padding":w.boundariesPadding,"fallback-placements":w.fallbackPlacements,"gpu-acceleration":w.gpuAcceleration,offset:w.offset,placement:w.placement,"popper-options":w.popperOptions,strategy:w.strategy,effect:w.effect,enterable:w.enterable,pure:w.pure,"popper-class":w.popperClass,"popper-style":[w.popperStyle,W(P)],"reference-el":w.referenceEl,"trigger-target-el":w.triggerTargetEl,visible:W(N),"z-index":w.zIndex,onMouseenter:W(U),onMouseleave:W(M),onBlur:g,onClose:W(m)}),{default:rt(()=>[o.value?Xe("v-if",!0):Ot(w.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[vi,W(N)]]):Xe("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var V8e=vr(q8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const H8e=["innerHTML"],j8e={key:1},K8e=st({name:"ElTooltip"}),W8e=st({...K8e,props:P8e,emits:F8e,setup(e,{expose:t,emit:r}){const n=e;f6e();const a=c3(),i=Re(),o=Re(),l=()=>{var T;const I=W(i);I&&((T=I.popperInstanceRef)==null||T.update())},f=Re(!1),u=Re(),{show:d,hide:m,hasUpdateHandler:v}=R8e({indicator:f,toggleReason:u}),{onOpen:y,onClose:_}=c6e({showAfter:ra(n,"showAfter"),hideAfter:ra(n,"hideAfter"),autoClose:ra(n,"autoClose"),open:d,close:m}),E=Ee(()=>Yv(n.visible)&&!v.value);un(B3,{controlled:E,id:a,open:dw(f),trigger:ra(n,"trigger"),onOpen:T=>{y(T)},onClose:T=>{_(T)},onToggle:T=>{W(f)?_(T):y(T)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:l}),ut(()=>n.disabled,T=>{T&&f.value&&(f.value=!1)});const C=T=>{var I,k;const N=(k=(I=o.value)==null?void 0:I.contentRef)==null?void 0:k.popperContentRef,O=(T==null?void 0:T.relatedTarget)||document.activeElement;return N&&N.contains(O)};return k9(()=>f.value&&m()),t({popperRef:i,contentRef:o,isFocusInsideContent:C,updatePopper:l,onOpen:y,onClose:_,hide:m}),(T,I)=>(me(),et(W(k8e),{ref_key:"popperRef",ref:i,role:T.role},{default:rt(()=>[ht(z8e,{disabled:T.disabled,trigger:T.trigger,"trigger-keys":T.triggerKeys,"virtual-ref":T.virtualRef,"virtual-triggering":T.virtualTriggering},{default:rt(()=>[T.$slots.default?Ot(T.$slots,"default",{key:0}):Xe("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ht(V8e,{ref_key:"contentRef",ref:o,"aria-label":T.ariaLabel,"boundaries-padding":T.boundariesPadding,content:T.content,disabled:T.disabled,effect:T.effect,enterable:T.enterable,"fallback-placements":T.fallbackPlacements,"hide-after":T.hideAfter,"gpu-acceleration":T.gpuAcceleration,offset:T.offset,persistent:T.persistent,"popper-class":T.popperClass,"popper-style":T.popperStyle,placement:T.placement,"popper-options":T.popperOptions,pure:T.pure,"raw-content":T.rawContent,"reference-el":T.referenceEl,"trigger-target-el":T.triggerTargetEl,"show-after":T.showAfter,strategy:T.strategy,teleported:T.teleported,transition:T.transition,"virtual-triggering":T.virtualTriggering,"z-index":T.zIndex,"append-to":T.appendTo},{default:rt(()=>[Ot(T.$slots,"content",{},()=>[T.rawContent?(me(),Fe("span",{key:0,innerHTML:T.content},null,8,H8e)):(me(),Fe("span",j8e,ot(T.content),1))]),T.showArrow?(me(),et(W(QSe),{key:0,"arrow-offset":T.arrowOffset},null,8,["arrow-offset"])):Xe("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var G8e=vr(W8e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const N3=Ni(G8e),UP=Symbol("buttonGroupContextKey"),Z8e=(e,t)=>{QE({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},Ee(()=>e.type==="text"));const r=At(UP,void 0),n=d3("button"),{form:a}=v3(),i=Zu(Ee(()=>r==null?void 0:r.size)),o=p3(),l=Re(),f=mv(),u=Ee(()=>e.type||(r==null?void 0:r.type)||""),d=Ee(()=>{var _,E,C;return(C=(E=e.autoInsertSpace)!=null?E:(_=n.value)==null?void 0:_.autoInsertSpace)!=null?C:!1}),m=Ee(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),v=Ee(()=>{var _;const E=(_=f.default)==null?void 0:_.call(f);if(d.value&&(E==null?void 0:E.length)===1){const C=E[0];if((C==null?void 0:C.type)===zs){const T=C.children;return/^\p{Unified_Ideograph}{2}$/u.test(T.trim())}}return!1});return{_disabled:o,_size:i,_type:u,_ref:l,_props:m,shouldAddSpace:v,handleClick:_=>{e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",_)}}},O3=Kr({size:h3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:oa},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:oa,default:()=>_R},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:$t([String,Object]),default:"button"}}),Y8e={click:e=>e instanceof MouseEvent};function Pn(e,t){J8e(e)&&(e="100%");var r=X8e(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ym(e){return Math.min(1,Math.max(0,e))}function J8e(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function X8e(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qP(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function bm(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Sf(e){return e.length===1?"0"+e:String(e)}function Q8e(e,t,r){return{r:Pn(e,255)*255,g:Pn(t,255)*255,b:Pn(r,255)*255}}function VP(e,t,r){e=Pn(e,255),t=Pn(t,255),r=Pn(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,o=0,l=(n+a)/2;if(n===a)o=0,i=0;else{var f=n-a;switch(o=l>.5?f/(2-n-a):f/(n+a),n){case e:i=(t-r)/f+(t<r?6:0);break;case t:i=(r-e)/f+2;break;case r:i=(e-t)/f+4;break}i/=6}return{h:i,s:o,l}}function R3(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function eMe(e,t,r){var n,a,i;if(e=Pn(e,360),t=Pn(t,100),r=Pn(r,100),t===0)a=r,i=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;n=R3(l,o,e+1/3),a=R3(l,o,e),i=R3(l,o,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function HP(e,t,r){e=Pn(e,255),t=Pn(t,255),r=Pn(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,o=n,l=n-a,f=n===0?0:l/n;if(n===a)i=0;else{switch(n){case e:i=(t-r)/l+(t<r?6:0);break;case t:i=(r-e)/l+2;break;case r:i=(e-t)/l+4;break}i/=6}return{h:i,s:f,v:o}}function tMe(e,t,r){e=Pn(e,360)*6,t=Pn(t,100),r=Pn(r,100);var n=Math.floor(e),a=e-n,i=r*(1-t),o=r*(1-a*t),l=r*(1-(1-a)*t),f=n%6,u=[r,o,i,i,l,r][f],d=[l,r,r,o,i,i][f],m=[i,i,l,r,r,o][f];return{r:u*255,g:d*255,b:m*255}}function jP(e,t,r,n){var a=[Sf(Math.round(e).toString(16)),Sf(Math.round(t).toString(16)),Sf(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function rMe(e,t,r,n,a){var i=[Sf(Math.round(e).toString(16)),Sf(Math.round(t).toString(16)),Sf(Math.round(r).toString(16)),Sf(nMe(n))];return a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function nMe(e){return Math.round(parseFloat(e)*255).toString(16)}function KP(e){return Ri(e)/255}function Ri(e){return parseInt(e,16)}function iMe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var P3={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function aMe(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,l=!1;return typeof e=="string"&&(e=lMe(e)),typeof e=="object"&&(ts(e.r)&&ts(e.g)&&ts(e.b)?(t=Q8e(e.r,e.g,e.b),o=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ts(e.h)&&ts(e.s)&&ts(e.v)?(n=bm(e.s),a=bm(e.v),t=tMe(e.h,n,a),o=!0,l="hsv"):ts(e.h)&&ts(e.s)&&ts(e.l)&&(n=bm(e.s),i=bm(e.l),t=eMe(e.h,n,i),o=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=qP(r),{ok:o,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var oMe="[-\\+]?\\d+%?",sMe="[-\\+]?\\d*\\.\\d+%?",Js="(?:".concat(sMe,")|(?:").concat(oMe,")"),F3="[\\s|\\(]+(".concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")\\s*\\)?"),L3="[\\s|\\(]+(".concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")[,|\\s]+(").concat(Js,")\\s*\\)?"),Pa={CSS_UNIT:new RegExp(Js),rgb:new RegExp("rgb"+F3),rgba:new RegExp("rgba"+L3),hsl:new RegExp("hsl"+F3),hsla:new RegExp("hsla"+L3),hsv:new RegExp("hsv"+F3),hsva:new RegExp("hsva"+L3),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function lMe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(P3[e])e=P3[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Pa.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Pa.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Pa.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Pa.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Pa.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Pa.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Pa.hex8.exec(e),r?{r:Ri(r[1]),g:Ri(r[2]),b:Ri(r[3]),a:KP(r[4]),format:t?"name":"hex8"}:(r=Pa.hex6.exec(e),r?{r:Ri(r[1]),g:Ri(r[2]),b:Ri(r[3]),format:t?"name":"hex"}:(r=Pa.hex4.exec(e),r?{r:Ri(r[1]+r[1]),g:Ri(r[2]+r[2]),b:Ri(r[3]+r[3]),a:KP(r[4]+r[4]),format:t?"name":"hex8"}:(r=Pa.hex3.exec(e),r?{r:Ri(r[1]+r[1]),g:Ri(r[2]+r[2]),b:Ri(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ts(e){return!!Pa.CSS_UNIT.exec(String(e))}var WP=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=iMe(t)),this.originalInput=t;var a=aMe(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,i=t.r/255,o=t.g/255,l=t.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=qP(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=HP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=HP(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=VP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=VP(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rMe(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Pn(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Pn(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),r=0,n=Object.entries(P3);r<n.length;r++){var a=n[r],i=a[0],o=a[1];if(t===o)return i}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,a=this.a<1&&this.a>=0,i=!r&&a&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=ym(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=ym(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=ym(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=ym(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,i=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(new e(n));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(new e({h:n,s:a,v:i})),i=(i+l)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],i=360/t,o=1;o<t;o++)a.push(new e({h:(n+o*i)%360,s:r.s,l:r.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Xs(e,t=20){return e.mix("#141414",t).toString()}function fMe(e){const t=p3(),r=Qt("button");return Ee(()=>{let n={};const a=e.color;if(a){const i=new WP(a),o=e.dark?i.tint(20).toString():Xs(i,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Xs(i,90):i.tint(90).toString(),"text-color":a,"border-color":e.dark?Xs(i,50):i.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Xs(i,90):i.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Xs(i,50):i.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Xs(i,80):i.tint(80).toString());else{const l=e.dark?Xs(i,30):i.tint(30).toString(),f=i.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":a,"text-color":f,"border-color":a,"hover-bg-color":l,"hover-text-color":f,"hover-border-color":l,"active-bg-color":o,"active-border-color":o}),t.value){const u=e.dark?Xs(i,50):i.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const uMe=st({name:"ElButton"}),cMe=st({...uMe,props:O3,emits:Y8e,setup(e,{expose:t,emit:r}){const n=e,a=fMe(n),i=Qt("button"),{_ref:o,_size:l,_type:f,_disabled:u,_props:d,shouldAddSpace:m,handleClick:v}=Z8e(n,r);return t({ref:o,size:l,type:f,disabled:u,shouldAddSpace:m}),(y,_)=>(me(),et(ni(y.tag),Ai({ref_key:"_ref",ref:o},W(d),{class:[W(i).b(),W(i).m(W(f)),W(i).m(W(l)),W(i).is("disabled",W(u)),W(i).is("loading",y.loading),W(i).is("plain",y.plain),W(i).is("round",y.round),W(i).is("circle",y.circle),W(i).is("text",y.text),W(i).is("link",y.link),W(i).is("has-bg",y.bg)],style:W(a),onClick:W(v)}),{default:rt(()=>[y.loading?(me(),Fe(wt,{key:0},[y.$slots.loading?Ot(y.$slots,"loading",{key:0}):(me(),et(W(Rn),{key:1,class:Te(W(i).is("loading"))},{default:rt(()=>[(me(),et(ni(y.loadingIcon)))]),_:1},8,["class"]))],64)):y.icon||y.$slots.icon?(me(),et(W(Rn),{key:1},{default:rt(()=>[y.icon?(me(),et(ni(y.icon),{key:0})):Ot(y.$slots,"icon",{key:1})]),_:3})):Xe("v-if",!0),y.$slots.default?(me(),Fe("span",{key:2,class:Te({[W(i).em("text","expand")]:W(m)})},[Ot(y.$slots,"default")],2)):Xe("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var hMe=vr(cMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const dMe={size:O3.size,type:O3.type},pMe=st({name:"ElButtonGroup"}),vMe=st({...pMe,props:dMe,setup(e){const t=e;un(UP,Vn({size:ra(t,"size"),type:ra(t,"type")}));const r=Qt("button");return(n,a)=>(me(),Fe("div",{class:Te(`${W(r).b("group")}`)},[Ot(n.$slots,"default")],2))}});var GP=vr(vMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Xr=Ni(hMe,{ButtonGroup:GP});bf(GP);const Qs=new Map;let ZP;hn&&(document.addEventListener("mousedown",e=>ZP=e),document.addEventListener("mouseup",e=>{for(const t of Qs.values())for(const{documentHandler:r}of t)r(e,ZP)}));function YP(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:gf(t.arg)&&r.push(t.arg),function(n,a){const i=t.instance.popperRef,o=n.target,l=a==null?void 0:a.target,f=!t||!t.instance,u=!o||!l,d=e.contains(o)||e.contains(l),m=e===o,v=r.length&&r.some(_=>_==null?void 0:_.contains(o))||r.length&&r.includes(l),y=i&&(i.contains(o)||i.contains(l));f||u||d||m||v||y||t.value(n,a)}}const mMe={beforeMount(e,t){Qs.has(e)||Qs.set(e,[]),Qs.get(e).push({documentHandler:YP(e,t),bindingFn:t.value})},updated(e,t){Qs.has(e)||Qs.set(e,[]);const r=Qs.get(e),n=r.findIndex(i=>i.bindingFn===t.oldValue),a={documentHandler:YP(e,t),bindingFn:t.value};n>=0?r.splice(n,1,a):r.push(a)},unmounted(e){Qs.delete(e)}},JP=Kr({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:Hh,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),gMe={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},yMe=st({name:"ElTag"}),bMe=st({...yMe,props:JP,emits:gMe,setup(e,{emit:t}){const r=e,n=Zu(),a=Qt("tag"),i=Ee(()=>{const{type:f,hit:u,effect:d,closable:m,round:v}=r;return[a.b(),a.is("closable",m),a.m(f),a.m(n.value),a.m(d),a.is("hit",u),a.is("round",v)]}),o=f=>{t("close",f)},l=f=>{t("click",f)};return(f,u)=>f.disableTransitions?(me(),Fe("span",{key:0,class:Te(W(i)),style:on({backgroundColor:f.color}),onClick:l},[Ue("span",{class:Te(W(a).e("content"))},[Ot(f.$slots,"default")],2),f.closable?(me(),et(W(Rn),{key:0,class:Te(W(a).e("close")),onClick:Cn(o,["stop"])},{default:rt(()=>[ht(W(Jv))]),_:1},8,["class","onClick"])):Xe("v-if",!0)],6)):(me(),et(aa,{key:1,name:`${W(a).namespace.value}-zoom-in-center`,appear:""},{default:rt(()=>[Ue("span",{class:Te(W(i)),style:on({backgroundColor:f.color}),onClick:l},[Ue("span",{class:Te(W(a).e("content"))},[Ot(f.$slots,"default")],2),f.closable?(me(),et(W(Rn),{key:0,class:Te(W(a).e("close")),onClick:Cn(o,["stop"])},{default:rt(()=>[ht(W(Jv))]),_:1},8,["class","onClick"])):Xe("v-if",!0)],6)]),_:3},8,["name"]))}});var _Me=vr(bMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const wMe=Ni(_Me),EMe=st({name:"ElCollapseTransition"}),xMe=st({...EMe,setup(e){const t=Qt("collapse-transition"),r=a=>{a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom},n={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0},enter(a){a.dataset.oldOverflow=a.style.overflow,a.scrollHeight!==0?a.style.maxHeight=`${a.scrollHeight}px`:a.style.maxHeight=0,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom,a.style.overflow="hidden"},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},enterCancelled(a){r(a)},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.maxHeight=`${a.scrollHeight}px`,a.style.overflow="hidden"},leave(a){a.scrollHeight!==0&&(a.style.maxHeight=0,a.style.paddingTop=0,a.style.paddingBottom=0)},afterLeave(a){r(a)},leaveCancelled(a){r(a)}};return(a,i)=>(me(),et(aa,Ai({name:W(t).b()},tme(n)),{default:rt(()=>[Ot(a.$slots,"default")]),_:3},16,["name"]))}});var _m=vr(xMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);_m.install=e=>{e.component(_m.name,_m)};const SMe=_m,MMe=Kr({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},icon:{type:oa}}),CMe={click:e=>e instanceof MouseEvent},TMe=["href"],AMe=st({name:"ElLink"}),IMe=st({...AMe,props:MMe,emits:CMe,setup(e,{emit:t}){const r=e,n=Qt("link"),a=Ee(()=>[n.b(),n.m(r.type),n.is("disabled",r.disabled),n.is("underline",r.underline&&!r.disabled)]);function i(o){r.disabled||t("click",o)}return(o,l)=>(me(),Fe("a",{class:Te(W(a)),href:o.disabled||!o.href?void 0:o.href,onClick:i},[o.icon?(me(),et(W(Rn),{key:0},{default:rt(()=>[(me(),et(ni(o.icon)))]),_:1})):Xe("v-if",!0),o.$slots.default?(me(),Fe("span",{key:1,class:Te(W(n).e("inner"))},[Ot(o.$slots,"default")],2)):Xe("v-if",!0),o.$slots.icon?Ot(o.$slots,"icon",{key:2}):Xe("v-if",!0)],10,TMe))}});var BMe=vr(IMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/link/src/link.vue"]]);const kMe=Ni(BMe);let NMe=class{constructor(t,r){this.parent=t,this.domNode=r,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=>{let a=!1;switch(n.code){case bn.down:{this.gotoSubIndex(this.subIndex+1),a=!0;break}case bn.up:{this.gotoSubIndex(this.subIndex-1),a=!0;break}case bn.tab:{Pv(t,"mouseleave");break}case bn.enter:case bn.space:{a=!0,n.currentTarget.click();break}}return a&&(n.preventDefault(),n.stopPropagation()),!1})})}},OMe=class{constructor(t,r){this.domNode=t,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 NMe(this,r)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let r=!1;switch(t.code){case bn.down:{Pv(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),r=!0;break}case bn.up:{Pv(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),r=!0;break}case bn.tab:{Pv(t.currentTarget,"mouseleave");break}case bn.enter:case bn.space:{r=!0,t.currentTarget.click();break}}r&&t.preventDefault()})}},RMe=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 OMe(n,t)})}};const PMe=st({name:"ElMenuCollapseTransition",setup(){const e=Qt("menu");return{listeners:{onBeforeEnter:r=>r.style.opacity="0.2",onEnter(r,n){Uu(r,`${e.namespace.value}-opacity-transition`),r.style.opacity="1",n()},onAfterEnter(r){yf(r,`${e.namespace.value}-opacity-transition`),r.style.opacity=""},onBeforeLeave(r){r.dataset||(r.dataset={}),y3e(r,e.m("collapse"))?(yf(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),Uu(r,e.m("collapse"))):(Uu(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),yf(r,e.m("collapse"))),r.style.width=`${r.scrollWidth}px`,r.style.overflow="hidden"},onLeave(r){Uu(r,"horizontal-collapse-transition"),r.style.width=`${r.dataset.scrollWidth}px`}}}}});function FMe(e,t,r,n,a,i){return me(),et(aa,Ai({mode:"out-in"},e.listeners),{default:rt(()=>[Ot(e.$slots,"default")]),_:3},16)}var LMe=vr(PMe,[["render",FMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function XP(e,t){const r=Ee(()=>{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:Ee(()=>{let a=e.parent;for(;a&&!["ElMenu","ElSubMenu"].includes(a.type.name);)a=a.parent;return a}),indexPath:r}}function DMe(e){return Ee(()=>{const r=e.backgroundColor;return r?new WP(r).shade(20).toString():""})}const QP=(e,t)=>{const r=Qt("menu");return Ee(()=>r.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":DMe(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},$Me=Kr({index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0},teleported:{type:Boolean,default:void 0},popperOffset:{type:Number,default:6},expandCloseIcon:{type:oa},expandOpenIcon:{type:oa},collapseCloseIcon:{type:oa},collapseOpenIcon:{type:oa}}),wm="ElSubMenu";var D3=st({name:wm,props:$Me,setup(e,{slots:t,expose:r}){QE({from:"popper-append-to-body",replacement:"teleported",scope:wm,version:"2.3.0",ref:"https://element-plus.org/en-US/component/menu.html#submenu-attributes"},Ee(()=>e.popperAppendToBody!==void 0));const n=rn(),{indexPath:a,parentMenu:i}=XP(n,Ee(()=>e.index)),o=Qt("menu"),l=Qt("sub-menu"),f=At("rootMenu");f||zu(wm,"can not inject root menu");const u=At(`subMenu:${i.value.uid}`);u||zu(wm,"can not inject sub menu");const d=Re({}),m=Re({});let v;const y=Re(!1),_=Re(),E=Re(null),C=Ee(()=>M.value==="horizontal"&&I.value?"bottom-start":"right-start"),T=Ee(()=>M.value==="horizontal"&&I.value||M.value==="vertical"&&!f.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?P.value?e.expandOpenIcon:e.expandCloseIcon:gR:e.collapseCloseIcon&&e.collapseOpenIcon?P.value?e.collapseOpenIcon:e.collapseCloseIcon:B3e),I=Ee(()=>u.level===0),k=Ee(()=>{var c;const S=(c=e.teleported)!=null?c:e.popperAppendToBody;return S===void 0?I.value:S}),N=Ee(()=>f.props.collapse?`${o.namespace.value}-zoom-in-left`:`${o.namespace.value}-zoom-in-top`),O=Ee(()=>M.value==="horizontal"&&I.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"]),P=Ee(()=>f.openedMenus.includes(e.index)),z=Ee(()=>{let c=!1;return Object.values(d.value).forEach(S=>{S.active&&(c=!0)}),Object.values(m.value).forEach(S=>{S.active&&(c=!0)}),c}),V=Ee(()=>f.props.backgroundColor||""),L=Ee(()=>f.props.activeTextColor||""),U=Ee(()=>f.props.textColor||""),M=Ee(()=>f.props.mode),s=Vn({index:e.index,indexPath:a,active:z}),h=QP(f.props,u.level+1),p=Ee(()=>M.value!=="horizontal"?{color:U.value}:{borderBottomColor:z.value?f.props.activeTextColor?L.value:"":"transparent",color:z.value?L.value:U.value}),g=()=>{var c,S,B;return(B=(S=(c=E.value)==null?void 0:c.popperRef)==null?void 0:S.popperInstanceRef)==null?void 0:B.destroy()},b=c=>{c||g()},w=()=>{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:z.value})},A=(c,S=e.showTimeout)=>{var B;c.type!=="focus"&&(f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||e.disabled||(u.mouseInChild.value=!0,v==null||v(),{stop:v}=xE(()=>{f.openMenu(e.index,a.value)},S),k.value&&((B=i.value.vnode.el)==null||B.dispatchEvent(new MouseEvent("mouseenter")))))},x=(c=!1)=>{var S,B;f.props.menuTrigger==="click"&&f.props.mode==="horizontal"||!f.props.collapse&&f.props.mode==="vertical"||(v==null||v(),u.mouseInChild.value=!1,{stop:v}=xE(()=>!y.value&&f.closeMenu(e.index,a.value),e.hideTimeout),k.value&&c&&((S=n.parent)==null?void 0:S.type.name)==="ElSubMenu"&&((B=u.handleMouseleave)==null||B.call(u,!0)))};ut(()=>f.props.collapse,c=>b(!!c));{const c=B=>{m.value[B.index]=B},S=B=>{delete m.value[B.index]};un(`subMenu:${n.uid}`,{addSubMenu:c,removeSubMenu:S,handleMouseleave:x,mouseInChild:y,level:u.level+1})}return r({opened:P}),ir(()=>{f.addSubMenu(s),u.addSubMenu(s)}),fn(()=>{u.removeSubMenu(s),f.removeSubMenu(s)}),()=>{var c;const S=[(c=t.title)==null?void 0:c.call(t),vt(Rn,{class:l.e("icon-arrow"),style:{transform:P.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&f.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Bt(T.value)?vt(n.appContext.components[T.value]):vt(T.value)})],B=f.isMenuPopup?vt(N3,{ref:E,visible:P.value,effect:"light",pure:!0,offset:e.popperOffset,showArrow:!1,persistent:!0,popperClass:e.popperClass,placement:C.value,teleported:k.value,fallbackPlacements:O.value,transition:N.value,gpuAcceleration:!1},{content:()=>{var R;return vt("div",{class:[o.m(M.value),o.m("popup-container"),e.popperClass],onMouseenter:H=>A(H,100),onMouseleave:()=>x(!0),onFocus:H=>A(H,100)},[vt("ul",{class:[o.b(),o.m("popup"),o.m(`popup-${C.value}`)],style:h.value},[(R=t.default)==null?void 0:R.call(t)])])},default:()=>vt("div",{class:l.e("title"),style:[p.value,{backgroundColor:V.value}],onClick:w},S)}):vt(wt,{},[vt("div",{class:l.e("title"),style:[p.value,{backgroundColor:V.value}],ref:_,onClick:w},S),vt(SMe,{},{default:()=>{var R;return tn(vt("ul",{role:"menu",class:[o.b(),o.m("inline")],style:h.value},[(R=t.default)==null?void 0:R.call(t)]),[[vi,P.value]])}})]);return vt("li",{class:[l.b(),l.is("active",z.value),l.is("opened",P.value),l.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:P.value,onMouseenter:A,onMouseleave:()=>x(!0),onFocus:A},[B])}}});const zMe=Kr({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:$t(Array),default:()=>TR([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperEffect:{type:String,values:["dark","light"],default:"dark"}}),$3=e=>Array.isArray(e)&&e.every(t=>Bt(t));var UMe=st({name:"ElMenu",props:zMe,emits:{close:(e,t)=>Bt(e)&&$3(t),open:(e,t)=>Bt(e)&&$3(t),select:(e,t,r,n)=>Bt(e)&&$3(t)&&Dt(r)&&(n===void 0||n instanceof Promise)},setup(e,{emit:t,slots:r,expose:n}){const a=rn(),i=a.appContext.config.globalProperties.$router,o=Re(),l=Qt("menu"),f=Qt("sub-menu"),u=Re(-1),d=Re(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),m=Re(e.defaultActive),v=Re({}),y=Re({}),_=Ee(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),E=()=>{const M=m.value&&v.value[m.value];if(!M||e.mode==="horizontal"||e.collapse)return;M.indexPath.forEach(h=>{const p=y.value[h];p&&C(h,p.indexPath)})},C=(M,s)=>{d.value.includes(M)||(e.uniqueOpened&&(d.value=d.value.filter(h=>s.includes(h))),d.value.push(M),t("open",M,s))},T=M=>{const s=d.value.indexOf(M);s!==-1&&d.value.splice(s,1)},I=(M,s)=>{T(M),t("close",M,s)},k=({index:M,indexPath:s})=>{d.value.includes(M)?I(M,s):C(M,s)},N=M=>{(e.mode==="horizontal"||e.collapse)&&(d.value=[]);const{index:s,indexPath:h}=M;if(!($u(s)||$u(h)))if(e.router&&i){const p=M.route||s,g=i.push(p).then(b=>(b||(m.value=s),b));t("select",s,h,{index:s,indexPath:h,route:p},g)}else m.value=s,t("select",s,h,{index:s,indexPath:h})},O=M=>{const s=v.value,h=s[M]||m.value&&s[m.value]||s[e.defaultActive];h?m.value=h.index:m.value=M},P=()=>{var M,s;if(!o.value)return-1;const h=Array.from((s=(M=o.value)==null?void 0:M.childNodes)!=null?s:[]).filter(c=>c.nodeName!=="#comment"&&(c.nodeName!=="#text"||c.nodeValue)),p=64,g=Number.parseInt(getComputedStyle(o.value).paddingLeft,10),b=Number.parseInt(getComputedStyle(o.value).paddingRight,10),w=o.value.clientWidth-g-b;let A=0,x=0;return h.forEach((c,S)=>{A+=c.offsetWidth||0,A<=w-p&&(x=S+1)}),x===h.length?-1:x},z=(M,s=33.34)=>{let h;return()=>{h&&clearTimeout(h),h=setTimeout(()=>{M()},s)}};let V=!0;const L=()=>{const M=()=>{u.value=-1,kt(()=>{u.value=P()})};V?M():z(M)(),V=!1};ut(()=>e.defaultActive,M=>{v.value[M]||(m.value=""),O(M)}),ut(()=>e.collapse,M=>{M&&(d.value=[])}),ut(v.value,E);let U;Hve(()=>{e.mode==="horizontal"&&e.ellipsis?U=Fu(o,L).stop:U==null||U()});{const M=g=>{y.value[g.index]=g},s=g=>{delete y.value[g.index]};un("rootMenu",Vn({props:e,openedMenus:d,items:v,subMenus:y,activeIndex:m,isMenuPopup:_,addMenuItem:g=>{v.value[g.index]=g},removeMenuItem:g=>{delete v.value[g.index]},addSubMenu:M,removeSubMenu:s,openMenu:C,closeMenu:I,handleMenuItemClick:N,handleSubMenuClick:k})),un(`subMenu:${a.uid}`,{addSubMenu:M,removeSubMenu:s,mouseInChild:Re(!1),level:0})}return ir(()=>{e.mode==="horizontal"&&new RMe(a.vnode.el,l.namespace.value)}),n({open:s=>{const{indexPath:h}=y.value[s];h.forEach(p=>C(p,h))},close:T,handleResize:L}),()=>{var M,s;let h=(s=(M=r.default)==null?void 0:M.call(r))!=null?s:[];const p=[];if(e.mode==="horizontal"&&o.value){const w=em(h),A=u.value===-1?w:w.slice(0,u.value),x=u.value===-1?[]:w.slice(u.value);x!=null&&x.length&&e.ellipsis&&(h=A,p.push(vt(D3,{index:"sub-menu-more",class:f.e("hide-arrow")},{title:()=>vt(Rn,{class:f.e("icon-more")},{default:()=>vt(Exe)}),default:()=>x})))}const g=QP(e,0),b=vt("ul",{key:String(e.collapse),role:"menubar",ref:o,style:g.value,class:{[l.b()]:!0,[l.m(e.mode)]:!0,[l.m("collapse")]:e.collapse}},[...h,...p]);return e.collapseTransition&&e.mode==="vertical"?vt(LMe,()=>b):b}}});const qMe=Kr({index:{type:$t([String,null]),default:null},route:{type:$t([String,Object])},disabled:Boolean}),VMe={click:e=>Bt(e.index)&&Array.isArray(e.indexPath)},z3="ElMenuItem",HMe=st({name:z3,components:{ElTooltip:N3},props:qMe,emits:VMe,setup(e,{emit:t}){const r=rn(),n=At("rootMenu"),a=Qt("menu"),i=Qt("menu-item");n||zu(z3,"can not inject root menu");const{parentMenu:o,indexPath:l}=XP(r,ra(e,"index")),f=At(`subMenu:${o.value.uid}`);f||zu(z3,"can not inject sub menu");const u=Ee(()=>e.index===n.activeIndex),d=Vn({index:e.index,indexPath:l,active:u}),m=()=>{e.disabled||(n.handleMenuItemClick({index:e.index,indexPath:l.value,route:e.route}),t("click",d))};return ir(()=>{f.addSubMenu(d),n.addMenuItem(d)}),fn(()=>{f.removeSubMenu(d),n.removeMenuItem(d)}),{parentMenu:o,rootMenu:n,active:u,nsMenu:a,nsMenuItem:i,handleClick:m}}});function jMe(e,t,r,n,a,i){const o=po("el-tooltip");return me(),Fe("li",{class:Te([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...l)=>e.handleClick&&e.handleClick(...l))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(me(),et(o,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:rt(()=>[Ot(e.$slots,"title")]),default:rt(()=>[Ue("div",{class:Te(e.nsMenu.be("tooltip","trigger"))},[Ot(e.$slots,"default")],2)]),_:3},8,["effect"])):(me(),Fe(wt,{key:1},[Ot(e.$slots,"default"),Ot(e.$slots,"title")],64))],2)}var eF=vr(HMe,[["render",jMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const KMe=st({name:"ElMenuItemGroup",props:{title:String},setup(){return{ns:Qt("menu-item-group")}}});function WMe(e,t,r,n,a,i){return me(),Fe("li",{class:Te(e.ns.b())},[Ue("div",{class:Te(e.ns.e("title"))},[e.$slots.title?Ot(e.$slots,"title",{key:1}):(me(),Fe(wt,{key:0},[br(ot(e.title),1)],64))],2),Ue("ul",null,[Ot(e.$slots,"default")])],2)}var tF=vr(KMe,[["render",WMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const rF=Ni(UMe,{MenuItem:eF,MenuItemGroup:tF,SubMenu:D3}),nF=bf(eF);bf(tF),bf(D3);const iF=Symbol("ElSelectGroup"),Em=Symbol("ElSelect");function GMe(e,t){const r=At(Em),n=At(iF,{disabled:!1}),a=Ee(()=>Object.prototype.toString.call(e.value).toLowerCase()==="[object object]"),i=Ee(()=>r.props.multiple?m(r.props.modelValue,e.value):v(e.value,r.props.modelValue)),o=Ee(()=>{if(r.props.multiple){const E=r.props.modelValue||[];return!i.value&&E.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),l=Ee(()=>e.label||(a.value?"":e.value)),f=Ee(()=>e.value||e.label||""),u=Ee(()=>e.disabled||t.groupDisabled||o.value),d=rn(),m=(E=[],C)=>{if(a.value){const T=r.props.valueKey;return E&&E.some(I=>Tt(bi(I,T))===bi(C,T))}else return E&&E.includes(C)},v=(E,C)=>{if(a.value){const{valueKey:T}=r.props;return bi(E,T)===bi(C,T)}else return E===C},y=()=>{!e.disabled&&!n.disabled&&(r.hoverIndex=r.optionsArray.indexOf(d.proxy))};ut(()=>l.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),ut(()=>e.value,(E,C)=>{const{remote:T,valueKey:I}=r.props;if(Object.is(E,C)||(r.onOptionDestroy(C,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!T){if(I&&typeof E=="object"&&typeof C=="object"&&E[I]===C[I])return;r.setSelected()}}),ut(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0});const{queryChange:_}=Tt(r);return ut(_,E=>{const{query:C}=W(E),T=new RegExp(m3e(C),"i");t.visible=T.test(l.value)||e.created,t.visible||r.filteredOptionsCount--},{immediate:!0}),{select:r,currentLabel:l,currentValue:f,itemSelected:i,isDisabled:u,hoverItem:y}}const ZMe=st({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Qt("select"),r=Ee(()=>[t.be("dropdown","item"),t.is("disabled",W(o)),{selected:W(i),hover:W(d)}]),n=Vn({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:a,itemSelected:i,isDisabled:o,select:l,hoverItem:f}=GMe(e,n),{visible:u,hover:d}=Ql(n),m=rn().proxy;l.onOptionCreate(m),fn(()=>{const y=m.value,{selected:_}=l,C=(l.props.multiple?_:[_]).some(T=>T.value===m.value);kt(()=>{l.cachedOptions.get(y)===m&&!C&&l.cachedOptions.delete(y)}),l.onOptionDestroy(y,m)});function v(){e.disabled!==!0&&n.groupDisabled!==!0&&l.handleOptionSelect(m)}return{ns:t,containerKls:r,currentLabel:a,itemSelected:i,isDisabled:o,select:l,hoverItem:f,visible:u,hover:d,selectOptionClick:v,states:n}}});function YMe(e,t,r,n,a,i){return tn((me(),Fe("li",{class:Te(e.containerKls),onMouseenter:t[0]||(t[0]=(...o)=>e.hoverItem&&e.hoverItem(...o)),onClick:t[1]||(t[1]=Cn((...o)=>e.selectOptionClick&&e.selectOptionClick(...o),["stop"]))},[Ot(e.$slots,"default",{},()=>[Ue("span",null,ot(e.currentLabel),1)])],34)),[[vi,e.visible]])}var U3=vr(ZMe,[["render",YMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const JMe=st({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=At(Em),t=Qt("select"),r=Ee(()=>e.props.popperClass),n=Ee(()=>e.props.multiple),a=Ee(()=>e.props.fitInputWidth),i=Re("");function o(){var l;i.value=`${(l=e.selectWrapper)==null?void 0:l.offsetWidth}px`}return ir(()=>{o(),Fu(e.selectWrapper,o)}),{ns:t,minWidth:i,popperClass:r,isMultiple:n,isFitInputWidth:a}}});function XMe(e,t,r,n,a,i){return me(),Fe("div",{class:Te([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:on({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[Ot(e.$slots,"default")],6)}var QMe=vr(JMe,[["render",XMe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);function e5e(e){const{t}=tm();return Vn({options:new Map,cachedOptions:new Map,disabledOptions:new Map,createdLabel:null,createdSelected:!1,selected:e.multiple?[]:{},inputLength:20,inputWidth:0,optionsCount:0,filteredOptionsCount:0,visible:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,cachedPlaceHolder:"",currentPlaceholder:t("el.select.placeholder"),menuVisibleOnFocus:!1,isOnComposition:!1,prefixWidth:11,mouseEnter:!1,focused:!1})}const t5e=(e,t,r)=>{const{t:n}=tm(),a=Qt("select");QE({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},Ee(()=>e.suffixTransition===!1));const i=Re(null),o=Re(null),l=Re(null),f=Re(null),u=Re(null),d=Re(null),m=Re(null),v=Re(null),y=Re(-1),_=Xl({query:""}),E=Xl(""),C=Re([]);let T=0;const{form:I,formItem:k}=v3(),N=Ee(()=>!e.filterable||e.multiple||!t.visible),O=Ee(()=>e.disabled||(I==null?void 0:I.disabled)),P=Ee(()=>{const de=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!=="";return e.clearable&&!O.value&&t.inputHovering&&de}),z=Ee(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),V=Ee(()=>a.is("reverse",z.value&&t.visible&&e.suffixTransition)),L=Ee(()=>(I==null?void 0:I.statusIcon)&&(k==null?void 0:k.validateState)&&SR[k==null?void 0:k.validateState]),U=Ee(()=>e.remote?300:0),M=Ee(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&t.query===""&&t.options.size===0?!1:e.filterable&&t.query&&t.options.size>0&&t.filteredOptionsCount===0?e.noMatchText||n("el.select.noMatch"):t.options.size===0?e.noDataText||n("el.select.noData"):null),s=Ee(()=>{const de=Array.from(t.options.values()),Ve=[];return C.value.forEach(_e=>{const Ae=de.findIndex(xt=>xt.currentLabel===_e);Ae>-1&&Ve.push(de[Ae])}),Ve.length>=de.length?Ve:de}),h=Ee(()=>Array.from(t.cachedOptions.values())),p=Ee(()=>{const de=s.value.filter(Ve=>!Ve.created).some(Ve=>Ve.currentLabel===t.query);return e.filterable&&e.allowCreate&&t.query!==""&&!de}),g=Zu(),b=Ee(()=>["small"].includes(g.value)?"small":"default"),w=Ee({get(){return t.visible&&M.value!==!1},set(de){t.visible=de}});ut([()=>O.value,()=>g.value,()=>I==null?void 0:I.size],()=>{kt(()=>{A()})}),ut(()=>e.placeholder,de=>{t.cachedPlaceHolder=t.currentPlaceholder=de,e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(t.currentPlaceholder="")}),ut(()=>e.modelValue,(de,Ve)=>{e.multiple&&(A(),de&&de.length>0||o.value&&t.query!==""?t.currentPlaceholder="":t.currentPlaceholder=t.cachedPlaceHolder,e.filterable&&!e.reserveKeyword&&(t.query="",x(t.query))),B(),e.filterable&&!e.multiple&&(t.inputLength=20),!dR(de,Ve)&&e.validateEvent&&(k==null||k.validate("change").catch(_e=>yn(_e)))},{flush:"post",deep:!0}),ut(()=>t.visible,de=>{var Ve,_e,Ae,xt,ke;de?((_e=(Ve=f.value)==null?void 0:Ve.updatePopper)==null||_e.call(Ve),e.filterable&&(t.filteredOptionsCount=t.optionsCount,t.query=e.remote?"":t.selectedLabel,(xt=(Ae=l.value)==null?void 0:Ae.focus)==null||xt.call(Ae),e.multiple?(ke=o.value)==null||ke.focus():t.selectedLabel&&(t.currentPlaceholder=`${t.selectedLabel}`,t.selectedLabel=""),x(t.query),!e.multiple&&!e.remote&&(_.value.query="",fh(_),fh(E)))):(e.filterable&&(bt(e.filterMethod)&&e.filterMethod(""),bt(e.remoteMethod)&&e.remoteMethod("")),t.query="",t.previousQuery=null,t.selectedLabel="",t.inputLength=20,t.menuVisibleOnFocus=!1,H(),kt(()=>{o.value&&o.value.value===""&&t.selected.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}),e.multiple||(t.selected&&(e.filterable&&e.allowCreate&&t.createdSelected&&t.createdLabel?t.selectedLabel=t.createdLabel:t.selectedLabel=t.selected.currentLabel,e.filterable&&(t.query=t.selectedLabel)),e.filterable&&(t.currentPlaceholder=t.cachedPlaceHolder))),r.emit("visible-change",de)}),ut(()=>t.options.entries(),()=>{var de,Ve,_e;if(!hn)return;(Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de),e.multiple&&A();const Ae=((_e=m.value)==null?void 0:_e.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!pR(e.modelValue)||!Array.from(Ae).includes(document.activeElement))&&B(),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&S()},{flush:"post"}),ut(()=>t.hoverIndex,de=>{ka(de)&&de>-1?y.value=s.value[de]||{}:y.value={},s.value.forEach(Ve=>{Ve.hover=y.value===Ve})});const A=()=>{kt(()=>{var de,Ve;if(!i.value)return;const _e=i.value.$el.querySelector("input");T=T||(_e.clientHeight>0?_e.clientHeight+2:0);const Ae=d.value,xt=Hxe(g.value||(I==null?void 0:I.size)),ke=g.value||xt===T||T<=0?xt:T;!(_e.offsetParent===null)&&(_e.style.height=`${(t.selected.length===0?ke:Math.max(Ae?Ae.clientHeight+(Ae.clientHeight>ke?6:0):0,ke))-2}px`),t.visible&&M.value!==!1&&((Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de))})},x=async de=>{if(!(t.previousQuery===de||t.isOnComposition)){if(t.previousQuery===null&&(bt(e.filterMethod)||bt(e.remoteMethod))){t.previousQuery=de;return}t.previousQuery=de,kt(()=>{var Ve,_e;t.visible&&((_e=(Ve=f.value)==null?void 0:Ve.updatePopper)==null||_e.call(Ve))}),t.hoverIndex=-1,e.multiple&&e.filterable&&kt(()=>{if(!O.value){const Ve=o.value.value.length*15+20;t.inputLength=e.collapseTags?Math.min(50,Ve):Ve,c()}A()}),e.remote&&bt(e.remoteMethod)?(t.hoverIndex=-1,e.remoteMethod(de)):bt(e.filterMethod)?(e.filterMethod(de),fh(E)):(t.filteredOptionsCount=t.optionsCount,_.value.query=de,fh(_),fh(E)),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&(await kt(),S())}},c=()=>{t.currentPlaceholder!==""&&(t.currentPlaceholder=o.value.value?"":t.cachedPlaceHolder)},S=()=>{const de=s.value.filter(Ae=>Ae.visible&&!Ae.disabled&&!Ae.states.groupDisabled),Ve=de.find(Ae=>Ae.created),_e=de[0];t.hoverIndex=q(s.value,Ve||_e)},B=()=>{var de;if(e.multiple)t.selectedLabel="";else{const _e=R(e.modelValue);(de=_e.props)!=null&&de.created?(t.createdLabel=_e.props.value,t.createdSelected=!0):t.createdSelected=!1,t.selectedLabel=_e.currentLabel,t.selected=_e,e.filterable&&(t.query=t.selectedLabel);return}const Ve=[];Array.isArray(e.modelValue)&&e.modelValue.forEach(_e=>{Ve.push(R(_e))}),t.selected=Ve,kt(()=>{A()})},R=de=>{let Ve;const _e=xu(de).toLowerCase()==="object",Ae=xu(de).toLowerCase()==="null",xt=xu(de).toLowerCase()==="undefined";for(let It=t.cachedOptions.size-1;It>=0;It--){const Oe=h.value[It];if(_e?bi(Oe.value,e.valueKey)===bi(de,e.valueKey):Oe.value===de){Ve={value:de,currentLabel:Oe.currentLabel,isDisabled:Oe.isDisabled};break}}if(Ve)return Ve;const ke=_e?de.label:!Ae&&!xt?de:"",qe={value:de,currentLabel:ke};return e.multiple&&(qe.hitState=!1),qe},H=()=>{setTimeout(()=>{const de=e.valueKey;e.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(Ve=>s.value.findIndex(_e=>bi(_e,de)===bi(Ve,de)))):t.hoverIndex=-1:t.hoverIndex=s.value.findIndex(Ve=>be(Ve)===be(t.selected))},300)},X=()=>{var de,Ve;G(),(Ve=(de=f.value)==null?void 0:de.updatePopper)==null||Ve.call(de),e.multiple&&A()},G=()=>{var de;t.inputWidth=(de=i.value)==null?void 0:de.$el.offsetWidth},Y=()=>{e.filterable&&t.query!==t.selectedLabel&&(t.query=t.selectedLabel,x(t.query))},ue=hR(()=>{Y()},U.value),oe=hR(de=>{x(de.target.value)},U.value),ce=de=>{dR(e.modelValue,de)||r.emit(MR,de)},ne=de=>c3e(de,Ve=>!t.disabledOptions.has(Ve)),J=de=>{if(de.code!==bn.delete){if(de.target.value.length<=0&&!te()){const Ve=e.modelValue.slice(),_e=ne(Ve);if(_e<0)return;Ve.splice(_e,1),r.emit(Na,Ve),ce(Ve)}de.target.value.length===1&&e.modelValue.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}},j=(de,Ve)=>{const _e=t.selected.indexOf(Ve);if(_e>-1&&!O.value){const Ae=e.modelValue.slice();Ae.splice(_e,1),r.emit(Na,Ae),ce(Ae),r.emit("remove-tag",Ve.value)}de.stopPropagation(),pe()},ae=de=>{de.stopPropagation();const Ve=e.multiple?[]:"";if(!Bt(Ve))for(const _e of t.selected)_e.isDisabled&&Ve.push(_e.value);r.emit(Na,Ve),ce(Ve),t.hoverIndex=-1,t.visible=!1,r.emit("clear"),pe()},se=de=>{var Ve;if(e.multiple){const _e=(e.modelValue||[]).slice(),Ae=q(_e,de.value);Ae>-1?_e.splice(Ae,1):(e.multipleLimit<=0||_e.length<e.multipleLimit)&&_e.push(de.value),r.emit(Na,_e),ce(_e),de.created&&(t.query="",x(""),t.inputLength=20),e.filterable&&((Ve=o.value)==null||Ve.focus())}else r.emit(Na,de.value),ce(de.value),t.visible=!1;D(),!t.visible&&kt(()=>{F(de)})},q=(de=[],Ve)=>{if(!Dt(Ve))return de.indexOf(Ve);const _e=e.valueKey;let Ae=-1;return de.some((xt,ke)=>Tt(bi(xt,_e))===bi(Ve,_e)?(Ae=ke,!0):!1),Ae},D=()=>{const de=o.value||i.value;de&&(de==null||de.focus())},F=de=>{var Ve,_e,Ae,xt,ke;const qe=Array.isArray(de)?de[0]:de;let It=null;if(qe!=null&&qe.value){const Oe=s.value.filter(ze=>ze.value===qe.value);Oe.length>0&&(It=Oe[0].$el)}if(f.value&&It){const Oe=(xt=(Ae=(_e=(Ve=f.value)==null?void 0:Ve.popperRef)==null?void 0:_e.contentRef)==null?void 0:Ae.querySelector)==null?void 0:xt.call(Ae,`.${a.be("dropdown","wrap")}`);Oe&&b3e(Oe,It)}(ke=v.value)==null||ke.handleScroll()},$=de=>{t.optionsCount++,t.filteredOptionsCount++,t.options.set(de.value,de),t.cachedOptions.set(de.value,de),de.disabled&&t.disabledOptions.set(de.value,de)},re=(de,Ve)=>{t.options.get(de)===Ve&&(t.optionsCount--,t.filteredOptionsCount--,t.options.delete(de))},Q=de=>{de.code!==bn.backspace&&te(!1),t.inputLength=o.value.value.length*15+20,A()},te=de=>{if(!Array.isArray(t.selected))return;const Ve=ne(t.selected.map(Ae=>Ae.value)),_e=t.selected[Ve];if(_e)return de===!0||de===!1?(_e.hitState=de,de):(_e.hitState=!_e.hitState,_e.hitState)},le=de=>{const Ve=de.target.value;if(de.type==="compositionend")t.isOnComposition=!1,kt(()=>x(Ve));else{const _e=Ve[Ve.length-1]||"";t.isOnComposition=!CR(_e)}},Z=()=>{kt(()=>F(t.selected))},K=de=>{t.focused||((e.automaticDropdown||e.filterable)&&(e.filterable&&!t.visible&&(t.menuVisibleOnFocus=!0),t.visible=!0),t.focused=!0,r.emit("focus",de))},pe=()=>{var de,Ve;t.visible?(de=o.value||i.value)==null||de.focus():(Ve=i.value)==null||Ve.focus()},ie=()=>{var de,Ve,_e;t.visible=!1,(de=i.value)==null||de.blur(),(_e=(Ve=l.value)==null?void 0:Ve.blur)==null||_e.call(Ve)},ve=de=>{var Ve,_e,Ae;(Ve=f.value)!=null&&Ve.isFocusInsideContent(de)||(_e=u.value)!=null&&_e.isFocusInsideContent(de)||(Ae=m.value)!=null&&Ae.contains(de.relatedTarget)||(t.visible&&Se(),t.focused=!1,r.emit("blur",de))},Ye=de=>{ae(de)},Se=()=>{t.visible=!1},Ce=de=>{t.visible&&(de.preventDefault(),de.stopPropagation(),t.visible=!1)},Je=de=>{de&&!t.mouseEnter||O.value||(t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:(!f.value||!f.value.isFocusInsideContent())&&(t.visible=!t.visible),pe())},he=()=>{t.visible?s.value[t.hoverIndex]&&se(s.value[t.hoverIndex]):Je()},be=de=>Dt(de.value)?bi(de.value,e.valueKey):de.value,it=Ee(()=>s.value.filter(de=>de.visible).every(de=>de.disabled)),we=Ee(()=>e.multiple?t.selected.slice(0,e.maxCollapseTags):[]),Be=Ee(()=>e.multiple?t.selected.slice(e.maxCollapseTags):[]),gt=de=>{if(!t.visible){t.visible=!0;return}if(!(t.options.size===0||t.filteredOptionsCount===0)&&!t.isOnComposition&&!it.value){de==="next"?(t.hoverIndex++,t.hoverIndex===t.options.size&&(t.hoverIndex=0)):de==="prev"&&(t.hoverIndex--,t.hoverIndex<0&&(t.hoverIndex=t.options.size-1));const Ve=s.value[t.hoverIndex];(Ve.disabled===!0||Ve.states.groupDisabled===!0||!Ve.visible)&&gt(de),kt(()=>F(y.value))}},Ie=()=>{t.mouseEnter=!0},He=()=>{t.mouseEnter=!1},Rt=(de,Ve)=>{var _e,Ae;j(de,Ve),(Ae=(_e=u.value)==null?void 0:_e.updatePopper)==null||Ae.call(_e)},Pe=Ee(()=>({maxWidth:`${W(t.inputWidth)-32-(L.value?22:0)}px`,width:"100%"}));return{optionList:C,optionsArray:s,selectSize:g,handleResize:X,debouncedOnInputChange:ue,debouncedQueryChange:oe,deletePrevTag:J,deleteTag:j,deleteSelected:ae,handleOptionSelect:se,scrollToOption:F,readonly:N,resetInputHeight:A,showClose:P,iconComponent:z,iconReverse:V,showNewOption:p,collapseTagSize:b,setSelected:B,managePlaceholder:c,selectDisabled:O,emptyText:M,toggleLastOptionHitState:te,resetInputState:Q,handleComposition:le,onOptionCreate:$,onOptionDestroy:re,handleMenuEnter:Z,handleFocus:K,focus:pe,blur:ie,handleBlur:ve,handleClearClick:Ye,handleClose:Se,handleKeydownEscape:Ce,toggleMenu:Je,selectOption:he,getValueKey:be,navigateOptions:gt,handleDeleteTooltipTag:Rt,dropMenuVisible:w,queryChange:_,groupQueryChange:E,showTagList:we,collapseTagList:Be,selectTagsStyle:Pe,reference:i,input:o,iOSInput:l,tooltipRef:f,tagTooltipRef:u,tags:d,selectWrapper:m,scrollbar:v,handleMouseEnter:Ie,handleMouseLeave:He}};var r5e=st({name:"ElOptions",emits:["update-options"],setup(e,{slots:t,emit:r}){let n=[];function a(i,o){if(i.length!==o.length)return!1;for(const[l]of i.entries())if(i[l]!=o[l])return!1;return!0}return()=>{var i,o;const l=(i=t.default)==null?void 0:i.call(t),f=[];function u(d){Array.isArray(d)&&d.forEach(m=>{var v,y,_,E;const C=(v=(m==null?void 0:m.type)||{})==null?void 0:v.name;C==="ElOptionGroup"?u(!Bt(m.children)&&!Array.isArray(m.children)&&bt((y=m.children)==null?void 0:y.default)?(_=m.children)==null?void 0:_.default():m.children):C==="ElOption"?f.push((E=m.props)==null?void 0:E.label):Array.isArray(m.children)&&u(m.children)})}return l.length&&u((o=l[0])==null?void 0:o.children),a(f,n)||(n=f,r("update-options",f)),l}}});const aF="ElSelect",n5e=st({name:aF,componentName:aF,components:{ElInput:dm,ElSelectMenu:QMe,ElOption:U3,ElOptions:r5e,ElTag:wMe,ElScrollbar:WSe,ElTooltip:N3,ElIcon:Rn},directives:{ClickOutside:mMe},props:{name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:{type:String,validator:jxe},effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:k3.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:oa,default:XE},fitInputWidth:Boolean,suffixIcon:{type:oa,default:gR},tagType:{...JP.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:String,values:nm,default:"bottom-start"},ariaLabel:{type:String,default:void 0}},emits:[Na,MR,"remove-tag","clear","visible-change","focus","blur"],setup(e,t){const r=Qt("select"),n=Qt("input"),{t:a}=tm(),i=e5e(e),{optionList:o,optionsArray:l,selectSize:f,readonly:u,handleResize:d,collapseTagSize:m,debouncedOnInputChange:v,debouncedQueryChange:y,deletePrevTag:_,deleteTag:E,deleteSelected:C,handleOptionSelect:T,scrollToOption:I,setSelected:k,resetInputHeight:N,managePlaceholder:O,showClose:P,selectDisabled:z,iconComponent:V,iconReverse:L,showNewOption:U,emptyText:M,toggleLastOptionHitState:s,resetInputState:h,handleComposition:p,onOptionCreate:g,onOptionDestroy:b,handleMenuEnter:w,handleFocus:A,focus:x,blur:c,handleBlur:S,handleClearClick:B,handleClose:R,handleKeydownEscape:H,toggleMenu:X,selectOption:G,getValueKey:Y,navigateOptions:ue,handleDeleteTooltipTag:oe,dropMenuVisible:ce,reference:ne,input:J,iOSInput:j,tooltipRef:ae,tagTooltipRef:se,tags:q,selectWrapper:D,scrollbar:F,queryChange:$,groupQueryChange:re,handleMouseEnter:Q,handleMouseLeave:te,showTagList:le,collapseTagList:Z,selectTagsStyle:K}=t5e(e,i,t),{inputWidth:pe,selected:ie,inputLength:ve,filteredOptionsCount:Ye,visible:Se,selectedLabel:Ce,hoverIndex:Je,query:he,inputHovering:be,currentPlaceholder:it,menuVisibleOnFocus:we,isOnComposition:Be,options:gt,cachedOptions:Ie,optionsCount:He,prefixWidth:Rt}=Ql(i),Pe=Ee(()=>{const ze=[r.b()],Nt=W(f);return Nt&&ze.push(r.m(Nt)),e.disabled&&ze.push(r.m("disabled")),ze}),de=Ee(()=>[r.e("tags"),r.is("disabled",W(z))]),Ve=Ee(()=>[r.b("tags-wrapper"),{"has-prefix":W(Rt)&&W(ie).length}]),_e=Ee(()=>[r.e("input"),r.is(W(f)),r.is("disabled",W(z))]),Ae=Ee(()=>[r.e("input"),r.is(W(f)),r.em("input","iOS")]),xt=Ee(()=>[r.is("empty",!e.allowCreate&&!!W(he)&&W(Ye)===0)]),ke=Ee(()=>({maxWidth:`${W(pe)>123?W(pe)-123:W(pe)-75}px`})),qe=Ee(()=>({marginLeft:`${W(Rt)}px`,flexGrow:1,width:`${W(ve)/(W(pe)-32)}%`,maxWidth:`${W(pe)-42}px`}));un(Em,Vn({props:e,options:gt,optionsArray:l,cachedOptions:Ie,optionsCount:He,filteredOptionsCount:Ye,hoverIndex:Je,handleOptionSelect:T,onOptionCreate:g,onOptionDestroy:b,selectWrapper:D,selected:ie,setSelected:k,queryChange:$,groupQueryChange:re})),ir(()=>{i.cachedPlaceHolder=it.value=e.placeholder||(()=>a("el.select.placeholder")),e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(it.value=""),Fu(D,d),e.remote&&e.multiple&&N(),kt(()=>{const ze=ne.value&&ne.value.$el;if(ze&&(pe.value=ze.getBoundingClientRect().width,t.slots.prefix)){const Nt=ze.querySelector(`.${n.e("prefix")}`);Rt.value=Math.max(Nt.getBoundingClientRect().width+11,30)}}),k()}),e.multiple&&!Array.isArray(e.modelValue)&&t.emit(Na,[]),!e.multiple&&Array.isArray(e.modelValue)&&t.emit(Na,"");const It=Ee(()=>{var ze,Nt;return(Nt=(ze=ae.value)==null?void 0:ze.popperRef)==null?void 0:Nt.contentRef});return{isIOS:Bye,onOptionsRendered:ze=>{o.value=ze},prefixWidth:Rt,selectSize:f,readonly:u,handleResize:d,collapseTagSize:m,debouncedOnInputChange:v,debouncedQueryChange:y,deletePrevTag:_,deleteTag:E,handleDeleteTooltipTag:oe,deleteSelected:C,handleOptionSelect:T,scrollToOption:I,inputWidth:pe,selected:ie,inputLength:ve,filteredOptionsCount:Ye,visible:Se,selectedLabel:Ce,hoverIndex:Je,query:he,inputHovering:be,currentPlaceholder:it,menuVisibleOnFocus:we,isOnComposition:Be,options:gt,resetInputHeight:N,managePlaceholder:O,showClose:P,selectDisabled:z,iconComponent:V,iconReverse:L,showNewOption:U,emptyText:M,toggleLastOptionHitState:s,resetInputState:h,handleComposition:p,handleMenuEnter:w,handleFocus:A,focus:x,blur:c,handleBlur:S,handleClearClick:B,handleClose:R,handleKeydownEscape:H,toggleMenu:X,selectOption:G,getValueKey:Y,navigateOptions:ue,dropMenuVisible:ce,reference:ne,input:J,iOSInput:j,tooltipRef:ae,popperPaneRef:It,tags:q,selectWrapper:D,scrollbar:F,wrapperKls:Pe,tagsKls:de,tagWrapperKls:Ve,inputKls:_e,iOSInputKls:Ae,scrollbarKls:xt,selectTagsStyle:K,nsSelect:r,tagTextStyle:ke,inputStyle:qe,handleMouseEnter:Q,handleMouseLeave:te,showTagList:le,collapseTagList:Z,tagTooltipRef:se}}}),i5e=["disabled","autocomplete","aria-label"],a5e=["disabled"],o5e={style:{height:"100%",display:"flex","justify-content":"center","align-items":"center"}};function s5e(e,t,r,n,a,i){const o=po("el-tag"),l=po("el-tooltip"),f=po("el-icon"),u=po("el-input"),d=po("el-option"),m=po("el-options"),v=po("el-scrollbar"),y=po("el-select-menu"),_=Iw("click-outside");return tn((me(),Fe("div",{ref:"selectWrapper",class:Te(e.wrapperKls),onMouseenter:t[22]||(t[22]=(...E)=>e.handleMouseEnter&&e.handleMouseEnter(...E)),onMouseleave:t[23]||(t[23]=(...E)=>e.handleMouseLeave&&e.handleMouseLeave(...E)),onClick:t[24]||(t[24]=Cn((...E)=>e.toggleMenu&&e.toggleMenu(...E),["stop"]))},[ht(l,{ref:"tooltipRef",visible:e.dropMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onShow:e.handleMenuEnter},{default:rt(()=>[Ue("div",{class:"select-trigger",onMouseenter:t[20]||(t[20]=E=>e.inputHovering=!0),onMouseleave:t[21]||(t[21]=E=>e.inputHovering=!1)},[e.multiple?(me(),Fe("div",{key:0,ref:"tags",tabindex:"-1",class:Te(e.tagsKls),style:on(e.selectTagsStyle),onClick:t[15]||(t[15]=(...E)=>e.focus&&e.focus(...E))},[e.collapseTags&&e.selected.length?(me(),et(aa,{key:0,onAfterLeave:e.resetInputHeight},{default:rt(()=>[Ue("span",{class:Te(e.tagWrapperKls)},[(me(!0),Fe(wt,null,jn(e.showTagList,E=>(me(),et(o,{key:e.getValueKey(E),closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",onClose:C=>e.deleteTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on(e.tagTextStyle)},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128)),e.selected.length>e.maxCollapseTags?(me(),et(o,{key:0,closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":""},{default:rt(()=>[e.collapseTagsTooltip?(me(),et(l,{key:0,ref:"tagTooltipRef",disabled:e.dropMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text"))},"+ "+ot(e.selected.length-e.maxCollapseTags),3)]),content:rt(()=>[Ue("div",{class:Te(e.nsSelect.e("collapse-tags"))},[(me(!0),Fe(wt,null,jn(e.collapseTagList,E=>(me(),Fe("div",{key:e.getValueKey(E),class:Te(e.nsSelect.e("collapse-tag"))},[ht(o,{class:"in-tooltip",closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",style:{margin:"2px"},onClose:C=>e.handleDeleteTooltipTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on({maxWidth:e.inputWidth-75+"px"})},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):(me(),Fe("span",{key:1,class:Te(e.nsSelect.e("tags-text"))},"+ "+ot(e.selected.length-e.maxCollapseTags),3))]),_:1},8,["size","type"])):Xe("v-if",!0)],2)]),_:1},8,["onAfterLeave"])):Xe("v-if",!0),e.collapseTags?Xe("v-if",!0):(me(),et(aa,{key:1,onAfterLeave:e.resetInputHeight},{default:rt(()=>[Ue("span",{class:Te(e.tagWrapperKls),style:on(e.prefixWidth&&e.selected.length?{marginLeft:`${e.prefixWidth}px`}:"")},[(me(!0),Fe(wt,null,jn(e.selected,E=>(me(),et(o,{key:e.getValueKey(E),closable:!e.selectDisabled&&!E.isDisabled,size:e.collapseTagSize,hit:E.hitState,type:e.tagType,"disable-transitions":"",onClose:C=>e.deleteTag(C,E)},{default:rt(()=>[Ue("span",{class:Te(e.nsSelect.e("tags-text")),style:on({maxWidth:e.inputWidth-75+"px"})},ot(E.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128))],6)]),_:1},8,["onAfterLeave"])),e.filterable&&!e.selectDisabled?tn((me(),Fe("input",{key:2,ref:"input","onUpdate:modelValue":t[0]||(t[0]=E=>e.query=E),type:"text",class:Te(e.inputKls),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:on(e.inputStyle),"aria-label":e.ariaLabel,onFocus:t[1]||(t[1]=(...E)=>e.handleFocus&&e.handleFocus(...E)),onBlur:t[2]||(t[2]=(...E)=>e.handleBlur&&e.handleBlur(...E)),onKeyup:t[3]||(t[3]=(...E)=>e.managePlaceholder&&e.managePlaceholder(...E)),onKeydown:[t[4]||(t[4]=(...E)=>e.resetInputState&&e.resetInputState(...E)),t[5]||(t[5]=Ma(Cn(E=>e.navigateOptions("next"),["prevent"]),["down"])),t[6]||(t[6]=Ma(Cn(E=>e.navigateOptions("prev"),["prevent"]),["up"])),t[7]||(t[7]=Ma((...E)=>e.handleKeydownEscape&&e.handleKeydownEscape(...E),["esc"])),t[8]||(t[8]=Ma(Cn((...E)=>e.selectOption&&e.selectOption(...E),["stop","prevent"]),["enter"])),t[9]||(t[9]=Ma((...E)=>e.deletePrevTag&&e.deletePrevTag(...E),["delete"])),t[10]||(t[10]=Ma(E=>e.visible=!1,["tab"]))],onCompositionstart:t[11]||(t[11]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onCompositionupdate:t[12]||(t[12]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onCompositionend:t[13]||(t[13]=(...E)=>e.handleComposition&&e.handleComposition(...E)),onInput:t[14]||(t[14]=(...E)=>e.debouncedQueryChange&&e.debouncedQueryChange(...E))},null,46,i5e)),[[Ege,e.query]]):Xe("v-if",!0)],6)):Xe("v-if",!0),Xe(" fix: https://github.com/element-plus/element-plus/issues/11415 "),e.isIOS&&!e.multiple&&e.filterable&&e.readonly?(me(),Fe("input",{key:1,ref:"iOSInput",class:Te(e.iOSInputKls),disabled:e.selectDisabled,type:"text"},null,10,a5e)):Xe("v-if",!0),ht(u,{id:e.id,ref:"reference",modelValue:e.selectedLabel,"onUpdate:modelValue":t[16]||(t[16]=E=>e.selectedLabel=E),type:"text",placeholder:typeof e.currentPlaceholder=="function"?e.currentPlaceholder():e.currentPlaceholder,name:e.name,autocomplete:e.autocomplete,size:e.selectSize,disabled:e.selectDisabled,readonly:e.readonly,"validate-event":!1,class:Te([e.nsSelect.is("focus",e.visible)]),tabindex:e.multiple&&e.filterable?-1:void 0,label:e.ariaLabel,onFocus:e.handleFocus,onBlur:e.handleBlur,onInput:e.debouncedOnInputChange,onPaste:e.debouncedOnInputChange,onCompositionstart:e.handleComposition,onCompositionupdate:e.handleComposition,onCompositionend:e.handleComposition,onKeydown:[t[17]||(t[17]=Ma(Cn(E=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[18]||(t[18]=Ma(Cn(E=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),Ma(Cn(e.selectOption,["stop","prevent"]),["enter"]),Ma(e.handleKeydownEscape,["esc"]),t[19]||(t[19]=Ma(E=>e.visible=!1,["tab"]))]},kw({suffix:rt(()=>[e.iconComponent&&!e.showClose?(me(),et(f,{key:0,class:Te([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:rt(()=>[(me(),et(ni(e.iconComponent)))]),_:1},8,["class"])):Xe("v-if",!0),e.showClose&&e.clearIcon?(me(),et(f,{key:1,class:Te([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:rt(()=>[(me(),et(ni(e.clearIcon)))]),_:1},8,["class","onClick"])):Xe("v-if",!0)]),_:2},[e.$slots.prefix?{name:"prefix",fn:rt(()=>[Ue("div",o5e,[Ot(e.$slots,"prefix")])])}:void 0]),1032,["id","modelValue","placeholder","name","autocomplete","size","disabled","readonly","class","tabindex","label","onFocus","onBlur","onInput","onPaste","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown"])],32)]),content:rt(()=>[ht(y,null,{default:rt(()=>[tn(ht(v,{ref:"scrollbar",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:Te(e.scrollbarKls)},{default:rt(()=>[e.showNewOption?(me(),et(d,{key:0,value:e.query,created:!0},null,8,["value"])):Xe("v-if",!0),ht(m,{onUpdateOptions:e.onOptionsRendered},{default:rt(()=>[Ot(e.$slots,"default")]),_:3},8,["onUpdateOptions"])]),_:3},8,["wrap-class","view-class","class"]),[[vi,e.options.size>0&&!e.loading]]),e.emptyText&&(!e.allowCreate||e.loading||e.allowCreate&&e.options.size===0)?(me(),Fe(wt,{key:0},[e.$slots.empty?Ot(e.$slots,"empty",{key:0}):(me(),Fe("p",{key:1,class:Te(e.nsSelect.be("dropdown","empty"))},ot(e.emptyText),3))],64)):Xe("v-if",!0)]),_:3})]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onShow"])],34)),[[_,e.handleClose,e.popperPaneRef]])}var l5e=vr(n5e,[["render",s5e],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const f5e=st({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Qt("select"),r=Re(!0),n=rn(),a=Re([]);un(iF,Vn({...Ql(e)}));const i=At(Em);ir(()=>{a.value=o(n.subTree)});const o=f=>{const u=[];return Array.isArray(f.children)&&f.children.forEach(d=>{var m;d.type&&d.type.name==="ElOption"&&d.component&&d.component.proxy?u.push(d.component.proxy):(m=d.children)!=null&&m.length&&u.push(...o(d))}),u},{groupQueryChange:l}=Tt(i);return ut(l,()=>{r.value=a.value.some(f=>f.visible===!0)},{flush:"post"}),{visible:r,ns:t}}});function u5e(e,t,r,n,a,i){return tn((me(),Fe("ul",{class:Te(e.ns.be("group","wrap"))},[Ue("li",{class:Te(e.ns.be("group","title"))},ot(e.label),3),Ue("li",null,[Ue("ul",{class:Te(e.ns.b("group"))},[Ot(e.$slots,"default")],2)])],2)),[[vi,e.visible]])}var oF=vr(f5e,[["render",u5e],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const xm=Ni(l5e,{Option:U3,OptionGroup:oF}),Sm=bf(U3);bf(oF);function c5e(e){let t;const r=Re(!1),n=Vn({...e,originalPosition:"",originalOverflow:"",visible:!1});function a(v){n.text=v}function i(){const v=n.parent,y=m.ns;if(!v.vLoadingAddClassList){let _=v.getAttribute("loading-number");_=Number.parseInt(_)-1,_?v.setAttribute("loading-number",_.toString()):(yf(v,y.bm("parent","relative")),v.removeAttribute("loading-number")),yf(v,y.bm("parent","hidden"))}o(),d.unmount()}function o(){var v,y;(y=(v=m.$el)==null?void 0:v.parentNode)==null||y.removeChild(m.$el)}function l(){var v;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(f,400),n.visible=!1,(v=e.closed)==null||v.call(e))}function f(){if(!r.value)return;const v=n.parent;r.value=!1,v.vLoadingAddClassList=void 0,i()}const u=st({name:"ElLoading",setup(v,{expose:y}){const{ns:_,zIndex:E}=uP("loading");return y({ns:_,zIndex:E}),()=>{const C=n.spinner||n.svg,T=vt("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...C?{innerHTML:C}:{}},[vt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),I=n.text?vt("p",{class:_.b("text")},[n.text]):void 0;return vt(aa,{name:_.b("fade"),onAfterLeave:f},{default:rt(()=>[tn(ht("div",{style:{backgroundColor:n.background||""},class:[_.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[vt("div",{class:_.b("spinner")},[T,I])]),[[vi,n.visible]])])})}}}),d=zk(u),m=d.mount(document.createElement("div"));return{...Ql(n),setText:a,removeElLoadingChild:o,close:l,handleAfterLeave:f,vm:m,get $el(){return m.$el}}}let Mm;const h5e=function(e={}){if(!hn)return;const t=d5e(e);if(t.fullscreen&&Mm)return Mm;const r=c5e({...t,closed:()=>{var a;(a=t.closed)==null||a.call(t),t.fullscreen&&(Mm=void 0)}});p5e(t,t.parent,r),sF(t,t.parent,r),t.parent.vLoadingAddClassList=()=>sF(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),kt(()=>r.visible.value=t.visible),t.fullscreen&&(Mm=r),r},d5e=e=>{var t,r,n,a;let i;return Bt(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,target:i}},p5e=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,a={};if(e.fullscreen)r.originalPosition.value=qh(document.body,"position"),r.originalOverflow.value=qh(document.body,"overflow"),a.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=qh(document.body,"position"),await kt();for(const i of["top","left"]){const o=i==="top"?"scrollTop":"scrollLeft";a[i]=`${e.target.getBoundingClientRect()[i]+document.body[o]+document.documentElement[o]-Number.parseInt(qh(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])a[i]=`${e.target.getBoundingClientRect()[i]}px`}else r.originalPosition.value=qh(t,"position");for(const[i,o]of Object.entries(a))r.$el.style[i]=o},sF=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?yf(t,n.bm("parent","relative")):Uu(t,n.bm("parent","relative")),e.fullscreen&&e.lock?Uu(t,n.bm("parent","hidden")):yf(t,n.bm("parent","hidden"))},q3=Symbol("ElLoading"),lF=(e,t)=>{var r,n,a,i;const o=t.instance,l=v=>Dt(t.value)?t.value[v]:void 0,f=v=>{const y=Bt(v)&&(o==null?void 0:o[v])||v;return y&&Re(y)},u=v=>f(l(v)||e.getAttribute(`element-loading-${lo(v)}`)),d=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,m={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:e,body:(a=l("body"))!=null?a:t.modifiers.body,lock:(i=l("lock"))!=null?i:t.modifiers.lock};e[q3]={options:m,instance:h5e(m)}},v5e=(e,t)=>{for(const r of Object.keys(t))hr(t[r])&&(t[r].value=e[r])},Mf={mounted(e,t){t.value&&lF(e,t)},updated(e,t){const r=e[q3];t.oldValue!==t.value&&(t.value&&!t.oldValue?lF(e,t):t.value&&t.oldValue?Dt(t.value)&&v5e(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[q3])==null||t.instance.close()}},fF=["success","info","warning","error"],m5e=Kr({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:oa},id:{type:String,default:""},message:{type:$t([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:$t(Function),default:()=>{}},onClose:{type:$t(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:[...fF,""],default:""},zIndex:Number}),g5e={destroy:()=>!0},y5e=["id"],b5e=["textContent"],_5e={key:0},w5e=["innerHTML"],E5e=st({name:"ElNotification"}),x5e=st({...E5e,props:m5e,emits:g5e,setup(e,{expose:t}){const r=e,{ns:n,zIndex:a}=uP("notification"),{nextZIndex:i,currentZIndex:o}=a,{Close:l}=zxe,f=Re(!1);let u;const d=Ee(()=>{const k=r.type;return k&&Qv[r.type]?n.m(k):""}),m=Ee(()=>r.type&&Qv[r.type]||r.icon),v=Ee(()=>r.position.endsWith("right")?"right":"left"),y=Ee(()=>r.position.startsWith("top")?"top":"bottom"),_=Ee(()=>{var k;return{[y.value]:`${r.offset}px`,zIndex:(k=r.zIndex)!=null?k:o.value}});function E(){r.duration>0&&({stop:u}=xE(()=>{f.value&&T()},r.duration))}function C(){u==null||u()}function T(){f.value=!1}function I({code:k}){k===bn.delete||k===bn.backspace?C():k===bn.esc?f.value&&T():E()}return ir(()=>{E(),i(),f.value=!0}),Jo(document,"keydown",I),t({visible:f,close:T}),(k,N)=>(me(),et(aa,{name:W(n).b("fade"),onBeforeLeave:k.onClose,onAfterLeave:N[1]||(N[1]=O=>k.$emit("destroy")),persisted:""},{default:rt(()=>[tn(Ue("div",{id:k.id,class:Te([W(n).b(),k.customClass,W(v)]),style:on(W(_)),role:"alert",onMouseenter:C,onMouseleave:E,onClick:N[0]||(N[0]=(...O)=>k.onClick&&k.onClick(...O))},[W(m)?(me(),et(W(Rn),{key:0,class:Te([W(n).e("icon"),W(d)])},{default:rt(()=>[(me(),et(ni(W(m))))]),_:1},8,["class"])):Xe("v-if",!0),Ue("div",{class:Te(W(n).e("group"))},[Ue("h2",{class:Te(W(n).e("title")),textContent:ot(k.title)},null,10,b5e),tn(Ue("div",{class:Te(W(n).e("content")),style:on(k.title?void 0:{margin:0})},[Ot(k.$slots,"default",{},()=>[k.dangerouslyUseHTMLString?(me(),Fe(wt,{key:1},[Xe(" Caution here, message could've been compromised, never use user's input as message "),Ue("p",{innerHTML:k.message},null,8,w5e)],2112)):(me(),Fe("p",_5e,ot(k.message),1))])],6),[[vi,k.message]]),k.showClose?(me(),et(W(Rn),{key:0,class:Te(W(n).e("closeBtn")),onClick:Cn(T,["stop"])},{default:rt(()=>[ht(W(l))]),_:1},8,["class","onClick"])):Xe("v-if",!0)],2)],46,y5e),[[vi,f.value]])]),_:3},8,["name","onBeforeLeave"]))}});var S5e=vr(x5e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);const Cm={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},V3=16;let M5e=1;const Qu=function(e={},t=null){if(!hn)return{close:()=>{}};(typeof e=="string"||Ea(e))&&(e={message:e});const r=e.position||"top-right";let n=e.offset||0;Cm[r].forEach(({vm:d})=>{var m;n+=(((m=d.el)==null?void 0:m.offsetHeight)||0)+V3}),n+=V3;const a=`notification_${M5e++}`,i=e.onClose,o={...e,offset:n,id:a,onClose:()=>{C5e(a,r,i)}};let l=document.body;gf(e.appendTo)?l=e.appendTo:Bt(e.appendTo)&&(l=document.querySelector(e.appendTo)),gf(l)||(yn("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),l=document.body);const f=document.createElement("div"),u=ht(S5e,o,Ea(o.message)?{default:()=>o.message}:null);return u.appContext=t??Qu._context,u.props.onDestroy=()=>{$k(null,f)},$k(u,f),Cm[r].push({vm:u}),l.appendChild(f.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};fF.forEach(e=>{Qu[e]=(t={})=>((typeof t=="string"||Ea(t))&&(t={message:t}),Qu({...t,type:e}))});function C5e(e,t,r){const n=Cm[t],a=n.findIndex(({vm:u})=>{var d;return((d=u.component)==null?void 0:d.props.id)===e});if(a===-1)return;const{vm:i}=n[a];if(!i)return;r==null||r(i);const o=i.el.offsetHeight,l=t.split("-")[0];n.splice(a,1);const f=n.length;if(!(f<1))for(let u=a;u<f;u++){const{el:d,component:m}=n[u].vm,v=Number.parseInt(d.style[l],10)-o-V3;m.props.offset=v}}function T5e(){for(const e of Object.values(Cm))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}Qu.closeAll=T5e,Qu._context=null;const Vt=qxe(Qu,"$notify");/*! Element Plus v2.3.14 */var A5e={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new 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",week:"week",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"},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"},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"}}};/*! Element Plus v2.3.14 */var I5e={name:"es",el:{colorpicker:{confirm:"Confirmar",clear:"Despejar"},datepicker:{now:"Ahora",today:"Hoy",cancel:"Cancelar",clear:"Despejar",confirm:"Confirmar",selectDate:"Seleccionar fecha",selectTime:"Seleccionar hora",startDate:"Fecha Incial",startTime:"Hora Inicial",endDate:"Fecha Final",endTime:"Hora Final",prevYear:"Año Anterior",nextYear:"Próximo Año",prevMonth:"Mes Anterior",nextMonth:"Próximo 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é",thu:"jue",fri:"vie",sat:"sáb"},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"}},select:{loading:"Cargando",noMatch:"No hay datos que coincidan",noData:"Sin datos",placeholder:"Seleccionar"},cascader:{noMatch:"No hay datos que coincidan",loading:"Cargando",placeholder:"Seleccionar",noData:"Sin datos"},pagination:{goto:"Ir a",pagesize:"/página",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"},messagebox:{confirm:"Aceptar",cancel:"Cancelar",error:"Entrada inválida"},upload:{deleteTip:"Pulse Eliminar para retirar",delete:"Eliminar",preview:"Vista Previa",continue:"Continuar"},table:{emptyText:"Sin Datos",confirmFilter:"Confirmar",resetFilter:"Reiniciar",clearFilter:"Despejar",sumText:"Suma"},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ículos",hasCheckedFormat:"{checked}/{total} revisados"},image:{error:"HA FALLADO"},pageHeader:{title:"Volver"},popconfirm:{confirmButtonText:"Si",cancelButtonText:"No"}}};const B5e={key:0,fill:"#31383e",stroke:"#31383e",width:"24",height:"24"},k5e=[Ue("path",{d:"M11.672 3.891L3.563 12l8.109 8.109-1.781 1.781L0 11.999l9.891-9.891z"},null,-1)],N5e={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 129 129"},O5e=[Ue("path",{d:"M7.6 121.4c.8.8 1.8 1.2 2.9 1.2s2.1-.4 2.9-1.2l51.1-51.1 51.1 51.1c.8.8 1.8 1.2 2.9 1.2 1 0 2.1-.4 2.9-1.2 1.6-1.6 1.6-4.2 0-5.8L70.3 64.5l51.1-51.1c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8 0L64.5 58.7 13.4 7.6C11.8 6 9.2 6 7.6 7.6s-1.6 4.2 0 5.8l51.1 51.1-51.1 51.1c-1.6 1.6-1.6 4.2 0 5.8z"},null,-1)],R5e={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},P5e=[Ue("circle",{cx:"25",cy:"25",r:"25",fill:"#d75a4a"},null,-1),Ue("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)],F5e={key:3,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},L5e=[Ue("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)],D5e={key:4,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#31383e"},$5e=[Ue("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)],z5e={key:5,width:"27",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U5e=[Pme('<path d="M13.069 1.886c3.491 2.404 9.057 3.57 11.43 3.978a23.013 23.013 0 01-11.447 22.46A23.015 23.015 0 011.468 8.33c0-.8.046-1.62.136-2.45 2.423-.386 8.097-1.51 11.465-3.995zM13.029 0C9.482 3.51.294 4.584.294 4.584A24.578 24.578 0 000 8.331C0 17.73 5.292 25.885 13.052 30c7.76-4.115 13.051-12.27 13.051-21.669 0-1.275-.104-2.523-.292-3.747 0 0-8.947-1.182-12.782-4.584z" fill="#34974A"></path><path d="M13.069 1.886c3.491 2.404 9.057 3.57 11.43 3.978a23.013 23.013 0 01-11.447 22.46A23.015 23.015 0 011.468 8.33c0-.8.046-1.62.136-2.45 2.423-.386 8.097-1.51 11.465-3.995zM13.029 0C9.482 3.51.294 4.584.294 4.584A24.578 24.578 0 000 8.331C0 17.73 5.292 25.885 13.052 30c7.76-4.115 13.051-12.27 13.051-21.669 0-1.275-.104-2.523-.292-3.747 0 0-8.947-1.182-12.782-4.584z" fill="url(#paint0_linear)"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.036 10.396c0-.88.072-1.744.203-2.592 0 0 6.346-.741 8.797-3.165 2.649 2.35 8.83 3.165 8.83 3.165.127.848.201 1.711.201 2.592 0 6.49-3.656 12.122-9.015 14.964-5.36-2.842-9.016-8.474-9.016-14.964zm13.133 1.812a.541.541 0 010 .759l-4.04 4.04-.76.759a.542.542 0 01-.758 0l-.76-.76-2.02-2.02a.541.541 0 010-.758l.76-.76a.541.541 0 01.758 0l1.641 1.647 3.66-3.666a.542.542 0 01.76 0l.759.759z" fill="#34974A"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.036 10.396c0-.88.072-1.744.203-2.592 0 0 6.346-.741 8.797-3.165 2.649 2.35 8.83 3.165 8.83 3.165.127.848.201 1.711.201 2.592 0 6.49-3.656 12.122-9.015 14.964-5.36-2.842-9.016-8.474-9.016-14.964zm13.133 1.812a.541.541 0 010 .759l-4.04 4.04-.76.759a.542.542 0 01-.758 0l-.76-.76-2.02-2.02a.541.541 0 010-.758l.76-.76a.541.541 0 01.758 0l1.641 1.647 3.66-3.666a.542.542 0 01.76 0l.759.759z" fill="url(#paint1_linear)"></path><defs><linearGradient id="paint0_linear" x1="13.052" y1="0" x2="13.052" y2="30" gradientUnits="userSpaceOnUse"><stop stop-opacity="0"></stop><stop offset="1" stop-opacity=".2"></stop></linearGradient><linearGradient id="paint1_linear" x1="13.052" y1="4.639" x2="13.052" y2="25.36" gradientUnits="userSpaceOnUse"><stop stop-opacity=".25"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"></stop></linearGradient></defs>',5)],q5e={key:6,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"},V5e=[Ue("circle",{cx:"25",cy:"25",r:"25",fill:"#25ae88"},null,-1),Ue("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)],H5e={key:7,xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",fill:"none"},j5e=[Ue("path",{d:"M5.516 4l2.275-2.274a.715.715 0 000-1.011L7.285.209a.715.715 0 00-1.01 0L4 2.484 1.726.209a.715.715 0 00-1.011 0L.209.715a.715.715 0 000 1.01L2.484 4 .209 6.274a.715.715 0 000 1.011l.506.506c.279.279.732.279 1.01 0L4 5.516l2.274 2.275c.28.279.732.279 1.011 0l.506-.506a.715.715 0 000-1.01L5.516 4z",fill:"#FEFEFE"},null,-1)],Fa=st({__name:"CustomIcon",props:{icon:{}},setup(e){const t=e;return(r,n)=>t.icon==="back"?(me(),Fe("svg",B5e,k5e)):t.icon==="close"?(me(),Fe("svg",N5e,O5e)):t.icon==="error"?(me(),Fe("svg",R5e,P5e)):t.icon==="eye"?(me(),Fe("svg",F5e,L5e)):t.icon==="eye-slash"?(me(),Fe("svg",D5e,$5e)):t.icon==="shield"?(me(),Fe("svg",z5e,U5e)):t.icon==="success"?(me(),Fe("svg",q5e,V5e)):t.icon==="times"?(me(),Fe("svg",H5e,j5e)):Xe("",!0)}}),bIe="",_Ie="",K5e=st({__name:"FinalResponse",props:{longMessage:{default:""},message:{default:""},oneSiteFlow:{type:Boolean,default:!1},retryButton:{type:Boolean,default:!1},type:{default:"error"}},emits:["accept","retry"],setup(e,{emit:t}){const r=e,{t:n}=yi();return(a,i)=>(me(),Fe("div",{class:Te(a.$style["final-response-container"])},[Ue("div",{class:Te(a.$style["icon-container"])},[ht(Fa,{icon:r.type},null,8,["icon"])],2),Ue("h2",{class:Te(a.$style["final-response-message"])},ot(r.message),3),Ue("p",{class:Te(a.$style["final-response-message"])},ot(r.longMessage),3),r.oneSiteFlow?Xe("",!0):(me(),et(W(Xr),{key:0,onClick:i[0]||(i[0]=o=>t("accept"))},{default:rt(()=>[br(ot(W(n)("common.accept")),1)]),_:1})),r.retryButton?(me(),et(W(Xr),{key:1,onClick:i[1]||(i[1]=o=>t("retry"))},{default:rt(()=>[br(ot(W(n)("common.retry")),1)]),_:1})):Xe("",!0)],2))}}),W5e={"final-response-container":"pb-w-sync_final-response-container","icon-container":"pb-w-sync_icon-container","final-response-message":"pb-w-sync_final-response-message"},Fn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},uF=Fn(K5e,[["__cssModules",{$style:W5e}]]),EIe="",xIe="",SIe="",MIe="",CIe="",TIe="",AIe="",IIe="",BIe="",kIe="",G5e=Fn(st({__name:"InstitutionFilters",props:{countryId:{},filteredCountries:{},filteredOrganizationTypes:{},showCountries:{type:Boolean},organizationTypeId:{},selectClass:{}},emits:["update:countryId","update:organizationTypeId"],setup(e,{emit:t}){const r=e,{t:n}=yi();function a(o){dr("open_country",{id_country:o}),t("update:countryId",o)}function i(o){dr("open_site_organization_type",{id_site_organization_type:o}),t("update:organizationTypeId",o)}return(o,l)=>(me(),Fe("div",null,[Ue("div",{class:Te(o.$style["widget-country"])},[o.showCountries?(me(),et(W(xm),{key:0,value:r.countryId,"popper-class":r.selectClass,onChange:a},{default:rt(()=>[(me(!0),Fe(wt,null,jn(o.filteredCountries,f=>(me(),et(W(Sm),{key:f.id_country,value:f.id_country,label:f.name},null,8,["value","label"]))),128))]),_:1},8,["value","popper-class"])):Xe("",!0)],2),ht(W(rF),{class:Te(o.$style["organization-types-list"]),"default-active":r.organizationTypeId,onSelect:l[0]||(l[0]=f=>i(f))},{default:rt(()=>[(me(!0),Fe(wt,null,jn(o.filteredOrganizationTypes,f=>(me(),et(W(nF),{key:f.id_site_organization_type,index:f.id_site_organization_type},{default:rt(()=>[br(ot(W(n)(`common.${f.label}`)),1)]),_:2},1032,["index"]))),128))]),_:1},8,["class","default-active"])]))}}),[["__cssModules",{$style:{"organization-types-list":"pb-w-sync_organization-types-list","widget-country":"pb-w-sync_widget-country"}}]]),Z5e=["onClick"],Y5e=["alt","src"],J5e={key:1},cF=Fn(st({__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=At(ta),{t:a}=yi();let i=0;ir(()=>{r.items.length>0&&r.showLogo&&(i=0,n("images-loading"))}),ut(()=>r.items,f=>{f.length>0&&r.showLogo&&(i=0,n("images-loading"))});function o(){i++,i===r.items.length&&n("images-loaded")}function l(f){t("select",f)}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["organization-sites-container"])},[f.showPlaidSitesButton?(me(),Fe("div",{key:0,class:Te(f.$style["widget-plaid-container"])},[ht(W(Xr),{type:"primary",onClick:u[0]||(u[0]=()=>W(n)("__internal__.plaid-sites-clicked"))},{default:rt(()=>[br(ot(W(a)("common.find_your_institution")),1)]),_:1})],2)):(me(),Fe(wt,{key:1},[Ue("h2",null,ot(W(a)("common.choose_institution")),1),Ue("div",{class:Te(f.$style["organization-sites"])},[(me(!0),Fe(wt,null,jn(f.items,(d,m)=>(me(),Fe("button",{key:`${d.id_site_organization}-${m}`,class:Te(f.$style["organization-button"]),type:"button",onClick:()=>l(d)},[f.showLogo?(me(),Fe("img",{key:0,alt:d.name,src:`${f.assetsPath}${d.small_cover}`,onLoad:o},null,40,Y5e)):(me(),Fe("span",J5e,ot(d.name),1))],10,Z5e))),128))],2)],64))],2))}}),[["__cssModules",{$style:{"organization-sites-container":"pb-w-sync_organization-sites-container","widget-plaid-container":"pb-w-sync_widget-plaid-container","organization-sites":"pb-w-sync_organization-sites","organization-button":"pb-w-sync_organization-button"}}]]),X5e=["for"],Q5e=["accept","name"],eCe=Fn(st({__name:"FileInput",props:{credential:{},displayError:{type:Boolean},idSite:{}},emits:["input"],setup(e,{emit:t}){const r=e,n=Re(null),a=Re(null),i=Re(!1),o=Ee(()=>i.value&&!a.value);ut(()=>r.displayError,v=>{v&&(i.value=!0)});function l(v){const y=new FileReader;y.onload=_=>{a.value={file:_.target.result,info:{type:v.type,name:v.name}},t("input",_.target.result)},y.readAsDataURL(v)}function f(v){v.preventDefault(),v.dataTransfer.files[0]&&l(v.dataTransfer.files[0])}function u(v){const y=v.srcElement.value;v.preventDefault(),v.stopPropagation(),y.length>0&&l(v.target.files[0])}function d(v){v.stopPropagation(),v.preventDefault(),setTimeout(()=>{i.value=!0},2e3)}function m(v){v.preventDefault(),n.value.click(),setTimeout(()=>{i.value=!0},5e3)}return(v,y)=>(me(),Fe("div",{class:Te(v.$style["upload-document"])},[Ue("label",{class:Te(v.$style["upload-document-label"]),for:`${r.idSite}[${r.credential.name}]`},ot(r.credential.label),11,X5e),Ue("div",{class:Te([v.$style["upload-document-input"],{[v.$style["upload-document-input-error"]]:o.value}]),onClick:y[0]||(y[0]=_=>m(_)),onDrop:y[1]||(y[1]=_=>f(_)),onDragover:y[2]||(y[2]=_=>d(_))},[Ue("button",{class:Te(v.$style["upload-document-button"])},ot(v.$t("file.choose")),3),Ue("span",{class:Te(v.$style["upload-document-name"])},ot(a.value?a.value.info.name:v.$t("file.no_chosen")),3)],34),o.value?(me(),Fe("div",{key:0,class:Te(v.$style["upload-document-required-error"])},ot(r.credential.label)+" "+ot(v.$t("file.required")),3)):Xe("",!0),Ue("input",{ref_key:"fileInput",ref:n,type:"file","data-testid":"file-input",accept:r.credential.accept,style:{position:"absolute",left:"-99999999px"},name:`${r.idSite}[${r.credential.name}]`,onClick:y[3]||(y[3]=_=>_.stopPropagation()),onChange:y[4]||(y[4]=_=>u(_))},null,40,Q5e)],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-input-error":"pb-w-sync_upload-document-input-error","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"}}]]),UIe="",qIe="",VIe="",HIe="",tCe=["src"],rCe={class:"el-form-item__error"},hF=Fn(st({__name:"SiteForm",props:{assetsPath:{default:"https://s.paybook.com"},buttonDisabledStyle:{type:Boolean,default:!1},disableFormAutocomplete:{type:Boolean,default:!1},errorMessage:{default:null},hideBackButton:{type:Boolean,default:!1},loaderMessage:{default:""},oneSiteFlow:{type:Boolean,default:!1},selectClass:{default:""},showLogo:{type:Boolean,default:!0},showPasswordStyle:{default:"icon"},site:{},testMode:{type:Boolean,default:!1}},emits:["back","error","success","valid"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),i=Re("0"),o=Re(!1);let l=Re({...n.site.config.version===1?n.site.data:n.site.input[i.value].data}),f=Re(!0),u=Re(!1),d=Re(!1),m=0,v,y={};const _=Re(null),E=Re(null),C=Ee(()=>{switch(n.site.config.version){case 3:return n.site.config.input[i.value].fields;case 1:return n.site.config.credentials;default:return null}}),T=Ee(()=>{switch(n.site.config.version){case 3:return n.site.input[i.value].rules;case 1:return n.site.rules;default:return null}}),I=Ee(()=>n.site.config.version===3?n.site.config.input.length>1:!1),{t:k}=yi();fn(()=>{clearTimeout(v)}),ir(()=>{n.showLogo&&a("images-loading"),z(),M(),n.site.on("status-update",s=>{s==="loading"?o.value=!0:o.value=!1})});function N(){r("back")}function O(s){return!!l.value[s]}function P(){clearTimeout(v),n.testMode&&(m<2?(m+=1,v=setTimeout(()=>{m=0},500)):(n.site.toggleTestMode(),m=0))}function z(){_.value[0].focus()}function V(){a("images-loaded")}function L(s){n.site.updateData(Number.parseInt(s),l.value),i.value=s,l.value={...n.site.input[i.value].data},kt(()=>{z()})}function U(){let s;f.value?d.value=!0:(r("valid"),a("submitted"),n.site.config.version===1?s=n.site.connect(l.value):s=n.site.connect(Number.parseInt(i.value),l.value),s.then(h=>(r("success",h),n.site.config.request||a("updated",n.site.response),h)).catch(h=>{r("error",h)}))}function M(s,h){s&&(y[s]=h),f.value=Object.keys(T.value).reduce((p,g)=>T.value[g].length===0?p:p||!y[g],!1)}return t({siteForm:E}),(s,h)=>(me(),Fe("div",{class:Te(s.$style["site-form"])},[tn(Ue("div",{class:Te(s.$style["widget-form-loader"])},null,2),[[vi,o.value],[W(Mf),o.value&&{text:n.loaderMessage}]]),Ue("div",{class:Te(s.$style["site-header-form"])},[n.site.testMode?(me(),et(W(N6e),{key:0,center:"",closable:!1,effect:"dark"},{default:rt(()=>[br(ot(W(k)("common.test_mode")),1)]),_:1})):Xe("",!0),n.showLogo?(me(),Fe("img",{key:1,alt:"",class:Te(s.$style["site-cover"]),src:`${n.assetsPath}${n.site.config.organizationSite.cover}`,onLoad:V},null,42,tCe)):Xe("",!0),Ue("h2",{onClick:P},ot(n.site.config.name),1)],2),n.errorMessage?(me(),Fe("div",{key:0,class:Te(s.$style["auth-error"])},[Ue("h3",null,ot(n.errorMessage.short),1),Ue("p",null,ot(n.errorMessage.long),1)],2)):Xe("",!0),I.value?(me(),et(W(rF),{key:1,"default-active":"0",mode:"horizontal",onSelect:L},{default:rt(()=>[(me(!0),Fe(wt,null,jn(n.site.config.input,(p,g)=>(me(),et(W(nF),{key:g,index:`${g}`},{default:rt(()=>[br(ot(p.label),1)]),_:2},1032,["index"]))),128))]),_:1})):Xe("",!0),ht(W(wP),{ref_key:"siteForm",ref:E,"label-position":"top",disabled:o.value,model:W(l),rules:T.value,autocomplete:n.disableFormAutocomplete?"off":"on",name:`${n.site.config.id_site}`,onSubmit:Cn(U,["prevent"]),onValidate:M},{default:rt(()=>[(me(!0),Fe(wt,null,jn(C.value,(p,g)=>(me(),Fe(wt,{key:`${g}-${p.name}`},[p.type==="file"?(me(),et(eCe,{ref_for:!0,ref_key:"firstInput",ref:_,key:`${g}-${p.name}`,credential:p,"display-error":W(d),"id-site":n.site.config.id_site,onInput:b=>{W(l)[p.name]=b,M(p.name,!0)}},null,8,["credential","display-error","id-site","onInput"])):(me(),et(W(E3),{key:1,label:p.label,prop:p.name,for:`${n.site.config.id_site}[${p.name}]`},{error:rt(({error:b})=>[Ue("div",rCe,ot(W(k)(`form_errors.${b}`,{label:p.label})),1)]),default:rt(()=>[p.type==="text"||p.type==="password"?(me(),et(W(dm),{key:0,ref_for:!0,ref_key:"firstInput",ref:_,modelValue:W(l)[p.name],"onUpdate:modelValue":b=>W(l)[p.name]=b,"data-testid":"site-input",autocomplete:p.name==="password"?`${n.site.config.id_site} new-password`:n.disableFormAutocomplete?"off":`${n.site.config.id_site} ${p.name}`,name:`${n.site.config.id_site}[${p.name}]`,type:p.type==="password"&&W(u)?"text":p.type},kw({_:2},[p.type==="password"&&n.showPasswordStyle==="icon"?{name:"append",fn:rt(()=>[ht(W(Xr),{class:Te(s.$style["icon-eye"]),onClick:h[0]||(h[0]=()=>{hr(u)?u.value=!W(u):u=!W(u)})},{default:rt(()=>[W(u)?(me(),et(Fa,{key:1,icon:"eye-slash"})):(me(),et(Fa,{key:0,icon:"eye"}))]),_:1},8,["class"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","autocomplete","name","type"])):Xe("",!0),p.type==="select"?(me(),et(W(xm),{key:1,ref_for:!0,ref_key:"firstInput",ref:_,modelValue:W(l)[p.name],"onUpdate:modelValue":b=>W(l)[p.name]=b,"data-testid":"site-select","popper-class":n.selectClass,autocomplete:n.disableFormAutocomplete?"off":`${n.site.config.id_site} ${p.name}`},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),et(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","popper-class","autocomplete"])):Xe("",!0)]),_:2},1032,["label","prop","for"])),p.type==="password"&&n.showPasswordStyle==="text"&&O(p.name)?(me(),et(W(Xr),{key:`${g} -${p.name} -toggle`,class:Te(s.$style["show-hide"]),onClick:h[1]||(h[1]=()=>{hr(u)?u.value=!W(u):u=!W(u)})},{default:rt(()=>[br(ot(W(k)(`common.${W(u)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Xe("",!0)],64))),128)),Ue("div",{class:Te(s.$style["button-container"])},[n.hideBackButton?Xe("",!0):(me(),et(W(Xr),{key:0,"data-testid":"site-back",class:Te({[s.$style["one-site-flow-back"]]:n.oneSiteFlow}),"native-type":"button",onClick:N},{default:rt(()=>[br(ot(W(k)("common.back")),1)]),_:1},8,["class"])),ht(W(Xr),{"data-testid":"site-button",disabled:n.buttonDisabledStyle&&W(f),type:"primary","native-type":"submit"},{default:rt(()=>[br(ot(W(k)("common.next")),1)]),_:1},8,["disabled"])],2)]),_:1},8,["disabled","model","rules","autocomplete","name","onSubmit"]),Ue("div",{class:Te(s.$style["secure-message-wrapper"])},[Ue("div",{class:Te(s.$style["secure-message-container"])},[ht(Fa,{icon:"shield"}),Ue("p",null,ot(W(k)("common.secure_message")),1)],2)],2)],2))}}),[["__cssModules",{$style:{"auth-error":"pb-w-sync_auth-error","icon-eye":"pb-w-sync_icon-eye","one-site-flow-back":"pb-w-sync_one-site-flow-back","show-hide":"pb-w-sync_show-hide","site-form":"pb-w-sync_site-form","site-header-form":"pb-w-sync_site-header-form","site-cover":"pb-w-sync_site-cover","secure-message-container":"pb-w-sync_secure-message-container","secure-message-wrapper":"pb-w-sync_secure-message-wrapper","button-container":"pb-w-sync_button-container","widget-form-loader":"pb-w-sync_widget-form-loader"}}]]),nCe=["onClick"],iCe=["src"],dF=Fn(st({__name:"SitesList",props:{assetsPath:{},items:{},showLogo:{type:Boolean}},emits:["back","select"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i=0;ir(()=>{r.items.length>1&&r.showLogo&&(i=0,n("images-loading"))});function o(){i++,i===r.items.length&&r.items.length>1&&n("images-loaded")}function l(f){t("select",f)}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["sites-container"])},[Ue("h2",null,ot(W(a)("common.choose_institution")),1),Ue("div",{class:Te(f.$style.sites)},[(me(!0),Fe(wt,null,jn(f.items,(d,m)=>(me(),Fe("button",{key:`${d.id_site}-${m}`,type:"button",onClick:()=>l(d)},[Ue("div",{class:Te(f.$style["site-inner"])},[f.showLogo?(me(),Fe("div",{key:0,class:Te(f.$style.avatar)},[Ue("img",{alt:"",src:`${f.assetsPath}${d.organizationSite.avatar}`,onLoad:o},null,40,iCe)],2)):Xe("",!0),Ue("span",{class:Te(f.$style["site-name"])},ot(d.name),3)],2)],8,nCe))),128))],2),ht(W(Xr),{onClick:u[0]||(u[0]=()=>t("back"))},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})],2))}}),[["__cssModules",{$style:{"sites-container":"pb-w-sync_sites-container",sites:"pb-w-sync_sites","site-inner":"pb-w-sync_site-inner",avatar:"pb-w-sync_avatar","site-name":"pb-w-sync_site-name"}}]]),pF=Fn(st({__name:"TheModal",props:{mobile:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(e,{emit:t}){const r=e,n=At(ta);function a(){dr("close"),t("update:visible",!1),n("closed")}return(i,o)=>tn((me(),Fe("div",{class:Te(i.$style["modal-container"])},[Ue("div",{class:Te(i.$style["modal-overlay-backdrop"]),onClick:a},null,2),Ue("div",{class:Te(i.$style["modal-wrapper"])},[Ue("div",{class:Te([i.$style.modal,{[i.$style["is-mobile"]]:r.mobile}])},[Ot(i.$slots,"default")],2)],2)],2)),[[vi,i.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"}}]]),aCe=["onClick"],oCe=["src"],sCe=Fn(st({__name:"MultipleImages",props:{credential:{default:()=>({type:"options",name:"token",label:"Por favor, revisa las imágenes que se te presentan y selecciona la correcta",options:[]})},modelValue:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=At(ta);let a=0;const i=Ee(()=>{const f=Math.sqrt(r.credential.options.length);return f%1===0?[f,f]:o(Math.floor(f))});ir(()=>{n("images-loading")});function o(f){if(r.credential.options.length%f===0){const u=r.credential.options.length/f;return[f,u]}return o(f-1)}function l(){a++,a===r.credential.options.length&&n("images-loaded")}return(f,u)=>(me(),Fe("div",{class:Te(f.$style["multiple-images-container"])},[Ue("div",{class:Te(f.$style["multiple-images-wrapper"])},[(me(!0),Fe(wt,null,jn(i.value[0],d=>(me(),Fe("div",{key:d,class:Te(f.$style["credential-options-row"])},[(me(!0),Fe(wt,null,jn(i.value[1],m=>(me(),Fe("div",{key:m,class:Te([f.$style["credential-options-col"],{[f.$style.selected]:f.modelValue===f.credential.options[m-1+(d-1)*i.value[1]].value}]),onClick:v=>t("update:modelValue",f.credential.options[m-1+(d-1)*i.value[1]].value)},[Ue("img",{class:Te(f.$style["credental-options-img"]),src:f.credential.options[m-1+(d-1)*i.value[1]].imgBase64File||f.credential.options[m-1+(d-1)*i.value[1]].imgURL,onLoad:l},null,42,oCe)],10,aCe))),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"}}]]),lCe={key:0},fCe=["src"],uCe={key:1},cCe=["src","onLoad"],H3=Fn(st({__name:"TwofaForm",props:{buttonDisabledStyle:{type:Boolean},disableFormAutocomplete:{type:Boolean},enableBackNavigation:{type:Boolean},loaderMessage:{},selectClass:{},showPasswordStyle:{},twofa:{}},emits:["back","error"],setup(e,{emit:t}){const r=e,n=At(ta),a=At(tw),i=Re({}),o=Re({...r.twofa.data}),l=Re({}),f=Re([]),u=Re(!1);let d=0,m=!0,v=!1,y={};const _=Ee(()=>r.twofa.config.twofa.reduce((s,h)=>h.imgBase64File?s+1:s,0)),E=Re(null),C=Re(null);function T(){r.twofa.defineRules(a),z(),r.twofa.on("loading",()=>{u.value=!0}),r.twofa.on("token-received",()=>{o.value={...r.twofa.data}})}ir(()=>{r.twofa.on("twofa-device-error",s=>{t("error",s)}),_.value&&n("images-loading"),O(),M(),r.twofa.config.twofa.forEach(s=>{["connection","challenge"].includes(s.type)&&M(s.name,!0)})});function I(s){return l.value[s]||{}}function k(s){return!!o[s]}function N(s){const h=f.value[s];h&&(l.value={...l.value,[s]:{width:`${h.naturalWidth}px`}},kt(P))}function O(){E.value&&E.value[0].focus()}function P(){d++,d===_.value&&n("images-loaded")}function z(){const s={};r.twofa.config.twofa&&r.twofa.config.twofa.length&&r.twofa.config.twofa.forEach(h=>{h.type==="accounts"&&(s[h.name]=[])}),i.value=s}function V(s){return["text","password","textOptions","accounts","options"].includes(s)}function L(s){o.value={...o.value,[s]:i.value[s].join()}}function U(){C.value.validate(s=>{s&&(n("submitted"),r.twofa.authenticate({...o.value}).then(h=>h).catch(h=>{t("error",h)}))})}function M(s,h){s&&(y[s]=h),m=Object.getOwnPropertyNames(r.twofa.rules).reduce((p,g)=>g==="__ob__"||r.twofa.rules[g].length===0?p:p||!y[g],!1)}return T(),(s,h)=>(me(),Fe("div",{class:Te(s.$style["twofa-form"])},[u.value?tn((me(),Fe("div",{key:0,class:Te(s.$style["widget-form-loader"])},null,2)),[[W(Mf),{text:r.loaderMessage}]]):Xe("",!0),r.twofa?(me(),et(W(wP),{key:1,ref_key:"twofaForm",ref:C,"label-position":"top",disabled:u.value,model:o.value,rules:r.twofa.rules,name:`twofa-${r.twofa.config.id_site}`,autocomplete:r.disableFormAutocomplete?"off":"on",onSubmit:Cn(U,["prevent"]),onValidate:M},{default:rt(()=>[(me(!0),Fe(wt,null,jn(r.twofa.config.twofa,(p,g)=>(me(),Fe(wt,{key:`${g}-${p.name}`},[p.type==="externalAction"?(me(),Fe("div",lCe,[Ue("label",{class:Te(s.$style["external-action-label"])},ot(p.label),3),Ue("div",{class:Te(s.$style["external-action-img-container"])},[p.imgBase64File?(me(),Fe("img",{key:0,alt:"",src:p.imgBase64File,onLoad:P},null,40,fCe)):Xe("",!0)],2)])):p.type==="instructions"?(me(),Fe("div",uCe,[Ue("label",{class:Te(s.$style["external-action-label"])},ot(p.label),3)])):Xe("",!0),V(p.type)?(me(),et(W(E3),{key:2,label:p.label,prop:p.name,for:`twofa-${r.twofa.config.id_site}[${p.name}]`},{default:rt(()=>[p.imgBase64File?(me(),Fe("img",{key:0,ref_for:!0,ref_key:"imageWithoutSize",ref:f,src:p.imgBase64File,class:Te(s.$style["input-image"]),style:on(I(g)),alt:"",onLoad:b=>N(g)},null,46,cCe)):Xe("",!0),p.type==="text"||p.type==="password"?(me(),et(W(dm),{key:1,ref_for:!0,ref:g===0&&"firstInput",modelValue:o.value[p.name],"onUpdate:modelValue":b=>o.value[p.name]=b,"data-testid":"twofa-input",name:`twofa-${r.twofa.config.id_site}[${p.name}]`,autocomplete:p.name==="password"?`${r.twofa.config.id_site} new-password`:r.disableFormAutocomplete?"off":`${r.twofa.config.id_site} ${p.name}`,disabled:p.disabled,type:p.type==="password"&&W(v)?"text":p.type},kw({_:2},[p.type==="password"&&r.showPasswordStyle==="icon"?{name:"append",fn:rt(()=>[ht(W(Xr),{class:Te(s.$style["icon-eye-twofa"]),onClick:h[0]||(h[0]=()=>{hr(v)?v.value=!W(v):v=!W(v)})},{default:rt(()=>[W(v)?(me(),et(Fa,{key:1,icon:"eye-slash"})):(me(),et(Fa,{key:0,icon:"eye"}))]),_:1},8,["class"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","name","autocomplete","disabled","type"])):Xe("",!0),p.type==="textOptions"?(me(),et(W(xm),{key:2,ref_for:!0,ref:g===0&&"firstInput",modelValue:o.value[p.name],"onUpdate:modelValue":b=>o.value[p.name]=b,"data-testid":"twofa-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${p.name}`,name:`twofa-${r.twofa.config.id_site}[${p.name}]`,"popper-class":r.selectClass},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),et(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class"])):Xe("",!0),p.type==="accounts"?(me(),et(W(xm),{key:3,ref_for:!0,ref:g===0&&"firstInput",modelValue:i.value[p.name],"onUpdate:modelValue":b=>i.value[p.name]=b,"data-testid":"twofa-multi-select",autocomplete:r.disableFormAutocomplete?"off":`twofa-${r.twofa.config.id_site} ${p.name}`,filterable:"",multiple:"",name:`twofa-${r.twofa.config.id_site}[${p.name}]`,"popper-class":r.selectClass,onChange:()=>L(p.name)},{default:rt(()=>[(me(!0),Fe(wt,null,jn(p.options,(b,w)=>(me(),et(W(Sm),{key:w,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","autocomplete","name","popper-class","onChange"])):Xe("",!0),p.type==="options"?(me(),et(sCe,{key:4,modelValue:o.value[p.name],"onUpdate:modelValue":[b=>o.value[p.name]=b,()=>{M(p.name,!0)}],credential:p},null,8,["modelValue","onUpdate:modelValue","credential"])):Xe("",!0)]),_:2},1032,["label","prop","for"])):Xe("",!0),p.type==="password"&&r.showPasswordStyle==="text"&&k(p.name)?(me(),et(W(Xr),{key:`${g}-${p.name}-toggle`,class:Te(s.$style["show-hide"]),onClick:h[1]||(h[1]=()=>{hr(v)?v.value=!W(v):v=!W(v)})},{default:rt(()=>[br(ot(W(a)(`common.${W(v)?"hide":"show_password"}`)),1)]),_:2},1032,["class"])):Xe("",!0)],64))),128)),Ue("div",{class:Te(s.$style["twofa-buttons"])},[r.enableBackNavigation?(me(),et(W(Xr),{key:0,"native-type":"button","data-testid":"twofa-back",onClick:h[2]||(h[2]=()=>{t("back")})},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})):Xe("",!0),r.twofa.displaySubmitButton?(me(),et(W(Xr),{key:1,disabled:r.buttonDisabledStyle&&W(m),"data-testid":"twofa-button","native-type":"submit",type:"primary"},{default:rt(()=>[br(ot(W(a)("common.next")),1)]),_:1},8,["disabled"])):Xe("",!0)],2)]),_:1},8,["disabled","model","rules","name","autocomplete","onSubmit"])):Xe("",!0)],2))}}),[["__cssModules",{$style:{"icon-eye-twofa":"pb-w-sync_icon-eye-twofa","input-image":"pb-w-sync_input-image","show-hide":"pb-w-sync_show-hide","twofa-form":"pb-w-sync_twofa-form","twofa-buttons":"pb-w-sync_twofa-buttons","widget-form-loader":"pb-w-sync_widget-form-loader","external-action-img-container":"pb-w-sync_external-action-img-container","external-action-label":"pb-w-sync_external-action-label"}}]]),hCe=["src"],dCe=[Ue("div",{class:"pb-w-sync_widget-avatar-loader"},null,-1)],pCe=st({__name:"AvatarLoader",props:{avatar:{default:""},showAvatar:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!0}},emits:["imagesLoaded","imagesLoading"],setup(e,{emit:t}){const r=e;return ir(()=>{r.showAvatar&&t("imagesLoading")}),(n,a)=>n.showAvatar||n.showLoader?(me(),Fe("div",{key:0,class:Te(n.$style["widget-avatar-container"])},[n.showAvatar?(me(),Fe("div",{key:0,class:Te(n.$style["widget-avatar-inner"])},[Ue("div",{class:Te(n.$style["widget-avatar-mask"])},[Ue("img",{alt:"",src:n.avatar,onLoad:a[0]||(a[0]=()=>t("imagesLoaded"))},null,40,hCe)],2)],2)):Xe("",!0),n.showLoader?(me(),Fe("div",{key:1,class:Te(n.$style["widget-avatar-loader-container"])},dCe,2)):Xe("",!0)],2)):Xe("",!0)}}),vCe={"widget-avatar-container":"pb-w-sync_widget-avatar-container","widget-avatar-inner":"pb-w-sync_widget-avatar-inner","widget-avatar-mask":"pb-w-sync_widget-avatar-mask","widget-avatar-loader-container":"pb-w-sync_widget-avatar-loader-container"},c7e="",mCe=Fn(pCe,[["__cssModules",{$style:vCe}]]);function vF(){const e=Re(!1);function t(){kt(()=>{e.value=rh.device.type==="mobile"||window.innerWidth<600})}return ir(()=>{t(),window.addEventListener("resize",t)}),bh(()=>window.removeEventListener("resize",t)),{mobile:e}}const d7e="",Gt=Fn(st({__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 O,P,z;const r=e;un(ta,r.rootEmit),un(tw,r.t);let n=Re(r.initLongMessage||((O=r.messagesUpdater)==null?void 0:O.getMessages().long)||""),a=Re(r.initMessage||((P=r.messagesUpdater)==null?void 0:P.getMessages().short)||""),i=null,o=Re(r.displayLongDescription||!1),l=Re(!1),f=Re((z=r.item)==null?void 0:z.status),u=Re(r.item&&(r.item.config||r.item.request)?r.item.config?r.item.config.name:r.item.request.description:r.initTitle);const{mobile:d}=vF(),m=Ee(()=>r.item&&r.item.config?`${r.assetsPath}${r.item.config.avatar}`:""),v=Ee(()=>r.item?d.value?f.value==="twofa":(f.value==="twofa"||f.value==="twofa-loading")&&!r.hideForm:!1),y=Ee(()=>r.item?r.type==="info"&&f.value!=="twofa":r.type==="info"),_=Ee(()=>r.item?f.value!=="twofa-loading":!0);function E(){r.messagesUpdater&&r.messagesUpdater.subscribe(()=>{const V=r.messagesUpdater.getMessages();n.value=V.long,a.value=V.short}),r.item&&(r.item.on("twofa",()=>{f.value="twofa",l.value=!0}),r.item.on("twofa-loading",()=>{f.value="twofa-loading",l.value=!1}))}ir(()=>{kt(()=>{r.type!=="info"&&d.value&&(l.value=!0,I())})});function C(){clearTimeout(i)}function T(){return Math.round(r.duration*.75)}function I(){d.value&&r.duration>0&&(i=setTimeout(()=>{l.value=!1},T()))}function k(){r.type!=="info"&&d.value&&(l.value=!l.value,C())}function N(){o.value=!o.value}return E(),(V,L)=>(me(),Fe("div",null,[Ue("div",{class:Te([V.$style["site-indentifier"],{[V.$style["is-mobile"]]:W(d)}]),onClick:k,onMouseleave:I},[ht(mCe,{avatar:m.value,"show-avatar":V.showLogo||W(d),"show-loader":y.value,onImagesLoaded:L[0]||(L[0]=()=>t("imagesLoaded")),onImagesLoading:L[1]||(L[1]=()=>t("imagesLoading"))},null,8,["avatar","show-avatar","show-loader"]),!W(d)||W(l)?(me(),Fe("div",{key:0,class:Te([V.$style["site-identifier-description"],{[V.$style["with-loader"]]:y.value||V.showLogo}])},[Ue("span",{class:Te([V.$style["site-name"],V.$style[r.type]])},ot(W(u)),3),_.value?(me(),Fe("p",{key:0,class:Te(V.$style["site-identifier-message"])},ot(W(a)),3)):Xe("",!0),W(o)?(me(),Fe("p",{key:1,class:Te(V.$style["site-identifier-long-message"])},ot(W(n)),3)):Xe("",!0),r.type!=="info"?(me(),Fe("div",{key:2,class:Te(V.$style["widget-notification-show-more-container"])},[W(n)?(me(),et(W(kMe),{key:0,type:"primary",onClick:Cn(N,["stop"])},{default:rt(()=>[br(ot(r.t("common.show",{msg:r.t(`common.${W(o)?"less":"more"}`)})),1)]),_:1},8,["onClick"])):Xe("",!0)],2)):Xe("",!0)],2)):Xe("",!0)],34),v.value?(me(),Fe("div",{key:0,class:Te(V.$style["notification-form"])},[ht(H3,{"button-disabled-style":V.buttonDisabledStyle,"disable-form-autocomplete":V.disableFormAutocomplete,"enable-back-navigation":V.enableBackNavigation,"loader-message":W(a),"select-class":V.selectClass,"show-password-style":V.showPasswordStyle,twofa:r.item.twofa,onBack:L[2]||(L[2]=()=>t("back")),onError:L[3]||(L[3]=U=>t("error",U))},null,8,["button-disabled-style","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-password-style","twofa"])],2)):Xe("",!0)]))}}),[["__cssModules",{$style:{"site-indentifier":"pb-w-sync_site-indentifier","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","is-mobile":"pb-w-sync_is-mobile","widget-avatar-container":"pb-w-sync_widget-avatar-container","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container","notification-form":"pb-w-sync_notification-form"}}]]),gCe=Ue("div",null,null,-1),mF=Fn(st({__name:"UnauthorizedNotification",props:{initMessage:{default:""},initTitle:{default:""},refreshTokenFunction:{},t:{}},emits:["closed","closeNotification","refreshToken","refreshTokenError"],setup(e,{emit:t}){const r=e;let n=Re(!1);const{mobile:a}=vF();fn(()=>{t("closed")});function i(){n.value=!0,r.refreshTokenFunction().then(({token:o,strict:l})=>{if(typeof o!="string")throw new Error("Refresh token is not valid. Promise should return a valid token.");return new Promise(f=>{t("refreshToken",{token:o,strict:l,resolve:f})})}).catch(()=>{t("refreshTokenError")}).finally(()=>{n.value=!1})}return(o,l)=>(me(),Fe("div",null,[Ue("div",{class:Te([o.$style["site-indentifier"],{[o.$style["is-mobile"]]:W(a)}])},[gCe,Ue("div",{class:Te([o.$style["site-identifier-description"],o.$style["with-loader"]])},[Ue("span",{class:Te([o.$style["site-name"],o.$style.error])},ot(r.initTitle),3),Ue("p",{class:Te(o.$style["site-identifier-message"])},ot(r.initMessage),3),Ue("div",{class:Te(o.$style["unauthorized-button-container"])},[tn((me(),et(W(Xr),{disabled:W(n),type:"primary",onClick:Cn(i,["stop"])},{default:rt(()=>[br(ot(r.t("common.refresh")),1)]),_:1},8,["disabled","onClick"])),[[W(Mf),W(n)]]),ht(W(Xr),{disabled:W(n),onClick:l[0]||(l[0]=Cn(()=>{t("closeNotification")},["stop"]))},{default:rt(()=>[br(ot(r.t("common.cancel")),1)]),_:1},8,["disabled"])],2)],2)],2)]))}}),[["__cssModules",{$style:{"site-indentifier":"pb-w-sync_site-indentifier","site-identifier-description":"pb-w-sync_site-identifier-description","with-loader":"pb-w-sync_with-loader","site-name":"pb-w-sync_site-name","site-identifier-message":"pb-w-sync_site-identifier-message","is-mobile":"pb-w-sync_is-mobile","unauthorized-icon-cotainer":"pb-w-sync_unauthorized-icon-cotainer","widget-notification-show-more-container":"pb-w-sync_widget-notification-show-more-container","unauthorized-icon":"pb-w-sync_unauthorized-icon","unauthorized-button-container":"pb-w-sync_unauthorized-button-container"}}]]);function gF(e,t){return function(){return e.apply(t,arguments)}}const{toString:yCe}=Object.prototype,{getPrototypeOf:j3}=Object,Tm=(e=>t=>{const r=yCe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Eo=e=>(e=e.toLowerCase(),t=>Tm(t)===e),Am=e=>t=>typeof t===e,{isArray:ec}=Array,rd=Am("undefined");function bCe(e){return e!==null&&!rd(e)&&e.constructor!==null&&!rd(e.constructor)&&ua(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yF=Eo("ArrayBuffer");function _Ce(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yF(e.buffer),t}const wCe=Am("string"),ua=Am("function"),bF=Am("number"),Im=e=>e!==null&&typeof e=="object",ECe=e=>e===!0||e===!1,Bm=e=>{if(Tm(e)!=="object")return!1;const t=j3(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xCe=Eo("Date"),SCe=Eo("File"),MCe=Eo("Blob"),CCe=Eo("FileList"),TCe=e=>Im(e)&&ua(e.pipe),ACe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ua(e.append)&&((t=Tm(e))==="formdata"||t==="object"&&ua(e.toString)&&e.toString()==="[object FormData]"))},ICe=Eo("URLSearchParams"),BCe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nd(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ec(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(n=0;n<o;n++)l=i[n],t.call(null,e[l],l,e)}}function _F(e,t){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 wF=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:wn)(),EF=e=>!rd(e)&&e!==wF;function K3(){const{caseless:e}=EF(this)&&this||{},t={},r=(n,a)=>{const i=e&&_F(t,a)||a;Bm(t[i])&&Bm(n)?t[i]=K3(t[i],n):Bm(n)?t[i]=K3({},n):ec(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&nd(arguments[n],r);return t}const kCe=(e,t,r,{allOwnKeys:n}={})=>(nd(t,(a,i)=>{r&&ua(a)?e[i]=gF(a,r):e[i]=a},{allOwnKeys:n}),e),NCe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),OCe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},RCe=(e,t,r,n)=>{let a,i,o;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&j3(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},PCe=(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},FCe=e=>{if(!e)return null;if(ec(e))return e;let t=e.length;if(!bF(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},LCe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&j3(Uint8Array)),DCe=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},$Ce=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},zCe=Eo("HTMLFormElement"),UCe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),xF=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),qCe=Eo("RegExp"),SF=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nd(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},VCe=e=>{SF(e,(t,r)=>{if(ua(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ua(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+"'")})}})},HCe=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return ec(e)?n(e):n(String(e).split(t)),r},jCe=()=>{},KCe=(e,t)=>(e=+e,Number.isFinite(e)?e:t),W3="abcdefghijklmnopqrstuvwxyz",MF="0123456789",CF={DIGIT:MF,ALPHA:W3,ALPHA_DIGIT:W3+W3.toUpperCase()+MF},WCe=(e=16,t=CF.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function GCe(e){return!!(e&&ua(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ZCe=e=>{const t=new Array(10),r=(n,a)=>{if(Im(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=ec(n)?[]:{};return nd(n,(o,l)=>{const f=r(o,a+1);!rd(f)&&(i[l]=f)}),t[a]=void 0,i}}return n};return r(e,0)},YCe=Eo("AsyncFunction"),Ze={isArray:ec,isArrayBuffer:yF,isBuffer:bCe,isFormData:ACe,isArrayBufferView:_Ce,isString:wCe,isNumber:bF,isBoolean:ECe,isObject:Im,isPlainObject:Bm,isUndefined:rd,isDate:xCe,isFile:SCe,isBlob:MCe,isRegExp:qCe,isFunction:ua,isStream:TCe,isURLSearchParams:ICe,isTypedArray:LCe,isFileList:CCe,forEach:nd,merge:K3,extend:kCe,trim:BCe,stripBOM:NCe,inherits:OCe,toFlatObject:RCe,kindOf:Tm,kindOfTest:Eo,endsWith:PCe,toArray:FCe,forEachEntry:DCe,matchAll:$Ce,isHTMLForm:zCe,hasOwnProperty:xF,hasOwnProp:xF,reduceDescriptors:SF,freezeMethods:VCe,toObjectSet:HCe,toCamelCase:UCe,noop:jCe,toFiniteNumber:KCe,findKey:_F,global:wF,isContextDefined:EF,ALPHABET:CF,generateString:WCe,isSpecCompliantForm:GCe,toJSONObject:ZCe,isAsyncFn:YCe,isThenable:e=>e&&(Im(e)||ua(e))&&ua(e.then)&&ua(e.catch)};function sr(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}Ze.inherits(sr,Error,{toJSON:function(){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:Ze.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const TF=sr.prototype,AF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{AF[e]={value:e}}),Object.defineProperties(sr,AF),Object.defineProperty(TF,"isAxiosError",{value:!0}),sr.from=(e,t,r,n,a,i)=>{const o=Object.create(TF);return Ze.toFlatObject(e,o,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),sr.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const JCe=null;function G3(e){return Ze.isPlainObject(e)||Ze.isArray(e)}function IF(e){return Ze.endsWith(e,"[]")?e.slice(0,-2):e}function BF(e,t,r){return e?e.concat(t).map(function(a,i){return a=IF(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function XCe(e){return Ze.isArray(e)&&!e.some(G3)}const QCe=Ze.toFlatObject(Ze,{},null,function(t){return/^is[A-Z]/.test(t)});function km(e,t,r){if(!Ze.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Ze.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,C){return!Ze.isUndefined(C[E])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&Ze.isSpecCompliantForm(t);if(!Ze.isFunction(a))throw new TypeError("visitor must be a function");function u(_){if(_===null)return"";if(Ze.isDate(_))return _.toISOString();if(!f&&Ze.isBlob(_))throw new sr("Blob is not supported. Use a Buffer instead.");return Ze.isArrayBuffer(_)||Ze.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):ge.Buffer.from(_):_}function d(_,E,C){let T=_;if(_&&!C&&typeof _=="object"){if(Ze.endsWith(E,"{}"))E=n?E:E.slice(0,-2),_=JSON.stringify(_);else if(Ze.isArray(_)&&XCe(_)||(Ze.isFileList(_)||Ze.endsWith(E,"[]"))&&(T=Ze.toArray(_)))return E=IF(E),T.forEach(function(k,N){!(Ze.isUndefined(k)||k===null)&&t.append(o===!0?BF([E],N,i):o===null?E:E+"[]",u(k))}),!1}return G3(_)?!0:(t.append(BF(C,E,i),u(_)),!1)}const m=[],v=Object.assign(QCe,{defaultVisitor:d,convertValue:u,isVisitable:G3});function y(_,E){if(!Ze.isUndefined(_)){if(m.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(_),Ze.forEach(_,function(T,I){(!(Ze.isUndefined(T)||T===null)&&a.call(t,T,Ze.isString(I)?I.trim():I,E,v))===!0&&y(T,E?E.concat(I):[I])}),m.pop()}}if(!Ze.isObject(e))throw new TypeError("data must be an object");return y(e),t}function kF(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Z3(e,t){this._pairs=[],e&&km(e,this,t)}const NF=Z3.prototype;NF.append=function(t,r){this._pairs.push([t,r])},NF.toString=function(t){const r=t?function(n){return t.call(this,n,kF)}:kF;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function eTe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function OF(e,t,r){if(!t)return e;const n=r&&r.encode||eTe,a=r&&r.serialize;let i;if(a?i=a(t,r):i=Ze.isURLSearchParams(t)?t.toString():new Z3(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class tTe{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){Ze.forEach(this.handlers,function(n){n!==null&&t(n)})}}const RF=tTe,PF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rTe=typeof URLSearchParams<"u"?URLSearchParams:Z3,nTe=typeof FormData<"u"?FormData:null,iTe=typeof Blob<"u"?Blob:null,aTe=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),oTe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),La={isBrowser:!0,classes:{URLSearchParams:rTe,FormData:nTe,Blob:iTe},isStandardBrowserEnv:aTe,isStandardBrowserWebWorkerEnv:oTe,protocols:["http","https","file","blob","url","data"]};function sTe(e,t){return km(e,new La.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return La.isNode&&Ze.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function lTe(e){return Ze.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fTe(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 FF(e){function t(r,n,a,i){let o=r[i++];const l=Number.isFinite(+o),f=i>=r.length;return o=!o&&Ze.isArray(a)?a.length:o,f?(Ze.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!Ze.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&Ze.isArray(a[o])&&(a[o]=fTe(a[o])),!l)}if(Ze.isFormData(e)&&Ze.isFunction(e.entries)){const r={};return Ze.forEachEntry(e,(n,a)=>{t(lTe(n),a,r,0)}),r}return null}function uTe(e,t,r){if(Ze.isString(e))try{return(t||JSON.parse)(e),Ze.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Y3={transitional:PF,adapter:La.isNode?"http":"xhr",transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=Ze.isObject(t);if(i&&Ze.isHTMLForm(t)&&(t=new FormData(t)),Ze.isFormData(t))return a&&a?JSON.stringify(FF(t)):t;if(Ze.isArrayBuffer(t)||Ze.isBuffer(t)||Ze.isStream(t)||Ze.isFile(t)||Ze.isBlob(t))return t;if(Ze.isArrayBufferView(t))return t.buffer;if(Ze.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 sTe(t,this.formSerializer).toString();if((l=Ze.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return km(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),uTe(t)):t}],transformResponse:[function(t){const r=this.transitional||Y3.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&Ze.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?sr.from(l,sr.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:La.classes.FormData,Blob:La.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ze.forEach(["delete","get","head","post","put","patch"],e=>{Y3.headers[e]={}});const J3=Y3,cTe=Ze.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"]),hTe=e=>{const t={};let r,n,a;return e&&e.split(`
874
874
  `).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&cTe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},LF=Symbol("internals");function id(e){return e&&String(e).trim().toLowerCase()}function Nm(e){return e===!1||e==null?e:Ze.isArray(e)?e.map(Nm):String(e)}function dTe(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 pTe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function X3(e,t,r,n,a){if(Ze.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!Ze.isString(t)){if(Ze.isString(n))return t.indexOf(n)!==-1;if(Ze.isRegExp(n))return n.test(t)}}function vTe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function mTe(e,t){const r=Ze.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Om{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(l,f,u){const d=id(f);if(!d)throw new Error("header name must be a non-empty string");const m=Ze.findKey(a,d);(!m||a[m]===void 0||u===!0||u===void 0&&a[m]!==!1)&&(a[m||f]=Nm(l))}const o=(l,f)=>Ze.forEach(l,(u,d)=>i(u,d,f));return Ze.isPlainObject(t)||t instanceof this.constructor?o(t,r):Ze.isString(t)&&(t=t.trim())&&!pTe(t)?o(hTe(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=id(t),t){const n=Ze.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return dTe(a);if(Ze.isFunction(r))return r.call(this,a,n);if(Ze.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=id(t),t){const n=Ze.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||X3(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=id(o),o){const l=Ze.findKey(n,o);l&&(!r||X3(n,n[l],l,r))&&(delete n[l],a=!0)}}return Ze.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||X3(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return Ze.forEach(this,(a,i)=>{const o=Ze.findKey(n,i);if(o){r[o]=Nm(a),delete r[i];return}const l=t?vTe(i):String(i).trim();l!==i&&delete r[i],r[l]=Nm(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Ze.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&Ze.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(`
875
- `)}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[LF]=this[LF]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=id(o);n[l]||(mTe(a,o),n[l]=!0)}return Ze.isArray(t)?t.forEach(i):i(t),this}}Om.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ze.reduceDescriptors(Om.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),Ze.freezeMethods(Om);const rs=Om;function Q3(e,t){const r=this||J3,n=t||r,a=rs.from(n.headers);let i=n.data;return Ze.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function DF(e){return!!(e&&e.__CANCEL__)}function ad(e,t,r){sr.call(this,e??"canceled",sr.ERR_CANCELED,t,r),this.name="CanceledError"}Ze.inherits(ad,sr,{__CANCEL__:!0});function gTe(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new sr("Request failed with status code "+r.status,[sr.ERR_BAD_REQUEST,sr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const yTe=La.isStandardBrowserEnv?function(){return{write:function(r,n,a,i,o,l){const f=[];f.push(r+"="+encodeURIComponent(n)),Ze.isNumber(a)&&f.push("expires="+new Date(a).toGMTString()),Ze.isString(i)&&f.push("path="+i),Ze.isString(o)&&f.push("domain="+o),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function bTe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _Te(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function $F(e,t){return e&&!bTe(t)?_Te(e,t):t}const wTe=La.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const l=Ze.isString(o)?a(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();function ETe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xTe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),d=n[i];o||(o=u),r[a]=f,n[a]=u;let m=i,v=0;for(;m!==a;)v+=r[m++],m=m%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o<t)return;const y=d&&u-d;return y?Math.round(v*1e3/y):void 0}}function zF(e,t){let r=0;const n=xTe(50,250);return a=>{const i=a.loaded,o=a.lengthComputable?a.total:void 0,l=i-r,f=n(l),u=i<=o;r=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:l,rate:f||void 0,estimated:f&&o&&u?(o-i)/f:void 0,event:a};d[t?"download":"upload"]=!0,e(d)}}const Rm={http:JCe,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let a=e.data;const i=rs.from(e.headers).normalize(),o=e.responseType;let l;function f(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}Ze.isFormData(a)&&(La.isStandardBrowserEnv||La.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(y+":"+_))}const d=$F(e.baseURL,e.url);u.open(e.method.toUpperCase(),OF(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function m(){if(!u)return;const y=rs.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:y,config:e,request:u};gTe(function(T){r(T),f()},function(T){n(T),f()},E),u=null}if("onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new sr("Request aborted",sr.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new sr("Network Error",sr.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||PF;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),n(new sr(_,E.clarifyTimeoutError?sr.ETIMEDOUT:sr.ECONNABORTED,e,u)),u=null},La.isStandardBrowserEnv){const y=(e.withCredentials||wTe(d))&&e.xsrfCookieName&&yTe.read(e.xsrfCookieName);y&&i.set(e.xsrfHeaderName,y)}a===void 0&&i.setContentType(null),"setRequestHeader"in u&&Ze.forEach(i.toJSON(),function(_,E){u.setRequestHeader(E,_)}),Ze.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",zF(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",zF(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=y=>{u&&(n(!y||y.type?new ad(null,e,u):y),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const v=ETe(d);if(v&&La.protocols.indexOf(v)===-1){n(new sr("Unsupported protocol "+v+":",sr.ERR_BAD_REQUEST,e));return}u.send(a||null)})}};Ze.forEach(Rm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const UF={getAdapter:e=>{e=Ze.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let a=0;a<t&&(r=e[a],!(n=Ze.isString(r)?Rm[r.toLowerCase()]:r));a++);if(!n)throw n===!1?new sr(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Ze.hasOwnProp(Rm,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!Ze.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rm};function ex(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ad(null,e)}function qF(e){return ex(e),e.headers=rs.from(e.headers),e.data=Q3.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),UF.getAdapter(e.adapter||J3.adapter)(e).then(function(n){return ex(e),n.data=Q3.call(e,e.transformResponse,n),n.headers=rs.from(n.headers),n},function(n){return DF(n)||(ex(e),n&&n.response&&(n.response.data=Q3.call(e,e.transformResponse,n.response),n.response.headers=rs.from(n.response.headers))),Promise.reject(n)})}const VF=e=>e instanceof rs?e.toJSON():e;function tc(e,t){t=t||{};const r={};function n(u,d,m){return Ze.isPlainObject(u)&&Ze.isPlainObject(d)?Ze.merge.call({caseless:m},u,d):Ze.isPlainObject(d)?Ze.merge({},d):Ze.isArray(d)?d.slice():d}function a(u,d,m){if(Ze.isUndefined(d)){if(!Ze.isUndefined(u))return n(void 0,u,m)}else return n(u,d,m)}function i(u,d){if(!Ze.isUndefined(d))return n(void 0,d)}function o(u,d){if(Ze.isUndefined(d)){if(!Ze.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,m){if(m in t)return n(u,d);if(m in e)return n(void 0,u)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(u,d)=>a(VF(u),VF(d),!0)};return Ze.forEach(Object.keys(Object.assign({},e,t)),function(d){const m=f[d]||a,v=m(e[d],t[d],d);Ze.isUndefined(v)&&m!==l||(r[d]=v)}),r}const HF="1.5.0",tx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const jF={};tx.transitional=function(t,r,n){function a(i,o){return"[Axios v"+HF+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,l)=>{if(t===!1)throw new sr(a(o," has been removed"+(r?" in "+r:"")),sr.ERR_DEPRECATED);return r&&!jF[o]&&(jF[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};function STe(e,t,r){if(typeof e!="object")throw new sr("options must be an object",sr.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const l=e[i],f=l===void 0||o(l,i,e);if(f!==!0)throw new sr("option "+i+" must be "+f,sr.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new sr("Unknown option "+i,sr.ERR_BAD_OPTION)}}const rx={assertOptions:STe,validators:tx},el=rx.validators;class Pm{constructor(t){this.defaults=t,this.interceptors={request:new RF,response:new RF}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=tc(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&rx.assertOptions(n,{silentJSONParsing:el.transitional(el.boolean),forcedJSONParsing:el.transitional(el.boolean),clarifyTimeoutError:el.transitional(el.boolean)},!1),a!=null&&(Ze.isFunction(a)?r.paramsSerializer={serialize:a}:rx.assertOptions(a,{encode:el.function,serialize:el.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&Ze.merge(i.common,i[r.method]);i&&Ze.forEach(["delete","get","head","post","put","patch","common"],_=>{delete i[_]}),r.headers=rs.concat(o,i);const l=[];let f=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(f=f&&E.synchronous,l.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let d,m=0,v;if(!f){const _=[qF.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,u),v=_.length,d=Promise.resolve(r);m<v;)d=d.then(_[m++],_[m++]);return d}v=l.length;let y=r;for(m=0;m<v;){const _=l[m++],E=l[m++];try{y=_(y)}catch(C){E.call(this,C);break}}try{d=qF.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,v=u.length;m<v;)d=d.then(u[m++],u[m++]);return d}getUri(t){t=tc(this.defaults,t);const r=$F(t.baseURL,t.url);return OF(r,t.params,t.paramsSerializer)}}Ze.forEach(["delete","get","head","options"],function(t){Pm.prototype[t]=function(r,n){return this.request(tc(n||{},{method:t,url:r,data:(n||{}).data}))}}),Ze.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,l){return this.request(tc(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Pm.prototype[t]=r(),Pm.prototype[t+"Form"]=r(!0)});const Fm=Pm;class nx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{n.subscribe(l),i=l}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,l){n.reason||(n.reason=new ad(i,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new nx(function(a){t=a}),cancel:t}}}const MTe=nx;function CTe(e){return function(r){return e.apply(null,r)}}function TTe(e){return Ze.isObject(e)&&e.isAxiosError===!0}const ix={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ix).forEach(([e,t])=>{ix[t]=e});const ATe=ix;function KF(e){const t=new Fm(e),r=gF(Fm.prototype.request,t);return Ze.extend(r,Fm.prototype,t,{allOwnKeys:!0}),Ze.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return KF(tc(e,a))},r}const dn=KF(J3);dn.Axios=Fm,dn.CanceledError=ad,dn.CancelToken=MTe,dn.isCancel=DF,dn.VERSION=HF,dn.toFormData=km,dn.AxiosError=sr,dn.Cancel=dn.CanceledError,dn.all=function(t){return Promise.all(t)},dn.spread=CTe,dn.isAxiosError=TTe,dn.mergeConfig=tc,dn.AxiosHeaders=rs,dn.formToJSON=e=>FF(Ze.isHTMLForm(e)?new FormData(e):e),dn.getAdapter=UF.getAdapter,dn.HttpStatusCode=ATe,dn.default=dn;const Da=dn;function ITe(e,t,r){var n=r||{},a=n.noTrailing,i=a===void 0?!1:a,o=n.noLeading,l=o===void 0?!1:o,f=n.debounceMode,u=f===void 0?void 0:f,d,m=!1,v=0;function y(){d&&clearTimeout(d)}function _(C){var T=C||{},I=T.upcomingOnly,k=I===void 0?!1:I;y(),m=!k}function E(){for(var C=arguments.length,T=new Array(C),I=0;I<C;I++)T[I]=arguments[I];var k=this,N=Date.now()-v;if(m)return;function O(){v=Date.now(),t.apply(k,T)}function P(){d=void 0}!l&&u&&!d&&O(),y(),u===void 0&&N>e?l?(v=Date.now(),i||(d=setTimeout(u?P:O,e))):O():i!==!0&&(d=setTimeout(u?P:O,u===void 0?e-N:e))}return E.cancel=_,E}function Lm(e,t,r){var n=r||{},a=n.atBegin,i=a===void 0?!1:a;return ITe(e,t,{debounceMode:i!==!1})}class Dm extends Io.EventEmitter{constructor(r,n,a=!0){super();_t(this,"bluetoothDevice",!1);_t(this,"connection");_t(this,"data",{});_t(this,"displaySubmitButton",!0);_t(this,"http");_t(this,"_loading",!1);_t(this,"messageEncrypted");_t(this,"rules",{});_t(this,"rulesDefined",!1);if(this.config=r,this.measureEvents=a,this.http=n.getInstance(),r.twofa&&r.twofa.length)this.configuredMeasureEvent("twofa_request",{id_site:r.id_site,...r.id_site?{}:{id_request:r.id_request}}),r.twofa.forEach(i=>{const o=i.name;this.data[o]=null,i.type==="challenge"&&(this.data[o]=i.label),i.type==="connection"&&(this.connection=this.data[`${o}`]=i.label),(i.type==="externalAction"||i.type==="instructions")&&(this.displaySubmitButton=!1)}),this.connectSantanderUsbToken(),this.handleBbvaNetcashConnections();else throw new Error("TWOFA credentials are required.")}get loading(){return this._loading}set loading(r){this._loading=r,r&&this.emit("loading")}authenticate(r){return this.data={...r},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(n=>(this.emit("login-success"),n)).catch(n=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(n))))}defineRules(r){this.rulesDefined||(this.rulesDefined=!0,this.config.twofa.forEach(n=>{Object.defineProperty(this.rules,n.name,{value:this.setRules(n,r)})}))}getFields(){return this.config.twofa.filter(r=>r.type!=="challenge"&&r.type!=="connection")}statusChanged(){this.loading||(this.loading=!0)}configuredMeasureEvent(r,n){this.measureEvents&&dr(r,n)}connectSantanderUsbToken(){this.config.id_site==="57f6dd8c78480602048b4567"&&this.config.twofa[0].type==="instructions"&&upe(this.config.twofa[0].imgBase64File).then(r=>{this.authenticate(r)}).catch(r=>{this.emit("twofa-api-error"),this.emit("twofa-device-error",r)})}findTwofaByName(r){return this.config.twofa.find(n=>n.name===r)}findTwofaByType(r){return this.config.twofa.find(n=>n.type===r)}getBbvaNetcashBluetoothFinalToken(r){const n=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:n,name:"token",type:"instructions"}],nU(r).then(a=>{this.data={token:a,other_message_encrypted:"other_message_encrypted"},this.authenticate(this.data)})}handleBbvaNetcashConnections(){this.messageEncrypted=this.findTwofaByType("message_encrypted");const r=this.findTwofaByType("other_message_encrypted");this.connection==="eai_otp_GO3"&&(this.bluetoothDevice=this.findTwofaByType("bluetooth_device").label==="S",this.bluetoothDevice&&this.sendBbvaNetcashBluetoothTimeChallenge()),this.messageEncrypted&&this.setBbvaNetcashBluetoothFakeToken(),r&&this.getBbvaNetcashBluetoothFinalToken(r.label)}sendBbvaNetcashBluetoothTimeChallenge(){const r=this.findTwofaByType("challenge").label,n=this.findTwofaByType("device").label,a=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:a,name:"token",type:"instructions"}],iU(n,r).then(i=>{this.data={bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection",device:"device",token:i},this.authenticate(this.data)})}sendBbvaNetcashUsbToken(){return Qz(this.data.token,this.data.challenge).then(r=>this.http.post(this.config.address,{twofa:{...this.data,...r}}).then(n=>(this.emit("login-success"),n)).catch(n=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(n)))).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r.response?{...r,response:{...r.response,status:500}}:r)))}setBbvaNetcashBluetoothFakeToken(){const r=this.findTwofaByName("token").label;this.rules={token:[{required:!0}]},this.rulesDefined=!0,this.data={token:""},this.config.twofa=[{name:"token",type:"text",label:r,disabled:!0}],rU(this.messageEncrypted.label).then(n=>{this.data={token:n},this.emit("token-received")})}setRules(r,n){const a=[];return a.push({required:!0,message:n("form_errors.required",{label:r.label})}),r.validation&&r.validation.forEach(i=>{switch(i.type){case"text":break;case"regex":a.push({pattern:i.value,message:i.error_message});break}}),a}turnOnBbvaNetcashBluetoothDevice(){this.messageEncrypted&&(this.data={token:"OK",message_encrypted:"message_encrypted"},mU())}}class BTe extends Io.EventEmitter{constructor(r,n,a,i,o=!1){super();_t(this,"_config");_t(this,"_error");_t(this,"http");_t(this,"loading",!1);_t(this,"_message");_t(this,"options",{});_t(this,"response");_t(this,"socket");_t(this,"_status","searching");_t(this,"timer",null);_t(this,"_twofa");this.syncService=n,this.httpService=a,this.socketTimeoutTime=i,this.isHeadless=o,this.http=this.httpService.getInstance(),this.getSitefromCredential({id_credential:r}).then(({site:l,credential:f})=>{this.config={...f,avatar:l.organizationSite.avatar,cover:l.organizationSite.cover,name:l.name,quickAnswer:this.syncService.quickAnswer,site:l},this.status="found",this.sync().then(()=>{this.status="loading"}).catch(u=>{this.error=u,this.status="error"})}).catch(l=>{this.error=l,this.status="not-found"})}get config(){return this._config}set config(r){this._config=r}get error(){return this._error}set error(r){this._error=r}get message(){return this._message}set message(r){this._message=r}get status(){return this._status}set status(r){const n=this._status!==r;this._status=r,n&&(this.emit(r),this.emit("status-updated",r))}get twofa(){return this._twofa}set twofa(r){this._twofa=r,r&&(this.status="twofa",r.on("loading",()=>{this._twofa===r&&this.status==="twofa"&&(this.status="twofa-loading")}),r.on("twofa-api-error",()=>{this.status="twofa-api-error",this.socketClose()}))}getAvatar(){return this.config.avatar}getCover(){return this.config.cover}getCredentialData(){return{...this.config}}getName(){return this.config.name}getSite(){return{...this.config.site}}setOption(r,n){this.options[r]=n}sync(){return this.configuredMeasureEvent("sync_credential",{id_credential:this.config.id_credential,id_site:this.config.id_site}),this.loading=!0,this.startTimer(),this.http.put(`/v1/credentials/${this.config.id_credential}/sync`,{...this.spreadOptions()}).then(r=>(this.response=r,this.setSocket(r.ws),r)).catch(r=>(this.loading=!1,this.configuredMeasureEvent("sync_credential_error",{code:r.response.status,code_origin:"endpoint",id_credential:this.config.id_credential,id_site:this.config.id_site}),this.clearTimer(),Promise.reject(r)))}clearTimer(){clearTimeout(this.timer)}configuredMeasureEvent(r,n){this.isHeadless||dr(r,n)}getSitefromCredential(r){return this.http.get("/v1/credentials",{params:{...this.syncService.defaultParams,...r}}).then(n=>r.id_credential&&!n.length?Promise.reject({response:{status:"credential_not_found"}}):this.syncService.getOganizationSites({id_site_organization:n[0].id_site_organization}).then(a=>{if(r.id_credential&&!a.length)return Promise.reject({response:{status:"credential_not_found"}});let i=a[0].sites.find(o=>o.id_site===n[0].id_site);if(i)i={...i};else return Promise.reject({response:{status:"credential_not_found"}});return i.organizationSite=a[0],{site:i,credential:n[0]}}).catch(a=>Promise.reject(a)))}reopenSocket(r){this.setSocket(r.target.url)}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=()=>this.socketError(),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=()=>{this.twofa=null,r&&r(this)},this.socket.close()}socketError(){this.loading=!1,this.status="socket-error"}socketMessage(r){const n=JSON.parse(r.data);if(this.clearTimer(),this.config.quickAnswer&&n.code===102){this.socketClose(()=>{this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.status="socket-quick-answer"}),this.configuredMeasureEvent("sync_credential_success",{code:n.code,id_credential:this.config.id_credential,id_site:this.config.id_site});return}n.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.config.id_site},this.httpService)),this.emit("socket-message",n),this.startTimer(),n.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410?(this.loading=!1,this.twofa&&(this.twofa.loading=!1),n.code<300?(this.configuredMeasureEvent("sync_credential_success",{code:n.code,id_credential:this.config.id_credential,id_site:this.config.id_site}),this.message=n,this.status="success"):(this.configuredMeasureEvent("sync_credential_error",{code:n.code,code_origin:"socket",id_credential:this.config.id_credential,id_site:this.config.id_site}),this.error=n,this.status="error"),this.socketClose()):this.twofa&&n.code!==410&&this.twofa.statusChanged()}socketTimeout(){this.status="socket-timeout",this.socketClose()}spreadOptions(){return Object.keys(this.options).length?{options:{...this.options}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.socketTimeoutTime)}}Da.defaults.baseURL="https://sync.paybook.com";class WF extends Io.EventEmitter{constructor(r,n={}){super();_t(this,"baseURL");_t(this,"isStrict");_t(this,"jwk");this.token=r,n.baseURL&&(this.baseURL=Da.defaults.baseURL=n.baseURL),this.isStrict=n.isStrict||!1,Da.defaults.headers.common={"x-app-version":`sync-widget:${n.widgetVersion}:${rh.os.name}:${rh.os.version}`},Da.interceptors.request.use(a=>(a.headers.Authorization=`Bearer ${this.token}`,a),function(a){return Promise.reject(a)}),Da.interceptors.response.use(a=>a.data.response||a.data||a,a=>(a.response&&a.response.status===401&&this.emit("401"),Promise.reject(a)))}getInstance(){const r=Da.create({baseURL:this.baseURL});return r.interceptors.request.use(n=>(n.headers.Authorization=`Bearer ${this.token}`,n),function(n){return Promise.reject(n)}),r.interceptors.response.use(n=>n.data.response||n.data||n,n=>(n.response&&n.response.status===401&&this.emit("401"),Promise.reject(n))),this.isStrict&&r.interceptors.request.use(n=>n.data?CB(n.data,this.jwk).then(a=>(n.data={jwe:a},Promise.resolve(n))):Promise.resolve(n),n=>Promise.reject(n)),r}updateToken(r,n){this.token=r,n&&(this.jwk=n)}}class GF extends Io.EventEmitter{constructor(r,n,a,i=!1){super();_t(this,"config");_t(this,"_finalResponse",null);_t(this,"http");_t(this,"_loading",!1);_t(this,"_lastSocketMessage");_t(this,"options",{});_t(this,"response");_t(this,"socket");_t(this,"_status","start");_t(this,"testMode",!1);_t(this,"timer",null);_t(this,"_twofa");this.httpService=n,this.socketTimeoutTime=a,this.isHeadless=i,this.config=r,this.http=n.getInstance()}get finalResponse(){return this._finalResponse}set finalResponse(r){this._finalResponse=r,this.status="finish"}get lastSocketMessage(){return this._lastSocketMessage}set lastSocketMessage(r){this._lastSocketMessage=r}get loading(){return this._loading}set loading(r){this._loading=r,r&&(this.status="loading")}get status(){return this._status}set status(r){const n=this._status!==r;this._status=r,n&&(this.emit(r),this.emit("status-update",r))}get twofa(){return this._twofa}set twofa(r){this._twofa=r,r&&(this.status="twofa",r.on("loading",()=>{this._twofa===r&&this.status==="twofa"&&(this.status="twofa-loading")}))}setOption(r,n){this.options[r]=n}toggleTestMode(){this.testMode=!this.testMode}configuredMeasureEvent(r,n){this.isHeadless||dr(r,n)}clearTimer(){clearTimeout(this.timer)}reopenSocket(r){this.setSocket(r.target.url)}setRules(r){const n=[];return r.required&&n.push({required:!0,message:"required"}),r.validation&&r.validation.forEach(a=>{switch(a.type){case"text":break;case"regex":n.push({pattern:a.value,message:"regex"});break}}),n}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=n=>this.socketError(n),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onopen=n=>this.socketOpen(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=n=>{this.twofa=null,this.emit("socket-close",n),r&&r(this)},this.socket.close()}socketError(r){this.loading=!1,this.emit("socket-error",r),this.finalResponse="error"}socketMessage(r){const n=JSON.parse(r.data);if(this.lastSocketMessage=n,this.clearTimer(),this.config.quickAnswer&&n.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:n.code,id_site:this.config.id_site});return}n.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.config.id_site},this.httpService,!this.isHeadless),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",n),this.startTimer(),n.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),(200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410)&&(n.code<300?(this.finalResponse="success",this.configuredMeasureEvent("sync_success",{code:n.code,id_site:this.config.id_site})):(this.finalResponse="error",this.configuredMeasureEvent("sync_error",{code:n.code,code_origin:"socket",id_site:this.config.id_site})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose()),!(400<=n.code&&n.code<600&&n.code!==410||200<=n.code&&n.code<300)&&this.twofa&&n.code!==410&&(this.twofa.loading=!0,this.status="twofa-loading")}socketOpen(r){this.emit("socket-open",r)}socketTimeout(){this.socketClose(()=>{this.finalResponse="error",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-timeout")})}spreadOptions(){return Object.keys(this.options).length?{options:{...this.options}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.socketTimeoutTime)}}class ZF extends GF{constructor(r,n,a,i,o=!1){super(r,n,i,o);_t(this,"data",{});_t(this,"rules",{});if(this.defaultParams=a,this.socketTimeoutTime=i,this.isHeadless=o,r.credentials&&r.credentials.length)o||r.credentials.forEach(l=>{const f=l.name;Object.defineProperty(this.rules,f,{enumerable:!0,value:this.setRules(l)})});else throw new Error("Site credentials are required.")}get version(){return 1}connect(r){this.data={...r};const n={...this.defaultParams,id_site:this.config.id_site,credentials:{...this.data},...this.spreadOptions()};return this.config.request?Promise.resolve(n.credentials):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.testMode&&(n.test=1),this.startTimer(),this.http.post(this.config.endpoint,n).then(a=>(this.response=a,this.emit("login-success"),this.setSocket(a.ws),a)).catch(a=>(this.configuredMeasureEvent("sync_error",{code:a.response?a.response.status:a.toString(),code_origin:"endpoint",id_site:this.config.id_site}),this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(a))))}getFields(){return this.config.credentials}}class YF extends GF{constructor(r,n,a,i,o=!1){super(r,n,i,o);_t(this,"input",[]);this.defaultParams=a,this.socketTimeoutTime=i,this.isHeadless=o,r.input.forEach(l=>{const f={rules:{},data:{}};l.fields.forEach(u=>{const d=u.name;Object.defineProperty(f.rules,d,{enumerable:!0,value:this.setRules(u)}),f.data[d]=null}),this.input.push(f)})}get version(){return 3}connect(r,n){this.updateData(r,n);const a=r||0,i={...this.defaultParams,id_site:this.config.id_site,input_name:this.config.input[r].name,input:{...this.input[a].data},...this.spreadOptions()};return this.config.request?Promise.resolve(i.input):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.testMode&&(i.test=1),this.startTimer(),this.http.post(this.config.endpoint,i).then(o=>(this.response=o,this.emit("login-success"),this.setSocket(o.ws),o)).catch(o=>(this.configuredMeasureEvent("sync_error",{code:o.response?o.response.status:o.toString(),code_origin:"endpoint",id_site:this.config.id_site}),this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(o))))}getFields(r){return this.config.input[r].fields}getOptions(){return this.config.input}updateData(r,n){this.input[r].data={...n}}}class ax extends Io.EventEmitter{constructor(r,n,a,i,o){super();_t(this,"account");_t(this,"amount");_t(this,"finalResponse",null);_t(this,"http");_t(this,"loading",!1);_t(this,"request");_t(this,"response");_t(this,"site");_t(this,"socket");_t(this,"status");_t(this,"timer",null);_t(this,"twofa");this.httpService=n,this.account=i,this.amount=a,this.http=n.getInstance(),this.request=r,this.site=o}reopenSocket(r){this.setSocket(r.target.url)}clearTimer(){clearTimeout(this.timer)}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=n=>this.socketError(n),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onopen=n=>this.socketOpen(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=n=>{this.twofa=null,this.emit("socket-close",n),r&&r(this)},this.socket.close()}socketError(r){this.loading=!1,this.emit("socket-error",r)}socketMessage(r){const n=JSON.parse(r.data);this.clearTimer(),n.code===401&&dr("unauthorized",{id_request:this.request.id_request}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.site&&this.site.config?this.site.config.id_site:null,id_request:this.request.id_request},this.httpService),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",n),this.startTimer(),n.code===411&&dr("twofa_timeout",{id_request:this.request.id_request}),(200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410)&&(n.code<300?(this.finalResponse="success",dr("transfer_success",{code:n.code,id_request:this.request.id_request})):(this.finalResponse="error",dr("transfer_error",{code:n.code,code_origin:"socket",id_request:this.request.id_request})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose())}socketOpen(r){this.emit("socket-open",r)}socketTimeout(){this.socketClose(()=>{this.emit("socket-timeout")})}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},24e4)}transfer(r){return dr("transfer",{id_request:this.request.id_request,...this.account?{id_user_account:this.account.id_user_account}:{},...this.site?{id_site:this.site.config.id_site}:{}}),this.loading=!0,this.startTimer(),this.http.post("/v1/transfers/transfer",{id_request:this.request.id_request,...r?{credentials:r,id_site:this.site.config.id_site}:{id_user_account:this.account.id_user_account},transfer_amount:this.amount}).then(n=>(this.response=n,this.setSocket(n.ws),n)).catch(n=>(this.loading=!1,dr("transfer_error",{code:n.response.status,code_origin:"endpoint",id_request:this.request.id_request}),this.clearTimer(),Promise.reject(n)))}}class ox extends Io.EventEmitter{constructor(r,n){super();_t(this,"defaultParams");_t(this,"http");_t(this,"httpService");_t(this,"isHeadless");_t(this,"quickAnswer");_t(this,"socketTimeoutTime");this.token=r,this.httpService=n.http?new WF(r,{...n.http,widgetVersion:n.widgetVersion}):new WF(r,{widgetVersion:n.widgetVersion}),this.http=this.httpService.getInstance(),this.httpService.on("401",this.debounce401()),this.defaultParams=n.defaultParams,this.isHeadless=n.isHeadless,this.quickAnswer=n.quickAnswer,this.socketTimeoutTime=n.socketTimeout}addAccountAndTransferConnection(r,n,a){switch(n.version){case 3:return new ax(r,this.httpService,a,null,new YF({...n,quickAnswer:this.quickAnswer,request:r},this.httpService,this.defaultParams,this.socketTimeoutTime));default:return new ax(r,this.httpService,a,null,new ZF({...n,quickAnswer:this.quickAnswer,request:r},this.httpService,this.defaultParams,this.socketTimeoutTime))}}getAccountsList(){return this.http.get("/v1/transfers/users/accounts",{params:{...this.defaultParams}})}getCountries(){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/countries",{params:{...this.defaultParams}})}getHttpService(){return this.httpService}getOganizationSites(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/organizations/sites",{params:{...this.defaultParams,...r}})}getOganizationTypes(){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/site_organization_types",{params:{...this.defaultParams}})}getSite(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get(`/v1/catalogues/widget/sites/${r}`,{params:{...this.defaultParams}})}getTransferOganizationSites(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/transfers/catalogues/organizations/sites",{params:{...this.defaultParams,...r}})}getTransferRequest(r){return this.http.get(`/v1/transfers/transfer/requests/${r}`,{params:{...this.defaultParams}})}siteConnection(r){switch(r.version){case 3:return new YF({...r,quickAnswer:this.quickAnswer},this.httpService,this.defaultParams,this.socketTimeoutTime,this.isHeadless);default:return new ZF({...r,quickAnswer:this.quickAnswer},this.httpService,this.defaultParams,this.socketTimeoutTime,this.isHeadless)}}strictMode({token:r,strict:n}){return this.token=r,fpe(n).then(({strictAuthorizationKey:a,strictBodyKey:i})=>MB({token:r},a).then(o=>(this.httpService.updateToken(o),lpe().then(({authorization:l})=>{const f={authorization:btoa(JSON.stringify(l.toJSON(!0)))};return CB(f,i).then(u=>this.updateStrictSession(r,o,u).then(()=>MB({token:r},l).then(d=>this.updateToken(d).then(()=>(this.httpService.updateToken(this.token,i),{jws:d,jwe:i})))))}))))}syncCredential(r){return new BTe(r,this,this.httpService,this.socketTimeoutTime,this.isHeadless)}transferConnection(r,n,a){return new ax(r,this.httpService,a,n)}updateApiBaseUrl(r){this.http.defaults.baseURL=r,Da.defaults.baseURL=r}updateEnvironment(r){switch(r){case"production":this.http.defaults.baseURL="https://sync.paybook.com",Da.defaults.baseURL="https://sync.paybook.com";break;case"development":this.http.defaults.baseURL="https://api.syncfy.paybook.dev",Da.defaults.baseURL="https://api.syncfy.paybook.dev";break;default:this.http.defaults.baseURL="https://sync.paybook.com",Da.defaults.baseURL="https://sync.paybook.com";break}}updateToken(r){return new Promise(n=>{this.token!==r&&(this.token=r,this.httpService.updateToken(this.token)),n({token:r})})}debounce401(){return Lm(200,()=>{this.emit("sync_401")})}updateStrictSession(r,n,a){return Da.put(`/v1/sessions/jwt/${r}`,{type:"jwt","payload/jwe":a},{headers:{Authorization:`Bearer ${n}`}})}}class sx{constructor(t){_t(this,"callback");_t(this,"messages");this.messages=t}getMessages(){return this.messages}subscribe(t){this.callback=t}updateMessages(t){this.messages={...this.messages,...t},this.callback&&this.callback()}}const M7e="",kTe={key:1},NTe=Fn(st({__name:"DataWidget",props:{enableTestMode:{type:Boolean},entrypoint:{},internal:{},locale:{},navigation:{},refreshTokenFunction:{type:Function},strict:{},token:{}},emits:["tokenRefreshed"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),{t:i,locale:o}=yi({useScope:"global"}),l=Re([]),f=Re(null),u=Re(!1),d=Re(null),m=Re(null),v=Re(""),y=Re(""),_=Re(!0),E=Re(!1),C=Re(!1),T=Re(null),I=Re([]),k=Re(null),N=Re(null),O=Re(null),P=Re(!1),z=Re(null),V=Re(null);let L="https://s.paybook.com",U=null,M=!1,s=`${ac()}${n.strict?"-strict":""}`,h=null,p,g=[],b=null,w=null,A=null;const x=Ee(()=>_.value?!1:N.value?n.entrypoint.site&&n.navigation.oneSiteFlow?N.value==="twofa":N.value==="finish"?n.navigation.enableBackNavigation:N.value==="twofa"?n.navigation.enableTwofaBackNavigation:n.navigation.enableBackNavigation&&N.value==="start":!!k.value),c=Ee(()=>l.value.filter(he=>(he.id_country==="51ad44db3b8e77631200047d"||he.id_country==="51ad44793b8e77631200027a")&&n.internal.plaidSites||ae(he.id_country).length).sort((he,be)=>he.name.localeCompare(be.name))),S=Ee(()=>j(f.value,k.value)),B=Ee(()=>ae(f.value)),R=Ee(()=>se(f.value,k.value,T.value)),H=Ee(()=>`${y.value}${v.value?`: ${v.value}`:""}`),X=Ee(()=>{let he=[];return I.value&&I.value.forEach(be=>{he=[...he,...be.sites.map(it=>({...it,avatar:be.avatar,cover:be.cover,organizationSite:be}))]}),he});ut(()=>n.locale,(he,be)=>{he!==be&&["es","en"].includes(he)&&(o.value=he)}),ut(()=>n.internal,(he,be)=>{if(A.defaultParams=he.defaultHttpParams||{},A.defaultParams.locale=n.locale,he.apiEnv!==be.apiEnv)switch(A.updateEnvironment(he.apiEnv),he.apiEnv){case"production":L="https://s.paybook.com";break;case"development":L="https://s.paybook.dev";break;default:L="https://s.paybook.com";break}he.apiBaseUrl!==be.apiBaseUrl&&he.apiBaseUrl&&A.updateApiBaseUrl(he.apiBaseUrl),he.assetsBaseUrl!==be.assetsBaseUrl&&he.assetsBaseUrl&&(L=he.assetsBaseUrl),$()}),ut(()=>n.navigation.displayPersonalSites,()=>{$()}),ut(()=>n.navigation.displayBusinessSites,()=>{$()}),ut(y,he=>{h&&p.updateMessages({short:he})}),ut(v,he=>{h&&p.updateMessages({long:he})}),ut(P,()=>{!P.value&&!h&&N.value&&N.value!=="start"&&N.value!=="finish"?(p=new sx({short:v.value}),h=Vt.info({duration:0,message:vt(Gt,{assetsPath:L,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,enableBackNavigation:n.navigation.enableTwofaBackNavigation,item:b,messagesUpdater:p,rootEmit:a,selectClass:n.navigation.selectClass,showLogo:n.navigation.displayLogoImages,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onBack:()=>{a("back"),ue(),b=N.value=null,pe(w,!1),D(),P.value=!0},onError:he=>{oe(he)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),position:n.navigation.toastPosition,showClose:!1})):P.value&&h&&(P.value=!1,Vt.error({duration:0,position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})}))}),fn(()=>{M=!0,window.removeEventListener("resize",D)}),ir(()=>{kt(()=>{a("dom-updated")})}),Au(()=>{kt(()=>{a("dom-updated")})});function G(){["es","en"].includes(n.locale)&&(o.value=n.locale),L=n.internal.apiEnv?n.internal.apiEnv==="production"?"https://s.paybook.com":"https://s.paybook.dev":"https://s.paybook.com",n.internal.assetsBaseUrl&&(L=n.internal.assetsBaseUrl),n.strict?(Ye(),_.value=!0,setTimeout(()=>{A.strictMode({token:n.token,strict:n.strict}).then(()=>{$()})},400)):(Ye(),$()),window.addEventListener("resize",D)}function Y(){dr("close"),P.value=!1,(N.value==="start"||N.value==="finish")&&(N.value=b=null),a("closed")}function ue(){h&&(h.close(),h=null)}function oe(he){const be=q(he);!n.navigation.displayErrorsInToast&&P?(d.value=i(`${be}long_description`),m.value=i(`${be}short_description`)):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i(`${be}long_description`),initMessage:i(`${be}short_description`),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ne(he,be)}const ce=Lm(200,function(){if(u.value=!1,n.entrypoint.site&&n.navigation.oneSiteFlow)A.getSite(n.entrypoint.site).then(he=>{if(a("loaded"),he&&he.length){const be=he[0].site_organization;pe({...he[0],avatar:be.avatar,cover:be.avatar,organizationSite:be})}else re({response:{status:"site_not_found"}})}).catch(re).finally(()=>{_.value=!1});else{const he={};T.value=null,(n.navigation.displayPersonalSites||n.navigation.displayBusinessSites)&&!(n.navigation.displayPersonalSites&&n.navigation.displayBusinessSites)&&(n.navigation.displayPersonalSites?he.is_personal=1:he.is_business=1);const be=[A.getCountries(),A.getOganizationTypes(),A.getOganizationSites(he)];return Promise.all(be).then(it=>{l.value=it[0],g=it[1],n.internal.plaidSites&&g.unshift({id_site_organization_type:"__internal__.plaidSites",label:"webapp_add_banks",name:"plaid"}),I.value=it[2]}).then(()=>kt().then(()=>{if(a("loaded"),ve(),n.entrypoint.site){const it=X.value.find(we=>we.id_site===n.entrypoint.site);return it?pe(it):Promise.reject({response:{status:"site_not_found"}})}if(n.entrypoint.credential)return ie(n.entrypoint.credential)})).catch(re).finally(()=>{_.value=!1})}});function ne(he,be){a("api-error",he.response?he.response.status:500,{longMessage:i(`${be}real.long_description`),message:i(`${be}real.short_description`),noInternet:!he.response})}function J(he){a("socket-error",{longMessage:i(`socket.${he}.long_description`),type:he,message:i(`socket.${he}.short_description`)})}function j(he,be){return(n.navigation.displaySiteOrganizations.length||n.navigation.hideSiteOrganizations.length?I.value.filter(it=>{if(n.navigation.displaySiteOrganizations.length)return!!n.navigation.displaySiteOrganizations.find(we=>we===it.name||we===it.id_site_organization);if(n.navigation.hideSiteOrganizations.length)return!n.navigation.hideSiteOrganizations.find(we=>we===it.name||we===it.id_site_organization)}):I.value).filter(it=>he===it.id_country&&be===it.id_site_organization_type&&se(he,be,it.id_site_organization).length)}function ae(he){return(n.navigation.displaySiteOrganizationTypes.length||n.navigation.hideSiteOrganizationTypes.length?g.filter(be=>{if(n.navigation.displaySiteOrganizationTypes.length)return!!n.navigation.displaySiteOrganizationTypes.find(it=>it===be.name||it===be.id_site_organization_type);if(n.navigation.hideSiteOrganizationTypes.length)return!n.navigation.hideSiteOrganizationTypes.find(it=>it===be.name||it===be.id_site_organization_type)}):g).filter(be=>(he==="51ad44db3b8e77631200047d"||he==="51ad44793b8e77631200027a")&&n.internal.plaidSites&&be.id_site_organization_type==="__internal__.plaidSites"?!0:j(he,be.id_site_organization_type).length)}function se(he,be,it){return(n.navigation.displaySites.length||n.navigation.hideSites.length?X.value.filter(we=>{if(n.navigation.displaySites.length)return!!n.navigation.displaySites.find(Be=>Be===we.name||Be===we.id_site);if(n.navigation.hideSites.length)return!n.navigation.hideSites.find(Be=>Be===we.name||Be===we.id_site)}):X.value).filter(we=>he===we.organizationSite.id_country&&be===we.organizationSite.id_site_organization_type&&it===we.organizationSite.id_site_organization)}function q(he){return typeof he=="string"?he:he.response&&he.response.data&&he.response.data.message==="Credential error, please consider updating credential password"?"api_errors.credential_error.":`api_errors.${he.response?he.response.status?he.response.status:500:"no_internet"}.`}function D(){kt(()=>{var he;M||(E.value=rh.device.type==="mobile"||((he=V.value)==null?void 0:he.clientWidth)<600)})}function F(){if(!N.value)T.value?te():(a("back"),k.value=null);else if(N.value==="finish")le();else if(N.value==="twofa")Je();else return Ce()}function $(){_.value=!0,ce()}function re(he){const be=q(he);u.value=i(`${be}short_description`),!he.response&&n.navigation.displayErrorsInToast&&Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:i(`${be}long_description`),initMessage:i(`${be}short_description`),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),a("loaded"),ne(he,be)}function Q(){dr("open"),_.value||ve(),P.value=!0,D(),a("opened")}function te(){a("back"),T.value=null}function le(){N.value=T.value=b=null}function Z(he){dr("open_site_organization",{id_site_organization:he.id_site_organization}),T.value=he.id_site_organization,kt(()=>{R.value.length===1&&pe(R.value[0])})}function K(){if(n.entrypoint.siteOrganizationType){const he=B.value.find(be=>be.id_site_organization_type===n.entrypoint.siteOrganizationType);if(he){const be=he.id_site_organization_type;dr("open_site_organization_type",{id_site_organization_type:be}),k.value=be}}}function pe(he,be=!0){let it;be&&dr("open_site",{id_site:he.id_site}),!b||!b.loading?(w=he,it=b=A.siteConnection(he),N.value="start",m.value=null,d.value=null,b.on("login-success",()=>{P.value&&n.navigation.displayStatusInToast&&Y()}),b.on("socket-close",ue),b.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(d.value=i("socket.error.long_description"),m.value=i("socket.error.short_description")),J("error")}),b.on("socket-message",we=>{const Be=`socket.message.${we.code?we.code:500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);switch(!0){case(400<=we.code&&we.code<600&&we.code!==410):ue(),m.value=gt,d.value=Ie,a("error",b.response,{code:we.code,longMessage:Ie,message:gt}),P.value?n.navigation.returnToSiteFormOnUserError!==!1&&(n.navigation.returnToSiteFormOnUserError===!0&&[401,403,411].includes(we.code)||n.navigation.returnToSiteFormOnUserError!==!0&&n.navigation.returnToSiteFormOnUserError.includes(we.code))&&(N.value=b=null,pe(w,!1),O.value={short:gt,long:Ie}):(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),le(),ve());break;case(200<=we.code&&we.code<300):ue(),m.value=gt,d.value=Ie,a("success",b.response),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve());break;default:y.value=gt,v.value=Ie}a("status",we)}),b.on("socket-quick-answer",()=>{m.value=i("socket.quick_answer.short_description"),d.value=i("socket.quick_answer.long_description"),a("success",b.response),ue(),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:i("socket.quick_answer.long_description"),initMessage:i("socket.quick_answer.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve())}),b.on("socket-timeout",()=>{m.value=i("socket.timeout.short_description"),d.value=i("socket.timeout.long_description"),a("error",b.response),P.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),le(),ve()),J("timeout")}),b.on("status-update",we=>{b===it&&(N.value=we)}),b.on("twofa",()=>{y.value=i("twofa.waiting")})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function ie(he){if(dr("open_credential",{id_credential:he}),!U||!U.loading){let be=new sx({short:i("common.search_credential_message")}),it=Vt.info({showClose:!1,position:n.navigation.toastPosition,duration:0,message:vt(Gt,{assetsPath:L,duration:0,initTitle:i("common.search_credential"),messagesUpdater:be,showLogo:!1,t:i,type:"info",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})});U=A.syncCredential(he),U.on("found",()=>{be.updateMessages({short:i("common.credential_found_message")})}),U.on("loading",()=>{it.close(),a("updated",U.response),p=new sx({}),h=Vt.info({showClose:!1,position:n.navigation.toastPosition,duration:0,message:vt(Gt,{assetsPath:L,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,item:U,messagesUpdater:p,rootEmit:a,selectClass:n.navigation.selectClass,showLogo:n.navigation.displayLogoImages,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onError:we=>{ue(),oe(we)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})})}),U.on("socket-message",we=>{const Be=`socket.message.${we.code?we.code:500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);p.updateMessages({long:Ie,short:gt}),a("status",we)}),U.on("socket-error",()=>{ue(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:U,hideForm:!0,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),J("error")}),U.on("twofa-api-error",ue),U.on("success",()=>{const{code:we}=U.message,Be=`socket.message.${we||500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);ue(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),a("success",U.response)}),U.on("error",()=>{const{code:we}=U.error,Be=U.error.response?q(U.error):`socket.message.${we||500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);U.error.response?it.close():ue(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),U.error.response?ne(U.error,Be):a("error",U.response,{code:we,longMessage:Ie,message:gt})}),U.on("socket-quick-answer",()=>{m.value=i("socket.quick_answer.short_description"),d.value=i("socket.quick_answer.long_description"),a("success",U.response),ue(),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,initLongMessage:i("socket.quick_answer.long_description"),initMessage:i("socket.quick_answer.short_description"),item:U,hideForm:!0,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve())}),U.on("socket-timeout",()=>{ue(),a("error",U.response),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),J("timeout")}),U.on("not-found",()=>{const we=q(U.error);it.close(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i(`${we}long_description`),initMessage:i(`${we}short_description`),t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ne(U.error,we)})}else Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function ve(){if(u.value)return;let he;n.entrypoint.country&&(he=c.value.find(be=>be.code===n.entrypoint.country||be.id_country===n.entrypoint.country)),c.value.length?(f.value=he?he.id_country:c.value[0].id_country,dr("open_country",{id_country:f.value}),K(),C.value=!1):C.value=!0}function Ye(){A=new ox(n.token,{http:{baseURL:n.internal.apiBaseUrl?n.internal.apiBaseUrl:n.internal.apiEnv?n.internal.apiEnv==="production"?"https://sync.paybook.com":"https://api.syncfy.paybook.dev":"https://sync.paybook.com",isStrict:!!n.strict},defaultParams:{locale:n.locale,...n.internal.defaultHttpParams},isHeadless:!1,quickAnswer:n.navigation.quickAnswer,socketTimeout:n.navigation.socketTimeout,widgetVersion:s});let he=null;A.on("sync_401",()=>{n.refreshTokenFunction&&!he&&(he=Vt.error({position:n.navigation.toastPosition,showClose:!1,message:vt(mF,{initTitle:i("common.unauthorized"),initMessage:i("common.unauthorized_message"),refreshTokenFunction:n.refreshTokenFunction,t:i,onClosed:()=>{he=null},onCloseNotification:()=>{he.close()},onRefreshToken:({token:be,strict:it,resolve:we})=>{r("tokenRefreshed",be),Se(be,it).then(()=>(he.close(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:n.navigation.toastDuration,initMessage:i("common.session_refreshed_message"),initTitle:i("common.session_refreshed"),showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),$(),we(null)))},onRefreshTokenError:()=>{Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:0,initMessage:i("common.session_error"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}}),duration:0})),a("401")})}function Se(he,be){return be?A.strictMode({token:he,strict:be}):A.updateToken(he)}function Ce(){a("back"),dr("close_site",{id_site:b.config.id_site}),N.value=b=null,O.value=null,R.value.length===1&&(T.value=null)}function Je(he=!0){he&&a("back"),N.value=b=null,pe(w,!1)}return G(),t({close:Y,open:Q,setCredential:ie,setToken:Se}),(he,be)=>(me(),Fe(wt,null,[ht(pF,{visible:P.value,"onUpdate:visible":be[5]||(be[5]=it=>P.value=it),mobile:E.value},{default:rt(()=>[P.value?(me(),Fe("div",{key:0,ref_key:"widgetContainer",ref:V,class:Te([he.$style.container,{[he.$style["is-mobile"]]:E.value}])},[Ue("div",{class:Te(he.$style["widget-header"])},[x.value?(me(),Qe(W(Xr),{key:0,onClick:F},{default:rt(()=>[ht(Fa,{icon:"back"})]),_:1})):(me(),Fe("span",kTe)),Ue("h1",null,ot(N.value&&n.entrypoint.site?W(i)("common.update_title"):W(i)("common.title")),1),ht(W(Xr),{class:Te(he.$style["widget-close-button"]),onClick:Y},{default:rt(()=>[ht(Fa,{icon:"close"})]),_:1},8,["class"])],2),tn((me(),Fe("div",null,[!_.value&&!u.value&&!C.value?(me(),Fe(wt,{key:0},[N.value?(me(),Fe(wt,{key:1},[N.value==="start"||N.value==="loading"?(me(),Qe(hF,{key:0,ref_key:"siteForm",ref:z,"assets-path":W(L),"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"error-message":O.value,"hide-back-button":!n.navigation.enableBackNavigation,"loader-message":H.value,"one-site-flow":n.navigation.oneSiteFlow&&!!n.entrypoint.site,"select-class":n.navigation.selectClass,"show-logo":n.navigation.displayLogoImages,"show-password-style":n.navigation.formShowPasswordStyle,site:W(b),"test-mode":he.enableTestMode,onBack:Ce,onError:oe,onSuccess:be[3]||(be[3]=()=>{y.value=W(i)("site.login.success")}),onValid:be[4]||(be[4]=()=>{y.value=W(i)("site.login.authenticating"),O.value=null})},null,8,["assets-path","button-disabled-style","disable-form-autocomplete","error-message","hide-back-button","loader-message","one-site-flow","select-class","show-logo","show-password-style","site","test-mode"])):et("",!0),N.value==="twofa"||N.value==="twofa-loading"?(me(),Qe(H3,{key:1,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"enable-back-navigation":n.navigation.enableTwofaBackNavigation,"loader-message":H.value,"select-class":n.navigation.selectClass,"show-password-style":n.navigation.formShowPasswordStyle,twofa:W(b).twofa,onBack:Je,onError:oe},null,8,["button-disabled-style","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-password-style","twofa"])):et("",!0),N.value==="finish"?(me(),Qe(uF,{key:2,"long-message":d.value,message:m.value,"one-site-flow":n.navigation.oneSiteFlow&&!!n.entrypoint.site,type:W(b).finalResponse,onAccept:le},null,8,["long-message","message","one-site-flow","type"])):et("",!0)],64)):(me(),Fe(wt,{key:0},[k.value?et("",!0):(me(),Qe(G5e,{key:0,"country-id":f.value,"onUpdate:countryId":be[0]||(be[0]=it=>f.value=it),"organization-type-id":k.value,"onUpdate:organizationTypeId":be[1]||(be[1]=it=>k.value=it),"filtered-countries":c.value,"filtered-organization-types":B.value,"show-countries":!n.navigation.hideSelectCountry,"select-class":n.navigation.selectClass},null,8,["country-id","organization-type-id","filtered-countries","filtered-organization-types","show-countries","select-class"])),f.value&&k.value&&!T.value?(me(),Qe(cF,{key:1,items:S.value,"show-logo":n.navigation.displayLogoImages,"show-plaid-sites-button":n.internal.plaidSites&&k.value==="__internal__.plaidSites","assets-path":W(L),onSelect:Z},null,8,["items","show-logo","show-plaid-sites-button","assets-path"])):et("",!0),f.value&&k.value&&T.value?(me(),Qe(dF,{key:2,items:R.value,"show-logo":n.navigation.displayLogoImages,"assets-path":W(L),onSelect:pe,onBack:be[2]||(be[2]=it=>te())},null,8,["items","show-logo","assets-path"])):et("",!0)],64))],64)):et("",!0),u.value?(me(),Fe("div",{key:1,class:Te(he.$style["widget-data-error"])},[Ue("p",null,ot(u.value.length?u.value:W(i)("common.data_error")),1),ht(W(Xr),{onClick:$},{default:rt(()=>[br(ot(W(i)("common.retry")),1)]),_:1})],2)):et("",!0),C.value?(me(),Fe("div",{key:2,class:Te(he.$style["widget-data-error"])},[Ue("p",null,ot(W(i)("common.no_filtered_data")),1),ht(W(Xr),{onClick:Y},{default:rt(()=>[br(ot(W(i)("common.close")),1)]),_:1})],2)):et("",!0)])),[[W(Mf),_.value]])],2)):et("",!0)]),_:1},8,["visible","mobile"]),Ue("div",{class:Te(he.$style["widget-version"])},ot(W(s)),3)],64))}}),[["__cssModules",{$style:{"widget-close-button":"pb-w-sync_widget-close-button",container:"pb-w-sync_container","is-mobile":"pb-w-sync_is-mobile","widget-header":"pb-w-sync_widget-header","widget-data-error":"pb-w-sync_widget-data-error","widget-version":"pb-w-sync_widget-version"}}]]),OTe=["disabled","onClick"],RTe=Fn(st({__name:"AccountsList",props:{items:{default:()=>[]},locale:{}},emits:["addNewAccount","back","select"],setup(e,{emit:t}){const r=e,{t:n}=yi();function a(){t("addNewAccount")}function i(u){const d=`${u}`;return d.length===1?`0${d}`:d}function o(u){const d=new Date(u.dt_use*1e3);return r.locale==="en"?`${i(d.getMonth()+1)}/${i(d.getDate())}/${d.getFullYear()} ${i(d.getHours())}:${i(d.getMinutes())}`:`${i(d.getDate())}/${i(d.getMonth()+1)}/${d.getFullYear()} ${i(d.getHours())}:${i(d.getMinutes())}`}function l(u){return new Date(u.dt_use*1e3)>new Date}function f(u){t("select",u)}return(u,d)=>(me(),Fe("div",{class:Te(u.$style["accounts-container"])},[Ue("h2",null,ot(W(n)("transfer.choose_institution")),1),Ue("div",{class:Te(u.$style.accounts)},[(me(!0),Fe(wt,null,jn(r.items,(m,v)=>(me(),Fe("button",{key:`${m.id_site}-${v}`,disabled:l(m),type:"button",class:Te(u.$style["account-button"]),onClick:()=>f(m)},[Ue("div",{class:Te(u.$style["account-inner"])},[Ue("div",{class:Te(u.$style["account-text"])},[Ue("span",{class:Te(u.$style["account-name"])},ot(m.name),3),l(m)?(me(),Fe("span",{key:0,class:Te(u.$style["site-message"])},ot(W(n)("transfer.account_not_ready",{label:o(m)})),3)):et("",!0)],2)],2)],10,OTe))),128)),Ue("button",{type:"button",class:Te(u.$style["account-button"]),onClick:a},[Ue("div",{class:Te(u.$style["account-inner"])},[Ue("div",{class:Te(u.$style["account-text"])},[Ue("span",{class:Te(u.$style["account-name"])},ot(W(n)("transfer.new_account")),3)],2)],2)],2)],2),ht(W(Xr),{onClick:d[0]||(d[0]=m=>u.$emit("back"))},{default:rt(()=>[br(ot(W(n)("common.back")),1)]),_:1})],2))}}),[["__cssModules",{$style:{"accounts-container":"pb-w-sync_accounts-container",accounts:"pb-w-sync_accounts","account-button":"pb-w-sync_account-button","account-inner":"pb-w-sync_account-inner",avatar:"pb-w-sync_avatar","account-text":"pb-w-sync_account-text","account-message":"pb-w-sync_account-message","account-name":"pb-w-sync_account-name"}}]]),PTe=Fn(st({__name:"ChooseAccount",props:{assetsPath:{},entrypoint:{},navigation:{},organizationSiteId:{default:void 0},sync:{}},emits:["back","selectOrganizationSite","selectSite"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i=Re([]),o="",l,f=!0,u=Re([]),d,m=Re([]);const v=Ee(()=>i.value.filter(U=>!!u.value.find(M=>U.id_country===M.id_country)).sort((U,M)=>{let s=U.name.toUpperCase(),h=M.name.toUpperCase();return s<h?-1:s>h?1:0})),y=Ee(()=>u.value.filter(U=>r.navigation.displaySiteOrganizations.length?!!r.navigation.displaySiteOrganizations.find(M=>M===U.name||M===U.id_site_organization):r.navigation.hideSiteOrganizations.length?!r.navigation.hideSiteOrganizations.find(M=>M===U.name||M===U.id_site_organization):!0).filter(U=>o===U.id_country&&d===U.id_site_organization_type)),_=Ee(()=>m.value.filter(U=>r.navigation.displaySiteOrganizationTypes.length?!!r.navigation.displaySiteOrganizationTypes.find(M=>M===U.name||M===U.id_site_organization_type):r.navigation.hideSiteOrganizationTypes.length?!r.navigation.hideSiteOrganizationTypes.find(M=>M===U.name||M===U.id_site_organization_type):!0).filter(U=>o?!!u.value.filter(M=>o===M.id_country).find(M=>U.id_site_organization_type===M.id_site_organization_type):!0)),E=Ee(()=>C.value.filter(U=>r.navigation.displaySites.length?!!r.navigation.displaySites.find(M=>M===U.name||M===U.id_site):r.navigation.hideSites.length?!r.navigation.hideSites.find(M=>M===U.name||M===U.id_site):!0).filter(U=>{const M=U.organizationSite;return o===M.id_country&&d===M.id_site_organization_type&&r.organizationSiteId===M.id_site_organization})),C=Ee(()=>{let U=[];return u.value&&u.value.forEach(M=>{U=[...U,...M.sites.map(s=>({...s,avatar:M.avatar,cover:M.cover,organizationSite:M}))]}),U});ut(()=>r.navigation.displayPersonalSites,()=>{N()}),ut(()=>r.navigation.displayBusinessSites,()=>{N()}),Aw(()=>{N()});const T=Lm(200,function(){const U={};l=void 0,(r.navigation.displayPersonalSites?!r.navigation.displayBusinessSites:r.navigation.displayBusinessSites)&&(r.navigation.displayPersonalSites?U.is_personal=1:U.is_business=1);const M=[r.sync.getCountries(),r.sync.getOganizationTypes(),r.sync.getTransferOganizationSites(U)];return Promise.all(M).then(s=>{i.value=s[0],m.value=s[1],u.value=s[2]}).then(()=>kt().then(()=>{n("loaded"),L()})).catch(O).finally(()=>{f=!1})});function I(U,M){n("api-error",U.response?U.response.status:500,{longMessage:a(`${M}real.long_description`),message:a(`${M}real.short_description`),noInternet:!U.response})}function k(U){return`api_errors.${U.response?U.response.status?U.response.status:500:"no_internet"}.`}function N(){f=!0,T()}function O(U){const M=k(U);l=a(`${M}short_description`),!U.response&&r.navigation.displayErrorsInToast&&Vt.error({position:r.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:a(`${M}long_description`),initMessage:a(`${M}short_description`),showLogo:!1,t:a,type:"error"}),duration:0}),n("loaded"),I(U,M)}function P(U){dr("open_site_organization",{id_site_organization:U.id_site_organization}),t("selectOrganizationSite",U.id_site_organization),kt(()=>{E.value.length===1&&V(E.value[0],!1)})}function z(U){U!==d&&(dr("open_site_organization_type",{id_site_organization_type:U}),d=U)}function V(U,M=!0){t("selectSite",U,M)}function L(){if(l)return;let U,M;r.entrypoint.country&&(U=v.value.find(s=>s.code===r.entrypoint.country||s.id_country===r.entrypoint.country)),r.entrypoint.siteOrganizationType&&(M=_.value.find(s=>s.id_site_organization_type===r.entrypoint.siteOrganizationType)),o=U?U.id_country:v.value[0].id_country,dr("open_country",{id_country:o}),z(M?M.id_site_organization_type:_.value[0].id_site_organization_type)}return(U,M)=>tn((me(),Fe("div",{class:Te(U.$style["choose-account"])},[!W(f)&&!W(l)?(me(),Fe(wt,{key:0},[r.organizationSiteId?(me(),Qe(dF,{key:1,items:E.value,"show-logo":U.navigation.displayLogoImages,"assets-path":U.assetsPath,onSelect:V,onBack:M[1]||(M[1]=()=>{t("selectOrganizationSite",null),W(n)("back")})},null,8,["items","show-logo","assets-path"])):(me(),Fe(wt,{key:0},[ht(cF,{items:y.value,"show-logo":U.navigation.displayLogoImages,"assets-path":U.assetsPath,onSelect:P},null,8,["items","show-logo","assets-path"]),ht(W(Xr),{onClick:M[0]||(M[0]=()=>t("back"))},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})],64))],64)):et("",!0),W(l)?(me(),Fe("div",{key:1,class:Te(U.$style["widget-data-error"])},[Ue("p",null,ot(W(l).length?W(l):W(a)("common.data_error")),1),ht(W(Xr),{onClick:N},{default:rt(()=>[br(ot(W(a)("common.retry")),1)]),_:1})],2)):et("",!0)],2)),[[W(Mf),W(f)]])}}),[["__cssModules",{$style:{"choose-account":"pb-w-sync_choose-account","widget-inner":"pb-w-sync_widget-inner","widget-inner-content":"pb-w-sync_widget-inner-content","widget-data-error":"pb-w-sync_widget-data-error"}}]]),FTe=st({__name:"AmountInput",props:{allowBlank:{type:Boolean,default:Mo.allowBlank},decimal:{default:Mo.decimal},disabled:{type:Boolean,default:!1},id:{default:""},masked:{type:Boolean,default:!1},max:{default:Mo.max},maxlength:{default:void 0},min:{default:Mo.min},modelValue:{},placeholder:{default:""},precision:{default:Mo.precision},prefix:{default:Mo.prefix},suffix:{default:Mo.suffix},thousands:{default:Mo.thousands}},emits:["blur","update:modelValue"],setup(e,{emit:t}){const r=e;let n="";function a(i){t("update:modelValue",r.masked?i:cz(i,r.precision))}return ut(()=>r.modelValue,i=>{var o=uz(i,r);o!==n&&(n=o)},{immediate:!0}),(i,o)=>{const l=Iw("money");return tn((me(),Qe(W(dm),{id:i.id,type:"tel",disabled:i.disabled,value:W(n),placeholder:i.placeholder,maxlength:i.maxlength,onInput:a,onBlur:o[0]||(o[0]=()=>t("blur"))},null,8,["id","disabled","value","placeholder","maxlength"])),[[l,{precision:i.precision,decimal:i.decimal,thousands:i.thousands,prefix:i.prefix,suffix:i.suffix,allowBlank:i.allowBlank,min:i.min,max:i.max}]])}}}),LTe=Fn(st({__name:"TransferForm",props:{buttonDisabledStyle:{type:Boolean},disableFormAutocomplete:{type:Boolean},request:{}},emits:["valid"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i={amount:r.request.amount},o=!0,l={transfer_amount:[{required:!0,message:a("form_errors.required",{label:a("transfer.amount")})},{type:"number",min:1}]},f={};const u=Re(null);ir(v);function d(y){y<0&&(i.amount=0)}function m(){u.value.validate(y=>{y&&(t("valid",i.amount),n("submitted"))})}function v(y,_){y&&(f[y]=_),o=Object.keys(l).reduce((E,C)=>l[C].length===0?E:E||!f[C],!1)}return(y,_)=>{const E=po("ElForm");return me(),Fe("div",{class:Te(y.$style["transfer-form"])},[ht(E,{ref_key:"transferForm",ref:u,"label-position":"top",model:W(i),rules:W(l),autocomplete:y.disableFormAutocomplete?"off":"on",onSubmit:Cn(m,["prevent"]),onValidate:v},{default:rt(()=>[Ue("h2",null,ot(W(a)("transfer.beneficiary")),1),Ue("p",{class:Te(y.$style["property-name"])},ot(y.request.beneficiary),3),ht(W(E3),{label:W(a)("transfer.amount_label"),prop:"amount"},{default:rt(()=>[ht(FTe,{modelValue:W(i).amount,"onUpdate:modelValue":_[0]||(_[0]=C=>W(i).amount=C),disabled:y.request.amount_fixed===1,onInput:d},null,8,["modelValue","disabled"])]),_:1},8,["label"]),Ue("h2",null,ot(W(a)("transfer.description")),1),Ue("p",{class:Te(y.$style["property-name"])},ot(y.request.description),3),Ue("div",{class:Te(y.$style["button-container"])},[ht(W(Xr),{disabled:y.buttonDisabledStyle&&W(o),type:"primary","native-type":"submit"},{default:rt(()=>[br(ot(W(a)("common.next")),1)]),_:1},8,["disabled"])],2)]),_:1},8,["model","rules","autocomplete","onSubmit"]),Ue("div",{class:Te(y.$style["secure-message-wrapper"])},[Ue("div",{class:Te(y.$style["secure-message-container"])},[ht(Fa,{icon:"shield"}),Ue("p",null,ot(W(a)("common.secure_message")),1)],2)],2)],2)}}}),[["__cssModules",{$style:{"transfer-form":"pb-w-sync_transfer-form","property-name":"pb-w-sync_property-name","secure-message-container":"pb-w-sync_secure-message-container","secure-message-wrapper":"pb-w-sync_secure-message-wrapper","button-container":"pb-w-sync_button-container"}}]]),DTe={key:1},$Te=["element-loading-text"],zTe=Fn(st({__name:"TransferWidget",props:{enableTestMode:{type:Boolean},entrypoint:{},internal:{},locale:{},navigation:{},refreshTokenFunction:{type:Function},strict:{},token:{}},emits:["tokenRefreshed"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),{t:i,locale:o}=yi({useScope:"global"}),l=Re(null);let f=null,u=null,d=!1,m=Re(null),v=!1,y="https://s.paybook.com",_=Re(!1),E=!1,C=null,T=null,I=`${ac()}${n.strict?"-props.strict":""}`,k=Re(""),N=Re(""),O=null,P=!0,z=!1,V=Re(null),L=null,U=null,M=null,s=Re(!1);const h=Ee(()=>!(P||M&&(M.$loading||M.twofa||M.$finalResponse)||!m.value)),p=Ee(()=>`${N.value}${k.value?`: ${k.value}`:""}`);ut(()=>n.locale,($,re)=>{$!==re&&["es","en"].includes($)&&(o.value=$)}),ut(()=>n.internal,($,re)=>{if(U.defaultParams=$.defaultHttpParams||{},U.defaultParams.props.locale=n.locale,$.apiEnv!==re.apiEnv)switch(U.updateEnvironment($.apiEnv),$.apiEnv){case"production":y="https://s.paybook.com";break;case"development":y="https://s.paybook.dev";break;default:y="https://s.paybook.com";break}$.apiBaseUrl!==re.apiBaseUrl&&$.apiBaseUrl&&U.updateApiBaseUrl($.apiBaseUrl),$.assetsBaseUrl!==re.assetsBaseUrl&&$.assetsBaseUrl&&(y=$.assetsBaseUrl),G()}),ut(N,()=>{O&&(O.$slots.default[0].componentInstance.$data.message=N)}),ut(k,()=>{O&&(O.$slots.default[0].componentInstance.$data.longMessage=k)}),ut(s,()=>{if(!s.value&&!O&&M&&M.$loading)return O=Vt.info({showClose:!1,position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,enableBackNavigation:!1,initMessage:N.value,item:M,selectClass:n.navigation.selectClass,showLogo:!1,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onBack:()=>{a("back"),O.close(),O=null,M=null,J(f,!1),H(),s.value=!0},onError:$=>{x($)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0});s&&O&&(s.value=!1,Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}))});function g(){["es","en"].includes(n.locale)&&(o.value=n.locale),y=n.internal.apiEnv?n.internal.apiEnv==="production"?"https://s.paybook.com":"https://s.paybook.dev":"https://s.paybook.com",n.internal.assetsBaseUrl&&(y=n.internal.assetsBaseUrl),n.strict?(q(),P=!0,setTimeout(()=>{U.strictMode({token:n.token,strict:n.strict}).then(()=>{G()})},400)):(q(),G()),window.addEventListener("resize",H)}fn(()=>{E=!0,window.removeEventListener("resize",H)}),ir(()=>{kt(()=>{a("dom-updated")})}),Au(()=>{kt(()=>{a("dom-updated")})});function b(){a("back"),m.value=null}function w(){a("back"),V.value?V.value=null:(d=!1,u.length===0&&(m.value=null))}function A(){dr("close"),s.value=!1,M&&!M.$loading&&(M=null),a("closed")}function x($,re=!1){const Q=re?"transfer.proccessed_transfer.":R($);!n.navigation.displayErrorsInToast&&s?(C=i(`${Q}long_description`),T=i(`${Q}short_description`),M.$finalResponse="error"):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i(`${Q}long_description`),initMessage:i(`${Q}short_description`),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),S($,Q)}const c=Lm(200,function(){const $=[U.getTransferRequest(n.entrypoint.transfer),U.getAccountsList()];return Promise.all($).then(re=>{re[0][0]?L=re[0][0]:Y({response:{status:"transfer_not_found"}}),u=re[1]}).then(()=>kt().then(()=>{a("loaded")})).catch(Y).finally(()=>{P=!1})});function S($,re){a("api-error",$.response?$.response.status:500,{longMessage:i(`${re}real.long_description`),message:i(`${re}real.short_description`),noInternet:!$.response})}function B($){a("socket-error",{longMessage:i(`socket.${$}.long_description`),type:$,message:i(`socket.${$}.short_description`)})}function R($){return`api_errors.${$.response?$.response.status?$.response.status:500:"no_internet"}.`}function H(){kt(()=>{E||(z=rh.device.type==="mobile"||l.value.clientWidth<600)})}function X(){M?F():u.length===0||d?w():b()}function G(){P=!0,c()}function Y($){const re=R($);_.value=i(`${re}short_description`),!$.response&&n.navigation.displayErrorsInToast&&Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:i(`${re}long_description`),initMessage:i(`${re}short_description`),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),a("loaded"),S($,re)}function ue($){M.site.loading=!0,M.transfer($).then(()=>{N.value=i("site.login.success")}).catch(re=>{M.site.loading=!1,x(re)})}function oe(){dr("open"),s.value=!0,H(),a("opened")}function ce(){M=null}function ne(){M=null,m.value=null,d=null,V.value=null}function J($,re=!0){re&&dr("open_account",{id_account:$.id_account}),!M||!M.$loading?(f=$,M=U.transferConnection(L,$,m),T=null,C=null,M.on("login-success",()=>{s&&n.navigation.displayStatusInToast&&A()}),M.on("socket-message",Q=>{const te=`transfer.socket.${Q.code?Q.code:500}.`,le=i(`${te}short_description`),Z=i(`${te}long_description`);switch(!0){case(400<=Q.code&&Q.code<600&&Q.code!==410):O&&(O.close(),O=null),T=le,C=Z,a("error",M.response,{code:Q.code,longMessage:Z,message:le}),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Z,initMessage:le,item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce());break;case(200<=Q.code&&Q.code<300):O&&(O.close(),O=null),T=le,C=Z,a("success",M.response),s.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Z,initMessage:le,item:{...M},showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),ce());break;default:M.twofa&&Q.code!==410&&(M.twofa.loading=!0),N.value=le,k.value=Z}a("status",Q)}),M.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(C=i("socket.error.long_description"),T=i("socket.error.short_description"),M.$finalResponse="error"),B("error")}),M.on("socket-close",()=>{O&&(O.close(),O=null)}),M.on("twofa",()=>{N.value=i("twofa.waiting"),k.value=null}),M.on("socket-timeout",()=>{T=i("socket.timeout.short_description"),C=i("socket.timeout.long_description"),a("error",M.response),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:{...M},showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce()),B("timeout")}),N.value=i("site.login.authenticating"),M.transfer().then(()=>{N.value=i("site.login.success")}).catch(Q=>{M=null,x(Q,Q.response.status===400)})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function j($){V.value=$}function ae($,re){dr("add_account_and_transfer",{id_site:$.id_site}),v=re,!M||!M.$loading?(M=U.addAccountAndTransferConnection(L,$,m.value),T=null,C=null,M.on("login-success",()=>{s&&n.navigation.displayStatusInToast&&A()}),M.on("socket-message",Q=>{const te=`transfer.socket.${Q.code?Q.code:500}.`,le=i(`${te}short_description`),Z=i(`${te}long_description`);switch(!0){case(400<=Q.code&&Q.code<600&&Q.code!==410):O&&(O.close(),O=null),T=le,C=Z,a("error",M.response,{code:Q.code,longMessage:Z,message:le}),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Z,initMessage:le,item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce());break;case(200<=Q.code&&Q.code<300):O&&(O.close(),O=null),T=le,C=Z,a("success",M.response),s.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Z,initMessage:le,item:{...M},showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),ce());break;default:M.twofa&&Q.code!==410&&(M.twofa.loading=!0),N.value=le,k.value=Z}a("status",Q)}),M.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(C=i("socket.error.long_description"),T=i("socket.error.short_description"),M.$finalResponse="error"),B("error")}),M.on("socket-close",()=>{O&&(O.close(),O=null)}),M.on("twofa",()=>{N.value=i("twofa.waiting"),k.value=null}),M.on("socket-timeout",()=>{T=i("socket.timeout.short_description"),C=i("socket.timeout.long_description"),a("error",M.response),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:{...M},showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce()),B("timeout")})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function se($){m.value=$}function q(){U=new ox(n.token,{http:{baseURL:n.internal.apiBaseUrl?n.internal.apiBaseUrl:n.internal.apiEnv?n.internal.apiEnv==="production"?"https://sync.paybook.com":"https://api.syncfy.paybook.dev":"https://sync.paybook.com",isStrict:!!n.strict},defaultParams:{locale:n.locale,...n.internal.defaultHttpParams},isHeadless:!1,quickAnswer:n.navigation.quickAnswer,socketTimeout:n.navigation.socketTimeout,widgetVersion:I});let $=null;U.on("sync_401",()=>{n.refreshTokenFunction&&!$&&($=Vt.error({position:n.navigation.toastPosition,showClose:!1,message:vt(mF,{initTitle:i("common.unauthorized"),initMessage:i("common.unauthorized_message"),refreshTokenFunction:n.refreshTokenFunction,t:i,onClosed:()=>{$=null},onCloseNotification:()=>{$.close()},onRefreshToken:({token:re,strict:Q,resolve:te})=>{r("tokenRefreshed",re),D(re,Q).then(()=>($.close(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:n.navigation.toastDuration,initMessage:i("common.session_refreshed_message"),initTitle:i("common.session_refreshed"),showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),G(),te(null)))},onRefreshTokenError:()=>{Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:0,initMessage:i("common.session_error"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}}),duration:0})),a("401")})}function D($,re){return re?U.strictMode({token:$,strict:re}):U.updateToken($)}function F(){a("back"),dr("close_site",{id_site:M.site.config.id_site}),M=null,v||(V.value=null)}return g(),t({close:A,open:oe,setToken:D}),($,re)=>(me(),Qe(pF,{visible:W(s),"onUpdate:visible":re[2]||(re[2]=Q=>hr(s)?s.value=Q:s=Q),mobile:W(z)},{default:rt(()=>[Ue("div",{ref_key:"widgetContainer",ref:l,class:Te([$.$style.container,{[$.$style["is-mobile"]]:W(z)}])},[Ue("div",{class:Te($.$style["widget-header"])},[h.value?(me(),Qe(W(Xr),{key:0,onClick:X},{default:rt(()=>[ht(Fa,{icon:"back"})]),_:1})):(me(),Fe("span",DTe)),Ue("h1",null,ot(W(i)("transfer.title",{label:W(L)?W(L).description:""})),1),ht(W(Xr),{class:Te($.$style["widget-close-button"]),onClick:A},{default:rt(()=>[ht(Fa,{icon:"close"})]),_:1},8,["class"])],2),tn((me(),Fe("div",{class:Te($.$style["widget-main"])},[!W(P)&&!W(_)?(me(),Fe("div",{key:0,class:Te($.$style["widget-inner"])},[Ue("div",{class:Te($.$style["widget-inner-content"])},[W(m)?(me(),Fe(wt,{key:1},[W(M)?(me(),Fe(wt,{key:1},[tn(Ue("div",{class:Te($.$style["widget-transfer-loader"]),"element-loading-text":p.value},null,10,$Te),[[vi,W(M).$loading&&!W(M).twofa&&!W(M).$finalResponse],[W(Mf),W(M).$loading&&!W(M).twofa&&!W(M).$finalResponse]]),W(M).site&&!W(M).twofa&&!W(M).$finalResponse?(me(),Qe(hF,{key:0,"assets-path":W(y),"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"hide-back-button":W(M).site&&!n.navigation.enableBackNavigation,"loader-message":p.value,"select-class":n.navigation.selectClass,"show-logo":n.navigation.displayLogoImages,"show-password-style":n.navigation.formShowPasswordStyle,site:W(M).site,"test-mode":n.enableTestMode,onBack:F,onSuccess:ue,onValid:re[1]||(re[1]=()=>{hr(N)?N.value=W(i)("site.login.authenticating"):N=W(i)("site.login.authenticating")})},null,8,["assets-path","button-disabled-style","disable-form-autocomplete","hide-back-button","loader-message","select-class","show-logo","show-password-style","site","test-mode"])):et("",!0),W(M).twofa&&!W(M).$finalResponse?(me(),Qe(H3,{key:1,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"enable-back-navigation":!1,"loader-message":p.value,"select-class":n.navigation.selectClass,"show-password-style":n.navigation.formShowPasswordStyle,twofa:W(M).twofa,onError:x},null,8,["button-disabled-style","disable-form-autocomplete","loader-message","select-class","show-password-style","twofa"])):et("",!0),W(M).$finalResponse?(me(),Qe(uF,{key:2,"long-message":W(C),message:W(T),"one-site-flow":!0,"retry-button":W(M).$finalResponse==="error",type:W(M).$finalResponse,onRetry:ne},null,8,["long-message","message","retry-button","type"])):et("",!0)],64)):(me(),Fe(wt,{key:0},[W(u).length>0&&!W(d)?(me(),Qe(RTe,{key:0,items:W(u),locale:n.locale,onAddNewAccount:re[0]||(re[0]=()=>{hr(d)?d.value=!0:d=!0}),onBack:b,onSelect:J},null,8,["items","locale"])):(me(),Qe(PTe,{key:1,"assets-path":W(y),entrypoint:n.entrypoint,navigation:n.navigation,"organization-site-id":W(V),sync:W(U),onBack:w,onSelectOrganizationSite:j,onSelectSite:ae},null,8,["assets-path","entrypoint","navigation","organization-site-id","sync"]))],64))],64)):(me(),Qe(LTe,{key:0,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,request:W(L),onValid:se},null,8,["button-disabled-style","disable-form-autocomplete","request"]))],2)],2)):et("",!0),W(_)?(me(),Fe("div",{key:1,class:Te($.$style["widget-data-error"])},[Ue("p",null,ot(W(_).length?W(_):W(i)("common.data_error")),1),ht(W(Xr),{onClick:G},{default:rt(()=>[br(ot(W(i)("common.retry")),1)]),_:1})],2)):et("",!0)],2)),[[W(Mf),W(P)]])],2)]),_:1},8,["visible","mobile"]))}}),[["__cssModules",{$style:{"widget-close-button":"pb-w-sync_widget-close-button",container:"pb-w-sync_container","widget-main":"pb-w-sync_widget-main","widget-header":"pb-w-sync_widget-header","widget-inner":"pb-w-sync_widget-inner","widget-inner-content":"pb-w-sync_widget-inner-content","widget-data-error":"pb-w-sync_widget-data-error","widget-transfer-loader":"pb-w-sync_widget-transfer-loader","is-mobile":"pb-w-sync_is-mobile"}}]]),UTe=st({__name:"App",props:{config:{default:()=>({})},enableTestMode:{type:Boolean,default:!1},refreshTokenFunction:{type:Function,default:void 0},strict:{default:void 0},token:{}},setup(e,{expose:t}){const r=e,n=Re(null),{t:a}=yi();un(tw,a);const i={locale:"en",entrypoint:{country:"MX"},navigation:{disableFormAutocomplete:!1,displayBusinessSites:!0,displayErrorsInToast:!0,displayLogoImages:!0,displayLongDescription:!1,displayPersonalSites:!0,displaySiteOrganizations:[],displaySiteOrganizationTypes:[],displaySites:[],displayStatusInToast:!1,enableBackNavigation:!0,enableTwofaBackNavigation:!1,formButtonsDisabledStyle:!1,formShowPasswordStyle:"icon",hideSelectCountry:!1,hideSiteOrganizations:[],hideSiteOrganizationTypes:[],hideSites:[],oneSiteFlow:!1,quickAnswer:!1,returnToSiteFormOnUserError:!1,selectClass:"",socketTimeout:24e4,toastDuration:5e3,toastPosition:"top-right"},__internal__:{apiBaseUrl:null,apiEnv:null,assetsBaseUrl:null,plaidSites:!1,defaultHttpParams:{}}},o=Vn({enableTestMode:r.enableTestMode,entrypoint:{...i.entrypoint,..._(r.config.entrypoint)},internal:{...i.__internal__,..._(r.config.__internal__)},locale:r.config.locale||i.locale,navigation:{...i.navigation,..._(r.config.navigation)},refreshTokenFunction:r.refreshTokenFunction,strict:r.strict,token:r.token,onTokenRefreshed:E=>{o.token=E}});function l(){n.value.close()}function f(){kt(()=>{n.value.open()})}function u(E={}){try{Mg.validateSync(E)}catch(C){if(C.name==="ValidationError")throw new Error(`ValidationError: ${C.message}`)}o.entrypoint={...i.entrypoint,..._(E.entrypoint)},o.internal={...i.__internal__,..._(E.__internal__)},o.locale=E.locale||i.locale,o.navigation={...i.navigation,..._(E.navigation)}}function d(E){n.value.setCredential&&n.value.setCredential(E)}function m(E){o.entrypoint={...o.entrypoint,site:E},f()}function v(E,C){return n.value.setToken(E,C)}function y(E={}){try{Mg.validateSync(E)}catch(C){if(C.name==="ValidationError")throw new Error(`ValidationError: ${C.message}`)}o.entrypoint={...o.entrypoint,..._(E.entrypoint)},o.internal={...o.internal,..._(E.__internal__)},o.locale=E.locale||o.locale,o.navigation={...o.navigation,..._(E.navigation)}}function _(E={}){const C={...E};return Object.keys(C).forEach(T=>{C[T]===void 0&&delete C[T]}),C}return t({close:l,open:f,setConfig:u,setEntrypointCredential:d,setEntrypointSite:m,setToken:v,upsertConfig:y}),(E,C)=>(me(),Qe(W(w6e),{locale:o.locale==="es"?W(I5e):W(A5e)},{default:rt(()=>[(me(),Qe(ni(o.entrypoint.transfer?zTe:NTe),Ai(o,{ref_key:"widgetComponent",ref:n}),null,16))]),_:1},8,["locale"]))}});function Cf(e){return e||(e={}),{locale:e.locale?e.locale:"en",quickAnswer:!!e.quickAnswer,socketTimeout:e.socketTimeout||24e4}}function Tf(e,t){return new Promise(n=>{const a=new ox(e.token,{http:{baseURL:"https://sync.paybook.com",isStrict:!!e.strict},defaultParams:{locale:t.locale},isHeadless:!0,quickAnswer:t.quickAnswer,socketTimeout:t.socketTimeout,widgetVersion:`${ac()}-headless`});e.strict?a.strictMode({token:e.token,strict:e.strict}).then(()=>{n(a)}):n(a)})}function qTe(e,t){return new Promise((n,a)=>{const i=Cf(t);Tf(e,i).then(o=>{o.getCountries().then(l=>{n(l)}).catch(l=>{a(l)})})})}function VTe(e,t={},r){return new Promise((a,i)=>{const o=Cf(r);Tf(e,o).then(l=>{l.getOganizationSites(t).then(f=>{a(f)}).catch(f=>{i(f)})})})}function HTe(e,t){return new Promise((n,a)=>{const i=Cf(t);Tf(e,i).then(o=>{o.getOganizationTypes().then(l=>{n(l)}).catch(l=>{a(l)})})})}function jTe(e,t,r){return new Promise((a,i)=>{const o=Cf(r);Tf(e,o).then(l=>{l.getSite(t).then(f=>{a(f[0])}).catch(f=>{i(f)})})})}function KTe(e,t,r){return new Promise(a=>{const i=Cf(r);Tf(e,i).then(o=>{a(o.siteConnection(t))})})}function WTe(e,t,r){return new Promise(a=>{const i=Cf(r);Tf(e,i).then(o=>{a(o.syncCredential(t))})})}function GTe(e,t,r,n){return new Promise(i=>{const o=Cf(n);Tf(e,o).then(l=>{i(new Dm({...t,id_site:r},l.getHttpService(),!1))})})}const ZTe={getCountries:qTe,getOrganizationSites:VTe,getOrganizationTypes:HTe,getSite:jTe,siteConnection:KTe,syncCredential:WTe,twofa:GTe};fz();class lx{constructor(t){const r=new ppe({accessToken:"2d928ea9aa674c6ea84dbf6f3901a403",captureUncaught:!1,captureUnhandledRejections:!1,enabled:!0,environment:"production",payload:{code_version:ac()}});let n;if(typeof t=="string")n={token:t};else if(typeof t=="object")n=t;else throw new Error("Invalid params type. Params must be either string or object.");try{Xz.validateSync(n)}catch(d){if(d.name==="ValidationError")throw new Error(`ValidationError: ${d.message}`)}dr("instantiation");const a=zk(UTe,{config:n.config,enableTestMode:n.enableTestMode,refreshTokenFunction:n.refreshTokenFunction,strict:n.strict,token:n.token}),i=bye({availableLocales:["en","es"],fallbackLocale:"en",legacy:!1,locale:"en",messages:{en:Ei,es:tl}});a.use(i),a.use($ge),a.config.errorHandler=d=>{throw r.error(d),d};const o=[];function l(d,m){o.push({callback:m,e:d})}function f(d,...m){o.forEach(({callback:v,e:y})=>{d===y&&v(...m)})}a.provide(ta,f);const u=a.mount(n.element||"#widget");return{on:l,close:u.close,open:u.open,setConfig:u.setConfig,setEntrypointCredential:u.setEntrypointCredential,setEntrypointSite:u.setEntrypointSite,setToken:u.setToken,upsertConfig:u.upsertConfig}}static getVersion(){return ac()}}return _t(lx,"headless",ZTe),window.SyncfyWidget=lx,lx});
875
+ `)}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[LF]=this[LF]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=id(o);n[l]||(mTe(a,o),n[l]=!0)}return Ze.isArray(t)?t.forEach(i):i(t),this}}Om.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ze.reduceDescriptors(Om.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),Ze.freezeMethods(Om);const rs=Om;function Q3(e,t){const r=this||J3,n=t||r,a=rs.from(n.headers);let i=n.data;return Ze.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function DF(e){return!!(e&&e.__CANCEL__)}function ad(e,t,r){sr.call(this,e??"canceled",sr.ERR_CANCELED,t,r),this.name="CanceledError"}Ze.inherits(ad,sr,{__CANCEL__:!0});function gTe(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new sr("Request failed with status code "+r.status,[sr.ERR_BAD_REQUEST,sr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const yTe=La.isStandardBrowserEnv?function(){return{write:function(r,n,a,i,o,l){const f=[];f.push(r+"="+encodeURIComponent(n)),Ze.isNumber(a)&&f.push("expires="+new Date(a).toGMTString()),Ze.isString(i)&&f.push("path="+i),Ze.isString(o)&&f.push("domain="+o),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function bTe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _Te(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function $F(e,t){return e&&!bTe(t)?_Te(e,t):t}const wTe=La.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const l=Ze.isString(o)?a(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();function ETe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xTe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),d=n[i];o||(o=u),r[a]=f,n[a]=u;let m=i,v=0;for(;m!==a;)v+=r[m++],m=m%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o<t)return;const y=d&&u-d;return y?Math.round(v*1e3/y):void 0}}function zF(e,t){let r=0;const n=xTe(50,250);return a=>{const i=a.loaded,o=a.lengthComputable?a.total:void 0,l=i-r,f=n(l),u=i<=o;r=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:l,rate:f||void 0,estimated:f&&o&&u?(o-i)/f:void 0,event:a};d[t?"download":"upload"]=!0,e(d)}}const Rm={http:JCe,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let a=e.data;const i=rs.from(e.headers).normalize(),o=e.responseType;let l;function f(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}Ze.isFormData(a)&&(La.isStandardBrowserEnv||La.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(y+":"+_))}const d=$F(e.baseURL,e.url);u.open(e.method.toUpperCase(),OF(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function m(){if(!u)return;const y=rs.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:y,config:e,request:u};gTe(function(T){r(T),f()},function(T){n(T),f()},E),u=null}if("onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new sr("Request aborted",sr.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new sr("Network Error",sr.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||PF;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),n(new sr(_,E.clarifyTimeoutError?sr.ETIMEDOUT:sr.ECONNABORTED,e,u)),u=null},La.isStandardBrowserEnv){const y=(e.withCredentials||wTe(d))&&e.xsrfCookieName&&yTe.read(e.xsrfCookieName);y&&i.set(e.xsrfHeaderName,y)}a===void 0&&i.setContentType(null),"setRequestHeader"in u&&Ze.forEach(i.toJSON(),function(_,E){u.setRequestHeader(E,_)}),Ze.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",zF(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",zF(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=y=>{u&&(n(!y||y.type?new ad(null,e,u):y),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const v=ETe(d);if(v&&La.protocols.indexOf(v)===-1){n(new sr("Unsupported protocol "+v+":",sr.ERR_BAD_REQUEST,e));return}u.send(a||null)})}};Ze.forEach(Rm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const UF={getAdapter:e=>{e=Ze.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let a=0;a<t&&(r=e[a],!(n=Ze.isString(r)?Rm[r.toLowerCase()]:r));a++);if(!n)throw n===!1?new sr(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Ze.hasOwnProp(Rm,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!Ze.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rm};function ex(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ad(null,e)}function qF(e){return ex(e),e.headers=rs.from(e.headers),e.data=Q3.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),UF.getAdapter(e.adapter||J3.adapter)(e).then(function(n){return ex(e),n.data=Q3.call(e,e.transformResponse,n),n.headers=rs.from(n.headers),n},function(n){return DF(n)||(ex(e),n&&n.response&&(n.response.data=Q3.call(e,e.transformResponse,n.response),n.response.headers=rs.from(n.response.headers))),Promise.reject(n)})}const VF=e=>e instanceof rs?e.toJSON():e;function tc(e,t){t=t||{};const r={};function n(u,d,m){return Ze.isPlainObject(u)&&Ze.isPlainObject(d)?Ze.merge.call({caseless:m},u,d):Ze.isPlainObject(d)?Ze.merge({},d):Ze.isArray(d)?d.slice():d}function a(u,d,m){if(Ze.isUndefined(d)){if(!Ze.isUndefined(u))return n(void 0,u,m)}else return n(u,d,m)}function i(u,d){if(!Ze.isUndefined(d))return n(void 0,d)}function o(u,d){if(Ze.isUndefined(d)){if(!Ze.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function l(u,d,m){if(m in t)return n(u,d);if(m in e)return n(void 0,u)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(u,d)=>a(VF(u),VF(d),!0)};return Ze.forEach(Object.keys(Object.assign({},e,t)),function(d){const m=f[d]||a,v=m(e[d],t[d],d);Ze.isUndefined(v)&&m!==l||(r[d]=v)}),r}const HF="1.5.0",tx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const jF={};tx.transitional=function(t,r,n){function a(i,o){return"[Axios v"+HF+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,l)=>{if(t===!1)throw new sr(a(o," has been removed"+(r?" in "+r:"")),sr.ERR_DEPRECATED);return r&&!jF[o]&&(jF[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};function STe(e,t,r){if(typeof e!="object")throw new sr("options must be an object",sr.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const l=e[i],f=l===void 0||o(l,i,e);if(f!==!0)throw new sr("option "+i+" must be "+f,sr.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new sr("Unknown option "+i,sr.ERR_BAD_OPTION)}}const rx={assertOptions:STe,validators:tx},el=rx.validators;class Pm{constructor(t){this.defaults=t,this.interceptors={request:new RF,response:new RF}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=tc(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&rx.assertOptions(n,{silentJSONParsing:el.transitional(el.boolean),forcedJSONParsing:el.transitional(el.boolean),clarifyTimeoutError:el.transitional(el.boolean)},!1),a!=null&&(Ze.isFunction(a)?r.paramsSerializer={serialize:a}:rx.assertOptions(a,{encode:el.function,serialize:el.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&Ze.merge(i.common,i[r.method]);i&&Ze.forEach(["delete","get","head","post","put","patch","common"],_=>{delete i[_]}),r.headers=rs.concat(o,i);const l=[];let f=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(f=f&&E.synchronous,l.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let d,m=0,v;if(!f){const _=[qF.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,u),v=_.length,d=Promise.resolve(r);m<v;)d=d.then(_[m++],_[m++]);return d}v=l.length;let y=r;for(m=0;m<v;){const _=l[m++],E=l[m++];try{y=_(y)}catch(C){E.call(this,C);break}}try{d=qF.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,v=u.length;m<v;)d=d.then(u[m++],u[m++]);return d}getUri(t){t=tc(this.defaults,t);const r=$F(t.baseURL,t.url);return OF(r,t.params,t.paramsSerializer)}}Ze.forEach(["delete","get","head","options"],function(t){Pm.prototype[t]=function(r,n){return this.request(tc(n||{},{method:t,url:r,data:(n||{}).data}))}}),Ze.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,l){return this.request(tc(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Pm.prototype[t]=r(),Pm.prototype[t+"Form"]=r(!0)});const Fm=Pm;class nx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{n.subscribe(l),i=l}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,l){n.reason||(n.reason=new ad(i,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new nx(function(a){t=a}),cancel:t}}}const MTe=nx;function CTe(e){return function(r){return e.apply(null,r)}}function TTe(e){return Ze.isObject(e)&&e.isAxiosError===!0}const ix={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ix).forEach(([e,t])=>{ix[t]=e});const ATe=ix;function KF(e){const t=new Fm(e),r=gF(Fm.prototype.request,t);return Ze.extend(r,Fm.prototype,t,{allOwnKeys:!0}),Ze.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return KF(tc(e,a))},r}const dn=KF(J3);dn.Axios=Fm,dn.CanceledError=ad,dn.CancelToken=MTe,dn.isCancel=DF,dn.VERSION=HF,dn.toFormData=km,dn.AxiosError=sr,dn.Cancel=dn.CanceledError,dn.all=function(t){return Promise.all(t)},dn.spread=CTe,dn.isAxiosError=TTe,dn.mergeConfig=tc,dn.AxiosHeaders=rs,dn.formToJSON=e=>FF(Ze.isHTMLForm(e)?new FormData(e):e),dn.getAdapter=UF.getAdapter,dn.HttpStatusCode=ATe,dn.default=dn;const Da=dn;function ITe(e,t,r){var n=r||{},a=n.noTrailing,i=a===void 0?!1:a,o=n.noLeading,l=o===void 0?!1:o,f=n.debounceMode,u=f===void 0?void 0:f,d,m=!1,v=0;function y(){d&&clearTimeout(d)}function _(C){var T=C||{},I=T.upcomingOnly,k=I===void 0?!1:I;y(),m=!k}function E(){for(var C=arguments.length,T=new Array(C),I=0;I<C;I++)T[I]=arguments[I];var k=this,N=Date.now()-v;if(m)return;function O(){v=Date.now(),t.apply(k,T)}function P(){d=void 0}!l&&u&&!d&&O(),y(),u===void 0&&N>e?l?(v=Date.now(),i||(d=setTimeout(u?P:O,e))):O():i!==!0&&(d=setTimeout(u?P:O,u===void 0?e-N:e))}return E.cancel=_,E}function Lm(e,t,r){var n=r||{},a=n.atBegin,i=a===void 0?!1:a;return ITe(e,t,{debounceMode:i!==!1})}class Dm extends Io.EventEmitter{constructor(r,n,a=!0){super();_t(this,"bluetoothDevice",!1);_t(this,"connection");_t(this,"data",{});_t(this,"displaySubmitButton",!0);_t(this,"http");_t(this,"_loading",!1);_t(this,"messageEncrypted");_t(this,"rules",{});_t(this,"rulesDefined",!1);if(this.config=r,this.measureEvents=a,this.http=n.getInstance(),r.twofa&&r.twofa.length)this.configuredMeasureEvent("twofa_request",{id_site:r.id_site,...r.id_site?{}:{id_request:r.id_request}}),r.twofa.forEach(i=>{const o=i.name;this.data[o]=null,i.type==="challenge"&&(this.data[o]=i.label),i.type==="connection"&&(this.connection=this.data[`${o}`]=i.label),(i.type==="externalAction"||i.type==="instructions")&&(this.displaySubmitButton=!1)}),this.connectSantanderUsbToken(),this.handleBbvaNetcashConnections();else throw new Error("TWOFA credentials are required.")}get loading(){return this._loading}set loading(r){this._loading=r,r&&this.emit("loading")}authenticate(r){return this.data={...r},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(n=>(this.emit("login-success"),n)).catch(n=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(n))))}defineRules(r){this.rulesDefined||(this.rulesDefined=!0,this.config.twofa.forEach(n=>{Object.defineProperty(this.rules,n.name,{value:this.setRules(n,r)})}))}getFields(){return this.config.twofa.filter(r=>r.type!=="challenge"&&r.type!=="connection")}statusChanged(){this.loading||(this.loading=!0)}configuredMeasureEvent(r,n){this.measureEvents&&dr(r,n)}connectSantanderUsbToken(){this.config.id_site==="57f6dd8c78480602048b4567"&&this.config.twofa[0].type==="instructions"&&upe(this.config.twofa[0].imgBase64File).then(r=>{this.authenticate(r)}).catch(r=>{this.emit("twofa-api-error"),this.emit("twofa-device-error",r)})}findTwofaByName(r){return this.config.twofa.find(n=>n.name===r)}findTwofaByType(r){return this.config.twofa.find(n=>n.type===r)}getBbvaNetcashBluetoothFinalToken(r){const n=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:n,name:"token",type:"instructions"}],nU(r).then(a=>{this.data={token:a,other_message_encrypted:"other_message_encrypted"},this.authenticate(this.data)})}handleBbvaNetcashConnections(){this.messageEncrypted=this.findTwofaByType("message_encrypted");const r=this.findTwofaByType("other_message_encrypted");this.connection==="eai_otp_GO3"&&(this.bluetoothDevice=this.findTwofaByType("bluetooth_device").label==="S",this.bluetoothDevice?this.sendBbvaNetcashBluetoothTimeChallenge():this.setBbvaNetcashUsbFields()),this.messageEncrypted&&this.setBbvaNetcashBluetoothFakeToken(),r&&this.getBbvaNetcashBluetoothFinalToken(r.label)}sendBbvaNetcashBluetoothTimeChallenge(){const r=this.findTwofaByType("challenge").label,n=this.findTwofaByType("device").label,a=this.findTwofaByName("token").label;this.displaySubmitButton=!1,this.config.twofa=[{label:a,name:"token",type:"instructions"}],iU(n,r).then(i=>{this.data={bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection",device:"device",token:i},this.authenticate(this.data)})}sendBbvaNetcashUsbToken(){return Qz(this.data.token,this.data.challenge).then(r=>this.http.post(this.config.address,{twofa:{...this.data,...r,bluetooth_device:"bluetooth_device",challenge:"challenge",connection:"connection"}}).then(n=>(this.emit("login-success"),n)).catch(n=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(n)))).catch(r=>(this.loading=!1,this.emit("twofa-api-error"),Promise.reject(r.response?{...r,response:{...r.response,status:500}}:r)))}setBbvaNetcashBluetoothFakeToken(){const r=this.findTwofaByName("token").label;this.rules={token:[{required:!0}]},this.rulesDefined=!0,this.data={token:""},this.config.twofa=[{name:"token",type:"text",label:r,disabled:!0}],rU(this.messageEncrypted.label).then(n=>{this.data={token:n},this.emit("token-received")})}setBbvaNetcashUsbFields(){this.config.twofa=[this.findTwofaByType("text")]}setRules(r,n){const a=[];return a.push({required:!0,message:n("form_errors.required",{label:r.label})}),r.validation&&r.validation.forEach(i=>{switch(i.type){case"text":break;case"regex":a.push({pattern:i.value,message:i.error_message});break}}),a}turnOnBbvaNetcashBluetoothDevice(){this.messageEncrypted&&(this.data={token:"OK",message_encrypted:"message_encrypted"},mU())}}class BTe extends Io.EventEmitter{constructor(r,n,a,i,o=!1){super();_t(this,"_config");_t(this,"_error");_t(this,"http");_t(this,"loading",!1);_t(this,"_message");_t(this,"options",{});_t(this,"response");_t(this,"socket");_t(this,"_status","searching");_t(this,"timer",null);_t(this,"_twofa");this.syncService=n,this.httpService=a,this.socketTimeoutTime=i,this.isHeadless=o,this.http=this.httpService.getInstance(),this.getSitefromCredential({id_credential:r}).then(({site:l,credential:f})=>{this.config={...f,avatar:l.organizationSite.avatar,cover:l.organizationSite.cover,name:l.name,quickAnswer:this.syncService.quickAnswer,site:l},this.status="found",this.sync().then(()=>{this.status="loading"}).catch(u=>{this.error=u,this.status="error"})}).catch(l=>{this.error=l,this.status="not-found"})}get config(){return this._config}set config(r){this._config=r}get error(){return this._error}set error(r){this._error=r}get message(){return this._message}set message(r){this._message=r}get status(){return this._status}set status(r){const n=this._status!==r;this._status=r,n&&(this.emit(r),this.emit("status-updated",r))}get twofa(){return this._twofa}set twofa(r){this._twofa=r,r&&(this.status="twofa",r.on("loading",()=>{this._twofa===r&&this.status==="twofa"&&(this.status="twofa-loading")}),r.on("twofa-api-error",()=>{this.status="twofa-api-error",this.socketClose()}))}getAvatar(){return this.config.avatar}getCover(){return this.config.cover}getCredentialData(){return{...this.config}}getName(){return this.config.name}getSite(){return{...this.config.site}}setOption(r,n){this.options[r]=n}sync(){return this.configuredMeasureEvent("sync_credential",{id_credential:this.config.id_credential,id_site:this.config.id_site}),this.loading=!0,this.startTimer(),this.http.put(`/v1/credentials/${this.config.id_credential}/sync`,{...this.spreadOptions()}).then(r=>(this.response=r,this.setSocket(r.ws),r)).catch(r=>(this.loading=!1,this.configuredMeasureEvent("sync_credential_error",{code:r.response.status,code_origin:"endpoint",id_credential:this.config.id_credential,id_site:this.config.id_site}),this.clearTimer(),Promise.reject(r)))}clearTimer(){clearTimeout(this.timer)}configuredMeasureEvent(r,n){this.isHeadless||dr(r,n)}getSitefromCredential(r){return this.http.get("/v1/credentials",{params:{...this.syncService.defaultParams,...r}}).then(n=>r.id_credential&&!n.length?Promise.reject({response:{status:"credential_not_found"}}):this.syncService.getOganizationSites({id_site_organization:n[0].id_site_organization}).then(a=>{if(r.id_credential&&!a.length)return Promise.reject({response:{status:"credential_not_found"}});let i=a[0].sites.find(o=>o.id_site===n[0].id_site);if(i)i={...i};else return Promise.reject({response:{status:"credential_not_found"}});return i.organizationSite=a[0],{site:i,credential:n[0]}}).catch(a=>Promise.reject(a)))}reopenSocket(r){this.setSocket(r.target.url)}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=()=>this.socketError(),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=()=>{this.twofa=null,r&&r(this)},this.socket.close()}socketError(){this.loading=!1,this.status="socket-error"}socketMessage(r){const n=JSON.parse(r.data);if(this.clearTimer(),this.config.quickAnswer&&n.code===102){this.socketClose(()=>{this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.status="socket-quick-answer"}),this.configuredMeasureEvent("sync_credential_success",{code:n.code,id_credential:this.config.id_credential,id_site:this.config.id_site});return}n.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.config.id_site},this.httpService)),this.emit("socket-message",n),this.startTimer(),n.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410?(this.loading=!1,this.twofa&&(this.twofa.loading=!1),n.code<300?(this.configuredMeasureEvent("sync_credential_success",{code:n.code,id_credential:this.config.id_credential,id_site:this.config.id_site}),this.message=n,this.status="success"):(this.configuredMeasureEvent("sync_credential_error",{code:n.code,code_origin:"socket",id_credential:this.config.id_credential,id_site:this.config.id_site}),this.error=n,this.status="error"),this.socketClose()):this.twofa&&n.code!==410&&this.twofa.statusChanged()}socketTimeout(){this.status="socket-timeout",this.socketClose()}spreadOptions(){return Object.keys(this.options).length?{options:{...this.options}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.socketTimeoutTime)}}Da.defaults.baseURL="https://sync.paybook.com";class WF extends Io.EventEmitter{constructor(r,n={}){super();_t(this,"baseURL");_t(this,"isStrict");_t(this,"jwk");this.token=r,n.baseURL&&(this.baseURL=Da.defaults.baseURL=n.baseURL),this.isStrict=n.isStrict||!1,Da.defaults.headers.common={"x-app-version":`sync-widget:${n.widgetVersion}:${rh.os.name}:${rh.os.version}`},Da.interceptors.request.use(a=>(a.headers.Authorization=`Bearer ${this.token}`,a),function(a){return Promise.reject(a)}),Da.interceptors.response.use(a=>a.data.response||a.data||a,a=>(a.response&&a.response.status===401&&this.emit("401"),Promise.reject(a)))}getInstance(){const r=Da.create({baseURL:this.baseURL});return r.interceptors.request.use(n=>(n.headers.Authorization=`Bearer ${this.token}`,n),function(n){return Promise.reject(n)}),r.interceptors.response.use(n=>n.data.response||n.data||n,n=>(n.response&&n.response.status===401&&this.emit("401"),Promise.reject(n))),this.isStrict&&r.interceptors.request.use(n=>n.data?CB(n.data,this.jwk).then(a=>(n.data={jwe:a},Promise.resolve(n))):Promise.resolve(n),n=>Promise.reject(n)),r}updateToken(r,n){this.token=r,n&&(this.jwk=n)}}class GF extends Io.EventEmitter{constructor(r,n,a,i=!1){super();_t(this,"config");_t(this,"_finalResponse",null);_t(this,"http");_t(this,"_loading",!1);_t(this,"_lastSocketMessage");_t(this,"options",{});_t(this,"response");_t(this,"socket");_t(this,"_status","start");_t(this,"testMode",!1);_t(this,"timer",null);_t(this,"_twofa");this.httpService=n,this.socketTimeoutTime=a,this.isHeadless=i,this.config=r,this.http=n.getInstance()}get finalResponse(){return this._finalResponse}set finalResponse(r){this._finalResponse=r,this.status="finish"}get lastSocketMessage(){return this._lastSocketMessage}set lastSocketMessage(r){this._lastSocketMessage=r}get loading(){return this._loading}set loading(r){this._loading=r,r&&(this.status="loading")}get status(){return this._status}set status(r){const n=this._status!==r;this._status=r,n&&(this.emit(r),this.emit("status-update",r))}get twofa(){return this._twofa}set twofa(r){this._twofa=r,r&&(this.status="twofa",r.on("loading",()=>{this._twofa===r&&this.status==="twofa"&&(this.status="twofa-loading")}))}setOption(r,n){this.options[r]=n}toggleTestMode(){this.testMode=!this.testMode}configuredMeasureEvent(r,n){this.isHeadless||dr(r,n)}clearTimer(){clearTimeout(this.timer)}reopenSocket(r){this.setSocket(r.target.url)}setRules(r){const n=[];return r.required&&n.push({required:!0,message:"required"}),r.validation&&r.validation.forEach(a=>{switch(a.type){case"text":break;case"regex":n.push({pattern:a.value,message:"regex"});break}}),n}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=n=>this.socketError(n),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onopen=n=>this.socketOpen(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=n=>{this.twofa=null,this.emit("socket-close",n),r&&r(this)},this.socket.close()}socketError(r){this.loading=!1,this.emit("socket-error",r),this.finalResponse="error"}socketMessage(r){const n=JSON.parse(r.data);if(this.lastSocketMessage=n,this.clearTimer(),this.config.quickAnswer&&n.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:n.code,id_site:this.config.id_site});return}n.code===401&&this.configuredMeasureEvent("unauthorized",{id_site:this.config.id_site}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.config.id_site},this.httpService,!this.isHeadless),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",n),this.startTimer(),n.code===411&&this.configuredMeasureEvent("twofa_timeout",{id_site:this.config.id_site}),(200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410)&&(n.code<300?(this.finalResponse="success",this.configuredMeasureEvent("sync_success",{code:n.code,id_site:this.config.id_site})):(this.finalResponse="error",this.configuredMeasureEvent("sync_error",{code:n.code,code_origin:"socket",id_site:this.config.id_site})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose()),!(400<=n.code&&n.code<600&&n.code!==410||200<=n.code&&n.code<300)&&this.twofa&&n.code!==410&&(this.twofa.loading=!0,this.status="twofa-loading")}socketOpen(r){this.emit("socket-open",r)}socketTimeout(){this.socketClose(()=>{this.finalResponse="error",this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.emit("socket-timeout")})}spreadOptions(){return Object.keys(this.options).length?{options:{...this.options}}:{}}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},this.socketTimeoutTime)}}class ZF extends GF{constructor(r,n,a,i,o=!1){super(r,n,i,o);_t(this,"data",{});_t(this,"rules",{});if(this.defaultParams=a,this.socketTimeoutTime=i,this.isHeadless=o,r.credentials&&r.credentials.length)o||r.credentials.forEach(l=>{const f=l.name;Object.defineProperty(this.rules,f,{enumerable:!0,value:this.setRules(l)})});else throw new Error("Site credentials are required.")}get version(){return 1}connect(r){this.data={...r};const n={...this.defaultParams,id_site:this.config.id_site,credentials:{...this.data},...this.spreadOptions()};return this.config.request?Promise.resolve(n.credentials):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.testMode&&(n.test=1),this.startTimer(),this.http.post(this.config.endpoint,n).then(a=>(this.response=a,this.emit("login-success"),this.setSocket(a.ws),a)).catch(a=>(this.configuredMeasureEvent("sync_error",{code:a.response?a.response.status:a.toString(),code_origin:"endpoint",id_site:this.config.id_site}),this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(a))))}getFields(){return this.config.credentials}}class YF extends GF{constructor(r,n,a,i,o=!1){super(r,n,i,o);_t(this,"input",[]);this.defaultParams=a,this.socketTimeoutTime=i,this.isHeadless=o,r.input.forEach(l=>{const f={rules:{},data:{}};l.fields.forEach(u=>{const d=u.name;Object.defineProperty(f.rules,d,{enumerable:!0,value:this.setRules(u)}),f.data[d]=null}),this.input.push(f)})}get version(){return 3}connect(r,n){this.updateData(r,n);const a=r||0,i={...this.defaultParams,id_site:this.config.id_site,input_name:this.config.input[r].name,input:{...this.input[a].data},...this.spreadOptions()};return this.config.request?Promise.resolve(i.input):(this.configuredMeasureEvent("sync",{id_site:this.config.id_site}),this.loading=!0,this.testMode&&(i.test=1),this.startTimer(),this.http.post(this.config.endpoint,i).then(o=>(this.response=o,this.emit("login-success"),this.setSocket(o.ws),o)).catch(o=>(this.configuredMeasureEvent("sync_error",{code:o.response?o.response.status:o.toString(),code_origin:"endpoint",id_site:this.config.id_site}),this.loading=!1,this.status="start",this.clearTimer(),Promise.reject(o))))}getFields(r){return this.config.input[r].fields}getOptions(){return this.config.input}updateData(r,n){this.input[r].data={...n}}}class ax extends Io.EventEmitter{constructor(r,n,a,i,o){super();_t(this,"account");_t(this,"amount");_t(this,"finalResponse",null);_t(this,"http");_t(this,"loading",!1);_t(this,"request");_t(this,"response");_t(this,"site");_t(this,"socket");_t(this,"status");_t(this,"timer",null);_t(this,"twofa");this.httpService=n,this.account=i,this.amount=a,this.http=n.getInstance(),this.request=r,this.site=o}reopenSocket(r){this.setSocket(r.target.url)}clearTimer(){clearTimeout(this.timer)}setSocket(r){this.socket=new WebSocket(r),this.socket.onerror=n=>this.socketError(n),this.socket.onmessage=n=>this.socketMessage(n),this.socket.onopen=n=>this.socketOpen(n),this.socket.onclose=n=>this.reopenSocket(n)}socketClose(r){this.clearTimer(),this.socket.onclose=n=>{this.twofa=null,this.emit("socket-close",n),r&&r(this)},this.socket.close()}socketError(r){this.loading=!1,this.emit("socket-error",r)}socketMessage(r){const n=JSON.parse(r.data);this.clearTimer(),n.code===401&&dr("unauthorized",{id_request:this.request.id_request}),n.code===410&&(this.twofa=new Dm({...n,id_site:this.site&&this.site.config?this.site.config.id_site:null,id_request:this.request.id_request},this.httpService),this.emit("twofa",this.twofa),this.twofa.on("twofa-api-error",()=>{this.socketClose()})),this.emit("socket-message",n),this.startTimer(),n.code===411&&dr("twofa_timeout",{id_request:this.request.id_request}),(200<=n.code&&n.code<300||400<=n.code&&n.code<600&&n.code!==410)&&(n.code<300?(this.finalResponse="success",dr("transfer_success",{code:n.code,id_request:this.request.id_request})):(this.finalResponse="error",dr("transfer_error",{code:n.code,code_origin:"socket",id_request:this.request.id_request})),this.loading=!1,this.twofa&&(this.twofa.loading=!1),this.socketClose())}socketOpen(r){this.emit("socket-open",r)}socketTimeout(){this.socketClose(()=>{this.emit("socket-timeout")})}startTimer(){this.timer=setTimeout(()=>{this.socketTimeout()},24e4)}transfer(r){return dr("transfer",{id_request:this.request.id_request,...this.account?{id_user_account:this.account.id_user_account}:{},...this.site?{id_site:this.site.config.id_site}:{}}),this.loading=!0,this.startTimer(),this.http.post("/v1/transfers/transfer",{id_request:this.request.id_request,...r?{credentials:r,id_site:this.site.config.id_site}:{id_user_account:this.account.id_user_account},transfer_amount:this.amount}).then(n=>(this.response=n,this.setSocket(n.ws),n)).catch(n=>(this.loading=!1,dr("transfer_error",{code:n.response.status,code_origin:"endpoint",id_request:this.request.id_request}),this.clearTimer(),Promise.reject(n)))}}class ox extends Io.EventEmitter{constructor(r,n){super();_t(this,"defaultParams");_t(this,"http");_t(this,"httpService");_t(this,"isHeadless");_t(this,"quickAnswer");_t(this,"socketTimeoutTime");this.token=r,this.httpService=n.http?new WF(r,{...n.http,widgetVersion:n.widgetVersion}):new WF(r,{widgetVersion:n.widgetVersion}),this.http=this.httpService.getInstance(),this.httpService.on("401",this.debounce401()),this.defaultParams=n.defaultParams,this.isHeadless=n.isHeadless,this.quickAnswer=n.quickAnswer,this.socketTimeoutTime=n.socketTimeout}addAccountAndTransferConnection(r,n,a){switch(n.version){case 3:return new ax(r,this.httpService,a,null,new YF({...n,quickAnswer:this.quickAnswer,request:r},this.httpService,this.defaultParams,this.socketTimeoutTime));default:return new ax(r,this.httpService,a,null,new ZF({...n,quickAnswer:this.quickAnswer,request:r},this.httpService,this.defaultParams,this.socketTimeoutTime))}}getAccountsList(){return this.http.get("/v1/transfers/users/accounts",{params:{...this.defaultParams}})}getCountries(){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/countries",{params:{...this.defaultParams}})}getHttpService(){return this.httpService}getOganizationSites(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/organizations/sites",{params:{...this.defaultParams,...r}})}getOganizationTypes(){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/catalogues/site_organization_types",{params:{...this.defaultParams}})}getSite(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get(`/v1/catalogues/widget/sites/${r}`,{params:{...this.defaultParams}})}getTransferOganizationSites(r){if(!this.token)throw new Error("Token is required. Try calling first getToken()");return this.http.get("/v1/transfers/catalogues/organizations/sites",{params:{...this.defaultParams,...r}})}getTransferRequest(r){return this.http.get(`/v1/transfers/transfer/requests/${r}`,{params:{...this.defaultParams}})}siteConnection(r){switch(r.version){case 3:return new YF({...r,quickAnswer:this.quickAnswer},this.httpService,this.defaultParams,this.socketTimeoutTime,this.isHeadless);default:return new ZF({...r,quickAnswer:this.quickAnswer},this.httpService,this.defaultParams,this.socketTimeoutTime,this.isHeadless)}}strictMode({token:r,strict:n}){return this.token=r,fpe(n).then(({strictAuthorizationKey:a,strictBodyKey:i})=>MB({token:r},a).then(o=>(this.httpService.updateToken(o),lpe().then(({authorization:l})=>{const f={authorization:btoa(JSON.stringify(l.toJSON(!0)))};return CB(f,i).then(u=>this.updateStrictSession(r,o,u).then(()=>MB({token:r},l).then(d=>this.updateToken(d).then(()=>(this.httpService.updateToken(this.token,i),{jws:d,jwe:i})))))}))))}syncCredential(r){return new BTe(r,this,this.httpService,this.socketTimeoutTime,this.isHeadless)}transferConnection(r,n,a){return new ax(r,this.httpService,a,n)}updateApiBaseUrl(r){this.http.defaults.baseURL=r,Da.defaults.baseURL=r}updateEnvironment(r){switch(r){case"production":this.http.defaults.baseURL="https://sync.paybook.com",Da.defaults.baseURL="https://sync.paybook.com";break;case"development":this.http.defaults.baseURL="https://api.syncfy.paybook.dev",Da.defaults.baseURL="https://api.syncfy.paybook.dev";break;default:this.http.defaults.baseURL="https://sync.paybook.com",Da.defaults.baseURL="https://sync.paybook.com";break}}updateToken(r){return new Promise(n=>{this.token!==r&&(this.token=r,this.httpService.updateToken(this.token)),n({token:r})})}debounce401(){return Lm(200,()=>{this.emit("sync_401")})}updateStrictSession(r,n,a){return Da.put(`/v1/sessions/jwt/${r}`,{type:"jwt","payload/jwe":a},{headers:{Authorization:`Bearer ${n}`}})}}class sx{constructor(t){_t(this,"callback");_t(this,"messages");this.messages=t}getMessages(){return this.messages}subscribe(t){this.callback=t}updateMessages(t){this.messages={...this.messages,...t},this.callback&&this.callback()}}const M7e="",kTe={key:1},NTe=Fn(st({__name:"DataWidget",props:{enableTestMode:{type:Boolean},entrypoint:{},internal:{},locale:{},navigation:{},refreshTokenFunction:{type:Function},strict:{},token:{}},emits:["tokenRefreshed"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),{t:i,locale:o}=yi({useScope:"global"}),l=Re([]),f=Re(null),u=Re(!1),d=Re(null),m=Re(null),v=Re(""),y=Re(""),_=Re(!0),E=Re(!1),C=Re(!1),T=Re(null),I=Re([]),k=Re(null),N=Re(null),O=Re(null),P=Re(!1),z=Re(null),V=Re(null);let L="https://s.paybook.com",U=null,M=!1,s=`${ac()}${n.strict?"-strict":""}`,h=null,p,g=[],b=null,w=null,A=null;const x=Ee(()=>_.value?!1:N.value?n.entrypoint.site&&n.navigation.oneSiteFlow?N.value==="twofa":N.value==="finish"?n.navigation.enableBackNavigation:N.value==="twofa"?n.navigation.enableTwofaBackNavigation:n.navigation.enableBackNavigation&&N.value==="start":!!k.value),c=Ee(()=>l.value.filter(he=>(he.id_country==="51ad44db3b8e77631200047d"||he.id_country==="51ad44793b8e77631200027a")&&n.internal.plaidSites||ae(he.id_country).length).sort((he,be)=>he.name.localeCompare(be.name))),S=Ee(()=>j(f.value,k.value)),B=Ee(()=>ae(f.value)),R=Ee(()=>se(f.value,k.value,T.value)),H=Ee(()=>`${y.value}${v.value?`: ${v.value}`:""}`),X=Ee(()=>{let he=[];return I.value&&I.value.forEach(be=>{he=[...he,...be.sites.map(it=>({...it,avatar:be.avatar,cover:be.cover,organizationSite:be}))]}),he});ut(()=>n.locale,(he,be)=>{he!==be&&["es","en"].includes(he)&&(o.value=he)}),ut(()=>n.internal,(he,be)=>{if(A.defaultParams=he.defaultHttpParams||{},A.defaultParams.locale=n.locale,he.apiEnv!==be.apiEnv)switch(A.updateEnvironment(he.apiEnv),he.apiEnv){case"production":L="https://s.paybook.com";break;case"development":L="https://s.paybook.dev";break;default:L="https://s.paybook.com";break}he.apiBaseUrl!==be.apiBaseUrl&&he.apiBaseUrl&&A.updateApiBaseUrl(he.apiBaseUrl),he.assetsBaseUrl!==be.assetsBaseUrl&&he.assetsBaseUrl&&(L=he.assetsBaseUrl),$()}),ut(()=>n.navigation.displayPersonalSites,()=>{$()}),ut(()=>n.navigation.displayBusinessSites,()=>{$()}),ut(y,he=>{h&&p.updateMessages({short:he})}),ut(v,he=>{h&&p.updateMessages({long:he})}),ut(P,()=>{!P.value&&!h&&N.value&&N.value!=="start"&&N.value!=="finish"?(p=new sx({short:v.value}),h=Vt.info({duration:0,message:vt(Gt,{assetsPath:L,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,enableBackNavigation:n.navigation.enableTwofaBackNavigation,item:b,messagesUpdater:p,rootEmit:a,selectClass:n.navigation.selectClass,showLogo:n.navigation.displayLogoImages,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onBack:()=>{a("back"),ue(),b=N.value=null,pe(w,!1),D(),P.value=!0},onError:he=>{oe(he)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),position:n.navigation.toastPosition,showClose:!1})):P.value&&h&&(P.value=!1,Vt.error({duration:0,position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})}))}),fn(()=>{M=!0,window.removeEventListener("resize",D)}),ir(()=>{kt(()=>{a("dom-updated")})}),Au(()=>{kt(()=>{a("dom-updated")})});function G(){["es","en"].includes(n.locale)&&(o.value=n.locale),L=n.internal.apiEnv?n.internal.apiEnv==="production"?"https://s.paybook.com":"https://s.paybook.dev":"https://s.paybook.com",n.internal.assetsBaseUrl&&(L=n.internal.assetsBaseUrl),n.strict?(Ye(),_.value=!0,setTimeout(()=>{A.strictMode({token:n.token,strict:n.strict}).then(()=>{$()})},400)):(Ye(),$()),window.addEventListener("resize",D)}function Y(){dr("close"),P.value=!1,(N.value==="start"||N.value==="finish")&&(N.value=b=null),a("closed")}function ue(){h&&(h.close(),h=null)}function oe(he){const be=q(he);!n.navigation.displayErrorsInToast&&P?(d.value=i(`${be}long_description`),m.value=i(`${be}short_description`)):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i(`${be}long_description`),initMessage:i(`${be}short_description`),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ne(he,be)}const ce=Lm(200,function(){if(u.value=!1,n.entrypoint.site&&n.navigation.oneSiteFlow)A.getSite(n.entrypoint.site).then(he=>{if(a("loaded"),he&&he.length){const be=he[0].site_organization;pe({...he[0],avatar:be.avatar,cover:be.avatar,organizationSite:be})}else re({response:{status:"site_not_found"}})}).catch(re).finally(()=>{_.value=!1});else{const he={};T.value=null,(n.navigation.displayPersonalSites||n.navigation.displayBusinessSites)&&!(n.navigation.displayPersonalSites&&n.navigation.displayBusinessSites)&&(n.navigation.displayPersonalSites?he.is_personal=1:he.is_business=1);const be=[A.getCountries(),A.getOganizationTypes(),A.getOganizationSites(he)];return Promise.all(be).then(it=>{l.value=it[0],g=it[1],n.internal.plaidSites&&g.unshift({id_site_organization_type:"__internal__.plaidSites",label:"webapp_add_banks",name:"plaid"}),I.value=it[2]}).then(()=>kt().then(()=>{if(a("loaded"),ve(),n.entrypoint.site){const it=X.value.find(we=>we.id_site===n.entrypoint.site);return it?pe(it):Promise.reject({response:{status:"site_not_found"}})}if(n.entrypoint.credential)return ie(n.entrypoint.credential)})).catch(re).finally(()=>{_.value=!1})}});function ne(he,be){a("api-error",he.response?he.response.status:500,{longMessage:i(`${be}real.long_description`),message:i(`${be}real.short_description`),noInternet:!he.response})}function J(he){a("socket-error",{longMessage:i(`socket.${he}.long_description`),type:he,message:i(`socket.${he}.short_description`)})}function j(he,be){return(n.navigation.displaySiteOrganizations.length||n.navigation.hideSiteOrganizations.length?I.value.filter(it=>{if(n.navigation.displaySiteOrganizations.length)return!!n.navigation.displaySiteOrganizations.find(we=>we===it.name||we===it.id_site_organization);if(n.navigation.hideSiteOrganizations.length)return!n.navigation.hideSiteOrganizations.find(we=>we===it.name||we===it.id_site_organization)}):I.value).filter(it=>he===it.id_country&&be===it.id_site_organization_type&&se(he,be,it.id_site_organization).length)}function ae(he){return(n.navigation.displaySiteOrganizationTypes.length||n.navigation.hideSiteOrganizationTypes.length?g.filter(be=>{if(n.navigation.displaySiteOrganizationTypes.length)return!!n.navigation.displaySiteOrganizationTypes.find(it=>it===be.name||it===be.id_site_organization_type);if(n.navigation.hideSiteOrganizationTypes.length)return!n.navigation.hideSiteOrganizationTypes.find(it=>it===be.name||it===be.id_site_organization_type)}):g).filter(be=>(he==="51ad44db3b8e77631200047d"||he==="51ad44793b8e77631200027a")&&n.internal.plaidSites&&be.id_site_organization_type==="__internal__.plaidSites"?!0:j(he,be.id_site_organization_type).length)}function se(he,be,it){return(n.navigation.displaySites.length||n.navigation.hideSites.length?X.value.filter(we=>{if(n.navigation.displaySites.length)return!!n.navigation.displaySites.find(Be=>Be===we.name||Be===we.id_site);if(n.navigation.hideSites.length)return!n.navigation.hideSites.find(Be=>Be===we.name||Be===we.id_site)}):X.value).filter(we=>he===we.organizationSite.id_country&&be===we.organizationSite.id_site_organization_type&&it===we.organizationSite.id_site_organization)}function q(he){return typeof he=="string"?he:he.response&&he.response.data&&he.response.data.message==="Credential error, please consider updating credential password"?"api_errors.credential_error.":`api_errors.${he.response?he.response.status?he.response.status:500:"no_internet"}.`}function D(){kt(()=>{var he;M||(E.value=rh.device.type==="mobile"||((he=V.value)==null?void 0:he.clientWidth)<600)})}function F(){if(!N.value)T.value?te():(a("back"),k.value=null);else if(N.value==="finish")le();else if(N.value==="twofa")Je();else return Ce()}function $(){_.value=!0,ce()}function re(he){const be=q(he);u.value=i(`${be}short_description`),!he.response&&n.navigation.displayErrorsInToast&&Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:i(`${be}long_description`),initMessage:i(`${be}short_description`),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),a("loaded"),ne(he,be)}function Q(){dr("open"),_.value||ve(),P.value=!0,D(),a("opened")}function te(){a("back"),T.value=null}function le(){N.value=T.value=b=null}function Z(he){dr("open_site_organization",{id_site_organization:he.id_site_organization}),T.value=he.id_site_organization,kt(()=>{R.value.length===1&&pe(R.value[0])})}function K(){if(n.entrypoint.siteOrganizationType){const he=B.value.find(be=>be.id_site_organization_type===n.entrypoint.siteOrganizationType);if(he){const be=he.id_site_organization_type;dr("open_site_organization_type",{id_site_organization_type:be}),k.value=be}}}function pe(he,be=!0){let it;be&&dr("open_site",{id_site:he.id_site}),!b||!b.loading?(w=he,it=b=A.siteConnection(he),N.value="start",m.value=null,d.value=null,b.on("login-success",()=>{P.value&&n.navigation.displayStatusInToast&&Y()}),b.on("socket-close",ue),b.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(d.value=i("socket.error.long_description"),m.value=i("socket.error.short_description")),J("error")}),b.on("socket-message",we=>{const Be=`socket.message.${we.code?we.code:500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);switch(!0){case(400<=we.code&&we.code<600&&we.code!==410):ue(),m.value=gt,d.value=Ie,a("error",b.response,{code:we.code,longMessage:Ie,message:gt}),P.value?n.navigation.returnToSiteFormOnUserError!==!1&&(n.navigation.returnToSiteFormOnUserError===!0&&[401,403,411].includes(we.code)||n.navigation.returnToSiteFormOnUserError!==!0&&n.navigation.returnToSiteFormOnUserError.includes(we.code))&&(N.value=b=null,pe(w,!1),O.value={short:gt,long:Ie}):(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),le(),ve());break;case(200<=we.code&&we.code<300):ue(),m.value=gt,d.value=Ie,a("success",b.response),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve());break;default:y.value=gt,v.value=Ie}a("status",we)}),b.on("socket-quick-answer",()=>{m.value=i("socket.quick_answer.short_description"),d.value=i("socket.quick_answer.long_description"),a("success",b.response),ue(),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:i("socket.quick_answer.long_description"),initMessage:i("socket.quick_answer.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve())}),b.on("socket-timeout",()=>{m.value=i("socket.timeout.short_description"),d.value=i("socket.timeout.long_description"),a("error",b.response),P.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:b,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),le(),ve()),J("timeout")}),b.on("status-update",we=>{b===it&&(N.value=we)}),b.on("twofa",()=>{y.value=i("twofa.waiting")})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function ie(he){if(dr("open_credential",{id_credential:he}),!U||!U.loading){let be=new sx({short:i("common.search_credential_message")}),it=Vt.info({showClose:!1,position:n.navigation.toastPosition,duration:0,message:vt(Gt,{assetsPath:L,duration:0,initTitle:i("common.search_credential"),messagesUpdater:be,showLogo:!1,t:i,type:"info",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})});U=A.syncCredential(he),U.on("found",()=>{be.updateMessages({short:i("common.credential_found_message")})}),U.on("loading",()=>{it.close(),a("updated",U.response),p=new sx({}),h=Vt.info({showClose:!1,position:n.navigation.toastPosition,duration:0,message:vt(Gt,{assetsPath:L,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,item:U,messagesUpdater:p,rootEmit:a,selectClass:n.navigation.selectClass,showLogo:n.navigation.displayLogoImages,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onError:we=>{ue(),oe(we)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}})})}),U.on("socket-message",we=>{const Be=`socket.message.${we.code?we.code:500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);p.updateMessages({long:Ie,short:gt}),a("status",we)}),U.on("socket-error",()=>{ue(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:U,hideForm:!0,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),J("error")}),U.on("twofa-api-error",ue),U.on("success",()=>{const{code:we}=U.message,Be=`socket.message.${we||500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);ue(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),a("success",U.response)}),U.on("error",()=>{const{code:we}=U.error,Be=U.error.response?q(U.error):`socket.message.${we||500}.`,gt=i(`${Be}short_description`),Ie=i(`${Be}long_description`);U.error.response?it.close():ue(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Ie,initMessage:gt,item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),U.error.response?ne(U.error,Be):a("error",U.response,{code:we,longMessage:Ie,message:gt})}),U.on("socket-quick-answer",()=>{m.value=i("socket.quick_answer.short_description"),d.value=i("socket.quick_answer.long_description"),a("success",U.response),ue(),P.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,initLongMessage:i("socket.quick_answer.long_description"),initMessage:i("socket.quick_answer.short_description"),item:U,hideForm:!0,showLogo:n.navigation.displayLogoImages,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),le(),ve())}),U.on("socket-timeout",()=>{ue(),a("error",U.response),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:U,showLogo:n.navigation.displayLogoImages,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),J("timeout")}),U.on("not-found",()=>{const we=q(U.error);it.close(),Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:L,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i(`${we}long_description`),initMessage:i(`${we}short_description`),t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ne(U.error,we)})}else Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function ve(){if(u.value)return;let he;n.entrypoint.country&&(he=c.value.find(be=>be.code===n.entrypoint.country||be.id_country===n.entrypoint.country)),c.value.length?(f.value=he?he.id_country:c.value[0].id_country,dr("open_country",{id_country:f.value}),K(),C.value=!1):C.value=!0}function Ye(){A=new ox(n.token,{http:{baseURL:n.internal.apiBaseUrl?n.internal.apiBaseUrl:n.internal.apiEnv?n.internal.apiEnv==="production"?"https://sync.paybook.com":"https://api.syncfy.paybook.dev":"https://sync.paybook.com",isStrict:!!n.strict},defaultParams:{locale:n.locale,...n.internal.defaultHttpParams},isHeadless:!1,quickAnswer:n.navigation.quickAnswer,socketTimeout:n.navigation.socketTimeout,widgetVersion:s});let he=null;A.on("sync_401",()=>{n.refreshTokenFunction&&!he&&(he=Vt.error({position:n.navigation.toastPosition,showClose:!1,message:vt(mF,{initTitle:i("common.unauthorized"),initMessage:i("common.unauthorized_message"),refreshTokenFunction:n.refreshTokenFunction,t:i,onClosed:()=>{he=null},onCloseNotification:()=>{he.close()},onRefreshToken:({token:be,strict:it,resolve:we})=>{r("tokenRefreshed",be),Se(be,it).then(()=>(he.close(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:n.navigation.toastDuration,initMessage:i("common.session_refreshed_message"),initTitle:i("common.session_refreshed"),showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),$(),we(null)))},onRefreshTokenError:()=>{Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:0,initMessage:i("common.session_error"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}}),duration:0})),a("401")})}function Se(he,be){return be?A.strictMode({token:he,strict:be}):A.updateToken(he)}function Ce(){a("back"),dr("close_site",{id_site:b.config.id_site}),N.value=b=null,O.value=null,R.value.length===1&&(T.value=null)}function Je(he=!0){he&&a("back"),N.value=b=null,pe(w,!1)}return G(),t({close:Y,open:Q,setCredential:ie,setToken:Se}),(he,be)=>(me(),Fe(wt,null,[ht(pF,{visible:P.value,"onUpdate:visible":be[5]||(be[5]=it=>P.value=it),mobile:E.value},{default:rt(()=>[P.value?(me(),Fe("div",{key:0,ref_key:"widgetContainer",ref:V,class:Te([he.$style.container,{[he.$style["is-mobile"]]:E.value}])},[Ue("div",{class:Te(he.$style["widget-header"])},[x.value?(me(),et(W(Xr),{key:0,onClick:F},{default:rt(()=>[ht(Fa,{icon:"back"})]),_:1})):(me(),Fe("span",kTe)),Ue("h1",null,ot(N.value&&n.entrypoint.site?W(i)("common.update_title"):W(i)("common.title")),1),ht(W(Xr),{class:Te(he.$style["widget-close-button"]),onClick:Y},{default:rt(()=>[ht(Fa,{icon:"close"})]),_:1},8,["class"])],2),tn((me(),Fe("div",null,[!_.value&&!u.value&&!C.value?(me(),Fe(wt,{key:0},[N.value?(me(),Fe(wt,{key:1},[N.value==="start"||N.value==="loading"?(me(),et(hF,{key:0,ref_key:"siteForm",ref:z,"assets-path":W(L),"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"error-message":O.value,"hide-back-button":!n.navigation.enableBackNavigation,"loader-message":H.value,"one-site-flow":n.navigation.oneSiteFlow&&!!n.entrypoint.site,"select-class":n.navigation.selectClass,"show-logo":n.navigation.displayLogoImages,"show-password-style":n.navigation.formShowPasswordStyle,site:W(b),"test-mode":he.enableTestMode,onBack:Ce,onError:oe,onSuccess:be[3]||(be[3]=()=>{y.value=W(i)("site.login.success")}),onValid:be[4]||(be[4]=()=>{y.value=W(i)("site.login.authenticating"),O.value=null})},null,8,["assets-path","button-disabled-style","disable-form-autocomplete","error-message","hide-back-button","loader-message","one-site-flow","select-class","show-logo","show-password-style","site","test-mode"])):Xe("",!0),N.value==="twofa"||N.value==="twofa-loading"?(me(),et(H3,{key:1,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"enable-back-navigation":n.navigation.enableTwofaBackNavigation,"loader-message":H.value,"select-class":n.navigation.selectClass,"show-password-style":n.navigation.formShowPasswordStyle,twofa:W(b).twofa,onBack:Je,onError:oe},null,8,["button-disabled-style","disable-form-autocomplete","enable-back-navigation","loader-message","select-class","show-password-style","twofa"])):Xe("",!0),N.value==="finish"?(me(),et(uF,{key:2,"long-message":d.value,message:m.value,"one-site-flow":n.navigation.oneSiteFlow&&!!n.entrypoint.site,type:W(b).finalResponse,onAccept:le},null,8,["long-message","message","one-site-flow","type"])):Xe("",!0)],64)):(me(),Fe(wt,{key:0},[k.value?Xe("",!0):(me(),et(G5e,{key:0,"country-id":f.value,"onUpdate:countryId":be[0]||(be[0]=it=>f.value=it),"organization-type-id":k.value,"onUpdate:organizationTypeId":be[1]||(be[1]=it=>k.value=it),"filtered-countries":c.value,"filtered-organization-types":B.value,"show-countries":!n.navigation.hideSelectCountry,"select-class":n.navigation.selectClass},null,8,["country-id","organization-type-id","filtered-countries","filtered-organization-types","show-countries","select-class"])),f.value&&k.value&&!T.value?(me(),et(cF,{key:1,items:S.value,"show-logo":n.navigation.displayLogoImages,"show-plaid-sites-button":n.internal.plaidSites&&k.value==="__internal__.plaidSites","assets-path":W(L),onSelect:Z},null,8,["items","show-logo","show-plaid-sites-button","assets-path"])):Xe("",!0),f.value&&k.value&&T.value?(me(),et(dF,{key:2,items:R.value,"show-logo":n.navigation.displayLogoImages,"assets-path":W(L),onSelect:pe,onBack:be[2]||(be[2]=it=>te())},null,8,["items","show-logo","assets-path"])):Xe("",!0)],64))],64)):Xe("",!0),u.value?(me(),Fe("div",{key:1,class:Te(he.$style["widget-data-error"])},[Ue("p",null,ot(u.value.length?u.value:W(i)("common.data_error")),1),ht(W(Xr),{onClick:$},{default:rt(()=>[br(ot(W(i)("common.retry")),1)]),_:1})],2)):Xe("",!0),C.value?(me(),Fe("div",{key:2,class:Te(he.$style["widget-data-error"])},[Ue("p",null,ot(W(i)("common.no_filtered_data")),1),ht(W(Xr),{onClick:Y},{default:rt(()=>[br(ot(W(i)("common.close")),1)]),_:1})],2)):Xe("",!0)])),[[W(Mf),_.value]])],2)):Xe("",!0)]),_:1},8,["visible","mobile"]),Ue("div",{class:Te(he.$style["widget-version"])},ot(W(s)),3)],64))}}),[["__cssModules",{$style:{"widget-close-button":"pb-w-sync_widget-close-button",container:"pb-w-sync_container","is-mobile":"pb-w-sync_is-mobile","widget-header":"pb-w-sync_widget-header","widget-data-error":"pb-w-sync_widget-data-error","widget-version":"pb-w-sync_widget-version"}}]]),OTe=["disabled","onClick"],RTe=Fn(st({__name:"AccountsList",props:{items:{default:()=>[]},locale:{}},emits:["addNewAccount","back","select"],setup(e,{emit:t}){const r=e,{t:n}=yi();function a(){t("addNewAccount")}function i(u){const d=`${u}`;return d.length===1?`0${d}`:d}function o(u){const d=new Date(u.dt_use*1e3);return r.locale==="en"?`${i(d.getMonth()+1)}/${i(d.getDate())}/${d.getFullYear()} ${i(d.getHours())}:${i(d.getMinutes())}`:`${i(d.getDate())}/${i(d.getMonth()+1)}/${d.getFullYear()} ${i(d.getHours())}:${i(d.getMinutes())}`}function l(u){return new Date(u.dt_use*1e3)>new Date}function f(u){t("select",u)}return(u,d)=>(me(),Fe("div",{class:Te(u.$style["accounts-container"])},[Ue("h2",null,ot(W(n)("transfer.choose_institution")),1),Ue("div",{class:Te(u.$style.accounts)},[(me(!0),Fe(wt,null,jn(r.items,(m,v)=>(me(),Fe("button",{key:`${m.id_site}-${v}`,disabled:l(m),type:"button",class:Te(u.$style["account-button"]),onClick:()=>f(m)},[Ue("div",{class:Te(u.$style["account-inner"])},[Ue("div",{class:Te(u.$style["account-text"])},[Ue("span",{class:Te(u.$style["account-name"])},ot(m.name),3),l(m)?(me(),Fe("span",{key:0,class:Te(u.$style["site-message"])},ot(W(n)("transfer.account_not_ready",{label:o(m)})),3)):Xe("",!0)],2)],2)],10,OTe))),128)),Ue("button",{type:"button",class:Te(u.$style["account-button"]),onClick:a},[Ue("div",{class:Te(u.$style["account-inner"])},[Ue("div",{class:Te(u.$style["account-text"])},[Ue("span",{class:Te(u.$style["account-name"])},ot(W(n)("transfer.new_account")),3)],2)],2)],2)],2),ht(W(Xr),{onClick:d[0]||(d[0]=m=>u.$emit("back"))},{default:rt(()=>[br(ot(W(n)("common.back")),1)]),_:1})],2))}}),[["__cssModules",{$style:{"accounts-container":"pb-w-sync_accounts-container",accounts:"pb-w-sync_accounts","account-button":"pb-w-sync_account-button","account-inner":"pb-w-sync_account-inner",avatar:"pb-w-sync_avatar","account-text":"pb-w-sync_account-text","account-message":"pb-w-sync_account-message","account-name":"pb-w-sync_account-name"}}]]),PTe=Fn(st({__name:"ChooseAccount",props:{assetsPath:{},entrypoint:{},navigation:{},organizationSiteId:{default:void 0},sync:{}},emits:["back","selectOrganizationSite","selectSite"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i=Re([]),o="",l,f=!0,u=Re([]),d,m=Re([]);const v=Ee(()=>i.value.filter(U=>!!u.value.find(M=>U.id_country===M.id_country)).sort((U,M)=>{let s=U.name.toUpperCase(),h=M.name.toUpperCase();return s<h?-1:s>h?1:0})),y=Ee(()=>u.value.filter(U=>r.navigation.displaySiteOrganizations.length?!!r.navigation.displaySiteOrganizations.find(M=>M===U.name||M===U.id_site_organization):r.navigation.hideSiteOrganizations.length?!r.navigation.hideSiteOrganizations.find(M=>M===U.name||M===U.id_site_organization):!0).filter(U=>o===U.id_country&&d===U.id_site_organization_type)),_=Ee(()=>m.value.filter(U=>r.navigation.displaySiteOrganizationTypes.length?!!r.navigation.displaySiteOrganizationTypes.find(M=>M===U.name||M===U.id_site_organization_type):r.navigation.hideSiteOrganizationTypes.length?!r.navigation.hideSiteOrganizationTypes.find(M=>M===U.name||M===U.id_site_organization_type):!0).filter(U=>o?!!u.value.filter(M=>o===M.id_country).find(M=>U.id_site_organization_type===M.id_site_organization_type):!0)),E=Ee(()=>C.value.filter(U=>r.navigation.displaySites.length?!!r.navigation.displaySites.find(M=>M===U.name||M===U.id_site):r.navigation.hideSites.length?!r.navigation.hideSites.find(M=>M===U.name||M===U.id_site):!0).filter(U=>{const M=U.organizationSite;return o===M.id_country&&d===M.id_site_organization_type&&r.organizationSiteId===M.id_site_organization})),C=Ee(()=>{let U=[];return u.value&&u.value.forEach(M=>{U=[...U,...M.sites.map(s=>({...s,avatar:M.avatar,cover:M.cover,organizationSite:M}))]}),U});ut(()=>r.navigation.displayPersonalSites,()=>{N()}),ut(()=>r.navigation.displayBusinessSites,()=>{N()}),Aw(()=>{N()});const T=Lm(200,function(){const U={};l=void 0,(r.navigation.displayPersonalSites?!r.navigation.displayBusinessSites:r.navigation.displayBusinessSites)&&(r.navigation.displayPersonalSites?U.is_personal=1:U.is_business=1);const M=[r.sync.getCountries(),r.sync.getOganizationTypes(),r.sync.getTransferOganizationSites(U)];return Promise.all(M).then(s=>{i.value=s[0],m.value=s[1],u.value=s[2]}).then(()=>kt().then(()=>{n("loaded"),L()})).catch(O).finally(()=>{f=!1})});function I(U,M){n("api-error",U.response?U.response.status:500,{longMessage:a(`${M}real.long_description`),message:a(`${M}real.short_description`),noInternet:!U.response})}function k(U){return`api_errors.${U.response?U.response.status?U.response.status:500:"no_internet"}.`}function N(){f=!0,T()}function O(U){const M=k(U);l=a(`${M}short_description`),!U.response&&r.navigation.displayErrorsInToast&&Vt.error({position:r.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:a(`${M}long_description`),initMessage:a(`${M}short_description`),showLogo:!1,t:a,type:"error"}),duration:0}),n("loaded"),I(U,M)}function P(U){dr("open_site_organization",{id_site_organization:U.id_site_organization}),t("selectOrganizationSite",U.id_site_organization),kt(()=>{E.value.length===1&&V(E.value[0],!1)})}function z(U){U!==d&&(dr("open_site_organization_type",{id_site_organization_type:U}),d=U)}function V(U,M=!0){t("selectSite",U,M)}function L(){if(l)return;let U,M;r.entrypoint.country&&(U=v.value.find(s=>s.code===r.entrypoint.country||s.id_country===r.entrypoint.country)),r.entrypoint.siteOrganizationType&&(M=_.value.find(s=>s.id_site_organization_type===r.entrypoint.siteOrganizationType)),o=U?U.id_country:v.value[0].id_country,dr("open_country",{id_country:o}),z(M?M.id_site_organization_type:_.value[0].id_site_organization_type)}return(U,M)=>tn((me(),Fe("div",{class:Te(U.$style["choose-account"])},[!W(f)&&!W(l)?(me(),Fe(wt,{key:0},[r.organizationSiteId?(me(),et(dF,{key:1,items:E.value,"show-logo":U.navigation.displayLogoImages,"assets-path":U.assetsPath,onSelect:V,onBack:M[1]||(M[1]=()=>{t("selectOrganizationSite",null),W(n)("back")})},null,8,["items","show-logo","assets-path"])):(me(),Fe(wt,{key:0},[ht(cF,{items:y.value,"show-logo":U.navigation.displayLogoImages,"assets-path":U.assetsPath,onSelect:P},null,8,["items","show-logo","assets-path"]),ht(W(Xr),{onClick:M[0]||(M[0]=()=>t("back"))},{default:rt(()=>[br(ot(W(a)("common.back")),1)]),_:1})],64))],64)):Xe("",!0),W(l)?(me(),Fe("div",{key:1,class:Te(U.$style["widget-data-error"])},[Ue("p",null,ot(W(l).length?W(l):W(a)("common.data_error")),1),ht(W(Xr),{onClick:N},{default:rt(()=>[br(ot(W(a)("common.retry")),1)]),_:1})],2)):Xe("",!0)],2)),[[W(Mf),W(f)]])}}),[["__cssModules",{$style:{"choose-account":"pb-w-sync_choose-account","widget-inner":"pb-w-sync_widget-inner","widget-inner-content":"pb-w-sync_widget-inner-content","widget-data-error":"pb-w-sync_widget-data-error"}}]]),FTe=st({__name:"AmountInput",props:{allowBlank:{type:Boolean,default:Mo.allowBlank},decimal:{default:Mo.decimal},disabled:{type:Boolean,default:!1},id:{default:""},masked:{type:Boolean,default:!1},max:{default:Mo.max},maxlength:{default:void 0},min:{default:Mo.min},modelValue:{},placeholder:{default:""},precision:{default:Mo.precision},prefix:{default:Mo.prefix},suffix:{default:Mo.suffix},thousands:{default:Mo.thousands}},emits:["blur","update:modelValue"],setup(e,{emit:t}){const r=e;let n="";function a(i){t("update:modelValue",r.masked?i:cz(i,r.precision))}return ut(()=>r.modelValue,i=>{var o=uz(i,r);o!==n&&(n=o)},{immediate:!0}),(i,o)=>{const l=Iw("money");return tn((me(),et(W(dm),{id:i.id,type:"tel",disabled:i.disabled,value:W(n),placeholder:i.placeholder,maxlength:i.maxlength,onInput:a,onBlur:o[0]||(o[0]=()=>t("blur"))},null,8,["id","disabled","value","placeholder","maxlength"])),[[l,{precision:i.precision,decimal:i.decimal,thousands:i.thousands,prefix:i.prefix,suffix:i.suffix,allowBlank:i.allowBlank,min:i.min,max:i.max}]])}}}),LTe=Fn(st({__name:"TransferForm",props:{buttonDisabledStyle:{type:Boolean},disableFormAutocomplete:{type:Boolean},request:{}},emits:["valid"],setup(e,{emit:t}){const r=e,n=At(ta),{t:a}=yi();let i={amount:r.request.amount},o=!0,l={transfer_amount:[{required:!0,message:a("form_errors.required",{label:a("transfer.amount")})},{type:"number",min:1}]},f={};const u=Re(null);ir(v);function d(y){y<0&&(i.amount=0)}function m(){u.value.validate(y=>{y&&(t("valid",i.amount),n("submitted"))})}function v(y,_){y&&(f[y]=_),o=Object.keys(l).reduce((E,C)=>l[C].length===0?E:E||!f[C],!1)}return(y,_)=>{const E=po("ElForm");return me(),Fe("div",{class:Te(y.$style["transfer-form"])},[ht(E,{ref_key:"transferForm",ref:u,"label-position":"top",model:W(i),rules:W(l),autocomplete:y.disableFormAutocomplete?"off":"on",onSubmit:Cn(m,["prevent"]),onValidate:v},{default:rt(()=>[Ue("h2",null,ot(W(a)("transfer.beneficiary")),1),Ue("p",{class:Te(y.$style["property-name"])},ot(y.request.beneficiary),3),ht(W(E3),{label:W(a)("transfer.amount_label"),prop:"amount"},{default:rt(()=>[ht(FTe,{modelValue:W(i).amount,"onUpdate:modelValue":_[0]||(_[0]=C=>W(i).amount=C),disabled:y.request.amount_fixed===1,onInput:d},null,8,["modelValue","disabled"])]),_:1},8,["label"]),Ue("h2",null,ot(W(a)("transfer.description")),1),Ue("p",{class:Te(y.$style["property-name"])},ot(y.request.description),3),Ue("div",{class:Te(y.$style["button-container"])},[ht(W(Xr),{disabled:y.buttonDisabledStyle&&W(o),type:"primary","native-type":"submit"},{default:rt(()=>[br(ot(W(a)("common.next")),1)]),_:1},8,["disabled"])],2)]),_:1},8,["model","rules","autocomplete","onSubmit"]),Ue("div",{class:Te(y.$style["secure-message-wrapper"])},[Ue("div",{class:Te(y.$style["secure-message-container"])},[ht(Fa,{icon:"shield"}),Ue("p",null,ot(W(a)("common.secure_message")),1)],2)],2)],2)}}}),[["__cssModules",{$style:{"transfer-form":"pb-w-sync_transfer-form","property-name":"pb-w-sync_property-name","secure-message-container":"pb-w-sync_secure-message-container","secure-message-wrapper":"pb-w-sync_secure-message-wrapper","button-container":"pb-w-sync_button-container"}}]]),DTe={key:1},$Te=["element-loading-text"],zTe=Fn(st({__name:"TransferWidget",props:{enableTestMode:{type:Boolean},entrypoint:{},internal:{},locale:{},navigation:{},refreshTokenFunction:{type:Function},strict:{},token:{}},emits:["tokenRefreshed"],setup(e,{expose:t,emit:r}){const n=e,a=At(ta),{t:i,locale:o}=yi({useScope:"global"}),l=Re(null);let f=null,u=null,d=!1,m=Re(null),v=!1,y="https://s.paybook.com",_=Re(!1),E=!1,C=null,T=null,I=`${ac()}${n.strict?"-props.strict":""}`,k=Re(""),N=Re(""),O=null,P=!0,z=!1,V=Re(null),L=null,U=null,M=null,s=Re(!1);const h=Ee(()=>!(P||M&&(M.$loading||M.twofa||M.$finalResponse)||!m.value)),p=Ee(()=>`${N.value}${k.value?`: ${k.value}`:""}`);ut(()=>n.locale,($,re)=>{$!==re&&["es","en"].includes($)&&(o.value=$)}),ut(()=>n.internal,($,re)=>{if(U.defaultParams=$.defaultHttpParams||{},U.defaultParams.props.locale=n.locale,$.apiEnv!==re.apiEnv)switch(U.updateEnvironment($.apiEnv),$.apiEnv){case"production":y="https://s.paybook.com";break;case"development":y="https://s.paybook.dev";break;default:y="https://s.paybook.com";break}$.apiBaseUrl!==re.apiBaseUrl&&$.apiBaseUrl&&U.updateApiBaseUrl($.apiBaseUrl),$.assetsBaseUrl!==re.assetsBaseUrl&&$.assetsBaseUrl&&(y=$.assetsBaseUrl),G()}),ut(N,()=>{O&&(O.$slots.default[0].componentInstance.$data.message=N)}),ut(k,()=>{O&&(O.$slots.default[0].componentInstance.$data.longMessage=k)}),ut(s,()=>{if(!s.value&&!O&&M&&M.$loading)return O=Vt.info({showClose:!1,position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,buttonDisabledStyle:n.navigation.formButtonsDisabledStyle,disableFormAutocomplete:n.navigation.disableFormAutocomplete,duration:0,enableBackNavigation:!1,initMessage:N.value,item:M,selectClass:n.navigation.selectClass,showLogo:!1,showPasswordStyle:n.navigation.formShowPasswordStyle,t:i,type:"info",onBack:()=>{a("back"),O.close(),O=null,M=null,J(f,!1),H(),s.value=!0},onError:$=>{x($)},onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0});s&&O&&(s.value=!1,Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}))});function g(){["es","en"].includes(n.locale)&&(o.value=n.locale),y=n.internal.apiEnv?n.internal.apiEnv==="production"?"https://s.paybook.com":"https://s.paybook.dev":"https://s.paybook.com",n.internal.assetsBaseUrl&&(y=n.internal.assetsBaseUrl),n.strict?(q(),P=!0,setTimeout(()=>{U.strictMode({token:n.token,strict:n.strict}).then(()=>{G()})},400)):(q(),G()),window.addEventListener("resize",H)}fn(()=>{E=!0,window.removeEventListener("resize",H)}),ir(()=>{kt(()=>{a("dom-updated")})}),Au(()=>{kt(()=>{a("dom-updated")})});function b(){a("back"),m.value=null}function w(){a("back"),V.value?V.value=null:(d=!1,u.length===0&&(m.value=null))}function A(){dr("close"),s.value=!1,M&&!M.$loading&&(M=null),a("closed")}function x($,re=!1){const Q=re?"transfer.proccessed_transfer.":R($);!n.navigation.displayErrorsInToast&&s?(C=i(`${Q}long_description`),T=i(`${Q}short_description`),M.$finalResponse="error"):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:n.navigation.displayLongDescription,duration:0,initLongMessage:i(`${Q}long_description`),initMessage:i(`${Q}short_description`),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),S($,Q)}const c=Lm(200,function(){const $=[U.getTransferRequest(n.entrypoint.transfer),U.getAccountsList()];return Promise.all($).then(re=>{re[0][0]?L=re[0][0]:Y({response:{status:"transfer_not_found"}}),u=re[1]}).then(()=>kt().then(()=>{a("loaded")})).catch(Y).finally(()=>{P=!1})});function S($,re){a("api-error",$.response?$.response.status:500,{longMessage:i(`${re}real.long_description`),message:i(`${re}real.short_description`),noInternet:!$.response})}function B($){a("socket-error",{longMessage:i(`socket.${$}.long_description`),type:$,message:i(`socket.${$}.short_description`)})}function R($){return`api_errors.${$.response?$.response.status?$.response.status:500:"no_internet"}.`}function H(){kt(()=>{E||(z=rh.device.type==="mobile"||l.value.clientWidth<600)})}function X(){M?F():u.length===0||d?w():b()}function G(){P=!0,c()}function Y($){const re=R($);_.value=i(`${re}short_description`),!$.response&&n.navigation.displayErrorsInToast&&Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initLongMessage:i(`${re}long_description`),initMessage:i(`${re}short_description`),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),a("loaded"),S($,re)}function ue($){M.site.loading=!0,M.transfer($).then(()=>{N.value=i("site.login.success")}).catch(re=>{M.site.loading=!1,x(re)})}function oe(){dr("open"),s.value=!0,H(),a("opened")}function ce(){M=null}function ne(){M=null,m.value=null,d=null,V.value=null}function J($,re=!0){re&&dr("open_account",{id_account:$.id_account}),!M||!M.$loading?(f=$,M=U.transferConnection(L,$,m),T=null,C=null,M.on("login-success",()=>{s&&n.navigation.displayStatusInToast&&A()}),M.on("socket-message",Q=>{const te=`transfer.socket.${Q.code?Q.code:500}.`,le=i(`${te}short_description`),Z=i(`${te}long_description`);switch(!0){case(400<=Q.code&&Q.code<600&&Q.code!==410):O&&(O.close(),O=null),T=le,C=Z,a("error",M.response,{code:Q.code,longMessage:Z,message:le}),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Z,initMessage:le,item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce());break;case(200<=Q.code&&Q.code<300):O&&(O.close(),O=null),T=le,C=Z,a("success",M.response),s.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Z,initMessage:le,item:{...M},showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),ce());break;default:M.twofa&&Q.code!==410&&(M.twofa.loading=!0),N.value=le,k.value=Z}a("status",Q)}),M.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(C=i("socket.error.long_description"),T=i("socket.error.short_description"),M.$finalResponse="error"),B("error")}),M.on("socket-close",()=>{O&&(O.close(),O=null)}),M.on("twofa",()=>{N.value=i("twofa.waiting"),k.value=null}),M.on("socket-timeout",()=>{T=i("socket.timeout.short_description"),C=i("socket.timeout.long_description"),a("error",M.response),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:{...M},showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce()),B("timeout")}),N.value=i("site.login.authenticating"),M.transfer().then(()=>{N.value=i("site.login.success")}).catch(Q=>{M=null,x(Q,Q.response.status===400)})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function j($){V.value=$}function ae($,re){dr("add_account_and_transfer",{id_site:$.id_site}),v=re,!M||!M.$loading?(M=U.addAccountAndTransferConnection(L,$,m.value),T=null,C=null,M.on("login-success",()=>{s&&n.navigation.displayStatusInToast&&A()}),M.on("socket-message",Q=>{const te=`transfer.socket.${Q.code?Q.code:500}.`,le=i(`${te}short_description`),Z=i(`${te}long_description`);switch(!0){case(400<=Q.code&&Q.code<600&&Q.code!==410):O&&(O.close(),O=null),T=le,C=Z,a("error",M.response,{code:Q.code,longMessage:Z,message:le}),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:Z,initMessage:le,item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce());break;case(200<=Q.code&&Q.code<300):O&&(O.close(),O=null),T=le,C=Z,a("success",M.response),s.value||(Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:n.navigation.toastDuration,hideForm:!0,initLongMessage:Z,initMessage:le,item:{...M},showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),ce());break;default:M.twofa&&Q.code!==410&&(M.twofa.loading=!0),N.value=le,k.value=Z}a("status",Q)}),M.on("socket-error",()=>{n.navigation.displayErrorsInToast?Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,duration:0,hideForm:!0,initLongMessage:i("socket.error.long_description"),initMessage:i("socket.error.short_description"),item:M,showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}):(C=i("socket.error.long_description"),T=i("socket.error.short_description"),M.$finalResponse="error"),B("error")}),M.on("socket-close",()=>{O&&(O.close(),O=null)}),M.on("twofa",()=>{N.value=i("twofa.waiting"),k.value=null}),M.on("socket-timeout",()=>{T=i("socket.timeout.short_description"),C=i("socket.timeout.long_description"),a("error",M.response),s.value||(Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{assetsPath:y,displayLongDescription:n.navigation.displayLongDescription,duration:0,hideForm:!0,initLongMessage:i("socket.timeout.long_description"),initMessage:i("socket.timeout.short_description"),item:{...M},showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0}),ce()),B("timeout")})):Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{duration:0,initMessage:i("common.process_running"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}function se($){m.value=$}function q(){U=new ox(n.token,{http:{baseURL:n.internal.apiBaseUrl?n.internal.apiBaseUrl:n.internal.apiEnv?n.internal.apiEnv==="production"?"https://sync.paybook.com":"https://api.syncfy.paybook.dev":"https://sync.paybook.com",isStrict:!!n.strict},defaultParams:{locale:n.locale,...n.internal.defaultHttpParams},isHeadless:!1,quickAnswer:n.navigation.quickAnswer,socketTimeout:n.navigation.socketTimeout,widgetVersion:I});let $=null;U.on("sync_401",()=>{n.refreshTokenFunction&&!$&&($=Vt.error({position:n.navigation.toastPosition,showClose:!1,message:vt(mF,{initTitle:i("common.unauthorized"),initMessage:i("common.unauthorized_message"),refreshTokenFunction:n.refreshTokenFunction,t:i,onClosed:()=>{$=null},onCloseNotification:()=>{$.close()},onRefreshToken:({token:re,strict:Q,resolve:te})=>{r("tokenRefreshed",re),D(re,Q).then(()=>($.close(),Vt.success({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:n.navigation.toastDuration,initMessage:i("common.session_refreshed_message"),initTitle:i("common.session_refreshed"),showLogo:!1,t:i,type:"success",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:n.navigation.toastDuration}),G(),te(null)))},onRefreshTokenError:()=>{Vt.error({position:n.navigation.toastPosition,message:vt(Gt,{displayLongDescription:!1,duration:0,initMessage:i("common.session_error"),initTitle:i("common.error"),showLogo:!1,t:i,type:"error",onImagesLoaded:()=>{a("images-loaded")},onImagesLoading:()=>{a("images-loading")}}),duration:0})}}),duration:0})),a("401")})}function D($,re){return re?U.strictMode({token:$,strict:re}):U.updateToken($)}function F(){a("back"),dr("close_site",{id_site:M.site.config.id_site}),M=null,v||(V.value=null)}return g(),t({close:A,open:oe,setToken:D}),($,re)=>(me(),et(pF,{visible:W(s),"onUpdate:visible":re[2]||(re[2]=Q=>hr(s)?s.value=Q:s=Q),mobile:W(z)},{default:rt(()=>[Ue("div",{ref_key:"widgetContainer",ref:l,class:Te([$.$style.container,{[$.$style["is-mobile"]]:W(z)}])},[Ue("div",{class:Te($.$style["widget-header"])},[h.value?(me(),et(W(Xr),{key:0,onClick:X},{default:rt(()=>[ht(Fa,{icon:"back"})]),_:1})):(me(),Fe("span",DTe)),Ue("h1",null,ot(W(i)("transfer.title",{label:W(L)?W(L).description:""})),1),ht(W(Xr),{class:Te($.$style["widget-close-button"]),onClick:A},{default:rt(()=>[ht(Fa,{icon:"close"})]),_:1},8,["class"])],2),tn((me(),Fe("div",{class:Te($.$style["widget-main"])},[!W(P)&&!W(_)?(me(),Fe("div",{key:0,class:Te($.$style["widget-inner"])},[Ue("div",{class:Te($.$style["widget-inner-content"])},[W(m)?(me(),Fe(wt,{key:1},[W(M)?(me(),Fe(wt,{key:1},[tn(Ue("div",{class:Te($.$style["widget-transfer-loader"]),"element-loading-text":p.value},null,10,$Te),[[vi,W(M).$loading&&!W(M).twofa&&!W(M).$finalResponse],[W(Mf),W(M).$loading&&!W(M).twofa&&!W(M).$finalResponse]]),W(M).site&&!W(M).twofa&&!W(M).$finalResponse?(me(),et(hF,{key:0,"assets-path":W(y),"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"hide-back-button":W(M).site&&!n.navigation.enableBackNavigation,"loader-message":p.value,"select-class":n.navigation.selectClass,"show-logo":n.navigation.displayLogoImages,"show-password-style":n.navigation.formShowPasswordStyle,site:W(M).site,"test-mode":n.enableTestMode,onBack:F,onSuccess:ue,onValid:re[1]||(re[1]=()=>{hr(N)?N.value=W(i)("site.login.authenticating"):N=W(i)("site.login.authenticating")})},null,8,["assets-path","button-disabled-style","disable-form-autocomplete","hide-back-button","loader-message","select-class","show-logo","show-password-style","site","test-mode"])):Xe("",!0),W(M).twofa&&!W(M).$finalResponse?(me(),et(H3,{key:1,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,"enable-back-navigation":!1,"loader-message":p.value,"select-class":n.navigation.selectClass,"show-password-style":n.navigation.formShowPasswordStyle,twofa:W(M).twofa,onError:x},null,8,["button-disabled-style","disable-form-autocomplete","loader-message","select-class","show-password-style","twofa"])):Xe("",!0),W(M).$finalResponse?(me(),et(uF,{key:2,"long-message":W(C),message:W(T),"one-site-flow":!0,"retry-button":W(M).$finalResponse==="error",type:W(M).$finalResponse,onRetry:ne},null,8,["long-message","message","retry-button","type"])):Xe("",!0)],64)):(me(),Fe(wt,{key:0},[W(u).length>0&&!W(d)?(me(),et(RTe,{key:0,items:W(u),locale:n.locale,onAddNewAccount:re[0]||(re[0]=()=>{hr(d)?d.value=!0:d=!0}),onBack:b,onSelect:J},null,8,["items","locale"])):(me(),et(PTe,{key:1,"assets-path":W(y),entrypoint:n.entrypoint,navigation:n.navigation,"organization-site-id":W(V),sync:W(U),onBack:w,onSelectOrganizationSite:j,onSelectSite:ae},null,8,["assets-path","entrypoint","navigation","organization-site-id","sync"]))],64))],64)):(me(),et(LTe,{key:0,"button-disabled-style":n.navigation.formButtonsDisabledStyle,"disable-form-autocomplete":n.navigation.disableFormAutocomplete,request:W(L),onValid:se},null,8,["button-disabled-style","disable-form-autocomplete","request"]))],2)],2)):Xe("",!0),W(_)?(me(),Fe("div",{key:1,class:Te($.$style["widget-data-error"])},[Ue("p",null,ot(W(_).length?W(_):W(i)("common.data_error")),1),ht(W(Xr),{onClick:G},{default:rt(()=>[br(ot(W(i)("common.retry")),1)]),_:1})],2)):Xe("",!0)],2)),[[W(Mf),W(P)]])],2)]),_:1},8,["visible","mobile"]))}}),[["__cssModules",{$style:{"widget-close-button":"pb-w-sync_widget-close-button",container:"pb-w-sync_container","widget-main":"pb-w-sync_widget-main","widget-header":"pb-w-sync_widget-header","widget-inner":"pb-w-sync_widget-inner","widget-inner-content":"pb-w-sync_widget-inner-content","widget-data-error":"pb-w-sync_widget-data-error","widget-transfer-loader":"pb-w-sync_widget-transfer-loader","is-mobile":"pb-w-sync_is-mobile"}}]]),UTe=st({__name:"App",props:{config:{default:()=>({})},enableTestMode:{type:Boolean,default:!1},refreshTokenFunction:{type:Function,default:void 0},strict:{default:void 0},token:{}},setup(e,{expose:t}){const r=e,n=Re(null),{t:a}=yi();un(tw,a);const i={locale:"en",entrypoint:{country:"MX"},navigation:{disableFormAutocomplete:!1,displayBusinessSites:!0,displayErrorsInToast:!0,displayLogoImages:!0,displayLongDescription:!1,displayPersonalSites:!0,displaySiteOrganizations:[],displaySiteOrganizationTypes:[],displaySites:[],displayStatusInToast:!1,enableBackNavigation:!0,enableTwofaBackNavigation:!1,formButtonsDisabledStyle:!1,formShowPasswordStyle:"icon",hideSelectCountry:!1,hideSiteOrganizations:[],hideSiteOrganizationTypes:[],hideSites:[],oneSiteFlow:!1,quickAnswer:!1,returnToSiteFormOnUserError:!1,selectClass:"",socketTimeout:24e4,toastDuration:5e3,toastPosition:"top-right"},__internal__:{apiBaseUrl:null,apiEnv:null,assetsBaseUrl:null,plaidSites:!1,defaultHttpParams:{}}},o=Vn({enableTestMode:r.enableTestMode,entrypoint:{...i.entrypoint,..._(r.config.entrypoint)},internal:{...i.__internal__,..._(r.config.__internal__)},locale:r.config.locale||i.locale,navigation:{...i.navigation,..._(r.config.navigation)},refreshTokenFunction:r.refreshTokenFunction,strict:r.strict,token:r.token,onTokenRefreshed:E=>{o.token=E}});function l(){n.value.close()}function f(){kt(()=>{n.value.open()})}function u(E={}){try{Mg.validateSync(E)}catch(C){if(C.name==="ValidationError")throw new Error(`ValidationError: ${C.message}`)}o.entrypoint={...i.entrypoint,..._(E.entrypoint)},o.internal={...i.__internal__,..._(E.__internal__)},o.locale=E.locale||i.locale,o.navigation={...i.navigation,..._(E.navigation)}}function d(E){n.value.setCredential&&n.value.setCredential(E)}function m(E){o.entrypoint={...o.entrypoint,site:E},f()}function v(E,C){return n.value.setToken(E,C)}function y(E={}){try{Mg.validateSync(E)}catch(C){if(C.name==="ValidationError")throw new Error(`ValidationError: ${C.message}`)}o.entrypoint={...o.entrypoint,..._(E.entrypoint)},o.internal={...o.internal,..._(E.__internal__)},o.locale=E.locale||o.locale,o.navigation={...o.navigation,..._(E.navigation)}}function _(E={}){const C={...E};return Object.keys(C).forEach(T=>{C[T]===void 0&&delete C[T]}),C}return t({close:l,open:f,setConfig:u,setEntrypointCredential:d,setEntrypointSite:m,setToken:v,upsertConfig:y}),(E,C)=>(me(),et(W(w6e),{locale:o.locale==="es"?W(I5e):W(A5e)},{default:rt(()=>[(me(),et(ni(o.entrypoint.transfer?zTe:NTe),Ai(o,{ref_key:"widgetComponent",ref:n}),null,16))]),_:1},8,["locale"]))}});function Cf(e){return e||(e={}),{locale:e.locale?e.locale:"en",quickAnswer:!!e.quickAnswer,socketTimeout:e.socketTimeout||24e4}}function Tf(e,t){return new Promise(n=>{const a=new ox(e.token,{http:{baseURL:"https://sync.paybook.com",isStrict:!!e.strict},defaultParams:{locale:t.locale},isHeadless:!0,quickAnswer:t.quickAnswer,socketTimeout:t.socketTimeout,widgetVersion:`${ac()}-headless`});e.strict?a.strictMode({token:e.token,strict:e.strict}).then(()=>{n(a)}):n(a)})}function qTe(e,t){return new Promise((n,a)=>{const i=Cf(t);Tf(e,i).then(o=>{o.getCountries().then(l=>{n(l)}).catch(l=>{a(l)})})})}function VTe(e,t={},r){return new Promise((a,i)=>{const o=Cf(r);Tf(e,o).then(l=>{l.getOganizationSites(t).then(f=>{a(f)}).catch(f=>{i(f)})})})}function HTe(e,t){return new Promise((n,a)=>{const i=Cf(t);Tf(e,i).then(o=>{o.getOganizationTypes().then(l=>{n(l)}).catch(l=>{a(l)})})})}function jTe(e,t,r){return new Promise((a,i)=>{const o=Cf(r);Tf(e,o).then(l=>{l.getSite(t).then(f=>{a(f[0])}).catch(f=>{i(f)})})})}function KTe(e,t,r){return new Promise(a=>{const i=Cf(r);Tf(e,i).then(o=>{a(o.siteConnection(t))})})}function WTe(e,t,r){return new Promise(a=>{const i=Cf(r);Tf(e,i).then(o=>{a(o.syncCredential(t))})})}function GTe(e,t,r,n){return new Promise(i=>{const o=Cf(n);Tf(e,o).then(l=>{i(new Dm({...t,id_site:r},l.getHttpService(),!1))})})}const ZTe={getCountries:qTe,getOrganizationSites:VTe,getOrganizationTypes:HTe,getSite:jTe,siteConnection:KTe,syncCredential:WTe,twofa:GTe};fz();class lx{constructor(t){const r=new ppe({accessToken:"2d928ea9aa674c6ea84dbf6f3901a403",captureUncaught:!1,captureUnhandledRejections:!1,enabled:!0,environment:"production",payload:{code_version:ac()}});let n;if(typeof t=="string")n={token:t};else if(typeof t=="object")n=t;else throw new Error("Invalid params type. Params must be either string or object.");try{Xz.validateSync(n)}catch(d){if(d.name==="ValidationError")throw new Error(`ValidationError: ${d.message}`)}dr("instantiation");const a=zk(UTe,{config:n.config,enableTestMode:n.enableTestMode,refreshTokenFunction:n.refreshTokenFunction,strict:n.strict,token:n.token}),i=bye({availableLocales:["en","es"],fallbackLocale:"en",legacy:!1,locale:"en",messages:{en:Ei,es:tl}});a.use(i),a.use($ge),a.config.errorHandler=d=>{throw r.error(d),d};const o=[];function l(d,m){o.push({callback:m,e:d})}function f(d,...m){o.forEach(({callback:v,e:y})=>{d===y&&v(...m)})}a.provide(ta,f);const u=a.mount(n.element||"#widget");return{on:l,close:u.close,open:u.open,setConfig:u.setConfig,setEntrypointCredential:u.setEntrypointCredential,setEntrypointSite:u.setEntrypointSite,setToken:u.setToken,upsertConfig:u.upsertConfig}}static getVersion(){return ac()}}return _t(lx,"headless",ZTe),window.SyncfyWidget=lx,lx});