(function(){try{var X=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ae=new Error().stack;ae&&(X._sentryDebugIds=X._sentryDebugIds||{},X._sentryDebugIds[ae]="69d070c0-3b8b-4975-9b59-621fb4e6e681",X._sentryDebugIdIdentifier="sentry-dbid-69d070c0-3b8b-4975-9b59-621fb4e6e681")}catch(j){}})();(function(X){X()})(function(){"use strict";var hp=Object.defineProperty,pp=Object.defineProperties;var fp=Object.getOwnPropertyDescriptors;var tn=Object.getOwnPropertySymbols,gp=Object.getPrototypeOf,bl=Object.prototype.hasOwnProperty,_l=Object.prototype.propertyIsEnumerable,mp=Reflect.get;var yl=(X,ae,j)=>ae in X?hp(X,ae,{enumerable:!0,configurable:!0,writable:!0,value:j}):X[ae]=j,g=(X,ae)=>{for(var j in ae||(ae={}))bl.call(ae,j)&&yl(X,j,ae[j]);if(tn)for(var j of tn(ae))_l.call(ae,j)&&yl(X,j,ae[j]);return X},V=(X,ae)=>pp(X,fp(ae));var Bt=(X,ae)=>{var j={};for(var je in X)bl.call(X,je)&&ae.indexOf(je)<0&&(j[je]=X[je]);if(X!=null&&tn)for(var je of tn(X))ae.indexOf(je)<0&&_l.call(X,je)&&(j[je]=X[je]);return j};var wl=(X,ae,j)=>mp(gp(X),j,ae);var ee=(X,ae,j)=>new Promise((je,Li)=>{var Ce=mt=>{try{gt(j.next(mt))}catch(Mi){Li(Mi)}},sn=mt=>{try{gt(j.throw(mt))}catch(Mi){Li(Mi)}},gt=mt=>mt.done?je(mt.value):Promise.resolve(mt.value).then(Ce,sn);gt((j=j.apply(X,ae)).next())});var al,ll,cl,ul,dl,hl,pl;const X={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function ae(i,e,t,r=!1){const n=String(e),s=(l,c)=>`\x1B[${c[0]}m${l}\x1B[${c[1]}m`,o=(l,c)=>c!=null&&typeof c=="string"?s(l,X[c]):c!=null&&Array.isArray(c)?c.reduce((d,h)=>o(d,h),l):c!=null&&c[l.trim()]!=null?o(l,c[l.trim()]):c!=null&&c["*"]!=null?o(l,c["*"]):l,a=null;return n.replace(/{{(.+?)}}/g,(l,c)=>{var h,v;const d=t[c]!=null?String(t[c]):r?"":l;return i.stylePrettyLogs?o(d,(v=(h=i==null?void 0:i.prettyLogStyles)==null?void 0:h[c])!=null?v:a)+s("",X.reset):d})}function j(i,e=2,t=0){return i!=null&&isNaN(i)?"":(i=i!=null?i+t:i,e===2?i==null?"--":i<10?"0"+i:i.toString():i==null?"---":i<10?"00"+i:i<100?"0"+i:i.toString())}function je(i){return{href:i.href,protocol:i.protocol,username:i.username,password:i.password,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,searchParams:[...i.searchParams].map(([e,t])=>({key:e,value:t})),hash:i.hash,origin:i.origin}}function Li(i){const e=new Set;return JSON.stringify(i,(t,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return"[Circular]";e.add(r)}return r})}function Ce(i,e){const t={seen:[],stylize:mt};return e!=null&&Es(t,e),gt(t.showHidden)&&(t.showHidden=!1),gt(t.depth)&&(t.depth=2),gt(t.colors)&&(t.colors=!0),gt(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Mi),Sr(t,i,t.depth)}Ce.colors=X,Ce.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function sn(i){return typeof i=="boolean"}function gt(i){return i===void 0}function mt(i){return i}function Mi(i,e){var r,n,s,o;const t=Ce.styles[e];return t!=null&&((n=(r=Ce==null?void 0:Ce.colors)==null?void 0:r[t])==null?void 0:n[0])!=null&&((o=(s=Ce==null?void 0:Ce.colors)==null?void 0:s[t])==null?void 0:o[1])!=null?"\x1B["+Ce.colors[t][0]+"m"+i+"\x1B["+Ce.colors[t][1]+"m":i}function Er(i){return typeof i=="function"}function ys(i){return typeof i=="string"}function Sl(i){return typeof i=="number"}function bs(i){return i===null}function _s(i,e){return Object.prototype.hasOwnProperty.call(i,e)}function on(i){return kr(i)&&ln(i)==="[object RegExp]"}function kr(i){return typeof i=="object"&&i!==null}function an(i){return kr(i)&&(ln(i)==="[object Error]"||i instanceof Error)}function ws(i){return kr(i)&&ln(i)==="[object Date]"}function ln(i){return Object.prototype.toString.call(i)}function xl(i){const e={};return i.forEach(t=>{e[t]=!0}),e}function Cl(i,e,t,r,n){const s=[];for(let o=0,a=e.length;o{o.match(/^\d+$/)||s.push(un(i,e,t,r,o,!0))}),s}function cn(i){return"["+Error.prototype.toString.call(i)+"]"}function Sr(i,e,t=0){if(i.customInspect&&e!=null&&Er(e)&&(e==null?void 0:e.inspect)!==Ce&&!(e!=null&&e.constructor&&(e==null?void 0:e.constructor.prototype)===e)){if(typeof e.inspect!="function"&&e.toString!=null)return e.toString();let d=e==null?void 0:e.inspect(t,i);return ys(d)||(d=Sr(i,d,t)),d}const r=Ht(i,e);if(r)return r;let n=Object.keys(e);const s=xl(n);try{i.showHidden&&Object.getOwnPropertyNames&&(n=Object.getOwnPropertyNames(e))}catch(d){}if(an(e)&&(n.indexOf("message")>=0||n.indexOf("description")>=0))return cn(e);if(n.length===0)if(Er(i.stylize)){if(Er(e)){const d=e.name?": "+e.name:"";return i.stylize("[Function"+d+"]","special")}if(on(e))return i.stylize(RegExp.prototype.toString.call(e),"regexp");if(ws(e))return i.stylize(Date.prototype.toISOString.call(e),"date");if(an(e))return cn(e)}else return e;let o="",a=!1,l=[`{ `,` }`];if(Array.isArray(e)&&(a=!0,l=[`[ `,` ]`]),Er(e)&&(o=" [Function"+(e.name?": "+e.name:"")+"]"),on(e)&&(o=" "+RegExp.prototype.toString.call(e)),ws(e)&&(o=" "+Date.prototype.toUTCString.call(e)),an(e)&&(o=" "+cn(e)),n.length===0&&(!a||e.length==0))return l[0]+o+l[1];if(t<0)return on(e)?i.stylize(RegExp.prototype.toString.call(e),"regexp"):i.stylize("[Object]","special");i.seen.push(e);let c;return a?c=Cl(i,e,t,s,n):c=n.map(d=>un(i,e,t,s,d,a)),i.seen.pop(),Al(c,o,l)}function un(i,e,t,r,n,s){let o,a,l={value:void 0};try{l.value=e[n]}catch(c){}try{Object.getOwnPropertyDescriptor&&(l=Object.getOwnPropertyDescriptor(e,n)||l)}catch(c){}if(l.get?l.set?a=i.stylize("[Getter/Setter]","special"):a=i.stylize("[Getter]","special"):l.set&&(a=i.stylize("[Setter]","special")),_s(r,n)||(o="["+n+"]"),a||(i.seen.indexOf(l.value)<0?(bs(t)?a=Sr(i,l.value,void 0):a=Sr(i,l.value,t-1),a.indexOf(` `)>-1&&(s?a=a.split(` `).map(c=>" "+c).join(` `).substr(2):a=` `+a.split(` `).map(c=>" "+c).join(` `))):a=i.stylize("[Circular]","special")),gt(o)){if(s&&n.match(/^\d+$/))return a;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=i.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,"\\'").replace(/(^"|"$)/g,"'"),o=i.stylize(o,"string"))}return o+": "+a}function Ht(i,e){if(gt(e))return i.stylize("undefined","undefined");if(ys(e)){const t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\\'")+"'";return i.stylize(t,"string")}if(Sl(e))return i.stylize(""+e,"number");if(sn(e))return i.stylize(""+e,"boolean");if(bs(e))return i.stylize("null","null")}function Al(i,e,t){return t[0]+(e===""?"":e+` `)+" "+i.join(`, `)+" "+t[1]}function Es(i,e){if(!e||!kr(e))return i;const t=g({},i),r=g({},e),n=Object.keys(e);let s=n.length;for(;s--;)t[n[s]]=r[n[s]];return i}function Tl(i,...e){const t={seen:[],stylize:mt};i!=null&&Es(t,i);const r=e[0];let n=0,s="",o="";if(typeof r=="string"){if(e.length===1)return r;let a,l=0;for(let c=0;c!s.includes("Error: ")))==null?void 0:n[i])}function Ss(i){var e,t,r;return(r=(t=(e=i==null?void 0:i.stack)==null?void 0:e.split(` `))==null?void 0:t.filter(n=>!n.includes("Error: ")))==null?void 0:r.reduce((n,s)=>(n.push(xs(s)),n),[])}function xs(i){var r;const e=(r=globalThis==null?void 0:globalThis.location)==null?void 0:r.origin,t={fullFilePath:void 0,fileName:void 0,fileNameWithLine:void 0,fileColumn:void 0,fileLine:void 0,filePath:void 0,filePathWithLine:void 0,method:void 0};if(i!=null){const n=i.match(Fl);if(n){t.filePath=n[1].replace(/\?.*$/,""),t.fullFilePath=`${e}${t.filePath}`;const s=t.filePath.split("/");t.fileName=s[s.length-1],t.fileLine=n[2],t.fileColumn=n[3],t.filePathWithLine=`${t.filePath}:${t.fileLine}`,t.fileNameWithLine=`${t.fileName}:${t.fileLine}`}}return t}function Cs(i){return i instanceof Error}function $l(i,e){return i.reduce((t,r)=>(Cs(r)?t.errors.push(As(r,e)):t.args.push(r),t),{args:[],errors:[]})}function As(i,e){const t=Ss(i).map(n=>ae(e,e.prettyErrorStackTemplate,g({},n),!0)),r={errorName:` ${i.name} `,errorMessage:Object.getOwnPropertyNames(i).reduce((n,s)=>(s!=="stack"&&n.push(i[s]),n),[]).join(", "),errorStack:t.join(` `)};return ae(e,e.prettyErrorTemplate,r)}function Nl(i,e,t,r){const n=(t.length>0&&e.length>0?` `:"")+t.join(` `);r.prettyInspectOptions.colors=r.stylePrettyLogs,console.log(i+Tl(r.prettyInspectOptions,...e)+n)}function Pl(i){console.log(Li(i))}function Rl(i){return!1}class Ll{constructor(e,t,r=4){var n,s,o,a,l,c,d,h,v,u,E,w,S,O,H,U,I,L,R,k,J,M,Q,se,pe,re;this.logObj=t,this.stackDepthLevel=r,this.runtime=Ol,this.settings={type:(n=e==null?void 0:e.type)!=null?n:"pretty",name:e==null?void 0:e.name,parentNames:e==null?void 0:e.parentNames,minLevel:(s=e==null?void 0:e.minLevel)!=null?s:0,argumentsArrayName:e==null?void 0:e.argumentsArrayName,hideLogPositionForProduction:(o=e==null?void 0:e.hideLogPositionForProduction)!=null?o:!1,prettyLogTemplate:(a=e==null?void 0:e.prettyLogTemplate)!=null?a:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} {{filePathWithLine}}{{nameWithDelimiterPrefix}} ",prettyErrorTemplate:(l=e==null?void 0:e.prettyErrorTemplate)!=null?l:` {{errorName}} {{errorMessage}} error stack: {{errorStack}}`,prettyErrorStackTemplate:(c=e==null?void 0:e.prettyErrorStackTemplate)!=null?c:` • {{fileName}} {{method}} {{filePathWithLine}}`,prettyErrorParentNamesSeparator:(d=e==null?void 0:e.prettyErrorParentNamesSeparator)!=null?d:":",prettyErrorLoggerNameDelimiter:(h=e==null?void 0:e.prettyErrorLoggerNameDelimiter)!=null?h:" ",stylePrettyLogs:(v=e==null?void 0:e.stylePrettyLogs)!=null?v:!0,prettyLogTimeZone:(u=e==null?void 0:e.prettyLogTimeZone)!=null?u:"UTC",prettyLogStyles:(E=e==null?void 0:e.prettyLogStyles)!=null?E:{logLevelName:{"*":["bold","black","bgWhiteBright","dim"],SILLY:["bold","white"],TRACE:["bold","whiteBright"],DEBUG:["bold","green"],INFO:["bold","blue"],WARN:["bold","yellow"],ERROR:["bold","red"],FATAL:["bold","redBright"]},dateIsoStr:"white",filePathWithLine:"white",name:["white","bold"],nameWithDelimiterPrefix:["white","bold"],nameWithDelimiterSuffix:["white","bold"],errorName:["bold","bgRedBright","whiteBright"],fileName:["yellow"],fileNameWithLine:"white"},prettyInspectOptions:(w=e==null?void 0:e.prettyInspectOptions)!=null?w:{colors:!0,compact:!1,depth:1/0},metaProperty:(S=e==null?void 0:e.metaProperty)!=null?S:"_meta",maskPlaceholder:(O=e==null?void 0:e.maskPlaceholder)!=null?O:"[***]",maskValuesOfKeys:(H=e==null?void 0:e.maskValuesOfKeys)!=null?H:["password"],maskValuesOfKeysCaseInsensitive:(U=e==null?void 0:e.maskValuesOfKeysCaseInsensitive)!=null?U:!1,maskValuesRegEx:e==null?void 0:e.maskValuesRegEx,prefix:[...(I=e==null?void 0:e.prefix)!=null?I:[]],attachedTransports:[...(L=e==null?void 0:e.attachedTransports)!=null?L:[]],overwrite:{mask:(R=e==null?void 0:e.overwrite)==null?void 0:R.mask,toLogObj:(k=e==null?void 0:e.overwrite)==null?void 0:k.toLogObj,addMeta:(J=e==null?void 0:e.overwrite)==null?void 0:J.addMeta,addPlaceholders:(M=e==null?void 0:e.overwrite)==null?void 0:M.addPlaceholders,formatMeta:(Q=e==null?void 0:e.overwrite)==null?void 0:Q.formatMeta,formatLogObj:(se=e==null?void 0:e.overwrite)==null?void 0:se.formatLogObj,transportFormatted:(pe=e==null?void 0:e.overwrite)==null?void 0:pe.transportFormatted,transportJSON:(re=e==null?void 0:e.overwrite)==null?void 0:re.transportJSON}}}log(e,t,...r){var h,v,u,E,w,S,O,H,U,I,L,R,k,J;if(e0?this._mask(n):n,o=this.logObj!=null?this._recursiveCloneAndExecuteFunctions(this.logObj):void 0,a=((u=this.settings.overwrite)==null?void 0:u.toLogObj)!=null?(E=this.settings.overwrite)==null?void 0:E.toLogObj(s,o):this._toLogObj(s,o),l=((w=this.settings.overwrite)==null?void 0:w.addMeta)!=null?(S=this.settings.overwrite)==null?void 0:S.addMeta(a,e,t):this._addMetaToLogObj(a,e,t);let c,d;return((O=this.settings.overwrite)==null?void 0:O.formatMeta)!=null&&(c=(H=this.settings.overwrite)==null?void 0:H.formatMeta(l==null?void 0:l[this.settings.metaProperty])),((U=this.settings.overwrite)==null?void 0:U.formatLogObj)!=null&&(d=(I=this.settings.overwrite)==null?void 0:I.formatLogObj(s,this.settings)),this.settings.type==="pretty"&&(c=c!=null?c:this._prettyFormatLogObjMeta(l==null?void 0:l[this.settings.metaProperty]),d=d!=null?d:this.runtime.prettyFormatLogObj(s,this.settings)),c!=null&&d!=null?((L=this.settings.overwrite)==null?void 0:L.transportFormatted)!=null?(R=this.settings.overwrite)==null||R.transportFormatted(c,d.args,d.errors,this.settings):this.runtime.transportFormatted(c,d.args,d.errors,this.settings):((k=this.settings.overwrite)==null?void 0:k.transportJSON)!=null?(J=this.settings.overwrite)==null||J.transportJSON(l):this.settings.type!=="hidden"&&this.runtime.transportJSON(l),this.settings.attachedTransports!=null&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach(M=>{M(l)}),l}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,t){var s,o,a,l;const r=V(g(g({},this.settings),e),{parentNames:((s=this.settings)==null?void 0:s.parentNames)!=null&&((o=this.settings)==null?void 0:o.name)!=null?[...this.settings.parentNames,this.settings.name]:((a=this.settings)==null?void 0:a.name)!=null?[this.settings.name]:void 0,prefix:[...this.settings.prefix,...(l=e==null?void 0:e.prefix)!=null?l:[]]});return new this.constructor(r,t!=null?t:this.logObj,this.stackDepthLevel)}_mask(e){const t=this.settings.maskValuesOfKeysCaseInsensitive!==!0?this.settings.maskValuesOfKeys:this.settings.maskValuesOfKeys.map(r=>r.toLowerCase());return e==null?void 0:e.map(r=>this._recursiveCloneAndMaskValuesOfKeys(r,t))}_recursiveCloneAndMaskValuesOfKeys(e,t,r=[]){var n,s;if(r.includes(e))return g({},e);if(typeof e=="object"&&e!==null&&r.push(e),this.runtime.isError(e)||this.runtime.isBuffer(e))return e;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Array.isArray(e))return e.map(o=>this._recursiveCloneAndMaskValuesOfKeys(o,t,r));if(e instanceof Date)return new Date(e.getTime());if(e instanceof URL)return je(e);if(e!==null&&typeof e=="object"){const o=this.runtime.isError(e)?this._cloneError(e):Object.create(Object.getPrototypeOf(e));return Object.getOwnPropertyNames(e).reduce((a,l)=>{var c;return a[l]=t.includes(((c=this.settings)==null?void 0:c.maskValuesOfKeysCaseInsensitive)!==!0?l:l.toLowerCase())?this.settings.maskPlaceholder:this._recursiveCloneAndMaskValuesOfKeys(e[l],t,r),a},o)}else{if(typeof e=="string"){let o=e;for(const a of((n=this.settings)==null?void 0:n.maskValuesRegEx)||[])o=o.replace(a,((s=this.settings)==null?void 0:s.maskPlaceholder)||"");return o}return e}}_recursiveCloneAndExecuteFunctions(e,t=[]){return this.isObjectOrArray(e)&&t.includes(e)?this.shallowCopy(e):(this.isObjectOrArray(e)&&t.push(e),Array.isArray(e)?e.map(r=>this._recursiveCloneAndExecuteFunctions(r,t)):e instanceof Date?new Date(e.getTime()):this.isObject(e)?Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=Object.getOwnPropertyDescriptor(e,n);if(s){Object.defineProperty(r,n,s);const o=e[n];r[n]=typeof o=="function"?o():this._recursiveCloneAndExecuteFunctions(o,t)}return r},Object.create(Object.getPrototypeOf(e))):e)}isObjectOrArray(e){return typeof e=="object"&&e!==null}isObject(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}shallowCopy(e){return Array.isArray(e)?[...e]:g({},e)}_toLogObj(e,t={}){return e=e==null?void 0:e.map(r=>this.runtime.isError(r)?this._toErrorObject(r):r),this.settings.argumentsArrayName==null?e.length===1&&!Array.isArray(e[0])&&this.runtime.isBuffer(e[0])!==!0&&!(e[0]instanceof Date)?t=typeof e[0]=="object"&&e[0]!=null?g(g({},e[0]),t):g({0:e[0]},t):t=g(g({},t),e):t=V(g({},t),{[this.settings.argumentsArrayName]:e}),t}_cloneError(e){const t=new e.constructor;return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=e[r]}),t}_toErrorObject(e){var t;return{nativeError:e,name:(t=e.name)!=null?t:"Error",message:e.message,stack:this.runtime.getErrorTrace(e)}}_addMetaToLogObj(e,t,r){return V(g({},e),{[this.settings.metaProperty]:this.runtime.getMeta(t,r,this.stackDepthLevel,this.settings.hideLogPositionForProduction,this.settings.name,this.settings.parentNames)})}_prettyFormatLogObjMeta(e){var o,a,l,c,d,h,v,u,E,w,S,O,H,U,I,L,R,k,J,M,Q,se,pe,re,Oe,Ie,ve;if(e==null)return"";let t=this.settings.prettyLogTemplate;const r={};t.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}")?t=t.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}","{{dateIsoStr}}"):this.settings.prettyLogTimeZone==="UTC"?(r.yyyy=(a=(o=e==null?void 0:e.date)==null?void 0:o.getUTCFullYear())!=null?a:"----",r.mm=j((l=e==null?void 0:e.date)==null?void 0:l.getUTCMonth(),2,1),r.dd=j((c=e==null?void 0:e.date)==null?void 0:c.getUTCDate(),2),r.hh=j((d=e==null?void 0:e.date)==null?void 0:d.getUTCHours(),2),r.MM=j((h=e==null?void 0:e.date)==null?void 0:h.getUTCMinutes(),2),r.ss=j((v=e==null?void 0:e.date)==null?void 0:v.getUTCSeconds(),2),r.ms=j((u=e==null?void 0:e.date)==null?void 0:u.getUTCMilliseconds(),3)):(r.yyyy=(w=(E=e==null?void 0:e.date)==null?void 0:E.getFullYear())!=null?w:"----",r.mm=j((S=e==null?void 0:e.date)==null?void 0:S.getMonth(),2,1),r.dd=j((O=e==null?void 0:e.date)==null?void 0:O.getDate(),2),r.hh=j((H=e==null?void 0:e.date)==null?void 0:H.getHours(),2),r.MM=j((U=e==null?void 0:e.date)==null?void 0:U.getMinutes(),2),r.ss=j((I=e==null?void 0:e.date)==null?void 0:I.getSeconds(),2),r.ms=j((L=e==null?void 0:e.date)==null?void 0:L.getMilliseconds(),3));const n=this.settings.prettyLogTimeZone==="UTC"?e==null?void 0:e.date:new Date(((R=e==null?void 0:e.date)==null?void 0:R.getTime())-((k=e==null?void 0:e.date)==null?void 0:k.getTimezoneOffset())*6e4);r.rawIsoStr=n==null?void 0:n.toISOString(),r.dateIsoStr=n==null?void 0:n.toISOString().replace("T"," ").replace("Z",""),r.logLevelName=e==null?void 0:e.logLevelName,r.fileNameWithLine=(M=(J=e==null?void 0:e.path)==null?void 0:J.fileNameWithLine)!=null?M:"",r.filePathWithLine=(se=(Q=e==null?void 0:e.path)==null?void 0:Q.filePathWithLine)!=null?se:"",r.fullFilePath=(re=(pe=e==null?void 0:e.path)==null?void 0:pe.fullFilePath)!=null?re:"";let s=(Oe=this.settings.parentNames)==null?void 0:Oe.join(this.settings.prettyErrorParentNamesSeparator);return s=s!=null&&(e==null?void 0:e.name)!=null?s+this.settings.prettyErrorParentNamesSeparator:void 0,r.name=(e==null?void 0:e.name)!=null||s!=null?(s!=null?s:"")+(e==null?void 0:e.name):"",r.nameWithDelimiterPrefix=r.name.length>0?this.settings.prettyErrorLoggerNameDelimiter+r.name:"",r.nameWithDelimiterSuffix=r.name.length>0?r.name+this.settings.prettyErrorLoggerNameDelimiter:"",((Ie=this.settings.overwrite)==null?void 0:Ie.addPlaceholders)!=null&&((ve=this.settings.overwrite)==null||ve.addPlaceholders(e,r)),ae(this.settings,t,r)}}class Ml extends Ll{constructor(e,t){const r=typeof window!="undefined"&&typeof document!="undefined",n=r?window.chrome!==void 0&&window.CSS!==void 0&&window.CSS.supports("color","green"):!1,s=r?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1;e=e||{},e.stylePrettyLogs=e.stylePrettyLogs&&r&&!n?!1:e.stylePrettyLogs,super(e,t,s?4:5)}log(e,t,...r){return super.log(e,t,...r)}silly(...e){return super.log(0,"SILLY",...e)}trace(...e){return super.log(1,"TRACE",...e)}debug(...e){return super.log(2,"DEBUG",...e)}info(...e){return super.log(3,"INFO",...e)}warn(...e){return super.log(4,"WARN",...e)}error(...e){return super.log(5,"ERROR",...e)}fatal(...e){return super.log(6,"FATAL",...e)}getSubLogger(e,t){return super.getSubLogger(e,t)}}var Bl=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};Bl.SENTRY_RELEASE={id:"5970b8b942040a9b53c262b9bc1aac43d679f866"};var dn=function(){return dn=Object.assign||function(i){for(var e,t=1,r=arguments.length;t(i.godaddy="godaddy",i.salesforce="salesforce",i.unknown="unknown",i))(hn||{});class xe{static isLocalEnv(){return!1}static isInsideIframe(){return window.top!==window.self}static isGoDaddyBackoffice(){return window.parent.location.hostname.endsWith(".godaddy.com")}static isDynamicElementReplacementMode(){return this.getPlatform()==="salesforce"||this.isMode("dynamic")}static getAccountId(){if(!window.gbWidgets.aid){const e=this.getConfigParam("acct");if(e&&typeof e=="string"){const t=decodeURIComponent(e).trim();/^[a-zA-Z0-9]{16}$/.test(t)||this.isLocalEnv()?window.gbWidgets.aid=t:ye.error(`Invalid ?acct= format: ${t}`)}!window.gbWidgets.aid&&!Bi.isCurrentHostnameGivebutter()&&ye.error("Could not find ?acct= attribute in script url")}return window.gbWidgets.aid}static getPlatform(){return window.gbWidgets.platform||(window.gbWidgets.platform=this.getConfigParam("p","unknown")),window.gbWidgets.platform}static isMode(e){var t;return window.gbWidgets.mode||(window.gbWidgets.mode=(t=this.getConfigParam("mode"))!=null?t:""),window.gbWidgets.mode.includes(e)}static getConfigParam(e,t=null){const r=document.currentScript;return r instanceof HTMLScriptElement?new URL(r.src).searchParams.get(e):t}}const Ts=Object.prototype.toString;function Os(i){switch(Ts.call(i)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ar(i,Error)}}function Hi(i,e){return Ts.call(i)===`[object ${e}]`}function pn(i){return Hi(i,"ErrorEvent")}function Is(i){return Hi(i,"DOMError")}function Ul(i){return Hi(i,"DOMException")}function fn(i){return Hi(i,"String")}function gn(i){return typeof i=="object"&&i!==null&&"__sentry_template_string__"in i&&"__sentry_template_values__"in i}function mn(i){return i===null||gn(i)||typeof i!="object"&&typeof i!="function"}function ci(i){return Hi(i,"Object")}function xr(i){return typeof Event!="undefined"&&Ar(i,Event)}function Vl(i){return typeof Element!="undefined"&&Ar(i,Element)}function Cr(i){return!!(i&&i.then&&typeof i.then=="function")}function zl(i){return ci(i)&&"nativeEvent"in i&&"preventDefault"in i&&"stopPropagation"in i}function Wl(i){return typeof i=="number"&&i!==i}function Ar(i,e){try{return i instanceof e}catch(t){return!1}}function jl(i){return!!(typeof i=="object"&&i!==null&&(i.__isVue||i._isVue))}function Ui(i,e=0){return typeof i!="string"||e===0||i.length<=e?i:`${i.slice(0,e)}...`}function Tr(i){return i&&i.Math==Math?i:void 0}const _e=typeof globalThis=="object"&&Tr(globalThis)||typeof window=="object"&&Tr(window)||typeof self=="object"&&Tr(self)||typeof global=="object"&&Tr(global)||function(){return this}()||{};function Gl(){return _e}function Fs(i,e,t){const r=t||_e,n=r.__SENTRY__=r.__SENTRY__||{};return n[i]||(n[i]=e())}const Ds=Gl(),Zl=80;function Kl(i,e={}){if(!i)return"";try{let t=i;const r=5,n=[];let s=0,o=0;const a=" > ",l=a.length;let c;const d=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||Zl;for(;t&&s++1&&o+n.length*l+c.length>=h));)n.push(c),o+=c.length,t=t.parentNode;return n.reverse().join(a)}catch(t){return""}}function ql(i,e){const t=i,r=[];let n,s,o,a,l;if(!t||!t.tagName)return"";if(Ds.HTMLElement&&t instanceof HTMLElement&&t.dataset&&t.dataset.sentryComponent)return t.dataset.sentryComponent;r.push(t.tagName.toLowerCase());const c=e&&e.length?e.filter(h=>t.getAttribute(h)).map(h=>[h,t.getAttribute(h)]):null;if(c&&c.length)c.forEach(h=>{r.push(`[${h[0]}="${h[1]}"]`)});else if(t.id&&r.push(`#${t.id}`),n=t.className,n&&fn(n))for(s=n.split(/\s+/),l=0;l{const s=Ns[n];t[n]=e[n],e[n]=s});try{return i()}finally{r.forEach(n=>{e[n]=t[n]})}}function Jl(){let i=!1;const e={enable:()=>{i=!0},disable:()=>{i=!1},isEnabled:()=>i};return Or?$s.forEach(t=>{e[t]=(...r)=>{i&&vn(()=>{_e.console[t](`${Xl}[${t}]:`,...r)})}}):$s.forEach(t=>{e[t]=()=>{}}),e}const G=Jl(),Ql=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ec(i){return i==="http"||i==="https"}function Vi(i,e=!1){const{host:t,path:r,pass:n,port:s,projectId:o,protocol:a,publicKey:l}=i;return`${a}://${l}${e&&n?`:${n}`:""}@${t}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function tc(i){const e=Ql.exec(i);if(!e){vn(()=>{console.error(`Invalid Sentry Dsn: ${i}`)});return}const[t,r,n="",s,o="",a]=e.slice(1);let l="",c=a;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const h=c.match(/^\d+/);h&&(c=h[0])}return Ps({host:s,pass:n,path:l,projectId:c,port:o,protocol:t,publicKey:r})}function Ps(i){return{protocol:i.protocol,publicKey:i.publicKey||"",pass:i.pass||"",host:i.host,port:i.port||"",path:i.path||"",projectId:i.projectId}}function ic(i){if(!Or)return!0;const{port:e,projectId:t,protocol:r}=i;return["protocol","publicKey","host","projectId"].find(o=>i[o]?!1:(G.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:t.match(/^\d+$/)?ec(r)?e&&isNaN(parseInt(e,10))?(G.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(G.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(G.error(`Invalid Sentry Dsn: Invalid projectId ${t}`),!1)}function rc(i){const e=typeof i=="string"?tc(i):Ps(i);if(!(!e||!ic(e)))return e}class vt extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function nc(i,e,t){try{Object.defineProperty(i,e,{value:t,writable:!0,configurable:!0})}catch(r){Or&&G.log(`Failed to add non-enumerable property "${e}" to object`,i)}}function sc(i){return Object.keys(i).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(i[e])}`).join("&")}function Rs(i){if(Os(i))return g({message:i.message,name:i.name,stack:i.stack},Ms(i));if(xr(i)){const e=g({type:i.type,target:Ls(i.target),currentTarget:Ls(i.currentTarget)},Ms(i));return typeof CustomEvent!="undefined"&&Ar(i,CustomEvent)&&(e.detail=i.detail),e}else return i}function Ls(i){try{return Vl(i)?Kl(i):Object.prototype.toString.call(i)}catch(e){return""}}function Ms(i){if(typeof i=="object"&&i!==null){const e={};for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e}else return{}}function oc(i,e=40){const t=Object.keys(Rs(i));if(t.sort(),!t.length)return"[object has no keys]";if(t[0].length>=e)return Ui(t[0],e);for(let r=t.length;r>0;r--){const n=t.slice(0,r).join(", ");if(!(n.length>e))return r===t.length?n:Ui(n,e)}return""}function At(i){return yn(i,new Map)}function yn(i,e){if(ac(i)){const t=e.get(i);if(t!==void 0)return t;const r={};e.set(i,r);for(const n of Object.keys(i))typeof i[n]!="undefined"&&(r[n]=yn(i[n],e));return r}if(Array.isArray(i)){const t=e.get(i);if(t!==void 0)return t;const r=[];return e.set(i,r),i.forEach(n=>{r.push(yn(n,e))}),r}return i}function ac(i){if(!ci(i))return!1;try{const e=Object.getPrototypeOf(i).constructor.name;return!e||e==="Object"}catch(e){return!0}}const Bs=50,Hs=/\(error: (.*)\)/,Us=/captureMessage|captureException/;function lc(...i){const e=i.sort((t,r)=>t[0]-r[0]).map(t=>t[1]);return(t,r=0)=>{const n=[],s=t.split(` `);for(let o=r;o1024)continue;const l=Hs.test(a)?a.replace(Hs,"$1"):a;if(!l.match(/\S*Error: /)){for(const c of e){const d=c(l);if(d){n.push(d);break}}if(n.length>=Bs)break}}return cc(n)}}function cc(i){if(!i.length)return[];const e=Array.from(i);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),Us.test(e[e.length-1].function||"")&&(e.pop(),Us.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,Bs).map(t=>V(g({},t),{filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}const bn="";function Vs(i){try{return!i||typeof i!="function"?bn:i.name||bn}catch(e){return bn}}const Ir={},zs={};function Ws(i,e){Ir[i]=Ir[i]||[],Ir[i].push(e)}function js(i,e){zs[i]||(e(),zs[i]=!0)}function Gs(i,e){const t=i&&Ir[i];if(t)for(const r of t)try{r(e)}catch(n){Or&&G.error(`Error while triggering instrumentation handler. Type: ${i} Name: ${Vs(r)} Error:`,n)}}function lt(){const i=_e,e=i.crypto||i.msCrypto;let t=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch(r){}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(t()&15)>>r/4).toString(16))}function uc(i){return i.exception&&i.exception.values?i.exception.values[0]:void 0}function Zs(i,e,t){const r=i.exception=i.exception||{},n=r.values=r.values||[],s=n[0]=n[0]||{};s.value||(s.value=e||""),s.type||(s.type="Error")}function Fr(i,e){const t=uc(i);if(!t)return;const r={type:"generic",handled:!0},n=t.mechanism;if(t.mechanism=g(g(g({},r),n),e),e&&"data"in e){const s=g(g({},n&&n.data),e.data);t.mechanism.data=s}}function Ks(i){if(i&&i.__sentry_captured__)return!0;try{nc(i,"__sentry_captured__",!0)}catch(e){}return!1}function dc(i){return Array.isArray(i)?i:[i]}function hc(i){return i&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(i.toString())}let Dr=null;function pc(i){const e="error";Ws(e,i),js(e,fc)}function fc(){Dr=_e.onerror,_e.onerror=function(i,e,t,r,n){return Gs("error",{column:r,error:n,line:t,msg:i,url:e}),Dr&&!Dr.__SENTRY_LOADER__?Dr.apply(this,arguments):!1},_e.onerror.__SENTRY_INSTRUMENTED__=!0}let $r=null;function gc(i){const e="unhandledrejection";Ws(e,i),js(e,mc)}function mc(){$r=_e.onunhandledrejection,_e.onunhandledrejection=function(i){return Gs("unhandledrejection",i),$r&&!$r.__SENTRY_LOADER__?$r.apply(this,arguments):!0},_e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function vc(){return"npm"}function yc(){const i=typeof WeakSet=="function",e=i?new WeakSet:[];function t(n){if(i)return e.has(n)?!0:(e.add(n),!1);for(let s=0;st?qs(i,e-1,t):r}function _n(i,e,t=1/0,r=1/0,n=yc()){const[s,o]=n;if(e==null||["number","boolean","string"].includes(typeof e)&&!Wl(e))return e;const a=bc(i,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const l=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:t;if(l===0)return a.replace("object ","");if(s(e))return"[Circular ~]";const c=e;if(c&&typeof c.toJSON=="function")try{const u=c.toJSON();return _n("",u,l-1,r,n)}catch(u){}const d=Array.isArray(e)?[]:{};let h=0;const v=Rs(e);for(const u in v){if(!Object.prototype.hasOwnProperty.call(v,u))continue;if(h>=r){d[u]="[MaxProperties ~]";break}const E=v[u];d[u]=_n(u,E,l-1,r,n),h++}return o(e),d}function bc(i,e){try{if(i==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(i==="domainEmitter")return"[DomainEmitter]";if(typeof global!="undefined"&&e===global)return"[Global]";if(typeof window!="undefined"&&e===window)return"[Window]";if(typeof document!="undefined"&&e===document)return"[Document]";if(jl(e))return"[VueViewModel]";if(zl(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Vs(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const t=_c(e);return/^HTML(\w*)Element$/.test(t)?`[HTMLElement: ${t}]`:`[object ${t}]`}catch(t){return`**non-serializable** (${t})`}}function _c(i){const e=Object.getPrototypeOf(i);return e?e.constructor.name:"null prototype"}function wc(i){return~-encodeURI(i).split(/%..|./).length}function Ec(i){return wc(JSON.stringify(i))}var Tt;(function(i){i[i.PENDING=0]="PENDING";const t=1;i[i.RESOLVED=t]="RESOLVED";const r=2;i[i.REJECTED=r]="REJECTED"})(Tt||(Tt={}));function ui(i){return new et(e=>{e(i)})}function wn(i){return new et((e,t)=>{t(i)})}class et{constructor(e){et.prototype.__init.call(this),et.prototype.__init2.call(this),et.prototype.__init3.call(this),et.prototype.__init4.call(this),this._state=Tt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new et((r,n)=>{this._handlers.push([!1,s=>{if(!e)r(s);else try{r(e(s))}catch(o){n(o)}},s=>{if(!t)n(s);else try{r(t(s))}catch(o){n(o)}}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new et((t,r)=>{let n,s;return this.then(o=>{s=!1,n=o,e&&e()},o=>{s=!0,n=o,e&&e()}).then(()=>{if(s){r(n);return}t(n)})})}__init(){this._resolve=e=>{this._setResult(Tt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Tt.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Tt.PENDING){if(Cr(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Tt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===Tt.RESOLVED&&t[1](this._value),this._state===Tt.REJECTED&&t[2](this._value),t[0]=!0)})}}}function kc(i){const e=[];function t(){return i===void 0||e.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(o){return new et((a,l)=>{let c=e.length;if(!c)return a(!0);const d=setTimeout(()=>{o&&o>0&&a(!1)},o);e.forEach(h=>{ui(h).then(()=>{--c||(clearTimeout(d),a(!0))},l)})})}return{$:e,add:n,drain:s}}const Ys=1e3;function zi(){return Date.now()/Ys}function Sc(){const{performance:i}=_e;if(!i||!i.now)return zi;const e=Date.now()-i.now(),t=i.timeOrigin==null?e:i.timeOrigin;return()=>(t+i.now())/Ys}const Xs=Sc();(()=>{const{performance:i}=_e;if(!i||!i.now)return;const e=3600*1e3,t=i.now(),r=Date.now(),n=i.timeOrigin?Math.abs(i.timeOrigin+t-r):e,s=nn+s.length,0),t=new Uint8Array(e);let r=0;for(const n of i)t.set(n,r),r+=n.length;return t}function Tc(i,e){const t=typeof i.data=="string"?En(i.data,e):i.data;return[At({type:"attachment",length:t.length,filename:i.filename,content_type:i.contentType,attachment_type:i.attachmentType}),t]}const Oc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Qs(i){return Oc[i]}function eo(i){if(!i||!i.sdk)return;const{name:e,version:t}=i.sdk;return{name:e,version:t}}function Ic(i,e,t,r){const n=i.sdkProcessingMetadata&&i.sdkProcessingMetadata.dynamicSamplingContext;return g(g(g({event_id:i.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!t&&r&&{dsn:Vi(r)}),n&&{trace:At(g({},n))})}function Fc(i,e,t){const r=[{type:"client_report"},{timestamp:zi(),discarded_events:i}];return di(e?{dsn:e}:{},[r])}const Dc=60*1e3;function $c(i,e=Date.now()){const t=parseInt(`${i}`,10);if(!isNaN(t))return t*1e3;const r=Date.parse(`${i}`);return isNaN(r)?Dc:r-e}function Nc(i,e){return i[e]||i.all||0}function Pc(i,e,t=Date.now()){return Nc(i,e)>t}function Rc(i,{statusCode:e,headers:t},r=Date.now()){const n=g({},i),s=t&&t["x-sentry-rate-limits"],o=t&&t["retry-after"];if(s)for(const a of s.trim().split(",")){const[l,c,,,d]=a.split(":",5),h=parseInt(l,10),v=(isNaN(h)?60:h)*1e3;if(!c)n.all=r+v;else for(const u of c.split(";"))u==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(n[u]=r+v):n[u]=r+v}else o?n.all=r+$c(o,r):e===429&&(n.all=r+60*1e3);return n}const Ae=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,kn="production";function Sn(){return Fs("globalEventProcessors",()=>[])}function Lc(i){Sn().push(i)}function Nr(i,e,t,r=0){return new et((n,s)=>{const o=i[r];if(e===null||typeof o!="function")n(e);else{const a=o(g({},e),t);Ae&&o.id&&a===null&&G.log(`Event processor "${o.id}" dropped event`),Cr(a)?a.then(l=>Nr(i,l,t,r+1).then(n)).then(null,s):Nr(i,a,t,r+1).then(n).then(null,s)}})}function Mc(i){const e=Xs(),t={sid:lt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Hc(t)};return i&&hi(t,i),t}function hi(i,e={}){if(e.user&&(!i.ipAddress&&e.user.ip_address&&(i.ipAddress=e.user.ip_address),!i.did&&!e.did&&(i.did=e.user.id||e.user.email||e.user.username)),i.timestamp=e.timestamp||Xs(),e.abnormal_mechanism&&(i.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(i.ignoreDuration=e.ignoreDuration),e.sid&&(i.sid=e.sid.length===32?e.sid:lt()),e.init!==void 0&&(i.init=e.init),!i.did&&e.did&&(i.did=`${e.did}`),typeof e.started=="number"&&(i.started=e.started),i.ignoreDuration)i.duration=void 0;else if(typeof e.duration=="number")i.duration=e.duration;else{const t=i.timestamp-i.started;i.duration=t>=0?t:0}e.release&&(i.release=e.release),e.environment&&(i.environment=e.environment),!i.ipAddress&&e.ipAddress&&(i.ipAddress=e.ipAddress),!i.userAgent&&e.userAgent&&(i.userAgent=e.userAgent),typeof e.errors=="number"&&(i.errors=e.errors),e.status&&(i.status=e.status)}function Bc(i,e){let t={};i.status==="ok"&&(t={status:"exited"}),hi(i,t)}function Hc(i){return At({sid:`${i.sid}`,init:i.init,started:new Date(i.started*1e3).toISOString(),timestamp:new Date(i.timestamp*1e3).toISOString(),status:i.status,errors:i.errors,did:typeof i.did=="number"||typeof i.did=="string"?`${i.did}`:void 0,duration:i.duration,abnormal_mechanism:i.abnormal_mechanism,attrs:{release:i.release,environment:i.environment,ip_address:i.ipAddress,user_agent:i.userAgent}})}const Uc=1;function Vc(i){const{spanId:e,traceId:t}=i.spanContext(),{data:r,op:n,parent_span_id:s,status:o,tags:a,origin:l}=Wi(i);return At({data:r,op:n,parent_span_id:s,span_id:e,status:o,tags:a,trace_id:t,origin:l})}function Wi(i){return zc(i)?i.getSpanJSON():typeof i.toJSON=="function"?i.toJSON():{}}function zc(i){return typeof i.getSpanJSON=="function"}function Wc(i){const{traceFlags:e}=i.spanContext();return!!(e&Uc)}function jc(i,e,t,r,n,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=i,l=V(g({},e),{event_id:e.event_id||t.event_id||lt(),timestamp:e.timestamp||zi()}),c=t.integrations||i.integrations.map(S=>S.name);Gc(l,i),qc(l,c),e.type===void 0&&Zc(l,i.stackParser);const d=Xc(r,t.captureContext);t.mechanism&&Fr(l,t.mechanism);const h=n&&n.getEventProcessors?n.getEventProcessors():[],v=ou().getScopeData();if(s){const S=s.getScopeData();oo(v,S)}if(d){const S=d.getScopeData();oo(v,S)}const u=[...t.attachments||[],...v.attachments];u.length&&(t.attachments=u),so(l,v);const E=[...h,...Sn(),...v.eventProcessors];return Nr(E,l,t).then(S=>(S&&Kc(S),typeof o=="number"&&o>0?Yc(S,o,a):S))}function Gc(i,e){const{environment:t,release:r,dist:n,maxValueLength:s=250}=e;"environment"in i||(i.environment="environment"in e?t:kn),i.release===void 0&&r!==void 0&&(i.release=r),i.dist===void 0&&n!==void 0&&(i.dist=n),i.message&&(i.message=Ui(i.message,s));const o=i.exception&&i.exception.values&&i.exception.values[0];o&&o.value&&(o.value=Ui(o.value,s));const a=i.request;a&&a.url&&(a.url=Ui(a.url,s))}const to=new WeakMap;function Zc(i,e){const t=_e._sentryDebugIds;if(!t)return;let r;const n=to.get(e);n?r=n:(r=new Map,to.set(e,r));const s=Object.keys(t).reduce((o,a)=>{let l;const c=r.get(a);c?l=c:(l=e(a),r.set(a,l));for(let d=l.length-1;d>=0;d--){const h=l[d];if(h.filename){o[h.filename]=t[a];break}}return o},{});try{i.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch(o){}}function Kc(i){const e={};try{i.exception.values.forEach(r=>{r.stacktrace.frames.forEach(n=>{n.debug_id&&(n.abs_path?e[n.abs_path]=n.debug_id:n.filename&&(e[n.filename]=n.debug_id),delete n.debug_id)})})}catch(r){}if(Object.keys(e).length===0)return;i.debug_meta=i.debug_meta||{},i.debug_meta.images=i.debug_meta.images||[];const t=i.debug_meta.images;Object.keys(e).forEach(r=>{t.push({type:"sourcemap",code_file:r,debug_id:e[r]})})}function qc(i,e){e.length>0&&(i.sdk=i.sdk||{},i.sdk.integrations=[...i.sdk.integrations||[],...e])}function Yc(i,e,t){if(!i)return null;const r=g(g(g(g(g({},i),i.breadcrumbs&&{breadcrumbs:i.breadcrumbs.map(n=>g(g({},n),n.data&&{data:Ut(n.data,e,t)}))}),i.user&&{user:Ut(i.user,e,t)}),i.contexts&&{contexts:Ut(i.contexts,e,t)}),i.extra&&{extra:Ut(i.extra,e,t)});return i.contexts&&i.contexts.trace&&r.contexts&&(r.contexts.trace=i.contexts.trace,i.contexts.trace.data&&(r.contexts.trace.data=Ut(i.contexts.trace.data,e,t))),i.spans&&(r.spans=i.spans.map(n=>{const s=Wi(n).data;return s&&(n.data=Ut(s,e,t)),n})),r}function Xc(i,e){if(!e)return i;const t=i?i.clone():new Ot;return t.update(e),t}function io(i,e){return Zi().captureEvent(i,e)}function ji(){return Zi().getClient()}function Jc(){return Zi().getScope()}function ro(i){return i.transaction}function no(i,e,t){const r=e.getOptions(),{publicKey:n}=e.getDsn()||{},{segment:s}=t&&t.getUser()||{},o=At({environment:r.environment||kn,release:r.release,user_segment:s,public_key:n,trace_id:i});return e.emit&&e.emit("createDsc",o),o}function Qc(i){const e=ji();if(!e)return{};const t=no(Wi(i).trace_id||"",e,Jc()),r=ro(i);if(!r)return t;const n=r&&r._frozenDynamicSamplingContext;if(n)return n;const{sampleRate:s,source:o}=r.metadata;s!=null&&(t.sample_rate=`${s}`);const a=Wi(r);return o&&o!=="url"&&(t.transaction=a.description),t.sampled=String(Wc(r)),e.emit&&e.emit("createDsc",t),t}function so(i,e){const{fingerprint:t,span:r,breadcrumbs:n,sdkProcessingMetadata:s}=e;eu(i,e),r&&ru(i,r),nu(i,t),tu(i,n),iu(i,s)}function oo(i,e){const{extra:t,tags:r,user:n,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:h,propagationContext:v,transactionName:u,span:E}=e;Gi(i,"extra",t),Gi(i,"tags",r),Gi(i,"user",n),Gi(i,"contexts",s),Gi(i,"sdkProcessingMetadata",a),o&&(i.level=o),u&&(i.transactionName=u),E&&(i.span=E),l.length&&(i.breadcrumbs=[...i.breadcrumbs,...l]),c.length&&(i.fingerprint=[...i.fingerprint,...c]),d.length&&(i.eventProcessors=[...i.eventProcessors,...d]),h.length&&(i.attachments=[...i.attachments,...h]),i.propagationContext=g(g({},i.propagationContext),v)}function Gi(i,e,t){if(t&&Object.keys(t).length){i[e]=g({},i[e]);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[e][r]=t[r])}}function eu(i,e){const{extra:t,tags:r,user:n,contexts:s,level:o,transactionName:a}=e,l=At(t);l&&Object.keys(l).length&&(i.extra=g(g({},l),i.extra));const c=At(r);c&&Object.keys(c).length&&(i.tags=g(g({},c),i.tags));const d=At(n);d&&Object.keys(d).length&&(i.user=g(g({},d),i.user));const h=At(s);h&&Object.keys(h).length&&(i.contexts=g(g({},h),i.contexts)),o&&(i.level=o),a&&(i.transaction=a)}function tu(i,e){const t=[...i.breadcrumbs||[],...e];i.breadcrumbs=t.length?t:void 0}function iu(i,e){i.sdkProcessingMetadata=g(g({},i.sdkProcessingMetadata),e)}function ru(i,e){i.contexts=g({trace:Vc(e)},i.contexts);const t=ro(e);if(t){i.sdkProcessingMetadata=g({dynamicSamplingContext:Qc(e)},i.sdkProcessingMetadata);const r=Wi(t).description;r&&(i.tags=g({transaction:r},i.tags))}}function nu(i,e){i.fingerprint=i.fingerprint?dc(i.fingerprint):[],e&&(i.fingerprint=i.fingerprint.concat(e)),i.fingerprint&&!i.fingerprint.length&&delete i.fingerprint}const su=100;let xn;class Ot{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ao()}static clone(e){return e?e.clone():new Ot}clone(){const e=new Ot;return e._breadcrumbs=[...this._breadcrumbs],e._tags=g({},this._tags),e._extra=g({},this._extra),e._contexts=g({},this._contexts),e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=g({},this._sdkProcessingMetadata),e._propagationContext=g({},this._propagationContext),e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}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,segment:void 0,username:void 0},this._session&&hi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=g(g({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=V(g({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=g(g({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=V(g({},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 t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t=typeof e=="function"?e(this):e;if(t instanceof Ot){const r=t.getScopeData();this._tags=g(g({},this._tags),r.tags),this._extra=g(g({},this._extra),r.extra),this._contexts=g(g({},this._contexts),r.contexts),r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(ci(t)){const r=e;this._tags=g(g({},this._tags),r.tags),this._extra=g(g({},this._extra),r.extra),this._contexts=g(g({},this._contexts),r.contexts),r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ao(),this}addBreadcrumb(e,t){const r=typeof t=="number"?t:su;if(r<=0)return this;const n=g({timestamp:zi()},e),s=this._breadcrumbs;return s.push(n),this._breadcrumbs=s.length>r?s.slice(-r):s,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}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:r,_tags:n,_extra:s,_user:o,_level:a,_fingerprint:l,_eventProcessors:c,_propagationContext:d,_sdkProcessingMetadata:h,_transactionName:v,_span:u}=this;return{breadcrumbs:e,attachments:t,contexts:r,tags:n,extra:s,user:o,level:a,fingerprint:l||[],eventProcessors:c,propagationContext:d,sdkProcessingMetadata:h,transactionName:v,span:u}}applyToEvent(e,t={},r=[]){so(e,this.getScopeData());const n=[...r,...Sn(),...this._eventProcessors];return Nr(n,e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=g(g({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const r=t&&t.event_id?t.event_id:lt();if(!this._client)return G.warn("No client configured on scope - will not capture exception!"),r;const n=new Error("Sentry syntheticException");return this._client.captureException(e,V(g({originalException:e,syntheticException:n},t),{event_id:r}),this),r}captureMessage(e,t,r){const n=r&&r.event_id?r.event_id:lt();if(!this._client)return G.warn("No client configured on scope - will not capture message!"),n;const s=new Error(e);return this._client.captureMessage(e,t,V(g({originalException:e,syntheticException:s},r),{event_id:n}),this),n}captureEvent(e,t){const r=t&&t.event_id?t.event_id:lt();return this._client?(this._client.captureEvent(e,V(g({},t),{event_id:r}),this),r):(G.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function ou(){return xn||(xn=new Ot),xn}function ao(){return{traceId:lt(),spanId:lt().substring(16)}}const Cn="7.116.0",lo=parseFloat(Cn),au=100;class co{constructor(e,t,r,n=lo){this._version=n;let s;t?s=t:(s=new Ot,s.setClient(e));let o;r?o=r:(o=new Ot,o.setClient(e)),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version(this.popScope(),n),n=>{throw this.popScope(),n}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const r=this._lastEventId=t&&t.event_id?t.event_id:lt(),n=new Error("Sentry syntheticException");return this.getScope().captureException(e,V(g({originalException:e,syntheticException:n},t),{event_id:r})),r}captureMessage(e,t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:lt(),s=new Error(e);return this.getScope().captureMessage(e,t,V(g({originalException:e,syntheticException:s},r),{event_id:n})),n}captureEvent(e,t){const r=t&&t.event_id?t.event_id:lt();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,V(g({},t),{event_id:r})),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:r,client:n}=this.getStackTop();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=au}=n.getOptions&&n.getOptions()||{};if(o<=0)return;const a=zi(),l=g({timestamp:a},e),c=s?vn(()=>s(l,t)):l;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:r}=this.getStackTop();r&&e(t)}run(e){const t=uo(this);try{e(this)}finally{uo(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(r){return Ae&&G.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const r=this._callExtensionMethod("startTransaction",e,t);return Ae&&!r&&(this.getClient()?G.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': Sentry.addTracingExtensions(); Sentry.init({...}); `):G.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,r=t.getSession();r&&Bc(r),this._sendSessionUpdate(),t.setSession()}startSession(e){const{scope:t,client:r}=this.getStackTop(),{release:n,environment:s=kn}=r&&r.getOptions()||{},{userAgent:o}=_e.navigator||{},a=Mc(g(g({release:n,environment:s,user:t.getUser()},o&&{userAgent:o}),e)),l=t.getSession&&t.getSession();return l&&l.status==="ok"&&hi(l,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),r=e.getSession();r&&t&&t.captureSession&&t.captureSession(r)}_callExtensionMethod(e,...t){const n=Pr().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]=="function")return n.extensions[e].apply(this,t);Ae&&G.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Pr(){return _e.__SENTRY__=_e.__SENTRY__||{extensions:{},hub:void 0},_e}function uo(i){const e=Pr(),t=An(e);return ho(e,i),t}function Zi(){const i=Pr();if(i.__SENTRY__&&i.__SENTRY__.acs){const e=i.__SENTRY__.acs.getCurrentHub();if(e)return e}return cu(i)}function lu(){return Zi().getIsolationScope()}function cu(i=Pr()){return(!uu(i)||An(i).isOlderThan(lo))&&ho(i,new co),An(i)}function uu(i){return!!(i&&i.__SENTRY__&&i.__SENTRY__.hub)}function An(i){return Fs("hub",()=>new co,i)}function ho(i,e){if(!i)return!1;const t=i.__SENTRY__=i.__SENTRY__||{};return t.hub=e,!0}function du(i,e){return e&&(i.sdk=i.sdk||{},i.sdk.name=i.sdk.name||e.name,i.sdk.version=i.sdk.version||e.version,i.sdk.integrations=[...i.sdk.integrations||[],...e.integrations||[]],i.sdk.packages=[...i.sdk.packages||[],...e.packages||[]]),i}function hu(i,e,t,r){const n=eo(t),s=g(g({sent_at:new Date().toISOString()},n&&{sdk:n}),!!r&&e&&{dsn:Vi(e)}),o="aggregates"in i?[{type:"sessions"},i]:[{type:"session"},i.toJSON()];return di(s,[o])}function pu(i,e,t,r){const n=eo(t),s=i.type&&i.type!=="replay_event"?i.type:"event";du(i,t&&t.sdk);const o=Ic(i,n,r,e);return delete i.sdkProcessingMetadata,di(o,[[{type:s},i]])}const fu="7";function gu(i){const e=i.protocol?`${i.protocol}:`:"",t=i.port?`:${i.port}`:"";return`${e}//${i.host}${t}${i.path?`/${i.path}`:""}/api/`}function mu(i){return`${gu(i)}${i.projectId}/envelope/`}function vu(i,e){return sc(g({sentry_key:i.publicKey,sentry_version:fu},e&&{sentry_client:`${e.name}/${e.version}`}))}function yu(i,e={}){const t=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return t||`${mu(i)}?${vu(i,r)}`}const po=[];function bu(i,e){const t={};return e.forEach(r=>{r&&go(i,r,t)}),t}function fo(i,e){for(const t of e)t&&t.afterAllSetup&&t.afterAllSetup(i)}function go(i,e,t){if(t[e.name]){Ae&&G.log(`Integration skipped because it was already installed: ${e.name}`);return}if(t[e.name]=e,po.indexOf(e.name)===-1&&(e.setupOnce(Lc,Zi),po.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(i),i.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);i.on("preprocessEvent",(n,s)=>r(n,s,i))}if(i.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),n=Object.assign((s,o)=>r(s,o,i),{id:e.name});i.addEventProcessor(n)}Ae&&G.log(`Integration installed: ${e.name}`)}function _u(i,e){return Object.assign(function(...r){return e(...r)},{id:i})}function vp(i){return i}function wu(i){let e="";for(const t of i){const r=Object.entries(t.tags),n=r.length>0?`|#${r.map(([s,o])=>`${s}:${o}`).join(",")}`:"";e+=`${t.name}@${t.unit}:${t.metric}|${t.metricType}${n}|T${t.timestamp} `}return e}function Eu(i,e,t,r){const n={sent_at:new Date().toISOString()};t&&t.sdk&&(n.sdk={name:t.sdk.name,version:t.sdk.version}),r&&e&&(n.dsn=Vi(e));const s=ku(i);return di(n,[s])}function ku(i){const e=wu(i);return[{type:"statsd",length:e.length},e]}const mo="Not capturing exception because it's already been captured.";class Su{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=rc(e.dsn):Ae&&G.warn("No DSN provided, client will not send events."),this._dsn){const t=yu(this._dsn,e);this._transport=e.transport(V(g({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,r){if(Ks(e)){Ae&&G.log(mo);return}let n=t&&t.event_id;return this._process(this.eventFromException(e,t).then(s=>this._captureEvent(s,t,r)).then(s=>{n=s})),n}captureMessage(e,t,r,n){let s=r&&r.event_id;const o=gn(e)?e:String(e),a=mn(e)?this.eventFromMessage(o,t,r):this.eventFromException(e,r);return this._process(a.then(l=>this._captureEvent(l,r,n)).then(l=>{s=l})),s}captureEvent(e,t,r){if(t&&t.originalException&&Ks(t.originalException)){Ae&&G.log(mo);return}let n=t&&t.event_id;const o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,o||r).then(a=>{n=a})),n}captureSession(e){typeof e.release!="string"?Ae&&G.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),hi(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>t.flush(e).then(n=>r&&n))):ui(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return Ae&&G.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];go(this,e,this._integrations),t||fo(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=pu(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of t.attachments||[])r=xc(r,Tc(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const n=this._sendEnvelope(r);n&&n.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){const t=hu(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){const n=`${e}:${t}`;Ae&&G.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(e){Ae&&G.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=Eu(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(r=>r(...t))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=bu(this,e),fo(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let r=!1,n=!1;const s=t.exception&&t.exception.values;if(s){n=!0;for(const l of s){const c=l.mechanism;if(c&&c.handled===!1){r=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&r)&&(hi(e,V(g({},r&&{status:"crashed"}),{errors:e.errors||Number(n||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new et(t=>{let r=0;const n=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),t(!0)):(r+=n,e&&r>=e&&(clearInterval(s),t(!1)))},n)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,r,n=lu()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),jc(s,e,t,r,this,n).then(a=>{if(a===null)return a;const l=g(g({},n.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&l){const{traceId:d,spanId:h,parentSpanId:v,dsc:u}=l;a.contexts=g({trace:{trace_id:d,span_id:h,parent_span_id:v}},a.contexts);const E=u||no(d,this,r);a.sdkProcessingMetadata=g({dynamicSamplingContext:E},a.sdkProcessingMetadata)}return a})}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then(n=>n.event_id,n=>{if(Ae){const s=n;s.logLevel==="log"?G.log(s.message):G.warn(s)}})}_processEvent(e,t,r){const n=this.getOptions(),{sampleRate:s}=n,o=yo(e),a=vo(e),l=e.type||"error",c=`before send for type \`${l}\``;if(a&&typeof s=="number"&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),wn(new vt(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const d=l==="replay_event"?"replay":l,v=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,v).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",d,e),new vt("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return u;const w=Cu(n,u,t);return xu(w,c)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",d,e),new vt(`${c} returned \`null\`, will not send event.`,"log");const E=r&&r.getSession();!o&&E&&this._updateSessionFromEvent(E,u);const w=u.transaction_info;if(o&&w&&u.transaction!==e.transaction){const S="custom";u.transaction_info=V(g({},w),{source:S})}return this.sendEvent(u,t),u}).then(null,u=>{throw u instanceof vt?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new vt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,t=>{Ae&&G.error("Error while sending event:",t)});Ae&&G.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[r,n]=t.split(":");return{reason:r,category:n,quantity:e[t]}})}}function xu(i,e){const t=`${e} must return \`null\` or a valid event.`;if(Cr(i))return i.then(r=>{if(!ci(r)&&r!==null)throw new vt(t);return r},r=>{throw new vt(`${e} rejected with ${r}`)});if(!ci(i)&&i!==null)throw new vt(t);return i}function Cu(i,e,t){const{beforeSend:r,beforeSendTransaction:n}=i;return vo(e)&&r?r(e,t):yo(e)&&n?n(e,t):e}function vo(i){return i.type===void 0}function yo(i){return i.type==="transaction"}const Au=30;function Tu(i,e,t=kc(i.bufferSize||Au)){let r={};const n=o=>t.drain(o);function s(o){const a=[];if(Js(o,(h,v)=>{const u=Qs(v);if(Pc(r,u)){const E=bo(h,v);i.recordDroppedEvent("ratelimit_backoff",u,E)}else a.push(h)}),a.length===0)return ui();const l=di(o[0],a),c=h=>{Js(l,(v,u)=>{const E=bo(v,u);i.recordDroppedEvent(h,Qs(u),E)})},d=()=>e({body:Cc(l,i.textEncoder)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&Ae&&G.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=Rc(r,h),h),h=>{throw c("network_error"),h});return t.add(d).then(h=>h,h=>{if(h instanceof vt)return Ae&&G.error("Skipped sending event because buffer is full."),c("queue_overflow"),ui();throw h})}return s.__sentry__baseTransport__=!0,{send:s,flush:n}}function bo(i,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(i)?i[1]:void 0}function Ou(i,e,t=[e],r="npm"){const n=i._metadata||{};n.sdk||(n.sdk={name:`sentry.javascript.${e}`,packages:t.map(s=>({name:`${r}:@sentry/${s}`,version:Cn})),version:Cn}),i._metadata=n}const yt=_e;let Iu=0;function _o(){return Iu>0}const pi=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__;function Fu(i,e){const t=On(i,e),r={type:e&&e.name,value:Pu(e)};return t.length&&(r.stacktrace={frames:t}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Du(i,e,t,r){const n=ji(),s=n&&n.getOptions().normalizeDepth,o={exception:{values:[{type:xr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Mu(e,{isUnhandledRejection:r})}]},extra:{__serialized__:qs(e,s)}};if(t){const a=On(i,t);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Tn(i,e){return{exception:{values:[Fu(i,e)]}}}function On(i,e){const t=e.stacktrace||e.stack||"",r=Nu(e);try{return i(t,r)}catch(n){}return[]}const $u=/Minified React error #\d+;/i;function Nu(i){if(i){if(typeof i.framesToPop=="number")return i.framesToPop;if($u.test(i.message))return 1}return 0}function Pu(i){const e=i&&i.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Ru(i,e,t,r){const n=t&&t.syntheticException||void 0,s=In(i,e,n,r);return Fr(s),s.level="error",t&&t.event_id&&(s.event_id=t.event_id),ui(s)}function Lu(i,e,t="info",r,n){const s=r&&r.syntheticException||void 0,o=Fn(i,e,s,n);return o.level=t,r&&r.event_id&&(o.event_id=r.event_id),ui(o)}function In(i,e,t,r,n){let s;if(pn(e)&&e.error)return Tn(i,e.error);if(Is(e)||Ul(e)){const o=e;if("stack"in e)s=Tn(i,e);else{const a=o.name||(Is(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Fn(i,l,t,r),Zs(s,l)}return"code"in o&&(s.tags=V(g({},s.tags),{"DOMException.code":`${o.code}`})),s}return Os(e)?Tn(i,e):ci(e)||xr(e)?(s=Du(i,e,t,n),Fr(s,{synthetic:!0}),s):(s=Fn(i,e,t,r),Zs(s,`${e}`),Fr(s,{synthetic:!0}),s)}function Fn(i,e,t,r){const n={};if(r&&t){const s=On(i,t);s.length&&(n.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(gn(e)){const{__sentry_template_string__:s,__sentry_template_values__:o}=e;return n.logentry={message:s,params:o},n}return n.message=e,n}function Mu(i,{isUnhandledRejection:e}){const t=oc(i),r=e?"promise rejection":"exception";return pn(i)?`Event \`ErrorEvent\` captured as ${r} with message \`${i.message}\``:xr(i)?`Event \`${Bu(i)}\` (type=${i.type}) captured as ${r}`:`Object captured as ${r} with keys: ${t}`}function Bu(i){try{const e=Object.getPrototypeOf(i);return e?e.constructor.name:void 0}catch(e){}}function Hu(i,{metadata:e,tunnel:t,dsn:r}){const n=g(g({event_id:i.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!t&&!!r&&{dsn:Vi(r)}),s=Uu(i);return di(n,[s])}function Uu(i){return[{type:"user_report"},i]}class Vu extends Su{constructor(e){const t=yt.SENTRY_SDK_SOURCE||vc();Ou(e,"browser",["browser"],t),super(e),e.sendClientReports&&yt.document&&yt.document.addEventListener("visibilitychange",()=>{yt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return Ru(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return Lu(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){pi&&G.warn("SDK not enabled, will not capture user feedback.");return}const t=Hu(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){pi&&G.log("No outcomes to send");return}if(!this._dsn){pi&&G.log("No dsn provided, will not send outcomes");return}pi&&G.log("Sending outcomes:",e);const t=Fc(e,this._options.tunnel&&Vi(this._dsn));this._sendEnvelope(t)}}let Ki;function zu(){if(Ki)return Ki;if(hc(yt.fetch))return Ki=yt.fetch.bind(yt);const i=yt.document;let e=yt.fetch;if(i&&typeof i.createElement=="function")try{const t=i.createElement("iframe");t.hidden=!0,i.head.appendChild(t);const r=t.contentWindow;r&&r.fetch&&(e=r.fetch),i.head.removeChild(t)}catch(t){pi&&G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Ki=e.bind(yt)}function Wu(){Ki=void 0}function ju(i,e=zu()){let t=0,r=0;function n(s){const o=s.body.length;t+=o,r++;const a=g({body:s.body,method:"POST",referrerPolicy:"origin",headers:i.headers,keepalive:t<=6e4&&r<15},i.fetchOptions);try{return e(i.url,a).then(l=>(t-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Wu(),t-=o,r--,wn(l)}}return Tu(i,n)}const Rr="?",Gu=30,Zu=40,Ku=50;function Dn(i,e,t,r){const n={filename:i,function:e,in_app:!0};return t!==void 0&&(n.lineno=t),r!==void 0&&(n.colno=r),n}const qu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xu=[Gu,i=>{const e=qu.exec(i);if(e){if(e[2]&&e[2].indexOf("eval")===0){const s=Yu.exec(e[2]);s&&(e[2]=s[1],e[3]=s[2],e[4]=s[3])}const[r,n]=wo(e[1]||Rr,e[2]);return Dn(n,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],Ju=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ed=[Ku,i=>{const e=Ju.exec(i);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const s=Qu.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}let r=e[3],n=e[1]||Rr;return[n,r]=wo(n,r),Dn(r,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],td=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,id=lc(...[Xu,ed,[Zu,i=>{const e=td.exec(i);return e?Dn(e[2],e[1]||Rr,+e[3],e[4]?+e[4]:void 0):void 0}]]),wo=(i,e)=>{const t=i.indexOf("safari-extension")!==-1,r=i.indexOf("safari-web-extension")!==-1;return t||r?[i.indexOf("@")!==-1?i.split("@")[0]:Rr,t?`safari-extension:${e}`:`safari-web-extension:${e}`]:[i,e]},Eo="GlobalHandlers",ko=(i={})=>{const e=g({onerror:!0,onunhandledrejection:!0},i);return{name:Eo,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(rd(t),xo("onerror")),e.onunhandledrejection&&(nd(t),xo("onunhandledrejection"))}}};_u(Eo,ko);function rd(i){pc(e=>{const{stackParser:t,attachStacktrace:r}=Co();if(ji()!==i||_o())return;const{msg:n,url:s,line:o,column:a,error:l}=e,c=l===void 0&&fn(n)?ad(n,s,o,a):So(In(t,l||n,void 0,r,!1),s,o,a);c.level="error",io(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function nd(i){gc(e=>{const{stackParser:t,attachStacktrace:r}=Co();if(ji()!==i||_o())return;const n=sd(e),s=mn(n)?od(n):In(t,n,void 0,r,!0);s.level="error",io(s,{originalException:n,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function sd(i){if(mn(i))return i;const e=i;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return i}function od(i){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}}function ad(i,e,t,r){const n=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=pn(i)?i.message:i,o="Error";const a=s.match(n);return a&&(o=a[1],s=a[2]),So({exception:{values:[{type:o,value:s}]}},e,t,r)}function So(i,e,t,r){const n=i.exception=i.exception||{},s=n.values=n.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(t,10))?void 0:t,h=fn(e)&&e.length>0?e:Yl();return l.length===0&&l.push({colno:c,filename:h,function:"?",in_app:!0,lineno:d}),i}function xo(i){pi&&G.log(`Global Handler attached: ${i}`)}function Co(){const i=ji();return i&&i.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ie(i,e){return new ie.InputMask(i,e)}let K=class El{static normalize(e){return Array.isArray(e)?e:[e,new El]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}};ie.ChangeDetails=K;function fi(i){return typeof i=="string"||i instanceof String}function Ao(i){var e;return typeof i=="object"&&i!=null&&(i==null||(e=i.constructor)==null?void 0:e.name)==="Object"}function To(i,e){return Array.isArray(e)?To(i,(t,r)=>e.includes(r)):Object.entries(i).reduce((t,r)=>{let[n,s]=r;return e(s,n)&&(t[n]=s),t},{})}const D={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function ld(i){switch(i){case D.LEFT:return D.FORCE_LEFT;case D.RIGHT:return D.FORCE_RIGHT;default:return i}}function $n(i){return i.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Lr(i,e){if(e===i)return!0;const t=Array.isArray(e),r=Array.isArray(i);let n;if(t&&r){if(e.length!=i.length)return!1;for(n=0;n=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}},ct=class rn{constructor(e){this._value="",this._update(g(g({},rn.DEFAULTS),e)),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new It(this.extractInput(e,t),e)}appendTail(e){return fi(e)&&(e=new It(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new K({inserted:e,rawInserted:e})):new K}_appendChar(e,t,r){t===void 0&&(t={});const n=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const o=this.state;this.state=n;let a=this.pad(t);const l=this._appendCharRaw(e,t);a=a.aggregate(l),l.rawInserted||a.equals(s)?s=a:this.state=o}if(s.inserted){let o,a=this.doValidate(t)!==!1;if(a&&r!=null){const l=this.state;if(this.overwrite===!0){o=r.state;for(let d=0;d1&&e!==0&&!l?D.NONE:n),h.tailShift=d-e),h.aggregate(this.remove(d)),l&&n!==D.NONE&&c===this.rawInputValue)if(n===D.FORCE_LEFT){let v;for(;c===this.rawInputValue&&(v=this.displayValue.length);)h.aggregate(new K({tailShift:-1})).aggregate(this.remove(v-1))}else n===D.FORCE_RIGHT&&a.unshift();return h.aggregate(this.append(r,s,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Lr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||rn.EMPTY_VALUES.includes(e)&&rn.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new K}};ct.DEFAULTS={skipInvalid:!0},ct.EMPTY_VALUES=[void 0,null,""],ie.Masked=ct;function cd(i){if(i==null)throw new Error("mask property should be defined");return i instanceof RegExp?ie.MaskedRegExp:fi(i)?ie.MaskedPattern:i===Date?ie.MaskedDate:i===Number?ie.MaskedNumber:Array.isArray(i)||i===Array?ie.MaskedDynamic:ie.Masked&&i.prototype instanceof ie.Masked?i:ie.Masked&&i instanceof ie.Masked?i.constructor:i instanceof Function?ie.MaskedFunction:(console.warn("Mask not found for mask",i),ie.Masked)}function Mr(i){if(!i)throw new Error("Options in not defined");if(ie.Masked){if(i.prototype instanceof ie.Masked)return{mask:i};const e=i instanceof ie.Masked?{mask:i}:Ao(i)&&i.mask instanceof ie.Masked?i:{},{mask:t=void 0}=e,r=Bt(e,["mask"]);if(t){const n=t.mask;return g(V(g({},To(t,(s,o)=>!o.startsWith("_"))),{mask:t.constructor,_mask:n}),r)}}return Ao(i)?g({},i):{mask:i}}function qi(i){if(ie.Masked&&i instanceof ie.Masked)return i;const e=Mr(i),t=cd(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}ie.createMask=qi;let Oo=class wr{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=fi(e)?new It(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof It)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof wr){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof ie.MaskedPattern))return new It(this.toString()).appendTo(e);const t=new K;for(let r=0;r=0)&&t.aggregate(e._appendPlaceholder(o)),a=n instanceof wr&&e._blocks[o]),a){const l=a.appendTail(n);t.aggregate(l);const c=n.toString().slice(l.rawInserted.length);c&&t.aggregate(e.append(c,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const n=e,{chunks:t}=n,r=Bt(n,["chunks"]);Object.assign(this,r),this.chunks=t.map(s=>{const o="chunks"in s?new wr:new It;return o.state=s,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,D.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,D.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,D.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,D.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,D.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,D.NONE),!0})}}let Io=class{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new K}nearestInputPos(e,t){t===void 0&&(t=D.NONE);const r=0,n=this._value.length;switch(t){case D.LEFT:case D.FORCE_LEFT:return r;case D.NONE:case D.RIGHT:case D.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.eager===!0||this.eager==="append",n=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,s=new K({inserted:this.char,rawInserted:n?this.char:""});return this._value=this.char,this._isRawInput=n&&(t.raw||t.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new K;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new It("")}appendTail(e){return fi(e)&&(e=new It(String(e))),e.appendTo(this)}append(e,t,r){const n=this._appendChar(e[0],t);return r!=null&&(n.tailShift+=this.appendTail(r).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}},Br=class{constructor(e){const c=e,{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:o,eager:a}=c,l=Bt(c,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=qi(l),Object.assign(this,{parent:t,isOptional:r,placeholderChar:n,displayChar:s,lazy:o,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new K}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new K;const r=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new K,this.masked.state=r),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new K:(this.isFilled=!0,new K({inserted:this.placeholderChar}))}_appendEager(){return new K}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=D.NONE);const r=0,n=this.value.length,s=Math.min(Math.max(e,r),n);switch(t){case D.LEFT:case D.FORCE_LEFT:return this.isComplete?s:r;case D.RIGHT:case D.FORCE_RIGHT:return this.isComplete?s:n;case D.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return V(g({},e),{_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)})}pad(e){return new K}};Br.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class dd extends ct{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}ie.MaskedRegExp=dd;let gi=class nn extends ct{constructor(e){super(V(g(g({},nn.DEFAULTS),e),{definitions:Object.assign({},Br.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)}))}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,n=!1;for(let o=0;od.indexOf(u)===0);h.sort((u,E)=>E.length-u.length);const v=h[0];if(v){const s=Mr(this.blocks[v]),{expose:u,repeat:E}=s,w=Bt(s,["expose","repeat"]),S=V(g({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},w),{repeat:E,parent:this}),O=E!=null?new ie.RepeatBlock(S):qi(S);O&&(this._blocks.push(O),u&&(this.exposeBlock=O),this._maskedBlocks[v]||(this._maskedBlocks[v]=[]),this._maskedBlocks[v].push(this._blocks.length-1)),o+=v.length-1;continue}}let a=t[o],l=a in e;if(a===nn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(a==="{"||a==="}"){r=!r;continue}if(a==="["||a==="]"){n=!n;continue}if(a===nn.ESCAPE_CHAR){if(++o,a=t[o],!a)break;l=!1}const c=l?new Br(V(g({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},Mr(e[a])),{parent:this})):new Io({char:a,eager:this.eager,isUnmasking:r});this._blocks.push(c)}}get state(){return V(g({},super.state),{_blocks:this._blocks.map(e=>e.state)})}set state(e){if(!e){this.reset();return}const n=e,{_blocks:t}=n,r=Bt(n,["_blocks"]);this._blocks.forEach((s,o)=>s.state=t[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new K;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let n=r;n{const l=n.extractTail(o,a);l.stop=this._findStopBefore(s),l.from=this._blockStartPos(s),l instanceof Oo&&(l.blockIndex=s),r.extend(l)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(s,o,a,l)=>{n+=s.extractInput(a,l,r)}),n}_findStopBefore(e){let t;for(let r=0;r{if(!o.lazy||e!=null){var a;t.aggregate(o._appendPlaceholder((a=o._blocks)==null?void 0:a.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;rt+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const s=this._mapPosToBlock(t),o=s&&n.index===s.index,a=n.offset,l=s&&o?s.offset:this._blocks[n.index].displayValue.length;if(r(this._blocks[n.index],n.index,a,l),s&&!o){for(let c=n.index+1;c{r.aggregate(n.remove(o,a))}),r}nearestInputPos(e,t){if(t===void 0&&(t=D.NONE),!this._blocks.length)return 0;const r=new ud(this,e);if(t===D.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===D.LEFT||t===D.FORCE_LEFT){if(t===D.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===D.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===D.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===D.RIGHT||t===D.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===D.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,D.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(n,s,o,a)=>{r+=n.totalInputPositions(o,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new K;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}};gi.DEFAULTS=V(g({},ct.DEFAULTS),{lazy:!0,placeholderChar:"_"}),gi.STOP_CHAR="`",gi.ESCAPE_CHAR="\\",gi.InputDefinition=Br,gi.FixedDefinition=Io,ie.MaskedPattern=gi;let Fo=class kl extends ct{constructor(e){super(g(g({},kl.DEFAULTS),e)),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const o=Mr(t),{expose:r}=o,n=Bt(o,["expose"]),s=qi(g({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return r&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,o=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,a=s.slice(o.length),l=this.currentMask,c=new K,d=l==null?void 0:l.state;return this.currentMask=this.doDispatch(e,g({},t),r),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),a&&(c.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new K;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return V(g({},e),{_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState})}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,n]=super.doPrepare(e,t);if(this.currentMask){let s;[r,s]=super.doPrepare(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}doPrepareChar(e,t){t===void 0&&(t={});let[r,n]=super.doPrepareChar(e,t);if(this.currentMask){let s;[r,s]=super.doPrepareChar(r,this.currentMaskFlags(t)),n=n.aggregate(s)}return[r,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new K;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return V(g({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state})}set state(e){const o=e,{compiledMasks:t,currentMaskRef:r,currentMask:n}=o,s=Bt(o,["compiledMasks","currentMaskRef","currentMask"]);t&&this.compiledMasks.forEach((a,l)=>a.state=t[l]),r!=null&&(this.currentMask=r,this.currentMask.state=n),super.state=s}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const o=e[r],{mask:n}=o,s=Bt(o,["mask"]);return Lr(t,s)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}};Fo.DEFAULTS=V(g({},ct.DEFAULTS),{dispatch:(i,e,t,r)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,s=e.compiledMasks.map((o,a)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,D.FORCE_LEFT);return o.rawInputValue!==n?(o.reset(),o.append(n,{raw:!0})):l||o.remove(c),o.append(i,e.currentMaskFlags(t)),o.appendTail(r),{index:a,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,D.FORCE_LEFT)))}});return s.sort((o,a)=>a.weight-o.weight||a.totalInputPositions-o.totalInputPositions),e.compiledMasks[s[0].index]}}),ie.MaskedDynamic=Fo;var Do;let Yi=class Qt extends ct{constructor(e){super(g(g({},Qt.DEFAULTS),e))}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+$n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map($n).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp($n(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(n.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&n.aggregate(this._appendChar("-")),[r,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let n=0;n0&&this.number>this.max&&(v=this.max),v!=null&&(this.autofix?(this._value=this.format(v,this).replace(Qt.UNMASKED_RADIX,this.radix),l||(l=s===this._value&&!t.tail)):a=!1),a&&(a=!!this._value.match(this._numberRegExp))}let c;a?c=new K({inserted:this._value.slice(s.length),rawInserted:l?"":e,skip:l}):(this._value=s,c=new K),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(d);return c.tailShift+=(h-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),n=this.value.slice(t),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+n));const o=this._separatorsCountFromSlice(r);return new K({tailShift:(o-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case D.NONE:case D.LEFT:case D.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const n=r+this.thousandsSeparator.length;if(e=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,n,s,o)=>n+o),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Qt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Qt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Qt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Qt.EMPTY_VALUES.includes(e)&&Qt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};Do=Yi,Yi.UNMASKED_RADIX=".",Yi.EMPTY_VALUES=[...ct.EMPTY_VALUES,0],Yi.DEFAULTS=V(g({},ct.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Do.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:i=>i.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})}),ie.MaskedNumber=Yi;const mi={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function vi(i,e,t){e===void 0&&(e=mi.MASKED),t===void 0&&(t=mi.MASKED);const r=qi(i);return n=>r.runIsolated(s=>(s[e]=n,s[t]))}function hd(i,e,t,r){return vi(e,t,r)(i)}ie.PIPE_TYPE=mi,ie.createPipe=vi,ie.pipe=hd;const $o=i=>[mi.TYPED,i],No=$o(mi.UNMASKED),Po=$o(mi.MASKED),Ro=(i=!0)=>({mask:[{mask:Number,scale:2,thousandsSeparator:",",padFractionalZeros:i,normalizeZeros:!0,radix:"."},{mask:""}]});vi(Ro(),...No),vi(Ro(),...Po);const Lo={mask:[{mask:Number,scale:0,thousandsSeparator:",",padFractionalZeros:!1,normalizeZeros:!0},{mask:""}]};vi(Lo,...No),vi(Lo,...Po);var pd={VITE_WIDGETS_STORYBOOK_DEFAULT_WIDGET_ID:"Lyoonp",VITE_STORYBOOK_DEFAULT_WIDGET_GOAL_BAR_PROGRESS_BAR_ID:"LZB9ZL",VITE_WIDGETS_STORYBOOK_DEFAULT_CAMPAIGN:"XK31VA",VITE_STORYBOOK_DEFAULT_WIDGET_FORM_ID:"j1aN6j",VITE_WIDGETS_STORYBOOK_DEFAULT_WIDGET_GOAL_BAR_PROGRESS_BAR_ID:"LZB9ZL",VITE_WIDGETS_STORYBOOK_DEFAULT_WIDGET_FORM_ID:"j1aN6j",VITE_BUGSNAG_API_KEY:"8ed0e204213fd5e04b51f527e3342b15",VITE_SENTRY_DSN:"https://f2aaa5bc878c1490c270c1977ab38718@o211933.ingest.us.sentry.io/4507063779000320",VITE_WIDGETS_SENTRY_DSN:"https://f2aaa5bc878c1490c270c1977ab38718@o211933.ingest.us.sentry.io/4507063779000320",VITE_STORYBOOK_DEFAULT_ACCOUNT:"YtzgXNe3pI1NLuij",VITE_STORYBOOK_DEFAULT_WIDGET_SIGNUP_FORM_ID:"g61RBL",VITE_GLOBAL_APP_URL:"https://givebutter.com",VITE_STORYBOOK_DEFAULT_WIDGET_GOAL_BAR_THERMOMETER_ID:"goQGnj",VITE_VERCEL_GIT_COMMIT_REF:"refs/heads/main",VITE_WIDGETS_STORYBOOK_DEFAULT_ACCOUNT:"YtzgXNe3pI1NLuij",VITE_WIDGETS_STORYBOOK_DEFAULT_WIDGET_SIGNUP_FORM_ID:"g61RBL",VITE_STORYBOOK_DEFAULT_WIDGET_ID:"Lyoonp",VITE_WIDGETS_STORYBOOK_DEFAULT_WIDGET_GOAL_BAR_THERMOMETER_ID:"goQGnj",VITE_API_URL:"https://givebutter.com",VITE_STORYBOOK_DEFAULT_CAMPAIGN:"XK31VA",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fd=()=>"refs/heads/main".includes("demo")?"demo":pd.VITE_VERCEL_ENV==="preview"?"preview":"production",Mo=new Vu({dsn:"https://f2aaa5bc878c1490c270c1977ab38718@o211933.ingest.us.sentry.io/4507063779000320",transport:ju,stackParser:id,environment:fd(),normalizeDepth:10,sampleRate:.8,tracesSampleRate:.5,integrations:[ko({onerror:!1,onunhandledrejection:!1})]}),Bo=new Ot,gd="https://givebutter.com/elements/api/v2",md=204;class vd extends Error{constructor(e,t,r){super(e),this.url=t,this.response=r}}const Ho=(i,e)=>ee(this,null,function*(){const t=decodeURIComponent(e).trim();return/^[a-zA-Z0-9]{6,}$/.test(t)||t==="signup-form-demo"?yield Hr(`${i}/elements/${t}`):{}}),yd=(i,e)=>ee(this,null,function*(){return yield Hr(`${i}/campaigns/${e}`)}),bd=(i,e)=>ee(this,null,function*(){return yield Hr(`${i}/campaigns/${e}/goal-status`)}),_d=()=>ee(this,null,function*(){const i=xe.getAccountId();if(i)return yield Hr(`${i}/ping`)}),wd=i=>({status:i.status,statusText:i.statusText,headers:[...i.headers.entries()].reduce((e,[t,r])=>(e[t]=r,e),{})}),Hr=i=>ee(this,null,function*(){const e=`${gd}/${i}`,t=yield fetch(e),r=wd(t);if(!t.ok){const n=new vd(`HTTP error with status: ${t.status}`,e,r);throw Mo.captureException(n,{captureContext:{contexts:{data:{url:e,response:V(g({},r),{data:yield t.json()})}}}}),n}return t.status===md?{}:t.json()}),Uo=[],Vo=[];function Ed(){const i=()=>{document.querySelectorAll("[data-gb-widget-id]").forEach(r=>{const n=r.getAttribute("data-gb-widget-id");if(r.parentNode&&n){const s=document.createElement("givebutter-widget");s.setAttribute("id",n),r.parentNode.replaceChild(s,r)}})};i();const e=new MutationObserver(t=>{t.forEach(r=>{r.addedNodes.forEach(n=>{n instanceof Element&&(n.hasAttribute("data-gb-widget-id")||n.querySelector("[data-gb-widget-id]"))&&i()})})});e.observe(document,{childList:!0,subtree:!0}),window.addEventListener("pagehide",()=>e.disconnect())}function kd(){document.querySelectorAll("[data-gb-account][data-gb-campaign]").forEach(function(e){if(e.hasAttribute("data-gb-processed"))return;e.setAttribute("data-gb-processed","true");const t=e.getAttribute("data-gb-account"),r=e.getAttribute("data-gb-campaign"),n=e.getAttribute("data-gb-type");if(!t||!r){ye.error("Missing data-gb-account or data-gb-campaign attributes.");return}let s;n!=="link"&&(s=document.createElement("givebutter-button"),s.setAttribute("account",t),s.setAttribute("campaign",r),s.setAttribute("hide-button","true"),document.body.appendChild(s),Vo.push(s));const o=function(a){var l,c;a.preventDefault(),n==="link"?window.location.href=`https://givebutter.com/c/${r}?source=widgets`:(c=(l=s.shadowRoot)==null?void 0:l.querySelector("button"))==null||c.click()};e.addEventListener("click",o),Uo.push({element:e,type:"click",listener:o})})}function zo(){xe.isDynamicElementReplacementMode()&&Ed(),kd()}const Sd=()=>{zo(),["DOMContentLoaded","popstate","hashchange"].forEach(e=>{window.addEventListener(e,zo)}),window.addEventListener("pagehide",function(){Uo.forEach(({element:e,type:t,listener:r})=>{e.removeEventListener(t,r)}),Vo.forEach(e=>{document.body.removeChild(e)})})},xd=()=>{const i=document.currentScript;if(i){const e=window.parent.document;if(!Array.from(e.querySelectorAll("script")).find(r=>r.src===i.src)){const r=window.parent.document.createElement("script");r.defer=!0,r.src=i.src,e.head.appendChild(r)}i.remove()}},Cd=(i,e)=>{let t=i==null?void 0:i.parentElement;for(;t;){if(t.classList.contains(e))return t;t=t.parentElement}return ye.error(`Could not find ancestor element with class ${e}`),null};ee(this,null,function*(){if(window.gbWidgets=window.gbWidgets||{},xe.getPlatform()===hn.godaddy&&xe.isInsideIframe()){xd();return}if(window.gbWidgets.init)return;Bo.setClient(Mo),Bo.setUser({accountId:xe.getAccountId(),platform:xe.getPlatform(),iframe:xe.isInsideIframe(),url:Bi.getParentHostUrl()}),_d(),Sd();const i=window.customElements.define;window.customElements.define=function(e,t,r){window.customElements.get(e)?ye.warn(`Custom element "${e}" is already defined. Skipping.`):i.call(window.customElements,e,t,r)};try{yield Promise.resolve().then(()=>wh),yield Promise.resolve().then(()=>$h),yield Promise.resolve().then(()=>Bh),yield Promise.resolve().then(()=>zh),yield Promise.resolve().then(()=>Yh),yield Promise.resolve().then(()=>l0),yield Promise.resolve().then(()=>Gh),yield Promise.resolve().then(()=>h0)}catch(e){ye.error("Error initializing web components",e)}window.gbWidgets.init=!0});/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ur=globalThis,Nn=Ur.ShadowRoot&&(Ur.ShadyCSS===void 0||Ur.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pn=Symbol(),Wo=new WeakMap;let jo=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Pn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Nn&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Wo.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Wo.set(t,e))}return e}toString(){return this.cssText}};const Go=i=>new jo(typeof i=="string"?i:i+"",void 0,Pn),Rn=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((r,n,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[s+1],i[0]);return new jo(t,i,Pn)},Zo=(i,e)=>{if(Nn)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const r=document.createElement("style"),n=Ur.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},Ko=Nn?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return Go(t)})(i):i;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:Ad,defineProperty:Td,getOwnPropertyDescriptor:Od,getOwnPropertyNames:Id,getOwnPropertySymbols:Fd,getPrototypeOf:Dd}=Object,Vt=globalThis,qo=Vt.trustedTypes,$d=qo?qo.emptyScript:"",Ln=Vt.reactiveElementPolyfillSupport,Xi=(i,e)=>i,Vr={toAttribute(i,e){switch(e){case Boolean:i=i?$d:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(r){t=null}}return t}},Mn=(i,e)=>!Ad(i,e),Yo={attribute:!0,type:String,converter:Vr,reflect:!1,hasChanged:Mn};(ll=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(cl=Vt.litPropertyMetadata)!=null||(Vt.litPropertyMetadata=new WeakMap);let yi=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Yo){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Td(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){var o;const{get:n,set:s}=(o=Od(this.prototype,e))!=null?o:{get(){return this[t]},set(a){this[t]=a}};return{get(){return n==null?void 0:n.call(this)},set(a){const l=n==null?void 0:n.call(this);s.call(this,a),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:Yo}static _$Ei(){if(this.hasOwnProperty(Xi("elementProperties")))return;const e=Dd(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Xi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Xi("properties"))){const t=this.properties,r=[...Id(t),...Fd(t)];for(const n of r)this.createProperty(n,t[n])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)t.unshift(Ko(n))}else e!==void 0&&t.push(Ko(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t,r;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)==null||r.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;const e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return Zo(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostDisconnected)==null?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){var s;const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){const o=(((s=r.converter)==null?void 0:s.toAttribute)!==void 0?r.converter:Vr).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(e,t){var s;const r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){const o=r.getPropertyOptions(n),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:Vr;this._$Em=n,this[n]=a.fromAttribute(t,o.type),this._$Em=null}}requestUpdate(e,t,r){var n;if(e!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(e)),!((n=r.hasChanged)!=null?n:Mn)(this[e],t))return;this.P(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,r){var n;this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$Em!==e&&((n=this._$Ej)!=null?n:this._$Ej=new Set).add(e)}_$ET(){return ee(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r,n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,a]of s)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostUpdated)==null?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};yi.elementStyles=[],yi.shadowRootOptions={mode:"open"},yi[Xi("elementProperties")]=new Map,yi[Xi("finalized")]=new Map,Ln==null||Ln({ReactiveElement:yi}),((ul=Vt.reactiveElementVersions)!=null?ul:Vt.reactiveElementVersions=[]).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ji=globalThis,zr=Ji.trustedTypes,Xo=zr?zr.createPolicy("lit-html",{createHTML:i=>i}):void 0,Jo="$lit$",zt=`lit$${Math.random().toFixed(9).slice(2)}$`,Qo="?"+zt,Nd=`<${Qo}>`,ei=document,Qi=()=>ei.createComment(""),er=i=>i===null||typeof i!="object"&&typeof i!="function",ea=Array.isArray,Pd=i=>ea(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Bn=`[ \f\r]`,tr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ta=/-->/g,ia=/>/g,ti=RegExp(`>|${Bn}(?:([^\\s"'>=/]+)(${Bn}*=${Bn}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),ra=/'/g,na=/"/g,sa=/^(?:script|style|textarea|title)$/i,Rd=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),te=Rd(1),Ft=Symbol.for("lit-noChange"),ue=Symbol.for("lit-nothing"),oa=new WeakMap,ii=ei.createTreeWalker(ei,129);function aa(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xo!==void 0?Xo.createHTML(e):e}const Ld=(i,e)=>{const t=i.length-1,r=[];let n,s=e===2?"":"",o=tr;for(let a=0;a"?(o=n!=null?n:tr,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?ti:d[3]==='"'?na:ra):o===na||o===ra?o=ti:o===ta||o===ia?o=tr:(o=ti,n=void 0);const u=o===ti&&i[a+1].startsWith("/>")?" ":"";s+=o===tr?l+Nd:h>=0?(r.push(c),l.slice(0,h)+Jo+l.slice(h)+zt+u):l+zt+(h===-2?a:u)}return[aa(i,s+(i[t]||"")+(e===2?"":"")),r]};class ir{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[c,d]=Ld(e,t);if(this.el=ir.createElement(c,r),ii.currentNode=this.el.content,t===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=ii.nextNode())!==null&&l.length0){n.textContent=zr?zr.emptyScript:"";for(let u=0;u2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ue}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(s===void 0)e=bi(this,e,t,0),o=!er(e)||e!==this._$AH&&e!==Ft,o&&(this._$AH=e);else{const a=e;let l,c;for(e=s[0],l=0;l{var s,o;const r=(s=t==null?void 0:t.renderBefore)!=null?s:e;let n=r._$litPart$;if(n===void 0){const a=(o=t==null?void 0:t.renderBefore)!=null?o:null;r._$litPart$=n=new rr(e.insertBefore(Qi(),a),a,void 0,t!=null?t:{})}return n._$AI(i),n};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let Wt=class extends yi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,r;const e=super.createRenderRoot();return(r=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=zd(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Ft}};Wt._$litElement$=!0,Wt.finalized=!0,(hl=globalThis.litElementHydrateSupport)==null||hl.call(globalThis,{LitElement:Wt});const Un=globalThis.litElementPolyfillSupport;Un==null||Un({LitElement:Wt}),((pl=globalThis.litElementVersions)!=null?pl:globalThis.litElementVersions=[]).push("4.0.5");const Wd=Rn` body > *[inert] { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; pointer-events: none; } body.overlays-scroll-lock { overflow: hidden; } body.overlays-scroll-lock-ios-fix { position: fixed; width: 100%; } html.overlays-scroll-lock-ios-fix { height: 100vh; } `,la={isIOS:/iPhone|iPad|iPod/i.test(navigator.userAgent),isMacSafari:navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&navigator.userAgent.indexOf("CriOS")===-1&&navigator.userAgent.indexOf("FxiOS")===-1&&navigator.appVersion.indexOf("Mac")!==-1};class Dt{static __createGlobalStyleNode(){const e=document.createElement("style");return e.setAttribute("data-overlays",""),e.textContent=Wd.cssText,document.head.appendChild(e),e}get list(){return this.__list}get shownList(){return this.__shownList}constructor(){this.__list=[],this.__shownList=[],this.__siblingsInert=!1,this.__blockingMap=new WeakMap,Dt.__globalStyleNode||(Dt.__globalStyleNode=Dt.__createGlobalStyleNode())}add(e){if(this.list.find(t=>e===t))throw new Error("controller instance is already added");return this.list.push(e),e}remove(e){if(!this.list.find(t=>e===t))throw new Error("could not find controller to remove");this.__list=this.list.filter(t=>t!==e),this.__shownList=this.shownList.filter(t=>t!==e)}show(e){this.list.find(t=>e===t)&&this.hide(e),this.__shownList.unshift(e),Array.from(this.__shownList).reverse().forEach((t,r)=>{t.elevation=r+1})}hide(e){if(!this.list.find(t=>e===t))throw new Error("could not find controller to hide");this.__shownList=this.shownList.filter(t=>t!==e)}teardown(){this.list.forEach(e=>{e.teardown()}),this.__list=[],this.__shownList=[],this.__siblingsInert=!1,Dt.__globalStyleNode&&(document.head.removeChild(Dt.__globalStyleNode),Dt.__globalStyleNode=void 0)}get siblingsInert(){return this.__siblingsInert}disableTrapsKeyboardFocusForAll(){this.shownList.forEach(e=>{e.trapsKeyboardFocus===!0&&e.disableTrapsKeyboardFocus&&e.disableTrapsKeyboardFocus({findNewTrap:!1})})}informTrapsKeyboardFocusGotEnabled(e){this.siblingsInert===!1&&e==="global"&&(this.__siblingsInert=!0)}informTrapsKeyboardFocusGotDisabled({disabledCtrl:e,findNewTrap:t=!0}={}){const r=this.shownList.find(n=>n!==e&&n.trapsKeyboardFocus===!0);r?t&&r.enableTrapsKeyboardFocus():this.siblingsInert===!0&&(this.__siblingsInert=!1)}requestToPreventScroll(){const{isIOS:e,isMacSafari:t}=la;document.body.classList.add("overlays-scroll-lock"),(e||t)&&document.body.classList.add("overlays-scroll-lock-ios-fix"),e&&document.documentElement.classList.add("overlays-scroll-lock-ios-fix")}requestToEnableScroll(){if(this.shownList.some(n=>n.preventsScroll===!0))return;const{isIOS:t,isMacSafari:r}=la;document.body.classList.remove("overlays-scroll-lock"),(t||r)&&document.body.classList.remove("overlays-scroll-lock-ios-fix"),t&&document.documentElement.classList.remove("overlays-scroll-lock-ios-fix")}requestToShowOnly(e){const t=this.shownList.filter(r=>r!==e);t.forEach(r=>r.hide()),this.__blockingMap.set(e,t)}retractRequestToShowOnly(e){this.__blockingMap.has(e)&&this.__blockingMap.get(e).forEach(r=>r.show())}}Dt.__globalStyleNode=void 0;const Vn=Symbol.for("lion::SingletonManagerClassStorage"),zn=globalThis||window;class jd{constructor(){this._map=zn[Vn]?zn[Vn]:zn[Vn]=new Map}set(e,t){this.has(e)||this._map.set(e,t)}get(e){return this._map.get(e)}has(e){return this._map.has(e)}}const Gd=new jd().get("@lion/ui::overlays::0.x")||new Dt;function Wn(){let i=document.activeElement||document.body;for(;i&&i.shadowRoot&&i.shadowRoot.activeElement;)i=i.shadowRoot.activeElement;return i}const ca=({visibility:i,display:e})=>i!=="hidden"&&e!=="none",Zd=({display:i})=>i==="contents";function Kd(i){if(!i||!i.isConnected||!ca(i.style))return!1;const e=window.getComputedStyle(i);return ca(e)?Zd(e)?!0:!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length):!1}function qd(i,e){const t=Math.max(i.tabIndex,0),r=Math.max(e.tabIndex,0);return t===0||r===0?r>t:t>r}function Yd(i,e){const t=[];for(;i.length>0&&e.length>0;)qd(i[0],e[0])?t.push(e.shift()):t.push(i.shift());return[...t,...i,...e]}function jn(i){const e=i.length;if(e<2)return i;const t=Math.ceil(e/2),r=jn(i.slice(0,t)),n=jn(i.slice(t));return Yd(r,n)}const Gn="matches"in Element.prototype?"matches":"msMatchesSelector";function Xd(i){return i[Gn]("input, select, textarea, button, object")?i[Gn](":not([disabled])"):i[Gn]("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Jd(i){return Xd(i)?Number(i.getAttribute("tabindex")||0):-1}function Qd(i){if(i.localName==="slot")return i.assignedNodes({flatten:!0});const{children:e}=i.shadowRoot||i;return e||[]}function eh(i){return i.nodeType!==Node.ELEMENT_NODE?!1:i.localName==="slot"?!0:Kd(i)}function ua(i,e){if(!eh(i))return!1;const t=i,r=Jd(t);let n=r>0;r>=0&&e.push(t);const s=Qd(t);for(let o=0;o0&&r(o)}}return i instanceof HTMLElement&&i.shadowRoot&&(t=jr(i.shadowRoot,e),t)?!0:(r(i),t)}const th={enter:13,space:32,escape:27,tab:9};function ih(i,e){const t=da(i);let r;t.length>=2?r=[t[0],t[t.length-1]]:t.length===1?r=[t[0],t[0]]:r=[i,i],e.shiftKey&&r.reverse();const[n,s]=r,o=Wn();o===i||t.includes(o)&&s!==o||(e.preventDefault(),n.focus())}function rh(i){const e=da(i),t=e.find(v=>v.hasAttribute("autofocus"))||i;let r,n;t===i&&(i.tabIndex=-1,i.style.setProperty("outline","none")),t.focus();function s(v){v.keyCode===th.tab&&ih(i,v)}function o(){r=document.createElement("div"),r.style.display="none",r.setAttribute("data-is-tab-detection-element",""),i.insertBefore(r,i.children[0]),n=new MutationObserver(v=>{for(const u of v)if(u.type==="childList"){const E=!Array.from(i.children).find(S=>S.hasAttribute("data-is-tab-detection-element")),w=Array.from(u.addedNodes).find(S=>S instanceof HTMLElement&&S.hasAttribute("data-is-tab-detection-element"));E&&!w&&(n.disconnect(),o())}}),n.observe(i,{childList:!0})}function a(){return r.compareDocumentPosition(document.activeElement)===Node.DOCUMENT_POSITION_PRECEDING}function l({resetToRoot:v=!1}={}){if(jr(i,Wn()))return;let u;v?u=i:u=e[a()?0:e.length-1],u&&u.focus()}function c(){window.removeEventListener("focusin",c),l()}function d(){setTimeout(()=>{jr(i,Wn())||l({resetToRoot:!0})}),window.addEventListener("focusin",c)}function h(){window.removeEventListener("keydown",s),window.removeEventListener("focusin",c),window.removeEventListener("focusout",d),n.disconnect(),Array.from(i.children).includes(r)&&i.removeChild(r),i.style.removeProperty("outline")}return window.addEventListener("keydown",s),window.addEventListener("focusout",d),o(),{disconnect:h}}const ha=Rn` .overlays { position: fixed; z-index: 200; } .overlays__overlay-container { display: flex; position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .overlays__overlay-container::backdrop { display: none; } .overlays__overlay-container--top-left { justify-content: flex-start; align-items: flex-start; } .overlays__overlay-container--top { justify-content: center; align-items: flex-start; } .overlays__overlay-container--top-right { justify-content: flex-end; align-items: flex-start; } .overlays__overlay-container--right { justify-content: flex-end; align-items: center; } .overlays__overlay-container--bottom-left { justify-content: flex-start; align-items: flex-end; } .overlays__overlay-container--bottom { justify-content: center; align-items: flex-end; } .overlays__overlay-container--bottom-right { justify-content: flex-end; align-items: flex-end; } .overlays__overlay-container--left { justify-content: flex-start; align-items: center; } .overlays__overlay-container--center { justify-content: center; align-items: center; } .overlays__overlay--bottom-sheet { width: 100%; } ::slotted(.overlays__overlay), .overlays__overlay { pointer-events: auto; } .overlays__backdrop { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background-color: #333333; display: none; } .overlays__backdrop--visible { display: block; } .overlays__backdrop--animation-in { animation: overlays-backdrop-fade-in 300ms; opacity: 0.3; } .overlays__backdrop--animation-out { animation: overlays-backdrop-fade-out 300ms; opacity: 0; } @keyframes overlays-backdrop-fade-in { from { opacity: 0; } } @keyframes overlays-backdrop-fade-out { from { opacity: 0.3; } } @media screen and (prefers-reduced-motion: reduce) { .overlays .overlays__backdrop--animation-in { animation: overlays-backdrop-fade-in 1ms; } .overlays .overlays__backdrop--animation-out { animation: overlays-backdrop-fade-out 1ms; } } dialog[data-overlay-outer-wrapper] { background-image: none; border-style: none; padding: 0px; } /** * We don't want to use pseudo el ::backdrop. * We have our own, that creates more flexibility wrt scrolling etc. */ dialog[data-overlay-outer-wrapper]::backdrop { display: none; } `,_i={supportsAdoptingStyleSheets:window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,adoptStyle:void 0,adoptStyles:void 0},Zn=new Map;function nh(i){return Array.from(i.cssRules).map(e=>e.cssText).join("")}function sh(i,e,{teardown:t=!1}={}){const r=i===document?document.body:i,n=e.cssText||nh(e);if(t){const s=Array.from(r.querySelectorAll("style"));for(const o of s)if(o.textContent===n){o.remove();break}}else{const s=document.createElement("style"),o=window.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=n,r.appendChild(s)}}function oh(i,e,{teardown:t=!1}={}){let r=!1;Zn.has(i)||Zn.set(i,[]);const n=Zn.get(i),s=n.find(o=>e===o);return s&&t?n.splice(n.indexOf(e),1):!s&&!t?n.push(e):(s&&!t||!s&&t)&&(r=!0),{haltFurtherExecution:r}}function ah(i,e,{teardown:t=!1}={}){const{haltFurtherExecution:r}=oh(i,e,{teardown:t});if(r)return;if(!_i.supportsAdoptingStyleSheets){sh(i,e,{teardown:t});return}const n=e instanceof CSSStyleSheet?e:e.styleSheet;if(!n)throw new Error("Please provide a CSSResultOrNative style");t?i.adoptedStyleSheets.includes(n)&&i.adoptedStyleSheets.splice(i.adoptedStyleSheets.indexOf(n),1):i.adoptedStyleSheets=[...i.adoptedStyleSheets,n]}function lh(i,e,{teardown:t=!1}={}){for(const r of e)_i.adoptStyle(i,r,{teardown:t})}_i.adoptStyle=ah,_i.adoptStyles=lh;function ch({wrappingDialogNodeL1:i,contentWrapperNodeL2:e,contentNodeL3:t}){if(!(e.isConnected||t.isConnected))throw new Error('[OverlayController] Could not find a render target, since the provided contentNode is not connected to the DOM. Make sure that it is connected, e.g. by doing "document.body.appendChild(contentNode)", before passing it on.');let r;const n=document.createComment("tempMarker");e.isConnected?(r=e.parentElement||e.getRootNode(),r.insertBefore(n,e),i.appendChild(e)):t.assignedSlot?(r=t.assignedSlot.parentElement||t.assignedSlot.getRootNode(),r.insertBefore(n,t.assignedSlot),i.appendChild(e),e.appendChild(t.assignedSlot)):(r=t.parentElement||t.getRootNode(),r.insertBefore(n,t),i.appendChild(e),e.appendChild(t)),r.insertBefore(i,n),r==null||r.removeChild(n)}function uh(){return ee(this,null,function*(){return Promise.resolve().then(()=>up)})}class ri extends EventTarget{constructor(e={},t=Gd){super(),this.manager=t,this.__sharedConfig=e,this.__activeElementRightBeforeHide=null,this.config={},this._defaultConfig={placementMode:void 0,contentNode:e.contentNode,contentWrapperNode:e.contentWrapperNode,invokerNode:e.invokerNode,backdropNode:e.backdropNode,referenceNode:void 0,elementToFocusAfterHide:e.invokerNode,inheritsReferenceWidth:"none",hasBackdrop:!1,isBlocking:!1,preventsScroll:!1,trapsKeyboardFocus:!1,hidesOnEsc:!1,hidesOnOutsideEsc:!1,hidesOnOutsideClick:!1,isTooltip:!1,invokerRelation:"description",visibilityTriggerFunction:void 0,handlesAccessibility:!1,popperConfig:{placement:"top",strategy:"fixed",modifiers:[{name:"preventOverflow",enabled:!0,options:{boundariesElement:"viewport",padding:8}},{name:"flip",options:{boundariesElement:"viewport",padding:16}},{name:"offset",enabled:!0,options:{offset:[0,8]}},{name:"arrow",enabled:!1}]},viewportConfig:{placement:"center"},zIndex:9999},this.manager.add(this),this._contentId=`overlay-content--${Math.random().toString(36).slice(2,10)}`,this.__originalAttrs=new Map,this.updateConfig(e),this.__hasActiveTrapsKeyboardFocus=!1,this.__hasActiveBackdrop=!0,this.__escKeyHandler=this.__escKeyHandler.bind(this)}get invoker(){return this.invokerNode}get content(){return this.__wrappingDialogNode}get placementMode(){var e;return(e=this.config)==null?void 0:e.placementMode}get invokerNode(){var e;return(e=this.config)==null?void 0:e.invokerNode}get referenceNode(){var e;return(e=this.config)==null?void 0:e.referenceNode}get contentNode(){var e;return(e=this.config)==null?void 0:e.contentNode}get contentWrapperNode(){var e;return this.__contentWrapperNode||((e=this.config)==null?void 0:e.contentWrapperNode)}get backdropNode(){var e;return this.__backdropNode||((e=this.config)==null?void 0:e.backdropNode)}get elementToFocusAfterHide(){var e;return this.__elementToFocusAfterHide||((e=this.config)==null?void 0:e.elementToFocusAfterHide)}get hasBackdrop(){var e;return!!this.backdropNode||((e=this.config)==null?void 0:e.hasBackdrop)}get isBlocking(){var e;return(e=this.config)==null?void 0:e.isBlocking}get preventsScroll(){var e;return(e=this.config)==null?void 0:e.preventsScroll}get trapsKeyboardFocus(){var e;return(e=this.config)==null?void 0:e.trapsKeyboardFocus}get hidesOnEsc(){var e;return(e=this.config)==null?void 0:e.hidesOnEsc}get hidesOnOutsideClick(){var e;return(e=this.config)==null?void 0:e.hidesOnOutsideClick}get hidesOnOutsideEsc(){var e;return(e=this.config)==null?void 0:e.hidesOnOutsideEsc}get inheritsReferenceWidth(){var e;return(e=this.config)==null?void 0:e.inheritsReferenceWidth}get handlesAccessibility(){var e;return(e=this.config)==null?void 0:e.handlesAccessibility}get isTooltip(){var e;return(e=this.config)==null?void 0:e.isTooltip}get invokerRelation(){var e;return(e=this.config)==null?void 0:e.invokerRelation}get popperConfig(){var e;return(e=this.config)==null?void 0:e.popperConfig}get viewportConfig(){var e;return(e=this.config)==null?void 0:e.viewportConfig}get visibilityTriggerFunction(){var e;return(e=this.config)==null?void 0:e.visibilityTriggerFunction}get _referenceNode(){return this.referenceNode||this.invokerNode}set elevation(e){this.__wrappingDialogNode.style.zIndex=`${this.config.zIndex+e}`}get elevation(){var e;return Number((e=this.contentWrapperNode)==null?void 0:e.style.zIndex)}updateConfig(e){var t,r,n;this.teardown(),this.__prevConfig=this.config,this.config=V(g(g(g({},this._defaultConfig),this.__sharedConfig),e),{popperConfig:V(g(g(g({},this._defaultConfig.popperConfig||{}),this.__sharedConfig.popperConfig||{}),e.popperConfig||{}),{modifiers:[...((t=this._defaultConfig.popperConfig)==null?void 0:t.modifiers)||[],...((r=this.__sharedConfig.popperConfig)==null?void 0:r.modifiers)||[],...((n=e.popperConfig)==null?void 0:n.modifiers)||[]]})}),this.__validateConfiguration(this.config),this._init(),this.__elementToFocusAfterHide=void 0}__validateConfiguration(e){if(!e.placementMode)throw new Error('[OverlayController] You need to provide a .placementMode ("global"|"local")');if(!["global","local"].includes(e.placementMode))throw new Error(`[OverlayController] "${e.placementMode}" is not a valid .placementMode, use ("global"|"local")`);if(!e.contentNode)throw new Error("[OverlayController] You need to provide a .contentNode");if(e.isTooltip&&!e.handlesAccessibility)throw new Error("[OverlayController] .isTooltip only takes effect when .handlesAccessibility is enabled")}_init(){this.__contentHasBeenInitialized||(this.__initContentDomStructure(),this.__contentHasBeenInitialized=!0),this.contentWrapperNode.removeAttribute("style"),this.contentWrapperNode.removeAttribute("class"),this.placementMode==="local"&&(ri.popperModule||(ri.popperModule=uh())),this.__handleOverlayStyles({phase:"init"}),this._handleFeatures({phase:"init"})}__handleOverlayStyles({phase:e}){var r;const t=(r=this.contentWrapperNode)==null?void 0:r.getRootNode();e==="init"?_i.adoptStyle(t,ha):e==="teardown"&&_i.adoptStyle(t,ha,{teardown:!0})}__initContentDomStructure(){var t,r;const e=document.createElement((t=this.config)!=null&&t._noDialogEl?"div":"dialog");e.setAttribute("role","none"),e.setAttribute("data-overlay-outer-wrapper",""),e.style.cssText=`display:none; z-index: ${this.config.zIndex}; padding: 0;`,this.__wrappingDialogNode=e,(r=this.config)!=null&&r.contentWrapperNode||(this.__contentWrapperNode=document.createElement("div")),this.contentWrapperNode.setAttribute("data-id","content-wrapper"),ch({wrappingDialogNodeL1:e,contentWrapperNodeL2:this.contentWrapperNode,contentNodeL3:this.contentNode}),e.open=!0,this.__wrappingDialogNode.style.display="none",this.contentWrapperNode.style.zIndex="1",getComputedStyle(this.contentNode).position==="absolute"&&(this.contentNode.style.position="static")}_handleZIndex({phase:e}){if(this.placementMode==="local"&&e==="setup"){const t=Number(getComputedStyle(this.contentNode).zIndex);(t<1||Number.isNaN(t))&&(this.contentNode.style.zIndex="1")}}__setupTeardownAccessibility({phase:e}){e==="init"?(this.__storeOriginalAttrs(this.contentNode,["role","id"]),this.invokerNode&&this.__storeOriginalAttrs(this.invokerNode,["aria-expanded","aria-labelledby","aria-describedby"]),this.contentNode.id||this.contentNode.setAttribute("id",this._contentId),this.isTooltip?(this.invokerNode&&this.invokerNode.setAttribute(this.invokerRelation==="label"?"aria-labelledby":"aria-describedby",this._contentId),this.contentNode.setAttribute("role","tooltip")):(this.invokerNode&&this.invokerNode.setAttribute("aria-expanded",`${this.isShown}`),this.contentNode.getAttribute("role")||this.contentNode.setAttribute("role","dialog"))):e==="teardown"&&this.__restoreOriginalAttrs()}__storeOriginalAttrs(e,t){const r={};t.forEach(n=>{r[n]=e.getAttribute(n)}),this.__originalAttrs.set(e,r)}__restoreOriginalAttrs(){for(const[e,t]of this.__originalAttrs)Object.entries(t).forEach(([r,n])=>{n!==null?e.setAttribute(r,n):e.removeAttribute(r)});this.__originalAttrs.clear()}get isShown(){var e;return((e=this.__wrappingDialogNode)==null?void 0:e.style.display)!=="none"}show(){return ee(this,arguments,function*(e=this.elementToFocusAfterHide){if(this._showComplete&&(yield this._showComplete),this._showComplete=new Promise(r=>{this._showResolve=r}),this.manager&&this.manager.show(this),this.isShown){this._showResolve();return}const t=new CustomEvent("before-show",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented||("HTMLDialogElement"in window&&this.__wrappingDialogNode instanceof HTMLDialogElement&&(this.__wrappingDialogNode.open=!0),this.__wrappingDialogNode.style.display="",this._keepBodySize({phase:"before-show"}),yield this._handleFeatures({phase:"show"}),this._keepBodySize({phase:"show"}),yield this._handlePosition({phase:"show"}),this.__elementToFocusAfterHide=e,this.dispatchEvent(new Event("show")),yield this._transitionShow({backdropNode:this.backdropNode,contentNode:this.contentNode})),this._showResolve()})}_handlePosition(t){return ee(this,arguments,function*({phase:e}){if(this.placementMode==="global"){const r=`overlays__overlay-container--${this.viewportConfig.placement}`;e==="show"?(this.contentWrapperNode.classList.add("overlays__overlay-container"),this.contentWrapperNode.classList.add(r),this.contentNode.classList.add("overlays__overlay")):e==="hide"&&(this.contentWrapperNode.classList.remove("overlays__overlay-container"),this.contentWrapperNode.classList.remove(r),this.contentNode.classList.remove("overlays__overlay"))}else this.placementMode==="local"&&e==="show"&&(yield this.__createPopperInstance(),this._popper.forceUpdate())})}_keepBodySize({phase:e}){var t,r;switch(e){case"before-show":this.__bodyClientWidth=document.body.clientWidth,this.__bodyClientHeight=document.body.clientHeight,this.__bodyMarginRightInline=document.body.style.marginRight,this.__bodyMarginBottomInline=document.body.style.marginBottom;break;case"show":{if(window.getComputedStyle){const l=window.getComputedStyle(document.body);this.__bodyMarginRight=parseInt(l.getPropertyValue("margin-right"),10),this.__bodyMarginBottom=parseInt(l.getPropertyValue("margin-bottom"),10)}else this.__bodyMarginRight=0,this.__bodyMarginBottom=0;const n=document.body.clientWidth-this.__bodyClientWidth,s=document.body.clientHeight-this.__bodyClientHeight,o=this.__bodyMarginRight+n,a=this.__bodyMarginBottom+s;(t=window.CSS)!=null&&t.number&&((r=document.body.attributeStyleMap)!=null&&r.set)?(document.body.attributeStyleMap.set("margin-right",CSS.px(o)),document.body.attributeStyleMap.set("margin-bottom",CSS.px(a))):(document.body.style.marginRight=`${o}px`,document.body.style.marginBottom=`${a}px`);break}case"hide":document.body.style.marginRight=this.__bodyMarginRightInline||"",document.body.style.marginBottom=this.__bodyMarginBottomInline||"";break}}hide(){return ee(this,null,function*(){if(this._hideComplete=new Promise(t=>{this._hideResolve=t}),this.__activeElementRightBeforeHide=this.contentNode.getRootNode().activeElement,this.manager&&this.manager.hide(this),!this.isShown){this._hideResolve();return}const e=new CustomEvent("before-hide",{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||(yield this._transitionHide({backdropNode:this.backdropNode,contentNode:this.contentNode}),"HTMLDialogElement"in window&&this.__wrappingDialogNode instanceof HTMLDialogElement&&this.__wrappingDialogNode.close(),this.__wrappingDialogNode.style.display="none",this._handleFeatures({phase:"hide"}),this._keepBodySize({phase:"hide"}),this.dispatchEvent(new Event("hide")),this._restoreFocus()),this._hideResolve()})}transitionHide(e){return ee(this,null,function*(){})}_transitionHide(r){return ee(this,arguments,function*({backdropNode:e,contentNode:t}){yield this.transitionHide({backdropNode:e,contentNode:t}),this._handlePosition({phase:"hide"}),e&&e.classList.remove("overlays__backdrop--animation-in")})}transitionShow(e){return ee(this,null,function*(){})}_transitionShow(e){return ee(this,null,function*(){yield this.transitionShow({backdropNode:this.backdropNode,contentNode:this.contentNode}),e.backdropNode&&e.backdropNode.classList.add("overlays__backdrop--animation-in")})}_restoreFocus(){this.__activeElementRightBeforeHide instanceof HTMLElement&&this.contentNode.contains(this.__activeElementRightBeforeHide)&&(this.elementToFocusAfterHide?(this.elementToFocusAfterHide.focus(),this.elementToFocusAfterHide.scrollIntoView({block:"center"})):this.__activeElementRightBeforeHide.blur())}toggle(){return ee(this,null,function*(){return this.isShown?this.hide():this.show()})}_handleFeatures({phase:e}){this._handleZIndex({phase:e}),this.preventsScroll&&this._handlePreventsScroll({phase:e}),this.isBlocking&&this._handleBlocking({phase:e}),this.hasBackdrop&&this._handleBackdrop({phase:e}),this.trapsKeyboardFocus&&this._handleTrapsKeyboardFocus({phase:e}),this.hidesOnEsc&&this._handleHidesOnEsc({phase:e}),this.hidesOnOutsideEsc&&this._handleHidesOnOutsideEsc({phase:e}),this.hidesOnOutsideClick&&this._handleHidesOnOutsideClick({phase:e}),this.handlesAccessibility&&this._handleAccessibility({phase:e}),this.inheritsReferenceWidth&&this._handleInheritsReferenceWidth(),this.visibilityTriggerFunction&&this._handleVisibilityTriggers({phase:e})}_handleVisibilityTriggers({phase:e}){typeof this.visibilityTriggerFunction=="function"&&(e==="init"&&(this.__visibilityTriggerHandler=this.visibilityTriggerFunction({phase:e,controller:this})),this.__visibilityTriggerHandler[e]&&this.__visibilityTriggerHandler[e]())}_handlePreventsScroll({phase:e}){switch(e){case"show":this.manager.requestToPreventScroll();break;case"hide":this.manager.requestToEnableScroll();break}}_handleBlocking({phase:e}){switch(e){case"show":this.manager.requestToShowOnly(this);break;case"hide":this.manager.retractRequestToShowOnly(this);break}}get hasActiveBackdrop(){return this.__hasActiveBackdrop}_handleBackdrop({phase:e}){var t;switch(e){case"init":{this.__backdropInitialized||((t=this.config)!=null&&t.backdropNode||(this.__backdropNode=document.createElement("div"),this.__backdropNode.classList.add("overlays__backdrop")),this.__wrappingDialogNode.prepend(this.backdropNode),this.__backdropInitialized=!0);break}case"show":this.config.hasBackdrop&&this.backdropNode.classList.add("overlays__backdrop--visible"),this.__hasActiveBackdrop=!0;break;case"hide":case"teardown":this.backdropNode.classList.remove("overlays__backdrop--visible"),this.__hasActiveBackdrop=!1;break}}get hasActiveTrapsKeyboardFocus(){return this.__hasActiveTrapsKeyboardFocus}_handleTrapsKeyboardFocus({phase:e}){e==="show"?("showModal"in this.__wrappingDialogNode&&(this.__wrappingDialogNode.close(),this.__wrappingDialogNode.showModal()),this.enableTrapsKeyboardFocus()):(e==="hide"||e==="teardown")&&this.disableTrapsKeyboardFocus()}enableTrapsKeyboardFocus(){this.__hasActiveTrapsKeyboardFocus||(this.manager&&this.manager.disableTrapsKeyboardFocusForAll(),this._containFocusHandler=rh(this.contentNode),this.__hasActiveTrapsKeyboardFocus=!0,this.manager&&this.manager.informTrapsKeyboardFocusGotEnabled(this.placementMode))}disableTrapsKeyboardFocus({findNewTrap:e=!0}={}){this.__hasActiveTrapsKeyboardFocus&&(this._containFocusHandler&&(this._containFocusHandler.disconnect(),this._containFocusHandler=void 0),this.__hasActiveTrapsKeyboardFocus=!1,this.manager&&this.manager.informTrapsKeyboardFocusGotDisabled({disabledCtrl:this,findNewTrap:e}))}__escKeyHandler(e){return e.key==="Escape"&&this.hide()}_handleHidesOnEsc({phase:e}){e==="show"?(this.contentNode.addEventListener("keyup",this.__escKeyHandler),this.invokerNode&&this.invokerNode.addEventListener("keyup",this.__escKeyHandler)):e==="hide"&&(this.contentNode.removeEventListener("keyup",this.__escKeyHandler),this.invokerNode&&this.invokerNode.removeEventListener("keyup",this.__escKeyHandler))}_handleHidesOnOutsideEsc({phase:e}){e==="show"?(this.__escKeyHandler=t=>t.key==="Escape"&&this.hide(),document.addEventListener("keyup",this.__escKeyHandler)):e==="hide"&&document.removeEventListener("keyup",this.__escKeyHandler)}_handleInheritsReferenceWidth(){if(!this._referenceNode||this.placementMode==="global")return;const e=`${this._referenceNode.getBoundingClientRect().width}px`;switch(this.inheritsReferenceWidth){case"max":this.contentWrapperNode.style.maxWidth=e;break;case"full":this.contentWrapperNode.style.width=e;break;case"min":this.contentWrapperNode.style.minWidth=e,this.contentWrapperNode.style.width="auto";break}}_handleHidesOnOutsideClick({phase:e}){const t=e==="show"?"addEventListener":"removeEventListener";if(e==="show"){let r=!1,n=!1;this.__onInsideMouseDown=()=>{r=!0},this.__onInsideMouseUp=()=>{n=!0},this.__onDocumentMouseUp=()=>{setTimeout(()=>{!r&&!n&&this.hide(),r=!1,n=!1})}}this.contentWrapperNode[t]("mousedown",this.__onInsideMouseDown,!0),this.contentWrapperNode[t]("mouseup",this.__onInsideMouseUp,!0),this.invokerNode&&(this.invokerNode[t]("mousedown",this.__onInsideMouseDown,!0),this.invokerNode[t]("mouseup",this.__onInsideMouseUp,!0)),document.documentElement[t]("mouseup",this.__onDocumentMouseUp,!0)}_handleAccessibility({phase:e}){(e==="init"||e==="teardown")&&this.__setupTeardownAccessibility({phase:e}),this.invokerNode&&!this.isTooltip&&this.invokerNode.setAttribute("aria-expanded",`${e==="show"}`)}teardown(){this.__handleOverlayStyles({phase:"teardown"}),this._handleFeatures({phase:"teardown"})}__createPopperInstance(){return ee(this,null,function*(){var e;if(this._popper&&(this._popper.destroy(),this._popper=void 0),ri.popperModule!==void 0){const{createPopper:t}=yield ri.popperModule;this._popper=t(this._referenceNode,this.contentWrapperNode,g({},(e=this.config)==null?void 0:e.popperConfig))}})}_hasDisabledInvoker(){return this.invokerNode?this.invokerNode.disabled||this.invokerNode.getAttribute("aria-disabled")==="true":!1}}ri.popperModule=void 0;const pa=new WeakMap;function dh(i,e){let t=e;for(;t;){if(pa.get(t)===i)return!0;t=Object.getPrototypeOf(t)}return!1}function hh(i){return e=>{if(dh(i,e))return e;const t=i(e);return pa.set(t,i),t}}function fa(i,e){if(typeof i!="object"||typeof e!="object"||i===null||e===null)return i===e;const t=Object.keys(i),r=Object.keys(e);if(t.length!==r.length)return!1;const n=s=>fa(i[s],e[s]);return t.every(n)}const ph=hh(i=>class extends i{static get properties(){return{opened:{type:Boolean,reflect:!0}}}constructor(){super(),this.opened=!1,this.config={},this.toggle=this.toggle.bind(this),this.open=this.open.bind(this),this.close=this.close.bind(this)}get config(){return this.__config}set config(t){const r=!fa(this.config,t);this._overlayCtrl&&r&&this._overlayCtrl.updateConfig(t),this.__config=t,this._overlayCtrl&&r&&this.__syncToOverlayController()}requestUpdate(t,r,n){super.requestUpdate(t,r,n),t==="opened"&&this.opened!==r&&this.dispatchEvent(new Event("opened-changed"))}_defineOverlay({contentNode:t,invokerNode:r,referenceNode:n,backdropNode:s,contentWrapperNode:o}){var l,c,d,h;const a=this._defineOverlayConfig()||{};return new ri(V(g(g({contentNode:t,invokerNode:r,referenceNode:n,backdropNode:s,contentWrapperNode:o},a),this.config),{popperConfig:V(g(g({},a.popperConfig||{}),((l=this.config)==null?void 0:l.popperConfig)||{}),{modifiers:[...((c=a.popperConfig)==null?void 0:c.modifiers)||[],...((h=(d=this.config)==null?void 0:d.popperConfig)==null?void 0:h.modifiers)||[]]})}))}_defineOverlayConfig(){return{placementMode:"local"}}updated(t){super.updated(t),t.has("opened")&&this._overlayCtrl&&!this.__blockSyncToOverlayCtrl&&this.__syncToOverlayController()}_setupOpenCloseListeners(){this.__closeEventInContentNodeHandler=t=>{t.stopPropagation(),this._overlayCtrl.hide()},this._overlayContentNode&&this._overlayContentNode.addEventListener("close-overlay",this.__closeEventInContentNodeHandler)}_teardownOpenCloseListeners(){this._overlayContentNode&&this._overlayContentNode.removeEventListener("close-overlay",this.__closeEventInContentNodeHandler)}firstUpdated(t){super.firstUpdated(t),this._setupOverlayCtrl()}disconnectedCallback(){super.disconnectedCallback(),this._overlayCtrl&&this._teardownOverlayCtrl()}get _overlayInvokerNode(){return Array.from(this.children).find(t=>t.slot==="invoker")}get _overlayReferenceNode(){}get _overlayBackdropNode(){return this.__cachedOverlayBackdropNode||(this.__cachedOverlayBackdropNode=Array.from(this.children).find(t=>t.slot==="backdrop")),this.__cachedOverlayBackdropNode}get _overlayContentNode(){return this._cachedOverlayContentNode||(this._cachedOverlayContentNode=Array.from(this.children).find(t=>t.slot==="content")||this.config.contentNode),this._cachedOverlayContentNode}get _overlayContentWrapperNode(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("#overlay-content-node-wrapper")}_setupOverlayCtrl(){this._overlayCtrl=this._defineOverlay({contentNode:this._overlayContentNode,contentWrapperNode:this._overlayContentWrapperNode,invokerNode:this._overlayInvokerNode,referenceNode:this._overlayReferenceNode,backdropNode:this._overlayBackdropNode}),this.__syncToOverlayController(),this.__setupSyncFromOverlayController(),this._setupOpenCloseListeners()}_teardownOverlayCtrl(){this._teardownOpenCloseListeners(),this.__teardownSyncFromOverlayController(),this._overlayCtrl.teardown()}_setOpenedWithoutPropertyEffects(t){return ee(this,null,function*(){this.__blockSyncToOverlayCtrl=!0,this.opened=t,yield this.updateComplete,this.__blockSyncToOverlayCtrl=!1})}__setupSyncFromOverlayController(){this.__onOverlayCtrlShow=()=>{this.opened=!0},this.__onOverlayCtrlHide=()=>{this.opened=!1},this.__onBeforeShow=t=>{const r=new CustomEvent("before-opened",{cancelable:!0});this.dispatchEvent(r),r.defaultPrevented&&(this._setOpenedWithoutPropertyEffects(this._overlayCtrl.isShown),t.preventDefault())},this.__onBeforeHide=t=>{const r=new CustomEvent("before-closed",{cancelable:!0});this.dispatchEvent(r),r.defaultPrevented&&(this._setOpenedWithoutPropertyEffects(this._overlayCtrl.isShown),t.preventDefault())},this._overlayCtrl.addEventListener("show",this.__onOverlayCtrlShow),this._overlayCtrl.addEventListener("hide",this.__onOverlayCtrlHide),this._overlayCtrl.addEventListener("before-show",this.__onBeforeShow),this._overlayCtrl.addEventListener("before-hide",this.__onBeforeHide)}__teardownSyncFromOverlayController(){this._overlayCtrl.removeEventListener("show",this.__onOverlayCtrlShow),this._overlayCtrl.removeEventListener("hide",this.__onOverlayCtrlHide),this._overlayCtrl.removeEventListener("before-show",this.__onBeforeShow),this._overlayCtrl.removeEventListener("before-hide",this.__onBeforeHide)}__syncToOverlayController(){this.opened?this._overlayCtrl.show():this._overlayCtrl.hide()}toggle(){return ee(this,null,function*(){yield this._overlayCtrl.toggle()})}open(){return ee(this,null,function*(){yield this._overlayCtrl.show()})}close(){return ee(this,null,function*(){yield this._overlayCtrl.hide()})}repositionOverlay(){const t=this._overlayCtrl;t.placementMode==="local"&&t._popper&&t._popper.update()}});function fh(){return{visibilityTriggerFunction:({controller:i})=>{function e(){i._hasDisabledInvoker()||i.toggle()}return{init:()=>{var t;(t=i.invokerNode)==null||t.addEventListener("click",e)},teardown:()=>{var t;(t=i.invokerNode)==null||t.removeEventListener("click",e)}}}}}const gh=()=>g({placementMode:"global",viewportConfig:{placement:"center"},hasBackdrop:!0,preventsScroll:!0,trapsKeyboardFocus:!0,hidesOnEsc:!0,handlesAccessibility:!0},fh());/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const jt=i=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,e)}):customElements.define(i,e)};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const mh={attribute:!0,type:String,converter:Vr,reflect:!1,hasChanged:Mn},vh=(i=mh,e,t)=>{const{kind:r,metadata:n}=t;let s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),s.set(t.name,i),r==="accessor"){const{name:o}=t;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,l,i)},init(a){return a!==void 0&&this.P(o,void 0,i),a}}}if(r==="setter"){const{name:o}=t;return function(a){const l=this[o];e.call(this,a),this.requestUpdate(o,l,i)}}throw Error("Unsupported decorator location: "+r)};function b(i){return(e,t)=>typeof t=="object"?vh(i,e,t):((r,n,s)=>{const o=n.hasOwnProperty(s);return n.constructor.createProperty(s,o?V(g({},r),{wrapped:!0}):r),o?Object.getOwnPropertyDescriptor(n,s):void 0})(i,e,t)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Gt(i){return b(V(g({},i),{state:!0,attribute:!1}))}const yh=Go('*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-4{bottom:16px}.left-4{left:16px}.right-0{right:0}.right-4{right:16px}.top-0{top:0}.top-1\\/2{top:50%}.top-4{top:16px}.z-10{z-index:10}.z-\\[2147483598\\]{z-index:2147483598}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:12px;margin-bottom:12px}.mb-1{margin-bottom:4px}.mb-10{margin-bottom:40px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.ml-auto{margin-left:auto}.mr-1{margin-right:4px}.mr-2{margin-right:8px}.mr-4{margin-right:16px}.mr-auto{margin-right:auto}.mt-1{margin-top:4px}.mt-4{margin-top:16px}.mt-\\[-2px\\]{margin-top:-2px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-32{height:128px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-\\[18px\\]{height:18px}.h-full{height:100%}.max-h-\\[90svh\\]{max-height:90svh}.max-h-\\[90vh\\]{max-height:90vh}.w-5{width:20px}.w-64{width:256px}.w-7{width:28px}.w-\\[400px\\]{width:400px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[3rem\\]{min-width:48px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[620px\\]{max-width:620px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-grow,.grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-\\[1rem\\]{gap:16px}.gap-x-2{-moz-column-gap:8px;column-gap:8px}.overflow-auto{overflow:auto}.overflow-visible{overflow:visible}.whitespace-nowrap{white-space:nowrap}.rounded-2xl{border-radius:16px}.rounded-full{border-radius:9999px}.rounded-md{border-radius:6px}.border{border-width:1px}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-blue-500{fill:#3b82f6}.p-1{padding:4px}.p-12{padding:48px}.p-2{padding:8px}.p-20{padding:80px}.p-4{padding:16px}.p-6{padding:24px}.px-4{padding-left:16px;padding-right:16px}.py-6{padding-top:24px;padding-bottom:24px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:24px;line-height:32px}.text-3xl{font-size:30px;line-height:36px}.text-5xl{font-size:48px;line-height:1}.text-base{font-size:16px;line-height:24px}.text-lg{font-size:18px;line-height:28px}.text-xl{font-size:20px;line-height:28px}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}:host{font-family:Matter,sans-serif}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\\:no-underline:hover{text-decoration-line:none}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width: 520px){.xs\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.min-\\[520px\\]\\:max-h-\\[80vh\\]{max-height:80vh}}@media (min-width: 640px){.sm\\:flex-row{flex-direction:row}}@media (min-width: 768px){.md\\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (prefers-color-scheme: dark){.dark\\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}}'),Gr=i=>{class e extends i{connectedCallback(){super.connectedCallback(),this.shadowRoot&&Zo(this.shadowRoot,[yh])}}return e};var bh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,wi=(i,e,t,r)=>{for(var n=r>1?void 0:r?_h(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=(r?o(e,t,n):o(n))||n);return r&&n&&bh(e,t,n),n},Kn=(i=>(i[i.MANUAL=0]="MANUAL",i[i.TIMED=1]="TIMED",i))(Kn||{});let Zt=class extends Gr(ph(Wt)){constructor(){super(...arguments),this.trigger=0,this.openDelay=5e3,this.closeButton=!1,this.hideOnEsc=!0,this.hideOnOutsideClick=!1}_defineOverlayConfig(){const i=document.createElement("div");return i.id="overlays-backdrop",V(g({},gh()),{hidesOnOutsideEsc:this.hideOnEsc,hidesOnOutsideClick:this.hideOnOutsideClick,backdropNode:i})}connectedCallback(){super.connectedCallback(),this.trigger===1&&setTimeout(()=>{this.toggle()},this.openDelay)}render(){return te` ${this.getBackdropStyles()}
${this.closeButton?this.renderCloseIcon():""}
`}renderCloseIcon(){return te`
`}getBackdropStyles(){return te` `}};wi([b({type:Number,attribute:"trigger"})],Zt.prototype,"trigger",2),wi([b({type:Number,attribute:"open-delay"})],Zt.prototype,"openDelay",2),wi([b({type:Boolean,attribute:"close-button"})],Zt.prototype,"closeButton",2),wi([b({type:Boolean,attribute:"hide-on-esc"})],Zt.prototype,"hideOnEsc",2),wi([b({type:Boolean,attribute:"hide-on-outside-click"})],Zt.prototype,"hideOnOutsideClick",2),Zt=wi([jt("givebutter-dialog")],Zt);const wh=Object.freeze(Object.defineProperty({__proto__:null,get GivebutterDialog(){return Zt},GivebutterDialogMode:Kn},Symbol.toStringTag,{value:"Module"}));let ga=class{constructor(e,{target:t,config:r,callback:n,skipInitial:s}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,t!==null&&this.t.add(t!=null?t:e),this.l=r,this.o=s!=null?s:this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(o=>{this.handleChanges(o),this.h.requestUpdate()}),e.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(e){var t;this.value=(t=this.callback)==null?void 0:t.call(this,e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}hostUpdated(){return ee(this,null,function*(){const e=this.u.takeRecords();(e.length||!this.o&&this.i)&&this.handleChanges(e),this.i=!1})}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};class Eh{constructor(e,t){this.icon=e,this.labelColor=t}getSVG(){switch(this.icon){case"none":return"";case"ticket":return this.ticketIcon();case"gift":return this.giftIcon();case"giving_hands":return this.givingHandsIcon();case"heart":default:return this.heartIcon()}}ticketIcon(){return te` `}heartIcon(){return te` `}giftIcon(){return te` `}givingHandsIcon(){return te` `}}class ma{static loadObjectFromLocalStorage(e,t){if(!window.localStorage)return ye.warn("localStorage is not available. Can't load data."),{};try{const r=window.localStorage.getItem(e);return t?JSON.parse(r!=null?r:"{}"):{}}catch(r){return ye.error(r),{}}}static saveObjectToLocalStorage(e,t){if(!window.localStorage)return ye.warn("localStorage is not available. Can't save data."),!1;try{return window.localStorage.setItem(e,JSON.stringify(t)),!0}catch(r){return ye.error(r),!1}}}const va="givebutter.analytics:0.0.0",nr={maxAge:60*24*30,qsPrefix:"gba_",temporaryKeyPrefix:"tmp_",qsThirdPartyKeys:["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","wbraid","gbraid","gclsrc","dclid","fbclid"],widgetFormKeys:["amount","frequency","fund","promo"]};class kh{constructor(){this._filterTemporaryKeys=function(e){e=Object.assign({},e);for(const t of Object.keys(e))t.startsWith("gb.element.")&&(xe.isLocalEnv()&&ye.debug("_filterTemporaryKeys) Filtering "+t),delete e[t]),t.toLowerCase().startsWith(nr.temporaryKeyPrefix)&&(xe.isLocalEnv()&&ye.debug("_filterTemporaryKeys) Filtering "+t),delete e[t]);return e},this.analyticsData={},this.loadFromStorage(),this.cleanup(),this.loadFromUrl(window.location.href)}static getGivebutterAnalytics(){return window.gbWidgets.analytics||(window.gbWidgets.analytics=new this),window.gbWidgets.analytics}getQueryString(){const e=this.getAll();return Object.keys(e).length===0?"":this.objToQueryString(e,null)}loadFromStorage(){this.analyticsData=ma.loadObjectFromLocalStorage(va,this.analyticsData)}set(e,t,r=!0){const n=Date.now();e=e.toLowerCase(),this.analyticsData[e]={v:t,c:n,e:n+nr.maxAge*60*1e3,f:r};let s=this.saveToStorage();return r&&this.forwardToGa(function(o){o.set(e,t)}),s}remove(e){delete this.analyticsData[e],this.saveToStorage()}cleanup(){const e=Date.now();let t=!1;for(let r in this.analyticsData)if(this.analyticsData[r].e<=e){xe.isLocalEnv()&&ye.debug("cleanup() Key '"+r+"' expired at "+this.analyticsData[r].e+" ("+(this.analyticsData[r].e-e)+")"),delete this.analyticsData[r],t=!0;break}return t?(this.saveToStorage(),!0):!1}saveToStorage(){xe.isLocalEnv()&&ye.debug("saveToStorage() - userAllowsTracking = false");const e=this._filterTemporaryKeys(this.analyticsData);return ma.saveObjectToLocalStorage(va,e)}loadFromUrl(e){const t=Bi.getQueryParams(e);for(let r in t)if(r.toLowerCase().startsWith(nr.qsPrefix)){const n=t[r];xe.isLocalEnv()&&ye.debug("loadFromUrl() qsPrefix match: "+r+" = "+n),this.set(r,n,!0)}for(const r of nr.qsThirdPartyKeys)t.hasOwnProperty(r)&&(xe.isLocalEnv()&&ye.debug("loadFromUrl() qsThirdPartyKeys match: "+r+" = "+t[r]),this.set(r,t[r],!0));for(const r of nr.widgetFormKeys)t.hasOwnProperty(r)?(xe.isLocalEnv()&&ye.debug("loadFromUrl() widgetFormKeys match: "+r+" = "+t[r]),this.set(r,t[r],!1)):this.analyticsData.hasOwnProperty(r)&&this.remove(r)}forwardToGa(e){if(window.ga&&window.ga.getAll){const t=window.ga.getAll();for(const r of t)xe.isLocalEnv()&&ye.debug("set) Forward to GA: "+r.get("trackingId")),e(r);return!0}return!1}getAll(){let e=Date.now(),t={};for(const r in this.analyticsData)this.analyticsData[r].e>=e&&(t[r]=this.analyticsData[r].v);return t}serializeKey(e,t){return e&&e.length>0?`${e}.${t}`:t}objToQueryString(e,t=null){const r=[];for(const n in e)if(e.hasOwnProperty(n)){const s=t?this.serializeKey(t,n):n,o=e[n];r.push(o!==null&&typeof o=="object"?this.objToQueryString(o,s):`${encodeURIComponent(s)}=${encodeURIComponent(o)}`)}return r.join("&")}}function ya(i){return i===null||typeof i=="undefined"}class $t{static string(e,t,r,n){return ya(t)?!1:n.includes(t)?t!==r:(ye.error(`Attribute ${e} is invalid. Accepted: ${n.join(", ")}.`),!1)}static number(e,t,r){return ya(t)?!1:typeof t!="number"||isNaN(t)?(ye.error(`Attribute ${e} must be a number`),!1):t!==r}static checkRequiredProps(e,t,r){for(const n of r)if(t.has(n)&&(!e[`${n}`]||e[`${n}`].length===0)){const s=`${n} attribute is required.`;return ye.error(s.charAt(0).toUpperCase()+s.slice(1)),!1}return!0}}var Sh=Object.defineProperty,Zr=(i,e,t,r)=>{for(var n=void 0,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=o(e,t,n)||n);return n&&Sh(e,t,n),n},Ei=(i=>(i[i.BUTTON=0]="BUTTON",i[i.DYNAMIC=1]="DYNAMIC",i[i.GIVING_FORM=2]="GIVING_FORM",i[i.SIGNUP_FORM=3]="SIGNUP_FORM",i[i.GOAL_BAR=4]="GOAL_BAR",i))(Ei||{});const sr=Gr((i=>{class e extends i{constructor(){super(...arguments),this.analytics=kh.getGivebutterAnalytics(),this.componentType=null,this.account=xe.getAccountId(),this.campaign="",this.widgetId="",this.embedUrl=""}shouldUpdate(r){const n=this.componentType===1||this.componentType===3?["account","id"]:["account","campaign"];return $t.checkRequiredProps(this,r,n)}}return Zr([b({type:String,attribute:"account"})],e.prototype,"account"),Zr([b({type:String,attribute:"campaign"})],e.prototype,"campaign"),Zr([b({type:String,attribute:"id"})],e.prototype,"widgetId"),Zr([b({type:String,attribute:"embed-url"})],e.prototype,"embedUrl"),e})(Wt)),vs=class vs{};vs._boolean={fromAttribute:e=>e==="true",toAttribute:e=>e?"true":"false"};let ut=vs;/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const xh=i=>i.strings===void 0;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const or={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ar=i=>(...e)=>({_$litDirective$:i,values:e});let Kr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const lr=(i,e)=>{var r;const t=i._$AN;if(t===void 0)return!1;for(const n of t)(r=n._$AO)==null||r.call(n,e,!1),lr(n,e);return!0},qr=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while((t==null?void 0:t.size)===0)},ba=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),Th(e)}};function Ch(i){this._$AN!==void 0?(qr(this),this._$AM=i,ba(this)):this._$AM=i}function Ah(i,e=!1,t=0){const r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(r))for(let s=t;s{var e,t;i.type==or.CHILD&&((e=i._$AP)!=null||(i._$AP=Ah),(t=i._$AQ)!=null||(i._$AQ=Ch))};class _a extends Kr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),ba(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,n;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)==null||r.call(this):(n=this.disconnected)==null||n.call(this)),t&&(lr(this,e),qr(this))}setValue(e){if(xh(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const qn=()=>new Oh;class Oh{}const Yn=new WeakMap,ki=ar(class extends _a{render(i){return ue}update(i,[e]){var r;const t=e!==this.Y;return t&&this.Y!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.Y=e,this.ht=(r=i.options)==null?void 0:r.host,this.rt(this.ct=i.element)),ue}rt(i){var e;if(typeof this.Y=="function"){const t=(e=this.ht)!=null?e:globalThis;let r=Yn.get(t);r===void 0&&(r=new WeakMap,Yn.set(t,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i)}else this.Y.value=i}get lt(){var i,e,t;return typeof this.Y=="function"?(e=Yn.get((i=this.ht)!=null?i:globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const bt=i=>i!=null?i:ue;/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const wa="important",Ih=" !"+wa,dt=ar(class extends Kr{constructor(i){var e;if(super(i),i.type!==or.ATTRIBUTE||i.name!=="style"||((e=i.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[e]){const{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const n=e[r];if(n!=null){this.ft.add(r);const s=typeof n=="string"&&n.endsWith(Ih);r.includes("-")||s?t.setProperty(r,s?n.slice(0,-11):n,s?wa:""):t[r]=n}}return Ft}});var Fh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,ge=(i,e,t,r)=>{for(var n=r>1?void 0:r?Dh(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=(r?o(e,t,n):o(n))||n);return r&&n&&Fh(e,t,n),n};const Ea="z-[2147483598]";var ka=(i=>(i.LINK="link",i.MODAL="modal",i))(ka||{}),Sa=(i=>(i.GIFT="gift",i.GIVING_HANDS="giving_hands",i.HEART="heart",i.NONE="none",i.TICKET="ticket",i))(Sa||{}),xa=(i=>(i.LEFT="left",i.RIGHT="right",i))(xa||{}),Ca=(i=>(i.BOTTOM_LEFT="bottom-left",i.BOTTOM_RIGHT="bottom-right",i.MIDDLE_LEFT="middle-left",i.MIDDLE_RIGHT="middle-right",i.NONE="",i.TOP_LEFT="top-left",i.TOP_RIGHT="top-right",i))(Ca||{});let de=class extends sr{constructor(){super(),this.isOpen=!1,this._embedUrl="",this._type="modal",this._hideButton=!1,this._label="Donate",this._hideLabel=!1,this._labelColor="#FFFFFF",this._backgroundColor="#3366FF",this._icon="heart",this._iconPosition="left",this._dropShadow=!0,this._borderRadius=100,this._borderColor="",this._borderWidth=0,this._buttonClass="",this._position="",this._verticalOffset=25,this._horizontalOffset=25,this._buttonTransformShow="scale(1)",this._buttonTransformHide="scale(0)",this._maxWidth="560px",this.contentRef=qn(),this.observer=new ga(this,{config:{childList:!0,subtree:!0},target:document.querySelector("[data-overlay-outer-wrapper]"),callback:i=>{const e=i[0];e&&(this.isOpen=e.removedNodes.length<=0)}}),this.componentType=Ei.BUTTON}set embedUrl(i){this._embedUrl=i}get embedUrl(){return this._embedUrl}set type(i){$t.string("type",i,this._type,Object.values(ka))&&(this._type=i)}get type(){return this._type}set hideButton(i){this._hideButton=i}get hideButton(){return this._hideButton}set label(i){this._label=i}get label(){return this._label}set hideLabel(i){this._hideLabel=i}get hideLabel(){return this._hideLabel}set labelColor(i){this._labelColor=i}get labelColor(){return this._labelColor}set backgroundColor(i){this._backgroundColor=i}get backgroundColor(){return this._backgroundColor}set icon(i){$t.string("icon",i,this._icon,Object.values(Sa))&&(this._icon=i)}get icon(){return this._icon}set iconPosition(i){$t.string("icon-position",i,this._iconPosition,Object.values(xa))&&(this._iconPosition=i)}get iconPosition(){return this._iconPosition}set dropShadow(i){this._dropShadow=i}get dropShadow(){return this._dropShadow}set borderRadius(i){$t.number("border-radius",i,this._borderRadius)&&(this._borderRadius=i)}get borderRadius(){return this._borderRadius}set borderColor(i){this._borderColor=i}get borderColor(){return this._borderColor}set borderWidth(i){$t.number("border-width",i,this._borderWidth)&&(this._borderWidth=i)}get borderWidth(){return this._borderWidth}set buttonClass(i){this._buttonClass=i}get buttonClass(){return this._buttonClass}set position(i){$t.string("position",i,this._position,Object.values(Ca))&&(this._position=i)}get position(){return this._position}set verticalOffset(i){$t.number("vertical-offset",i,this._verticalOffset)&&(this._verticalOffset=i)}get verticalOffset(){return this._verticalOffset}set horizontalOffset(i){$t.number("horizontal-offset",i,this._horizontalOffset)&&(this._horizontalOffset=i)}get horizontalOffset(){return this._horizontalOffset}set buttonTransformShow(i){this._buttonTransformShow=i}get buttonTransformShow(){return this._buttonTransformShow}set buttonTransformHide(i){this._buttonTransformHide=i}get buttonTransformHide(){return this._buttonTransformHide}set maxWidth(i){this._maxWidth=i}get maxWidth(){return this._maxWidth}firstUpdated(){this.observer.observe(this.contentRef.value)}render(){const i=`${this.getDropShadowClass()} ${this.buttonClass} w-fit transition transform hover:scale-105 flex h-4 min-w-[3rem] cursor-pointer items-center justify-center gap-1.5 bg-transparent px-4 py-6 font-sans text-base font-semibold`;if(this.type==="link"){let e="?source=widgets";return this.widgetId.length>0&&(e+=`&gba_gb.element.id=${this.widgetId}`),te` `}return te`
${this.isOpen?te` `:""}
`}renderLabel(){return this.iconPosition==="left"?te`${this.showIcon()} ${this.showLabel()}`:te`${this.showLabel()} ${this.showIcon()}`}getButtonStyles(){return this.hideButton?{display:"none",pointerEvents:"none"}:{color:this.labelColor,backgroundColor:this.backgroundColor,borderColor:this.borderColor,borderRadius:`${this.borderRadius}px`,borderWidth:`${this.borderWidth}px`}}showLabel(){return this.hideLabel||this.label.length===0?"":te`${this.label}`}showIcon(){return new Eh(this.icon,this.labelColor).getSVG()}getDropShadowClass(){return this.dropShadow?"drop-shadow-md":""}getPosition(){const i=this.position,e=[];i.length>0&&e.push("fixed");const[t,r]=i.toLowerCase().split("-");switch(t){case"top":e.push("top-4");break;case"middle":e.push("top-1/2"),e.push("translate-x-0"),e.push("-translate-y-1/2");break;case"bottom":e.push("bottom-4");break}switch(r){case"left":e.push("left-4");break;case"right":e.push("right-4");break}return e.join(" ")}};ge([Gt()],de.prototype,"isOpen",2),ge([b({type:String,attribute:"embed-url"})],de.prototype,"embedUrl",1),ge([b({type:String,attribute:"type"})],de.prototype,"type",1),ge([b({type:Boolean,attribute:"hide-button"})],de.prototype,"hideButton",1),ge([b({type:String,attribute:"label"})],de.prototype,"label",1),ge([b({type:Boolean,attribute:"hide-label"})],de.prototype,"hideLabel",1),ge([b({type:String,attribute:"label-color"})],de.prototype,"labelColor",1),ge([b({type:String,attribute:"background-color"})],de.prototype,"backgroundColor",1),ge([b({type:String,attribute:"icon"})],de.prototype,"icon",1),ge([b({type:String,attribute:"icon-position"})],de.prototype,"iconPosition",1),ge([b({type:Boolean,attribute:"drop-shadow",converter:ut._boolean})],de.prototype,"dropShadow",1),ge([b({type:Number,attribute:"border-radius"})],de.prototype,"borderRadius",1),ge([b({type:String,attribute:"border-color"})],de.prototype,"borderColor",1),ge([b({type:Number,attribute:"border-width"})],de.prototype,"borderWidth",1),ge([b({type:String,attribute:"button-class"})],de.prototype,"buttonClass",1),ge([b({type:String,attribute:"position"})],de.prototype,"position",1),ge([b({type:Number,attribute:"vertical-offset"})],de.prototype,"verticalOffset",1),ge([b({type:Number,attribute:"horizontal-offset"})],de.prototype,"horizontalOffset",1),ge([b({type:String,attribute:"button-transform-show"})],de.prototype,"buttonTransformShow",1),ge([b({type:String,attribute:"button-transform-hide"})],de.prototype,"buttonTransformHide",1),ge([b({type:String,attribute:"max-width"})],de.prototype,"maxWidth",1),de=ge([jt("givebutter-button")],de);const $h=Object.freeze(Object.defineProperty({__proto__:null,get GivebutterButton(){return de}},Symbol.toStringTag,{value:"Module"}));var Aa={exports:{}};(function(i){(function(e){if(typeof window=="undefined")return;var t=0,r,n=!1,s=!1,o="message",a=o.length,l="[iFrameSizer]",c=l.length,d=null,h=window.requestAnimationFrame,v=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},E=null,w=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){M("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}});function S(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function O(p,_,B){p.addEventListener(_,B,!1)}function H(p,_,B){p.removeEventListener(_,B,!1)}function U(){var p=["moz","webkit","o","ms"],_;for(_=0;_N&&(ke=N,k(F,"Set "+Y+" to max value")),Z[Y]=""+ke}function $e(){function x(){function Y(){var Ne=0,Pe=!1;for(k(F,"Checking connection is from allowed list of origins: "+W);Ne