1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1505],{63653:(e,t,n)=>{let r,o,i,a,s,c,u,l,p,d,f,h;n.d(t,{CheckoutWeb:()=>sc});var m=function(e,t){return(m=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function v(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){var u=[s,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function _(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var b={CREDIT_CARD:"cards",DEBIT_CARD:"cards"},E="https://<entity>.<env>.oscato.com",w=Object.freeze({COMPONENT:{MOUNT:"mount",UNMOUNT:"unmount"}});function k(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let o=a.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){let t=i[e];t in n||(n[t]=o[t].bind(n))}}let o=n?.Parent??Object;class i extends o{}function a(e){var t;let o=n?.Parent?new i:this;for(let n of(r(o,e),(t=o._zod).deferred??(t.deferred=[]),o._zod.deferred))n();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class S extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class O extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let I={};function x(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function R(e,t){return"bigint"==typeof t?t.toString():t}function C(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function T(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let A=Symbol("evaluating");function P(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==A)return void 0===r&&(r=A,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function N(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function z(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function D(e){return JSON.stringify(e)}let L="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let j=C(()=>
1{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function M(e){if(!1===$(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==$(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function U(e){return M(e)?{...e}:Array.isArray(e)?[...e]:e}let F=new Set(["string","number","symbol"]);function Z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function B(e,t,n){let r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function V(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(void 0!==e?.message){if(void 0!==e?.error)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,"string"==typeof e.error?{...e,error:()=>e.error}:e}let G={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function J(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function K(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function W(e){return"string"==typeof e?e:e?.message}function H(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=W(e.inst?._zod.def?.error?.(e))??W(t?.error?.(e))??W(n.customError?.(e))??W(n.localeError?.(e))??"Invalid input"),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function q(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Y(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let X=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,R,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Q=k("$ZodError",X),ee=k("$ZodError",X,{Parent:Error}),et=e=>(t,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new S;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>H(e,i,I)));throw L(t,o?.callee),t}return a.value},en=e=>async(t,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>H(e,i,I)));throw L(t,o?.callee),t}return a.value},er=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new S;return i.issues.length?{success:!1,error:new(e??Q)(i.issues.map(e=>H(e,o,I)))}:{success:!0,data:i.value}},eo=er(ee),ei=e=>async(t,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>H(e,o,I)))}:{success:!0,data:i.value}},ea=ei(ee),es=/^[cC][^\s-]{8,}$/,ec=/^[0-9a-z]+$/,eu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,el=/^[0-9a-vA-V]{20}$/,ep=/^[A-Za-z0-9]{27}$/,ed=/^[a-zA-Z0-9_-]{21}$/,ef=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eh=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,em=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,eg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ey=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ev=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,eb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eE=/^$|^(?:[0-9a-zA-Z+/]{4}
1)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ew=/^[A-Za-z0-9_-]*$/,ek=/^\+[1-9]\d{6,14}$/,eS="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",eO=RegExp(`^${eS}$`);function eI(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ex=/^-?\d+$/,eR=/^-?\d+(?:\.\d+)?$/,eC=/^(?:true|false)$/i,eT=/^[^A-Z]*$/,eA=/^[^a-z]*$/,eP=k("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eN={number:"number",bigint:"bigint",object:"date"},ez=k("$ZodCheckLessThan",(e,t)=>{eP.init(e,t);let n=eN[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eD=k("$ZodCheckGreaterThan",(e,t)=>{eP.init(e,t);let n=eN[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eL=k("$ZodCheckMultipleOf",(e,t)=>{eP.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}let i=n>o?n:o;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),e$=k("$ZodCheckNumberFormat",(e,t)=>{eP.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=G[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ex)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ej=k("$ZodCheckMaxLength",(e,t)=>{var n;eP.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let o=q(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eM=k("$ZodCheckMinLength",(e,t)=>{var n;eP.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let o=q(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eU=k("$ZodCheckLengthEquals",(e,t)=>{var n;eP.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,o=r.length;if(o===t.length)return;let i=q(r),a=o>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),eF=k("$ZodCheckStringFormat",(e,t)=>{var n,r;eP.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),eZ=k("$ZodCheckRegex",(e,t)=>{eF.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eB=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eT),eF.init(e,t)}),eV=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eA),eF.init(e,t)}),eG=k("$ZodCheckIncludes",(e,t)=>{eP.init(e,t);let n=Z(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>
1{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),eJ=k("$ZodCheckStartsWith",(e,t)=>{eP.init(e,t);let n=RegExp(`^${Z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),eK=k("$ZodCheckEndsWith",(e,t)=>{eP.init(e,t);let n=RegExp(`.*${Z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),eW=k("$ZodCheckOverwrite",(e,t)=>{eP.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eH{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let eq={major:4,minor:3,patch:6},eY=k("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eq;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,o=J(e);for(let i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(o)continue;let t=e.issues.length,a=i._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new S;if(r||a instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await a,e.issues.length!==t&&(o||(o=J(e,t)))});else{if(e.issues.length===t)continue;o||(o=J(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(J(n))return n.aborted=!0,n;let a=t(o,r,i);if(a instanceof Promise){if(!1===i.async)throw new S;return a.then(t=>e._zod.parse(t,i))}return e._zod.parse(a,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){let t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}let a=e._zod.parse(o,i);if(a instanceof Promise){if(!1===i.async)throw new S;return a.then(e=>t(e,r,i))}return t(a,r,i)}}P(e,"~standard",()=>({validate:t=>{try{let n=eo(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return ea(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),eX=k("$ZodString",(e,t)=>{var n;eY.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),eQ=k("$ZodStringFormat",(e,t)=>{eF.init(e,t),eX.init(e,t)}),e0=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=eh),eQ.init(e,t)}),e1=k("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=em(e))}else t.pattern??(t.pattern=em());eQ.init(e,t)}),e2=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=eg),eQ.init(e,t)}),e4=k("$ZodURL",(e,t)=>{eQ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",n
1ote:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),e3=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),eQ.init(e,t)}),e9=k("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ed),eQ.init(e,t)}),e6=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=es),eQ.init(e,t)}),e5=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ec),eQ.init(e,t)}),e8=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=eu),eQ.init(e,t)}),e7=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=el),eQ.init(e,t)}),te=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ep),eQ.init(e,t)}),tt=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){let t=eI({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${eS}T(?:${r})$`)}(t)),eQ.init(e,t)}),tn=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eO),eQ.init(e,t)}),tr=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${eI(t)}$`)),eQ.init(e,t)}),to=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ef),eQ.init(e,t)}),ti=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ey),eQ.init(e,t),e._zod.bag.format="ipv4"}),ta=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ev),eQ.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ts=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e_),eQ.init(e,t)}),tc=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=eb),eQ.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function tu(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tl=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eE),eQ.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tu(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tp=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ew),eQ.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!ew.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tu(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),td=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ek),eQ.init(e,t)}),tf=k("$ZodJWT",(e,t)=>{eQ.init(e,t),e._zod.check=n=>{(function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),th=k("$ZodNumber",(e,t)=>{eY.init(e,t),e._zod.pattern=e._zod.bag.pattern??eR,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),tm=k("$ZodNumberFormat",(e,t)=>{e$.init(e,t),th.init(e,t)}),tg=k("$ZodBoolean",(e,t)=>{eY.init(e,t),e._zod.pattern=eC,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),ty=k("$ZodUnknown",(e,t)=>{eY.init(e,t),e._zod.parse=e=>e}),tv=k("$ZodNever",(e,t)=>{eY.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function t_(e,t,n){e.issues.length&&t.issues.push(...K(n,e.issues)),t.value[n]=e.value}let tb=k("$ZodArray",(e,t)=>{eY.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);let i=[];for(let e=0;e<o.length;e++){let a=o[e],s=t.element._zod.run({value:a,issues:[]},r);s instanceof Promise?i.push(s.then(t=>t_(t,n,e))):t_(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function tE(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...K(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function tw(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function tk(e,t,n,r,o,i){let a=[],s=o.keySet,c=o.catchall._zod,u=c.def.type,l="optional"===c.optout;for(let o in t){if(s.has(o))continue;if("never"===u){a.push(o);continue}let i=c.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>tE(e,n,o,t,l))):tE(i,n,o,t,l)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}let tS=k("$ZodObject",(e,t)=>{let n;eY.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let o=C(()=>tw(t));P(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let i=t.catchall;e._zod.parse=(t,r)=>{n??(n=o.value);let a=t.value;if(!$(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],c=n.shape;for(let e of n.keys){let n=c[e],o="optional"===n._zod.optout,i=n._zod.run({value:a[e],issues:[]},r);i instanceof Promise?s.push(i.then(n=>tE(n,t,e,a,o))):tE(i,t,e,a,o)}return i?tk(s,a,t,r,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),tO=k("$ZodObjectJIT",(e,t)=>{let n,r;tS.init(e,t);let o=e._zod.parse,i=C(()=>tw(t)),a=!I.jitless,s=a&&j.value,c=t.catchall;e._zod.parse=(u,l)=>{r??(r=i.value);let p=u.value;return $(p)?a&&s&&!1===l?.async&&!0!==l.jitless?(n||(n=(e=>{let t=new eH(["shape","payload","ctx"]),n=i.value,r=e=>{let t=D(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of n.keys)o[e]="key_"+a++;for(let i of(t.write("const newResult = {};"),n.keys)){let n=o[i],a=D(i),s=e[i],c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),c?t.write(` 2 if (${n}.issues.length) { 3 if (${a} in input) { 4 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 5 ...iss, 6 path: iss.path ? [${a}, ...iss.path] : [${a}] 7 }))); 8 } 9 } 10 11 if (${n}.value === undefined) { 12 if (${a} in input) { 13 newResult[${a}] = undefined; 14 } 15 } else { 16 newResult[${a}] = ${n}.value; 17 } 18 19 `):t.write(` 20 if (${n}.issues.length) { 21 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 22 ...iss, 23 path: iss.path ? [${a}, ...iss.path] : [${a}] 24 }))); 25 } 26 27 if (${n}.value === undefined) { 28 if (${a} in input) { 29 newResult[${a}] = undefined; 30 } 31 } else { 32 newResult[${a}] = ${n}.value; 33 } 34 35 `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=n(u,l),c?tk([],p,u,l,r,e):u):o(u,l):(u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u)}});function tI(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let o=e.filter(e=>!J(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H(e,r,I)))}),t)}let tx=k("$ZodUnion",(e,t)=>{eY.init(e,t),P(e._zod,"optin",()=>t.options.some(e=>
35"optional"===e._zod.optin)?"optional":void 0),P(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),P(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),P(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>T(e.source)).join("|")})$`)}});let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1,s=[];for(let e of t.options){let t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>tI(t,o,e,i)):tI(s,o,e,i)}}),tR=k("$ZodIntersection",(e,t)=>{eY.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>tC(e,t,n)):tC(e,o,i)}});function tC(e,t,n){let r,o=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),J(e))return e;let a=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(M(t)&&M(n)){let r=Object.keys(n),o=Object.keys(t).filter(e=>-1!==r.indexOf(e)),i={...t,...n};for(let r of o){let o=e(t[r],n[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};i[r]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<t.length;o++){let i=e(t[o],n[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}let tT=k("$ZodRecord",(e,t)=>{eY.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!M(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){let s;n.value={};let c=new Set;for(let e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){c.add("number"==typeof e?e.toString():e);let a=t.valueType._zod.run({value:o[e],issues:[]},r);a instanceof Promise?i.push(a.then(t=>{t.issues.length&&n.issues.push(...K(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...K(e,a.issues)),n.value[e]=a.value)}for(let e in o)c.has(e)||(s=s??[]).push(e);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(n.value={},Reflect.ownKeys(o))){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},r);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&eR.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=o[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>H(e,r,I)),input:a,path:[a],inst:e});continue}let c=t.valueType._zod.run({value:o[a],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...K(a,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...K(a,c.issues)),n.value[s.value]=c.value)}return i.length?Promise.all(i).then(()=>n):n}}),tA=k("$ZodEnum",(e,t)=>{eY.init(e,t);let n=x(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>F.has(typeof e)).map(e=>"string"==typeof e?Z(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),tP=k("$ZodTransform",(e,t)=>{eY.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new O(e.constructor.name);
35let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n));if(o instanceof Promise)throw new S;return n.value=o,n}});function tN(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let tz=k("$ZodOptional",(e,t)=>{eY.init(e,t),e._zod.optin="optional",e._zod.optout="optional",P(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),P(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${T(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>tN(t,e.value)):tN(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),tD=k("$ZodExactOptional",(e,t)=>{tz.init(e,t),P(e._zod,"values",()=>t.innerType._zod.values),P(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tL=k("$ZodNullable",(e,t)=>{eY.init(e,t),P(e._zod,"optin",()=>t.innerType._zod.optin),P(e._zod,"optout",()=>t.innerType._zod.optout),P(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${T(e.source)}|null)$`):void 0}),P(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),t$=k("$ZodDefault",(e,t)=>{eY.init(e,t),e._zod.optin="optional",P(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tj(e,t)):tj(r,t)}});function tj(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tM=k("$ZodPrefault",(e,t)=>{eY.init(e,t),e._zod.optin="optional",P(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),tU=k("$ZodNonOptional",(e,t)=>{eY.init(e,t),P(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>tF(t,e)):tF(o,e)}});function tF(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let tZ=k("$ZodCatch",(e,t)=>{eY.init(e,t),P(e._zod,"optin",()=>t.innerType._zod.optin),P(e._zod,"optout",()=>t.innerType._zod.optout),P(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>H(e,n,I))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>H(e,n,I))},input:e.value}),e.issues=[]),e)}}),tB=k("$ZodPipe",(e,t)=>{eY.init(e,t),P(e._zod,"values",()=>t.in._zod.values),P(e._zod,"optin",()=>t.in._zod.optin),P(e._zod,"optout",()=>t.out._zod.optout),P(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tV(e,t.in,n)):tV(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tV(e,t.out,n)):tV(r,t.out,n)}});function tV(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let tG=k("$ZodReadonly",(e,t)=>{eY.init(e,t),P(e._zod,"propValues",()=>t.innerType._zod.propValues),P(e._zod,"values",()=>t.innerType._zod.values),P(e._zod,"optin",()=>t.innerType?._zod?.optin),P(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(tJ):tJ(r)}});function tJ(e){return e.value=Object.freeze(e.value),e}let tK=k("$ZodCustom",(e,t)=>{eP.init(e,t),eY.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>tW(t,n,r,e));tW(o,n,r,e)}});function tW(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Y(e))}}class tH{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(rf=globalThis).__zod_globalRegistry??(rf.__zod_globalRegistry=new tH);let tq=globalThis.__zod_globalRegistry;function tY(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function tX(e,t){return new ez({check:"less_than",...V(t),value:e,inclusive:!1})}function tQ(e,t){return new ez({check:"less_than",...V(t),value:e,inclusive:!0})}function t0(e,t){return new eD({check:"greater_than",...V(t),value:e,inclusive:!1})}function t1(e,t){return new eD({check:"greater_than",...V(t),value:e,inclusive:!0})}function t2(e,t){return new eL({check:"multiple_of",...V(t),value:e})}function t4(e,t){return new ej({check:"max_length",...V(t),maximum:e})}function t3(e,t){return new eM({check:"min_length",...V(t),minimum:e})}function t9(e,t){return new eU({check:"length_equals",...V(t),length:e})}function t6(e){return new eW({check:"overwrite",tx:e})}
35function t5(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??tq,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function t8(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,i=t.processors[o.type];if(!i)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}let i=e._zod.parent;i&&(a.ref||(a.ref=i),t8(i,t,r),t.seen.get(i).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,r);if("set"===o.type)return e(o.valueType,r);if("lazy"===o.type)return e(o.getter(),r);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,r);if("intersection"===o.type)return e(o.left,r)||e(o.right,r);if("record"===o.type||"map"===o.type)return e(o.keyType,r)||e(o.valueType,r);if("pipe"===o.type)return e(o.in,r)||e(o.out,r);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],r))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,r))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,r))return!0;return!(!o.rest||!e(o.rest,r))}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function t7(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:o,defId:i}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};let i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};let o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);let a=r.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root> 36 37Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){o(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}e.metadataRegistry.get(n[0])?.id?o(n):(r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}}function ne(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let o=n.def??n.schema,i={...o},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,i),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(s.$ref&&n.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let o={};
37if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?o.$defs=i:o.definitions=i);try{let n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:nt(t,"input",e.processors),output:nt(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let nt=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},a=t5({...o??{},target:i,io:t,processors:n});return t8(e,a),t7(a,e),ne(a,e)},nn={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nr=(e,t,n,r)=>{let o=e._zod.def;t8(o.innerType,t,r),t.seen.get(e).ref=o.innerType},no=k("ZodISODateTime",(e,t)=>{tt.init(e,t),nO.init(e,t)}),ni=k("ZodISODate",(e,t)=>{tn.init(e,t),nO.init(e,t)}),na=k("ZodISOTime",(e,t)=>{tr.init(e,t),nO.init(e,t)}),ns=k("ZodISODuration",(e,t)=>{to.init(e,t),nO.init(e,t)}),nc=k("ZodError",(e,t)=>{Q.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e}));else if("invalid_key"===o.code)r({issues:o.issues});else if("invalid_element"===o.code)r({issues:o.issues});else if(0===o.path.length)n._errors.push(t(o));else{let e=n,r=0;for(;r<o.path.length;){let n=o.path[r];r===o.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(o))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,R,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,R,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),nu=et(nc),nl=en(nc),np=er(nc),nd=ei(nc),nf=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return et(nc)(e,t,r)},nh=(e,t,n)=>et(nc)(e,t,n),nm=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return en(nc)(e,t,r)},ng=async(e,t,n)=>en(nc)(e,t,n),ny=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return er(nc)(e,t,r)},nv=(e,t,n)=>er(nc)(e,t,n),n_=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ei(nc)(e,t,r)},nb=async(e,t,n)=>ei(nc)(e,t,n),nE=k("ZodType",(e,t)=>(eY.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nt(e,"input"),output:nt(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=t5({...n,processors:t});return t8(e,r),t7(r,e),ne(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(z(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>B(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>nu(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>np(e,t,n),e.parseAsync=async(t,n)=>nl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>nd(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nf(e,t,n),e.decode=(t,n)=>nh(e,t,n),e.encodeAsync=async(t,n)=>nm(e,t,n),e.decodeAsync=async(t,n)=>ng(e,t,n),e.safeEncode=(t,n)=>ny(e,t,n),e.safeDecode=(t,n)=>nv(e,t,n),e.safeEncodeAsync=async(t,n)=>n_(e,t,n),e.safeDecodeAsync=async(t,n)=>nb(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return new rl({type:"custom",check:"custom",fn:e,...V(t)})}(t,n)),e.superRefine=t=>e.check(function(e){let t=function(e,t){let n=new eP({check:"custom",...V(void 0)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{"string"==typeof e?n.issues.push(Y(e,n.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=n.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),n.issues.push(Y(e)))}
37,e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(t6(t)),e.optional=()=>n7(e),e.exactOptional=()=>new re({type:"optional",innerType:e}),e.nullable=()=>rn(e),e.nullish=()=>n7(rn(e)),e.nonoptional=t=>new ri({type:"nonoptional",innerType:e,...V(t)}),e.array=()=>n0(e),e.or=t=>new n4({type:"union",options:[e,t],...V(void 0)}),e.and=t=>new n3({type:"intersection",left:e,right:t}),e.transform=t=>rc(e,new n5({type:"transform",transform:t})),e.default=t=>new rr({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():U(t)}}),e.prefault=t=>new ro({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():U(t)}}),e.catch=t=>new ra({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t}),e.pipe=t=>rc(e,t),e.readonly=()=>new ru({type:"readonly",innerType:e}),e.describe=t=>{let n=e.clone();return tq.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>tq.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return tq.get(e);let n=e.clone();return tq.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),nw=k("_ZodString",(e,t)=>{eX.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:o,format:i,patterns:a,contentEncoding:s}=e._zod.bag;if("number"==typeof r&&(n.minLength=r),"number"==typeof o&&(n.maxLength=o),i&&(n.format=nn[i]??i,""===n.format&&delete n.format,"time"===i&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new eZ({check:"string_format",format:"regex",...V(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new eG({check:"string_format",format:"includes",...V(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new eJ({check:"string_format",format:"starts_with",...V(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new eK({check:"string_format",format:"ends_with",...V(t),suffix:e})}(...t)),e.min=(...t)=>e.check(t3(...t)),e.max=(...t)=>e.check(t4(...t)),e.length=(...t)=>e.check(t9(...t)),e.nonempty=(...t)=>e.check(t3(1,...t)),e.lowercase=t=>e.check(new eB({check:"string_format",format:"lowercase",...V(t)})),e.uppercase=t=>e.check(new eV({check:"string_format",format:"uppercase",...V(t)})),e.trim=()=>e.check(t6(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return t6(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(t6(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(t6(e=>e.toUpperCase())),e.slugify=()=>e.check(t6(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}),nk=k("ZodString",(e,t)=>{eX.init(e,t),nw.init(e,t),e.email=t=>e.check(new nI({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})),e.url=t=>e.check(new nC({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})),e.jwt=t=>e.check(new nV({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})),e.emoji=t=>e.check(new nT({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})),e.guid=t=>e.check(tY(nx,t)),e.uuid=t=>e.check(new nR({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})),e.uuidv4=t=>e.check(new nR({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})),e.uuidv6=t=>e.check(new nR({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})),e.uuidv7=t=>e.check(new nR({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})),e.nanoid=t=>e.check(new nA({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})),e.guid=t=>e.check(tY(nx,t)),e.cuid=t=>e.check(new nP({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})),e.cuid2=t=>e.check(new nN({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})),e.ulid=t=>e.check(new nz({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})),e.base64=t=>e.check(new nF({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})),e.base64url=t=>e.check(new nZ({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})),e.xid=t=>e.check(new nD({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})),e.ksuid=t=>e.check(new nL({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})),e.ipv4=t=>e.check(new n$({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})),e.ipv6=t=>e.check(new nj({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})),e.cidrv4=t=>e.check(new nM({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})),e.cidrv6=t=>e.check(new nU({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})),e.e164=t=>e.check(new nB({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})),e.datetime=t=>e.check(new no({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})),e.date=t=>e.check(new ni({type:"string",format:"date",check:"string_format",...V(t)})),e.time=t=>e.check(new na({type:"string",format:"time",check:"string_format",precision:null,...V(t)})),e.duration=t=>e.check(new ns({type:"string",format:"duration",check:"string_format",...V(t)}))});function nS(e){return new nk({type:"string",...V(e)})}let nO=k("ZodStringFormat",(e,t)=>{eQ.init(e,t),nw.init(e,t)}),nI=k("ZodEmail",(e,t)=>
37{e2.init(e,t),nO.init(e,t)}),nx=k("ZodGUID",(e,t)=>{e0.init(e,t),nO.init(e,t)}),nR=k("ZodUUID",(e,t)=>{e1.init(e,t),nO.init(e,t)}),nC=k("ZodURL",(e,t)=>{e4.init(e,t),nO.init(e,t)}),nT=k("ZodEmoji",(e,t)=>{e3.init(e,t),nO.init(e,t)}),nA=k("ZodNanoID",(e,t)=>{e9.init(e,t),nO.init(e,t)}),nP=k("ZodCUID",(e,t)=>{e6.init(e,t),nO.init(e,t)}),nN=k("ZodCUID2",(e,t)=>{e5.init(e,t),nO.init(e,t)}),nz=k("ZodULID",(e,t)=>{e8.init(e,t),nO.init(e,t)}),nD=k("ZodXID",(e,t)=>{e7.init(e,t),nO.init(e,t)}),nL=k("ZodKSUID",(e,t)=>{te.init(e,t),nO.init(e,t)}),n$=k("ZodIPv4",(e,t)=>{ti.init(e,t),nO.init(e,t)}),nj=k("ZodIPv6",(e,t)=>{ta.init(e,t),nO.init(e,t)}),nM=k("ZodCIDRv4",(e,t)=>{ts.init(e,t),nO.init(e,t)}),nU=k("ZodCIDRv6",(e,t)=>{tc.init(e,t),nO.init(e,t)}),nF=k("ZodBase64",(e,t)=>{tl.init(e,t),nO.init(e,t)}),nZ=k("ZodBase64URL",(e,t)=>{tp.init(e,t),nO.init(e,t)}),nB=k("ZodE164",(e,t)=>{td.init(e,t),nO.init(e,t)}),nV=k("ZodJWT",(e,t)=>{tf.init(e,t),nO.init(e,t)}),nG=k("ZodNumber",(e,t)=>{th.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{let{minimum:r,maximum:o,format:i,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:c}=e._zod.bag;"string"==typeof i&&i.includes("int")?n.type="integer":n.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=c,n.exclusiveMinimum=!0):n.exclusiveMinimum=c),"number"==typeof r&&(n.minimum=r,"number"==typeof c&&"draft-04"!==t.target&&(c>=r?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof s&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s),"number"==typeof o&&(n.maximum=o,"number"==typeof s&&"draft-04"!==t.target&&(s<=o?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof a&&(n.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(t0(t,n)),e.gte=(t,n)=>e.check(t1(t,n)),e.min=(t,n)=>e.check(t1(t,n)),e.lt=(t,n)=>e.check(tX(t,n)),e.lte=(t,n)=>e.check(tQ(t,n)),e.max=(t,n)=>e.check(tQ(t,n)),e.int=t=>e.check(nK(t)),e.safe=t=>e.check(nK(t)),e.positive=t=>e.check(t0(0,t)),e.nonnegative=t=>e.check(t1(0,t)),e.negative=t=>e.check(tX(0,t)),e.nonpositive=t=>e.check(tQ(0,t)),e.multipleOf=(t,n)=>e.check(t2(t,n)),e.step=(t,n)=>e.check(t2(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),nJ=k("ZodNumberFormat",(e,t)=>{tm.init(e,t),nG.init(e,t)});function nK(e){return new nJ({type:"number",check:"number_format",abort:!1,format:"safeint",...V(e)})}let nW=k("ZodBoolean",(e,t)=>{tg.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nH(e){return new nW({type:"boolean",...V(e)})}let nq=k("ZodUnknown",(e,t)=>{ty.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function nY(){return new nq({type:"unknown"})}let nX=k("ZodNever",(e,t)=>{tv.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),nQ=k("ZodArray",(e,t)=>{tb.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(n.minItems=i),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=t8(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(t3(t,n)),e.nonempty=t=>e.check(t3(1,t)),e.max=(t,n)=>e.check(t4(t,n)),e.length=(t,n)=>e.check(t9(t,n)),e.unwrap=()=>e.element});function n0(e,t){return new nQ({type:"array",element:e,...V(t)})}let n1=k("ZodObject",(e,t)=>{tO.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;n.type="object",n.properties={};let i=o.shape;for(let e in i)n.properties[e]=t8(i[e],t,{...r,path:[...r.path,"properties",e]});let a=new Set([...new Set(Object.keys(i))].filter(e=>{let n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));a.size>0&&(n.required=Array.from(a)),"never"===o.catchall?._zod.def.type?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=t8(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),P(e,"shape",()=>t.shape),e.keyof=()=>(function(e,t){return new n6({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...V(void 0)})})(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nY()}),e.loose=()=>e.clone({...e._zod.def,catchall:nY()}),e.strict=()=>e.clone({...e._zod.def,catchall:new nX({type:"never",...V(void 0)})}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>(function(e,t){if(!M(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot over
37write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=z(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return N(this,"shape",n),n}});return B(e,r)})(e,t),e.safeExtend=t=>(function(e,t){if(!M(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=z(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return N(this,"shape",n),n}});return B(e,n)})(e,t),e.merge=t=>(function(e,t){let n=z(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return N(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return B(e,n)})(e,t),e.pick=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");return B(e,z(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return N(this,"shape",e),e},checks:[]}))})(e,t),e.omit=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=z(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return N(this,"shape",r),r},checks:[]});return B(e,o)})(e,t),e.partial=(...t)=>(function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=z(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return N(this,"shape",o),o},checks:[]});return B(t,o)})(n8,e,t[0]),e.required=(...t)=>(function(e,t,n){let r=z(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let t in n){if(!(t in o))throw Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return N(this,"shape",o),o}});return B(t,r)})(ri,e,t[0])});function n2(e,t){return new n1({type:"object",shape:e??{},...V(t)})}let n4=k("ZodUnion",(e,t)=>{tx.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=!1===o.inclusive,a=o.options.map((e,n)=>t8(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a})(e,t,n,r),e.options=t.options}),n3=k("ZodIntersection",(e,t)=>{tR.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=t8(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=t8(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]]})(e,t,n,r)}),n9=k("ZodRecord",(e,t)=>{tT.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;n.type="object";let i=o.keyType,a=i._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=t8(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},s))n.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(n.propertyNames=t8(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=t8(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let c=i._zod.values;if(c){let e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),n6=k("ZodEnum",(e,t)=>{tA.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{let r=x(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let o={};for(let r of e){if(!n.has(r))throw Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new n6({...t,checks:[],...V(r),entries:o})},e.exclude=(e,r)=>{let o={...t.entries};for(let t of e){if(!n.has(t))throw Error(`Key ${t} not found in enum`);delete o[t]}return new n6({...t,checks:[],...V(r),entries:o})}}),n5=k("ZodTransform",(e,t)=>{tP.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new O(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(Y(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Y(r)))};
37let o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}}),n8=k("ZodOptional",(e,t)=>{tz.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function n7(e){return new n8({type:"optional",innerType:e})}let re=k("ZodExactOptional",(e,t)=>{tD.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nr(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),rt=k("ZodNullable",(e,t)=>{tL.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=t8(o.innerType,t,r),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rn(e){return new rt({type:"nullable",innerType:e})}let rr=k("ZodDefault",(e,t)=>{t$.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t8(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),ro=k("ZodPrefault",(e,t)=>{tM.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t8(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ri=k("ZodNonOptional",(e,t)=>{tU.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t8(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),ra=k("ZodCatch",(e,t)=>{tZ.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o,i=e._zod.def;t8(i.innerType,t,r),t.seen.get(e).ref=i.innerType;try{o=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),rs=k("ZodPipe",(e,t)=>{tB.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i="input"===t.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;t8(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out});function rc(e,t){return new rs({type:"pipe",in:e,out:t})}let ru=k("ZodReadonly",(e,t)=>{tG.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t8(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rl=k("ZodCustom",(e,t)=>{tK.init(e,t),nE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e)});function rp(e,t){let n=V(t);return n.abort??(n.abort=!0),new rl({type:"custom",check:"custom",fn:()=>!0,...n})}function rd(e,t){return void 0===t&&(t="Invalid link"),nS().refine(function(t){return e(t)},{message:t})}var rf,rh,rm=n2({name:nS().optional(),source:nS().optional()}).loose(),rg=n2({code:nS().optional(),reason:nS().optional()}).loose(),ry=n2({reason:nS(),code:nS(),customerMessage:n2({title:nS().optional(),text:nS().optional()}).loose().optional()}).loose(),rv=n2({longId:nS().optional(),shortId:nS().optional(),transactionId:nS().optional(),pspId:nS().optional(),systemId:nS().optional(),institutionId:nS().optional()}).loose(),r_=n2({language:nS().optional(),hostedVersion:nS().optional(),primaryColor:nS().optional()}).loose(),rb=n2({reference:nS().optional(),amount:new nG({type:"number",checks:[],...V(rh)}),currency:nS()}).loose(),rE=n2({enabled:nH().optional().default(!0),globalContext:new n9({type:"record",keyType:nS(),valueType:nY(),...V(void 0)}).optional()}),rw=n2({env:nS().min(1,"env is a required field"),longId:nS().optional(),preload:n0(nS()).optional().default([]),telemetry:rE.optional(),onBeforeError:rp().optional(),onBeforeCharge:rp().optional(),onListRefetch:rp().optional(),onPaymentSuccess:rp().optional(),onValidationInfo:rp().optional(),onPaymentFailure:rp().optional(),onBeforeProviderRedirect:rp().optional(),onComponentListChange:rp().optional(),setStyles:rp().optional(),onPaymentDeclined:rp().optional(),onReady:rp().optional(),refetchListBeforeCharge:nH().optional(),onBeforeSubmit:rp().optional(),onSubmitSuccess:rp().optional(),onSubmitError:rp().optional()});let rk="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rS=globalThis,rO="10.43.0";function rI(){return rx(rS),rS}function rx(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||rO,t[rO]=t[rO]||{}}function rR(e,t,n=rS){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[rO]=r[rO]||{};return o[e]||(o[e]=t())}let rC=["debug","info","warn","error","log","assert","trace"],rT={};function rA(e){if(!("console"in rS))return e();let t=rS.console,n={},r=Object.keys(rT);
37r.forEach(e=>{let r=rT[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function rP(e,...t){rk&&function(){return rk?rR("loggerSettings",()=>({enabled:!1})):{enabled:!1}}().enabled&&rA(()=>{rS.console[e](`Sentry Logger [${e}]:`,...t)})}let rN={log:function(...e){rP("log",...e)},warn:function(...e){rP("warn",...e)},error:function(...e){rP("error",...e)}},rz=/\(error: (.*)\)/,rD=/captureMessage|captureException/;function rL(e){return e[e.length-1]||{}}let r$="<anonymous>";function rj(e){try{return e&&"function"==typeof e&&e.name||r$}catch{return r$}}function rM(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function rU(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}let rF={},rZ={};function rB(e,t){rF[e]=rF[e]||[],rF[e].push(t)}function rV(e,t){if(!rZ[e]){rZ[e]=!0;try{t()}catch(t){rk&&rN.error(`Error while instrumenting ${e}`,t)}}}function rG(e,t){let n=e&&rF[e];if(n)for(let r of n)try{r(t)}catch(t){rk&&rN.error(`Error while triggering instrumentation handler. 38Type: ${e} 39Name: ${rj(r)} 40Error:`,t)}}let rJ=null;function rK(){rJ=rS.onerror,rS.onerror=function(e,t,n,r,o){return rG("error",{column:r,error:o,line:n,msg:e,url:t}),!!rJ&&rJ.apply(this,arguments)},rS.onerror.__SENTRY_INSTRUMENTED__=!0}let rW=null;function rH(){rW=rS.onunhandledrejection,rS.onunhandledrejection=function(e){return rG("unhandledrejection",e),!rW||rW.apply(this,arguments)},rS.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let rq=Object.prototype.toString;function rY(e){switch(rq.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return r5(e,Error)}}function rX(e,t){return rq.call(e)===`[object ${t}]`}function rQ(e){return rX(e,"ErrorEvent")}function r0(e){return rX(e,"DOMError")}function r1(e){return rX(e,"String")}function r2(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function r4(e){return null===e||r2(e)||"object"!=typeof e&&"function"!=typeof e}function r3(e){return rX(e,"Object")}function r9(e){return"undefined"!=typeof Event&&r5(e,Event)}function r6(e){return!!(e?.then&&"function"==typeof e.then)}function r5(e,t){try{return e instanceof t}catch{return!1}}function r8(e){return!("object"!=typeof e||null===e||!(e.__isVue||e._isVue||e.__v_isVNode))}function r7(e){return"undefined"!=typeof Request&&r5(e,Request)}function oe(e,t={}){if(!e)return"<unknown>";try{let n,r=e,o=[],i=0,a=0,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&i++<5&&(n=function(e,t){let n=[];if(!e?.tagName)return"";if(rS.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}n.push(e.tagName.toLowerCase());let r=t?.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(r?.length)r.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{e.id&&n.push(`#${e.id}`);let t=e.className;if(t&&r1(t))for(let e of t.split(/\s+/))n.push(`.${e}`)}for(let t of["aria-label","type","name","title","alt"]){let r=e.getAttribute(t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}(r,s),!("html"===n||i>1&&a+3*o.length+n.length>=c));)o.push(n),a+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch{return"<unknown>"}}function ot(){try{return rS.document.location.href}catch{return""}}function on(e,t,n){if(!(t in e))return;let r=e[t];if("function"!=typeof r)return;let o=n(r);"function"==typeof o&&oo(o,r);try{e[t]=o}catch{rk&&rN.log(`Failed to replace method "${t}" in object`,e)}}function or(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{rk&&rN.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function oo(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,or(e,"__sentry_original__",t)}catch{}}function oi(e){return e.__sentry_original__}function oa(e){if(rY(e))return{message:e.message,name:e.name,stack:e.stack,...oc(e)};if(r9(e)){let t={type:e.type,target:os(e.target),currentTarget:os(e.currentTarget),...oc(e)};return"undefined"!=typeof CustomEvent&&r5(e,CustomEvent)&&(t.detail=e.detail),t}return e}function os(e){try{return"undefined"!=typeof Element&&r5(e,Element)?oe(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function oc(e){if("object"==typeof e&&null!==e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ou(e){if(void 0!==r)return r?r(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");return t in rS&&"function"==typeof rS[t]?(r=rS[t])(e):(r=null,e())}function ol(){return ou(()=>Math.random())}function op(){return ou(()=>Date.now())}function od(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function of(e,t){if(!Array.isArray(e))return"";let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{r8(r)?n.push(rU(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function oh(e,t,n=!1){return!!r1(e)&&(rX(t,"RegExp")?t.test(e):!!r1(t)&&(n?e===t:e.includes(t)))}function om(e,t=[],n=!1){return t.some(t=>
40oh(e,t,n))}function og(e=rS.crypto||rS.msCrypto){try{if(e?.randomUUID)return ou(()=>e.randomUUID()).replace(/-/g,"")}catch{}return o||(o="10000000100040008000100000000000"),o.replace(/[018]/g,e=>(e^(16*ol()&15)>>e/4).toString(16))}function oy(e){return e.exception?.values?.[0]}function ov(e){let{message:t,event_id:n}=e;if(t)return t;let r=oy(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function o_(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function ob(e,t){let n=oy(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r?.data,...t.data};n.mechanism.data=e}}function oE(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{or(e,"__sentry_captured__",!0)}catch{}return!1}function ow(){return op()/1e3}function ok(){return(i??(i=function(){let{performance:e}=rS;if(!e?.now||!e.timeOrigin)return ow;let t=e.timeOrigin;return()=>(t+ou(()=>e.now()))/1e3}()))()}function oS(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ok(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:og()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oO(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=oO(r[e],t[e],n-1));return r}function oI(){return og().substring(16)}let ox="_sentrySpan";function oR(e,t){t?or(e,ox,t):delete e[ox]}class oC{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:og(),sampleRand:ol()}}clone(){let e=new oC;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,oR(e,this[ox]),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&oS(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,{tags:n,attributes:r,extra:o,user:i,contexts:a,level:s,fingerprint:c=[],propagationContext:u,conversationId:l}=(t instanceof oC?t.getScopeData():r3(t)?e:void 0)||{};return this._tags={...this._tags,...n},this._attributes={...this._attributes,...r},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),s&&(this._level=s),c.length&&(this._fingerprint=c),u&&(this._propagationContext=u),l&&(this._conversationId=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,oR(this,void 0),this._attachments=[],this.setPropagationContext({traceId:og(),sampleRand:ol()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r={timestamp:ow(),...e,message:e.message?od(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:this[ox],conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=oO(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||og();if(!this._client)return rk&&rN.warn("No client configured on scope - will not capture exception!"),n;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||og();if(!this._client)return rk&&rN.warn("No client configured on scope - will not capture message!"),r;let o=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||og();return this._client?this._client.captureEvent(e,{...t,event_id:n},this):rk&&rN.warn("No client configured on scope - will not capture event!"),n}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
40h(e=>{e(this)}),this._notifyingListeners=!1)}}class oT{constructor(e,t){let n,r;n=e||new oC,r=t||new oC,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t,n=this._pushScope();try{t=e(n)}catch(e){throw this._popScope(),e}return r6(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function oA(){let e=rx(rI());return e.stack=e.stack||new oT(rR("defaultCurrentScope",()=>new oC),rR("defaultIsolationScope",()=>new oC))}function oP(e){return oA().withScope(e)}function oN(e,t){let n=oA();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function oz(e){return oA().withScope(()=>e(oA().getIsolationScope()))}function oD(e){let t=rx(e);return t.acs?t.acs:{withIsolationScope:oz,withScope:oP,withSetScope:oN,withSetIsolationScope:(e,t)=>oz(t),getCurrentScope:()=>oA().getScope(),getIsolationScope:()=>oA().getIsolationScope()}}function oL(){return oD(rI()).getCurrentScope()}function o$(){return oD(rI()).getIsolationScope()}function oj(){return oL().getClient()}let oM="sentry.profile_id",oU="sentry.exclusive_time";function oF(e){return{scope:e._sentryScope,isolationScope:function(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}(e._sentryIsolationScope)}}let oZ=/^sentry-/;function oB(e){return e.split(",").map(e=>{let t=e.indexOf("=");return -1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let oV=/^o(\d+)\./,oG=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function oJ(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function oK(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}let oW=!1;function oH(e){return"number"==typeof e?oq(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?oq(e.getTime()):ok()}function oq(e){return e>0x2540be3ff?e/1e3:e}function oY(e){if("function"==typeof e.getSpanJSON)return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status){let{attributes:r,startTime:o,name:i,endTime:a,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:oH(o),timestamp:oH(a)||void 0,status:function(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}
40(s),op:r["sentry.op"],origin:r["sentry.origin"],links:c&&c.length>0?c.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function oX(e){return e._sentryRootSpan||e}function oQ(){oW||(rA(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),oW=!0)}function o0(e){rN.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function o1(e,t){if(!t?.length||!e.description)return!1;for(let r of t){var n;if("string"==typeof(n=r)||n instanceof RegExp){if(oh(e.description,r))return rk&&o0(e),!0;continue}if(!r.name&&!r.op)continue;let t=!r.name||oh(e.description,r.name),o=!r.op||e.op&&oh(e.op,r.op);if(t&&o)return rk&&o0(e),!0}return!1}let o2="production";function o4(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||o2,release:n.release,public_key:r,trace_id:e,org_id:function(e){let t,n=e.getOptions(),{host:r}=e.getDsn()||{};return n.orgId?t=String(n.orgId):r&&(t=function(e){let t=e.match(oV);return t?.[1]}(r)),t}(t)};return t.emit("createDsc",o),o}function o3(e,t=100,r=1/0){try{return function e(t,r,o=1/0,i=1/0,a=function(){let e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){let[s,c]=a;if(null==r||["boolean","string"].includes(typeof r)||"number"==typeof r&&Number.isFinite(r))return r;let u=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(r8(t))return rU(t);if(r3(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${rj(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}(t,r);if(!u.startsWith("[object "))return u;if(r.__sentry_skip_normalization__)return r;let l="number"==typeof r.__sentry_override_normalization_depth__?r.__sentry_override_normalization_depth__:o;if(0===l)return u.replace("object ","");if(s(r))return"[Circular ~]";if(r&&"function"==typeof r.toJSON)try{return e("",r.toJSON(),l-1,i,a)}catch{}let p=Array.isArray(r)?[]:{},d=0,f=oa(r);for(let t in f){if(!Object.prototype.hasOwnProperty.call(f,t))continue;if(d>=i){p[t]="[MaxProperties ~]";break}let n=f[t];p[t]=e(t,n,l-1,i,a),d++}return c(r),p}("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function o9(e,t=[]){return[e,t]}function o6(e,t){for(let n of e[1])if(t(n,n[0].type))return!0;return!1}function o5(e){let t=rx(rS);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}let o8={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function o7(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ie(e){return new ir(t=>{t(e)})}function it(e){return new ir((t,n)=>{n(e)})}class ir{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new ir((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new ir((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;let e=this._handlers.slice();
40this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){let t=(e,t)=>{0===this._state&&(r6(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function io(e,t){let{extra:n,tags:r,attributes:o,user:i,contexts:a,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:p,attachments:d,propagationContext:f,transactionName:h,span:m}=t;ii(e,"extra",n),ii(e,"tags",r),ii(e,"attributes",o),ii(e,"user",i),ii(e,"contexts",a),e.sdkProcessingMetadata=oO(e.sdkProcessingMetadata,c,2),s&&(e.level=s),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),p.length&&(e.eventProcessors=[...e.eventProcessors,...p]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function ii(e,t,n){e[t]=oO(e[t],n,1)}function ia(e,t){let n=rR("globalScope",()=>new oC).getScopeData();return e&&io(n,e.getScopeData()),t&&io(n,t.getScopeData()),n}function is(e,t){return oL().captureEvent(e,t)}function ic(e){let t=o$(),{user:n}=ia(t,oL()),{userAgent:r}=rS.navigator||{},o=function(e){let t=ok(),n={sid:og(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return e&&oS(n,e),n}({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&oS(i,{status:"exited"}),iu(),t.setSession(o),o}function iu(){let e,t=o$(),n=oL().getSession()||t.getSession();n&&(e={},"ok"===n.status&&(e={status:"exited"}),oS(n,e)),il(),t.setSession()}function il(){let e=o$(),t=oj(),n=e.getSession();n&&t&&t.captureSession(n)}function ip(e=!1){e?iu():il()}let id=[];function ih(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function im(e,t,n){if(n[t.name])rk&&rN.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,id.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),id.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}rk&&rN.log(`Integration installed: ${t.name}`)}}function ig(e,t){let n=t??iy().get(e)??[];if(0===n.length)return;let r=e.getOptions(),o=function(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=oJ(r)),o9(o,[[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());iy().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function iy(){return rR("clientToLogBufferMap",()=>new WeakMap)}function iv(e,t){let n=t??i_().get(e)??[];if(0===n.length)return;let r=e.getOptions(),o=function(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=oJ(r)),o9(o,[[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());i_().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function i_(){return rR("clientToMetricBufferMap",()=>new WeakMap)}function ib(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}let iE=Symbol.for("SentryBufferFullError");function iw(e=100){let t=new Set;return{get $(){return Array.from(t)},add:function(n){if(!(t.size<e))return it(iE);let r=n();return t.add(r),r.then(()=>{t.delete(r)},()=>{t.delete(r)}),r},drain:function(e){if(!t.size)return ie(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);return e?Promise.race([n,new Promise(t=>ib(setTimeout(()=>t(!1),e)))]):n}}}function ik(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}let iS="Not capturing exception because it's already been captured.",iO="Discarded session because of missing or non-string release",iI=Symbol.for("SentryInternalError"),ix=Symbol.for("SentryDoNotSendEventError");function iR(e){return{message:e,[iI]:!0}}function iC(e){return{message:e,[ix]:!0}}function iT(e){return!!e&&"object"==typeof e&&iI in e}function iA(e){return!!e&&"object"==typeof e&&ix in e}function iP(e,t,n,r,o){let i,a=0,s=!1;e.on(n,()=>{a=0,clearTimeout(i),s=!1}),e.on(t,t=>{(a+=r(t))>=8e5?o(e):s||(s=!0,i=ib(setTimeout(()=>{o(e)},5e3)))}),e.on("flush",()=>{o(e)})}class iN{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=iw(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=function(e){let t="string"==typeof e?function(e){let t=oG.exec(e);if(!t)return void rA(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[n,r,o="",i="",a="",s=""]=t.slice(1),c="",u=s,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return oK({host:i,pass:o,path:c,projectId:u,port:a,protocol:n,publicKey:r})}(e):oK(e);if(t&&function(e){if(!rk)return!0;let{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(rN.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?"http"===r||"https"===r?t&&isNaN(parseInt(t,10))&&(rN.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(rN.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(rN.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):rk&&rN.warn("No DSN provided, client will not send events."),this._dsn){let t=function(e,t,n){return t||`${function(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${function(e,t){let n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&iP(this,"afterCaptureLog","flushLogs",ij,ig),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&iP(this,"afterCaptureMetric","flushMetrics",i$,iv)}captureException(e,t,n){let r=og();if(oE(e))return rk&&rN.log(iS),r;let o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){let o={event_id:og(),...n},i=r2(e)?e:String(e),a=r4(e),s=a?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(()=>s.then(e=>this._captureEvent(e,o,r)),a?"unknown":"error"),o.event_id}captureEvent(e,t,n){let r=og();if(t?.originalException&&oE(t.originalException))return rk&&rN.log(iS),r;let o={event_id:r,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,s=i.capturedSpanIsolationScope,c=iz(e.type);return this._process(()=>this._captureEvent(e,o,a||n,s),c),o.event_id}captureSession(e){this.sendSession(e),oS(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(!t)return!0;
40this.emit("flush");let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){ig(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];im(this,e,this._integrations),t||ih(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){let o=o7(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return;let n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);let a=function(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:oJ(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,o9(a,[[{type:i},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=function(e,t){let[n,r]=e;return[n,[...r,t]]}(n,function(e){let t="string"==typeof e.data?o5(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}(e));this.sendEnvelope(n).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){let{release:t,environment:n=o2}=this._options;if("aggregates"in e){let r=e.attrs||{};if(!r.release&&!t)return void(rk&&rN.warn(iO));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(rk&&rN.warn(iO));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);let r=function(e,t,n,r){let o=o7(n);return o9({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:oJ(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;rk&&rN.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return rk&&rN.error("Error while sending envelope:",e),{}}return rk&&rN.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&im(e,t,n)}),n}(this,e),ih(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1,o=t.exception?.values;if(o){for(let e of(r=!0,n=!1,o))if(!1===e.mechanism?.handled){n=!0;break}}let i="ok"===e.status;(i&&0===e.errors||i&&n)&&(oS(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){let o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i?.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),(function(e,t,n,r,o,i){let{normalizeDepth:l=3,normalizeMaxBreadth:p=1e3}=e,d={...t,event_id:t.event_id||n.event_id||og(),timestamp:t.timestamp||ow()},f=n.integrations||e.integrations.map(e=>e.name);!function(e,t){let{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||o2,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let a=e.request;a?.url&&i&&(a.url=od(a.url,i)),i&&e.exception?.values?.forEach(e
40=>{e.value&&(e.value=od(e.value,i))})}(d,e),f.length>0&&(d.sdk=d.sdk||{},d.sdk.integrations=[...d.sdk.integrations||[],...f]),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){let n=function(e){let t=rS._sentryDebugIds,n=rS._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(u&&r.length===s&&o.length===c)return u;s=r.length,c=o.length,u={},a||(a={});let i=(t,n)=>{for(let r of t){let t=n[r],o=a?.[r];if(o&&u&&t)u[o[0]]=t,a&&(a[r]=[o[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let o=n[e],i=o?.filename;if(i&&u&&a){u[i]=t,a[r]=[i,t];break}}}}};return t&&i(r,t),n&&i(o,n),u}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(d,e.stackParser);let h=function(e,t){if(!t)return e;let n=e?e.clone():new oC;return n.update(t),n}(r,n.captureContext);n.mechanism&&ob(d,n.mechanism);let m=o?o.getEventProcessors():[],g=ia(i,h),y=[...n.attachments||[],...g.attachments];y.length&&(n.attachments=y),function(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){let{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),a&&(e.level=a),s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:function(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:oY(e).parent_span_id,i=oF(e).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||oI():t,trace_id:n}}(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e){let t=oj();if(!t)return{};let n=oX(e),r=oY(n),o=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function s(e){return"number"!=typeof a&&"string"!=typeof a||(e.sample_rate=`${a}`),e}let c=n._frozenDsc;if(c)return s(c);let u=i?.get("sentry.dsc"),l=u&&function(e){let t=function(e){if(e&&(r1(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>(Object.entries(oB(t)).forEach(([t,n])=>{e[t]=n}),e),{}):oB(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(oZ)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}(u);if(l)return s(l);let p=o4(e.spanContext().traceId,t),d=o["sentry.source"],f=r.description;return"url"!==d&&f&&(p.transaction=f),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let e=oj()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}()&&(p.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=i?.get("sentry.sample_rand")??oF(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit("createDsc",p,n),p}(t),...e.sdkProcessingMetadata};let n=oY(oX(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],n&&(e.fingerprint=e.fingerprint.concat(n)),e.fingerprint.length||delete e.fingerprint,function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...i}}(d,g);let v=[...m,...g.eventProcessors];return(n.data&&!0===n.data.__sentry__?ie(d):function(e,t,n,r=0){try{let o=function e(t,n,r,o){let i=r[o];if(!t||!i)return t;let a=i({...t},n);return rk&&null===a&&rN.log(`Event processor "${i.id||"?"}" dropped event`),r6(a)?a.then(t=>e(t,n,r,o+1)):e(a,n,r,o+1)}(t,n,e,r);return r6(o)?o:ie(o)}catch(e){return it(e)}}(v,d,n)).then(e=>(e&&function(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof l&&l>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:o3(e.data,t,n)}}))},...e.user&&{user:o3(e.user,t,n)},...e.contexts&&{contexts:o3(e.contexts,t,n)},...e.extra&&{extra:o3(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=o3(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:o3(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=o3(e.contexts.flags,3,n)),r}(e,l,p):e))})(o,e,t,n,this,r).then(e=>
40(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...function(e){let{traceId:t,parentSpanId:n,propagationSpanId:r}=e.getPropagationContext(),o={trace_id:t,span_id:r||oI()};return n&&(o.parent_span_id=n),o}(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||o4(n.traceId,e)}(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=oL(),r=o$()){return rk&&iD(e)&&rN.log(`Captured error event \`${ik(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{rk&&(iA(e)?rN.log(e.message):iT(e)?rN.warn(e.message):rN.warn(e))})}_processEvent(e,t,n,r){let o=this.getOptions(),{sampleRate:i}=o,a=iL(e),s=iD(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i);if(s&&"number"==typeof u&&ol()>u)return this.recordDroppedEvent("sample_rate","error"),it(iC(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=iz(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),iC("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;var n=function(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a,ignoreSpans:s}=t,c=n;if(iD(c)&&o)return o(c,r);if(iL(c)){if(a||s){let t=function(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:a,op:s}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[oM],exclusive_time:a?.[oU],measurements:e.measurements,is_segment:!0}}(c);if(s?.length&&o1(t,s))return null;if(a){let e=a(t);e?c=oO(n,{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[oM]:e.profile_id},...e.exclusive_time&&{[oU]:e.exclusive_time}}}},measurements:e.measurements}):oQ()}if(c.spans){let t=[],n=c.spans;for(let e of n)if(s?.length&&o1(e,s)){let t=e.parent_span_id,r=e.span_id;if(t)for(let e of n)e.parent_span_id===r&&(e.parent_span_id=t)}else if(a){let n=a(e);n?t.push(n):(oQ(),t.push(e))}else t.push(e);let r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(i){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(c,r)}}return c}(this,o,e,t);let r=`${c} must return \`null\` or a valid event.`;if(r6(n))return n.then(e=>{if(!r3(e)&&null!==e)throw iR(r);return e},e=>{throw iR(`${c} rejected with ${e}`)});if(!r3(n)&&null!==n)throw iR(r);return n}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw iC(`${c} returned \`null\`, will not send event.`)}let i=n.getSession()||r.getSession();if(s&&i&&this._updateSessionFromEvent(i,o),a){let e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let u=o.transaction_info;return a&&u&&o.transaction!==e.transaction&&(o.transaction_info={...u,source:"custom"}),this.sendEvent(o,t),o}).then(null,e=>{if(iA(e)||iT(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),iR(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 41Reason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===iE&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){var e;rk&&rN.log("Flushing outcomes...");let t=this._clearOutcomes();if(0===t.length)return void(rk&&rN.log("No outcomes to send"));if(!this._dsn)return void(rk&&rN.log("No dsn provided, will not send outcomes"));rk&&rN.log("Sending outcomes:",t);let n=o9((e=this._options.tunnel&&oJ(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:ow(),discarded_events:t}]]);this.sendEnvelope(n)}}function iz(e){return"replay_event"===e?"replay":e||"error"}function iD(e){return void 0===e.type}function iL(e){return"transaction"===e.type}function i$(e){let t=0;return e.name&&(t+=2*e.name.length),(t+=8)+iM(e.attributes)}function ij(e){let t=0;return e.message&&(t+=2*e.message.length),t+iM(e.attributes)}function iM(e){if(!e)return 0;let t=0;
41return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*iU(e[0]):r4(e)?t+=iU(e):t+=100}),t}function iU(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:4*("boolean"==typeof e)}function iF(e){return rY(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function iZ(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function iB(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function iV(e,t){let n=oj(),r=o$();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=100}=n.getOptions();if(i<=0)return;let a={timestamp:ow(),...e},s=o?rA(()=>o(a,t)):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}let iG=new WeakMap,iJ=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/];function iK(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:iJ],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function iW(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return rk&&rN.error(`Cannot extract url for event ${ov(e)}`),null}}function iH(e){return Array.isArray(e.errors)}function iq(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...iH(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function iY(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function iX(){"console"in rS&&rC.forEach(function(e){e in rS.console&&on(rS.console,e,function(t){return rT[e]=t,function(...t){rG("console",{args:t,level:e});let n=rT[e];n?.apply(rS.console,t)}})})}function iQ(e,t){let n=rM(e),r=rM(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function i0(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function i1(e){return e.exception?.values?.[0]}function i2(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function i4(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function i3(e,t){return!!e&&"object"==typeof e&&!!e[t]}function i9(e){return"string"==typeof e?e:e?i3(e,"url")?e.url:e.toString?e.toString():"":""}let i6=0;function i5(e,t={}){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(oi(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>i5(e,t));return e.apply(this,r)}catch(e){throw i6++,setTimeout(()=>{i6--}),function(...e){let t=oD(rI());if(2===e.length){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{r.addEventProcessor(e=>(t.mechanism&&(o_(e,void 0),ob(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),oL().captureException(e,void 0)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}oo(n,e),or(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function i8(e,t){let n=ae(e,t),r={type:function(e){let t=e?.name;return!t&&an(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}(t),value:function(e){let t=e?.message;return an(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?iF(t.error):iF(e):"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function i7(e,t){return{exception:{values:[i8(e,t)]}}}function ae(e,t){let n=t.stacktrace||t.stack||"",r=t&&at.test(t.message)?1:0,o="number"==typeof t.framesToPop?t.framesToPop:0;try{return e(n,r,o)}catch{}return[]}let at=/Minified React error #\d+;/i;function an(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function ar(e,t,n,r,o){let i;if(rQ(t)&&t.error)return i7(e,t.error);if(r0(t)||rX(t,"DOMException")){if("stack"in t)i=i7(e,t);else{let o=t.name||(r0(t)?"DOMError":"DOMException"),a=t.message?`${o}: ${t.message}`:o;o_(i=ao(e,a,n,r),a)}return"code"in t&&(i.tags={...i.tags,"DOMException.code":`${t.code}`}),i}return rY(t)?i7(e,t):(r3(t)||r9(t)?ob(i=function(e,t,n,r){let o=oj(),i=o?.getOptions().normalizeDepth,a=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:function e(t,n=3,r=102400){let o=o3(t,n);return~-encodeURI(JSON.stringify(o)).split(/%..|./).length>r?e(t,n-1,r):o}(t,i)};if(a)return{exception:{values:[i8(e,a)]},extra:s};let c={exception:{values:[{type:r9(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=function(e){let t=Object.keys(oa(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return rQ(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:r9(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=ae(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),{synthetic:!0}):(o_(i=ao(e,t,n,r),`${t}`),ob(i,{synthetic:!0})),i)}function ao(e,t,n,r){let o={};if(r&&n){let r=ae(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),ob(o,{synthetic:!0})}
41if(r2(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}class ai extends iN{constructor(e){let t={release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:rS.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:rO})),o.version=rO)}(t,"browser",["browser"],rS.SENTRY_SDK_SOURCE||"npm"),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:o,_experiments:i,enableMetrics:a}=this._options,s=a??i?.enableMetrics??!0;rS.document&&(r||o||s)&&rS.document.addEventListener("visibilitychange",()=>{"hidden"===rS.document.visibilityState&&(r&&this._flushOutcomes(),o&&ig(this),s&&iv(this))}),n&&this.on("beforeSendSession",iB)}eventFromException(e,t){return function(e,t,n,r){let o=ar(e,t,n?.syntheticException||void 0,r);return ob(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),ie(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){let i=ao(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),ie(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}let aa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function as(){if(!rS.document)return;let e=rG.bind(null,"dom"),t=ac(e,!0);rS.document.addEventListener("click",t,!1),rS.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let n=rS[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(on(n,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){let r=ac(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch{}return t.call(this,n,r,o)}}),on(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function ac(e,t=!1){return n=>{var r;if(!n||n._sentryCaptured)return;let o=function(e){try{return e.target}catch{return null}}(n);if(r=n.type,"keypress"===r&&(!o?.tagName||"INPUT"!==o.tagName&&"TEXTAREA"!==o.tagName&&!o.isContentEditable))return;or(n,"_sentryCaptured",!0),o&&!o._sentryId&&or(o,"_sentryId",og());let i="keypress"===n.type?"input":n.type;!function(e){if(e.type!==d)return!1;try{if(!e.target||e.target._sentryId!==f)return!1}catch{}return!0}(n)&&(e({event:n,name:i,global:t}),d=n.type,f=o?o._sentryId:void 0),clearTimeout(p),p=rS.setTimeout(()=>{f=void 0,d=void 0},1e3)}}function au(e){let t="history";rB(t,e),rV(t,al)}function al(){function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=h,o=function(e){try{return new URL(e,rS.location.origin).toString()}catch{return e}}(String(n));if(h=o,r===o)return e.apply(this,t);rG("history",{from:r,to:o})}return e.apply(this,t)}}rS.addEventListener("popstate",()=>{let e=rS.location.href,t=h;h=e,t!==e&&rG("history",{from:t,to:e})}),"history"in rS&&rS.history&&(on(rS.history,"pushState",e),on(rS.history,"replaceState",e))}let ap={},ad="__sentry_xhr_v3__";function af(){if(!rS.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),o=1e3*ok(),i=r1(n[0])?n[0].toUpperCase():void 0,a=function(e){if(r1(e))return e;try{return e.toString()}catch{}}(n[1]);if(!i||!a)return e.apply(t,n);t[ad]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[ad];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}rG("xhr",{endTimestamp:1e3*ok(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,o]=n,i=t[ad];return i&&r1(r)&&r1(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[ad];return r&&(void 0!==n[0]&&(r.body=n[0]),rG("xhr",{startTimestamp:1e3*ok(),xhr:t})),e.apply(t,n)}})}function ah(e,t=function(e){let t=ap[e];if(t)return t;let n=rS[e];if(i4(n))return ap[e]=n.bind(rS);let r=rS.document;if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){aa&&rN.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?ap[e]=n.bind(rS):n}("fetch")){let n=0,r=0;return function(e,t,n=iw(e.bufferSize||64)){let r={};return{send:function(o){let i=[];if(o6(o,(t,n)=>{let o=o8[n];!function(e,t,n=op()){return(e[t]||e.all||0)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Promise.resolve({});let a=o9(o[0],i),s=t=>{var n;(n=["client_report"],o6(a,(e,t)=>n.includes(t)))?rk&&rN.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`):o6(a,(n,r)=>{e.recordDroppedEvent(t,o8[r])})};return n.add(()=>t({body:function(e){let[t,n]=e,r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[o5(r),e]:r.push("string"==typeof e?o5(e):e)}for(let e of n){let[t,n]=e;if(o(` 42${JSON.stringify(t)} 43`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(o3(n))}o(e)}}return"string"==typeof r?r:function(e){let t=new Uint8Array(e.reduce((e,t)=>
43e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(r)}(a)}).then(e=>(413===e.statusCode?(rk&&rN.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),s("send_error")):(rk&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&rN.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=op()){let o={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(let e of i.trim().split(",")){let[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(let e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=op()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(o.all=r+6e4);return o}(r,e)),e),e=>{throw s("network_error"),rk&&rN.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===iE)return rk&&rN.error("Skipped sending event because buffer is full."),s("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}(e,async function(o){let i=o.body.length;n+=i,r++;let a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,a);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw ap.fetch=void 0,e}finally{n-=i,r--}},iw(e.bufferSize||40))}let am="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ag(e,t,n,r){let o={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}let ay=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,av=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a_=/\((\S*)(?::(\d+))(?::(\d+))\)/,ab=/at (.+?) ?\(data:(.+?),/,aE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,aw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ak=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let o=[],i=e.split("\n");for(let e=n;e<i.length;e++){let n=i[e];n.length>1024&&(n=n.slice(0,1024));let a=rz.test(n)?n.replace(rz,"$1"):n;if(!a.match(/\S*Error: /)){for(let e of t){let t=e(a);if(t){o.push(t);break}}if(o.length>=50+r)break}}var a=o.slice(r);if(!a.length)return[];let s=Array.from(a);return/sentryWrapped/.test(rL(s).function||"")&&s.pop(),s.reverse(),rD.test(rL(s).function||"")&&(s.pop(),rD.test(rL(s).function||"")&&s.pop()),s.slice(0,50).map(e=>({...e,filename:e.filename||rL(s).filename,function:e.function||"?"}))}}([30,e=>{let t=e.match(ab);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=ay.exec(e);if(n){let[,e,t,r]=n;return ag(e,"?",+t,+r)}let r=av.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){let e=a_.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=aS(r[1]||"?",r[2]);return ag(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{let t=aE.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=aw.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=aS(n,e),ag(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),aS=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},aO=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];function aI(e){return function(...t){let n=t[0];return t[0]=i5(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${rj(e)}`}}),e.apply(this,t)}}function ax(e){return function(t){return e.apply(this,[i5(t,{mechanism:{data:{handler:rj(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function aR(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e
43=>{e in n&&"function"==typeof n[e]&&on(n,e,function(t){let n={mechanism:{data:{handler:rj(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=oi(t);return r&&(n.mechanism.data.handler=rj(r)),i5(t,n)})}),e.apply(this,t)}}function aC(e){am&&rN.log(`Global Handler attached: ${e}`)}function aT(){let e=oj();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}!function(e){e.ERROR="error",e.WARN="warning",e.INFO="info",e.DEBUG="debug"}(aW||(aW={}));var aA=new(function(){function e(e){this.level=e}return e.prototype.shouldLog=function(e){if("true"===new URLSearchParams(window.location.search).get("debug"))return!0;var t=[aW.ERROR,aW.WARN,aW.INFO,aW.DEBUG];return t.indexOf(e)<=t.indexOf(this.level)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aW.ERROR)&&console.error.apply(console,_(["[ERROR]:"],e,!1))},e.prototype.warning=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aW.WARN)&&console.warn.apply(console,_(["[WARN]:"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aW.INFO)&&console.info.apply(console,_(["[INFO]:"],e,!1))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aW.DEBUG)&&console.debug.apply(console,_(["[DEBUG]:"],e,!1))},e}())(localStorage.getItem("PAYONEER_CHECKOUT_WEB_LOG_LEVEL")||aW.ERROR),aP=function(){function e(){this.initialized=!1,this.scope=null}return e.getInstance=function(){return null!=e.instance||(e.instance=new e),e.instance},e.prototype.init=function(e){var t=this;if(!this.initialized){var n,r,o,i,a=window.location.search.includes("debugSentry");if(a&&aA.info("Sentry initialized in debug mode"),a||"sandbox"===e||"live"===e)try{let a;this.scope=(r=(n={environment:e,beforeSend:function(e){return t.filterSensitiveData(e)}}).environment,o=new ai({dsn:"https://[email protected]/4509808082681857",transport:ah,stackParser:ak,beforeSend:n.beforeSend,integrations:[((e={})=>({...((e={})=>{let t;return{name:"EventFilters",setup(n){t=iK(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=iK(e,o.getOptions())),!function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;let n=e.transaction;return!!n&&om(n,t)}(e,t.ignoreTransactions))return rk&&rN.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 44Event: ${ov(e)}`),!0}else{var n;if(n=t.ignoreErrors,n?.length&&ik(e).some(e=>om(e,n)))return rk&&rN.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 45Event: ${ov(e)}`),!0;if(e.exception?.values?.length&&!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))return rk&&rN.warn(`Event dropped due to not having an error message, error type or stacktrace. 46Event: ${ov(e)}`),!0;if(function(e,t){if(!t?.length)return!1;let n=iW(e);return!!n&&om(n,t)}(e,t.denyUrls))return rk&&rN.warn(`Event dropped due to being matched by \`denyUrls\` option. 47Event: ${ov(e)}. 48Url: ${iW(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;let n=iW(e);return!n||om(n,t)}(e,t.allowUrls))return rk&&rN.warn(`Event dropped due to not being matched by \`allowUrls\` option. 49Event: ${ov(e)}. 50Url: ${iW(e)}`),!0}return!1}(n,t)?n:null)}})(e),name:"InboundFilters"}))(),{name:"FunctionToString",setupOnce(){l=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=oi(this),n=iG.has(oj())&&void 0!==t?t:this;return l.apply(n,e)}}catch{}},setup(e){iG.set(e,!0)}},{name:"ConversationId",setup(e){e.on("spanStart",e=>{let t=oL().getScopeData(),n=o$().getScopeData(),r=t.conversationId||n.conversationId;r&&e.setAttribute("gen_ai.conversation.id",r)})}},((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&on(rS,"setTimeout",aI),t.setInterval&&on(rS,"setInterval",aI),t.requestAnimationFrame&&on(rS,"requestAnimationFrame",ax),t.XMLHttpRequest&&"XMLHttpRequest"in rS&&on(XMLHttpRequest.prototype,"send",aR);let e=t.eventTarget;
50e&&(Array.isArray(e)?e:aO).forEach(e=>(function(e,t){let n=rS[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(on(n,"addEventListener",function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=i5(o.handleEvent,{mechanism:{data:{handler:rj(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&this&&"object"==typeof this&&"removeEventListener"in this&&"function"==typeof this.removeEventListener&&this.removeEventListener(r,o),n.apply(this,[r,i5(o,{mechanism:{data:{handler:rj(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),on(n,"removeEventListener",function(e){return function(t,n,r){try{let o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))})(e,t))}}})(),((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){let t="console";rB(t,e),rV(t,iX)}(function(t){var n;if(oj()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(n=t.level)?"warning":["fatal","error","warning","log","info","debug"].includes(n)?n:"log",message:of(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${of(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}iV(r,{input:t.args,level:t.level})}),t.dom&&(n=t.dom,rB("dom",function(t){if(oj()!==e)return;let r,o,i="object"==typeof n?n.serializeAttribute:void 0,a="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;a&&a>1024&&(am&&rN.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=1024),"string"==typeof i&&(i=[i]);try{let e=t.event,n=e&&e.target?e.target:e;r=oe(n,{keyAttrs:i,maxStringLength:a}),o=function(e){if(!rS.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(n)}catch{r="<unknown>"}if(0===r.length)return;let s={category:`ui.${t.name}`,message:r};o&&(s.data={"ui.component_name":o}),iV(s,{event:t.event,name:t.name,global:t.global})}),rV("dom",as)),t.xhr&&(rB("xhr",function(t){if(oj()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ad];if(!n||!r||!o)return;let{method:i,url:a,status_code:s,body:c}=o,u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},l={category:"xhr",data:{method:i,url:a,status_code:s},type:"http",level:i2(s)};e.emit("beforeOutgoingRequestBreadcrumb",l,u),iV(l,u)}),rV("xhr",af)),t.fetch&&function(e,t){let n="fetch";rB(n,e),rV(n,()=>(function(e,t=!1){(!t||function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in rS))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(i4(rS.fetch))return!0;let e=!1,t=rS.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=i4(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){rk&&rN.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())&&on(rS,"fetch",function(e){return function(...t){let n=Error(),{method:r,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,n]=e;return{url:i9(t),method:i3(n,"method")?String(n.method).toUpperCase():r7(t)&&i3(t,"method")?String(t.method).toUpperCase():"GET"}}let t=e[0];return{url:i9(t),method:i3(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:r,url:o},startTimestamp:1e3*ok(),virtualError:n,headers:function(e){let[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(r7(t))return new Headers(t.headers)}catch{}}(t)};return rG("fetch",{...i}),e.apply(rS,t).then(async e=>(rG("fetch",{...i,endTimestamp:1e3*ok(),response:e}),e),e=>{rG("fetch",{...i,endTimestamp:1e3*ok(),error:e}),rY(e)&&void 0===e.stack&&(e.stack=n.stack,or(e,"framesToPop",1));let t=oj(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{let t=new URL(i.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:or(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})})(0,void 0))}(function(t){if(oj()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;
50if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){let o=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),iV(a,i)}else{let o=t.response,i={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size;let a={input:t.args,response:o,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,type:"http",level:i2(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",s,a),iV(s,a)}}),t.history&&au(function(t){if(oj()!==e)return;let n=t.from,r=t.to,o=iZ(rS.location.href),i=n?iZ(n):void 0,a=iZ(r);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),iV({category:"navigation",data:{from:n,to:r}})}),t.sentry&&e.on("beforeSendEvent",function(t){oj()===e&&iV({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ov(t)},{event:t})})}}})(),((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){let t="error";rB(t,t=>{let{stackParser:n,attachStacktrace:r}=aT();if(oj()!==e||i6>0)return;let{msg:o,url:i,line:a,column:s,error:c}=t,u=function(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],u=function(e){if(r1(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),a="";if(t&&-1!==i){let t=e.slice(i+1);a=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${a?`,${a}`:""}`}return e}(e,!1)}>`:e}(t)??ot();return 0===c.length&&c.push({colno:r,filename:u,function:"?",in_app:!0,lineno:n}),e}(ar(n,c||o,void 0,r,!1),i,a,s);u.level="error",is(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}),rV(t,rK)}(e),aC("onerror")),t.onunhandledrejection&&(!function(e){let t="unhandledrejection";rB(t,t=>{let{stackParser:n,attachStacktrace:r}=aT();if(oj()!==e||i6>0)return;let o=function(e){if(r4(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),i=r4(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:ar(n,o,void 0,r,!0);i.level="error",is(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}),rV(t,rH)}(e),aC("onunhandledrejection"))}}})(),((e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){!function(e,t,n,r,o,i){if(!o.exception?.values||!i||!r5(i.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=function e(t,n,r,o,i,a,s,c){if(a.length>=r+1)return a;let u=[...a];if(r5(o[i],Error)){iq(s,c,o);let a=t(n,o[i]),l=u.length;iY(a,i,l,c),u=e(t,n,r,o[i],i,[a,...u],a,l)}return iH(o)&&o.errors.forEach((a,l)=>{if(r5(a,Error)){iq(s,c,o);let p=t(n,a),d=u.length;iY(p,`errors[${l}]`,d,c),u=e(t,n,r,a,i,[p,...u],p,d)}}),u}(e,t,r,i.originalException,n,o.exception.values,a,0))}(i8,o.getOptions().stackParser,n,t,e,r)}}})(),{name:"Dedupe",processEvent(e){if(e.type)return e;try{var t;if((t=a)&&(function(e,t){let n=e.message,r=t.message;return(!!n||!!r)&&(!n||!!r)&&(!!n||!r)&&n===r&&!!i0(e,t)&&!!iQ(e,t)&&!0}(e,t)||function(e,t){let n=i1(t),r=i1(e);return!!n&&!!r&&n.type===r.type&&n.value===r.value&&!!i0(e,t)&&!!iQ(e,t)}(e,t)))return rk&&rN.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return a=e}},{name:"HttpContext",preprocessEvent(e){if(!rS.navigator&&!rS.location&&!rS.document)return;let t=function(){let e=ot(),{referrer:t}=rS.document||{},{userAgent:n}=rS.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}},{name:"CultureContext",preprocessEvent(e){let t=function(){try{let e=rS.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}},((e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===rS.document)return void(am&&rN.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));ic({ignoreDuration:!0}),ip();let e=o$(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();
50n?.id===t?.id&&n?.ip_address===t?.ip_address||(ip(),n=t)}),"route"===t&&au(({from:e,to:t})=>{e!==t&&(ic({ignoreDuration:!0}),ip())})}}})()].filter(function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)}),tracesSampleRate:.1,environment:r}),(i=new oC).setClient(o),o.init(),i),aA.info("Sentry initialized successfully"),this.initialized=!0}catch(e){aA.error("Failed to initialize Sentry:",e)}else aA.info("Sentry disabled for environment: ".concat(e,". Only enabled for 'sandbox' and 'live' environments."))}},e.prototype.captureError=function(e,t,n){var r,o,i;if(void 0===n&&(n="error"),this.initialized)try{t&&(null==(r=this.scope)||r.setContext("additional_data",t)),"string"==typeof e?null==(o=this.scope)||o.captureMessage(e,n):null==(i=this.scope)||i.captureException(e),aA.info("Error reported to Sentry")}catch(t){aA.error("Failed to report error to Sentry:",t),aA.error("Original error:",e)}},e.prototype.captureMessage=function(e,t,n){var r,o;if(this.initialized)try{n&&(null==(r=this.scope)||r.setContext("additional_data",n)),null==(o=this.scope)||o.captureMessage(e,null!=t?t:"info"),aA.info("Message reported to Sentry")}catch(e){aA.error("Failed to capture message in Sentry:",e)}},e.prototype.captureNetworkError=function(e,t,n,r){this.captureError(n,g({type:"network_error",url:e,status:t},r))},e.prototype.capturePaymentError=function(e,t,n){var r=t?this.sanitizeObject(t):void 0;this.captureError(e,g({type:"payment_error",paymentData:r},n))},e.prototype.captureConfigurationError=function(e,t,n){this.captureError(e,g({type:"configuration_error",configData:t},n))},e.prototype.captureComponentError=function(e,t,n,r){this.captureError(e,g({type:"component_error",component:t,operation:n},r))},e.prototype.setContext=function(e,t){var n;if(this.initialized)try{var r=this.sanitizeObject(t);null==(n=this.scope)||n.setContext(e,r),aA.debug("Context '".concat(e,"' set in Sentry"))}catch(t){aA.error("Failed to set context '".concat(e,"' in Sentry:"),t)}},e.prototype.setUser=function(e){var t;if(this.initialized)try{null==(t=this.scope)||t.setUser(e),aA.debug("User information set in Sentry")}catch(e){aA.error("Failed to set user information in Sentry:",e)}},e.prototype.addBreadcrumb=function(e){var t;if(this.initialized)try{var n=g(g({},e),{data:e.data?this.sanitizeObject(e.data):void 0});null==(t=this.scope)||t.addBreadcrumb(n),aA.debug("Breadcrumb added to Sentry")}catch(e){aA.error("Failed to add breadcrumb to Sentry:",e)}},e.prototype.isInitialized=function(){return this.initialized},e.prototype.filterSensitiveData=function(e){var t,n,r,o,i=g({},e);if(null==(t=i.extra)?void 0:t.paymentData)for(var a=0,s=["cardNumber","cvv","cvc","securityCode","pan"];a<s.length;a++){var c=s[a];(null==(r=null==(n=i.extra)?void 0:n.paymentData)?void 0:r[c])&&delete i.extra.paymentData[c]}if(null==(o=i.request)?void 0:o.data){var u="string"==typeof i.request.data?JSON.parse(i.request.data):i.request.data;if(u&&"object"==typeof u){var l=this.sanitizeObject(u);i.request.data=JSON.stringify(l)}}return i},e.prototype.sanitizeObject=function(e){if(!e||"object"!=typeof e)return e;for(var t=g({},e),n=["cardNumber","cvv","cvc","securityCode","pan","password","token"],r=this,o=0,i=Object.keys(t);o<i.length;o++)!function(e){var o=e.toLowerCase();n.some(function(e){return o.includes(e)})?t[e]="[REDACTED]":"object"==typeof t[e]&&null!==t[e]&&(t[e]=r.sanitizeObject(t[e]))}(i[o]);return t},e}(),aN=(function(){function e(){this.sentryReporter=aP.getInstance()}return e.getInstance=function(){return null!=e.instance||(e.instance=new e),e.instance},e.prototype.init=function(e,t){e.enabled&&(this.sentryReporter.init(t),e.globalContext&&this.sentryReporter.isInitialized()&&this.sentryReporter.setContext("global",e.globalContext))},e.prototype.captureError=function(e,t){this.sentryReporter.captureError(e,t)},e.prototype.captureMessage=function(e,t,n){this.sentryReporter.captureMessage(e,null!=t?t:"info",n)},e.prototype.captureNetworkError=function(e,t,n,r){this.sentryReporter.captureNetworkError(e,t,n,r)},e.prototype.capturePaymentError=function(e,t,n){this.sentryReporter.capturePaymentError(e,t,n)},e.prototype.captureComponentError=function(e,t,n,r){this.sentryReporter.captureComponentError(e,t,n,r)},e.prototype.setContext=function(e,t){this.sentryReporter.setContext(e,t)},e.prototype.setUser=function(e){this.sentryReporter.setUser(e)},e.prototype.addBreadcrumb=function(e){this.sentryReporter.addBreadcrumb(e)},e.prototype.isInitialized=function(){return this.sentryReporter.isInitialized()},e})().getInstance(),az=function(e){function t(t,n,r){var o=e.call(this,"HTTP ".concat(t,": ").concat(n))||this;return o.status=t,o.body=r,o.name="HttpError",o}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.isHttpError=function(e){return"object"==typeof e&&null!==e&&"status"in e&&"body"in e},t}(Error);function aD(e){return y(this,void 0,void 0,function(){var t,n,r,o,i,a,s,c,u,l;return v(this,function(p){switch(p.label){case 0:t=Date.now(),p.label=1;case 1:return p.trys.push([1,6,,7]),[4,fetch(e)];case 2:return n=p.sent(),s=Date.now()-t,n.ok?[3,4]:[4,n.json().catch(function(){return null})];case 3:throw r=p.sent(),o=new az(n.status,n.statusText,r),404!==n.status&&aN.captureNetworkError(e,n.status,o,{responseHeaders:Object.fromEntries(n.headers.entries()),duration:s,method:"GET"}),o;case 4:return[4,n.json()];case 5:return i=p.sent(),s>5e3&&aN.captureMessage("Slow API response detected: ".concat(e),"warning",{duration:s,url:e,method:"GET"}),[2,i];case 6:if(a=p.sent(),s=Date.now()-t,az.isHttpError(a))throw a;if(a instanceof TypeError&&a.message.includes("fetch"))throw c=Error("Network request failed: ".concat(a.message)),aN.captureNetworkError(e,void 0,c,{originalError:a.message,duration:s,method:"GET",errorType:"network_failure"}),c;if(a instanceof SyntaxError)throw u=Error("JSON parsing failed for response from ".concat(e)),aN.captureNetworkError(e,void 0,u,{originalError:a.message,duration:s,method:"GET",errorType:"json_parse_error"}),u;if(!(a instanceof Error))throw l=Error("Unknown error during API request to ".concat(e)),aN.captureNetworkError(e,void 0,l,{originalError:String(a),duration:s,method:"GET",errorType:"unknown"}),l;throw a;case 7:return[2]}})})}function aL(e,t,n){void 0===n&&(n=[]);var r=n[0]&&(null==t?void 0:t.providerPrefix[n[0]])?null==t?void 0:t.providerPrefix[n[0]]:"";return r?"".concat(r).concat(e):e}function a$(e,t){var n,r=e.supportedComponents;if(!r)return null;for(var o=0;o<r.length;o++){var i=r[o];if(null==(n=Object.keys(e[i].supportedMethods))?void 0:n.includes(t))return i}return null}function aj(e,t,n){var r=n.formatMethodPathName,o=n.logoTemplate,i=null==e?void 0:e.getLogoUrl(o.replace("<%NETWORK_CODE%>",t));return r?"lowercase"===r?i.toLowerCase():"uppercase"===r?i.toUpperCase():i:i}function aM(e,t,n,r){var o,i,a;if(void 0===r&&(r={}),!(null==(i=null==(o=null==e?void 0:e.networks)?void 0:o.applicable)?void 0:i.length))return[];
50for(var s=e.networks.applicable||[],c=[],u=!!r.supportsGooglePay,l=0;l<s.length;l++){var p=s[l],d=p.code,f=n[a$(n,aL(Object.keys(b).includes(p.grouping)?b[p.grouping]:p.code.toLowerCase(),n,null!=(a=p.providers)?a:[]))];if("CREDIT_CARD"===p.grouping||"DEBIT_CARD"===p.grouping)(h=c.find(function(e){return"cards"===e.name}))||(h=function(e,t,n,r,o){var i;return{name:"cards",label:(null==(i=window.Payoneer)?void 0:i.getCardsMethodLabel)?window.Payoneer.getCardsMethodLabel(n,t.labels,t.labels[r],o):t.labels[r],defaultLogoUrl:(null==t?void 0:t.hasDefaultLogo)?aj(e,"cards",t):"",networkInformation:[],walletInformation:function(e,t,n,r){if(!(null==(o=e.wallets)?void 0:o.length))return[];var o,i,a,s=null==(a=null==(i=window.Payoneer)?void 0:i.getAvailableWallets)?void 0:a.call(i,e,r);return s?s.map(function(e){return{wallet:e,logoUrl:aj(t,e,n)}}):[]}(n,e,t,o)}}(t,f,e,d,u),c.push(h)),h.networkInformation.push({network:d,method:d,logoUrl:aj(t,d,f)});else{var h={name:d.toLocaleLowerCase(),label:f.labels[d],defaultLogoUrl:(null==f?void 0:f.hasDefaultLogo)?aj(t,d,f):"",networkInformation:[{network:d,method:d,logoUrl:aj(t,d,f)}]};c.push(h)}}return c}function aU(e,t){for(var n=new Set,r=0,o=Array.from(e);r<o.length;r++){var i=o[r];t.has(i)||n.add(i)}return n}function aF(e){return/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e)}function aZ(e){return"object"==typeof e&&null!==e&&e.constructor===Object}
50function aB(e,t,n){aA[t](e),aN.addBreadcrumb({message:e,level:t,data:n})}!function(e){e.DEFERRED="DEFERRED",e.NON_DEFERRED="NON_DEFERRED"}(aH||(aH={})),function(e){e.BANK_TRANSFER="BANK_TRANSFER",e.BILLING_PROVIDER="BILLING_PROVIDER",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CHECK_PAYMENT="CHECK_PAYMENT",e.CREDIT_CARD="CREDIT_CARD",e.DEBIT_CARD="DEBIT_CARD",e.DIRECT_DEBIT="DIRECT_DEBIT",e.ELECTRONIC_INVOICE="ELECTRONIC_INVOICE",e.GIFT_CARD="GIFT_CARD",e.MOBILE_PAYMENT="MOBILE_PAYMENT",e.ONLINE_BANK_TRANSFER="ONLINE_BANK_TRANSFER",e.OPEN_INVOICE="OPEN_INVOICE",e.PREPAID_CARD="PREPAID_CARD",e.TERMINAL="TERMINAL",e.WALLET="WALLET"}(aq||(aq={})),function(e){e.DISPLAY_NATIVE="DISPLAY_NATIVE",e.PURE_NATIVE="PURE_NATIVE",e.HOSTED="HOSTED",e.SELECTIVE_NATIVE="SELECTIVE_NATIVE",e.MOBILE_NATIVE="MOBILE_NATIVE"}(aY||(aY={})),function(e){e.RISK_DECISION_PROVIDER="RISK_DECISION_PROVIDER",e.RISK_DATA_PROVIDER="RISK_DATA_PROVIDER"}(aX||(aX={})),function(e){e.PAYMENT_SERVICE_PROVIDER="PAYMENT_SERVICE_PROVIDER",e.RISK_DECISION_PROVIDER="RISK_DECISION_PROVIDER",e.RISK_DATA_PROVIDER="RISK_DATA_PROVIDER"}(aQ||(aQ={})),function(e){e.String="string",e.Numeric="numeric",e.Integer="integer",e.Select="select",e.Checkbox="checkbox"}(a0||(a0={})),function(e){e.CHARGE="CHARGE",e.PRESET="PRESET",e.PAYOUT="PAYOUT",e.UPDATE="UPDATE",e.SAVE="SAVE",e.TOKENIZE="TOKENIZE",e.ACTIVATION="ACTIVATION"}(a1||(a1={})),function(e){e.CHARGE="CHARGE",e.PRESET="PRESET",e.PAYOUT="PAYOUT",e.UPDATE="UPDATE",e.SAVE="SAVE",e.TOKENIZE="TOKENIZE"}(a2||(a2={})),function(e){e.UNSCHEDULED="UNSCHEDULED",e.SCHEDULED="SCHEDULED"}(a4||(a4={}));var aV=new Set(Object.values(a2));function aG(e,t,n){if(void 0===n&&(n=a2.CHARGE),void 0!==e)return e;if(null!==t&&"object"==typeof t&&"operationType"in t){var r=t.operationType;if("string"==typeof r&&aV.has(r))return r}return n}function aJ(e){return function(t,n){return e({componentName:t,data:n,operationType:aG(void 0,n)})}}function aK(e,t){return function(n,r){return e({componentName:n,data:r,severity:t,operationType:aG(void 0,r)})}}var aW,aH,aq,aY,aX,aQ,a0,a1,a2,a4,a3,a9,a6,a5=[{generic:"onBeforeSubmit",legacy:"onBeforeCharge",genericToLegacy:function(e){return aJ(e)},legacyToGeneric:function(e){return function(t){var n=t.componentName,r=t.data;return t.operationType,e(n,r)}}},{generic:"onSubmitSuccess",legacy:"onPaymentSuccess",genericToLegacy:function(e){return aJ(e)},legacyToGeneric:function(e){return function(t){var n=t.componentName,r=t.data;return t.operationType,e(n,r)}}}],a8=function(){function e(e,t,n,r){this.config={},this.isRiskDataPassed=!1,this.componentReadyListenerAttached=!1,this.component=e,t&&(this.data=t),n&&(this.internalEvents=n),r&&(this.publicEvents=r),this.createElementIfNotExists()}return e.prototype.mount=function(e){if(!e){var t=Error("Pass the DOM element to render ".concat(this.component.name," inside"));throw aN.captureComponentError(t,this.component.name,"mount",{nodeProvided:!1,network:this.component.network}),t}try{return this.attachTo(e).addCBx(this.config).updateListData(this.data),this.emitEvent(w.COMPONENT.MOUNT,{componentName:"".concat(this.component.name,"::").concat(this.component.network)}),this}catch(t){throw aN.captureComponentError(t instanceof Error?t:Error("Component mount failed"),this.component.name,"mount",{network:this.component.network,hasData:!!this.data,hasConfig:!!this.config,nodeTag:e.tagName,nodeId:e.id}),t}},e.prototype.updateNode=function(e){if(!this.isComponentDefined()){var t=Error("".concat(this.component.name,"::").concat(this.component.network,": Undefined component"));throw aN.captureComponentError(t,this.component.name,"updateNode",{network:this.component.network,componentDefined:!1}),t}try{return aA.info("".concat(this.component.name,"::").concat(this.component.network,": Passing configs"),e),this.parent?this.attachTo(this.parent).addCBx(e):aB("".concat(this.component.name,"::").concat(this.component.network,": Parent does not exists or maybe not yet mounted"),aW.WARN),this}catch(t){throw aN.captureComponentError(t instanceof Error?t:Error("Component update failed"),this.component.name,"updateNode",{network:this.component.network,hasParent:!!this.parent,configKeys:Object.keys(e||{})}),t}},e.prototype.update=function(e,t){return this.data=t,this.config=e,aA.info("".concat(this.component.name,"::").concat(this.component.network,": Updating data and configs")),this.updateNode(e).updateListData(this.data),this},e.prototype.updateListData=function(e){var t;return this.isComponentDefined()&&(null==(t=this.element)?void 0:t.setListData)?(aA.info("".concat(this.component.name,"::").concat(this.component.network,": Setting list data")),this.element.setListData(e)):aA.info("".concat(this.component.name,"::").concat(this.component.network,": Error setting list data"),{setListDataProvider:!!this.element.setListData,isComponentDefined:this.isComponentDefined()}),this.data=e,this},e.prototype.unmount=function(){var e,t;return(null==(e=this.element)?void 0:e.removeComponent)&&(null==(t=this.element)||t.removeComponent(),this.emitEvent(w.COMPONENT.UNMOUNT,{componentName:"".concat(this.component.name,"::").concat(this.component.network)})),this.isRiskDataPassed=!1,this.componentReadyListenerAttached=!1,this},e.prototype.pay=function(){return y(this,void 0,void 0,function(){var e,t,n;return v(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),(null==(t=this.element)?void 0:t.pay)?[4,this.element.pay()]:[3,2];case 1:return[2,r.sent()];case 2:case 4:return[2];case 3:throw e=r.sent(),aN.capturePaymentError(e instanceof Error?e:Error("Payment execution failed"),{paymentMethod:this.component.method,network:this.component.network,componentName:this.component.name},{operation:"pay",elementExists:!!this.element,payMethodExists:!!(null==(n=this.element)?void 0:n.pay)}),e}})})},e.prototype.submit=function(){return y(this,void 0,void 0,function(){var e,t;return v(this,function(n){switch(n.label){case 0:return[4,this.pay()];case 1:return void 0===(e=n.sent())?[2,void 0]:(t=aG(void 0,this.data),[2,g(g({},e),{operationType:t})])}})})},e.prototype.isMounted=function(){return this.parent&&this.element&&this.parent.firstChild===this.element},e.prototype.attachTo=function(e){this.parent=e;try{if(this.isMounted())return aA.info("".concat(this.component.name," is already mounted:, skipping re-mount")),this;e.innerHTML="",e.append(this.element);var t=e.id?"".concat(e.tagName,"#").concat(e.id):e.tagName;return aA.info("".concat(this.component.name,"::").concat(this.component.network,": Mounting to ").concat(t)),this}catch(t){throw aN.captureComponentError(t instanceof Error?t:Error("DOM attachment failed"),this.component.name,"attachTo",{network:this.component.network,nodeTag:e.tagName,nodeId:e.id,elementExists:!!this.element,wasAlreadyMounted:this.isMounted()}),t}},e.prototype.isComponentDefined=function(){return!!customElements.get(this.component.name)},e.prototype.createElementIfNotExists=function(){if(this.element)return aA.info("".concat(this.component.name,": Skipping creation. Element already exists"),this.element),this;try{var e=document.createElement(this.component.name);return e.id="".concat(this.component.name,"-component"),this.component.network&&(null==e||e.setAttribute("network",this.component.network)),this.component.method&&(null==e||e.setAttribute("method",this.component.method)),this.element=e,this.setupCheckoutEventListener(),aA.info("".concat(this.component.name,"::").concat(this.component.network,": element created"),this.element),this}catch(e){throw aN.captureComponentError(e instanceof Error?e:Error("Element creation failed"),this.component.name,"createElementIfNotExists",{network:this.component.network,method:this.component.method,customElementsDefined:!!customElements.get(this.component.name)}),e}},e.prototype.addCBx=function(e){return aA.info("".concat(this.component.name,"::").concat(this.component.network,": Passing configs and callbacks"),{config:e}),this.config=g(g({},this.config),e),this.setupComponentReadyListener(),this.bindCallbacks(e),this.applyComponentSettings(),this.applyButtonStyles(),this.applyRefetchSettings(e),this}
50,e.prototype.resolveCallbackPair=function(e){var t=e.newCb,n=e.legacyCb,r=e.adaptNew,o=e.adaptLegacy,i=e.defaultCanonical;return"function"==typeof t?r(t):"function"==typeof n?o(n):i},e.prototype.bindCallbacks=function(t){for(var n,r=0;r<a5.length;r++){var o=a5[r];this.bindCallbackPair(t,o)}this.bindUnifiedFailureCallbacks(t);for(var i=this,a=0,s=e.STANDALONE_CALLBACK_KEYS;a<s.length;a++)!function(e){var r=null==t?void 0:t[e],o=null==(n=i.element)?void 0:n[e];r&&"function"==typeof o&&o(r)}(s[a])},e.prototype.bindCallbackPair=function(t,n){var r,o,i=n.generic,a=n.legacy,s=n.genericToLegacy,c=n.legacyToGeneric,u=null==t?void 0:t[i],l=null==t?void 0:t[a];u&&l&&aA.warning('DropIn -> both "'.concat(String(i),'" and "').concat(String(a),'" provided; "').concat(String(a),'" will be ignored'));var p,d="function"==typeof u,f=d?u:void 0;if(p=d?void 0:"function"==typeof l?l:void 0,void 0!==f||void 0!==p){var h=this.resolveCallbackPair({newCb:f,legacyCb:p,adaptNew:s,adaptLegacy:function(e){return e},defaultCanonical:void 0}),m=this.resolveCallbackPair({newCb:f,legacyCb:p,adaptNew:function(e){return e},adaptLegacy:c,defaultCanonical:void 0});e.applyResolvedCallbackPair({useGenericCallback:d,genericSetter:null==(r=this.element)?void 0:r[i],legacySetter:null==(o=this.element)?void 0:o[a],genericShaped:m,legacyShaped:h})}},e.applyResolvedCallbackPair=function(e){var t=e.useGenericCallback,n=e.genericSetter,r=e.legacySetter,o=e.genericShaped,i=e.legacyShaped;t?"function"==typeof n&&void 0!==o?n(o):"function"==typeof r&&void 0!==i&&r(i):"function"==typeof r&&void 0!==i?r(i):"function"==typeof n&&void 0!==o&&n(o)},e.prototype.bindUnifiedFailureCallbacks=function(e){var t,n,r,o,i,a,s=null==e?void 0:e.onSubmitError,c=null==e?void 0:e.onPaymentFailure,u=null==e?void 0:e.onPaymentDeclined,l="function"==typeof s,p="function"==typeof c,d="function"==typeof u;if(l&&(p||d)&&aA.warning('DropIn -> "onSubmitError" and legacy onPaymentFailure/onPaymentDeclined provided; legacy handlers will be ignored'),l?o=s:(p||d)&&(i=p?c:void 0,a=d?u:void 0,o=function(e){var t=e.componentName,n=e.data,r=e.severity;return e.operationType,"recoverable_decline"===r?!a||a(t,n):!i||i(t,n)}),void 0!==o){var f=null==(t=this.element)?void 0:t.onSubmitError,h=null==(n=this.element)?void 0:n.onPaymentFailure,m=null==(r=this.element)?void 0:r.onPaymentDeclined;"function"!=typeof f?("function"==typeof h&&h(aK(o,"terminal_failure")),"function"==typeof m&&m(aK(o,"recoverable_decline"))):f(o)}},e.prototype.applyComponentSettings=function(){var e;this.applyHidePaymentButton(),(null==(e=this.element)?void 0:e.useLocalRiskLib)&&this.element.useLocalRiskLib(!1)},e.prototype.applyHidePaymentButton=function(){if(this.component&&this.element){var e,t,n=(e=this.component.hideSubmitButton,t=this.component.hidePaymentButton,"boolean"==typeof e?e:"boolean"==typeof t?t:void 0);void 0!==n&&(this.element.dataset.hideSubmitButton=String(n),this.element.dataset.hidePaymentButton=String(n),aA.info("".concat(this.component.name,"::").concat(this.component.network,': Setting data-hide-submit-button / data-hide-payment-button="').concat(n,'"')),"function"==typeof this.element.hideSubmitButton?(this.element.hideSubmitButton(n),aA.info("".concat(this.component.name,"::").concat(this.component.network,": hideSubmitButton method called directly"))):"function"==typeof this.element.hidePaymentButton&&(this.element.hidePaymentButton(n),aA.info("".concat(this.component.name,"::").concat(this.component.network,": hidePaymentButton method called directly"))))}},e.prototype.setupComponentReadyListener=function(){var e=this;this.element&&!this.componentReadyListenerAttached&&(this.componentReadyListenerAttached=!0,this.element.addEventListener("payoneer:component:ready",function(){aA.info("".concat(e.component.name,"::").concat(e.component.network,": Component ready event received, re-applying all settings")),e.bindCallbacks(e.config),e.a
50pplyComponentSettings(),e.applyButtonStyles(),e.applyRefetchSettings(e.config)},{once:!0}),this.element.addEventListener("payoneer:payment:ready",function(){var t,n;aA.info("".concat(e.component.name,"::").concat(e.component.network,": Payment ready event received")),(null==(t=e.config)?void 0:t.onReady)&&(null==(n=e.element)?void 0:n.onReady)&&e.element.onReady(e.config.onReady)},{once:!0}))},e.prototype.applyButtonStyles=function(){var e,t,n,r,o,i,a,s=(null==(e=this.data)?void 0:e.integrationType)===aY.HOSTED,c=(null==(t=this.component)?void 0:t.primaryColor)&&(null==(n=this.component)?void 0:n.primaryTextColor);if(s||c){var u=null!=(r=this.component.primaryColor)?r:null==(i=null==(o=this.data)?void 0:o.style)?void 0:i.primaryColor,l=this.component.primaryColor?this.component.primaryTextColor:aF(u)?!function(e){if(!aF(e))return!1;var t,n,r,o,i=(3===(o=e.slice(1)).length?(t=Number.parseInt(o[0]+o[0],16),n=Number.parseInt(o[1]+o[1],16),r=Number.parseInt(o[2]+o[2],16)):(t=Number.parseInt(o.slice(0,2),16),n=Number.parseInt(o.slice(2,4),16),r=Number.parseInt(o.slice(4,6),16)),{red:t,green:n,blue:r});return .299*i.red+.587*i.green+.114*i.blue>133}(u)?"#FFFFFF":"#252526":null;"function"==typeof(null==(a=this.element)?void 0:a.setStyles)&&u&&l&&this.element.setStyles({primaryColor:u,primaryTextColor:l})}},e.prototype.applyRefetchSettings=function(e){var t,n;(null==(t=this.component)?void 0:t.refetchList)&&this.element.refetchList&&this.element.refetchList(this.component.refetchList),void 0!==(null==e?void 0:e.refetchListBeforeCharge)&&(null==(n=this.element)?void 0:n.setRefetchListBeforeCharge)&&this.element.setRefetchListBeforeCharge(e.refetchListBeforeCharge)},e.prototype.emitEvent=function(e,t){this.internalEvents&&this.internalEvents.emit(e,t)},e.prototype.setupCheckoutEventListener=function(){var e=this;this.element&&this.element.addEventListener("payoneer-checkout-event",function(t){var n=t.detail;(null==n?void 0:n.event)&&(e.reportCheckoutEventToSentry(n.event,n.data),e.emitPublicEvent(n.event,n.data))})},e.prototype.reportCheckoutEventToSentry=function(e,t){var n,r,o=null!=t?t:{};switch(e){case"payment:failed":case"payment:3ds:failed":case"payment:declined":case"payment:cancelled":case"update:failed":case"update:3ds:failed":case"update:declined":case"update:cancelled":aN.addBreadcrumb({message:e,category:e.includes("payment")?"payment":"update",level:"warning",data:{networkCode:o.networkCode,interactionCode:null==(n=o.interaction)?void 0:n.code,interactionReason:null==(r=o.interaction)?void 0:r.reason,resultInfo:o.resultInfo,error:o.error,reason:o.reason}});break;case"error:charge-network":case"error:update-network":this.reportNetworkError(o,e);break;case"error:3ds-unexpected":this.report3dsUnexpectedError(o);break;case"error:component-init":this.reportComponentInitError(o);break;case"charge:started":case"charge:completed":case"update:started":case"update:completed":case"form:submitted":case"payment:success":case"payment:3ds:started":case"payment:3ds:completed":case"update:success":case"update:3ds:started":case"update:3ds:completed":case"redirect:provider":aN.addBreadcrumb({message:e,category:"checkout-event",level:"info",data:o})}},e.prototype.reportNetworkError=function(e,t){var n,r,o=t.includes("charge"),i=e.errorType,a=null==(n=e.interaction)?void 0:n.reason;"LIST_REFETCH_FAILED"!==a?aN.capturePaymentError(Error("".concat(o?"Charge":"Update"," network error: ").concat(i)),{networkCode:e.networkCode,errorType:i,httpStatus:e.httpStatus,interactionCode:null==(r=e.interaction)?void 0:r.code,interactionReason:a},{source:"checkout-event",event:o?"error:charge-network":"error:update-network"}):aN.addBreadcrumb({message:"List re-fetch failed during ".concat(o?"charge":"update"),category:o?"payment":"update",level:"warning",data:{networkCode:e.networkCode,errorType:i}})},e.prototype.report3dsUnexpectedError=function(e){var t=e.errorType;"requires_payment_method"!==t?aN.capturePaymentError(Error("3DS unexpected error: ".concat(t)),{networkCode:e.networkCode,errorType:t,errorMessage:e.errorMessage},{source:"checkout-event",event:"error:3ds-unexpected"}):aN.addBreadcrumb({message:"3DS resulted in requires_payment_method",category:"payment",level:"warning",data:{networkCode:e.networkCode,errorMessage:e.errorMessage}})},e.prototype.reportComponentInitError=function(e){var t=e.errorType;"stripe_not_loaded"!==t?aN.captureComponentError(Error("Component init error: ".concat(t)),this.component.name,"init",{source:"checkout-event",event:"error:component-init",errorType:t,errorMessage:e.errorMessage}):aN.addBreadcrumb({message:"Stripe SDK not available after script load",category:"component",level:"warning",data:{errorMessage:e.errorMessage}})},e.prototype.emitPublicEvent=function(e,t){if(this.publicEvents)try{this.publicEvents.emit(e,t)}catch(e){}},e.STANDALONE_CALLBACK_KEYS=["onBeforeError","onValidationInfo","onBeforeProviderRedirect","onReady"],e}(),a7=function(){function e(){this.scriptCache=new Set,this.callbacks={},this.loadingPromises={}}return e.prototype.loadScript=function(t,n,r,o){var i=this;if(void 0===o&&(o=e.DEFAULT_SCRIPT_TIMEOUT_MS),window.customElements.get(n)||this.scriptCache.has(t))return Promise.resolve();if(n in this.loadingPromises)return this.loadingPromises[n];var a=o>0?o:e.DEFAULT_SCRIPT_TIMEOUT_MS,s=new Promise(function(e,o){var s=document.createElement("script");s.src=t;var c=Date.now(),u=!1;r&&(s.integrity=r,s.crossOrigin="anonymous");var l=setTimeout(function(){if(!u){u=!0,delete i.loadingPromises[n];
50try{s.onload=null,s.onerror=null,s.remove()}catch(e){}delete i.callbacks[n];var e=Error("Script load timed out after ".concat(a,"ms: ").concat(t));aN.captureError(e,{type:"script_timeout_error",url:t,componentName:n,hasIntegrity:!!r,timeoutMs:a,operation:"script_load"}),o(e)}},a);s.onload=function(){if(!u){u=!0,clearTimeout(l);var o=Date.now()-c;i.scriptCache.add(t),delete i.loadingPromises[n],o>1e4&&aN.captureMessage("Slow script loading detected: ".concat(n),"warning",{url:t,componentName:n,loadTime:o,hasIntegrity:!!r,operation:"script_load"}),i.callbacks[n]&&(i.callbacks[n].forEach(function(e){return e()}),delete i.callbacks[n]),e()}},s.onerror=function(e){if(!u){u=!0,clearTimeout(l);var a=Date.now()-c;delete i.loadingPromises[n],delete i.callbacks[n];var s=Error("Failed to load script ".concat(t));aN.captureError(s,{type:"script_loading_error",url:t,componentName:n,hasIntegrity:!!r,loadTime:a,errorEvent:e instanceof ErrorEvent?e.message:"Unknown script error",operation:"script_load"}),o(s)}};try{document.head.appendChild(s)}catch(e){if(u)return;u=!0,clearTimeout(l);var p=e instanceof Error?e:Error("DOM manipulation failed during script loading");aN.captureError(p,{type:"script_dom_error",url:t,componentName:n,hasIntegrity:!!r,operation:"script_append"}),o(p)}});return this.loadingPromises[n]=s,s},e.prototype.loadScriptChain=function(e,t,n){return y(this,void 0,void 0,function(){var r,o,i,a,s,c,u,l,p,d,f,h,m,g;return v(this,function(y){switch(y.label){case 0:r=Array.isArray(e)?e:[e],y.label=1;case 1:y.trys.push([1,6,,7]),o=function(e){for(var t={},n={},r=[],o=0,i=Object.keys(e);o<i.length;o++)!function o(i){var a;if(n[i])throw Error("Cyclic dependency detected at script: ".concat(i));if(!t[i]){n[i]=!0;var s=e[i];if(!s)throw Error("Missing script definition for key: ".concat(i));for(var c=0,u=null!=(a=null==s?void 0:s.dependsOn)?a:[];c<u.length;c++)o(u[c]);t[i]=!0,n[i]=!1,r.push(i)}}(i[o]);return r}(t),i=function(e,t){for(var n=new Set,r=0;r<e.length;r++)!function e(r){var o;if(!n.has(r)){var i=t[r];if(!i)throw Error("Missing script definition: '".concat(r,"'"));for(var a=0,s=null!=(o=i.dependsOn)?o:[];a<s.length;a++)e(s[a]);n.add(r)}}(e[r]);return n}(r,t),a=o.filter(function(e){return i.has(e)}),s=Date.now(),c=0,u=a,y.label=2;case 2:var v;return c<u.length?(d=(p=t[l=u[c]]).src,f=p.integrity,h=(v=d.toLowerCase()).startsWith("//")||v.startsWith("http://")||v.startsWith("https://")?d:n(d),[4,this.loadScript(h,l,f||"")]):[3,5];case 3:y.sent(),y.label=4;case 4:return c++,[3,2];case 5:return(m=Date.now()-s)>15e3&&aN.captureMessage("Slow script chain loading detected","warning",{targets:r,loadOrder:a,chainTime:m,scriptCount:a.length,operation:"script_chain_load"}),[3,7];case 6:throw g=y.sent(),aN.captureError(g instanceof Error?g:Error("Script chain loading failed"),{type:"script_chain_error",targets:r,operation:"script_chain_load"}),g;case 7:return[2]}})})},e.prototype.onLoad=function(e,t){window.customElements.get(e)?t(e):(this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t))},e.DEFAULT_SCRIPT_TIMEOUT_MS=15e3,e}(),se=function(){function e(){this.events=new Map,this.onceWrappers=new WeakMap}return e.prototype.on=function(e,t){var n;this.events.has(e)||this.events.set(e,[]),null==(n=this.events.get(e))||n.push(t)},e.prototype.once=function(e,t){var n=this,r=function(o){n.off(e,r),t(o)};this.onceWrappers.set(t,r),this.on(e,r)},e.prototype.emit=function(e,t){this.events.forEach(function(n,r){("*"===r||(r.endsWith(":*")?e.startsWith(r.slice(0,-1)):r===e))&&_([],n,!0).forEach(function(e){return e(t)})})},e.prototype.off=function(e,t){var n=this.onceWrappers.get(t),r=n||t,o=this.events.get(e);o&&this.events.set(e,o.filter(function(e){return e!==r})),n&&this.onceWrappers.delete(t)},e.prototype.removeAllListeners=function(e){e?this.events.delete(e):this.events.clear()},e}(),st={exports:{}},sn=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(a3?st.exports:(a3=1,self,a9={82:(e,t)=>{function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
50Object.defineProperty(t,"__esModule",{value:!0});var r=/["'&<>]/,o=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}s!==a&&(i+=n.substring(s,a)),s=a+1,i+=t}return s!==a?i+n.substring(s,a):i};function i(e){return"string"==typeof e}function a(e){return i(e)&&e.length>0}function s(e){return!(!e||"object"!==n(e)||e instanceof Array)}function c(e){return s(e)&&Object.keys(e).length>0}function u(e){return e instanceof Array}function l(e){return!(!u(e)||0!==e.length&&e.find(function(e){return!c(e)}))}var p=Object.freeze({isString:i,isNonEmptyString:a,isObject:s,isNonEmptyObject:c,isArray:u,isArrayOfObject:l,isValidStorageObject:function(e){return!!(c(e)&&Object.hasOwnProperty.call(e,"name")&&Object.hasOwnProperty.call(e,"version")&&Object.hasOwnProperty.call(e,"parameters")&&a(e.name)&&a(e.version)&&l(e.parameters))}}),d="__op_app_version_lib_storage__",f=["string","number","boolean"];function h(){var e;return"undefined"==typeof window?(console.log("ERROR: You are outside of a browser environment"),null):(window[d]||(window[d]=(e=[],Object.freeze({storeData:function(t,r,i){if(p.isNonEmptyString(t)&&p.isNonEmptyString(r)){var a={name:o(t.toLowerCase()),version:o(r.toLowerCase()),parameters:function(e){var t=[];if(p.isNonEmptyObject(e))for(var r in e){var i=e[r];f.includes(n(i))&&"string"==typeof r&&("string"==typeof i&&(i=o(i)),t.push({key:o(r),value:i}))}return t}(i)},s=e.findIndex(function(e){return e.name===t&&e.version===r});-1===s?e.push(a):e[s]=a}},getData:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return(t=n&&r?e.find(function(e){return e.name===n&&e.version===r}):n?e.find(function(e){return e.name===n}):e)&&(t=JSON.parse(JSON.stringify(t))),t}}))),window[d])}var m=Object.freeze({storeData:function(e,t,n){var r=h();null!==r&&r.storeData(e,t,n)},getData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=h();return null!==n?n.getData(e,t):{}}}),g="op-app-version-lib",y="0.2.1";function v(e){if(!p.isValidStorageObject(e))return"";var t=e.parameters.map(function(e){return"".concat(e.key,"=").concat(e.value)}).join(";");return"".concat(e.name,";version=").concat(e.version).concat(t?";".concat(t):"")}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.storeData(e,t,n)}function b(){return m.getData().map(v).filter(function(e){return e}).join(", ")}function E(){return m.getData()}"object"===("undefined"==typeof window?"undefined":n(window))&&(window.OP_APP_VERSION_LIB_VERSION=y),t.PACKAGE_NAME=g,t.PACKAGE_VERSION=y,t.__parseHeaderString=v,t.addVersionInfo=_,t.default={PACKAGE_NAME:g,PACKAGE_VERSION:y,addVersionInfo:_,toString:b,toJSON:E},t.toJSON=E,t.toString=b},254:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=n(462),a=i.containsNonEmptyString,s=i.containsKey,c=i.isNonEmptyString,u=i.isNonEmptyObject,l=i.isNonEmptyArray,p=n(341),d=n(757),f={}
50,h=[],m="RISK_LIBRARY",g=Object.seal({INTERNAL:"riskPluginInternalError",EXTERNAL:"riskPluginExternalError"}),y=Object.seal({dataKeys:[],setData:function(e,t){f[e]=t},getData:function(e){return f[e]},removeData:function(e){delete f[e]}});function v(){return h.map(function(e){return e.origin})}function _(e,t){return[m,e,t].join("__")}function b(e){var t="",n="";if(c(e)){var o=r(e.split("__"),3);o[0],t=o[1],n=o[2]}return[t,n]}function E(e,t,n){if(c(e)&&c(t)){var r=null;document&&(r=document.getElementById(e)),r&&r.setAttribute(t,n)}}function w(e,t,n){if(c(e)&&c(t)){var r=d.generateIframeId(e,t);E(r,"responded",!0),Object.values(p).includes(n)&&E(r,"response-type",n)}}function k(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.INTERNAL;if(c(e)&&c(t)&&c(n)){x(r)||(r=g.INTERNAL),n.length>2e3&&(n=n.slice(0,2e3));var o=_(e,t);y.dataKeys.includes(o)||y.dataKeys.push(o);var i={};i[r]=n,y.setData(o,i),w(e,t,p.ERROR)}}function S(e,t,n){if(c(e)&&c(t)&&u(n)){var r=_(e,t);y.dataKeys.includes(r)||y.dataKeys.push(r),y.setData(r,n),w(e,t,p.DATA)}}function O(e){if(!u(e))return[];var t=[];for(var n in e)if(c(n)){var r=e[n];null!=r&&("string"!=typeof r&&(r=JSON.stringify(r)),(r=r.trim())&&t.push({name:n,value:r}))}return t}function I(e){if(!c(e)||!y.dataKeys.includes(e))return null;var t=r(b(e),2),n=t[0],o=t[1];if(!n||!o)return null;var i=O(y.getData(e));return l(i)?{providerType:n,providerCode:o,parameters:i}:null}function x(e){return e===g.INTERNAL||e===g.EXTERNAL}function R(e){return a(e,"messageType")&&"RISK_HANDLER_ERROR"===e.messageType&&s(e,"data")&&a(e.data,"providerType")&&a(e.data,"providerCode")&&s(e.data,"providerError")&&c(e.data.providerError)}function C(e){return a(e,"messageType")&&"RISK_HANDLER"===e.messageType&&s(e,"data")&&a(e.data,"providerType")&&a(e.data,"providerCode")&&s(e.data,"providerResults")&&u(e.data.providerResults)}function T(e){if(c(e)&&!v().includes(e)){var t=function(t){if(t.origin===e){var n=t.data||null;C(n)?S(n.data.providerType,n.data.providerCode,n.data.providerResults):R(n)&&k(n.data.providerType,n.data.providerCode,n.data.providerError,g.EXTERNAL)}};h.push({origin:e,listener:t}),window.addEventListener("message",t)}}function A(){0!==h.length&&(h.forEach(function(e){window.removeEventListener("message",e.listener)}),h=[])}e.exports=Object.freeze({init:function(e){l(e)&&e.forEach(function(e){T(e)})},clear:function(){y.dataKeys.forEach(function(e){y.removeData(e)}),y.dataKeys=[],A(),f={}},configureExternalStorage:function(e,t,n){"function"==typeof e&&(y.setData=e),"function"==typeof t&&(y.getData=t),"function"==typeof n&&(y.removeData=n)},SEPARATOR:"__",ErrorType:g,LIB_PREFIX:m,StorageManager:y,ERROR_MESSAGE_LIMIT:2e3,getInMemoryStorage:function(){return JSON.parse(JSON.stringify(f))},getRiskMessageListeners:function(){return JSON.parse(JSON.stringify(h))},parseKey:b,getRiskData:function(){var e=[];return y.dataKeys.forEach(function(t){var n=I(t);n&&e.push(n)}),e},generateKey:_,getParameters:O,getKnownOrigins:v,isValidErrorType:x,setAttributeValue:E,getProviderResults:I,isValidRiskMessage:C,storeProviderError:k,addMessageListener:T,setResponseIndicator:w,storeProviderResults:S,removeMessageListeners:A,isValidRiskErrorMessage:R,configureDefaultStorage:function(){y.setData=function(e,t){f[e]=t},y.getData=function(e){return f[e]},y.removeData=function(e){delete f[e]}}})},313:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,o,a){var s=Object.create((r&&r.prototype instanceof u?r:u).prototype);return i(s,"_invoke",function(n,r,o){var i,a,s,u=0,l=o||[],p=!1,d={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return i=t,a=0,s=e,d.n=n,c}};function f(n,r){for(a=n,s=r,t=0;!p&&u&&!o&&t<l.length;t++){var o,i=l[t],f=d.p,h=i[2];n>3?(o=h===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=f&&((o=n<2&&f<i[1])?(a=0,d.v=r,d.n=i[1]):f<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,d.n=h,a=0))}if(o||n>1)return c;throw p=!0,r}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,h),a=l,s=h;(t=a<2?e:s)||!p;){i||(a?a<3?(a>1&&(d.n=-1),f(a,s)):d.n=s:d.v=s);try{if(u=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");
50if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(p=d.n<0)?s:n.call(r,d))!==c)break}catch(t){i=e,a=1,s=t}finally{u=1}}return{value:t,done:p}}}(n,o,a),!0),s}var c={};function u(){}function l(){}function p(){}t=Object.getPrototypeOf;var d=p.prototype=u.prototype=Object.create([][r]?t(t([][r]())):(i(t={},r,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,i(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=p,i(d,"constructor",p),i(p,"constructor",l),l.displayName="GeneratorFunction",i(p,a,"GeneratorFunction"),i(d),i(d,a,"Generator"),i(d,r,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:f}})()}function i(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(i=function(e,t,n,r){function a(t,n){i(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))})(e,t,n,r)}function a(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,c,"next",e)}function c(e){a(i,r,o,s,c,"throw",e)}s(void 0)})}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u=n(976),l=n(254),p=n(954),d=n(757),f=n(699),h=n(82).addVersionInfo,m=n(462),g=m.isArrayOfObjects,y=m.containsKey,v=m.containsNonEmptyString,_=m.isNonEmptyArray,b=m.getParamByName,E=n(330).DD,w=n(330).rE;function k(e){var t;return v(e,"providerCode")&&v(e,"providerType")&&S(null==e||null==(t=e.links)?void 0:t.iframe)}function S(e){try{var t=new URL(e);return"https:"===t.protocol&&("checkout.payoneer.com"===t.hostname||/^[a-z0-9\-_]*(resources)[a-z0-9\-_]*\.(live|stage|sandbox|integration|[a-z0-9\-_]+\.integration)\.oscato\.com$/g.test(t.hostname))}catch(e){return!1}}function O(e){var t=[];return _(e)&&e.filter(S).forEach(function(e){var n=new URL(e);t.includes(n.origin)||t.push(n.origin)}),t}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!k(e))return"";var n=e.links.iframe;n.endsWith("/")||(n+="/");var r="?providerType="+e.providerType+"&providerCode="+e.providerCode+"&targetOrigin="+t;return y(e,"parameters")&&g(e.parameters)&&e.parameters.forEach(function(e){v(e,"name")&&y(e,"value")&&(r+="&"+e.name+"="+e.value)}),n+r}function x(e){var t=[],n=[];return _(e)&&e.forEach(function(e){k(e)?t.push(e):n.push(e)}),[t,n]}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.INVALID_CONFIG,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.storeProviderError;_(e)&&"function"==typeof n&&e.forEach(function(e){v(e,"providerType")&&v(e,"providerCode")&&n(e.providerType,e.providerCode,"string"==typeof t?t:f.INVALID_CONFIG)})}function C(){return(C=s(o().m(function e(t){var n,i,a,c;return o().w(function(e){for(;;)switch(e.n){case 0:if(T(),n=x(t),a=(i=function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{i=(n=n.call(e)).next,!1;for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(n,2)||function(e,t){if(e){if("string"==typeof e)return r(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],R(i[1]),0!==a.length){e.n=1;break}return e.a(2);case 1:c=O(a.map(function(e){return e.links.iframe})),l.init(c),a.forEach(function(e){var t=b(e.parameters,"handlerLoadingType");if(t&&"javascript"==(null==t?void 0:t.value)){var n=b(e.parameters,"handlerSrc");n&&n.value&&function(e,t){var n;S(t)&&u(t,{success:(n=s(o().m(function t(){var n;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,riskProviderHandler.run();case 1:n=t.v,l.storeProviderResults(e.providerType,null==e?void 0:e.providerCode,n);case 2:return t.a(2)}},t)})),function(){return n.apply(this,arguments)}),error:function(){var n="Failed to load script ".concat(t);l.storeProviderError(e.providerType,null==e?void 0:e.providerCode,n)}})}(e,n.value)}else{var r=I(e,window.location.origin);if(!r)return;var i=d.generateIframeId(e.providerType,e.providerCode);p.initIFrame(i,r,e.providerCode)}});case 2:return e.a(2)}},e)}))).apply(this,arguments)}function T(){p.destroy(),l.clear()}"object"===("undefined"==typeof window?"undefined":c(window))&&(window.OP_RISK_LIB_VERSION=w,h(E,w)),e.exports={init:function(e){return C.apply(this,arguments)},destroy:T,getRiskData:l.getRiskData,getProviderUrl:I,isValidHandlerURL:S,getDistinctOrigins:O,getSeparatedConfigs:x,isValidProviderConfig:k,generateInternalErrors:R,configureExternalStorage:l.configureExternalStorage,dataUtil:l,iframeUtil:p,PACKAG
50E_NAME:E,PACKAGE_VERSION:w}},330:e=>{e.exports=JSON.parse('{"DD":"op-risk-lib","rE":"1.7.0"}')},341:e=>{e.exports=Object.freeze({ERROR:"EXTERNAL_ERROR_MESSAGE",DATA:"RISK_PROVIDER_RESULTS"})},462:e=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return!(!e||"object"!==t(e)||e instanceof Array)}function r(e){return!(!e||"string"!=typeof e||!e.trim())}function o(e){return!!(e&&e instanceof Array&&e.length)}function i(e){return!(!n(e)||!Object.keys(e).length)}function a(e,t){return i(e)&&e.hasOwnProperty(t)}e.exports={isJsonObject:n,isNonEmptyArray:o,isNonEmptyObject:i,isArrayOfObjects:function(e){return o(e)&&n(e[0])},isNonEmptyString:r,containsKey:a,containsNonEmptyString:function(e,t){return a(e,t)&&r(e[t])},getParamByName:function(e,t){return e.find(function(e){return e.name===t})}}},699:e=>{e.exports=Object.freeze({INVA
50LID_ORIGIN:"Risk-provider iframe url origin is invalid",INVALID_IFRAME_URL:"Risk-provider iframe url is invalid",INVALID_CONFIG:"Given risk-provider config is invalid"})},757:e=>{e.exports=Object.freeze({generateIframeId:function(e,t){return"IFRAME__"+e+"__"+t}})},954:(e,t,n)=>{var r=n(462).isNonEmptyString,o={};function i(e){o.hasOwnProperty(e)&&o[e]&&(o[e].remove(),delete o[e])}e.exports=Object.freeze({iframeHolder:o,getIFrame:function(e){return o.hasOwnProperty(e)?o[e]:null},initIFrame:function(e,t){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!r(e)||!r(t))return null;var i=document.createElement("iframe");return i.setAttribute("id",e),i.setAttribute("src",t),i.setAttribute("responded",!1),r(n)&&i.setAttribute("name",n),i.style.position="fixed",i.style.display="none",i.style.zIndex="-1000",i.style.left="110vw",i.style.top="110vh",i.style.height="0px",i.style.width="0px",i.style.opacity="0",o[e]=i,i}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:""),i=document.querySelector("body");n&&i&&i.appendChild(n)},removeIFrame:i,destroy:function(){for(var e in o)i(e)}})},976:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e=function(){},t={},n={},r={};function o(e,t){if(e){var o=r[e];if(n[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function i(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function a(n,r,a){var s,c;if(r&&r.trim&&(s=r),c=(s?a:r)||{},s){if(s in t)throw"LoadJS";t[s]=!0}function u(t,r){!function(t,n,r){var o,i,a=(t=t.push?t:[t]).length,s=a,c=[];for(o=function(e,t,r){if("e"==t&&c.push(e),"b"==t){if(!r)return;c.push(e)}--a||n(c)},i=0;i<s;i++)!function t(n,r,o,i){var a,s,c,u=document,l=o.async,p=(o.numRetries||0)+1,d=o.before||e,f=n.replace(/[\?|#].*$/,""),h=n.replace(/^(css|img|module|nomodule)!/,"");if(i=i||0,/(^css!|\.css$)/.test(f))(c=u.createElement("link")).rel="stylesheet",c.href=h,(a="hideFocus"in c)&&c.relList&&(a=0,c.rel="preload",c.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(f))(c=u.createElement("img")).src=h;else if((c=u.createElement("script")).src=h,c.async=void 0===l||l,s="noModule"in c,/^module!/.test(f)){if(!s)return r(n,"l");c.type="module"}else if(/^nomodule!/.test(f)&&s)return r(n,"l");c.onload=c.onerror=c.onbeforeload=function(e){var s=e.type[0];if(a)try{c.sheet.cssText.length||(s="e")}catch(e){18!=e.code&&(s="e")}if("e"==s){if((i+=1)<p)return t(n,r,o,i)}else if("preload"==c.rel&&"style"==c.as)return c.rel="stylesheet";r(n,s,e.defaultPrevented)},!1!==d(n,c)&&u.head.appendChild(c)}(t[i],o,r)}(n,function(e){i(c,e),t&&i({success:t,error:r},e),o(s,e)},c)}if(c.returnPromise)return new Promise(u);u()}return a.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,i,a,s=[],c=e.length,u=c;
50for(o=function(e,n){n.length&&s.push(e),--u||t(s)};c--;)(a=n[i=e[c]])?o(i,a):(r[i]=r[i]||[]).push(o)}(e,function(e){i(t,e)}),a},a.done=function(e){o(e,[])},a.reset=function(){t={},n={},r={}},a.isDefined=function(e){return e in t},a})?n.apply(t,[]):n)||(e.exports=r)}},a6={},st.exports=function e(t){var n=a6[t];if(void 0!==n)return n.exports;var r=a6[t]={exports:{}};return a9[t].call(r.exports,r,r.exports,e),r.exports}(313))),sr=function(){function e(){this.library=sn,this.callback=void 0,this.isNotified=!1,this.iframe=null,this.isResponded=!1}return e.getInstance=function(){return null===this.instance&&(this.instance=new e),this.instance},e.prototype.init=function(e){this.library.init(e)},e.prototype.onLoad=function(e){var t;"function"==typeof e&&(this.callback=e),this.isResponded?"function"!=typeof this.callback||this.isNotified||(this.callback(this.library.getRiskData()),this.isNotified=!0):this.observe(null==(t=sn.iframeUtil.iframeHolder)?void 0:t.IFRAME__RISK_DATA_PROVIDER__IOVATION)},e.prototype.observe=function(e){var t=this;e&&(this.iframe=e,new MutationObserver(function(e){return t.onCustomAttributeChange(e)}).observe(e,{attributes:!0,attributeFilter:["responded"]}))},e.prototype.onCustomAttributeChange=function(e){var t=this;this.isResponded||e.forEach(function(e){var n,r;"attributes"===e.type&&"responded"===e.attributeName&&(t.isResponded="true"===(null==(n=t.iframe)?void 0:n.getAttribute("responded")),"function"==typeof t.callback&&(t.isResponded="true"===(null==(r=t.iframe)?void 0:r.getAttribute("responded")),t.callback(t.library.getRiskData()),t.isNotified=!0))})},e.prototype.getRiskData=function(){return this.library.getRiskData()},e.instance=null,e}(),so=function(){function e(e){this.isRisklibInitialised=!1,this.checkout=e,this.eventListner(),this.riskManager=sr.getInstance()}return e.prototype.eventListner=function(){var e=this;this.checkout.internalEvents.on(w.COMPONENT.MOUNT,function(){return e.onMount()})},e.prototype.onMount=function(){var e=this;this.initRiskLib(),this.riskManager.onLoad(function(){window.riskLib={getRiskData:function(){return e.riskManager.getRiskData()}}})},e.prototype.initRiskLib=function(){this.isRisklibInitialised||(aA.debug("Initialising risk lib..."),this.riskManager.init(this.getRiskProviders()),this.isRisklibInitialised=!0)},e.prototype.getRiskProviders=function(){var e;return(null==(e=this.checkout.listData)?void 0:e.riskProviders)||[]},e}(),si=["onBeforeCharge","onBeforeError","onPaymentSuccess","onValidationInfo","onPaymentFailure","onBeforeProviderRedirect","onPaymentDeclined","onReady"],sa=["onBeforeSubmit","onSubmitSuccess"],ss=function(){function e(){var e=this;this.state="IDLE",this.config={env:"live",longId:"",preload:[],telemetry:void 0,onBeforeCharge:void 0,onBeforeError:void 0,onListRefetch:void 0,onPaymentSuccess:void 0,onValidationInfo:void 0,onPaymentFailure:void 0,onBeforeProviderRedirect:void 0,onComponentListChange:void 0,onPaymentDeclined:void 0,onReady:void 0,refetchListBeforeCharge:!1},this.scriptLoader=new a7,this.dropInComponents={},this.components=new Set,this.internalEvents=new se,this.publicEvents=new se,this.metaInfo={},this.supportsGooglePay=!1,this.internalEvents.on("mount",function(t){e.publicEvents.emit("component:mounted",t)}),this.internalEvents.on("unmount",function(t){e.publicEvents.emit("component:unmounted",t)})}return e.prototype.on=function(e,t){this.publicEvents.on(e,t)},e.prototype.off=function(e,t){this.publicEvents.off(e,t)},e.prototype.once=function(e,t){this.publicEvents.once(e,t)},e.prototype.destroy=function(){var e=this;Object.keys(this.dropInComponents).forEach(function(t){e.dropInComponents[t].unmount(),delete e.dropInComponents[t]}),this.components.clear(),this.publicEvents.emit("destroyed",{}),this.publicEvents.removeAllListeners(),this.internalEvents.removeAllListeners(),this.state="IDLE",aA.info("CheckoutWeb destroyed")},e.getGenericFetchListError=function(){return{interaction:{code:"ABORT",reason:"SYSTEM_FAILURE"},resultInfo:"We encountered a problem connecting to the server"}},e.prototype.preInitScript=function(e){return y(this,void 0,void 0,function(){var t,n,r,o;return v(this,function(i){for(t=0,n=e;t<n.length;t++)r=n[t],(o=a$(this.metaInfo,r))?(aB("".concat(o,": Preloading component"),aW.INFO),this.scriptLoader.loadScriptChain([o],g({},this.metaInfo),this.environment.getCDNLink.bind(this.environment))):aB("Error preloading drop-in component, Method name is unknown: ".concat(r),aW.ERROR,{info:r});return[2,Promise.resolve()]})})},e.prototype.initialise=function(t){return y(this,arguments,void 0,function(t,n){var r,o,i,a,s,c,u,l,p,d,f,h,m,y=this;return void 0===n&&(n=!1),v(this,function(v){var b;switch(v.label){case 0:if(this.componentsManager=new so(this),this.state="LOADING",o=(r=(b=rw.safeParse(t)).success?{isValid:!0,data:b.data}:{isValid:!1,error:b.error}).isValid,i=r.data,a=r.error,!o)return this.state="ERROR",console.error("[Payoneer Checkout Web SDK] Invalid configuration: ",a),aA.error("Invalid configuration:",a),[2,this];if(this.config=i,this.environment=function(e){var t;switch(e){case"test":t=E.replace("<env>","sandbox");break;case"live":t=E.replace("<env>","live");break;default:t=E.replace("<env>",e)}function n(){return new URL("".concat(null==t?void 0:t.replace("<entity>","api"),"/pci/v1"))}function r(){return new URL("".concat(null==t?void 0:t.replace("<entity>","resources")))}return{getListURL:function(e){return"".concat(n().toString(),"/").concat(e)},getCDNLink:function(e){return"".concat(r().toString()).concat(e)},getEnvName:function(){return e},getMetaInfoURL:function(e){void 0===e&&(e="");var t=e?"".concat(e,"/"):"";return"".concat(r().toString()).concat(t,"meta-info.json")}
50,isValidLinksURL:function(e){try{if(new URL(e).origin!==n().origin)return!1}catch(e){return!1}return!0},isValidResourceURL:function(e){try{if(new URL(e).origin!==r().origin)return!1}catch(e){return!1}return!0},isValidHostedInputsURL:function(e){try{if(new URL(e).origin!==new URL("".concat(null==t?void 0:t.replace("<entity>","hostedinputs"))).origin)return!1}catch(e){return!1}return!0},getLogoUrl:function(e){return"".concat(r()).concat(e)}}}(null==(p=this.config)?void 0:p.env),(null==(d=this.config.telemetry)?void 0:d.enabled)&&!n&&(aN.init(g(g({},this.config.telemetry),{globalContext:g({libraryVersion:"1.29.0",environment:this.config.env,longId:this.config.longId},this.config.telemetry.globalContext)}),this.config.env),aN.addBreadcrumb({message:"CheckoutWeb initialised",level:"info"})),n)return[3,4];v.label=1;case 1:return v.trys.push([1,3,,4]),[4,Promise.all([aD(this.environment.getMetaInfoURL("web/libraries/checkout-web-sdk")),aD(this.environment.getMetaInfoURL("web/libraries/checkout-web-stripe"))])];case 2:return c=(s=v.sent())[0],u=s[1],this.metaInfo=function e(t,n){if(Array.isArray(t)&&Array.isArray(n)){for(var r=[],o=function(t){if(aZ(t)&&"id"in t){var n=r.findIndex(function(e){return aZ(e)&&"id"in e&&e.id===t.id});n>=0?r[n]=e(r[n],t):r.push(t)}else(aZ(t)||r.includes(t))&&(!aZ(t)||"id"in t)||r.push(t)},i=0,a=_(_([],t,!0),n,!0);i<a.length;i++)o(a[i]);return r}if(aZ(t)&&aZ(n)){var s=g({},t);for(var c in n)Object.hasOwn(n,c)&&(s[c]=c in t?e(t[c],n[c]):n[c]);return s}return null!=n?n:t}(g(g({},c),{providerPrefix:{WORLDPAY:"",TESTPSP:"",PPRO:""},supportedComponents:["payoneer-cards","payoneer-redirect"],"payoneer-cards":g(g({},c["payoneer-cards"]),{supportedMethods:{cards:["AMEX","DISCOVER","JCB","MASTERCARD","VISA"]},logoTemplate:"web/libraries/checkout-web-sdk/payoneer-cards/logo/<%NETWORK_CODE%>/[email protected]",labels:{JCB:"Cards",AMEX:"Cards",VISA:"Cards",MASTERCARD:"Cards",DISCOVER:"Cards"}}),"payoneer-redirect":g(g({},c["payoneer-redirect"]),{supportedMethods:{klarna:["KLARNA"],clearpay:["CLEARPAY"],afterpay:["AFTERPAY"],affirm:["AFFIRM"]},logoTemplate:"web/libraries/checkout-web-sdk/payoneer-redirect/logo/<%NETWORK_CODE%>/[email protected]",labels:{AFTERPAY:"Afterpay",CLEARPAY:"Clearpay",KLARNA:"Klarna",AFFIRM:"Affirm"}})}),u),[3,4];case 3:return l=v.sent(),this.state="ERROR",aA.error("Error fetching meta info:",l),[2,this];case 4:return(null==(h=null==(f=this.config)?void 0:f.preload)?void 0:h.length)>0&&!n?[4,this.preInitScript(this.config.preload)]:[3,6];case 5:v.sent(),v.label=6;case 6:return(null==(m=this.config)?void 0:m.longId)?[4,this.setupListData().catch(function(){return y.handleFetchListError(e.getGenericFetchListError()),y.state="ERROR",!1})]:(this.state="IDLE",[2,this]);case 7:return v.sent()&&n&&this.onRefetchListData("checkout-web"),[2,this]}})})},e.prototype.getGooglePayAvailability=function(t,n){return y(this,void 0,void 0,function(){var r,o,i,a;return v(this,function(s){switch(s.label){case 0:if(!(null==(a=window.Payoneer)?void 0:a.checkGooglePayAvailability))return this.supportsGooglePay=!1,aA.info("supportsGooglePay",!1),[2,!1];s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,Promise.race([window.Payoneer.checkGooglePayAvailability(null==t?void 0:t.networks,n),new Promise(function(t){r=setTimeout(function(){aA.warning("Google Pay availability check timed out",{timeoutMs:e.GOOGLE_PAY_TIMEOUT_MS}),t(!1)},e.GOOGLE_PAY_TIMEOUT_MS)})])];case 2:return o=s.sent(),this.supportsGooglePay=!!o,aA.info("supportsGooglePay",this.supportsGooglePay),[2,this.supportsGooglePay];case 3:return i=s.sent(),aA.error("Google Pay availability check failed",i),this.supportsGooglePay=!1,[2,!1];case 4:return clearTimeout(r),[7];case 5:return[2]}})})},e.prototype.setupListData=function(t){return y(this,void 0,void 0,function(){var n,r,o,i,a,s,c,u,l,p,d,f,h,m,y;return v(this,function(v){var _,b,E,w,k,S,O;switch(v.label){case 0:if(!this.environment||!this.config.longId)return[2,!1];this.state="LOADING",v.label=1;case 1:return v.trys.push([1,3,,4]),[4,aD(this.environment.getListURL(this.config.longId))];case 2:return n=v.sent(),[3,4];case 3:return r=v.sent(),az.isHttpError(r)&&r.body?(o=r.body,this.listData=o,this.handleFetchListError(o)):this.handleFetchListError(e.getGenericFetchListError()),this.state="ERROR",[2,!1
50];case 4:if(!(null==(f=null==n?void 0:n.interaction)?void 0:f.code))return i=e.getGenericFetchListError(),this.listData=i,this.handleFetchListError(i),this.state="ERROR",[2,!1];if("PROCEED"!==n.interaction.code)return this.listData=n,this.handleFetchListError(n),this.state="ERROR",[2,!1];a=g(g({},n),{networks:g({},n.networks)}),s=function(e){for(var t,n,r=e.supportedComponents||[],o=[],i=[],a=0;a<r.length;a++)for(var s=r[a],c=0,u=Object.entries(null!=(n=null==(t=e[s])?void 0:t.supportedMethods)?n:{});c<u.length;c++){var l=u[c],p=l[0],d=l[1];i.push(p),d.length&&o.push.apply(o,d)}return{methods:i,networks:o.filter(function(e,t){return o.indexOf(e)===t})}}(this.metaInfo).networks,(null==(h=null==a?void 0:a.networks)?void 0:h.applicable)&&(a.networks.applicable=a.networks.applicable.filter(function(e){var t=e.code;return s.includes(t)})),(null==(m=null==a?void 0:a.networks)?void 0:m.applicable)&&(this.providers=(null==(y=a.networks.applicable[0])?void 0:y.providers)||[]),v.label=5;case 5:return v.trys.push([5,7,,8]),Array.isArray(null==(S=null==(k=c=n2({links:n2({binlookup:rd((w=E=this.environment).isValidLinksURL,"Invalid Bin lookup URL").optional(),self:rd(w.isValidLinksURL,"Invalid list URL"),hostedInputs:rd(w.isValidHostedInputsURL,"Invalid hosted input URL").optional(),lang:rd(w.isValidResourceURL,"Invalid lang URL").optional()}).loose(),returnCode:rm.optional(),interaction:ry,identification:rv.optional(),status:rg.optional(),networks:n2({applicable:n0(n2({code:nS(),label:nS(),method:nS(),grouping:nS(),registration:nS(),recurrence:nS(),redirect:nH().optional(),button:nS().optional(),selected:nH().optional(),operationType:nS(),deferral:nS().optional(),links:n2({self:rd(E.isValidLinksURL,"Invalid network link").optional(),operation:rd(E.isValidLinksURL,"Invalid network operation link").optional()}).loose()}).loose()).min(0)}).loose(),wallets:n0(n2({code:nS(),networks:n0(nS()).min(0),data:n0(n2({key:nS(),value:nS()}).loose()).optional()}).loose()).optional(),style:r_.optional(),payment:rb.optional(),resultInfo:nS().optional(),operationType:nS().optional(),timestamp:nS().optional(),operation:nS().optional(),resultCode:nS().optional(),integrationType:nS().default("DISPLAY_NATIVE")}).superRefine(function(e,t){"CHARGE"!==e.operationType||e.payment||t.addIssue({code:"custom",path:["payment"],message:"payment is required when operationType is CHARGE"})}).loose().parse(a))?void 0:k.networks)?void 0:S.applicable)&&k.networks.applicable.length>0&&k.networks.applicable[0]&&"object"==typeof k.networks.applicable[0]&&"contractData"in k.networks.applicable[0]&&k.networks.applicable[0].contractData&&"object"==typeof k.networks.applicable[0].contractData&&"publishableKey"in k.networks.applicable[0].contractData&&(O=k.networks.applicable[0].contractData.publishableKey),u=null!=O?O:"",[4,this.getGooglePayAvailability(c,u)];case 6:return v.sent(),l=aM(c,this.environment,this.metaInfo),_=new Set(this.availableDropInComponents().map(function(e){return String(e.name)})),p={addedComponents:aU(b=new Set(l.map(function(e){return String(e.name)})),_),removedComponents:aU(_,b),availableComponents:b},this.listData=c,this.notifyComponentListChangeAfterListRefresh(c,p,t),this.state="LOADED",[2,!0];case 7:return d=v.sent(),n&&(this.listData=n,this.handleFetchListError(n)),aA.error("Invalid list data",d),this.state="ERROR",[2,!1];case 8:return[2]}})})},e.prototype.notifyComponentListChangeAfterListRefresh=function(e,t,n){var r=t.addedComponents.size>0||t.removedComponents.size>0,o=t.availableComponents.size>0&&e.operationType===a2.UPDATE;r?(aA.debug("Diff: Components changed"),this.onComponentListChange(t,n)):o?(aA.debug("Refresh component list"),this.onComponentListChange(t,n)):aA.debug("Diff: Components remains unchanged")},e.prototype.handleFetchListError=function(e){var t;(null==(t=this.config)?void 0:t.onBeforeError)?this.config.onBeforeError(this,"checkout-web",e):aA.error("Error fetching list data",e)},e.prototype.getMethodName=function(e){return aL(e,this.metaInfo,this.providers||[])},e.prototype.dropIn=function(e,t){var n,r,o=this,i=this.getMethodName(e),a=a$(this.metaInfo,i);if(!a)return aA.error("".concat(i," is an unknown drop-in-component"));this.components.add(i);var s=null==i?void 0:i.toUpperCase(),c="".concat(a,"::").concat(s),u={refetchListBeforeCharge:null!=(r=null==(n=this.config)?void 0:n.refetchListBeforeCharge)&&r};si.forEach(function(e){var t=o.config[e];"function"==typeof t&&(u[e]=function(e,n){return t(o,e,n)})}
50),sa.forEach(function(e){var t=o.config[e];"function"==typeof t&&(u[e]=function(e){var n=e.componentName,r=e.data,i=aG(e.operationType,r);return t({checkout:o,componentName:n,data:r,operationType:i})})});var l=this.config.onSubmitError;if("function"==typeof l&&(u.onSubmitError=function(e){var t=e.componentName,n=e.data;return l({checkout:o,componentName:t,data:n,severity:e.severity,operationType:aG(e.operationType,n)})}),this.dropInComponents[c])aA.info("".concat(a,":").concat(s,": Exists, skipping drop-in"));else{var p={name:a,network:s,method:s,hidePaymentButton:null==t?void 0:t.hidePaymentButton,hideSubmitButton:null==t?void 0:t.hideSubmitButton,refetchList:function(e,t){return o.refetchListData(a,t)}};i.includes("card")&&(p.primaryColor=(null==t?void 0:t.primaryColor)||void 0,p.primaryTextColor=(null==t?void 0:t.primaryTextColor)||void 0),this.dropInComponents[c]=new a8(p,this.listData,this.internalEvents,this.publicEvents),aA.info("".concat(a,"::").concat(s,": Dropping-in"))}return this.scriptLoader.loadScriptChain([a],g({},this.metaInfo),this.environment.getCDNLink.bind(this.environment)),this.scriptLoader.onLoad(a,function(){aA.info("".concat(a,"::").concat(s,": is loaded. setting Node and list data"));try{o.dropInComponents[c].update(u,o.listData)}catch(e){aB("Error updating ".concat(a,"::").concat(s,":"),aW.ERROR,{error:e})}}),this.dropInComponents[c]},e.prototype.update=function(e){return aN.addBreadcrumb({message:"CheckoutWeb config updated",level:"info"}),this.initialise(g(g({},this.config),e),!0),this},e.prototype.updateLongId=function(e){return aN.addBreadcrumb({message:"Long ID updated",level:"info"}),this.update(g(g({},this.config),{longId:e}))},e.prototype.reload=function(){aN.addBreadcrumb({message:"CheckoutWeb reloaded",level:"info"}),this.update(this.config)},e.prototype.remove=function(e){var t=this.getMethodName(e),n="".concat(t,": Trying to remove non existant component");if(!this.components.has(t))return aB(n,aW.WARN),!1;var r=a$(this.metaInfo,t),o=null==t?void 0:t.toUpperCase(),i="".concat(r,"::").concat(o),a=this.dropInComponents[i]||void 0;return a?(a.unmount(),this.components.delete(t),delete this.dropInComponents[i],aA.debug("".concat(a.component.name,"::").concat(a.component.network,": Removed succcessfully")),!0):(aB(n,aW.WARN),!1)},e.prototype.getComponentInfo=function(e){return this.availableDropInComponents().find(function(t){return t.name===e})||{}},e.prototype.isDroppedIn=function(e){return this.components.has(this.getMethodName(e))},e.prototype.isAvailable=function(e){return!!this.availableDropInComponents().find(function(t){return e===t.name})},e.prototype.getListData=function(){return this.listData},e.prototype.availableDropInComponents=function(){return aM(this.listData,this.environment,this.metaInfo,{supportsGooglePay:this.supportsGooglePay})},e.prototype.refetchListData=function(e,t){return y(this,void 0,void 0,function(){return v(this,function(n){switch(n.label){case 0:return aN.addBreadcrumb({message:"Refetching list data",level:"info"}),[4,this.setupListData(t)];case 1:return n.sent(),[4,this.onRefetchListData(e)];case 2:return n.sent(),[2]}})})},e.prototype.onRefetchListData=function(e){return y(this,void 0,void 0,function(){var t;return v(this,function(n){switch(n.label){case 0:return this.passListDataAsProps(this.listData),(null==(t=this.config)?void 0:t.onListRefetch)&&"function"==typeof this.config.onListRefetch?[4,this.config.onListRefetch(this,e,this.listData)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.onComponentListChange=function(e,t){var n;(null==(n=this.config)?void 0:n.onComponentListChange)&&"function"==typeof this.config.onComponentListChange&&this.config.onComponentListChange(this,{availableComponents:e.availableComponents,addedComponents:e.addedComponents,removedComponents:e.removedComponents,chargeResponse:t})},e.prototype.passListDataAsProps=function(e){Object.entries(this.dropInComponents).forEach(function(t){t[1].updateListData(e)})},e.GOOGLE_PAY_TIMEOUT_MS=5e3,e}();function sc(e){return y(this,void 0,void 0,function(){return v(this,function(t){return[2,(new ss).initialise(e)]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.