From a86926acd09b90eb4d0f51b0f078bb93e1af31d0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 1 Dec 2024 22:35:25 -0800 Subject: [PATCH] Add ad --- backend/static/js/main.bundle.js | 4 +- frontend/package-lock.json | 12 ++++++ frontend/package.json | 1 + .../components/adSense/bannerAd.tsx | 38 ------------------- .../components/adSense/inFeedAd.tsx | 36 ------------------ frontend/src/projects/ModulesList.tsx | 10 ++++- 6 files changed, 23 insertions(+), 78 deletions(-) delete mode 100644 frontend/src/components/components/adSense/bannerAd.tsx delete mode 100644 frontend/src/components/components/adSense/inFeedAd.tsx diff --git a/backend/static/js/main.bundle.js b/backend/static/js/main.bundle.js index 1fc606f..c629934 100644 --- a/backend/static/js/main.bundle.js +++ b/backend/static/js/main.bundle.js @@ -1,5 +1,5 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(()=>{var e,t,n,r,i={2865:(e,t,n)=>{e.exports=n(9711)},9711:function(e,t,n){(function(){var e,r,i,o,a,g,s,l,A,C,I,c,u,d,h,f,p,m,v,y,b,w=[].indexOf;({floor:h,max:p,min:m}=Math),r=n(5731),u=n(4148),l=function(e,t){return t?2*e/t:1},s=function(e,t){var n,r,i,o,a;for([i,o]=[e.length,t.length],n=r=0,a=m(i,o);0<=a?ra;n=0<=a?++r:--r){if(e[n]t[n])return 1}return i-o},c=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},g=function(e){var t,n;for(t=0,n=e.length;t=200&&(l=h(s/100)+1,t.forEach((function(e,n){if(e.length>l)return A.set(n,!0),t.delete(n)}))),this.isbjunk=function(e){return o.has(e)},this.isbpopular=function(e){return A.has(e)}}findLongestMatch(e,t,n,r){var i,o,a,g,s,l,A,C,I,c,u,d,h,f,p,m,v,y;for([i,o,a,C]=[this.a,this.b,this.b2j,this.isbjunk],[g,s,l]=[e,n,0],c={},A=h=v=e,y=t;v<=y?hy;A=v<=y?++h:--h){for(m={},u=[],a.has(i[A])&&(u=a.get(i[A])),p=0,f=u.length;p=r)break;(d=m[I]=(c[I-1]||0)+1)>l&&([g,s,l]=[A-d+1,I-d+1,d])}c=m}for(;g>e&&s>n&&!C(o[s-1])&&i[g-1]===o[s-1];)[g,s,l]=[g-1,s-1,l+1];for(;g+le&&s>n&&C(o[s-1])&&i[g-1]===o[s-1];)[g,s,l]=[g-1,s-1,l+1];for(;g+lA&&(n.push([C,i,m(o,i+e),a,m(g,a+e)]),r.push(n),n=[],[i,a]=[p(i,o-e),p(a,g-e)]),n.push([C,i,o,a,g]);return!n.length||1===n.length&&"equal"===n[0][0]||r.push(n),r}ratio(){var e,t,n,r;for(n=0,e=0,t=(r=this.getMatchingBlocks()).length;e0&&g++;return l(g,this.a.length+this.b.length)}realQuickRatio(){var e,t;return[e,t]=[this.a.length,this.b.length],l(m(e,t),e+t)}},f=function(e,t,n=3,i=.6){var o,g,l,A,C,I,c,u,d;if(!(n>0))throw new Error(`n must be > 0: (${n})`);if(!(0<=i&&i<=1))throw new Error(`cutoff must be in [0.0, 1.0]: (${i})`);for(C=[],(c=new a).setSeq2(e),o=0,g=t.length;o=i&&c.quickRatio()>=i&&c.ratio()>=i&&C.push([c.ratio(),d]);for(I=[],A=0,l=(C=r.nlargest(C,n,s)).length;Ag;i=a<=g?++o:--o)s.push(`${e} ${t[i]}`);return s}_plainReplace(e,t,n,r,i,o){var a,g,s,l,A,C,I,c,d,h;for(u(tU;E=V<=U?++k:--k)for(h=r[E],v.setSeq2(h),x=L=Z=t,G=n;Z<=G?LG;x=Z<=G?++L:--L)(s=e[x])!==h?(v.setSeq1(s),v.realQuickRatio()>c&&v.quickRatio()>c&&v.ratio()>c&&([c,u,d]=[v.ratio(),x,E])):null===b&&([b,w]=[x,E]);if(c=0},I=function(e,t){var n,r;return n=e+1,1===(r=t-e)?`${n}`:(r||n--,`${n},${r}`)},b=function(e,t,{fromfile:n,tofile:r,fromfiledate:i,tofiledate:o,n:g,lineterm:s}={}){var l,A,C,c,u,d,h,f,p,m,v,y,b,w,x,E,k,S,T,O,R,N,_,D,P,M,L,F,j;for(null==n&&(n=""),null==r&&(r=""),null==i&&(i=""),null==o&&(o=""),null==g&&(g=3),null==s&&(s="\n"),S=[],L=!1,m=0,y=(_=new a(null,e,t).getGroupedOpcodes()).length;m=0&&o.push(i.slice(2));return o},t._arrayCmp=s,t.SequenceMatcher=a,t.getCloseMatches=f,t._countLeading=A,t.Differ=e,t.IS_LINE_JUNK=o,t.IS_CHARACTER_JUNK=i,t._formatRangeUnified=I,t.unifiedDiff=b,t._formatRangeContext=C,t.contextDiff=d,t.ndiff=v,t.restore=y}).call(this)},8341:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function i(){return"npm"}n.d(t,{Z:()=>r,e:()=>i})},6284:(e,t,n)=>{"use strict";n.d(t,{wD:()=>i});var r=n(8341);function i(){return!(0,r.Z)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}e=n.hmd(e)},4148:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var m="",v="",y="",b="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function E(e){return h(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function k(e,t,n){var r="",i="",o=0,a="",g=!1,s=E(e),l=s.split("\n"),A=E(t).split("\n"),C=0,I="";if("strictEqual"===n&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===l.length&&1===A.length&&l[0]!==A[0]){var c=l[0].length+A[0].length;if(c<=10){if(!("object"===d(e)&&null!==e||"object"===d(t)&&null!==t||0===e&&0===t))return"".concat(w[n],"\n\n")+"".concat(l[0]," !== ").concat(A[0],"\n")}else if("strictEqualObject"!==n){if(c<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;l[0][C]===A[0][C];)C++;C>2&&(I="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",C),"^"),C=0)}}}for(var u=l[l.length-1],h=A[A.length-1];u===h&&(C++<2?a="\n ".concat(u).concat(a):r=u,l.pop(),A.pop(),0!==l.length&&0!==A.length);)u=l[l.length-1],h=A[A.length-1];var f=Math.max(l.length,A.length);if(0===f){var x=s.split("\n");if(x.length>30)for(x[26]="".concat(m,"...").concat(b);x.length>27;)x.pop();return"".concat(w.notIdentical,"\n\n").concat(x.join("\n"),"\n")}C>3&&(a="\n".concat(m,"...").concat(b).concat(a),g=!0),""!==r&&(a="\n ".concat(r).concat(a),r="");var k=0,S=w[n]+"\n".concat(v,"+ actual").concat(b," ").concat(y,"- expected").concat(b),T=" ".concat(m,"...").concat(b," Lines skipped");for(C=0;C1&&C>2&&(O>4?(i+="\n".concat(m,"...").concat(b),g=!0):O>3&&(i+="\n ".concat(A[C-2]),k++),i+="\n ".concat(A[C-1]),k++),o=C,r+="\n".concat(y,"-").concat(b," ").concat(A[C]),k++;else if(A.length1&&C>2&&(O>4?(i+="\n".concat(m,"...").concat(b),g=!0):O>3&&(i+="\n ".concat(l[C-2]),k++),i+="\n ".concat(l[C-1]),k++),o=C,i+="\n".concat(v,"+").concat(b," ").concat(l[C]),k++;else{var R=A[C],N=l[C],_=N!==R&&(!p(N,",")||N.slice(0,-1)!==R);_&&p(R,",")&&R.slice(0,-1)===N&&(_=!1,N+=","),_?(O>1&&C>2&&(O>4?(i+="\n".concat(m,"...").concat(b),g=!0):O>3&&(i+="\n ".concat(l[C-2]),k++),i+="\n ".concat(l[C-1]),k++),o=C,i+="\n".concat(v,"+").concat(b," ").concat(N),r+="\n".concat(y,"-").concat(b," ").concat(R),k+=2):(i+=r,r="",1!==O&&0!==C||(i+="\n ".concat(N),k++))}if(k>20&&C30)for(I[26]="".concat(m,"...").concat(b);I.length>27;)I.pop();t=1===I.length?C.call(this,"".concat(A," ").concat(I[0])):C.call(this,"".concat(A,"\n\n").concat(I.join("\n"),"\n"))}else{var c=E(o),u="",h=w[r];"notDeepEqual"===r||"notEqual"===r?(c="".concat(w[r],"\n\n").concat(c)).length>1024&&(c="".concat(c.slice(0,1021),"...")):(u="".concat(E(a)),c.length>512&&(c="".concat(c.slice(0,509),"...")),u.length>512&&(u="".concat(u.slice(0,509),"...")),"deepEqual"===r||"equal"===r?c="".concat(h,"\n\n").concat(c,"\n\nshould equal\n\n"):u=" ".concat(r," ").concat(u)),t=C.call(this,"".concat(c).concat(u))}return Error.stackTraceLimit=g,t.generatedMessage=!n,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=a,t.operator=r,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",s(t)}return o=p,(g=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return h(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&a(o.prototype,g),A&&a(o,A),Object.defineProperty(o,"prototype",{writable:!1}),p}(A(Error),h.custom);e.exports=S},9597:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}C("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),C("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,g,l;if(void 0===s&&(s=n(4148)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!g||g<0?0:+g,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))l="The ".concat(e," ").concat(o," ").concat(I(t,"type"));else{var A=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(A," ").concat(o," ").concat(I(t,"type"))}return l+=". Received type ".concat(r(i))}),TypeError),C("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===l&&(l=n(537));var i=l.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),C("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),C("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=A},2299:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,g=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(g.push(r.value),g.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return g}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function D(e){return Object.keys(e).filter(_).concat(A(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function P(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{"use strict";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Em,hasStandardBrowserEnv:()=>Sm,hasStandardBrowserWebWorkerEnv:()=>Tm,navigator:()=>km,origin:()=>Om});const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function o(e){return e&&e.Math==Math?e:void 0}const a="object"==typeof globalThis&&o(globalThis)||"object"==typeof window&&o(window)||"object"==typeof self&&o(self)||"object"==typeof n.g&&o(n.g)||function(){return this}()||{};function g(){return a}function s(e,t,n){const r=n||a,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const l=["debug","info","warn","error","log","assert","trace"],A={};function C(e){if(!("console"in a))return e();const t=a.console,n={},r=Object.keys(A);r.forEach((e=>{const r=A[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const I=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return i?l.forEach((n=>{t[n]=(...t)=>{e&&C((()=>{a.console[n](`Sentry Logger [${n}]:`,...t)}))}})):l.forEach((e=>{t[e]=()=>{}})),t}(),c=Object.prototype.toString;function u(e){switch(c.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return E(e,Error)}}function d(e,t){return c.call(e)===`[object ${t}]`}function h(e){return d(e,"ErrorEvent")}function f(e){return d(e,"DOMError")}function p(e){return d(e,"String")}function m(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function v(e){return null===e||m(e)||"object"!=typeof e&&"function"!=typeof e}function y(e){return d(e,"Object")}function b(e){return"undefined"!=typeof Event&&E(e,Event)}function w(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function x(e){return"number"==typeof e&&e!=e}function E(e,t){try{return e instanceof t}catch(e){return!1}}function k(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const S=g();function T(e,t={}){if(!e)return"";try{let n=e;const r=5,i=[];let o=0,a=0;const g=" > ",s=g.length;let l;const A=Array.isArray(t)?t:t.keyAttrs,C=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++1&&a+i.length*s+l.length>=C));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(g)}catch(e){return""}}function O(e,t){const n=e,r=[];let i,o,a,g,s;if(!n||!n.tagName)return"";if(S.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&p(i))for(o=i.split(/\s+/),s=0;sP(e,t,n)))}function L(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&j(i,r),e[t]=i}function F(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){i&&I.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function j(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,F(e,"__sentry_original__",t)}catch(e){}}function B(e){return e.__sentry_original__}function z(e){if(u(e))return{message:e.message,name:e.name,stack:e.stack,...U(e)};if(b(e)){const t={type:e.type,target:V(e.target),currentTarget:V(e.currentTarget),...U(e)};return"undefined"!=typeof CustomEvent&&E(e,CustomEvent)&&(t.detail=e.detail),t}return e}function V(e){try{return t=e,"undefined"!=typeof Element&&E(t,Element)?T(e):Object.prototype.toString.call(e)}catch(e){return""}var t}function U(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Z(e){return G(e,new Map)}function G(e,t){if(function(e){if(!y(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=G(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(G(e,t))})),r}return e}function W(){const e=a,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function H(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Y(e){const{message:t,event_id:n}=e;if(t)return t;const r=H(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function K(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Q(e,t){const n=H(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function X(e){if(e&&e.__sentry_captured__)return!0;try{F(e,"__sentry_captured__",!0)}catch(e){}return!1}function q(e){return Array.isArray(e)?e:[e]}const J="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var ee;function te(e){return new re((t=>{t(e)}))}function ne(e){return new re(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ee||(ee={}));class re{constructor(e){re.prototype.__init.call(this),re.prototype.__init2.call(this),re.prototype.__init3.call(this),re.prototype.__init4.call(this),this._state=ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new re(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new re(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===ee.PENDING&&(w(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===ee.RESOLVED&&e[1](this._value),this._state===ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function ie(){return s("globalEventProcessors",(()=>[]))}function oe(e){ie().push(e)}function ae(e,t,n,r=0){return new re(((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const g=a({...t},n);J&&a.id&&null===g&&I.log(`Event processor "${a.id}" dropped event`),w(g)?g.then((t=>ae(e,t,n,r+1).then(i))).then(null,o):ae(e,g,n,r+1).then(i).then(null,o)}}))}function ge(){return Date.now()/1e3}const se=function(){const{performance:e}=a;if(!e||!e.now)return ge;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let le;const Ae=(()=>{const{performance:e}=a;if(!e||!e.now)return void(le="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=ifunction(e){return Z({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&ce(n,e),n}function ce(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||se(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:W()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ue(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),ce(e,n)}const de=/\(error: (.*)\)/,he=/captureMessage|captureException/;function fe(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const r=[],i=e.split("\n");for(let e=n;e1024)continue;const o=de.test(n)?n.replace(de,"$1"):n;if(!o.match(/\S*Error: /)){for(const e of t){const t=e(o);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),he.test(t[t.length-1].function||"")&&(t.pop(),he.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,50).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(r)}}const pe="";function me(e){try{return e&&"function"==typeof e&&e.name||pe}catch(e){return pe}}function ve(e,t=100,n=1/0){try{return be("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ye(e,t=3,n=102400){const r=ve(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?ye(e,t-1,n):r;var i}function be(e,t,r=1/0,i=1/0,o=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e=i){C[e]="[MaxProperties ~]";break}const t=c[e];C[e]=be(e,t,l-1,i,o),I++}return g(t),C}const we="baggage",xe="sentry-",Ee=/^sentry-/;function ke(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=0===r?o:`${e},${o}`;return a.length>8192?(i&&I.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${xe}${t}`]=n),e)),{}))}function Se(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}const Te=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Oe(e){if(!e)return;const t=e.match(Te);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Re(e,t){const n=Oe(e),r=function(e){if(!p(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>{const n=Se(t);for(const t of Object.keys(n))e[t]=n[t];return e}),{});else{if(!e)return;t=Se(e)}const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Ee)&&(e[t.slice(7)]=n),e)),{});return Object.keys(n).length>0?n:void 0}(t),{traceId:i,parentSpanId:o,parentSampled:a}=n||{};return n?{traceId:i||W(),parentSpanId:o||W().substring(16),spanId:W().substring(16),sampled:a,dsc:r||{}}:{traceId:i||W(),spanId:W().substring(16)}}function Ne(e=W(),t=W().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function _e(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:a,tags:g,origin:s}=Le(e);return Z({data:r,op:i,parent_span_id:o,span_id:t,status:a,tags:g,trace_id:n,origin:s})}function De(e){const{traceId:t,spanId:n}=e.spanContext();return Ne(t,n,Fe(e))}function Pe(e){return"number"==typeof e?Me(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Me(e.getTime()):se()}function Me(e){return e>9999999999?e/1e3:e}function Le(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function Fe(e){const{traceFlags:t}=e.spanContext();return Boolean(1&t)}function je(e,t,n,r,i,o){const{normalizeDepth:g=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||W(),timestamp:t.timestamp||ge()},A=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Ce);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==i&&(e.dist=i);e.message&&(e.message=_(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=_(a.value,o));const g=e.request;g&&g.url&&(g.url=_(g.url,o))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,A),void 0===t.type&&function(e,t){const n=a._sentryDebugIds;if(!n)return;let r;const i=Be.get(t);i?r=i:(r=new Map,Be.set(t,r));const o=Object.keys(n).reduce(((e,i)=>{let o;const a=r.get(i);a?o=a:(o=t(i),r.set(i,o));for(let t=o.length-1;t>=0;t--){const r=o[t];if(r.filename){e[r.filename]=n[i];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=o[e.filename])}))}))}catch(e){}}(l,e.stackParser);const C=function(e,t){if(!t)return e;const n=e?e.clone():new ot;return n.update(t),n}(r,n.captureContext);n.mechanism&&Q(l,n.mechanism);const I=i&&i.getEventProcessors?i.getEventProcessors():[],c=function(){it||(it=new ot);return it}().getScopeData();if(o){nt(c,o.getScopeData())}if(C){nt(c,C.getScopeData())}const u=[...n.attachments||[],...c.attachments];u.length&&(n.attachments=u),tt(l,c);return ae([...I,...ie(),...c.eventProcessors],l,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof g&&g>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:ve(e.data,t,n)}})))},...e.user&&{user:ve(e.user,t,n)},...e.contexts&&{contexts:ve(e.contexts,t,n)},...e.extra&&{extra:ve(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ve(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>{const r=Le(e).data;return r&&(e.data=ve(r,t,n)),e})));return r}(e,g,s):e)))}const Be=new WeakMap;function ze(e){if(e)return function(e){return e instanceof ot||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>Ve.includes(e)))}(e)?{captureContext:e}:e}const Ve=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ue(e,t){return ct().captureException(e,ze(t))}function Ze(e,t){return ct().captureEvent(e,t)}function Ge(e,t){ct().addBreadcrumb(e,t)}function We(...e){const t=ct();if(2===e.length){const[n,r]=e;return n?t.withScope((()=>(t.getStackTop().scope=n,r(n)))):t.withScope(r)}return t.withScope(e[0])}function He(){return ct().getClient()}function Ye(){return ct().getScope()}function Ke(e){const t=He(),n=ut(),r=Ye(),{release:i,environment:o=Ce}=t&&t.getOptions()||{},{userAgent:g}=a.navigator||{},s=Ie({release:i,environment:o,user:r.getUser()||n.getUser(),...g&&{userAgent:g},...e}),l=n.getSession();return l&&"ok"===l.status&&ce(l,{status:"exited"}),Qe(),n.setSession(s),r.setSession(s),s}function Qe(){const e=ut(),t=Ye(),n=t.getSession()||e.getSession();n&&ue(n),Xe(),e.setSession(),t.setSession()}function Xe(){const e=ut(),t=Ye(),n=He(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function qe(e=!1){e?Qe():Xe()}function Je(e){return e.transaction}function $e(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=Z({environment:r.environment||Ce,release:r.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function et(e){const t=He();if(!t)return{};const n=$e(Le(e).trace_id||"",t,Ye()),r=Je(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:o,source:a}=r.metadata;null!=o&&(n.sample_rate=`${o}`);const g=Le(r);return a&&"url"!==a&&(n.transaction=g.description),n.sampled=String(Fe(r)),t.emit&&t.emit("createDsc",n),n}function tt(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:g}=t,s=Z(n);s&&Object.keys(s).length&&(e.extra={...s,...e.extra});const l=Z(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const A=Z(i);A&&Object.keys(A).length&&(e.user={...A,...e.user});const C=Z(o);C&&Object.keys(C).length&&(e.contexts={...C,...e.contexts});a&&(e.level=a);g&&(e.transaction=g)}(e,t),r&&function(e,t){e.contexts={trace:_e(t),...e.contexts};const n=Je(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:et(t),...e.sdkProcessingMetadata};const r=Le(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?q(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function nt(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:g,breadcrumbs:s,fingerprint:l,eventProcessors:A,attachments:C,propagationContext:I,transactionName:c,span:u}=t;rt(e,"extra",n),rt(e,"tags",r),rt(e,"user",i),rt(e,"contexts",o),rt(e,"sdkProcessingMetadata",g),a&&(e.level=a),c&&(e.transactionName=c),u&&(e.span=u),s.length&&(e.breadcrumbs=[...e.breadcrumbs,...s]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),A.length&&(e.eventProcessors=[...e.eventProcessors,...A]),C.length&&(e.attachments=[...e.attachments,...C]),e.propagationContext={...e.propagationContext,...I}}function rt(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let it;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=at()}static clone(e){return e?e.clone():new ot}clone(){const e=new ot;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...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={...this._sdkProcessingMetadata},e._propagationContext={...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&&ce(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={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}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="function"==typeof e?e(this):e;if(t instanceof ot){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(y(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.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=at(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:ge(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,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:n,_tags:r,_extra:i,_user:o,_level:a,_fingerprint:g,_eventProcessors:s,_propagationContext:l,_sdkProcessingMetadata:A,_transactionName:C,_span:I}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:o,level:a,fingerprint:g||[],eventProcessors:s,propagationContext:l,sdkProcessingMetadata:A,transactionName:C,span:I}}applyToEvent(e,t={},n=[]){tt(e,this.getScopeData());return ae([...n,...ie(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:W();if(!this._client)return I.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:W();if(!this._client)return I.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:W();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(I.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}function at(){return{traceId:W(),spanId:W().substring(16)}}const gt="7.119.2",st=parseFloat(gt),lt=100;class At{constructor(e,t,n,r=st){let i,o;this._version=r,t?i=t:(i=new ot,i.setClient(e)),n?o=n:(o=new ot,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version(this.popScope(),e)),(e=>{throw this.popScope(),e})):(this.popScope(),n)}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 n=this._lastEventId=t&&t.event_id?t.event_id:W(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:W(),i=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:W();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=lt}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:ge(),...e},g=i?C((()=>i(a,t))):a;null!==g&&(r.emit&&r.emit("beforeAddBreadcrumb",g,t),n.addBreadcrumb(g,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:n}=this.getStackTop();n&&e(t)}run(e){const t=It(this);try{e(this)}finally{It(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return J&&I.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(J&&!n){this.getClient()?I.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):I.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&ue(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Ce}=n&&n.getOptions()||{},{userAgent:o}=a.navigator||{},g=Ie({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&"ok"===s.status&&ce(s,{status:"exited"}),this.endSession(),t.setSession(g),g}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=Ct().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);J&&I.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Ct(){return a.__SENTRY__=a.__SENTRY__||{extensions:{},hub:void 0},a}function It(e){const t=Ct(),n=ft(t);return pt(t,e),n}function ct(){const e=Ct();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return dt(e)}function ut(){return ct().getIsolationScope()}function dt(e=Ct()){return ht(e)&&!ft(e).isOlderThan(st)||pt(e,new At),ft(e)}function ht(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ft(e){return s("hub",(()=>new At),e)}function pt(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const mt=[];function vt(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach((e=>{e.isDefaultInstance=!0})),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?q(n(t)):t;const i=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(r),o=function(e,t){for(let n=0;n"Debug"===e.name));if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}function yt(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function bt(e,t,n){if(n[t.name])J&&I.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===mt.indexOf(t.name)&&(t.setupOnce(oe,ct),mt.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}J&&I.log(`Integration installed: ${t.name}`)}}function wt(e,t){return Object.assign((function(...e){return t(...e)}),{id:e})}const xt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Et=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],kt="InboundFilters",St=(e={})=>({name:kt,setupOnce(){},processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xt],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Et],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return J&&I.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Y(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));J&&0===t.length&&I.error(`Could not extract message for event ${Y(e)}`);return t}(e).some((e=>M(e,t)))}(e,t.ignoreErrors))return J&&I.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Y(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&M(n,t)}(e,t.ignoreTransactions))return J&&I.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Y(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Tt(e);return!!n&&M(n,t)}(e,t.denyUrls))return J&&I.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Y(e)}.\nUrl: ${Tt(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Tt(e);return!n||M(n,t)}(e,t.allowUrls))return J&&I.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Y(e)}.\nUrl: ${Tt(e)}`),!0;return!1}(t,o)?null:t}});wt(kt,St);function Tt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return J&&I.error(`Cannot extract url for event ${Y(e)}`),null}}let Ot;const Rt="FunctionToString",Nt=new WeakMap,_t=()=>({name:Rt,setupOnce(){Ot=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=B(this),n=Nt.has(He())&&void 0!==t?t:this;return Ot.apply(n,e)}}catch(e){}},setup(e){Nt.set(e,!0)}});wt(Rt,_t);function Dt(e,t){!0===t.debug&&(J?I.enable():C((()=>{})));Ye().update(t.initialScope);const n=new e(t);!function(e){const t=ct().getStackTop();t.client=e,t.scope.setClient(e)}(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)}const Pt=g();function Mt(){if(!("fetch"in Pt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Lt(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Ft=g();const jt={},Bt={};function zt(e,t){jt[e]=jt[e]||[],jt[e].push(t)}function Vt(e,t){Bt[e]||(t(),Bt[e]=!0)}function Ut(e,t){const n=e&&jt[e];if(n)for(const r of n)try{r(t)}catch(t){i&&I.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${me(r)}\nError:`,t)}}const Zt=a;let Gt;function Wt(e){const t="history";zt(t,e),Vt(t,Ht)}function Ht(){if(!function(){const e=Ft.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ft&&!!Ft.history.pushState&&!!Ft.history.replaceState;return!t&&n}())return;const e=Zt.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Gt,t=String(n);Gt=t;Ut("history",{from:e,to:t})}return e.apply(this,t)}}Zt.onpopstate=function(...t){const n=Zt.location.href,r=Gt;Gt=n;if(Ut("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},L(Zt.history,"pushState",t),L(Zt.history,"replaceState",t)}const Yt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Kt(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:g,publicKey:s}=e;return`${g}://${s}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`}function Qt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xt(e){const t="string"==typeof e?function(e){const t=Yt.exec(e);if(!t)return void C((()=>{}));const[n,r,i="",o,a="",g]=t.slice(1);let s="",l=g;const A=l.split("/");if(A.length>1&&(s=A.slice(0,-1).join("/"),l=A.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Qt({host:o,pass:i,path:s,projectId:l,port:a,protocol:n,publicKey:r})}(e):Qt(e);if(t&&function(e){if(!i)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(I.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(I.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(I.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(I.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function qt(e,t=[]){return[e,t]}function Jt(e,t){const[n,r]=e;return[n,[...r,t]]}function $t(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function en(e,t){return(t||new TextEncoder).encode(e)}function tn(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[en(i,t),e]:i.push("string"==typeof e?en(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(ve(n))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function nn(e,t){const n="string"==typeof e.data?en(e.data,t):e.data;return[Z({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const rn={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 on(e){return rn[e]}function an(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function gn(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Kt(r)},...i&&{trace:Z({...i})}}}class sn 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 ln(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function An(e,t){return function(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}function Cn(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${ln(e)}${e.projectId}/envelope/`}(e)}?${An(e,r)}`}function In(e,t,n,r){const i=an(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=gn(e,i,r,t);delete e.sdkProcessingMetadata;return qt(a,[[{type:o},e]])}function cn(e,t,n,r){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=Kt(t));const o=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map((([e,t])=>`${e}:${t}`)).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return qt(i,[o])}const un="Not capturing exception because it's already been captured.";class dn{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Xt(e.dsn):J&&I.warn("No DSN provided, client will not send events."),this._dsn){const t=Cn(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(X(e))return void(J&&I.log(un));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=m(e)?e:String(e),a=v(e)?this.eventFromMessage(o,t,n):this.eventFromException(e,n);return this._process(a.then((e=>this._captureEvent(e,n,r))).then((e=>{i=e}))),i}captureEvent(e,t,n){if(t&&t.originalException&&X(t.originalException))return void(J&&I.log(un));let r=t&&t.event_id;const i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then((e=>{r=e}))),r}captureSession(e){"string"!=typeof e.release?J&&I.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ce(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((n=>t.flush(e).then((e=>n&&e))))):te(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e)))}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 J&&I.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];bt(this,e,this._integrations),t||yt(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=In(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Jt(n,nn(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const i=an(n);return qt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Kt(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,i=`${e}:${t}`;J&&I.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}captureAggregateMetrics(e){J&&I.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=cn(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((e=>e(...t)))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&bt(e,t,n)})),n}(this,e),yt(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(ce(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new re((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=ut()){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),je(i,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:r,spanId:i,parentSpanId:o,dsc:a}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:o},...e.contexts};const g=a||$e(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:g,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(J){const t=e;"log"===t.logLevel?I.log(t.message):I.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=fn(e),a=hn(e),g=e.type||"error",s=`before send for type \`${g}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),ne(new sn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===g?"replay":g,A=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,A).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new sn("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;if(hn(t)&&r)return r(t,n);if(fn(t)&&i){if(t.spans){const e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(t,n)}return t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(w(e))return e.then((e=>{if(!y(e)&&null!==e)throw new sn(n);return e}),(e=>{throw new sn(`${t} rejected with ${e}`)}));if(!y(e)&&null!==e)throw new sn(n);return e}(i,s)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new sn(`${s} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!o&&i&&this._updateSessionFromEvent(i,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof sn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new sn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,(e=>{J&&I.error("Error while sending event:",e)}));J&&I.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function hn(e){return void 0===e.type}function fn(e){return"transaction"===e.type}function pn(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:gt}))),version:gt}),e._metadata=i}var mn=n(8341);const vn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function yn(e,t){const n=wn(e,t),r={type:t&&t.name,value:En(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bn(e,t){return{exception:{values:[yn(e,t)]}}}function wn(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(xn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const xn=/Minified React error #\d+;/i;function En(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function kn(e,t,n,r,i){let o;if(h(t)&&t.error){return bn(e,t.error)}if(f(t)||d(t,"DOMException")){const i=t;if("stack"in t)o=bn(e,t);else{const t=i.name||(f(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=Sn(e,a,n,r),K(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}if(u(t))return bn(e,t);if(y(t)||b(t)){return o=function(e,t,n,r){const i=He(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:b(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Tn(t,{isUnhandledRejection:r})}]},extra:{__serialized__:ye(t,o)}};if(n){const t=wn(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t})}return a}(e,t,n,i),Q(o,{synthetic:!0}),o}return o=Sn(e,t,n,r),K(o,`${t}`,void 0),Q(o,{synthetic:!0}),o}function Sn(e,t,n,r){const i={};if(r&&n){const r=wn(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(m(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Tn(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(z(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return _(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:_(r,t)}return""}(e),r=t?"promise rejection":"exception";if(h(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(b(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}const On=a;let Rn=0;function Nn(){return Rn>0}function _n(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(B(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map((e=>_n(e,t)));return e.apply(this,i)}catch(e){throw Rn++,setTimeout((()=>{Rn--})),We((n=>{n.addEventProcessor((e=>(t.mechanism&&(K(e,void 0,void 0),Q(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Ue(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}j(r,e),F(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}class Dn extends dn{constructor(e){pn(e,"browser",["browser"],On.SENTRY_SDK_SOURCE||(0,mn.e)()),super(e),e.sendClientReports&&On.document&&On.document.addEventListener("visibilitychange",(()=>{"hidden"===On.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=kn(e,t,n&&n.syntheticException||void 0,r);return Q(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),te(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Sn(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),te(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(vn&&I.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Kt(r)}},o=function(e){return[{type:"user_report"},e]}(e);return qt(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(vn&&I.log("No outcomes to send"));if(!this._dsn)return void(vn&&I.log("No dsn provided, will not send outcomes"));vn&&I.log("Sending outcomes:",e);const t=(n=e,qt((r=this._options.tunnel&&Kt(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||ge(),discarded_events:n}]]));var n,r,i;this._sendEnvelope(t)}}function Pn(){"console"in a&&l.forEach((function(e){e in a.console&&L(a.console,e,(function(t){return A[e]=t,function(...t){Ut("console",{args:t,level:e});const n=A[e];n&&n.apply(a.console,t)}}))}))}const Mn=a;let Ln,Fn,jn;function Bn(e){zt("dom",e),Vt("dom",zn)}function zn(){if(!Mn.document)return;const e=Ut.bind(null,"dom"),t=Vn(e,!0);Mn.document.addEventListener("click",t,!1),Mn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Mn[t]&&Mn[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(L(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=Vn(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(e){}return t.call(this,n,r,i)}})),L(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function Vn(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;F(n,"_sentryCaptured",!0),r&&!r._sentryId&&F(r,"_sentryId",W());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Fn)return!1;try{if(!e.target||e.target._sentryId!==jn)return!1}catch(e){}return!0}(n)){e({event:n,name:i,global:t}),Fn=n.type,jn=r?r._sentryId:void 0}clearTimeout(Ln),Ln=Mn.setTimeout((()=>{jn=void 0,Fn=void 0}),1e3)}}const Un=a,Zn="__sentry_xhr_v3__";function Gn(e){zt("xhr",e),Vt("xhr",Wn)}function Wn(){if(!Un.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;L(e,"open",(function(e){return function(...t){const n=Date.now(),r=p(t[0])?t[0].toUpperCase():void 0,i=function(e){if(p(e))return e;try{return e.toString()}catch(e){}return}(t[1]);if(!r||!i)return e.apply(this,t);this[Zn]={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const e=this[Zn];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}Ut("xhr",{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?L(this,"onreadystatechange",(function(e){return function(...t){return o(),e.apply(this,t)}})):this.addEventListener("readystatechange",o),L(this,"setRequestHeader",(function(e){return function(...t){const[n,r]=t,i=this[Zn];return i&&p(n)&&p(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}})),e.apply(this,t)}})),L(e,"send",(function(e){return function(...t){const n=this[Zn];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return Ut("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}function Hn(e){const t="fetch";zt(t,e),Vt(t,Yn)}function Yn(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!Mt())return!1;if(Lt(Pt.fetch))return!0;let e=!1;const t=Pt.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Lt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){i&&I.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&L(a,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Qn(t),method:Kn(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Qn(t),method:Kn(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Ut("fetch",{...i}),e.apply(a,t).then((e=>(Ut("fetch",{...i,endTimestamp:Date.now(),response:e}),e)),(e=>{throw Ut("fetch",{...i,endTimestamp:Date.now(),error:e}),e}))}}))}function Kn(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Qn(e){return"string"==typeof e?e:e?Kn(e,"url")?e.url:e.toString?e.toString():"":""}const Xn=["fatal","error","warning","log","info","debug"];function qn(e){return"warn"===e?"warning":Xn.includes(e)?e:"log"}function Jn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const $n=1024,er="Breadcrumbs",tr=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:er,setupOnce(){},setup(e){t.console&&function(e){const t="console";zt(t,e),Vt(t,Pn)}(function(e){return function(t){if(He()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:qn(t.level),message:D(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${D(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ge(n,{input:t.args,level:t.level})}}(e)),t.dom&&Bn(function(e,t){return function(n){if(He()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>$n&&(vn&&I.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=$n),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=T(t,{keyAttrs:o,maxStringLength:a}),i=N(t)}catch(e){r=""}if(0===r.length)return;const g={category:`ui.${n.name}`,message:r};i&&(g.data={"ui.component_name":i}),Ge(g,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&Gn(function(e){return function(t){if(He()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Zn];if(!n||!r||!i)return;const{method:o,url:a,status_code:g,body:s}=i;Ge({category:"xhr",data:{method:o,url:a,status_code:g},type:"http"},{xhr:t.xhr,input:s,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&Hn(function(e){return function(t){if(He()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ge({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;Ge({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&Wt(function(e){return function(t){if(He()!==e)return;let n=t.from,r=t.to;const i=Jn(On.location.href);let o=n?Jn(n):void 0;const a=Jn(r);o&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Ge({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){He()===e&&Ge({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Y(t)},{event:t})}}(e))}}};wt(er,tr);const nr="Dedupe",rr=()=>{let e;return{name:nr,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!or(e,t))return!1;if(!ir(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=ar(t),r=ar(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!or(e,t))return!1;if(!ir(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return vn&&I.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};wt(nr,rr);function ir(e,t){let n=gr(e),r=gr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ur,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){lr((t=>{const{stackParser:n,attachStacktrace:r}=pr();if(He()!==e||Nn())return;const{msg:i,url:o,line:a,column:g,error:s}=t,l=void 0===s&&p(i)?function(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=h(e)?e.message:e,a="Error";const g=o.match(i);g&&(a=g[1],o=g[2]);const s={exception:{values:[{type:a,value:o}]}};return hr(s,t,n,r)}(i,o,a,g):hr(kn(n,s||i,void 0,r,!1),o,a,g);l.level="error",Ze(l,{originalException:s,mechanism:{handled:!1,type:"onerror"}})}))}(e),fr("onerror")),t.onunhandledrejection&&(!function(e){Ir((t=>{const{stackParser:n,attachStacktrace:r}=pr();if(He()!==e||Nn())return;const i=function(e){if(v(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(e){}return e}(t),o=v(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:kn(n,i,void 0,r,!0);o.level="error",Ze(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),fr("onunhandledrejection"))}}};wt(ur,dr);function hr(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},g=a.stacktrace=a.stacktrace||{},s=g.frames=g.frames||[],l=isNaN(parseInt(r,10))?void 0:r,A=isNaN(parseInt(n,10))?void 0:n,C=p(t)&&t.length>0?t:R();return 0===s.length&&s.push({colno:l,filename:C,function:"?",in_app:!0,lineno:A}),e}function fr(e){vn&&I.log(`Global Handler attached: ${e}`)}function pr(){const e=He();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const mr="HttpContext",vr=()=>({name:mr,setupOnce(){},preprocessEvent(e){if(!On.navigator&&!On.location&&!On.document)return;const t=e.request&&e.request.url||On.location&&On.location.href,{referrer:n}=On.document||{},{userAgent:r}=On.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}});wt(mr,vr);function yr(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&E(a.originalException,Error)))return;const g=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var s,l;g&&(o.exception.values=(s=br(e,t,i,a.originalException,r,o.exception.values,g,0),l=n,s.map((e=>(e.value&&(e.value=_(e.value,l)),e)))))}function br(e,t,n,r,i,o,a,g){if(o.length>=n+1)return o;let s=[...o];if(E(r[i],Error)){wr(a,g);const o=e(t,r[i]),l=s.length;xr(o,i,l,g),s=br(e,t,n,r[i],i,[o,...s],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(E(r,Error)){wr(a,g);const l=e(t,r),A=s.length;xr(l,`errors[${o}]`,A,g),s=br(e,t,n,r,i,[l,...s],l,A)}})),s}function wr(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function xr(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Er="LinkedErrors",kr=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:Er,setupOnce(){},preprocessEvent(e,r,i){const o=i.getOptions();yr(yn,o.stackParser,o.maxValueLength,n,t,e,r)}}},Sr=(wt(Er,kr),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"]),Tr="TryCatch",Or=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Tr,setupOnce(){t.setTimeout&&L(On,"setTimeout",Rr),t.setInterval&&L(On,"setInterval",Rr),t.requestAnimationFrame&&L(On,"requestAnimationFrame",Nr),t.XMLHttpRequest&&"XMLHttpRequest"in On&&L(XMLHttpRequest.prototype,"send",_r);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Sr).forEach(Dr)}}}};wt(Tr,Or);function Rr(e){return function(...t){const n=t[0];return t[0]=_n(n,{mechanism:{data:{function:me(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Nr(e){return function(t){return e.apply(this,[_n(t,{mechanism:{data:{function:"requestAnimationFrame",handler:me(e)},handled:!1,type:"instrument"}})])}}function _r(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&L(n,e,(function(t){const n={mechanism:{data:{function:e,handler:me(t)},handled:!1,type:"instrument"}},r=B(t);return r&&(n.mechanism.data.handler=me(r)),_n(t,n)}))})),e.apply(this,t)}}function Dr(e){const t=On,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(L(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=_n(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:me(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,_n(r,{mechanism:{data:{function:"addEventListener",handler:me(r),target:e},handled:!1,type:"instrument"}}),i])}})),L(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,i,r)}})))}const Pr="?";function Mr(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const Lr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fr=/\((\S*)(?::(\d+))(?::(\d+))\)/,jr=[30,e=>{const t=Lr.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=Fr.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Wr(t[1]||Pr,t[2]);return Mr(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],Br=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vr=[50,e=>{const t=Br.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=zr.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Pr;return[n,e]=Wr(n,e),Mr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Ur=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Zr=[40,e=>{const t=Ur.exec(e);return t?Mr(t[2],t[1]||Pr,+t[3],t[4]?+t[4]:void 0):void 0}],Gr=fe(...[jr,Vr,Zr]),Wr=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Pr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Hr(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new re(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{te(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}function Yr(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Kr(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),g=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(i[e]=r+g);else i.all=r+g}else a?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}function Qr(e,t,n=Hr(e.bufferSize||30)){let r={};function i(i){const o=[];if($t(i,((t,n)=>{const i=on(n);if(Yr(r,i)){const r=Xr(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return te();const a=qt(i[0],o),g=t=>{$t(a,((n,r)=>{const i=Xr(n,r);e.recordDroppedEvent(t,on(r),i)}))};return n.add((()=>t({body:tn(a,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&J&&I.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Kr(r,e),e)),(e=>{throw g("network_error"),e})))).then((e=>e),(e=>{if(e instanceof sn)return J&&I.error("Skipped sending event because buffer is full."),g("queue_overflow"),te();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function Xr(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let qr;function Jr(e,t=function(){if(qr)return qr;if(Lt(On.fetch))return qr=On.fetch.bind(On);const e=On.document;let t=On.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){vn&&I.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return qr=t.bind(On)}()){let n=0,r=0;return Qr(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return qr=void 0,n-=o,r--,ne(e)}}))}function $r(e){return Qr(e,(function(t){return new re(((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)}))}))}const ei=[St(),_t(),Or(),tr(),dr(),kr(),rr(),vr()];function ti(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...ei]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),On.SENTRY_RELEASE&&On.SENTRY_RELEASE.id&&(e.release=On.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(n=e.stackParser||Gr,Array.isArray(n)?fe(...n):n),integrations:vt(e),transport:e.transport||(Mt()?Jr:$r)};var n;Dt(Dn,t),e.autoSessionTracking&&function(){if(void 0===On.document)return void(vn&&I.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Ke({ignoreDuration:!0}),qe(),Wt((({from:e,to:t})=>{void 0!==e&&e!==t&&(Ke({ignoreDuration:!0}),qe())}))}()}let ni;function ri(e){return ni?ni.get(e):void 0}function ii(e){const t=ri(e);if(!t)return;const n={};for(const[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(Z(r));return n}const oi="sentry.source",ai="sentry.sample_rate",gi="sentry.op",si="sentry.origin";var li;function Ai(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}!function(e){e.Ok="ok";e.DeadlineExceeded="deadline_exceeded";e.Unauthenticated="unauthenticated";e.PermissionDenied="permission_denied";e.NotFound="not_found";e.ResourceExhausted="resource_exhausted";e.InvalidArgument="invalid_argument";e.Unimplemented="unimplemented";e.Unavailable="unavailable";e.InternalError="internal_error";e.UnknownError="unknown_error";e.Cancelled="cancelled";e.AlreadyExists="already_exists";e.FailedPrecondition="failed_precondition";e.Aborted="aborted";e.OutOfRange="out_of_range";e.DataLoss="data_loss"}(li||(li={}));function Ci(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Ai(t);"unknown_error"!==n&&e.setStatus(n)}class Ii{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class ci{constructor(e={}){this._traceId=e.traceId||W(),this._spanId=e.spanId||W().substring(16),this._startTime=e.startTimestamp||se(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[si]:e.origin||"manual",[gi]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[gi]}set op(e){this.setAttribute(gi,e)}get origin(){return this._attributes[si]}set origin(e){this.setAttribute(si,e)}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}startChild(e){const t=new ci({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);const n=Je(this);if(t.transaction=n,J&&n){const r=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${Le(t).description||"< unknown name >"}' (${n.spanContext().spanId}).`;I.log(r),this._logMessage=r}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach((t=>this.setAttribute(t,e[t])))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Ci(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;const t=Je(this);if(J&&t&&t.spanContext().spanId!==this._spanId){const e=this._logMessage;e&&I.log(e.replace("Starting","Finishing"))}this._endTime=Pe(e)}toTraceparent(){return De(this)}toContext(){return Z({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return _e(this)}getSpanJSON(){return Z({data:this._getData(),description:this._name,op:this._attributes[gi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[si],_metrics_summary:ii(this),profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(n||r)return n&&r?{...e,...t}:n?e:t}}function ui(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=He(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function di(e){if(!ui())return;const t=pi(e),n=ct(),r=e.scope?e.scope.getSpan():hi();if(e.onlyIfParent&&!r)return;const i=(e.scope||Ye()).clone();return fi(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function hi(){return Ye().getSpan()}function fi(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:i}){if(!ui())return;const o=ut();let a;if(t&&!r)a=t.startChild(n);else if(t){const r=et(t),{traceId:i,spanId:o}=t.spanContext(),g=Fe(t);a=e.startTransaction({traceId:i,parentSpanId:o,parentSampled:g,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{const{traceId:t,dsc:r,parentSpanId:g,sampled:s}={...o.getPropagationContext(),...i.getPropagationContext()};a=e.startTransaction({traceId:t,parentSpanId:g,parentSampled:s,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return i.setSpan(a),function(e,t,n){e&&(F(e,vi,n),F(e,mi,t))}(a,i,o),a}function pi(e){if(e.startTime){const t={...e};return t.startTimestamp=Pe(e.startTime),delete t.startTime,t}return e}const mi="_sentryScope",vi="_sentryIsolationScope";class yi extends ci{constructor(e,t){super(e),this._contexts={},this._hub=t||ct(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[oi]&&{source:this._attributes[oi]},...this._attributes[ai]&&{sampleRate:this._attributes[ai]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(oi,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Ii(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const t=Pe(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return Z({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return et(this)}setHub(e){this._hub=e}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(J&&I.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled)return J&&I.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&Le(e).timestamp)):[];if(this._trimEnd&&n.length>0){const e=n.map((e=>Le(e).timestamp)).filter(Boolean);this._endTime=e.reduce(((e,t)=>e>t?e:t))}const{scope:r,isolationScope:i}={scope:(o=this)[mi],isolationScope:o[vi]};var o;const{metadata:a}=this,{source:g}=a,s={contexts:{...this._contexts,trace:_e(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:i,...Z({dynamicSamplingContext:et(this)})},_metrics_summary:ii(this),...g&&{transaction_info:{source:g}}};return Object.keys(this._measurements).length>0&&(J&&I.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),J&&I.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}}const bi={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},wi=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class xi extends Ii{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),void 0===Le(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class Ei extends yi{constructor(e,t,n=bi.idleTimeout,r=bi.finalTimeout,i=bi.heartbeatInterval,o=!1,a=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=wi[4],this._autoFinishAllowed=!a,o&&(J&&I.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=wi[3],this.end())}),this._finalTimeout)}end(e){const t=Pe(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){J&&I.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;Le(e).timestamp||(e.setStatus("cancelled"),e.end(t),J&&I.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const{start_timestamp:n,timestamp:r}=Le(e),i=n&&n{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new xi(t,n,this.spanContext().spanId,e),J&&I.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=wi[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(J&&I.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=wi[1],this.end(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),J&&I.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,J&&I.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(J&&I.log(`[Tracing] popActivity ${e}`),delete this.activities[e],J&&I.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=se();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=wi[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(J&&I.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=wi[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){J&&I.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function ki(e){return(e||ct()).getScope().getTransaction()}let Si=!1;function Ti(){const e=ki();if(e){const t="internal_error";J&&I.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}function Oi(e,t,n){if(!ui(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setAttribute(ai,Number(e.sampled)),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setAttribute(ai,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(ai,Number(r))):(r=1,e.setAttribute(ai,r)),Ri(r)?r?(e.sampled=Math.random()1)||(J&&I.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1)}function Ni(){const e=this.getScope().getSpan();return e?{"sentry-trace":De(e)}:{}}function _i(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",o=e.instrumenter||"sentry";i!==o&&(J&&I.error(`A transaction was started with instrumenter=\`${o}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let a=new yi(e,this);return a=Oi(a,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Di(e,t,n,r,i,o,a,g=!1){const s=e.getClient(),l=s&&s.getOptions()||{};let A=new Ei(t,e,n,r,a,i,g);return A=Oi(A,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...o}),A.isRecording()&&A.initSpanRecorder(l._experiments&&l._experiments.maxSpans),s&&s.emit&&s.emit("startTransaction",A),A}function Pi(){const e=Ct();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=_i),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Ni),Si||(Si=!0,lr(Ti),Ir(Ti)))}Ti.tag="sentry_tracingErrorCallback";const Mi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Li=a;const Fi=(e,t,n)=>{let r,i;return o=>{t.value>=0&&(o||n)&&(i=t.value-(r||0),(i||void 0===r)&&(r=t.value,t.delta=i,e(t)))}},ji=()=>Li.__WEB_VITALS_POLYFILL__?Li.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=Li.performance.timing,t=Li.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n})()):Li.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Bi=()=>{const e=ji();return e&&e.activationStart||0},zi=(e,t)=>{const n=ji();let r="navigate";return n&&(r=Li.document&&Li.document.prerendering||Bi()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Vi=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{t(e.getEntries())}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Ui=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Li.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};Li.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let Zi=-1;const Gi=()=>(Zi<0&&(Li.document&&Li.document.visibilityState&&(Zi="hidden"!==Li.document.visibilityState||Li.document.prerendering?1/0:0),Ui((({timeStamp:e})=>{Zi=e}),!0)),{get firstHiddenTime(){return Zi}});let Wi=0,Hi=1/0,Yi=0;const Ki=e=>{e.forEach((e=>{e.interactionId&&(Hi=Math.min(Hi,e.interactionId),Yi=Math.max(Yi,e.interactionId),Wi=Yi?(Yi-Hi)/7+1:0)}))};let Qi;const Xi=()=>{"interactionCount"in performance||Qi||(Qi=Vi("event",Ki,{type:"event",buffered:!0,durationThreshold:0}))},qi=()=>Qi?Wi:performance.interactionCount||0,Ji=[],$i={},eo=e=>{const t=Ji[Ji.length-1],n=$i[e.interactionId];if(n||Ji.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};$i[t.id]=t,Ji.push(t)}Ji.sort(((e,t)=>t.latency-e.latency)),Ji.splice(10).forEach((e=>{delete $i[e.id]}))}},to=(e,t)=>{t=t||{},Xi();const n=zi("INP");let r;const i=e=>{e.forEach((e=>{if(e.interactionId&&eo(e),"first-input"===e.entryType){!Ji.some((t=>t.entries.some((t=>e.duration===t.duration&&e.startTime===t.startTime))))&&eo(e)}}));const t=(()=>{const e=Math.min(Ji.length-1,Math.floor(qi()/50));return Ji[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},o=Vi("event",i,{durationThreshold:t.durationThreshold||40});r=Fi(e,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Ui((()=>{i(o.takeRecords()),n.value<0&&qi()>0&&(n.value=0,n.entries=[]),r(!0)})))},no={},ro=e=>{Li.document&&(Li.document.prerendering?addEventListener("prerenderingchange",(()=>ro(e)),!0):"complete"!==Li.document.readyState?addEventListener("load",(()=>ro(e)),!0):setTimeout(e,0))},io={},oo={};let ao,go,so,lo,Ao;function Co(e,t=!1){return vo("lcp",e,fo,so,t)}function Io(e,t){return yo(e,t),oo[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);Vi(e,(t=>{co(e,{entries:t})}),t)}(e),oo[e]=!0),bo(e,t)}function co(e,t){const n=io[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){Mi&&I.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${me(r)}\nError:`,t)}}function uo(){return((e,t={})=>{const n=zi("CLS",0);let r,i=0,o=[];const a=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],a=o[o.length-1];i&&0!==o.length&&e.startTime-a.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e]),i>n.value&&(n.value=i,n.entries=o,r&&r())}}))},g=Vi("layout-shift",a);if(g){r=Fi(e,n,t.reportAllChanges);const i=()=>{a(g.takeRecords()),r(!0)};return Ui(i),i}})((e=>{co("cls",{metric:e}),ao=e}),{reportAllChanges:!0})}function ho(){return(e=>{const t=Gi(),n=zi("FID");let r;const i=e=>{e.startTime{e.forEach(i)},a=Vi("first-input",o);r=Fi(e,n),a&&Ui((()=>{o(a.takeRecords()),a.disconnect()}),!0)})((e=>{co("fid",{metric:e}),go=e}))}function fo(){return(e=>{const t=Gi(),n=zi("LCP");let r;const i=e=>{const i=e[e.length-1];if(i){const e=Math.max(i.startTime-Bi(),0);e{no[n.id]||(i(o.takeRecords()),o.disconnect(),no[n.id]=!0,r(!0))};return["keydown","click"].forEach((e=>{Li.document&&addEventListener(e,t,{once:!0,capture:!0})})),Ui(t,!0),t}})((e=>{co("lcp",{metric:e}),so=e}))}function po(){return((e,t)=>{t=t||{};const n=zi("TTFB"),r=Fi(e,n,t.reportAllChanges);ro((()=>{const e=ji();if(e){if(n.value=Math.max(e.responseStart-Bi(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}}))})((e=>{co("ttfb",{metric:e}),lo=e}))}function mo(){return to((e=>{co("inp",{metric:e}),Ao=e}))}function vo(e,t,n,r,i=!1){let o;return yo(e,t),oo[e]||(o=n(),oo[e]=!0),r&&t({metric:r}),bo(e,t,i?o:void 0)}function yo(e,t){io[e]=io[e]||[],io[e].push(t)}function bo(e,t,n){return()=>{n&&n();const r=io[e];if(!r)return;const i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function wo(e){return[{type:"span"},e]}function xo(e){return"number"==typeof e&&isFinite(e)}function Eo(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function ko(e){return e/1e3}function So(){return Li&&Li.addEventListener&&Li.performance}let To,Oo,Ro=0,No={};function _o(){const e=So();if(e&&Ae){e.mark&&Li.performance.mark("sentry-tracing-init");const t=vo("fid",(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ko(Ae),r=ko(t.startTime);Mi&&I.log("[Measurements] Adding FID"),No.fid={value:e.value,unit:"millisecond"},No["mark.fid"]={value:n+r,unit:"second"}}),ho,go),n=function(e,t=!1){return vo("cls",e,uo,ao,t)}((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Mi&&I.log("[Measurements] Adding CLS"),No.cls={value:e.value,unit:""},Oo=t)}),!0),r=Co((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Mi&&I.log("[Measurements] Adding LCP"),No.lcp={value:e.value,unit:"millisecond"},To=t)}),!0),i=function(e){return vo("ttfb",e,po,lo)}((({metric:e})=>{e.entries[e.entries.length-1]&&(Mi&&I.log("[Measurements] Adding TTFB"),No.ttfb={value:e.value,unit:"millisecond"})}));return()=>{t(),n(),r(),i()}}return()=>{}}function Do(e,t){if(So()&&Ae){const n=function(e,t){return n=({metric:n})=>{if(void 0===n.value)return;const r=n.entries.find((e=>e.duration===n.value&&void 0!==Po[e.name])),i=He();if(!r||!i)return;const o=Po[r.name],a=i.getOptions(),g=ko(Ae+r.startTime),s=ko(n.value),l=void 0!==r.interactionId?e[r.interactionId]:void 0;if(void 0===l)return;const{routeName:A,parentContext:C,activeTransaction:c,user:u,replayId:d}=l,h=void 0!==u?u.email||u.id||u.ip_address:void 0,f=void 0!==c?c.getProfileId():void 0,p=new ci({startTimestamp:g,endTimestamp:g+s,op:`ui.interaction.${o}`,name:T(r.target),attributes:{release:a.release,environment:a.environment,transaction:A,...void 0!==h&&""!==h?{user:h}:{},...void 0!==f?{profile_id:f}:{},...void 0!==d?{replay_id:d}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),m=function(e,t,n){if(!ui(t))return!1;let r;return r=void 0!==e&&"function"==typeof t.tracesSampler?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Li.location}):void 0!==e&&void 0!==e.sampled?e.sampled:void 0!==t.tracesSampleRate?t.tracesSampleRate:1,Ri(r)?!0===r?n:!1===r?0:r*n:(Mi&&I.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}(C,a,t);if(m&&Math.random(){Mi&&I.error("Error while sending interaction:",e)}))}},vo("inp",n,mo,Ao);var n}(e,t);return()=>{n()}}return()=>{}}const Po={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Mo(e){const t=So();if(!t||!Li.performance.getEntries||!Ae)return;Mi&&I.log("[Tracing] Adding & adjusting spans using Performance API");const n=ko(Ae),r=t.getEntries(),{op:i,start_timestamp:o}=Le(e);if(r.slice(Ro).forEach((t=>{const r=ko(t.startTime),i=ko(t.duration);if(!("navigation"===e.op&&o&&n+r{Lo(e,t,r,n)})),Lo(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Lo(e,t,"fetch",n,"cache","domainLookupStart"),Lo(e,t,"domainLookup",n,"DNS"),function(e,t,n){t.responseEnd&&(Eo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ko(t.requestStart),endTimestamp:n+ko(t.responseEnd)}),Eo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ko(t.responseStart),endTimestamp:n+ko(t.responseEnd)}))}(e,t,n)}(e,t,n);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,i){const o=i+n,a=o+r;Eo(e,{description:t.name,endTimestamp:a,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:o})}(e,t,r,i,n);const o=Gi(),a=t.startTime{if(!No[e]||!o||n>=o)return;const t=No[e].value,r=n+ko(t),i=Math.abs(1e3*(r-o)),a=i-t;Mi&&I.log(`[Measurements] Normalized ${e} from ${t} to ${i} (${a})`),No[e].value=i}));const t=No["mark.fid"];t&&No.fid&&(Eo(e,{description:"first input delay",endTimestamp:t.value+ko(No.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete No["mark.fid"]),"fcp"in No||delete No.cls,Object.keys(No).forEach((e=>{!function(e,t,n){const r=ki();r&&r.setMeasurement(e,t,n)}(e,No[e].value,No[e].unit)})),function(e){To&&(Mi&&I.log("[Measurements] Adding LCP Data"),To.element&&e.setTag("lcp.element",T(To.element)),To.id&&e.setTag("lcp.id",To.id),To.url&&e.setTag("lcp.url",To.url.trim().slice(0,200)),e.setTag("lcp.size",To.size));Oo&&Oo.sources&&(Mi&&I.log("[Measurements] Adding CLS Data"),Oo.sources.forEach(((t,n)=>e.setTag(`cls.source.${n+1}`,T(t.node)))))}(e)}To=void 0,Oo=void 0,No={}}function Lo(e,t,n,r,i,o){const a=o?t[o]:t[`${n}End`],g=t[`${n}Start`];g&&a&&Eo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+ko(g),endTimestamp:r+ko(a)})}function Fo(e,t,n,r){const i=t[n];null!=i&&i<2147483647&&(e[r]=i)}function jo(e,t,n,r,i="auto.http.browser"){if(!ui()||!e.fetchData)return;const o=t(e.fetchData.url);if(e.endTimestamp&&o){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){Ci(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end()}(n,e),delete r[t]))}const a=Ye(),g=He(),{method:s,url:l}=e.fetchData,A=function(e){try{return new URL(e).href}catch(e){return}}(l),C=A?Jn(A).host:void 0,I=o?di({name:`${s} ${l}`,onlyIfParent:!0,attributes:{url:l,type:"fetch","http.method":s,"http.url":A,"server.address":C,[si]:i},op:"http.client"}):void 0;if(I&&(e.fetchData.__span=I.spanContext().spanId,r[I.spanContext().spanId]=I),n(e.fetchData.url)&&g){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,r,i){const o=i||n.getSpan(),a=ut(),{traceId:g,spanId:s,sampled:l,dsc:A}={...a.getPropagationContext(),...n.getPropagationContext()},C=o?De(o):Ne(g,s,l),I=ke(A||(o?et(o):$e(g,t,n))),c=r.headers||("undefined"!=typeof Request&&E(e,Request)?e.headers:void 0);if(c){if("undefined"!=typeof Headers&&E(c,Headers)){const e=new Headers(c);return e.append("sentry-trace",C),I&&e.append(we,I),e}if(Array.isArray(c)){const e=[...c,["sentry-trace",C]];return I&&e.push([we,I]),e}{const e="baggage"in c?c.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),I&&t.push(I),{...c,"sentry-trace":C,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":C,baggage:I}}(t,g,a,n,I)}return I}const Bo=["localhost",/^\/(?!\/)/],zo={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Bo,tracePropagationTargets:Bo};function Vo(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:o,enableHTTPTimings:a}={traceFetch:zo.traceFetch,traceXHR:zo.traceXHR,...e},g="function"==typeof o?o:e=>!0,s=e=>function(e,t){return M(e,t||Bo)}(e,r||i),l={};t&&Hn((e=>{const t=jo(e,g,s,l);if(t){const n=Go(e.fetchData.url),r=n?Jn(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}a&&t&&Uo(t)})),n&&Gn((e=>{const t=function(e,t,n,r){const i=e.xhr,o=i&&i[Zn];if(!ui()||!i||i.__sentry_own_request__||!o)return;const a=t(o.url);if(e.endTimestamp&&a){const e=i.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==o.status_code&&(Ci(t,o.status_code),t.end(),delete r[e]))}const g=Ye(),s=ut(),l=Go(o.url),A=l?Jn(l).host:void 0,C=a?di({name:`${o.method} ${o.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":o.method,"http.url":l,url:o.url,"server.address":A,[si]:"auto.http.browser"},op:"http.client"}):void 0;C&&(i.__sentry_xhr_span_id__=C.spanContext().spanId,r[i.__sentry_xhr_span_id__]=C);const I=He();if(i.setRequestHeader&&n(o.url)&&I){const{traceId:e,spanId:t,sampled:n,dsc:r}={...s.getPropagationContext(),...g.getPropagationContext()};!function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(we,n)}catch(e){}}(i,C?De(C):Ne(e,t,n),ke(r||(C?et(C):$e(e,I,g))))}return C}(e,g,s,l);a&&t&&Uo(t)}))}function Uo(e){const{url:t}=Le(e).data||{};if(!t||"string"!=typeof t)return;const n=Io("resource",(({entries:r})=>{r.forEach((r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){const t=function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}r===e&&(t=r);return{name:t,version:n}}(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!Ae)return r;return[...r,["http.request.redirect_start",Zo(e.redirectStart)],["http.request.fetch_start",Zo(e.fetchStart)],["http.request.domain_lookup_start",Zo(e.domainLookupStart)],["http.request.domain_lookup_end",Zo(e.domainLookupEnd)],["http.request.connect_start",Zo(e.connectStart)],["http.request.secure_connection_start",Zo(e.secureConnectionStart)],["http.request.connection_end",Zo(e.connectEnd)],["http.request.request_start",Zo(e.requestStart)],["http.request.response_start",Zo(e.responseStart)],["http.request.response_end",Zo(e.responseEnd)]]}(r);t.forEach((t=>e.setAttribute(...t))),setTimeout(n)}}))}))}function Zo(e=0){return((Ae||performance.timeOrigin)+e)/1e3}function Go(e){try{return new URL(e,Li.location.origin).href}catch(e){return}}const Wo={...bi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...zo},Ho=(e={})=>{const t=!!Mi&&!(!e.tracePropagationTargets&&!e.tracingOrigins);Pi(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...Wo,...e},r=_o(),i={};n.enableInp&&Do(i,n.interactionsSampleRate),n.enableLongTask&&Io("longtask",(({entries:e})=>{for(const t of e){const e=ki();if(!e)return;const n=ko(Ae+t.startTime),r=ko(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),n._experiments.enableInteractions&&Io("event",(({entries:e})=>{for(const t of e){const e=ki();if(!e)return;if("click"===t.name){const n=ko(Ae+t.startTime),r=ko(t.duration),i={description:T(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},o=N(t.target);o&&(i.attributes={"ui.component_name":o}),e.startChild(i)}}}));const o={name:void 0,context:void 0};function a(e){const t=ct(),{beforeStartSpan:i,idleTimeout:a,finalTimeout:g,heartbeatInterval:s}=n,l="pageload"===e.op;let A;if(l){const t=l?Qo("sentry-trace"):"",n=l?Qo("baggage"):void 0,{traceId:r,dsc:i,parentSpanId:o,sampled:a}=Re(t,n);A={traceId:r,parentSpanId:o,parentSampled:a,...e,metadata:{...e.metadata,dynamicSamplingContext:i},trimEnd:!0}}else A={trimEnd:!0,...e};const C=i?i(A):A;C.metadata=C.name!==A.name?{...C.metadata,source:"custom"}:C.metadata,o.name=C.name,o.context=C,!1===C.sampled&&Mi&&I.log(`[Tracing] Will not send ${C.op} transaction because of beforeNavigate.`),Mi&&I.log(`[Tracing] Starting ${C.op} transaction on scope`);const{location:c}=Li,u=Di(t,C,a,g,!0,{location:c},s,l);return l&&Li.document&&(Li.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(Li.document.readyState)&&u.sendAutoFinishSignal()})),["interactive","complete"].includes(Li.document.readyState)&&u.sendAutoFinishSignal()),u.registerBeforeFinishCallback((e=>{r(),Mo(e)})),u}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){const r=e.getOptions(),{markBackgroundSpan:g,traceFetch:s,traceXHR:l,shouldCreateSpanForRequest:A,enableHTTPTimings:C,_experiments:c}=n,u=r&&r.tracePropagationTargets,d=u||n.tracePropagationTargets;let h;Mi&&t&&u&&I.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let f=Li.location&&Li.location.href;if(e.on&&(e.on("startNavigationSpan",(e=>{h&&(Mi&&I.log(`[Tracing] Finishing current transaction with op: ${Le(h).op}`),h.end()),h=a({op:"navigation",...e})})),e.on("startPageLoadSpan",(e=>{h&&(Mi&&I.log(`[Tracing] Finishing current transaction with op: ${Le(h).op}`),h.end()),h=a({op:"pageload",...e})}))),n.instrumentPageLoad&&e.emit&&Li.location){const t={name:Li.location.pathname,startTimestamp:Ae?Ae/1e3:void 0,origin:"auto.pageload.browser",attributes:{[oi]:"url"}};Yo(e,t)}n.instrumentNavigation&&e.emit&&Li.location&&Wt((({to:t,from:n})=>{if(void 0===n&&f&&-1!==f.indexOf(t))f=void 0;else if(n!==t){f=void 0;const t={name:Li.location.pathname,origin:"auto.navigation.browser",attributes:{[oi]:"url"}};Ko(e,t)}})),g&&(Li.document?Li.document.addEventListener("visibilitychange",(()=>{const e=ki();if(Li.document.hidden&&e){const t="cancelled",{op:n,status:r}=Le(e);Mi&&I.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}})):Mi&&I.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c.enableInteractions&&function(e,t){let n;const r=()=>{const{idleTimeout:r,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",g=ki();if(g&&g.op&&["navigation","pageload"].includes(g.op))return void(Mi&&I.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`));if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name)return void(Mi&&I.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`));const{location:s}=Li,l={name:t.name,op:a,trimEnd:!0,data:{[oi]:t.context?qo(t.context):"url"}};n=Di(ct(),l,r,i,!0,{location:s},o)};["click"].forEach((e=>{Li.document&&addEventListener(e,r,{once:!1,capture:!0})}))}(n,o),n.enableInp&&function(e,t){const n=({entries:n})=>{const r=He(),i=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,o=void 0!==i?i.getReplayId():void 0,a=ki(),g=Ye(),s=void 0!==g?g.getUser():void 0;n.forEach((n=>{if(function(e){return"duration"in e}(n)){const r=n.interactionId;if(void 0===r)return;const i=e[r],g=n.duration,l=n.startTime,A=Object.keys(e),C=A.length>0?A.reduce(((t,n)=>e[t].duratione[t])).some((e=>e.duration===g&&e.startTime===l)))return}if(!r)return;if(i)i.duration=Math.max(i.duration,g);else if(A.lengthe[C].duration){const n=t.name,i=t.context;n&&i&&(C&&Object.keys(e).length>=Xo&&delete e[C],e[r]={routeName:n,duration:g,parentContext:i,user:s,activeTransaction:a,replayId:o,startTime:l})}}}))};Io("event",n),Io("first-input",n)}(i,o),Vo({traceFetch:s,traceXHR:l,tracePropagationTargets:d,shouldCreateSpanForRequest:A,enableHTTPTimings:C})},options:n}};function Yo(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=hi();return"pageload"===(n&&Le(n).op)?n:void 0}function Ko(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=hi();return"navigation"===(n&&Le(n).op)?n:void 0}function Qo(e){const t=(n=`meta[name=${e}]`,S.document&&S.document.querySelector?S.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}const Xo=10;function qo(e){const t=e.attributes&&e.attributes[oi],n=e.data&&e.data[oi],r=e.metadata&&e.metadata.source;return t||n||r}n(4146);var Jo=n(6540),$o=n.t(Jo,2);let ea,ta,na,ra,ia,oa,aa,ga=!1;var sa=n(6284);function la(){return"undefined"!=typeof window&&(!(0,sa.wD)()||void 0!==a.process&&"renderer"===a.process.type)}const Aa=a,Ca="#ffffff",Ia="inherit",ca="rgba(108, 95, 199, 1)",ua={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Ca,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:ca,submitBorder:ca,submitOutlineFocus:"#29232f",submitForeground:Ca,submitForegroundHover:Ca,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:Ia,inputForeground:Ia,inputBorder:"var(--border)",inputOutlineFocus:ca,formBorderRadius:"20px",formContentBorderRadius:"6px"},da=ua,ha={...ua,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"},fa="widget",pa="api";async function ma({feedback:{message:e,email:t,name:n,source:r,url:i}},{includeReplay:o=!0}={}){const a=He(),g=a&&a.getTransport(),s=a&&a.getDsn();if(!a||!g||!s)return;const l={contexts:{feedback:{contact_email:t,name:n,message:e,url:i,source:r}},type:"feedback"};return We((async e=>{e.clearBreadcrumbs(),[pa,fa].includes(String(r))&&e.setLevel("info");const t=await async function({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const i=await je(e.getOptions(),n,r,t,e,ut());return null===i?(e.recordDroppedEvent("event_processor","feedback",n),null):(i.platform=i.platform||"javascript",i)}({scope:e,client:a,event:l});if(!t)return;a.emit&&a.emit("beforeSendFeedback",t,{includeReplay:Boolean(o)});const n=In(t,s,a.getOptions()._metadata,a.getOptions().tunnel);let i;try{i=await g.send(n)}catch(e){const t=new Error("Unable to send Feedback");try{t.cause=e}catch(e){}throw t}if(i){if("number"==typeof i.statusCode&&(i.statusCode<200||i.statusCode>=300))throw new Error("Unable to send Feedback");return i}}))}const va="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ya(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function ba(e){return`\n --background: ${e.background};\n --background-hover: ${e.backgroundHover};\n --foreground: ${e.foreground};\n --error: ${e.error};\n --success: ${e.success};\n --border: ${e.border};\n --border-radius: ${e.borderRadius};\n --box-shadow: ${e.boxShadow};\n\n --submit-background: ${e.submitBackground};\n --submit-background-hover: ${e.submitBackgroundHover};\n --submit-border: ${e.submitBorder};\n --submit-outline-focus: ${e.submitOutlineFocus};\n --submit-foreground: ${e.submitForeground};\n --submit-foreground-hover: ${e.submitForegroundHover};\n\n --cancel-background: ${e.cancelBackground};\n --cancel-background-hover: ${e.cancelBackgroundHover};\n --cancel-border: ${e.cancelBorder};\n --cancel-outline-focus: ${e.cancelOutlineFocus};\n --cancel-foreground: ${e.cancelForeground};\n --cancel-foreground-hover: ${e.cancelForegroundHover};\n\n --input-background: ${e.inputBackground};\n --input-foreground: ${e.inputForeground};\n --input-border: ${e.inputBorder};\n --input-outline-focus: ${e.inputOutlineFocus};\n\n --form-border-radius: ${e.formBorderRadius};\n --form-content-border-radius: ${e.formContentBorderRadius};\n `}function wa({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const i=Aa.document,o=i.createElement("div");o.id=e;const a=o.attachShadow({mode:"open"});return a.appendChild(function(e,t,n){const r=e.createElement("style");return r.textContent=`\n:host {\n --bottom: 1rem;\n --right: 1rem;\n --top: auto;\n --left: auto;\n --z-index: 100000;\n --font-family: ${n.light.fontFamily};\n --font-size: ${n.light.fontSize};\n\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${ba("dark"===t?n.dark:n.light)}\n}\n\n${"system"===t?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${ba(n.dark)}\n }\n}`:""}\n}`,r}(i,t,{dark:n,light:r})),a.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.dialog {\n line-height: 25px;\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n position: fixed;\n inset: 0;\n z-index: 10000;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n\n border: var(--border);\n border-radius: var(--form-border-radius);\n background-color: var(--background);\n color: var(--foreground);\n\n width: 320px;\n max-width: 100%;\n max-height: calc(100% - 2rem);\n display: flex;\n flex-direction: column;\n box-shadow: var(--box-shadow);\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n\n.dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 20px;\n font-weight: 600;\n padding: 24px 24px 0 24px;\n margin: 0;\n margin-bottom: 16px;\n}\n\n.brand-link {\n display: inline-flex;\n}\n\n.error {\n color: var(--error);\n margin-bottom: 16px;\n}\n\n.form {\n display: grid;\n overflow: auto;\n flex-direction: column;\n gap: 16px;\n padding: 0 24px 24px;\n}\n\n.form__error-container {\n color: var(--error);\n}\n\n.form__error-container--hidden {\n display: none;\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: grid;\n gap: 4px;\n align-items: center;\n grid-auto-flow: column;\n grid-auto-columns: max-content;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n line-height: inherit;\n background-color: var(--input-background);\n box-sizing: border-box;\n border: var(--input-border);\n border-radius: var(--form-content-border-radius);\n color: var(--input-foreground);\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 500;\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n color: var(--input-foreground);\n opacity: 0.65;\n}\n\n.form__input:focus-visible {\n outline: 1px auto var(--input-outline-focus);\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.btn-group {\n display: grid;\n gap: 8px;\n margin-top: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--cancel-border);\n border-radius: var(--form-content-border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 6px 16px;\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n background-color: var(--submit-background);\n border-color: var(--submit-border);\n color: var(--submit-foreground);\n}\n.btn--primary:hover {\n background-color: var(--submit-background-hover);\n color: var(--submit-foreground-hover);\n}\n.btn--primary:focus-visible {\n outline: 1px auto var(--submit-outline-focus);\n}\n\n.btn--default {\n background-color: var(--cancel-background);\n color: var(--cancel-foreground);\n font-weight: 500;\n}\n.btn--default:hover {\n background-color: var(--cancel-background-hover);\n color: var(--cancel-foreground-hover);\n}\n.btn--default:focus-visible {\n outline: 1px auto var(--cancel-outline-focus);\n}\n\n.success-message {\n background-color: var(--background);\n border: var(--border);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n font-weight: 600;\n color: var(--success);\n padding: 12px 24px;\n line-height: 25px;\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success-icon path {\n fill: var(--success);\n}\n",t}(i)),{shadow:a,host:o}}catch(e){throw I.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function xa(e,t,n){if(!e)return;e.hideError();try{const e=await function({name:e,email:t,message:n,source:r=pa,url:i=R()},o={}){if(!n)throw new Error("Unable to submit feedback with empty message");return ma({feedback:{name:e,email:t,message:n,url:i,source:r}},o)}({...t,source:fa},n);return e}catch(t){va&&I.error(t),e&&e.showError("There was a problem submitting feedback, please wait and try again.")}}function Ea(e,t){return Object.entries(t).forEach((([t,n])=>{e.setAttributeNS(null,t,n)})),e}function ka(e,t,...n){const r=Aa.document.createElement(e);t&&Object.entries(t).forEach((([e,t])=>{"className"===e&&"string"==typeof t?r.setAttribute("class",t):"boolean"==typeof t&&t?r.setAttribute(e,""):"string"==typeof t?r.setAttribute(e,t):e.startsWith("on")&&"function"==typeof t&&r.addEventListener(e.substring(2).toLowerCase(),t)}));for(const e of n)Sa(r,e);return r}function Sa(e,t){const n=Aa.document;if(null!=t)if(Array.isArray(t))for(const n of t)Sa(e,n);else!1===t||("string"==typeof t?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Ta({buttonLabel:e,onClick:t}){const n=ka("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},function(){const e=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ea(e("svg"),{class:"feedback-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"}),n=Ea(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ea(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const i=e("defs"),o=Ea(e("clipPath"),{id:"clip0_57_80"}),a=Ea(e("rect"),{width:"20",height:"20",fill:"white"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}().el,e?ka("span",{className:"widget__actor__text"},e):null);return n.addEventListener("click",(function(e){t&&t(e)})),{get el(){return n},show:()=>{n.classList.remove("widget__actor--hidden"),n.setAttribute("aria-hidden","false")},hide:()=>{n.classList.add("widget__actor--hidden"),n.setAttribute("aria-hidden","true")}}}function Oa(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function Ra({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:i,messagePlaceholder:o,isRequiredLabel:a,cancelButtonLabel:g,submitButtonLabel:s,showName:l,showEmail:A,isNameRequired:C,isEmailRequired:I,defaultName:c,defaultEmail:u,onCancel:d,onSubmit:h}){const{el:f}=function({label:e}){return{el:ka("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}({label:s});const p=ka("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});const m=ka("input",{id:"name",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"name",required:C,className:"form__input",placeholder:t,value:c}),v=ka("input",{id:"email",type:A?"text":"hidden","aria-hidden":A?"false":"true",name:"email",required:I,className:"form__input",placeholder:r,value:u}),y=ka("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:o}),b=ka("button",{type:"button",className:"btn btn--default","aria-label":g,onClick:e=>{d&&d(e)}},g),w=ka("form",{className:"form",onSubmit:function(e){if(e.preventDefault(),e.target instanceof HTMLFormElement)try{if(h){const t=new FormData(e.target),n={name:Oa(t,"name"),email:Oa(t,"email"),message:Oa(t,"message")};h(n)}}catch(e){}}},[p,l&&ka("label",{htmlFor:"name",className:"form__label"},[ka("span",{className:"form__label__text"},e,C&&ka("span",{className:"form__label__text--required"},` ${a}`)),m]),!l&&m,A&&ka("label",{htmlFor:"email",className:"form__label"},[ka("span",{className:"form__label__text"},n,I&&ka("span",{className:"form__label__text--required"},` ${a}`)),v]),!A&&v,ka("label",{htmlFor:"message",className:"form__label"},[ka("span",{className:"form__label__text"},i,ka("span",{className:"form__label__text--required"},` ${a}`)),y]),ka("div",{className:"btn-group"},[f,b])]);return{get el(){return w},showError:function(e){p.textContent=e,p.classList.remove("form__error-container--hidden"),p.setAttribute("aria-hidden","false")},hideError:function(){p.textContent="",p.classList.add("form__error-container--hidden"),p.setAttribute("aria-hidden","true")}}}function Na({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:i,isEmailRequired:o,colorScheme:a,defaultName:g,defaultEmail:s,onClosed:l,onCancel:A,onSubmit:C,...I}){let c=null;function u(){c&&(c.open=!1)}const{el:d,showError:h,hideError:f}=Ra({showEmail:r,showName:n,isEmailRequired:o,isNameRequired:i,defaultName:g,defaultEmail:s,onSubmit:C,onCancel:A,...I});return c=ka("dialog",{className:"dialog",open:!0,onClick:function(){u(),l&&l()}},ka("div",{className:"dialog__content",onClick:e=>{e.stopPropagation()}},ka("h2",{className:"dialog__header"},e,t&&ka("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},function({colorScheme:e}){const t=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),n=Ea(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=Ea(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const i=t("defs"),o=t("style");return o.textContent=`\n path {\n fill: ${"dark"===e?"#fff":"#362d59"};\n }`,"system"===e&&(o.textContent+="\n @media (prefers-color-scheme: dark) {\n path: {\n fill: '#fff';\n }\n }\n "),i.append(o),n.append(i),{get el(){return n}}}({colorScheme:a}).el)),d)),{get el(){return c},showError:h,hideError:f,open:function(){c&&(c.open=!0)},close:u,checkIsOpen:function(){return c&&!0===c.open||!1}}}function _a({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=ka("div",{className:"success-message",onClick:n},function(){const e=e=>Aa.document.createElementNS("http://www.w3.org/2000/svg",e),t=Ea(e("svg"),{class:"success-icon",width:"16",height:"17",viewBox:"0 0 16 17",fill:"none"}),n=Ea(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ea(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),i=Ea(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(i,r);const o=e("defs"),a=Ea(e("clipPath"),{id:"clip0_57_156"}),g=Ea(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return a.appendChild(g),o.appendChild(a),t.appendChild(o).appendChild(a).appendChild(g),{get el(){return t}}}().el,e);return{el:r,remove:n}}function Da({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let i,o,a=!1;async function g(t){if(!o)return;const r=[];if(n.isNameRequired&&!t.name&&r.push(n.nameLabel),n.isEmailRequired&&!t.email&&r.push(n.emailLabel),t.message||r.push(n.messageLabel),r.length>0)return void o.showError(`Please enter in the following required fields: ${r.join(", ")}`);await xa(o,t)?(u(),function(){if(e)try{const t=_a({message:n.successMessageText,onRemove:()=>{r&&clearTimeout(r),l()}});if(!t.el)throw new Error("Unable to show success message");e.appendChild(t.el);const r=setTimeout((()=>{t&&t.remove()}),5e3)}catch(e){I.error(e)}}(),n.onSubmitSuccess&&n.onSubmitSuccess()):n.onSubmitError&&n.onSubmitError()}function s(){const e=He(),t=e&&e.getIntegrationByName&&e.getIntegrationByName("Replay");t&&t.flush().catch((e=>{va&&I.error(e)}))}function l(){i&&i.show()}function A(){i&&i.hide()}function C(){try{if(o)return o.open(),a=!0,n.onFormOpen&&n.onFormOpen(),void s();const t=n.useSentryUser,r=Ye(),i=r&&r.getUser();if(o=Na({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:t&&i&&i[t.name]||"",defaultEmail:t&&i&&i[t.email]||"",onClosed:()=>{l(),a=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{c(),l()},onSubmit:g}),!o.el)throw new Error("Unable to open Feedback dialog");e.appendChild(o.el),A(),n.onFormOpen&&n.onFormOpen(),s()}catch(e){I.error(e)}}function c(){o&&(o.close(),a=!1,n.onFormClose&&n.onFormClose())}function u(){if(o){c();const e=o.el;e&&e.remove(),o=void 0}}function d(){a||C(),A()}return r?r.addEventListener("click",d):t&&(i=Ta({buttonLabel:n.buttonLabel,onClick:d}),i.el&&e.appendChild(i.el)),{get actor(){return i},get dialog(){return o},showActor:l,hideActor:A,removeActor:function(){i&&i.el&&i.el.remove()},openDialog:C,closeDialog:c,removeDialog:u}}const Pa=Aa.document;class Ma{static __initStatic(){this.id="Feedback"}constructor({autoInject:e=!0,id:t="sentry-feedback",isEmailRequired:n=!1,isNameRequired:r=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:g={email:"email",name:"username"},themeDark:s,themeLight:l,colorScheme:A="system",buttonLabel:C="Report a Bug",cancelButtonLabel:I="Cancel",submitButtonLabel:c="Send Bug Report",formTitle:u="Report a Bug",emailPlaceholder:d="your.email@example.org",emailLabel:h="Email",messagePlaceholder:f="What's the bug? What did you expect?",messageLabel:p="Description",namePlaceholder:m="Your Name",nameLabel:v="Name",isRequiredLabel:y="(required)",successMessageText:b="Thank you for your report!",onFormClose:w,onFormOpen:x,onSubmitError:E,onSubmitSuccess:k}={}){this.name=Ma.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:e,showBranding:i,id:t,isEmailRequired:n,isNameRequired:r,showEmail:o,showName:a,useSentryUser:g,colorScheme:A,themeDark:{...ha,...s},themeLight:{...da,...l},buttonLabel:C,cancelButtonLabel:I,submitButtonLabel:c,formTitle:u,emailLabel:h,emailPlaceholder:d,messageLabel:p,messagePlaceholder:f,nameLabel:v,namePlaceholder:m,isRequiredLabel:y,successMessageText:b,onFormClose:w,onFormOpen:x,onSubmitError:E,onSubmitSuccess:k}}setupOnce(){if(la())try{this._cleanupWidgetIfExists();const{autoInject:e}=this.options;if(!e)return;this._createWidget(this.options)}catch(e){va&&I.error(e)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(e,t){try{const n=ya(this.options,t||{});return this._ensureShadowHost(n,(({shadow:t})=>{const r="string"==typeof e?Pa.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)return va&&I.error("[Feedback] Unable to attach to target element"),null;const i=Da({shadow:t,options:n,attachTo:r});return this._widgets.add(i),this._widget||(this._widget=i),i}))}catch(e){return va&&I.error(e),null}}createWidget(e){try{return this._createWidget(ya(this.options,e||{}))}catch(e){return va&&I.error(e),null}}removeWidget(e){if(!e)return!1;try{if(this._widgets.has(e))return e.removeActor(),e.removeDialog(),this._widgets.delete(e),this._widget===e&&(this._widget=null),!0}catch(e){va&&I.error(e)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const e=Pa.querySelector(`#${this.options.id}`);e&&e.remove()}_createWidget(e){return this._ensureShadowHost(e,(({shadow:t})=>{const n=Da({shadow:t,options:e});return!this._hasInsertedActorStyles&&n.actor&&(t.appendChild(function(e){const t=e.createElement("style");return t.textContent="\n.widget__actor {\n position: fixed;\n left: var(--left);\n right: var(--right);\n bottom: var(--bottom);\n top: var(--top);\n z-index: var(--z-index);\n\n line-height: 16px;\n\n display: flex;\n align-items: center;\n gap: 8px;\n\n border-radius: var(--border-radius);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n padding: 16px;\n text-decoration: none;\n z-index: 9000;\n\n color: var(--foreground);\n background-color: var(--background);\n border: var(--border);\n box-shadow: var(--box-shadow);\n opacity: 1;\n transition: opacity 0.1s ease-in-out;\n}\n\n.widget__actor:hover {\n background-color: var(--background-hover);\n}\n\n.widget__actor svg {\n width: 16px;\n height: 16px;\n}\n\n.widget__actor--hidden {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n\n.widget__actor__text {\n}\n\n@media (max-width: 600px) {\n .widget__actor__text {\n display: none;\n }\n}\n\n.feedback-icon path {\n fill: var(--foreground);\n}\n",t}(Pa)),this._hasInsertedActorStyles=!0),this._widgets.add(n),this._widget||(this._widget=n),n}))}_ensureShadowHost(e,t){let n=!1;if(!this._shadow||!this._host){const{id:t,colorScheme:r,themeLight:i,themeDark:o}=e,{shadow:a,host:g}=wa({id:t,colorScheme:r,themeLight:i,themeDark:o});this._shadow=a,this._host=g,n=!0}this._host.dataset.sentryFeedbackColorscheme=e.colorScheme;const r=t({shadow:this._shadow,host:this._host});return n&&Pa.body.appendChild(this._host),r}}function La(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function Fa(e,t){const n=t&&function(e){return void 0!==e.getClient}(t)?t.getClient():t,r=n&&n.getDsn(),i=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){if(!t)return!1;return ja(e)===ja(t)}(e,i)}function ja(e){return"/"===e[e.length-1]?e.slice(0,-1):e}Ma.__initStatic();const Ba=a,za="sentryReplaySession",Va="Unable to send Replay",Ua=15e4,Za=5e3,Ga=2e7,Wa=36e5;function Ha(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}var Ya;function Ka(e){const t=Ha([e,"optionalAccess",e=>e.host]);return Boolean(Ha([t,"optionalAccess",e=>e.shadowRoot])===e)}function Qa(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Xa(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,qa).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function qa(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=Xa(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Ya||(Ya={}));class Ja{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const t=Ha([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]);return r=()=>-1,null!=(n=t)?n:r();var n,r}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $a({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function eg({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function tg(e){return e.toLowerCase()}function ng(e){return e.toUpperCase()}const rg="__rrweb_original__";function ig(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?tg(t):null}function og(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let ag=1;const gg=new RegExp("[^a-z0-9-_:]");function sg(){return ag++}let lg,Ag;const Cg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ig=/^(?:[a-z+]+:)?\/\//i,cg=/^www\..*/i,ug=/^(data:)([^,]*),(.*)/i;function dg(e,t){return(e||"").replace(Cg,((e,n,r,i,o,a)=>{const g=r||o||a,s=n||i||"";if(!g)return e;if(Ig.test(g)||cg.test(g))return`url(${s}${g}${s})`;if(ug.test(g))return`url(${s}${g}${s})`;if("/"===g[0])return`url(${s}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+g}${s})`;const l=t.split("/"),A=g.split("/");l.pop();for(const e of A)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${s}${l.join("/")}${s})`}))}const hg=/^[^ \t\n\r\u000c]+/,fg=/^[, \t\n\r\u000c]+/;function pg(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function mg(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function vg(){const e=document.createElement("a");return e.href="",e.href}function yg(e,t,n,r,i,o){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?pg(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}const i=[];for(;r(fg),!(n>=t.length);){let o=r(hg);if(","===o.slice(-1))o=pg(e,o.substring(0,o.length-1)),i.push(o);else{let r="";o=pg(e,o);let a=!1;for(;;){const e=t.charAt(n);if(""===e){i.push((o+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,i.push((o+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return i.join(", ")}(e,r):"style"===n?dg(r,vg()):"object"===t&&"data"===n?pg(e,r):"function"==typeof o?o(n,r,i):r:pg(e,r):r}function bg(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function wg(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:wg(e.parentNode,t,n,r+1):-1}function xg(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function Eg(e,t,n,r,i,o){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){const e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let g=-1,s=-1;if(o){if(s=wg(a,xg(r,i)),s<0)return!0;g=wg(a,xg(t,n),s>=0?s:1/0)}else{if(g=wg(a,xg(t,n)),g<0)return!1;s=wg(a,xg(r,i),g>=0?g:1/0)}return g>=0?!(s>=0)||g<=s:!(s>=0)&&!!o}catch(e){}return!!o}function kg(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:g,maskAttributeFn:s,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:I,inlineStylesheet:c,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ya.Document,childNodes:[],compatMode:e.compatMode}:{type:Ya.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ya.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:a,maskInputOptions:g={},maskAttributeFn:s,maskInputFn:l,dataURLOptions:A={},inlineImages:C,recordCanvas:I,keepIframeSrcFn:c,newlyAddedElement:u=!1,rootId:d,maskAllText:h,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:v}=t,y=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,i,o),b=function(e){if(e instanceof HTMLFormElement)return"form";const t=tg(e.tagName);return gg.test(t)?"div":t}(e);let w={};const x=e.attributes.length;for(let t=0;tt.href===e.href));let r=null;t&&(r=Xa(t)),r&&(delete w.rel,delete w.href,w._cssText=dg(r,t.href))}if("style"===b&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Xa(e.sheet);t&&(w._cssText=dg(t,vg()))}if("input"===b||"textarea"===b||"select"===b||"option"===b){const t=e,n=ig(t),r=og(t,ng(b),n),i=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Eg(t,f,m,p,v,$a({type:n,tagName:ng(b),maskInputOptions:g}));w.value=eg({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(w.checked=i)}"option"===b&&(e.selected&&!g.select?w.selected=!0:delete w.selected);if("canvas"===b&&I)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e)))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(A.type,A.quality));else if(!("__context"in e)){const t=e.toDataURL(A.type,A.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(A.type,A.quality)&&(w.rr_dataURL=t)}if("img"===b&&C){lg||(lg=n.createElement("canvas"),Ag=lg.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const i=()=>{t.removeEventListener("load",i);try{lg.width=t.naturalWidth,lg.height=t.naturalHeight,Ag.drawImage(t,0,0),w.rr_dataURL=lg.toDataURL(A.type,A.quality)}catch(e){}r?w.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}"audio"!==b&&"video"!==b||(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime);u||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(y){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==b||c(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(b)&&(E=!0)}catch(e){}return{type:Ya.Element,tagName:b,attributes:w,childNodes:[],isSVG:mg(e)||void 0,needBlock:y,rootId:d,isCustom:E}}(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:a,inlineStylesheet:c,maskAttributeFn:s,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y,rootId:b,maskAllText:g,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:I});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:a,maskTextFn:g,maskInputOptions:s,maskInputFn:l,rootId:A}=t,C=e.parentNode&&e.parentNode.tagName;let I=e.textContent;const c="STYLE"===C||void 0,u="SCRIPT"===C||void 0,d="TEXTAREA"===C||void 0;if(c&&I){try{e.nextSibling||e.previousSibling||Ha([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(I=Xa(e.parentNode.sheet))}catch(e){}I=dg(I,vg())}u&&(I="SCRIPT_PLACEHOLDER");const h=Eg(e,r,o,i,a,n);c||u||d||!I||!h||(I=g?g(I,e.parentElement):I.replace(/[\S]/g,"*"));d&&I&&(s.textarea||h)&&(I=l?l(I,e.parentNode):I.replace(/[\S]/g,"*"));if("OPTION"===C&&I){I=eg({isMasked:Eg(e,r,o,i,a,$a({type:null,tagName:C,maskInputOptions:s})),element:e,value:I,maskInputFn:l})}return{type:Ya.Text,textContent:I||"",isStyle:c,rootId:A}}(e,{maskAllText:g,maskTextClass:l,unmaskTextClass:A,maskTextSelector:C,unmaskTextSelector:I,maskTextFn:d,maskInputOptions:u,maskInputFn:h,rootId:b});case e.CDATA_SECTION_NODE:return{type:Ya.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Ya.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Sg(e){return null==e?"":e.toLowerCase()}function Tg(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:g,maskTextClass:s,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:I=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:y=!1,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:T=!1}=t;let{preserveWhiteSpace:O=!0}=t;const R=kg(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:g,unblockSelector:a,maskTextClass:s,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,inlineStylesheet:c,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:v,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:T});if(!R)return null;let N;N=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ya.Comment)return!0;if(e.type===Ya.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Sg(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Sg(e.attributes.name)||"icon"===Sg(e.attributes.rel)||"apple-touch-icon"===Sg(e.attributes.rel)||"shortcut icon"===Sg(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Sg(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Sg(e.attributes.property).match(/^(og|twitter|fb):/)||Sg(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Sg(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Sg(e.attributes.name)||"googlebot"===Sg(e.attributes.name)||"bingbot"===Sg(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Sg(e.attributes.name)||"generator"===Sg(e.attributes.name)||"framework"===Sg(e.attributes.name)||"publisher"===Sg(e.attributes.name)||"progid"===Sg(e.attributes.name)||Sg(e.attributes.property).match(/^article:/)||Sg(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Sg(e.attributes.name)||"yandex-verification"===Sg(e.attributes.name)||"csrf-token"===Sg(e.attributes.name)||"p:domain_verify"===Sg(e.attributes.name)||"verify-v1"===Sg(e.attributes.name)||"verification"===Sg(e.attributes.name)||"shopify-checkout-api-token"===Sg(e.attributes.name)))return!0}}return!1}(R,p)&&(O||R.type!==Ya.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?sg():-2;const _=Object.assign(R,{id:N});if(r.add(e,_),-2===N)return null;b&&b(e);let D=!I;if(_.type===Ya.Element){D=D&&!_.needBlock,delete _.needBlock;const t=e.shadowRoot;t&&Qa(t)&&(_.isShadowHost=!0)}if((_.type===Ya.Document||_.type===Ya.Element)&&D){p.headWhitespace&&_.type===Ya.Element&&"head"===_.tagName&&(O=!1);const t={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:g,unblockSelector:a,maskTextClass:s,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:I,inlineStylesheet:c,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S};for(const n of Array.from(e.childNodes)){const e=Tg(n,t);e&&_.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Tg(n,t);r&&(Qa(e.shadowRoot)&&(r.isShadow=!0),_.childNodes.push(r))}}return e.parentNode&&Ka(e.parentNode)&&Qa(e.parentNode)&&(_.isShadow=!0),_.type===Ya.Element&&"iframe"===_.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"!==i){const r=setTimeout((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),o=!0,t()}))}const a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&w){const n=Tg(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:g,maskTextClass:s,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S});n&&w(e,n)}}),x),_.type===Ya.Element&&"link"===_.tagName&&"stylesheet"===_.attributes.rel&&function(e,t,n){let r,i=!1;try{r=e.sheet}catch(e){return}if(r)return;const o=setTimeout((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}(e,(()=>{if(E){const t=Tg(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:g,maskTextClass:s,unmaskTextClass:l,maskTextSelector:A,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:S});t&&E(e,t)}}),k),_}function Og(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function Rg(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let Ng={map:{},getId:()=>-1,getNode:()=>null,removeNodeFromMap(){},has:()=>!1,reset(){}};function _g(e,t,n={}){let r=null,i=0;return function(...o){const a=Date.now();i||!1!==n.leading||(i=a);const g=t-(a-i),s=this;g<=0||g>t?(r&&(!function(...e){Jg("clearTimeout")(...e)}(r),r=null),i=a,e.apply(s,o)):r||!1===n.trailing||(r=$g((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(s,o)}),g))}}function Dg(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){$g((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Dg(e,t,o||{},!0)}function Pg(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ng=new Proxy(Ng,{get:(e,t,n)=>Reflect.get(e,t,n)}));let Mg=Date.now;function Lg(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Og([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Og([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Og([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Og([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Og([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Og([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Fg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function jg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Bg(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function zg(e,t,n,r,i){if(!e)return!1;const o=Bg(e);if(!o)return!1;const a=xg(t,n);if(!i){const e=r&&o.matches(r);return a(o)&&!e}const g=wg(o,a);let s=-1;return!(g<0)&&(r&&(s=wg(o,xg(null,r))),g>-1&&s<0||ge.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Mg=()=>(new Date).getTime());class Yg{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n();var t,n}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Kg(e){let t=null;return Og([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Qg(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Kg(n);)n=t;return n}(e);return t.contains(n)}function Xg(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Qg(e))}const qg={};function Jg(e){const t=qg[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return qg[e]=r.bind(window)}function $g(...e){return Jg("setTimeout")(...e)}var es=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(es||{}),ts=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ts||{}),ns=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ns||{}),rs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(rs||{});function is(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function os(e){return"__ln"in e}class as{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;ne.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&os(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&os(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const gs=(e,t)=>`${e}@${t}`;class ss{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new as,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!Xg(i))return;const o=Ka(i.parentNode)?this.mirror.getId(Kg(i)):this.mirror.getId(i.parentNode),a=r(i);if(-1===o||-1===a)return n.addNode(i);const g=Tg(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Gg(e,this.mirror)&&this.iframeManager.addIframe(e),Wg(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Hg(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});g&&(e.push({parentId:o,nextId:a,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)As(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of this.addedSet)Is(this.droppedSet,e)||As(this.removes,e,this.mirror)?Is(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),i(e.value)}const a={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!Vg(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;zg(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Eg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Bg(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=ig(t),i=t.tagName;r=og(t,i,n);const o=$a({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=eg({isMasked:Eg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(zg(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!bg(t.tagName,n)&&(i.attributes[n]=yg(this.doc,tg(t.tagName),tg(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?r:[r,o]:i._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(zg(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Ka(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);zg(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Vg(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ls(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ug(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[gs(n,r)]?ls(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Ka(e.target)||!Qa(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Vg(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[gs(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);zg(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Hg(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ls(e,t){e.delete(t),t.childNodes.forEach((t=>ls(e,t)))}function As(e,t,n){return 0!==e.length&&Cs(e,t,n)}function Cs(e,t,n){const{parentNode:r}=t;if(!r)return!1;const i=n.getId(r);return!!e.some((e=>e.id===i))||Cs(e,r,n)}function Is(e,t){return 0!==e.size&&cs(e,t)}function cs(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||cs(e,n))}let us;function ds(e){us=e}function hs(){us=void 0}const fs=e=>{if(!us)return e;return(...t)=>{try{return e(...t)}catch(e){if(us&&!0===us(e))return()=>{};throw e}}};function ps(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const ms=[];function vs(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ys(e,t){const n=new ss;ms.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=ps([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);i&&window[i]&&(r=window[i]);const o=new r(fs((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function bs({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const g=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,s=[];let l=null;return Object.keys(ns).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==g[e])).forEach((a=>{let g=tg(a);const A=(t=>a=>{const g=vs(a);if(zg(g,r,i,o,!0))return;let s=null,A=t;if("pointerType"in a){switch(a.pointerType){case"mouse":s=rs.Mouse;break;case"touch":s=rs.Touch;break;case"pen":s=rs.Pen}s===rs.Touch?ns[t]===ns.MouseDown?A="TouchStart":ns[t]===ns.MouseUp&&(A="TouchEnd"):rs.Pen}else Zg(a)&&(s=rs.Touch);null!==s?(l=s,(A.startsWith("Touch")&&s===rs.Touch||A.startsWith("Mouse")&&s===rs.Mouse)&&(s=null)):ns[t]===ns.Click&&(s=l,l=null);const C=Zg(a)?a.changedTouches[0]:a;if(!C)return;const I=n.getId(g),{clientX:c,clientY:u}=C;fs(e)({type:ns[A],id:I,x:c,y:u,...null!==s&&{pointerType:s}})})(a);if(window.PointerEvent)switch(ns[a]){case ns.MouseDown:case ns.MouseUp:g=g.replace("mouse","pointer");break;case ns.TouchStart:case ns.TouchEnd:return}s.push(Rg(g,A,t))})),fs((()=>{s.forEach((e=>e()))}))}function ws({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){const g=fs(_g(fs((a=>{const g=vs(a);if(!g||zg(g,r,i,o,!0))return;const s=n.getId(g);if(g===t&&t.defaultView){const n=Lg(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:g.scrollLeft,y:g.scrollTop})})),a.scroll||100));return Rg("scroll",g,t)}const xs=["INPUT","TEXTAREA","SELECT"],Es=new WeakMap;function ks({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:a,ignoreSelector:g,maskInputOptions:s,maskInputFn:l,sampling:A,userTriggeredOnInput:C,maskTextClass:I,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d}){function h(e){let n=vs(e);const A=e.isTrusted,h=n&&ng(n.tagName);if("OPTION"===h&&(n=n.parentElement),!n||!h||xs.indexOf(h)<0||zg(n,r,i,o,!0))return;const p=n;if(p.classList.contains(a)||g&&p.matches(g))return;const m=ig(n);let v=og(p,h,m),y=!1;const b=$a({maskInputOptions:s,tagName:h,type:m}),w=Eg(n,I,u,c,d,b);"radio"!==m&&"checkbox"!==m||(y=n.checked),v=eg({isMasked:w,element:n,value:v,maskInputFn:l}),f(n,C?{text:v,isChecked:y,userTriggered:A}:{text:v,isChecked:y});const x=n.name;"radio"===m&&x&&y&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach((e=>{if(e!==n){const t=eg({isMasked:w,element:e,value:og(e,h,m),maskInputFn:l});f(e,C?{text:t,isChecked:!y,userTriggered:!1}:{text:t,isChecked:!y})}}))}function f(t,r){const i=Es.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Es.set(t,r);const i=n.getId(t);fs(e)({...r,id:i})}}const p=("last"===A.input?["change"]:["input","change"]).map((e=>Rg(e,fs(h),t))),m=t.defaultView;if(!m)return()=>{p.forEach((e=>e()))};const v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&p.push(...y.map((e=>Dg(e[0],e[1],{set(){fs(h)({target:this,isTrusted:!1})}},!1,m)))),fs((()=>{p.forEach((e=>e()))}))}function Ss(e){return function(e,t){if(Ns("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ns("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ns("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ns("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Ts(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Os({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const i="#document"===n.nodeName?ps([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):ps([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=ps([i,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(ps([i,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&i&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return ps([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=ps([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),fs((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function Rs(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=ys(e,e.doc),i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const i="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,g=[];const s=_g(fs((t=>{const n=Date.now()-a;e(g.map((e=>(e.timeOffset-=n,e))),t),g=[],a=null})),o),l=fs(_g(fs((e=>{const t=vs(e),{clientX:n,clientY:i}=Zg(e)?e.changedTouches[0]:e;a||(a=Mg()),g.push({x:n,y:i,id:r.getId(t),timeOffset:Mg()-a}),s("undefined"!=typeof DragEvent&&e instanceof DragEvent?ts.Drag:e instanceof MouseEvent?ts.MouseMove:ts.TouchMove)})),i,{trailing:!1})),A=[Rg("mousemove",l,n),Rg("touchmove",l,n),Rg("drag",l,n)];return fs((()=>{A.forEach((e=>e()))}))}(e),o=bs(e),a=ws(e),g=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Rg("resize",fs(_g(fs((()=>{const t=Fg(),i=jg();n===t&&r===i||(e({width:Number(i),height:Number(t)}),n=t,r=i)})),200)),t)}(e,{win:n}),s=ks(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:a}){const g=fs((a=>_g(fs((o=>{const g=vs(o);if(!g||zg(g,t,n,r,!0))return;const{currentTime:s,volume:l,muted:A,playbackRate:C}=g;e({type:a,id:i.getId(g),currentTime:s,volume:l,muted:A,playbackRate:C})})),o.media||500))),s=[Rg("play",g(0),a),Rg("pause",g(1),a),Rg("seeked",g(2),a),Rg("volumechange",g(3),a),Rg("ratechange",g(4),a)];return fs((()=>{s.forEach((e=>e()))}))}(e),A=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:fs(((r,i,o)=>{const[a,g]=o,{id:s,styleId:l}=Ts(i,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,adds:[{rule:a,index:g}]}),r.apply(i,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let a,g;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:fs(((r,i,o)=>{const[a]=o,{id:g,styleId:s}=Ts(i,t,n.styleMirror);return(g&&-1!==g||s&&-1!==s)&&e({id:g,styleId:s,removes:[{index:a}]}),r.apply(i,o)}))}),r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:fs(((r,i,o)=>{const[a]=o,{id:g,styleId:s}=Ts(i,t,n.styleMirror);return(g&&-1!==g||s&&-1!==s)&&e({id:g,styleId:s,replace:a}),r.apply(i,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(g=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(g,{apply:fs(((r,i,o)=>{const[a]=o,{id:g,styleId:s}=Ts(i,t,n.styleMirror);return(g&&-1!==g||s&&-1!==s)&&e({id:g,styleId:s,replaceSync:a}),r.apply(i,o)}))}));const s={};_s("CSSGroupingRule")?s.CSSGroupingRule=r.CSSGroupingRule:(_s("CSSMediaRule")&&(s.CSSMediaRule=r.CSSMediaRule),_s("CSSConditionRule")&&(s.CSSConditionRule=r.CSSConditionRule),_s("CSSSupportsRule")&&(s.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(s).forEach((([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:fs(((r,i,o)=>{const[a,g]=o,{id:s,styleId:l}=Ts(i.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,adds:[{rule:a,index:[...Ss(i),g||0]}]}),r.apply(i,o)}))}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:fs(((r,i,o)=>{const[a]=o,{id:g,styleId:s}=Ts(i.parentStyleSheet,t,n.styleMirror);return(g&&-1!==g||s&&-1!==s)&&e({id:g,styleId:s,removes:[{index:[...Ss(i),a]}]}),r.apply(i,o)}))})})),fs((()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),g&&(r.CSSStyleSheet.prototype.replaceSync=g),Object.entries(s).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}(e,{win:n}),C=Os(e,e.doc),I=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:fs(((i,a,g)=>{const[s,l,A]=g;if(n.has(s))return o.apply(a,[s,l,A]);const{id:C,styleId:I}=Ts(ps([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(C&&-1!==C||I&&-1!==I)&&e({id:C,styleId:I,set:{property:s,value:l,priority:A},index:Ss(a.parentRule)}),i.apply(a,g)}))});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:fs(((i,o,g)=>{const[s]=g;if(n.has(s))return a.apply(o,[s]);const{id:l,styleId:A}=Ts(ps([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||A&&-1!==A)&&e({id:l,styleId:A,remove:{property:s},index:Ss(o.parentRule)}),i.apply(o,g)}))}),fs((()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),c=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=Pg(t.fonts,"add",(function(t){return function(n){return $g(fs((()=>{const t=i.get(n);t&&(e(t),i.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(a),fs((()=>{r.forEach((e=>e()))}))}(e):()=>{},u=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:a}=e;let g=!0;const s=fs((()=>{const e=t.getSelection();if(!e||g&&ps([e,"optionalAccess",e=>e.isCollapsed]))return;g=e.isCollapsed||!1;const s=[],l=e.rangeCount||0;for(let t=0;t{};const r=Pg(n.customElements,"define",(function(e){return function(n,r,i){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,i])}}));return r}(e),h=[];for(const t of e.plugins)h.push(t.observer(t.callback,n,t.options));return fs((()=>{ms.forEach((e=>e.reset())),r.disconnect(),i(),o(),a(),g(),s(),l(),A(),C(),I(),c(),u(),d(),h.forEach((e=>e()))}))}function Ns(e){return void 0!==window[e]}function _s(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ds{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const i=r.get(t);return i||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function Ps(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class Ms{constructor(){this.crossOriginIframeMirror=new Ds(sg),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Ls{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ds(sg),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ds(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Ps([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case es.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:es.IncrementalSnapshot,data:{source:ts.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case es.Meta:case es.Load:case es.DomContentLoaded:return!1;case es.Plugin:return t;case es.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case es.IncrementalSnapshot:switch(t.data.source){case ts.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case ts.Drag:case ts.TouchMove:case ts.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case ts.ViewportResize:return!1;case ts.MediaInteraction:case ts.MouseInteraction:case ts.Scroll:case ts.CanvasMutation:case ts.Input:return this.replaceIds(t.data,e,["id"]),t;case ts.StyleSheetRule:case ts.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ts.Font:return t;case ts.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case ts.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),Ps([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Ya.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Fs{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class js{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Qa(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=ys({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(ws({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),$g((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Os({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Pg(e.prototype,"attachShadow",(function(e){return function(r){const i=e.call(this,r);return this.shadowRoot&&Xg(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Bs{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class zs{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Yg,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:qa(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Vs{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){Jg("requestAnimationFrame")(...e)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let Us,Zs;const Gs=new Ja;function Ws(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:a=null,ignoreClass:g="rr-ignore",ignoreSelector:s=null,maskAllText:l=!1,maskTextClass:A="rr-mask",unmaskTextClass:C=null,maskTextSelector:I=null,unmaskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:h,slimDOMOptions:f,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,maxCanvasSize:y=null,packFn:b,sampling:w={},dataURLOptions:x={},mousemoveWait:E,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:T=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:R=!1,inlineImages:N=!1,plugins:_,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:P=new Set([]),errorHandler:M,onMutation:L,getCanvasManager:F}=e;ds(M);const j=!S||window.parent===window;let B=!1;if(!j)try{window.parent.document&&(B=!1)}catch(e){B=!0}if(j&&!t)throw new Error("emit function is required");void 0!==E&&void 0===w.mousemove&&(w.mousemove=E),Gs.reset();const z=!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==h?h:{},V=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f}:f||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let Z=0;const G=e=>{for(const t of _||[])t.eventProcessor&&(e=t.eventProcessor(e));return b&&!B&&(e=b(e)),e};Us=(e,i)=>{const o=e;if(o.timestamp=Mg(),!La([ms,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||o.type===es.FullSnapshot||o.type===es.IncrementalSnapshot&&o.data.source===ts.Mutation||ms.forEach((e=>e.unfreeze())),j)La([t,"optionalCall",e=>e(G(o),i)]);else if(B){const e={type:"rrweb",event:G(o),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,"*")}if(o.type===es.FullSnapshot)U=o,Z=0;else if(o.type===es.IncrementalSnapshot){if(o.data.source===ts.Mutation&&o.data.isAttachIframe)return;Z++;const e=r&&Z>=r,t=n&&U&&o.timestamp-U.timestamp>n;(e||t)&&$(!0)}};const W=e=>{Us({type:es.IncrementalSnapshot,data:{source:ts.Mutation,...e}})},H=e=>Us({type:es.IncrementalSnapshot,data:{source:ts.Scroll,...e}}),Y=e=>Us({type:es.IncrementalSnapshot,data:{source:ts.CanvasMutation,...e}}),K=new zs({mutationCb:W,adoptedStyleSheetCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.AdoptedStyleSheet,...e}})}),Q="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Ms:new Ls({mirror:Gs,mutationCb:W,stylesheetManager:K,recordCrossOriginIframes:S,wrappedEmit:Us});for(const e of _||[])e.getMirror&&e.getMirror({nodeMirror:Gs,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});const X=new Vs,q=function(e,t){try{return e?e(t):new Bs}catch(e){return new Bs}}(F,{mirror:Gs,win:window,mutationCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.CanvasMutation,...e}}),recordCanvas:k,blockClass:i,blockSelector:o,unblockSelector:a,maxCanvasSize:y,sampling:w.canvas,dataURLOptions:x,errorHandler:M}),J="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Fs:new js({mutationCb:W,scrollCb:H,bypassOptions:{onMutation:L,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:I,unmaskTextSelector:c,inlineStylesheet:u,maskInputOptions:z,dataURLOptions:x,maskAttributeFn:p,maskTextFn:v,maskInputFn:m,recordCanvas:k,inlineImages:N,sampling:w,slimDOMOptions:V,iframeManager:Q,stylesheetManager:K,canvasManager:q,keepIframeSrcFn:D,processedNodeManager:X},mirror:Gs}),$=(e=!1)=>{Us({type:es.Meta,data:{href:window.location.href,width:jg(),height:Fg()}},e),K.reset(),J.init(),ms.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new Ja,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:a=!1,maskTextClass:g="rr-mask",unmaskTextClass:s=null,maskTextSelector:l=null,unmaskTextSelector:A=null,inlineStylesheet:C=!0,inlineImages:I=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:k=()=>!1}=t||{};return Tg(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:g,unmaskTextClass:s,maskTextSelector:l,unmaskTextSelector:A,skipChild:!1,inlineStylesheet:C,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===u?{}:u,maskAttributeFn:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:I,recordCanvas:c,preserveWhiteSpace:v,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:k,newlyAddedElement:!1})}(document,{mirror:Gs,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:I,unmaskTextSelector:c,inlineStylesheet:u,maskAllInputs:z,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,slimDOM:V,dataURLOptions:x,recordCanvas:k,inlineImages:N,onSerialize:e=>{Gg(e,Gs)&&Q.addIframe(e),Wg(e,Gs)&&K.trackLinkElement(e),Hg(e)&&J.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Q.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:D});t&&(Us({type:es.FullSnapshot,data:{node:t,initialOffset:Lg(window)}}),ms.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Gs.getId(document)))};Zs=$;try{const e=[],t=e=>fs(Rs)({onMutation:L,mutationCb:W,mousemoveCb:(e,t)=>Us({type:es.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.MouseInteraction,...e}}),scrollCb:H,viewportResizeCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.ViewportResize,...e}}),inputCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.Input,...e}}),mediaInteractionCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.MediaInteraction,...e}}),styleSheetRuleCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.StyleSheetRule,...e}}),styleDeclarationCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.StyleDeclaration,...e}}),canvasMutationCb:Y,fontCb:e=>Us({type:es.IncrementalSnapshot,data:{source:ts.Font,...e}}),selectionCb:e=>{Us({type:es.IncrementalSnapshot,data:{source:ts.Selection,...e}})},customElementCb:e=>{Us({type:es.IncrementalSnapshot,data:{source:ts.CustomElement,...e}})},blockClass:i,ignoreClass:g,ignoreSelector:s,maskAllText:l,maskTextClass:A,unmaskTextClass:C,maskTextSelector:I,unmaskTextSelector:c,maskInputOptions:z,inlineStylesheet:u,sampling:w,recordCanvas:k,inlineImages:N,userTriggeredOnInput:O,collectFonts:R,doc:e,maskAttributeFn:p,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:D,blockSelector:o,unblockSelector:a,slimDOMOptions:V,dataURLOptions:x,mirror:Gs,iframeManager:Q,stylesheetManager:K,shadowDomManager:J,processedNodeManager:X,canvasManager:q,ignoreCSSAttributes:P,plugins:La([_,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>Us({type:es.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Q.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){}}));const n=()=>{$(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Rg("DOMContentLoaded",(()=>{Us({type:es.DomContentLoaded,data:{}}),"DOMContentLoaded"===T&&n()}))),e.push(Rg("load",(()=>{Us({type:es.Load,data:{}}),"load"===T&&n()}),window))),()=>{e.forEach((e=>e())),X.destroy(),Zs=void 0,hs()}}catch(e){}}Ws.mirror=Gs,Ws.takeFullSnapshot=function(e){if(!Zs)throw new Error("please take full snapshot after start recording");Zs(e)};function Hs(e){return e>9999999999?e:1e3*e}function Ys(e){return e>9999999999?e/1e3:e}function Ks(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:es.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:ve(t,10,1e3)}}),"console"===t.category))))}function Qs(e){return e.closest("button,a")||e}function Xs(e){const t=qs(e);return t&&t instanceof Element?Qs(t):t}function qs(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Js;function $s(e){return Js||(Js=[],L(Ba,"open",(function(e){return function(...t){if(Js)try{Js.forEach((e=>e()))}catch(e){}return e.apply(Ba,t)}}))),Js.push(e),()=>{const t=Js?Js.indexOf(e):-1;t>-1&&Js.splice(t,1)}}class el{constructor(e,t,n=Ks){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=$s((()=>{this._lastMutation=nl()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!tl.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:Ys(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Ys(e)}registerScroll(e=Date.now()){this._lastScroll=Ys(e)}registerClick(e){const t=Qs(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=nl();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:o,clickBreadcrumb:a}=e;if(i){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Ba.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,i)}else if(o>1){const e={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Ba.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const tl=["A","BUTTON","INPUT"];function nl(){return Date.now()/1e3}function rl(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(n===ts.Mutation&&e.registerMutation(t.timestamp),n===ts.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===ts.MouseInteraction}(t)){const{type:n,id:r}=t.data,i=Ws.mirror.getNode(r);i instanceof HTMLElement&&n===ns.Click&&e.registerClick(i)}}catch(e){}}function il(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ol;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ol||(ol={}));const al=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function gl(e){const t={};for(const n in e)if(al.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const sl=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Xs(e.event):qs(e.event),n=T(r,{maxStringLength:200})||""}catch(e){n=""}return{target:r,message:n}}(e);return il({category:`ui.${e.name}`,...ll(t,n)})}(t);if(!n)return;const r="click"===t.name,i=r?t.event:void 0;!(r&&e.clickDetector&&i&&i.target)||i.altKey||i.metaKey||i.ctrlKey||i.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,Xs(t.event)),Ks(e,n)};function ll(e,t){const n=Ws.mirror.getId(e),r=n&&Ws.mirror.getNode(n),i=r&&Ws.mirror.getMeta(r),o=i&&function(e){return e.type===ol.Element}(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===ol.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:gl(o.attributes)}}:{}}}function Al(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!o)return null;const g=t||r||i,s=1===o.length;if(!g&&s)return null;const l=T(a,{maxStringLength:200})||"",A=ll(a,l);return il({category:"ui.keyDown",message:l,data:{...A.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}(t);n&&Ks(e,n)}const Cl={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:a,encodedBodySize:g,responseStatus:s,transferSize:l}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:cl(o),end:cl(i),name:r,data:{size:l,statusCode:s,decodedBodySize:a,encodedBodySize:g}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=cl(i);return{type:n,name:r,start:o,end:o+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:a,domContentLoadedEventStart:g,domContentLoadedEventEnd:s,domInteractive:l,loadEventStart:A,loadEventEnd:C,redirectCount:I,startTime:c,transferSize:u,type:d}=e;if(0===i)return null;return{type:`${t}.${d}`,start:cl(c),end:cl(o),name:n,data:{size:u,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:g,domContentLoadedEventEnd:s,loadEventStart:A,loadEventEnd:C,domComplete:o,redirectCount:I}}}};function Il(e){return Cl[e.entryType]?Cl[e.entryType](e):null}function cl(e){return((Ae||Ba.performance.timeOrigin)+e)/1e3}function ul(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(Io(e,n))})),r.push(Co((({metric:t})=>{e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,i=e.value,o=cl(i);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:o,end:o,data:{value:i,size:i,nodeId:r?Ws.mirror.getId(r):void 0}}}(t))}))),()=>{r.forEach((e=>e()))}}const dl="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function hl(e,t){dl&&(I.info(e),t&&pl(e))}function fl(e,t){dl&&(I.info(e),t&&setTimeout((()=>{pl(e)}),0))}function pl(e){Ge({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class ml extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class vl{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Ga)throw new ml;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Hs(e):null}}class yl{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){hl("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,i)=>{const o=({data:t})=>{const a=t;if(a.method===e&&a.id===n){if(this._worker.removeEventListener("message",o),!a.success)return dl&&I.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class bl{constructor(e){this._worker=new yl(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Hs(e.timestamp);(!this._earliestTimestamp||tGa?Promise.reject(new ml):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{dl&&I.warn('[Replay] Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class wl{constructor(e){this._fallback=new vl,this._compression=new bl(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void hl("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){dl&&I.warn("[Replay] Failed to add events when switching buffers.",e)}}}function xl({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;hl("[Replay] Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new wl(n)}catch(e){hl("[Replay] Failed to create compression worker")}}(t);if(e)return e}return hl("[Replay] Using simple buffer"),new vl}function El(){try{return"sessionStorage"in Ba&&!!Ba.sessionStorage}catch(e){return!1}}function kl(e){!function(){if(!El())return;try{Ba.sessionStorage.removeItem(za)}catch(e){}}(),e.session=void 0}function Sl(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(hl(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function jl(e){return!e.type}function Bl(e){return"transaction"===e.type}function zl(e){return"feedback"===e.type}function Vl(e){const t=function(){const e=He();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!e.isEnabled()||!jl(n)&&!Bl(n))return;const i=r&&r.statusCode;t&&(!i||i<200||i>=300)||(Bl(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function Ul(e){return t=>{e.isEnabled()&&jl(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){Ks(e,il({category:"replay.hydrate-error"}))}}(e,t)}}function Zl(e,t=!1){const n=t?Vl(e):void 0;return Object.assign(((t,r)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!jl(t)&&!Bl(t)&&!zl(t))return t;if(!e.checkAndHandleExpiredSession())return t;if(zl(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:es.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,r)&&!e.getOptions()._experiments.captureExceptions)return dl&&I.log("[Replay] Ignoring error from rrweb internals",t),null;const i=function(e,t){return"buffer"===e.recordingMode&&t.message!==Va&&!(!t.exception||t.type)&&Sl(e.getOptions().errorSampleRate)}(e,t);return(i||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t}),{id:"Replay"})}function Gl(e,t){return t.map((({type:t,start:n,end:r,name:i,data:o})=>{const a=e.throttledAddEvent({type:es.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof a?Promise.resolve(null):a}))}function Wl(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(Gl(e,[n]),!1))))}}function Hl(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!dl||!e.getOptions()._experiments.traceInternals)&&Fa(t,He())}(e,t.name)||e.addUpdate((()=>(Gl(e,[t]),!0))))}function Yl(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,i=r[Zn];if(!t||!n||!i)return null;const{method:o,url:a,status_code:g}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:t/1e3,end:n/1e3,data:{method:o,statusCode:g}}}(t);Hl(e,n)}}function Kl(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=nA(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function Ql(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Xl(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[nA(e)];if(!e)return[void 0]}catch(t){return dl&&I.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dl&&I.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ql(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Jl(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:a,request:g,response:s}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:Z({method:o,statusCode:a,request:g,response:s})}}function $l(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function eA(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Ua,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,Ua);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=i,o&&o.length>0&&(r._meta={warnings:o}),r}function tA(e,t){return Object.keys(e).reduce(((n,r)=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=e[r]),n}),{})}function nA(e){return new URLSearchParams(e).toString()}function rA(e,t){const n=function(e,t=Ba.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ba.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return M(n,t)}async function iA(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:a,method:g,status_code:s=0,request_body_size:l,response_body_size:A}=e.data,C=rA(a,n.networkDetailAllowUrls)&&!rA(a,n.networkDetailDenyUrls),c=C?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return gA(e[0],t);if(2===e.length)return gA(e[1],t);return{}}(n,t):{};if(!e)return eA(i,r,void 0);const o=oA(n),[a,g]=Xl(o),s=eA(i,r,a);if(g)return ql(s,g);return s}(n,t.input,l):$l(l),u=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},i,o){if(!e&&void 0!==o)return $l(o);const a=i?aA(i.headers,r):{};if(!i||!t&&void 0!==o)return eA(a,o,void 0);const[g,s]=await async function(e){const t=function(e){try{return e.clone()}catch(e){dl&&I.warn("[Replay] Failed to clone response body",e)}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(e){return dl&&I.warn("[Replay] Failed to get text body from response",e),[void 0,"BODY_PARSE_ERROR"]}}(i),l=function(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:i,headers:o}){try{const a=e&&e.length&&void 0===r?Kl(e,n):r;return i?eA(o,a,t?e:void 0):$l(a)}catch(e){return dl&&I.warn("[Replay] Failed to serialize response body",e),eA(o,r,void 0)}}(g,{networkCaptureBodies:t,textEncoder:n,responseBodySize:o,captureDetails:e,headers:a});if(s)return ql(l,s);return l}(C,n,t.response,A);return{startTimestamp:i,endTimestamp:o,url:a,method:g,statusCode:s,request:c,response:u}}(e,t,n),i=Jl("resource.fetch",r);Hl(n.replay,i)}catch(e){dl&&I.error("[Replay] Failed to capture fetch breadcrumb",e)}}function oA(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function aA(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function gA(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?aA(n,t):Array.isArray(n)?{}:tA(n,t):{}}async function sA(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:a,xhr:g}=t,{url:s,method:l,status_code:A=0,request_body_size:C,response_body_size:c}=e.data;if(!s)return null;if(!g||!rA(s,n.networkDetailAllowUrls)||rA(s,n.networkDetailDenyUrls)){return{startTimestamp:i,endTimestamp:o,url:s,method:l,statusCode:A,request:$l(C),response:$l(c)}}const u=g[Zn],d=u?tA(u.request_headers,n.networkRequestHeaders):{},h=tA(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e}),{})}(g),n.networkResponseHeaders),[f,p]=n.networkCaptureBodies?Xl(a):[void 0],[m,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return dl&&I.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dl&&I.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return dl&&I.warn("[Replay] Failed to get xhr response body",...t),[void 0]}(g):[void 0],y=eA(d,C,f),b=eA(h,c,m);return{startTimestamp:i,endTimestamp:o,url:s,method:l,statusCode:A,request:p?ql(y,p):y,response:v?ql(b,v):b}}(e,t,n),i=Jl("resource.xhr",r);Hl(n.replay,i)}catch(e){dl&&I.error("[Replay] Failed to capture xhr breadcrumb",e)}}function lA(e,t,n){const{xhr:r,input:i}=t;if(!r)return;const o=Kl(i,n.textEncoder),a=r.getResponseHeader("content-length")?Ql(r.getResponseHeader("content-length")):function(e,t,n){try{return Kl("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e,n)}catch(e){return}}(r.response,r.responseType,n.textEncoder);void 0!==o&&(e.data.request_body_size=o),void 0!==a&&(e.data.response_body_size=a)}function AA(e){const t=He();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:o,networkRequestHeaders:a,networkResponseHeaders:g}=e.getOptions(),s={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:o,networkRequestHeaders:a,networkResponseHeaders:g};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(lA(t,n,e),sA(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:r,response:i}=t,o=Kl(r?oA(r):void 0,n.textEncoder),a=i?Ql(i.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==a&&(e.data.response_body_size=a)}(t,n,e),iA(t,n,e))}catch(e){dl&&I.warn("Error when enriching network breadcrumb")}}(s,e,t))):(Hn(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;if(!n)return null;const{method:o,url:a}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:a,data:{method:o,statusCode:i?i.status:void 0}}}(t);Hl(e,n)}}(e)),Gn(Yl(e)))}catch(e){}}let CA=null;const IA=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(CA===t||!t)return null;if(CA=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return il(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Za?(n=!0,`${e.slice(0,Za)}…`):e;if("object"==typeof e)try{const t=ve(e,7);return JSON.stringify(t).length>Za?(n=!0,`${JSON.stringify(t,null,2).slice(0,Za)}…`):t}catch(e){}return e}));return il({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return il(t)}(t);n&&Ks(e,n)};function cA(e){const t=Ye(),n=He();t.addScopeListener(IA(e)),Bn(sl(e)),Wt(Wl(e)),AA(e);const r=Zl(e,!uA(n));n&&n.addEventProcessor?n.addEventProcessor(r):function(e){const t=He();t&&t.addEventProcessor&&t.addEventProcessor(e)}(r),uA(n)&&(n.on("beforeSendEvent",Ul(e)),n.on("afterSendEvent",Vl(e)),n.on("createDsc",(t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})),n.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}function uA(e){return!(!e||!e.on)}function dA(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function hA(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(dl&&I.warn("[Replay] Received replay event after session expired."));const i=r||!t;t=!0,e.clickDetector&&rl(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!Ml(e,n,i))return!0;if(!i)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Ml(e,function(e){const t=e.getOptions();return{type:es.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,i),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(hl(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&Ol(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function fA({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const a=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:g,errorIds:s,traceIds:l,initialTimestamp:A}=r,C=He(),I=Ye(),c=C&&C.getTransport(),u=C&&C.getDsn();if(!(C&&c&&u&&o.sampled))return;const d={type:"replay_event",replay_start_timestamp:A/1e3,timestamp:i/1e3,error_ids:s,trace_ids:l,urls:g,replay_id:t,segment_id:n,replay_type:o.sampled},h=await async function({client:e,scope:t,replayId:n,event:r}){const i={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,i);const o=await je(e.getOptions(),r,i,t,e,ut());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:g,version:s}=a&&a.sdk||{};return o.sdk={...o.sdk,name:g||"sentry.javascript.unknown",version:s||"0.0.0"},o}({scope:I,client:C,replayId:t,event:d});if(!h)return C.recordDroppedEvent("event_processor","replay",d),void hl("An event processor returned `null`, will not send event.");delete h.sdkProcessingMetadata;const f=function(e,t,n,r){return qt(gn(e,an(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(h,a,u,C.getOptions().tunnel);let p;try{p=await c.send(f)}catch(e){const t=new Error(Va);try{t.cause=e}catch(e){}throw t}if(!p)return p;if("number"==typeof p.statusCode&&(p.statusCode<200||p.statusCode>=300))throw new pA(p.statusCode);const m=Kr({},p);if(Yr(m,"replay"))throw new mA(m);return p}class pA extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class mA extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function vA(e,t={count:0,interval:5e3}){const{recordingData:n,options:r}=e;var i,o;if(n.length)try{return await fA(e),!0}catch(n){if(n instanceof pA||n instanceof mA)throw n;if(i="Replays",o={_retryCount:t.count},ct().setContext(i,o),dl&&r._experiments&&r._experiments.captureExceptions&&Ue(n),t.count>=3){const e=new Error(`${Va} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await vA(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const yA="__THROTTLED";function bA(e,t,n){const r=new Map;let i=!1;return(...o)=>{const a=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{ne+t),0)>=t){const e=i;return i=!0,e?"__SKIPPED":yA}i=!1;const g=r.get(a)||0;return r.set(a,g+1),e(...o)}}class wA{constructor({options:e,recordingOptions:t}){wA.prototype.__init.call(this),wA.prototype.__init2.call(this),wA.prototype.__init3.call(this),wA.prototype.__init4.call(this),wA.prototype.__init5.call(this),wA.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,i,o;const a=n&&n.maxWait?Math.max(n.maxWait,t):0;function g(){return s(),r=e(),r}function s(){void 0!==i&&clearTimeout(i),void 0!==o&&clearTimeout(o),i=o=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(g,t),a&&void 0===o&&(o=setTimeout(g,a)),r}return l.cancel=s,l.flush=function(){return void 0!==i||void 0!==o?g():r},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=bA(((e,t)=>function(e,t,n){return Fl(e,t)?Ll(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;i&&(this.clickDetector=new el(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",fl(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");fl("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=Pl({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");fl("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=Pl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Ws({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:hA(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{hl("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,kl(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),hl("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),hl("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();hl("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Nl(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Ba.location.pathname}${Ba.location.hash}${Ba.location.search}`,t=`${Ba.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===yA){const e=il({category:"replay.throttled"});this.addUpdate((()=>!Ml(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||Ye().getTransaction(),t=(e&&Le(e).data||{})[oi];if(e&&t&&["route","custom"].includes(t))return Le(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=xl({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){dl&&I.error("[Replay]",e),dl&&this._options._experiments&&this._options._experiments.captureExceptions&&Ue(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Pl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Dl(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Ba.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ba.addEventListener("blur",this._handleWindowBlur),Ba.addEventListener("focus",this._handleWindowFocus),Ba.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(cA(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=ul(this)}_removeListeners(){try{Ba.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ba.removeEventListener("blur",this._handleWindowBlur),Ba.removeEventListener("focus",this._handleWindowFocus),Ba.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Ba.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=il({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=il({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Al(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;_l(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):hl("[Replay] Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:es.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=function(e){return e.map(Il).filter(Boolean)}(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Gl(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await vA({replayId:e,recordingData:i,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=He();t&&t.recordDroppedEvent("send_error","replay")}}else dl&&I.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(dl&&I.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||i)return hl(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const o=this.eventBuffer;if(o&&0===this.session.segmentId&&!o.hasCheckout&&hl("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(e){dl&&I.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ol(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=il({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function xA(e,t,n,r){const i=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),C((()=>{}))),i.join(",")}const EA='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',kA=["content-length","content-type","accept"];let SA=!1;const TA=e=>new OA(e);class OA{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:g={},sessionSampleRate:s,errorSampleRate:l,maskAllText:A=!0,maskAllInputs:C=!0,blockAllMedia:I=!0,mutationBreadcrumbLimit:c=750,mutationLimit:u=1e4,slowClickTimeout:d=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:p=[],networkCaptureBodies:m=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:w=["title","placeholder"],unmask:x=[],block:E=[],unblock:k=[],ignore:S=[],maskFn:T,beforeAddRecordingEvent:O,beforeErrorSampling:R,blockClass:N,blockSelector:_,maskInputOptions:D,maskTextClass:P,maskTextSelector:M,ignoreClass:L}={}){this.name=OA.id;const F=function({mask:e,unmask:t,block:n,unblock:r,ignore:i,blockClass:o,blockSelector:a,maskTextClass:g,maskTextSelector:s,ignoreClass:l}){const A={maskTextSelector:xA(e,[".sentry-mask","[data-sentry-mask]"],g,s),unmaskTextSelector:xA(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:xA(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],o,a),unblockSelector:xA(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:xA(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return o instanceof RegExp&&(A.blockClass=o),g instanceof RegExp&&(A.maskTextClass=g),A}({mask:b,unmask:x,block:E,unblock:k,ignore:S,blockClass:N,blockSelector:_,maskTextClass:P,maskTextSelector:M,ignoreClass:L});if(this._recordingOptions={maskAllInputs:C,maskAllText:A,maskInputOptions:{...D||{},password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return r?i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o:o}({maskAttributes:w,maskAllText:A,privacyOptions:F,key:e,value:t,el:n}),...F,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,Wa),stickySession:i,sessionSampleRate:s,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:I,maskAllInputs:C,maskAllText:A,mutationBreadcrumbLimit:c,mutationLimit:u,slowClickTimeout:d,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:p,networkCaptureBodies:m,networkRequestHeaders:RA(v),networkResponseHeaders:RA(y),beforeAddRecordingEvent:O,beforeErrorSampling:R,_experiments:g},"number"==typeof s&&(this._initialOptions.sessionSampleRate=s),"number"==typeof l&&(this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${EA}`:EA),this._isInitialized&&la())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return SA}set _isInitialized(e){SA=e}setupOnce(){la()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=function(e){const t=He(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Z(e)};if(!n)return C((()=>{})),r;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&C((()=>{}));"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this._initialOptions);this._replay=new wA({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const e=He().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function RA(e){return[...kA,...e.map((e=>e.toLowerCase()))]}OA.__initStatic();function NA(){return NA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zA(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,g=_A.Pop,s=null,l=A();function A(){return(a.state||{idx:null}).idx}function C(){g=_A.Pop;let e=A(),t=null==e?null:e-l;l=e,s&&s({action:g,location:c.location,delta:t})}function I(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:jA(e);return n=n.replace(/ $/,"%20"),PA(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==l&&(l=0,a.replaceState(NA({},a.state,{idx:l}),""));let c={get action(){return g},get location(){return e(i,a)},listen(e){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(DA,C),s=e,()=>{i.removeEventListener(DA,C),s=null}},createHref:e=>t(i,e),createURL:I,encodeLocation(e){let t=I(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){g=_A.Push;let r=FA(c.location,e,t);n&&n(r,e),l=A()+1;let C=LA(r,l),I=c.createHref(r);try{a.pushState(C,"",I)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(I)}o&&s&&s({action:g,location:c.location,delta:1})},replace:function(e,t){g=_A.Replace;let r=FA(c.location,e,t);n&&n(r,e),l=A();let i=LA(r,l),C=c.createHref(r);a.replaceState(i,"",C),o&&s&&s({action:g,location:c.location,delta:0})},go:e=>a.go(e)};return c}var VA;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(VA||(VA={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function UA(e,t,n){return void 0===n&&(n="/"),ZA(e,t,n,!1)}function ZA(e,t,n,r){let i=rC(("string"==typeof t?BA(t):t).pathname||"/",n);if(null==i)return null;let o=GA(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let e=0;null==a&&e{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(PA(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let g=sC([r,a.relativePath]),s=n.concat(a);e.children&&e.children.length>0&&(PA(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+g+'".'),GA(e.children,t,s,g)),(null!=e.path||e.index)&&t.push({path:g,score:$A(g,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of WA(e.path))i(e,t,n);else i(e,t)})),t}function WA(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=WA(r.join("/")),g=[];return g.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&g.push(...a),g.map((t=>e.startsWith("/")&&""===t?"/":t))}const HA=/^:[\w-]+$/,YA=3,KA=2,QA=1,XA=10,qA=-2,JA=e=>"*"===e;function $A(e,t){let n=e.split("/"),r=n.length;return n.some(JA)&&(r+=qA),t&&(r+=KA),n.filter((e=>!JA(e))).reduce(((e,t)=>e+(HA.test(t)?YA:""===t?QA:XA)),r)}function eC(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),g=i.slice(1),s=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=g[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const s=g[n];return e[r]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{});return{params:s,pathname:o,pathnameBase:a,pattern:e}}function nC(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return MA(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function rC(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function iC(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function oC(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function aC(e,t){let n=oC(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function gC(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=BA(e):(i=NA({},e),PA(!i.pathname||!i.pathname.includes("?"),iC("?","pathname","search",i)),PA(!i.pathname||!i.pathname.includes("#"),iC("#","pathname","hash",i)),PA(!i.search||!i.search.includes("#"),iC("#","search","hash",i)));let o,a=""===e||""===i.pathname,g=a?"/":i.pathname;if(null==g)o=n;else{let e=t.length-1;if(!r&&g.startsWith("..")){let t=g.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?BA(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:AC(r),hash:CC(i)}}(i,o),l=g&&"/"!==g&&g.endsWith("/"),A=(a||"."===g)&&n.endsWith("/");return s.pathname.endsWith("/")||!l&&!A||(s.pathname+="/"),s}const sC=e=>e.join("/").replace(/\/\/+/g,"/"),lC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),AC=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",CC=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function IC(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const cC=["post","put","patch","delete"],uC=(new Set(cC),["get",...cC]);new Set(uC),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function dC(){return dC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let r=Jo.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,dC({fromRouteId:t},i)))}),[e,t]);return r}():function(){bC()||PA(!1);let e=Jo.useContext(hC),{basename:t,future:n,navigator:r}=Jo.useContext(pC),{matches:i}=Jo.useContext(vC),{pathname:o}=wC(),a=JSON.stringify(aC(i,n.v7_relativeSplatPath)),g=Jo.useRef(!1);xC((()=>{g.current=!0}));let s=Jo.useCallback((function(n,i){if(void 0===i&&(i={}),!g.current)return;if("number"==typeof n)return void r.go(n);let s=gC(n,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:sC([t,s.pathname])),(i.replace?r.replace:r.push)(s,i.state,i)}),[t,r,a,o,e]);return s}()}const kC=Jo.createContext(null);function SC(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=Jo.useContext(pC),{matches:i}=Jo.useContext(vC),{pathname:o}=wC(),a=JSON.stringify(aC(i,r.v7_relativeSplatPath));return Jo.useMemo((()=>gC(e,JSON.parse(a),o,"path"===n)),[e,a,o,n])}function TC(e,t,n,r){bC()||PA(!1);let{navigator:i}=Jo.useContext(pC),{matches:o}=Jo.useContext(vC),a=o[o.length-1],g=a?a.params:{},s=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let l,A=wC();if(t){var C;let e="string"==typeof t?BA(t):t;"/"===s||(null==(C=e.pathname)?void 0:C.startsWith(s))||PA(!1),l=e}else l=A;let I=l.pathname||"/",c=I;if("/"!==s){let e=s.replace(/^\//,"").split("/");c="/"+I.replace(/^\//,"").split("/").slice(e.length).join("/")}let u=UA(e,{pathname:c});let d=DC(u&&u.map((e=>Object.assign({},e,{params:Object.assign({},g,e.params),pathname:sC([s,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:sC([s,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);return t&&d?Jo.createElement(mC.Provider,{value:{location:dC({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:_A.Pop}},d):d}function OC(){let e=function(){var e;let t=Jo.useContext(yC),n=FC(MC.UseRouteError),r=jC(MC.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=IC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return Jo.createElement(Jo.Fragment,null,Jo.createElement("h2",null,"Unexpected Application Error!"),Jo.createElement("h3",{style:{fontStyle:"italic"}},t),n?Jo.createElement("pre",{style:i},n):null,null)}const RC=Jo.createElement(OC,null);class NC extends Jo.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?Jo.createElement(vC.Provider,{value:this.props.routeContext},Jo.createElement(yC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _C(e){let{routeContext:t,match:n,children:r}=e,i=Jo.useContext(hC);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),Jo.createElement(vC.Provider,{value:t},r)}function DC(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,g=null==(i=n)?void 0:i.errors;if(null!=g){let e=a.findIndex((e=>e.route.id&&void 0!==(null==g?void 0:g[e.route.id])));e>=0||PA(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight(((e,r,i)=>{let o,A=!1,C=null,I=null;var c;n&&(o=g&&r.route.id?g[r.route.id]:void 0,C=r.route.errorElement||RC,s&&(l<0&&0===i?(c="route-fallback",!1||BC[c]||(BC[c]=!0),A=!0,I=null):l===i&&(A=!0,I=r.route.hydrateFallbackElement||null)));let u=t.concat(a.slice(0,i+1)),d=()=>{let t;return t=o?C:A?I:r.route.Component?Jo.createElement(r.route.Component,null):r.route.element?r.route.element:e,Jo.createElement(_C,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?Jo.createElement(NC,{location:n.location,revalidation:n.revalidation,component:C,error:o,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}var PC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(PC||{}),MC=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(MC||{});function LC(e){let t=Jo.useContext(hC);return t||PA(!1),t}function FC(e){let t=Jo.useContext(fC);return t||PA(!1),t}function jC(e){let t=function(){let e=Jo.useContext(vC);return e||PA(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||PA(!1),n.route.id}const BC={};const zC={};const VC=(e,t,n)=>{var r;zC[r="⚠️ React Router Future Flag Warning: "+t+". You can use the `"+e+"` future flag to opt-in early. For more information, see "+n+"."]||(zC[r]=!0)};function UC(e,t){null!=e&&e.v7_startTransition||VC("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),null!=e&&e.v7_relativeSplatPath||t&&t.v7_relativeSplatPath||VC("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist||VC("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod||VC("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration||VC("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation||VC("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}$o.startTransition;function ZC(e){return function(e){let t=Jo.useContext(vC).outlet;return t?Jo.createElement(kC.Provider,{value:e},t):t}(e.context)}function GC(e){PA(!1)}function WC(e){let{basename:t="/",children:n=null,location:r,navigationType:i=_A.Pop,navigator:o,static:a=!1,future:g}=e;bC()&&PA(!1);let s=t.replace(/^\/*/,"/"),l=Jo.useMemo((()=>({basename:s,navigator:o,static:a,future:dC({v7_relativeSplatPath:!1},g)})),[s,g,o,a]);"string"==typeof r&&(r=BA(r));let{pathname:A="/",search:C="",hash:I="",state:c=null,key:u="default"}=r,d=Jo.useMemo((()=>{let e=rC(A,s);return null==e?null:{location:{pathname:e,search:C,hash:I,state:c,key:u},navigationType:i}}),[s,A,C,I,c,u,i]);return null==d?null:Jo.createElement(pC.Provider,{value:l},Jo.createElement(mC.Provider,{children:n,value:d}))}function HC(e){let{children:t,location:n}=e;return TC(YC(t),n)}new Promise((()=>{}));Jo.Component;function YC(e,t){void 0===t&&(t=[]);let n=[];return Jo.Children.forEach(e,((e,r)=>{if(!Jo.isValidElement(e))return;let i=[...t,r];if(e.type===Jo.Fragment)return void n.push.apply(n,YC(e.props.children,i));e.type!==GC&&PA(!1),e.props.index&&e.props.children&&PA(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=YC(e.props.children,i)),n.push(o)})),n}!function(e){const t={...e};pn(t,"react"),ti(t)}({dsn:"https://6fe214881fe5713445937c8f65357ee5@o4505458059116544.ingest.us.sentry.io/4507697059135488",integrations:[function(e){const t=Ho({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:i,createRoutesFromChildren:o,matchRoutes:a,stripBasename:g,instrumentPageLoad:s=!0,instrumentNavigation:l=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e);const A=On&&On.location&&On.location.pathname;s&&A&&Yo(e,{name:A,attributes:{[oi]:"url",[gi]:"pageload",[si]:"auto.pageload.react.reactrouter_v6"}}),ea=n,ta=r,na=i,ia=a,ra=o,ga=g||!1,oa=t=>{Ko(e,t)},aa=l}}}({useEffect:Jo.useEffect,useLocation:wC,useNavigationType:function(){return Jo.useContext(mC).navigationType},createRoutesFromChildren:YC,matchRoutes:UA}),(e=>new Ma(e))({colorScheme:"system",isNameRequired:!0,isEmailRequired:!0}),TA()],tracesSampleRate:1,tracePropagationTargets:[/^https:\/\/bom-squad\.com\/api/],profilesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});n(1323);var KC="undefined"==typeof window||"Deno"in globalThis;function QC(){}function XC(e){return"number"==typeof e&&e>=0&&e!==1/0}function qC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function JC(e,t){return"function"==typeof e?e(t):e}function $C(e,t){return"function"==typeof e?e(t):e}function eI(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:g}=e;if(a)if(r){if(t.queryHash!==nI(a,t.options))return!1}else if(!iI(t.queryKey,a))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof g||t.isStale()===g)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function tI(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(rI(t.options.mutationKey)!==rI(o))return!1}else if(!iI(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function nI(e,t){return((null==t?void 0:t.queryKeyHashFn)||rI)(e)}function rI(e){return JSON.stringify(e,((e,t)=>sI(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function iI(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!iI(e[n],t[n]))))}function oI(e,t){if(e===t)return e;const n=gI(e)&&gI(t);if(n||sI(e)&&sI(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,g=n?[]:{};let s=0;for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:0;const r=[...e,t];return n&&r.length>n?r.slice(1):r}function II(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var cI=Symbol();function uI(e,t){return!e.queryFn&&null!=t&&t.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==cI?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var dI=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const o=r=>{t?e.push(r):i((()=>{n(r)}))};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return a},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),hI=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fI=new class extends hI{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!KC&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=this.#t)||void 0===e||e.call(this),this.#t=void 0)}setEventListener(e){var t;this.#n=e,null===(t=this.#t)||void 0===t||t.call(this),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var e;return"boolean"==typeof this.#e?this.#e:"hidden"!==(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)}},pI=new class extends hI{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!KC&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=this.#t)||void 0===e||e.call(this),this.#t=void 0)}setEventListener(e){var t;this.#n=e,null===(t=this.#t)||void 0===t||t.call(this),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#r}};function mI(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch((()=>{})),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function vI(e){return Math.min(1e3*2**e,3e4)}function yI(e){return"online"!==(null!=e?e:"online")||pI.isOnline()}var bI=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function wI(e){return e instanceof bI}function xI(e){let t,n=!1,r=0,i=!1;const o=mI(),a=()=>fI.isFocused()&&("always"===e.networkMode||pI.isOnline())&&e.canRun(),g=()=>yI(e.networkMode)&&e.canRun(),s=n=>{var r,a;i||(i=!0,null===(r=e.onSuccess)||void 0===r||r.call(e,n),null===(a=t)||void 0===a||a(),o.resolve(n))},l=n=>{var r,a;i||(i=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null===(a=t)||void 0===a||a(),o.reject(n))},A=()=>new Promise((n=>{var r;t=e=>{(i||a())&&n(e)},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;(t=void 0,i)||(null===(n=e.onContinue)||void 0===n||n.call(e))})),C=()=>{if(i)return;let t;const o=0===r?e.initialPromise:void 0;try{t=null!=o?o:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(s).catch((t=>{var o,g,s;if(i)return;const I=null!==(o=e.retry)&&void 0!==o?o:KC?0:3,c=null!==(g=e.retryDelay)&&void 0!==g?g:vI,u="function"==typeof c?c(r,t):c,d=!0===I||"number"==typeof I&&r{setTimeout(e,h)}))).then((()=>a()?void 0:A())).then((()=>{n?l(t):C()}))):l(t)}))};return{promise:o,cancel:t=>{var n;i||(l(new bI(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return null===(e=t)||void 0===e||e(),o},cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:g,start:()=>(g()?C():A().then(C),o)}}var EI=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),XC(this.gcTime)&&(this.#i=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:KC?1/0:3e5)}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},kI=class extends EI{#o;#a;#g;#s;#l;#A;constructor(e){var t;super(),this.#A=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#g=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=null!==(t=e.state)&&void 0!==t?t:this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null===(e=this.#s)||void 0===e?void 0:e.promise}setOptions(e){this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#g.remove(this)}setData(e,t){const n=AI(this.state.data,e,this.options);return this.#C({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.#C({type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null===(t=this.#s)||void 0===t?void 0:t.promise;return null===(n=this.#s)||void 0===n||n.cancel(e),r?r.then(QC).catch(QC):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some((e=>!1!==$C(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cI||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||void 0===this.state.data||!qC(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null===(e=this.#s)||void 0===e||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null===(e=this.#s)||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#g.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#s&&(this.#A?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#g.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#C({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const i=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#A=!0,i.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=uI(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return o(n),this.#A=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};var g;(o(a),null===(n=this.options.behavior)||void 0===n||n.onFetch(a,this),this.#a=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(r=a.fetchOptions)||void 0===r?void 0:r.meta))&&this.#C({type:"fetch",meta:null===(g=a.fetchOptions)||void 0===g?void 0:g.meta});const s=e=>{var t,n,r,i;(wI(e)&&e.silent||this.#C({type:"error",error:e}),wI(e))||(null===(t=(n=this.#g.config).onError)||void 0===t||t.call(n,e,this),null===(r=(i=this.#g.config).onSettled)||void 0===r||r.call(i,this.state.data,e,this));this.scheduleGc()};return this.#s=xI({initialPromise:null==t?void 0:t.initialPromise,fn:a.fetchFn,abort:i.abort.bind(i),onSuccess:e=>{var t,n,r,i;if(void 0!==e){try{this.setData(e)}catch(e){return void s(e)}null===(t=(n=this.#g.config).onSuccess)||void 0===t||t.call(n,e,this),null===(r=(i=this.#g.config).onSettled)||void 0===r||r.call(i,e,this.state.error,this),this.scheduleGc()}else s(new Error(`${this.queryHash} data is undefined`))},onError:s,onFail:(e,t)=>{this.#C({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#C({type:"pause"})},onContinue:()=>{this.#C({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),this.#s.start()}#C(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...SI(t.data,this.options),fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(r=e.dataUpdatedAt)&&void 0!==r?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return wI(i)&&i.revert&&this.#a?{...this.#a,fetchStatus:"idle"}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),dI.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#g.notify({query:this,type:"updated",action:e})}))}};function SI(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yI(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var TI=class extends hI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.config=e,this.#I=new Map}#I;build(e,t,n){var r;const i=t.queryKey,o=null!==(r=t.queryHash)&&void 0!==r?r:nI(i,t);let a=this.get(o);return a||(a=new kI({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#I.has(e.queryHash)||(this.#I.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#I.get(e.queryHash);t&&(e.destroy(),t===e&&this.#I.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){dI.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#I.get(e)}getAll(){return[...this.#I.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>eI(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>eI(e,t))):t}notify(e){dI.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){dI.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){dI.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},OI=class extends EI{#c;#u;#s;constructor(e){super(),this.mutationId=e.mutationId,this.#u=e.mutationCache,this.#c=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#c.includes(e)||(this.#c.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#c=this.#c.filter((t=>t!==e)),this.scheduleGc(),this.#u.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#c.length||("pending"===this.state.status?this.scheduleGc():this.#u.remove(this))}continue(){var e,t;return null!==(e=null===(t=this.#s)||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){var t;this.#s=xI({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#C({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#C({type:"pause"})},onContinue:()=>{this.#C({type:"continue"})},retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#u.canRun(this)});const n="pending"===this.state.status,r=!this.#s.canStart();try{var i,o,a,g,s,l,A,C;if(!n){var I,c,u,d;this.#C({type:"pending",variables:e,isPaused:r}),await(null===(I=(c=this.#u.config).onMutate)||void 0===I?void 0:I.call(c,e,this));const t=await(null===(u=(d=this.options).onMutate)||void 0===u?void 0:u.call(d,e));t!==this.state.context&&this.#C({type:"pending",context:t,variables:e,isPaused:r})}const t=await this.#s.start();return await(null===(i=(o=this.#u.config).onSuccess)||void 0===i?void 0:i.call(o,t,e,this.state.context,this)),await(null===(a=(g=this.options).onSuccess)||void 0===a?void 0:a.call(g,t,e,this.state.context)),await(null===(s=(l=this.#u.config).onSettled)||void 0===s?void 0:s.call(l,t,null,this.state.variables,this.state.context,this)),await(null===(A=(C=this.options).onSettled)||void 0===A?void 0:A.call(C,t,null,e,this.state.context)),this.#C({type:"success",data:t}),t}catch(t){try{var h,f,p,m,v,y,b,w;throw await(null===(h=(f=this.#u.config).onError)||void 0===h?void 0:h.call(f,t,e,this.state.context,this)),await(null===(p=(m=this.options).onError)||void 0===p?void 0:p.call(m,t,e,this.state.context)),await(null===(v=(y=this.#u.config).onSettled)||void 0===v?void 0:v.call(y,void 0,t,this.state.variables,this.state.context,this)),await(null===(b=(w=this.options).onSettled)||void 0===b?void 0:b.call(w,void 0,t,e,this.state.context)),t}finally{this.#C({type:"error",error:t})}}finally{this.#u.runNext(this)}}#C(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),dI.batch((()=>{this.#c.forEach((t=>{t.onMutationUpdate(e)})),this.#u.notify({mutation:this,type:"updated",action:e})}))}};var RI=class extends hI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.config=e,this.#d=new Map,this.#h=Date.now()}#d;#h;build(e,t,n){const r=new OI({mutationCache:this,mutationId:++this.#h,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){var t;const n=NI(e),r=null!==(t=this.#d.get(n))&&void 0!==t?t:[];r.push(e),this.#d.set(n,r),this.notify({type:"added",mutation:e})}remove(e){const t=NI(e);if(this.#d.has(t)){var n;const r=null===(n=this.#d.get(t))||void 0===n?void 0:n.filter((t=>t!==e));r&&(0===r.length?this.#d.delete(t):this.#d.set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null===(t=this.#d.get(NI(e)))||void 0===t?void 0:t.find((e=>"pending"===e.state.status));return!n||n===e}runNext(e){var t,n;const r=null===(t=this.#d.get(NI(e)))||void 0===t?void 0:t.find((t=>t!==e&&t.state.isPaused));return null!==(n=null==r?void 0:r.continue())&&void 0!==n?n:Promise.resolve()}clear(){dI.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#d.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>tI(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter((t=>tI(e,t)))}notify(e){dI.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return dI.batch((()=>Promise.all(e.map((e=>e.continue().catch(QC))))))}};function NI(e){var t,n;return null!==(t=null===(n=e.options.scope)||void 0===n?void 0:n.id)&&void 0!==t?t:String(e.mutationId)}function _I(e){return{onFetch:(t,n)=>{var r,i,o,a,g;const s=t.options,l=null===(r=t.fetchOptions)||void 0===r||null===(i=r.meta)||void 0===i||null===(o=i.fetchMore)||void 0===o?void 0:o.direction,A=(null===(a=t.state.data)||void 0===a?void 0:a.pages)||[],C=(null===(g=t.state.data)||void 0===g?void 0:g.pageParams)||[];let I={pages:[],pageParams:[]},c=0;const u=async()=>{let n=!1;const r=uI(t.options,t.fetchOptions),i=async(e,i,o)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};(e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)})})(a);const g=await r(a),{maxPages:s}=t.options,l=o?II:CI;return{pages:l(e.pages,g,s),pageParams:l(e.pageParams,i,s)}};if(l&&A.length){const e="backward"===l,t={pages:A,pageParams:C},n=(e?PI:DI)(s,t);I=await i(t,n,e)}else{const t=null!=e?e:A.length;do{var o;const e=0===c?null!==(o=C[0])&&void 0!==o?o:s.initialPageParam:DI(s,I);if(c>0&&null==e)break;I=await i(I,e),c++}while(c{var e,r;return null===(e=(r=t.options).persister)||void 0===e?void 0:e.call(r,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function DI(e,t){let{pages:n,pageParams:r}=t;const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function PI(e,t){var n;let{pages:r,pageParams:i}=t;return r.length>0?null===(n=e.getPreviousPageParam)||void 0===n?void 0:n.call(e,r[0],r,i[0],i):void 0}function MI(e,t){return!!t&&null!=DI(e,t)}function LI(e,t){return!(!t||!e.getPreviousPageParam)&&null!=PI(e,t)}var FI=n(4848),jI=Jo.createContext(void 0),BI=e=>{const t=Jo.useContext(jI);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zI=e=>{let{client:t,children:n}=e;return Jo.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),(0,FI.jsx)(jI.Provider,{value:t,children:n})},VI=(n(6259),n(3757)),UI=n(6942),ZI=n.n(UI);const GI=Object.freeze({INVENTORY:"inventory",SHOPPING:"shopping",SHOPPING_ANON:"shopping_anon"}),WI=e=>{let{useHook:t,hookArgs:n,replaceZero:r=!0,classNames:i="",hideLoadingTag:o=!1}=e;const[a,g]=Jo.useState(),{data:s,isLoading:l,error:A}=t(...Object.values(n));return(0,Jo.useEffect)((()=>{g(s)}),[s]),l&&!o?Jo.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading..."):l&&o?Jo.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"-"):A?Jo.createElement("div",null,"Error: ",A.message):Jo.createElement("span",{className:ZI()("font-bold",i,{"text-[#548a6a]":0!==a,"text-gray-500":0===a})},0===a&&r?"-":a)};function HI({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const YI=Jo.forwardRef(HI);function KI(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function QI(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return KI((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=QI();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function XI(){let[e]=(0,Jo.useState)(QI);return(0,Jo.useEffect)((()=>()=>e.dispose()),[e]),e}var qI=Object.defineProperty,JI=(e,t,n)=>(((e,t,n)=>{t in e?qI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let $I=new class{constructor(){JI(this,"current",this.detect()),JI(this,"handoffState","pending"),JI(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},ec=(e,t)=>{$I.isServer?(0,Jo.useEffect)(e,t):(0,Jo.useLayoutEffect)(e,t)};function tc(e){let t=(0,Jo.useRef)(e);return ec((()=>{t.current=e}),[e]),t}let nc=function(e){let t=tc(e);return Jo.useCallback(((...e)=>t.current(...e)),[t])};function rc(){let e=(0,Jo.useRef)(!1);return ec((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function ic(e=0){let[t,n]=(0,Jo.useState)(e),r=rc(),i=(0,Jo.useCallback)((e=>{r.current&&n((t=>t|e))}),[t,r]),o=(0,Jo.useCallback)((e=>Boolean(t&e)),[t]),a=(0,Jo.useCallback)((e=>{r.current&&n((t=>t&~e))}),[n,r]),g=(0,Jo.useCallback)((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:g}}function oc(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)($o)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Jo.useState($I.isHandoffComplete);return t&&!1===$I.isHandoffComplete&&n(!1),Jo.useEffect((()=>{!0!==t&&n(!0)}),[t]),Jo.useEffect((()=>$I.handoff()),[]),!e&&t}let ac=Symbol();function gc(...e){let t=(0,Jo.useRef)(e);(0,Jo.useEffect)((()=>{t.current=e}),[e]);let n=nc((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ac])))?void 0:n}function sc(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sc),r}function lc(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ac(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Cc(e,t,n,r){let i=n?"enter":"leave",o=QI(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let g=sc(i,{enter:()=>t.enter,leave:()=>t.leave}),s=sc(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=sc(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ac(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),lc(e,...t.base,...g,...l),o.nextFrame((()=>{Ac(e,...t.base,...g,...l),lc(e,...t.base,...g,...s),function(e,t){let n=QI();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),g=o+a;if(0!==g){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),g),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Ac(e,...t.base,...g),lc(e,...t.base,...t.entered),a())))})),o.dispose}function Ic({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:o}){let a=rc(),g=XI(),s=tc(n);ec((()=>{e&&(s.current="enter")}),[e]),ec((()=>{let e=QI();g.add(e.dispose);let n=t.current;if(n&&"idle"!==s.current&&a.current)return e.dispose(),i.current(s.current),e.add(Cc(n,r.current,"enter"===s.current,(()=>{e.dispose(),o.current(s.current)}))),e.dispose}),[n])}let cc=(0,Jo.createContext)(null);cc.displayName="OpenClosedContext";var uc=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(uc||{});function dc(){return(0,Jo.useContext)(cc)}function hc({value:e,children:t}){return Jo.createElement(cc.Provider,{value:e},t)}function fc(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var pc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pc||{}),mc=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(mc||{});function vc({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a,mergeRefs:g}){g=null!=g?g:bc;let s=wc(t,e);if(o)return yc(s,n,r,a,g);let l=null!=i?i:0;if(2&l){let{static:e=!1,...t}=s;if(e)return yc(t,n,r,a,g)}if(1&l){let{unmount:e=!0,...t}=s;return sc(e?0:1,{0:()=>null,1:()=>yc({...t,hidden:!0,style:{display:"none"}},n,r,a,g)})}return yc(s,n,r,a,g)}function yc(e,t={},n,r,i){let{as:o=n,children:a,refName:g="ref",...s}=kc(e,["unmount","static"]),l=void 0!==e.ref?{[g]:e.ref}:{},A="function"==typeof a?a(t):a;"className"in s&&s.className&&"function"==typeof s.className&&(s.className=s.className(t));let C={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r);e&&(C["data-headlessui-state"]=n.join(" "))}if(o===Jo.Fragment&&Object.keys(Ec(s)).length>0){if(!(0,Jo.isValidElement)(A)||Array.isArray(A)&&A.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=A.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>fc(null==e?void 0:e.className(...t),s.className):fc(null==e?void 0:e.className,s.className),n=t?{className:t}:{};return(0,Jo.cloneElement)(A,Object.assign({},wc(A.props,Ec(kc(s,["ref"]))),C,l,{ref:i(A.ref,l.ref)},n))}return(0,Jo.createElement)(o,Object.assign({},kc(s,["ref"]),o!==Jo.Fragment&&l,o!==Jo.Fragment&&C),A)}function bc(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function wc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function xc(e){var t;return Object.assign((0,Jo.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ec(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function kc(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Sc(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Tc=(0,Jo.createContext)(null);Tc.displayName="TransitionContext";var Oc=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Oc||{});let Rc=(0,Jo.createContext)(null);function Nc(e){return"children"in e?Nc(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function _c(e,t){let n=tc(e),r=(0,Jo.useRef)([]),i=rc(),o=XI(),a=nc(((e,t=mc.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(sc(t,{[mc.Unmount](){r.current.splice(a,1)},[mc.Hidden](){r.current[a].state="hidden"}}),o.microTask((()=>{var e;!Nc(r)&&i.current&&(null==(e=n.current)||e.call(n))})))})),g=nc((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,mc.Unmount)})),s=(0,Jo.useRef)([]),l=(0,Jo.useRef)(Promise.resolve()),A=(0,Jo.useRef)({enter:[],leave:[],idle:[]}),C=nc(((e,n,r)=>{s.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{s.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(A.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),I=nc(((e,t,n)=>{Promise.all(A.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=s.current.shift())||e()})).then((()=>n(t)))}));return(0,Jo.useMemo)((()=>({children:r,register:g,unregister:a,onStart:C,onStop:I,wait:l,chains:A})),[g,a,r,C,I,A,l])}function Dc(){}Rc.displayName="NestingContext";let Pc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Mc(e){var t;let n={};for(let r of Pc)n[r]=null!=(t=e[r])?t:Dc;return n}let Lc=pc.RenderStrategy;let Fc=xc((function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,a=(0,Jo.useRef)(null),g=gc(a,t);oc();let s=dc();if(void 0===n&&null!==s&&(n=(s&uc.Open)===uc.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[l,A]=(0,Jo.useState)(n?"visible":"hidden"),C=_c((()=>{A("hidden")})),[I,c]=(0,Jo.useState)(!0),u=(0,Jo.useRef)([n]);ec((()=>{!1!==I&&u.current[u.current.length-1]!==n&&(u.current.push(n),c(!1))}),[u,n]);let d=(0,Jo.useMemo)((()=>({show:n,appear:r,initial:I})),[n,r,I]);(0,Jo.useEffect)((()=>{if(n)A("visible");else if(Nc(C)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&A("hidden")}else A("hidden")}),[n,C]);let h={unmount:i},f=nc((()=>{var t;I&&c(!1),null==(t=e.beforeEnter)||t.call(e)})),p=nc((()=>{var t;I&&c(!1),null==(t=e.beforeLeave)||t.call(e)}));return Jo.createElement(Rc.Provider,{value:C},Jo.createElement(Tc.Provider,{value:d},vc({ourProps:{...h,as:Jo.Fragment,children:Jo.createElement(jc,{ref:g,...h,...o,beforeEnter:f,beforeLeave:p})},theirProps:{},defaultTag:Jo.Fragment,features:Lc,visible:"visible"===l,name:"Transition"})))})),jc=xc((function(e,t){var n,r;let{beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:g,enter:s,enterFrom:l,enterTo:A,entered:C,leave:I,leaveFrom:c,leaveTo:u,...d}=e,h=(0,Jo.useRef)(null),f=gc(h,t),p=null==(n=d.unmount)||n?mc.Unmount:mc.Hidden,{show:m,appear:v,initial:y}=function(){let e=(0,Jo.useContext)(Tc);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),[b,w]=(0,Jo.useState)(m?"visible":"hidden"),x=function(){let e=(0,Jo.useContext)(Rc);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),{register:E,unregister:k}=x;(0,Jo.useEffect)((()=>E(h)),[E,h]),(0,Jo.useEffect)((()=>{if(p===mc.Hidden&&h.current)return m&&"visible"!==b?void w("visible"):sc(b,{hidden:()=>k(h),visible:()=>E(h)})}),[b,h,E,k,m,p]);let S=tc({base:Sc(d.className),enter:Sc(s),enterFrom:Sc(l),enterTo:Sc(A),entered:Sc(C),leave:Sc(I),leaveFrom:Sc(c),leaveTo:Sc(u)}),T=function(e){let t=(0,Jo.useRef)(Mc(e));return(0,Jo.useEffect)((()=>{t.current=Mc(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:g}),O=oc();(0,Jo.useEffect)((()=>{if(O&&"visible"===b&&null===h.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[h,b,O]);let R=v&&m&&y,N=!O||y&&!v?"idle":m?"enter":"leave",_=ic(0),D=nc((e=>sc(e,{enter:()=>{_.addFlag(uc.Opening),T.current.beforeEnter()},leave:()=>{_.addFlag(uc.Closing),T.current.beforeLeave()},idle:()=>{}}))),P=nc((e=>sc(e,{enter:()=>{_.removeFlag(uc.Opening),T.current.afterEnter()},leave:()=>{_.removeFlag(uc.Closing),T.current.afterLeave()},idle:()=>{}}))),M=_c((()=>{w("hidden"),k(h)}),x),L=(0,Jo.useRef)(!1);Ic({immediate:R,container:h,classes:S,direction:N,onStart:tc((e=>{L.current=!0,M.onStart(h,e,D)})),onStop:tc((e=>{L.current=!1,M.onStop(h,e,P),"leave"===e&&!Nc(M)&&(w("hidden"),k(h))}))});let F=d,j={ref:f};return R?F={...F,className:fc(d.className,...S.current.enter,...S.current.enterFrom)}:L.current&&(F.className=fc(d.className,null==(r=h.current)?void 0:r.className),""===F.className&&delete F.className),Jo.createElement(Rc.Provider,{value:M},Jo.createElement(hc,{value:sc(b,{visible:uc.Open,hidden:uc.Closed})|_.flags},vc({ourProps:j,theirProps:F,defaultTag:"div",features:Lc,visible:"visible"===b,name:"Transition.Child"})))})),Bc=xc((function(e,t){let n=null!==(0,Jo.useContext)(Tc),r=null!==dc();return Jo.createElement(Jo.Fragment,null,!n&&r?Jo.createElement(Fc,{ref:t,...e}):Jo.createElement(jc,{ref:t,...e}))})),zc=Object.assign(Fc,{Child:Bc,Root:Fc});function Vc(e,t,n,r){let i=tc(n);(0,Jo.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}),[e,t,r])}function Uc(e){let t=nc(e),n=(0,Jo.useRef)(!1);(0,Jo.useEffect)((()=>(n.current=!1,()=>{n.current=!0,KI((()=>{n.current&&t()}))})),[t])}function Zc(e){return $I.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Gc(...e){return(0,Jo.useMemo)((()=>Zc(...e)),[...e])}function Wc(e,t,n){let r=tc(t);(0,Jo.useEffect)((()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)}),[e,n])}var Hc=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Hc||{});function Yc(e,t){let n=(0,Jo.useRef)([]),r=nc(e);(0,Jo.useEffect)((()=>{let e=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let i=r(t,e);return n.current=t,i}}),[r,...t])}var Kc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Kc||{});let Qc=xc((function(e,t){var n;let{features:r=1,...i}=e;return vc({ourProps:{ref:t,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}},theirProps:i,slot:{},defaultTag:"div",name:"Hidden"})}));let Xc=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&Xc[0]!==e.target&&(Xc.unshift(e.target),Xc=Xc.filter((e=>null!=e&&e.isConnected)),Xc.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));let qc=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Jc=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Jc||{}),$c=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))($c||{}),eu=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(eu||{});function tu(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(qc)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var nu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nu||{});function ru(e,t=0){var n;return e!==(null==(n=Zc(e))?void 0:n.body)&&sc(t,{0:()=>e.matches(qc),1(){let t=e;for(;null!==t;){if(t.matches(qc))return!0;t=t.parentElement}return!1}})}var iu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(iu||{});function ou(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let au=["textarea","input"].join(",");function gu(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(e):e:tu(e);i.length>0&&a.length>1&&(a=a.filter((e=>!i.includes(e)))),r=null!=r?r:o.activeElement;let g,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(r))-1;if(4&t)return Math.max(0,a.indexOf(r))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=32&t?{preventScroll:!0}:{},C=0,I=a.length;do{if(C>=I||C+I<=0)return 0;let e=l+C;if(16&t)e=(e+I)%I;else{if(e<0)return 3;if(e>=I)return 1}g=a[e],null==g||g.focus(A),C+=s}while(g!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,au))&&n}(g)&&g.select(),2}function su(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var lu=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(lu||{});let Au=xc((function(e,t){let n=(0,Jo.useRef)(null),r=gc(n,t),{initialFocus:i,containers:o,features:a=30,...g}=e;oc()||(a=1);let s=Gc(n);!function({ownerDocument:e},t){let n=function(e=!0){let t=(0,Jo.useRef)(Xc.slice());return Yc((([e],[n])=>{!0===n&&!1===e&&KI((()=>{t.current.splice(0)})),!1===n&&!0===e&&(t.current=Xc.slice())}),[e,Xc,t]),nc((()=>{var e;return null!=(e=t.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(t);Yc((()=>{t||(null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&ou(n())}),[t]),Uc((()=>{t&&ou(n())}))}({ownerDocument:s},Boolean(16&a));let l=function({ownerDocument:e,container:t,initialFocus:n},r){let i=(0,Jo.useRef)(null),o=rc();return Yc((()=>{if(!r)return;let a=t.current;a&&KI((()=>{if(!o.current)return;let t=null==e?void 0:e.activeElement;if(null!=n&&n.current){if((null==n?void 0:n.current)===t)return void(i.current=t)}else if(a.contains(t))return void(i.current=t);null!=n&&n.current?ou(n.current):(gu(a,Jc.First),$c.Error),i.current=null==e?void 0:e.activeElement}))}),[r]),i}({ownerDocument:s,container:n,initialFocus:i},Boolean(2&a));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let o=rc();Vc(null==e?void 0:e.defaultView,"focus",(e=>{if(!i||!o.current)return;let a=su(n);t.current instanceof HTMLElement&&a.add(t.current);let g=r.current;if(!g)return;let s=e.target;s&&s instanceof HTMLElement?Iu(a,s)?(r.current=s,ou(s)):(e.preventDefault(),e.stopPropagation(),ou(g)):ou(r.current)}),!0)}({ownerDocument:s,container:n,containers:o,previousActiveElement:l},Boolean(8&a));let A=function(){let e=(0,Jo.useRef)(0);return Wc("keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}(),C=nc((e=>{let t=n.current;t&&sc(A.current,{[Hc.Forwards]:()=>{gu(t,Jc.First,{skipElements:[e.relatedTarget]})},[Hc.Backwards]:()=>{gu(t,Jc.Last,{skipElements:[e.relatedTarget]})}})})),I=XI(),c=(0,Jo.useRef)(!1),u={ref:r,onKeyDown(e){"Tab"==e.key&&(c.current=!0,I.requestAnimationFrame((()=>{c.current=!1})))},onBlur(e){let t=su(o);n.current instanceof HTMLElement&&t.add(n.current);let r=e.relatedTarget;r instanceof HTMLElement&&"true"!==r.dataset.headlessuiFocusGuard&&(Iu(t,r)||(c.current?gu(n.current,sc(A.current,{[Hc.Forwards]:()=>Jc.Next,[Hc.Backwards]:()=>Jc.Previous})|Jc.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&ou(e.target)))}};return Jo.createElement(Jo.Fragment,null,Boolean(4&a)&&Jo.createElement(Qc,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:C,features:Kc.Focusable}),vc({ourProps:u,theirProps:g,defaultTag:"div",name:"FocusTrap"}),Boolean(4&a)&&Jo.createElement(Qc,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:C,features:Kc.Focusable}))})),Cu=Object.assign(Au,{features:lu});function Iu(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var cu=n(961),uu=n.t(cu,2);let du=(0,Jo.createContext)(!1);function hu(e){return Jo.createElement(du.Provider,{value:e.force},e.children)}function fu(e){let t=(0,Jo.useContext)(du),n=(0,Jo.useContext)(vu),r=Gc(e),[i,o]=(0,Jo.useState)((()=>{if(!t&&null!==n||$I.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let i=r.createElement("div");return i.setAttribute("id","headlessui-portal-root"),r.body.appendChild(i)}));return(0,Jo.useEffect)((()=>{null!==i&&(null!=r&&r.body.contains(i)||null==r||r.body.appendChild(i))}),[i,r]),(0,Jo.useEffect)((()=>{t||null!==n&&o(n.current)}),[n,o,t]),i}let pu=Jo.Fragment;let mu=Jo.Fragment,vu=(0,Jo.createContext)(null);let yu=(0,Jo.createContext)(null);let bu=xc((function(e,t){let n=e,r=(0,Jo.useRef)(null),i=gc(function(e,t=!0){return Object.assign(e,{[ac]:t})}((e=>{r.current=e})),t),o=Gc(r),a=fu(r),[g]=(0,Jo.useState)((()=>{var e;return $I.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),s=(0,Jo.useContext)(yu),l=oc();return ec((()=>{!a||!g||a.contains(g)||(g.setAttribute("data-headlessui-portal",""),a.appendChild(g))}),[a,g]),ec((()=>{if(g&&s)return s.register(g)}),[s,g]),Uc((()=>{var e;!a||!g||(g instanceof Node&&a.contains(g)&&a.removeChild(g),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))})),l&&a&&g?(0,cu.createPortal)(vc({ourProps:{ref:i},theirProps:n,defaultTag:pu,name:"Portal"}),g):null})),wu=xc((function(e,t){let{target:n,...r}=e,i={ref:gc(t)};return Jo.createElement(vu.Provider,{value:n},vc({ourProps:i,theirProps:r,defaultTag:mu,name:"Popover.Group"}))})),xu=Object.assign(bu,{Group:wu});const Eu="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:ku,useEffect:Su,useLayoutEffect:Tu,useDebugValue:Ou}=$o;function Ru(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Eu(n,e)}catch{return!0}}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;const Nu=(e=>e.useSyncExternalStore)($o);function _u(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=(null!=(n=t.defaultView)?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,o=e-i;n.style(r,"paddingRight",`${o}px`)}}}function Du(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Pu(){return Du()||/Android/gi.test(window.navigator.userAgent)}function Mu(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Lu=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:QI(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Mu(n)},i=[Du()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=QI();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),a=e.querySelector(i);a&&!r(a)&&(o=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},_u(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Fu(e,t,n){let r=function(e){return Nu(e.subscribe,e.getSnapshot,e.getSnapshot)}(Lu),i=e?r.get(e):void 0,o=!!i&&i.count>0;return ec((()=>{if(e&&t)return Lu.dispatch("PUSH",e,n),()=>Lu.dispatch("POP",e,n)}),[t,e]),o}var ju;Lu.subscribe((()=>{let e=Lu.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Lu.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Lu.dispatch("TEARDOWN",n)}}));let Bu=null!=(ju=Jo.useId)?ju:function(){let e=oc(),[t,n]=Jo.useState(e?()=>$I.nextId():null);return ec((()=>{null===t&&n($I.nextId())}),[t]),null!=t?""+t:void 0},zu=new Map,Vu=new Map;function Uu(e,t=!0){ec((()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let i=null!=(n=Vu.get(r))?n:0;return Vu.set(r,i+1),0!==i||(zu.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=Vu.get(r))?e:1;if(1===t?Vu.delete(r):Vu.set(r,t-1),1!==t)return;let n=zu.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,zu.delete(r))}}),[e,t])}function Zu(e,t,n){let r=tc(t);(0,Jo.useEffect)((()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)}),[e,n])}function Gu(e,t,n=!0){let r=(0,Jo.useRef)(!1);function i(n,i){if(!r.current||n.defaultPrevented)return;let o=i(n);if(null===o||!o.getRootNode().contains(o)||!o.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of a){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(o)||n.composed&&n.composedPath().includes(t))return}return!ru(o,nu.Loose)&&-1!==o.tabIndex&&n.preventDefault(),t(n,o)}(0,Jo.useEffect)((()=>{requestAnimationFrame((()=>{r.current=n}))}),[n]);let o=(0,Jo.useRef)(null);Zu("pointerdown",(e=>{var t,n;r.current&&(o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Zu("mousedown",(e=>{var t,n;r.current&&(o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Zu("click",(e=>{Pu()||o.current&&(i(e,(()=>o.current)),o.current=null)}),!0),Zu("touchend",(e=>i(e,(()=>e.target instanceof HTMLElement?e.target:null))),!0),Wc("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}let Wu=(0,Jo.createContext)((()=>{}));Wu.displayName="StackContext";var Hu=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Hu||{});function Yu({children:e,onUpdate:t,type:n,element:r,enabled:i}){let o=(0,Jo.useContext)(Wu),a=nc(((...e)=>{null==t||t(...e),o(...e)}));return ec((()=>{let e=void 0===i||!0===i;return e&&a(0,n,r),()=>{e&&a(1,n,r)}}),[a,n,r,i]),Jo.createElement(Wu.Provider,{value:a},e)}function Ku(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let Qu=(0,Jo.createContext)(null);function Xu(){let e=(0,Jo.useContext)(Qu);if(null===e){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Xu),e}return e}function qu(){let[e,t]=(0,Jo.useState)([]);return[e.length>0?e.join(" "):void 0,(0,Jo.useMemo)((()=>function(e){let n=nc((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=(0,Jo.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return Jo.createElement(Qu.Provider,{value:r},e.children)}),[t])]}let Ju=xc((function(e,t){let n=Bu(),{id:r=`headlessui-description-${n}`,...i}=e,o=Xu(),a=gc(t);return ec((()=>o.register(r)),[r,o.register]),vc({ourProps:{ref:a,...o.props,id:r},theirProps:i,slot:o.slot||{},defaultTag:"p",name:o.name||"Description"})})),$u=Object.assign(Ju,{});var ed=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ed||{}),td=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(td||{}),nd=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(nd||{});let rd={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},id=(0,Jo.createContext)(null);function od(e){let t=(0,Jo.useContext)(id);if(null===t){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,od),t}return t}function ad(e,t){return sc(t.type,rd,e,t)}id.displayName="DialogContext";let gd=pc.RenderStrategy|pc.Static;let sd=xc((function(e,t){let n=Bu(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:o,initialFocus:a,role:g="dialog",__demoMode:s=!1,...l}=e,[A,C]=(0,Jo.useState)(0),I=(0,Jo.useRef)(!1);g="dialog"===g||"alertdialog"===g?g:(I.current||(I.current=!0),"dialog");let c=dc();void 0===i&&null!==c&&(i=(c&uc.Open)===uc.Open);let u=(0,Jo.useRef)(null),d=gc(u,t),h=Gc(u),f=e.hasOwnProperty("open")||null!==c,p=e.hasOwnProperty("onClose");if(!f&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!f)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof i)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if("function"!=typeof o)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${o}`);let m=i?0:1,[v,y]=(0,Jo.useReducer)(ad,{titleId:null,descriptionId:null,panelRef:(0,Jo.createRef)()}),b=nc((()=>o(!1))),w=nc((e=>y({type:0,id:e}))),x=!!oc()&&(!s&&0===m),E=A>1,k=null!==(0,Jo.useContext)(id),[S,T]=function(){let e=(0,Jo.useContext)(yu),t=(0,Jo.useRef)([]),n=nc((n=>(t.current.push(n),e&&e.register(n),()=>r(n)))),r=nc((n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)})),i=(0,Jo.useMemo)((()=>({register:n,unregister:r,portals:t})),[n,r,t]);return[t,(0,Jo.useMemo)((()=>function({children:e}){return Jo.createElement(yu.Provider,{value:i},e)}),[i])]}(),O={get current(){var e;return null!=(e=v.panelRef.current)?e:u.current}},{resolveContainers:R,mainTreeNodeRef:N,MainTreeNode:_}=function({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let i=(0,Jo.useRef)(null!=(r=null==n?void 0:n.current)?r:null),o=Gc(i),a=nc((()=>{var n,r,a;let g=[];for(let t of e)null!==t&&(t instanceof HTMLElement?g.push(t):"current"in t&&t.current instanceof HTMLElement&&g.push(t.current));if(null!=t&&t.current)for(let e of t.current)g.push(e);for(let e of null!=(n=null==o?void 0:o.querySelectorAll("html > *, body > *"))?n:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&"headlessui-portal-root"!==e.id&&(e.contains(i.current)||e.contains(null==(a=null==(r=i.current)?void 0:r.getRootNode())?void 0:a.host)||g.some((t=>e.contains(t)))||g.push(e));return g}));return{resolveContainers:a,contains:nc((e=>a().some((t=>t.contains(e))))),mainTreeNodeRef:i,MainTreeNode:(0,Jo.useMemo)((()=>function(){return null!=n?null:Jo.createElement(Qc,{features:Kc.Hidden,ref:i})}),[i,n])}}({portals:S,defaultContainers:[O]}),D=E?"parent":"leaf",P=null!==c&&(c&uc.Closing)===uc.Closing,M=!k&&!P&&x,L=(0,Jo.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==h?void 0:h.querySelectorAll("body > *"))?e:[]).find((e=>"headlessui-portal-root"!==e.id&&(e.contains(N.current)&&e instanceof HTMLElement))))?t:null}),[N]);Uu(L,M);let F=!!E||x,j=(0,Jo.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==h?void 0:h.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((e=>e.contains(N.current)&&e instanceof HTMLElement)))?t:null}),[N]);Uu(j,F),Gu(R,(e=>{e.preventDefault(),b()}),!(!x||E));let B=!(E||0!==m);Vc(null==h?void 0:h.defaultView,"keydown",(e=>{B&&(e.defaultPrevented||e.key===ed.Escape&&(e.preventDefault(),e.stopPropagation(),b()))})),function(e,t,n=()=>[document.body]){Fu(e,t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(h,!(P||0!==m||k),R),(0,Jo.useEffect)((()=>{if(0!==m||!u.current)return;let e=new ResizeObserver((e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&b()}}));return e.observe(u.current),()=>e.disconnect()}),[m,u,b]);let[z,V]=qu(),U=(0,Jo.useMemo)((()=>[{dialogState:m,close:b,setTitleId:w},v]),[m,v,b,w]),Z=(0,Jo.useMemo)((()=>({open:0===m})),[m]),G={ref:d,id:r,role:g,"aria-modal":0===m||void 0,"aria-labelledby":v.titleId,"aria-describedby":z};return Jo.createElement(Yu,{type:"Dialog",enabled:0===m,element:u,onUpdate:nc(((e,t)=>{"Dialog"===t&&sc(e,{[Hu.Add]:()=>C((e=>e+1)),[Hu.Remove]:()=>C((e=>e-1))})}))},Jo.createElement(hu,{force:!0},Jo.createElement(xu,null,Jo.createElement(id.Provider,{value:U},Jo.createElement(xu.Group,{target:u},Jo.createElement(hu,{force:!1},Jo.createElement(V,{slot:Z,name:"Dialog.Description"},Jo.createElement(Cu,{initialFocus:a,containers:R,features:x?sc(D,{parent:Cu.features.RestoreFocus,leaf:Cu.features.All&~Cu.features.FocusLock}):Cu.features.None},Jo.createElement(T,null,vc({ourProps:G,theirProps:l,slot:Z,defaultTag:"div",features:gd,visible:0===m,name:"Dialog"}))))))))),Jo.createElement(_,null))})),ld=xc((function(e,t){let n=Bu(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:o},a]=od("Dialog.Backdrop"),g=gc(t);(0,Jo.useEffect)((()=>{if(null===a.panelRef.current)throw new Error("A component is being used, but a component is missing.")}),[a.panelRef]);let s=(0,Jo.useMemo)((()=>({open:0===o})),[o]);return Jo.createElement(hu,{force:!0},Jo.createElement(xu,null,vc({ourProps:{ref:g,id:r,"aria-hidden":!0},theirProps:i,slot:s,defaultTag:"div",name:"Dialog.Backdrop"})))})),Ad=xc((function(e,t){let n=Bu(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:o},a]=od("Dialog.Panel"),g=gc(t,a.panelRef),s=(0,Jo.useMemo)((()=>({open:0===o})),[o]),l=nc((e=>{e.stopPropagation()}));return vc({ourProps:{ref:g,id:r,onClick:l},theirProps:i,slot:s,defaultTag:"div",name:"Dialog.Panel"})})),Cd=xc((function(e,t){let n=Bu(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:o,close:a}]=od("Dialog.Overlay"),g=gc(t),s=nc((e=>{if(e.target===e.currentTarget){if(Ku(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}}));return vc({ourProps:{ref:g,id:r,"aria-hidden":!0,onClick:s},theirProps:i,slot:(0,Jo.useMemo)((()=>({open:0===o})),[o]),defaultTag:"div",name:"Dialog.Overlay"})})),Id=xc((function(e,t){let n=Bu(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:a}]=od("Dialog.Title"),g=gc(t);(0,Jo.useEffect)((()=>(a(r),()=>a(null))),[r,a]);let s=(0,Jo.useMemo)((()=>({open:0===o})),[o]);return vc({ourProps:{ref:g,id:r},theirProps:i,slot:s,defaultTag:"h2",name:"Dialog.Title"})})),cd=Object.assign(sd,{Backdrop:ld,Panel:Ad,Overlay:Cd,Title:Id,Description:$u});function ud({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const dd=Jo.forwardRef(ud),hd=e=>{let{backgroundColor:t="",title:n,headerClasses:r="",borderColor:i="",bgColor:o="bg-white",rounded:a=!0,innerPadding:g="",children:s}=e;const[l,A]=(0,Jo.useState)(!1);return Jo.createElement(Jo.Fragment,null,Jo.createElement("button",{className:ZI()("flex items-center w-full py-2 space-x-1 font-medium text-left text-gray-900 px-4 focus:outline-none "+(l?"justify-between":"justify-start"),a&&"rounded",i&&"border-b",t,i),onClick:()=>A(!l)},Jo.createElement("h4",{className:ZI()("grow",r)},n),Jo.createElement("div",{className:"flex flex-col justify-center h-full"},Jo.createElement(dd,{className:"h-6 w-6 transform transition-transform duration-300 "+(l?"rotate-180":"rotate-0")}))),Jo.createElement("div",{className:ZI()("transition-all duration-300 overflow-y-auto rounded",{"max-h-48":l,"max-h-0":!l},o,l&&g)},s))};function fd(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pd(e){return e instanceof fd(e).Element||e instanceof Element}function md(e){return e instanceof fd(e).HTMLElement||e instanceof HTMLElement}function vd(e){return"undefined"!=typeof ShadowRoot&&(e instanceof fd(e).ShadowRoot||e instanceof ShadowRoot)}var yd=Math.max,bd=Math.min,wd=Math.round;function xd(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Ed(){return!/^((?!chrome|android).)*safari/i.test(xd())}function kd(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&md(e)&&(i=e.offsetWidth>0&&wd(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&wd(r.height)/e.offsetHeight||1);var a=(pd(e)?fd(e):window).visualViewport,g=!Ed()&&n,s=(r.left+(g&&a?a.offsetLeft:0))/i,l=(r.top+(g&&a?a.offsetTop:0))/o,A=r.width/i,C=r.height/o;return{width:A,height:C,top:l,right:s+A,bottom:l+C,left:s,x:s,y:l}}function Sd(e){var t=fd(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Td(e){return e?(e.nodeName||"").toLowerCase():null}function Od(e){return((pd(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rd(e){return kd(Od(e)).left+Sd(e).scrollLeft}function Nd(e){return fd(e).getComputedStyle(e)}function _d(e){var t=Nd(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Dd(e,t,n){void 0===n&&(n=!1);var r=md(t),i=md(t)&&function(e){var t=e.getBoundingClientRect(),n=wd(t.width)/e.offsetWidth||1,r=wd(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=Od(t),a=kd(e,i,n),g={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&(("body"!==Td(t)||_d(o))&&(g=function(e){return e!==fd(e)&&md(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Sd(e);var t}(t)),md(t)?((s=kd(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):o&&(s.x=Rd(o))),{x:a.left+g.scrollLeft-s.x,y:a.top+g.scrollTop-s.y,width:a.width,height:a.height}}function Pd(e){var t=kd(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Md(e){return"html"===Td(e)?e:e.assignedSlot||e.parentNode||(vd(e)?e.host:null)||Od(e)}function Ld(e){return["html","body","#document"].indexOf(Td(e))>=0?e.ownerDocument.body:md(e)&&_d(e)?e:Ld(Md(e))}function Fd(e,t){var n;void 0===t&&(t=[]);var r=Ld(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=fd(r),a=i?[o].concat(o.visualViewport||[],_d(r)?r:[]):r,g=t.concat(a);return i?g:g.concat(Fd(Md(a)))}function jd(e){return["table","td","th"].indexOf(Td(e))>=0}function Bd(e){return md(e)&&"fixed"!==Nd(e).position?e.offsetParent:null}function zd(e){for(var t=fd(e),n=Bd(e);n&&jd(n)&&"static"===Nd(n).position;)n=Bd(n);return n&&("html"===Td(n)||"body"===Td(n)&&"static"===Nd(n).position)?t:n||function(e){var t=/firefox/i.test(xd());if(/Trident/i.test(xd())&&md(e)&&"fixed"===Nd(e).position)return null;var n=Md(e);for(vd(n)&&(n=n.host);md(n)&&["html","body"].indexOf(Td(n))<0;){var r=Nd(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Vd="top",Ud="bottom",Zd="right",Gd="left",Wd="auto",Hd=[Vd,Ud,Zd,Gd],Yd="start",Kd="end",Qd="viewport",Xd="popper",qd=Hd.reduce((function(e,t){return e.concat([t+"-"+Yd,t+"-"+Kd])}),[]),Jd=[].concat(Hd,[Wd]).reduce((function(e,t){return e.concat([t,t+"-"+Yd,t+"-"+Kd])}),[]),$d=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function eh(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var th={placement:"bottom",modifiers:[],strategy:"absolute"};function nh(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function lh(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?ah(i):null,a=i?gh(i):null,g=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case Vd:t={x:g,y:n.y-r.height};break;case Ud:t={x:g,y:n.y+n.height};break;case Zd:t={x:n.x+n.width,y:s};break;case Gd:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var l=o?sh(o):null;if(null!=l){var A="y"===l?"height":"width";switch(a){case Yd:t[l]=t[l]-(n[A]/2-r[A]/2);break;case Kd:t[l]=t[l]+(n[A]/2-r[A]/2)}}return t}const Ah={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=lh({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ch={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ih(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,g=e.position,s=e.gpuAcceleration,l=e.adaptive,A=e.roundOffsets,C=e.isFixed,I=a.x,c=void 0===I?0:I,u=a.y,d=void 0===u?0:u,h="function"==typeof A?A({x:c,y:d}):{x:c,y:d};c=h.x,d=h.y;var f=a.hasOwnProperty("x"),p=a.hasOwnProperty("y"),m=Gd,v=Vd,y=window;if(l){var b=zd(n),w="clientHeight",x="clientWidth";if(b===fd(n)&&"static"!==Nd(b=Od(n)).position&&"absolute"===g&&(w="scrollHeight",x="scrollWidth"),i===Vd||(i===Gd||i===Zd)&&o===Kd)v=Ud,d-=(C&&b===y&&y.visualViewport?y.visualViewport.height:b[w])-r.height,d*=s?1:-1;if(i===Gd||(i===Vd||i===Ud)&&o===Kd)m=Zd,c-=(C&&b===y&&y.visualViewport?y.visualViewport.width:b[x])-r.width,c*=s?1:-1}var E,k=Object.assign({position:g},l&&Ch),S=!0===A?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:wd(n*i)/i||0,y:wd(r*i)/i||0}}({x:c,y:d},fd(n)):{x:c,y:d};return c=S.x,d=S.y,s?Object.assign({},k,((E={})[v]=p?"0":"",E[m]=f?"0":"",E.transform=(y.devicePixelRatio||1)<=1?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",E)):Object.assign({},k,((t={})[v]=p?d+"px":"",t[m]=f?c+"px":"",t.transform="",t))}const ch={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,g=n.roundOffsets,s=void 0===g||g,l={placement:ah(t.placement),variation:gh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ih(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ih(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};const uh={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];md(i)&&Td(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});md(r)&&Td(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const dh={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Jd.reduce((function(e,n){return e[n]=function(e,t,n){var r=ah(e),i=[Gd,Vd].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],g=o[1];return a=a||0,g=(g||0)*i,[Gd,Zd].indexOf(r)>=0?{x:g,y:a}:{x:a,y:g}}(n,t.rects,o),e}),{}),g=a[t.placement],s=g.x,l=g.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}};var hh={left:"right",right:"left",bottom:"top",top:"bottom"};function fh(e){return e.replace(/left|right|bottom|top/g,(function(e){return hh[e]}))}var ph={start:"end",end:"start"};function mh(e){return e.replace(/start|end/g,(function(e){return ph[e]}))}function vh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function bh(e,t,n){return t===Qd?yh(function(e,t){var n=fd(e),r=Od(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,g=0,s=0;if(i){o=i.width,a=i.height;var l=Ed();(l||!l&&"fixed"===t)&&(g=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:g+Rd(e),y:s}}(e,n)):pd(t)?function(e,t){var n=kd(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):yh(function(e){var t,n=Od(e),r=Sd(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=yd(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yd(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),g=-r.scrollLeft+Rd(e),s=-r.scrollTop;return"rtl"===Nd(i||n).direction&&(g+=yd(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:g,y:s}}(Od(e)))}function wh(e,t,n,r){var i="clippingParents"===t?function(e){var t=Fd(Md(e)),n=["absolute","fixed"].indexOf(Nd(e).position)>=0&&md(e)?zd(e):e;return pd(n)?t.filter((function(e){return pd(e)&&vh(e,n)&&"body"!==Td(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],g=o.reduce((function(t,n){var i=bh(e,n,r);return t.top=yd(i.top,t.top),t.right=bd(i.right,t.right),t.bottom=bd(i.bottom,t.bottom),t.left=yd(i.left,t.left),t}),bh(e,a,r));return g.width=g.right-g.left,g.height=g.bottom-g.top,g.x=g.left,g.y=g.top,g}function xh(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Eh(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function kh(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,g=n.boundary,s=void 0===g?"clippingParents":g,l=n.rootBoundary,A=void 0===l?Qd:l,C=n.elementContext,I=void 0===C?Xd:C,c=n.altBoundary,u=void 0!==c&&c,d=n.padding,h=void 0===d?0:d,f=xh("number"!=typeof h?h:Eh(h,Hd)),p=I===Xd?"reference":Xd,m=e.rects.popper,v=e.elements[u?p:I],y=wh(pd(v)?v:v.contextElement||Od(e.elements.popper),s,A,a),b=kd(e.elements.reference),w=lh({reference:b,element:m,strategy:"absolute",placement:i}),x=yh(Object.assign({},m,w)),E=I===Xd?x:b,k={top:y.top-E.top+f.top,bottom:E.bottom-y.bottom+f.bottom,left:y.left-E.left+f.left,right:E.right-y.right+f.right},S=e.modifiersData.offset;if(I===Xd&&S){var T=S[i];Object.keys(k).forEach((function(e){var t=[Zd,Ud].indexOf(e)>=0?1:-1,n=[Vd,Ud].indexOf(e)>=0?"y":"x";k[e]+=T[n]*t}))}return k}const Sh={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,g=void 0===a||a,s=n.fallbackPlacements,l=n.padding,A=n.boundary,C=n.rootBoundary,I=n.altBoundary,c=n.flipVariations,u=void 0===c||c,d=n.allowedAutoPlacements,h=t.options.placement,f=ah(h),p=s||(f===h||!u?[fh(h)]:function(e){if(ah(e)===Wd)return[];var t=fh(e);return[mh(e),t,mh(t)]}(h)),m=[h].concat(p).reduce((function(e,n){return e.concat(ah(n)===Wd?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,g=n.flipVariations,s=n.allowedAutoPlacements,l=void 0===s?Jd:s,A=gh(r),C=A?g?qd:qd.filter((function(e){return gh(e)===A})):Hd,I=C.filter((function(e){return l.indexOf(e)>=0}));0===I.length&&(I=C);var c=I.reduce((function(t,n){return t[n]=kh(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[ah(n)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:A,rootBoundary:C,padding:l,flipVariations:u,allowedAutoPlacements:d}):n)}),[]),v=t.rects.reference,y=t.rects.popper,b=new Map,w=!0,x=m[0],E=0;E=0,R=O?"width":"height",N=kh(t,{placement:k,boundary:A,rootBoundary:C,altBoundary:I,padding:l}),_=O?T?Zd:Gd:T?Ud:Vd;v[R]>y[R]&&(_=fh(_));var D=fh(_),P=[];if(o&&P.push(N[S]<=0),g&&P.push(N[_]<=0,N[D]<=0),P.every((function(e){return e}))){x=k,w=!1;break}b.set(k,P)}if(w)for(var M=function(e){var t=m.find((function(t){var n=b.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return x=t,"break"},L=u?3:1;L>0;L--){if("break"===M(L))break}t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Th(e,t,n){return yd(e,bd(t,n))}const Oh={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,g=void 0!==a&&a,s=n.boundary,l=n.rootBoundary,A=n.altBoundary,C=n.padding,I=n.tether,c=void 0===I||I,u=n.tetherOffset,d=void 0===u?0:u,h=kh(t,{boundary:s,rootBoundary:l,padding:C,altBoundary:A}),f=ah(t.placement),p=gh(t.placement),m=!p,v=sh(f),y="x"===v?"y":"x",b=t.modifiersData.popperOffsets,w=t.rects.reference,x=t.rects.popper,E="function"==typeof d?d(Object.assign({},t.rects,{placement:t.placement})):d,k="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(b){if(o){var O,R="y"===v?Vd:Gd,N="y"===v?Ud:Zd,_="y"===v?"height":"width",D=b[v],P=D+h[R],M=D-h[N],L=c?-x[_]/2:0,F=p===Yd?w[_]:x[_],j=p===Yd?-x[_]:-w[_],B=t.elements.arrow,z=c&&B?Pd(B):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=V[R],Z=V[N],G=Th(0,w[_],z[_]),W=m?w[_]/2-L-G-U-k.mainAxis:F-G-U-k.mainAxis,H=m?-w[_]/2+L+G+Z+k.mainAxis:j+G+Z+k.mainAxis,Y=t.elements.arrow&&zd(t.elements.arrow),K=Y?"y"===v?Y.clientTop||0:Y.clientLeft||0:0,Q=null!=(O=null==S?void 0:S[v])?O:0,X=D+H-Q,q=Th(c?bd(P,D+W-Q-K):P,D,c?yd(M,X):M);b[v]=q,T[v]=q-D}if(g){var J,$="x"===v?Vd:Gd,ee="x"===v?Ud:Zd,te=b[y],ne="y"===y?"height":"width",re=te+h[$],ie=te-h[ee],oe=-1!==[Vd,Gd].indexOf(f),ae=null!=(J=null==S?void 0:S[y])?J:0,ge=oe?re:te-w[ne]-x[ne]-ae+k.altAxis,se=oe?te+w[ne]+x[ne]-ae-k.altAxis:ie,le=c&&oe?function(e,t,n){var r=Th(e,t,n);return r>n?n:r}(ge,te,se):Th(c?ge:re,te,c?se:ie);b[y]=le,T[y]=le-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};const Rh={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,g=ah(n.placement),s=sh(g),l=[Gd,Zd].indexOf(g)>=0?"height":"width";if(o&&a){var A=function(e,t){return xh("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Eh(e,Hd))}(i.padding,n),C=Pd(o),I="y"===s?Vd:Gd,c="y"===s?Ud:Zd,u=n.rects.reference[l]+n.rects.reference[s]-a[s]-n.rects.popper[l],d=a[s]-n.rects.reference[s],h=zd(o),f=h?"y"===s?h.clientHeight||0:h.clientWidth||0:0,p=u/2-d/2,m=A[I],v=f-C[l]-A[c],y=f/2-C[l]/2+p,b=Th(m,y,v),w=s;n.modifiersData[r]=((t={})[w]=b,t.centerOffset=b-y,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&vh(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nh(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _h(e){return[Vd,Zd,Ud,Gd].some((function(t){return e[t]>=0}))}const Dh={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=kh(t,{elementContext:"reference"}),g=kh(t,{altBoundary:!0}),s=Nh(a,r),l=Nh(g,i,o),A=_h(s),C=_h(l);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:l,isReferenceHidden:A,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":A,"data-popper-escaped":C})}};var Ph=rh({defaultModifiers:[oh,Ah,ch,uh,dh,Sh,Oh,Rh,Dh]}),Mh="tippy-content",Lh="tippy-backdrop",Fh="tippy-arrow",jh="tippy-svg-arrow",Bh={passive:!0,capture:!0},zh=function(){return document.body};function Vh(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Uh(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Zh(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Gh(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Wh(e){return[].concat(e)}function Hh(e,t){-1===e.indexOf(t)&&e.push(t)}function Yh(e){return e.split("-")[0]}function Kh(e){return[].slice.call(e)}function Qh(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Xh(){return document.createElement("div")}function qh(e){return["Element","Fragment"].some((function(t){return Uh(e,t)}))}function Jh(e){return Uh(e,"MouseEvent")}function $h(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function ef(e){return qh(e)?[e]:function(e){return Uh(e,"NodeList")}(e)?Kh(e):Array.isArray(e)?e:Kh(document.querySelectorAll(e))}function tf(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function nf(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function rf(e){var t,n=Wh(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function of(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function af(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var gf={isTouch:!1},sf=0;function lf(){gf.isTouch||(gf.isTouch=!0,window.performance&&document.addEventListener("mousemove",Af))}function Af(){var e=performance.now();e-sf<20&&(gf.isTouch=!1,document.removeEventListener("mousemove",Af)),sf=e}function Cf(){var e=document.activeElement;if($h(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var If=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var cf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},uf=Object.assign({appendTo:zh,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},cf,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),df=Object.keys(uf);function hf(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=uf[i])?r:o);return t}),{});return Object.assign({},e,t)}function ff(e,t){var n=Object.assign({},t,{content:Zh(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(hf(Object.assign({},uf,{plugins:t}))):df).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},uf.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function pf(e,t){e.innerHTML=t}function mf(e){var t=Xh();return!0===e?t.className=Fh:(t.className=jh,qh(e)?t.appendChild(e):pf(t,e)),t}function vf(e,t){qh(t.content)?(pf(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?pf(e,t.content):e.textContent=t.content)}function yf(e){var t=e.firstElementChild,n=Kh(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Mh)})),arrow:n.find((function(e){return e.classList.contains(Fh)||e.classList.contains(jh)})),backdrop:n.find((function(e){return e.classList.contains(Lh)}))}}function bf(e){var t=Xh(),n=Xh();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Xh();function i(n,r){var i=yf(t),o=i.box,a=i.content,g=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||vf(a,e.props),r.arrow?g?n.arrow!==r.arrow&&(o.removeChild(g),o.appendChild(mf(r.arrow))):o.appendChild(mf(r.arrow)):g&&o.removeChild(g)}return r.className=Mh,r.setAttribute("data-state","hidden"),vf(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}bf.$$tippy=!0;var wf=1,xf=[],Ef=[];function kf(e,t){var n,r,i,o,a,g,s,l,A=ff(e,Object.assign({},uf,hf(Qh(t)))),C=!1,I=!1,c=!1,u=!1,d=[],h=Gh(Y,A.interactiveDebounce),f=wf++,p=(l=A.plugins).filter((function(e,t){return l.indexOf(e)===t})),m={id:f,reference:e,popper:Xh(),popperInstance:null,props:A,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:p,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){0;if(m.state.isDestroyed)return;D("onBeforeUpdate",[m,t]),W();var n=m.props,r=ff(e,Object.assign({},n,Qh(t),{ignoreAttributes:!0}));m.props=r,G(),n.interactiveDebounce!==r.interactiveDebounce&&(L(),h=Gh(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Wh(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");M(),_(),b&&b(n,r);m.popperInstance&&(q(),$().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[m,t])},setContent:function(e){m.setProps({content:e})},show:function(){0;var e=m.state.isVisible,t=m.state.isDestroyed,n=!m.state.isEnabled,r=gf.isTouch&&!m.props.touch,i=Vh(m.props.duration,0,uf.duration);if(e||t||n||r)return;if(T().hasAttribute("disabled"))return;if(D("onShow",[m],!1),!1===m.props.onShow(m))return;m.state.isVisible=!0,S()&&(y.style.visibility="visible");_(),z(),m.state.isMounted||(y.style.transition="none");if(S()){var o=R();tf([o.box,o.content],0)}g=function(){var e;if(m.state.isVisible&&!u){if(u=!0,y.offsetHeight,y.style.transition=m.props.moveTransition,S()&&m.props.animation){var t=R(),n=t.box,r=t.content;tf([n,r],i),nf([n,r],"visible")}P(),M(),Hh(Ef,m),null==(e=m.popperInstance)||e.forceUpdate(),D("onMount",[m]),m.props.animation&&S()&&function(e,t){U(e,t)}(i,(function(){m.state.isShown=!0,D("onShown",[m])}))}},function(){var e,t=m.props.appendTo,n=T();e=m.props.interactive&&t===zh||"parent"===t?n.parentNode:Zh(t,[n]);e.contains(y)||e.appendChild(y);m.state.isMounted=!0,q(),!1}()},hide:function(){0;var e=!m.state.isVisible,t=m.state.isDestroyed,n=!m.state.isEnabled,r=Vh(m.props.duration,1,uf.duration);if(e||t||n)return;if(D("onHide",[m],!1),!1===m.props.onHide(m))return;m.state.isVisible=!1,m.state.isShown=!1,u=!1,C=!1,S()&&(y.style.visibility="hidden");if(L(),V(),_(!0),S()){var i=R(),o=i.box,a=i.content;m.props.animation&&(tf([o,a],r),nf([o,a],"hidden"))}P(),M(),m.props.animation?S()&&function(e,t){U(e,(function(){!m.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(r,m.unmount):m.unmount()},hideWithInteractivity:function(e){0;O().addEventListener("mousemove",h),Hh(xf,h),h(e)},enable:function(){m.state.isEnabled=!0},disable:function(){m.hide(),m.state.isEnabled=!1},unmount:function(){0;m.state.isVisible&&m.hide();if(!m.state.isMounted)return;J(),$().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);Ef=Ef.filter((function(e){return e!==m})),m.state.isMounted=!1,D("onHidden",[m])},destroy:function(){0;if(m.state.isDestroyed)return;m.clearDelayTimeouts(),m.unmount(),W(),delete e._tippy,m.state.isDestroyed=!0,D("onDestroy",[m])}};if(!A.render)return m;var v=A.render(m),y=v.popper,b=v.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+m.id,m.popper=y,e._tippy=m,y._tippy=m;var w=p.map((function(e){return e.fn(m)})),x=e.hasAttribute("aria-expanded");return G(),M(),_(),D("onCreate",[m]),A.showOnCreate&&ee(),y.addEventListener("mouseenter",(function(){m.props.interactive&&m.state.isVisible&&m.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){m.props.interactive&&m.props.trigger.indexOf("mouseenter")>=0&&O().addEventListener("mousemove",h)})),m;function E(){var e=m.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function S(){var e;return!(null==(e=m.props.render)||!e.$$tippy)}function T(){return s||e}function O(){var e=T().parentNode;return e?rf(e):document}function R(){return yf(y)}function N(e){return m.state.isMounted&&!m.state.isVisible||gf.isTouch||o&&"focus"===o.type?0:Vh(m.props.delay,e?0:1,uf.delay)}function _(e){void 0===e&&(e=!1),y.style.pointerEvents=m.props.interactive&&!e?"":"none",y.style.zIndex=""+m.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),w.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=m.props)[e].apply(r,t)}function P(){var t=m.props.aria;if(t.content){var n="aria-"+t.content,r=y.id;Wh(m.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(m.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function M(){!x&&m.props.aria.expanded&&Wh(m.props.triggerTarget||e).forEach((function(e){m.props.interactive?e.setAttribute("aria-expanded",m.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function L(){O().removeEventListener("mousemove",h),xf=xf.filter((function(e){return e!==h}))}function F(t){if(!gf.isTouch||!c&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!m.props.interactive||!af(y,n)){if(Wh(m.props.triggerTarget||e).some((function(e){return af(e,n)}))){if(gf.isTouch)return;if(m.state.isVisible&&m.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[m,t]);!0===m.props.hideOnClick&&(m.clearDelayTimeouts(),m.hide(),I=!0,setTimeout((function(){I=!1})),m.state.isMounted||V())}}}function j(){c=!0}function B(){c=!1}function z(){var e=O();e.addEventListener("mousedown",F,!0),e.addEventListener("touchend",F,Bh),e.addEventListener("touchstart",B,Bh),e.addEventListener("touchmove",j,Bh)}function V(){var e=O();e.removeEventListener("mousedown",F,!0),e.removeEventListener("touchend",F,Bh),e.removeEventListener("touchstart",B,Bh),e.removeEventListener("touchmove",j,Bh)}function U(e,t){var n=R().box;function r(e){e.target===n&&(of(n,"remove",r),t())}if(0===e)return t();of(n,"remove",a),of(n,"add",r),a=r}function Z(t,n,r){void 0===r&&(r=!1),Wh(m.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),d.push({node:e,eventType:t,handler:n,options:r})}))}function G(){var e;k()&&(Z("touchstart",H,{passive:!0}),Z("touchend",K,{passive:!0})),(e=m.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(Z(e,H),e){case"mouseenter":Z("mouseleave",K);break;case"focus":Z(If?"focusout":"blur",Q);break;case"focusin":Z("focusout",Q)}}))}function W(){d.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),d=[]}function H(e){var t,n=!1;if(m.state.isEnabled&&!X(e)&&!I){var r="focus"===(null==(t=o)?void 0:t.type);o=e,s=e.currentTarget,M(),!m.state.isVisible&&Jh(e)&&xf.forEach((function(t){return t(e)})),"click"===e.type&&(m.props.trigger.indexOf("mouseenter")<0||C)&&!1!==m.props.hideOnClick&&m.state.isVisible?n=!0:ee(e),"click"===e.type&&(C=!n),n&&!r&&te(e)}}function Y(e){var t=e.target,n=T().contains(t)||y.contains(t);if("mousemove"!==e.type||!n){var r=$().concat(y).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:A}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=Yh(i.placement),g=i.modifiersData.offset;if(!g)return!0;var s="bottom"===a?g.top.y:0,l="top"===a?g.bottom.y:0,A="right"===a?g.left.x:0,C="left"===a?g.right.x:0,I=t.top-r+s>o,c=r-t.bottom-l>o,u=t.left-n+A>o,d=n-t.right-C>o;return I||c||u||d}))})(r,e)&&(L(),te(e))}}function K(e){X(e)||m.props.trigger.indexOf("click")>=0&&C||(m.props.interactive?m.hideWithInteractivity(e):te(e))}function Q(e){m.props.trigger.indexOf("focusin")<0&&e.target!==T()||m.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||te(e)}function X(e){return!!gf.isTouch&&k()!==e.type.indexOf("touch")>=0}function q(){J();var t=m.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=S()?yf(y).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:e,A={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=R().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},C=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},A];S()&&s&&C.push({name:"arrow",options:{element:s,padding:3}}),C.push.apply(C,(null==n?void 0:n.modifiers)||[]),m.popperInstance=Ph(l,y,Object.assign({},n,{placement:r,onFirstUpdate:g,modifiers:C}))}function J(){m.popperInstance&&(m.popperInstance.destroy(),m.popperInstance=null)}function $(){return Kh(y.querySelectorAll("[data-tippy-root]"))}function ee(e){m.clearDelayTimeouts(),e&&D("onTrigger",[m,e]),z();var t=N(!0),r=E(),i=r[0],o=r[1];gf.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){m.show()}),t):m.show()}function te(e){if(m.clearDelayTimeouts(),D("onUntrigger",[m,e]),m.state.isVisible){if(!(m.props.trigger.indexOf("mouseenter")>=0&&m.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&C)){var t=N(!1);t?r=setTimeout((function(){m.state.isVisible&&m.hide()}),t):i=requestAnimationFrame((function(){m.hide()}))}}else V()}}function Sf(e,t){void 0===t&&(t={});var n=uf.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",lf,Bh),window.addEventListener("blur",Cf);var r=Object.assign({},t,{plugins:n}),i=ef(e).reduce((function(e,t){var n=t&&kf(t,r);return n&&e.push(n),e}),[]);return qh(e)?i[0]:i}Sf.defaultProps=uf,Sf.setDefaultProps=function(e){Object.keys(e).forEach((function(t){uf[t]=e[t]}))},Sf.currentInput=gf;Object.assign({},uh,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Sf.setDefaultProps({render:bf});const Tf=Sf;function Of(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}var Rf="undefined"!=typeof window&&"undefined"!=typeof document;function Nf(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function _f(){return Rf&&document.createElement("div")}function Df(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!Df(e[n],t[n]))return!1}return!0}return!1}function Pf(e){var t=[];return e.forEach((function(e){t.find((function(t){return Df(e,t)}))||t.push(e)})),t}function Mf(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Pf([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var Lf=Rf?Jo.useLayoutEffect:Jo.useEffect;function Ff(e){var t=(0,Jo.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function jf(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var Bf={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||jf(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&jf(t,"remove",e.props.className)},onAfterUpdate:r}}};function zf(e){return function(t){var n=t.children,r=t.content,i=t.visible,o=t.singleton,a=t.render,g=t.reference,s=t.disabled,l=void 0!==s&&s,A=t.ignoreAttributes,C=void 0===A||A,I=(t.__source,t.__self,Of(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),c=void 0!==i,u=void 0!==o,d=(0,Jo.useState)(!1),h=d[0],f=d[1],p=(0,Jo.useState)({}),m=p[0],v=p[1],y=(0,Jo.useState)(),b=y[0],w=y[1],x=Ff((function(){return{container:_f(),renders:1}})),E=Object.assign({ignoreAttributes:C},I,{content:x.container});c&&(E.trigger="manual",E.hideOnClick=!1),u&&(l=!0);var k=E,S=E.plugins||[];a&&(k=Object.assign({},E,{plugins:u&&null!=o.data?[].concat(S,[{fn:function(){return{onTrigger:function(e,t){var n=o.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,w(n.content)}}}}]):S,render:function(){return{popper:x.container}}}));var T=[g].concat(n?[n.type]:[]);return Lf((function(){var t=g;g&&g.hasOwnProperty("current")&&(t=g.current);var n=e(t||x.ref||_f(),Object.assign({},k,{plugins:[Bf].concat(E.plugins||[])}));return x.instance=n,l&&n.disable(),i&&n.show(),u&&o.hook({instance:n,content:r,props:k,setSingletonContent:w}),f(!0),function(){n.destroy(),null==o||o.cleanup(n)}}),T),Lf((function(){var e;if(1!==x.renders){var t=x.instance;t.setProps(Mf(t.props,k)),null==(e=t.popperInstance)||e.forceUpdate(),l?t.disable():t.enable(),c&&(i?t.show():t.hide()),u&&o.hook({instance:t,content:r,props:k,setSingletonContent:w})}else x.renders++})),Lf((function(){var e;if(a){var t=x.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;m.placement===n.placement&&m.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&m.escaped===(null==r?void 0:r.hasPopperEscaped)||v({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[m.placement,m.referenceHidden,m.escaped].concat(T)),Jo.createElement(Jo.Fragment,null,n?(0,Jo.cloneElement)(n,{ref:function(e){x.ref=e,Nf(n.ref,e)}}):null,h&&(0,cu.createPortal)(a?a(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(m),b,x.instance):r,x.container))}}var Vf=function(e,t){return(0,Jo.forwardRef)((function(n,r){var i=n.children,o=Of(n,["children"]);return Jo.createElement(e,Object.assign({},t,o),i?(0,Jo.cloneElement)(i,{ref:function(e){Nf(r,e),Nf(i.ref,e)}}):null)}))};const Uf=Vf(zf(Tf)),Zf={lg:"rounded-md px-3 py-2 text-sm",md:"rounded-md px-2.5 py-1.5 text-sm",sm:"rounded px-2 py-1 text-sm",xl:"rounded-md px-3.5 py-2.5 text-sm",xs:"rounded px-2 py-1 text-xs"},Gf={lg:"rounded-md p-3",md:"rounded-md p-2.5",sm:"rounded p-2",xl:"rounded-md p-3.5",xs:"rounded p-1.5"},Wf={lg:"w-6 h-6",md:"w-5 h-5",sm:"w-4 h-4",xl:"w-7 h-7",xs:"w-3 h-3"},Hf={danger:"bg-red-500 hover:bg-red-700 text-white",light:"bg-white border-2 border-gray-400 text-gray-500 hover:border-gray-600 hover:text-gray-700",link:"text-gray-500 hover:text-red-500",linkBlue:"text-blue-500 hover:text-blue-700",muted:"bg-gray-400 text-white hover:bg-gray-500",mutedHoverPrimary:"bg-gray-400 text-white hover:bg-[#548a6a]",none:"text-white",primary:"bg-[#548a6a] hover:bg-[#406a4c] text-white",submit:"bg-blue-500 hover:bg-blue-700 text-white"},Yf=e=>{let{size:t="md",variant:n="primary",onClick:r,classNames:i="",Icon:o,Image:a,imageAlt:g="",iconLocation:s="left",iconOnly:l=!1,tooltipText:A,expandOnHover:C=!1,children:I}=e;const c=l?Gf[t]:Zf[t],u=Hf[n];return l||C?Jo.createElement(Uf,{content:A,disabled:!A},Jo.createElement("button",{"aria-label":I?I.toString():"",className:ZI()("flex items-center justify-center group transition-all duration-700 overflow-hidden",c,u,i,C&&"w-auto min-w-[2.5rem] max-w-fit px-2 group-hover:px-4"),onClick:r,style:{transition:"width 0.7s ease, padding 0.7s ease"},type:"button"},o&&Jo.createElement(o,{className:ZI()(Wf[t],"group-hover:mr-2 transition-all duration-200")}),Jo.createElement("span",{className:ZI()("transition-opacity duration-700 opacity-0 group-hover:opacity-100 whitespace-nowrap",C&&"hidden group-hover:inline")},I))):Jo.createElement("button",{className:ZI()("flex gap-2 font-semibold h-min whitespace-nowrap items-center",c,u,i),onClick:r,type:"button"},o&&"left"===s&&Jo.createElement(o,{className:"w-4 h-4"}),a&&"left"===s&&Jo.createElement("img",{alt:g,className:"h-5 w-fit",src:a}),Jo.createElement("span",null,I),o&&"right"===s&&Jo.createElement(o,{className:"w-4 h-4"}),a&&"right"===s&&Jo.createElement("img",{alt:g,className:"h-5 w-fit",src:a}))};function Kf({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const Qf=Jo.forwardRef(Kf);function Xf({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const qf=Jo.forwardRef(Xf),Jf={danger:Jo.createElement(Qf,{"aria-hidden":"true",className:"w-6 h-6 text-red-600"}),info:Jo.createElement(qf,{"aria-hidden":"true",className:"w-6 h-6 text-blue-600"}),warning:Jo.createElement(Qf,{"aria-hidden":"true",className:"w-6 h-6 text-yellow-500"})},$f=e=>{let{open:t,setOpen:n,title:r,submitButtonText:i,onSubmit:o=()=>{},type:a="danger",buttons:g,bgOpacity:s="bg-opacity-75",backdropBlur:l,disabled:A=!1,onlyCancelButton:C=!1,children:I}=e;const c=(0,Jo.useRef)(null),u=Jo.createElement("div",{className:"w-full mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},!C&&Jo.createElement("button",{className:ZI()("inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm sm:ml-3 sm:w-auto",{"bg-red-500 hover:bg-red-700":"danger"===a,"bg-slate-500 hover:bg-slate-600":"danger"!==a}),disabled:A,onClick:()=>{o(),n(!1)},type:"button"},i),Jo.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:()=>n(!1),ref:c,type:"button"},"Cancel"));return Jo.createElement(zc.Root,{as:Jo.Fragment,show:t},Jo.createElement(cd,{as:"div",className:"relative",initialFocus:c,onClose:()=>n(!1)},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Jo.createElement("div",{className:ZI()("fixed inset-0 z-50 transition-opacity bg-gray-500",s,l)})),Jo.createElement("div",{className:"fixed inset-0 z-50 overflow-y-auto"},Jo.createElement("div",{className:"flex items-end justify-center w-full min-h-full p-4 text-center sm:items-center sm:p-0"},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Jo.createElement(cd.Panel,{className:"relative px-4 pt-5 pb-4 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:w-full sm:max-w-lg md:max-w-2xl sm:p-6"},Jo.createElement("div",{className:"w-full sm:flex sm:items-start"},Jo.createElement("div",{className:ZI()("flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto rounded-full sm:mx-0 sm:h-10 sm:w-10",{"bg-blue-100":"info"===a,"bg-red-100":"danger"===a,"bg-yellow-100":"warning"===a})},Jf[a]),Jo.createElement("div",{className:"w-full mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left"},Jo.createElement(cd.Title,{as:"h3",className:"text-base font-semibold leading-6 text-gray-900"},r),Jo.createElement("div",{className:"w-full mt-2"},Jo.createElement("p",{className:"text-sm text-gray-500"},I)))),g||u))))))},ep=()=>{window.location.href=`${window.location.origin}/support/`},tp=e=>{let{open:t,onClickSupport:n=()=>ep(),onClickCancel:r,title:i="This is a feature for our subscribers",message:o="BOM Squad depends on our the support of our subscribers to keep our servers online. Please help support the project and get access to version history."}=e;return Jo.createElement($f,{open:t,title:i,type:"info",backdropBlur:"backdrop-blur-sm",buttons:Jo.createElement("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},Jo.createElement("button",{type:"button",className:"inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm bg-slate-500 hover:bg-slate-600 sm:ml-3 sm:w-auto",onClick:n},"Support"),Jo.createElement("button",{type:"button",className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:r},"Cancel"))},o)};function np({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{fillRule:"evenodd",d:"M16.72 7.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1 0 1.06l-3.75 3.75a.75.75 0 1 1-1.06-1.06l2.47-2.47H3a.75.75 0 0 1 0-1.5h16.19l-2.47-2.47a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const rp=Jo.forwardRef(np),ip=e=>{let{color:t="bg-slate-500",border:n="border-slate-500",textColor:r="text-white",textSize:i="text-xs",showArrow:o=!0,showXMark:a=!0,onClick:g,children:s}=e;return Jo.createElement("li",{className:"flex my-0.5"},Jo.createElement("div",{className:ZI()("flex pt-1 pb-1 pl-2 pr-2 no-underline rounded-full font-sans font-semibold btn-primary",n,t,r,i)},s),o&&Jo.createElement("div",{className:"flex flex-col justify-center h-full"},Jo.createElement(rp,{className:"w-5 h-5"})))},op=e=>{var t;let{row:n,pointerEvents:r}=e;const i=null!==(t=null==n?void 0:n.locations)&&void 0!==t?t:[];return Jo.createElement("div",{className:ZI()("flex",r)},i.length>0?i.map(((e,t)=>Jo.createElement(ip,{border:"border-1",color:"bg-white",key:t,showArrow:t!==i.length-1,showXMark:!1,textColor:"text-slate-500"},e))):Jo.createElement("span",{className:"font-mono"},"[no location specified]"))},ap=e=>{let{data:t,onRowClicked:n,pointerEvents:r="pointer-events-auto"}=e;const i=[{cell:e=>Jo.createElement(op,{pointerEvents:r,row:e}),grow:3,name:"Location",pointerOnHover:!0,sortable:!1,wrap:!1},{maxWidth:"50px",name:"Quantity",pointerOnHover:!0,selector:e=>e.quantity,sortable:!1,wrap:!1}];return Jo.createElement(VI.Ay,{columns:i,data:t,dense:!0,highlightOnHover:!0,noHeader:!0,onRowClicked:n})};var gp=n(1099),sp=n.n(gp);function lp({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const Ap=Jo.forwardRef(lp),Cp=e=>{let{locationArray:t,submitLocationChange:n,showSeparateLocationsWithCommas:r=!0}=e;const[i,o]=(0,Jo.useState)([]),[a,g]=(0,Jo.useState)(!0);(0,Jo.useEffect)((()=>{t.length>0&&(o(t.join(", ")),g(!1))}),[t]);return Jo.createElement("div",{className:"flex justify-between w-full"},a?Jo.createElement("div",{className:"flex flex-col"},Jo.createElement("div",{className:"flex gap-1.5 pb-1 pt-2"},Jo.createElement("form",{className:"flex content-center w-full gap-1 align-middle"},Jo.createElement("input",{className:"block w-full rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>o(e.target.value),type:"text",value:i}),Jo.createElement(Yf,{onClick:()=>{o([]),n([]),g(!1)},variant:"muted"},"Cancel"),Jo.createElement(Yf,{onClick:e=>{e.preventDefault();const t=i.split(",").map((e=>e.trim())).filter((e=>e));t.length>0?n(t):n([]),g(!1)},type:"submit",variant:"primary"},"Update"))),r&&Jo.createElement("p",{className:"text-xs text-gray-500"},"Separate locations with commas.")):Jo.createElement("ul",{className:"flex flex-wrap w-full"},(null!=t?t:[]).length?t.map(((e,n)=>Jo.createElement(ip,{key:n,onClick:()=>{},showArrow:n!==t.length-1,textSize:"text-xs"},e))):"-"),!a&&Jo.createElement("div",{className:"flex flex-col justify-center",onClick:()=>{g(!0)},role:"button"},Jo.createElement(Ap,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};var Ip=class extends hI{#f;#p=void 0;#m;#v;constructor(e,t){super(),this.#f=e,this.setOptions(t),this.bindMethods(),this.#y()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.#f.defaultMutationOptions(e),aI(this.options,n)||this.#f.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#m,observer:this}),null!=n&&n.mutationKey&&this.options.mutationKey&&rI(n.mutationKey)!==rI(this.options.mutationKey)?this.reset():"pending"===(null===(t=this.#m)||void 0===t?void 0:t.state.status)&&this.#m.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=this.#m)||void 0===e||e.removeObserver(this))}onMutationUpdate(e){this.#y(),this.#b(e)}getCurrentResult(){return this.#p}reset(){var e;null===(e=this.#m)||void 0===e||e.removeObserver(this),this.#m=void 0,this.#y(),this.#b()}mutate(e,t){var n;return this.#v=t,null===(n=this.#m)||void 0===n||n.removeObserver(this),this.#m=this.#f.getMutationCache().build(this.#f,this.options),this.#m.addObserver(this),this.#m.execute(e)}#y(){var e,t;const n=null!==(e=null===(t=this.#m)||void 0===t?void 0:t.state)&&void 0!==e?e:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#p={...n,isPending:"pending"===n.status,isSuccess:"success"===n.status,isError:"error"===n.status,isIdle:"idle"===n.status,mutate:this.mutate,reset:this.reset}}#b(e){dI.batch((()=>{if(this.#v&&this.hasListeners()){const l=this.#p.variables,A=this.#p.context;var t,n,r,i;if("success"===(null==e?void 0:e.type))null===(t=(n=this.#v).onSuccess)||void 0===t||t.call(n,e.data,l,A),null===(r=(i=this.#v).onSettled)||void 0===r||r.call(i,e.data,null,l,A);else if("error"===(null==e?void 0:e.type)){var o,a,g,s;null===(o=(a=this.#v).onError)||void 0===o||o.call(a,e.error,l,A),null===(g=(s=this.#v).onSettled)||void 0===g||g.call(s,void 0,e.error,l,A)}}this.listeners.forEach((e=>{e(this.#p)}))}))}};function cp(e,t){return"function"==typeof e?e(...t):!!e}function up(){}function dp(e,t){const n=BI(t),[r]=Jo.useState((()=>new Ip(n,e)));Jo.useEffect((()=>{r.setOptions(e)}),[r,e]);const i=Jo.useSyncExternalStore(Jo.useCallback((e=>r.subscribe(dI.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),o=Jo.useCallback(((e,t)=>{r.mutate(e,t).catch(up)}),[r]);if(i.error&&cp(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function hp(e){for(var t=1;t{const t=mp.call(e);return bp[t]||(bp[t]=t.slice(8,-1).toLowerCase())});var bp;const wp=e=>(e=e.toLowerCase(),t=>yp(t)===e),xp=e=>t=>typeof t===e,{isArray:Ep}=Array,kp=xp("undefined");const Sp=wp("ArrayBuffer");const Tp=xp("string"),Op=xp("function"),Rp=xp("number"),Np=e=>null!==e&&"object"==typeof e,_p=e=>{if("object"!==yp(e))return!1;const t=vp(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Dp=wp("Date"),Pp=wp("File"),Mp=wp("Blob"),Lp=wp("FileList"),Fp=wp("URLSearchParams"),[jp,Bp,zp,Vp]=["ReadableStream","Request","Response","Headers"].map(wp);function Up(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),Ep(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const Gp="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Wp=e=>!kp(e)&&e!==Gp;const Hp=(Yp="undefined"!=typeof Uint8Array&&vp(Uint8Array),e=>Yp&&e instanceof Yp);var Yp;const Kp=wp("HTMLFormElement"),Qp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xp=wp("RegExp"),qp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Up(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},Jp="abcdefghijklmnopqrstuvwxyz",$p="0123456789",em={DIGIT:$p,ALPHA:Jp,ALPHA_DIGIT:Jp+Jp.toUpperCase()+$p};const tm=wp("AsyncFunction"),nm=(rm="function"==typeof setImmediate,im=Op(Gp.postMessage),rm?setImmediate:im?((e,t)=>(Gp.addEventListener("message",(({source:n,data:r})=>{n===Gp&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Gp.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var rm,im;const om="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Gp):"undefined"!=typeof process&&process.nextTick||nm,am={isArray:Ep,isArrayBuffer:Sp,isBuffer:function(e){return null!==e&&!kp(e)&&null!==e.constructor&&!kp(e.constructor)&&Op(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Op(e.append)&&("formdata"===(t=yp(e))||"object"===t&&Op(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Sp(e.buffer),t},isString:Tp,isNumber:Rp,isBoolean:e=>!0===e||!1===e,isObject:Np,isPlainObject:_p,isReadableStream:jp,isRequest:Bp,isResponse:zp,isHeaders:Vp,isUndefined:kp,isDate:Dp,isFile:Pp,isBlob:Mp,isRegExp:Xp,isFunction:Op,isStream:e=>Np(e)&&Op(e.pipe),isURLSearchParams:Fp,isTypedArray:Hp,isFileList:Lp,forEach:Up,merge:function e(){const{caseless:t}=Wp(this)&&this||{},n={},r=(r,i)=>{const o=t&&Zp(n,i)||i;_p(n[o])&&_p(r)?n[o]=e(n[o],r):_p(r)?n[o]=e({},r):Ep(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(Up(t,((t,r)=>{n&&Op(t)?e[r]=pp(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const g={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||g[a]||(t[a]=e[a],g[a]=!0);e=!1!==n&&vp(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:yp,kindOfTest:wp,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Ep(e))return e;let t=e.length;if(!Rp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Kp,hasOwnProperty:Qp,hasOwnProp:Qp,reduceDescriptors:qp,freezeMethods:e=>{qp(e,((t,n)=>{if(Op(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Op(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Ep(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Zp,global:Gp,isContextDefined:Wp,ALPHABET:em,generateString:(e=16,t=em.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Op(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Np(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=Ep(e)?[]:{};return Up(e,((e,t)=>{const o=n(e,r+1);!kp(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:tm,isThenable:e=>e&&(Np(e)||Op(e))&&Op(e.then)&&Op(e.catch),setImmediate:nm,asap:om};function gm(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}am.inherits(gm,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:am.toJSONObject(this.config),code:this.code,status:this.status}}});const sm=gm.prototype,lm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{lm[e]={value:e}})),Object.defineProperties(gm,lm),Object.defineProperty(sm,"isAxiosError",{value:!0}),gm.from=(e,t,n,r,i,o)=>{const a=Object.create(sm);return am.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),gm.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Am=gm;function Cm(e){return am.isPlainObject(e)||am.isArray(e)}function Im(e){return am.endsWith(e,"[]")?e.slice(0,-2):e}function cm(e,t,n){return e?e.concat(t).map((function(e,t){return e=Im(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const um=am.toFlatObject(am,{},null,(function(e){return/^is[A-Z]/.test(e)}));const dm=function(e,t,n){if(!am.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=am.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!am.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,g=(n.Blob||"undefined"!=typeof Blob&&Blob)&&am.isSpecCompliantForm(t);if(!am.isFunction(i))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(am.isDate(e))return e.toISOString();if(!g&&am.isBlob(e))throw new Am("Blob is not supported. Use a Buffer instead.");return am.isArrayBuffer(e)||am.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let g=e;if(e&&!i&&"object"==typeof e)if(am.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(am.isArray(e)&&function(e){return am.isArray(e)&&!e.some(Cm)}(e)||(am.isFileList(e)||am.endsWith(n,"[]"))&&(g=am.toArray(e)))return n=Im(n),g.forEach((function(e,r){!am.isUndefined(e)&&null!==e&&t.append(!0===a?cm([n],r,o):null===a?n:n+"[]",s(e))})),!1;return!!Cm(e)||(t.append(cm(i,n,o),s(e)),!1)}const A=[],C=Object.assign(um,{defaultVisitor:l,convertValue:s,isVisitable:Cm});if(!am.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!am.isUndefined(n)){if(-1!==A.indexOf(n))throw Error("Circular reference detected in "+r.join("."));A.push(n),am.forEach(n,(function(n,o){!0===(!(am.isUndefined(n)||null===n)&&i.call(t,n,am.isString(o)?o.trim():o,r,C))&&e(n,r?r.concat(o):[o])})),A.pop()}}(e),t};function hm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function fm(e,t){this._pairs=[],e&&dm(e,this,t)}const pm=fm.prototype;pm.append=function(e,t){this._pairs.push([e,t])},pm.toString=function(e){const t=e?function(t){return e.call(this,t,hm)}:hm;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const mm=fm;function vm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ym(e,t,n){if(!t)return e;const r=n&&n.encode||vm,i=n&&n.serialize;let o;if(o=i?i(t,n):am.isURLSearchParams(t)?t.toString():new mm(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const bm=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){am.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},wm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xm={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mm,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Em="undefined"!=typeof window&&"undefined"!=typeof document,km="object"==typeof navigator&&navigator||void 0,Sm=Em&&(!km||["ReactNative","NativeScript","NS"].indexOf(km.product)<0),Tm="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Om=Em&&window.location.href||"http://localhost",Rm={...r,...xm};const Nm=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),g=i>=e.length;if(o=!o&&am.isArray(r)?r.length:o,g)return am.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&am.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&am.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return am.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const _m={transitional:wm,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=am.isObject(e);i&&am.isHTMLForm(e)&&(e=new FormData(e));if(am.isFormData(e))return r?JSON.stringify(Nm(e)):e;if(am.isArrayBuffer(e)||am.isBuffer(e)||am.isStream(e)||am.isFile(e)||am.isBlob(e)||am.isReadableStream(e))return e;if(am.isArrayBufferView(e))return e.buffer;if(am.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return dm(e,new Rm.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Rm.isNode&&am.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=am.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return dm(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(am.isString(e))try{return(t||JSON.parse)(e),am.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_m.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(am.isResponse(e)||am.isReadableStream(e))return e;if(e&&am.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Am.from(e,Am.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rm.classes.FormData,Blob:Rm.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};am.forEach(["delete","get","head","post","put","patch"],(e=>{_m.headers[e]={}}));const Dm=_m,Pm=am.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mm=Symbol("internals");function Lm(e){return e&&String(e).trim().toLowerCase()}function Fm(e){return!1===e||null==e?e:am.isArray(e)?e.map(Fm):String(e)}function jm(e,t,n,r,i){return am.isFunction(r)?r.call(this,t,n):(i&&(t=n),am.isString(t)?am.isString(r)?-1!==t.indexOf(r):am.isRegExp(r)?r.test(t):void 0:void 0)}class Bm{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Lm(t);if(!i)throw new Error("header name must be a non-empty string");const o=am.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Fm(e))}const o=(e,t)=>am.forEach(e,((e,n)=>i(e,n,t)));if(am.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(am.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Pm[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(am.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Lm(e)){const n=am.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(am.isFunction(t))return t.call(this,e,n);if(am.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Lm(e)){const n=am.findKey(this,e);return!(!n||void 0===this[n]||t&&!jm(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Lm(e)){const i=am.findKey(n,e);!i||t&&!jm(0,n[i],i,t)||(delete n[i],r=!0)}}return am.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!jm(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return am.forEach(this,((r,i)=>{const o=am.findKey(n,i);if(o)return t[o]=Fm(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=Fm(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return am.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&am.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Mm]=this[Mm]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Lm(e);t[r]||(!function(e,t){const n=am.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return am.isArray(e)?e.forEach(r):r(e),this}}Bm.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),am.reduceDescriptors(Bm.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),am.freezeMethods(Bm);const zm=Bm;function Vm(e,t){const n=this||Dm,r=t||n,i=zm.from(r.headers);let o=r.data;return am.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Um(e){return!(!e||!e.__CANCEL__)}function Zm(e,t,n){Am.call(this,null==e?"canceled":e,Am.ERR_CANCELED,t,n),this.name="CanceledError"}am.inherits(Zm,Am,{__CANCEL__:!0});const Gm=Zm;function Wm(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Am("Request failed with status code "+n.status,[Am.ERR_BAD_REQUEST,Am.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Hm=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(g){const s=Date.now(),l=r[a];i||(i=s),n[o]=g,r[o]=s;let A=a,C=0;for(;A!==o;)C+=n[A++],A%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),s-i{i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),g=t-i;g>=o?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),o-g)))},()=>n&&a(n)]},Km=(e,t,n=3)=>{let r=0;const i=Hm(50,250);return Ym((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,g=o-r,s=i(g);r=o;e({loaded:o,total:a,progress:a?o/a:void 0,bytes:g,rate:s||void 0,estimated:s&&a&&o<=a?(a-o)/s:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Qm=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Xm=e=>(...t)=>am.asap((()=>e(...t))),qm=Rm.hasStandardBrowserEnv?function(){const e=Rm.navigator&&/(msie|trident)/i.test(Rm.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=am.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Jm=Rm.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];am.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),am.isString(r)&&a.push("path="+r),am.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function $m(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ev=e=>e instanceof zm?{...e}:e;function tv(e,t){t=t||{};const n={};function r(e,t,n){return am.isPlainObject(e)&&am.isPlainObject(t)?am.merge.call({caseless:n},e,t):am.isPlainObject(t)?am.merge({},t):am.isArray(t)?t.slice():t}function i(e,t,n){return am.isUndefined(t)?am.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!am.isUndefined(t))return r(void 0,t)}function a(e,t){return am.isUndefined(t)?am.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function g(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:g,headers:(e,t)=>i(ev(e),ev(t),!0)};return am.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=s[r]||i,a=o(e[r],t[r],r);am.isUndefined(a)&&o!==g||(n[r]=a)})),n}const nv=e=>{const t=tv({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:g,auth:s}=t;if(t.headers=g=zm.from(g),t.url=ym($m(t.baseURL,t.url),e.params,e.paramsSerializer),s&&g.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),am.isFormData(r))if(Rm.hasStandardBrowserEnv||Rm.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(!1!==(n=g.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];g.setContentType([e||"multipart/form-data",...t].join("; "))}if(Rm.hasStandardBrowserEnv&&(i&&am.isFunction(i)&&(i=i(t)),i||!1!==i&&qm(t.url))){const e=o&&a&&Jm.read(a);e&&g.set(o,e)}return t},rv="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=nv(e);let i=r.data;const o=zm.from(r.headers).normalize();let a,g,s,l,A,{responseType:C,onUploadProgress:I,onDownloadProgress:c}=r;function u(){l&&l(),A&&A(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let d=new XMLHttpRequest;function h(){if(!d)return;const r=zm.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());Wm((function(e){t(e),u()}),(function(e){n(e),u()}),{data:C&&"text"!==C&&"json"!==C?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d}),d=null}d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(n(new Am("Request aborted",Am.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new Am("Network Error",Am.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||wm;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Am(t,i.clarifyTimeoutError?Am.ETIMEDOUT:Am.ECONNABORTED,e,d)),d=null},void 0===i&&o.setContentType(null),"setRequestHeader"in d&&am.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),am.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),C&&"json"!==C&&(d.responseType=r.responseType),c&&([s,A]=Km(c,!0),d.addEventListener("progress",s)),I&&d.upload&&([g,l]=Km(I),d.upload.addEventListener("progress",g),d.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(a=t=>{d&&(n(!t||t.type?new Gm(null,e,d):t),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);f&&-1===Rm.protocols.indexOf(f)?n(new Am("Unsupported protocol "+f+":",Am.ERR_BAD_REQUEST,e)):d.send(i||null)}))},iv=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Am?t:new Gm(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new Am(`timeout ${t} of ms exceeded`,Am.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:g}=r;return g.unsubscribe=()=>am.asap(a),g}},ov=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of av(e))yield*ov(n,t)}(e,t);let o,a=0,g=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return g(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw g(e),e}},cancel:e=>(g(e),i.return())},{highWaterMark:2})},sv="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,lv=sv&&"function"==typeof ReadableStream,Av=sv&&("function"==typeof TextEncoder?(Cv=new TextEncoder,e=>Cv.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Cv;const Iv=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},cv=lv&&Iv((()=>{let e=!1;const t=new Request(Rm.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),uv=lv&&Iv((()=>am.isReadableStream(new Response("").body))),dv={stream:uv&&(e=>e.body)};var hv;sv&&(hv=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!dv[e]&&(dv[e]=am.isFunction(hv[e])?t=>t[e]():(t,n)=>{throw new Am(`Response type '${e}' is not supported`,Am.ERR_NOT_SUPPORT,n)})})));const fv=async(e,t)=>{const n=am.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(am.isBlob(e))return e.size;if(am.isSpecCompliantForm(e)){const t=new Request(Rm.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return am.isArrayBufferView(e)||am.isArrayBuffer(e)?e.byteLength:(am.isURLSearchParams(e)&&(e+=""),am.isString(e)?(await Av(e)).byteLength:void 0)})(t):n},pv=sv&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:g,onUploadProgress:s,responseType:l,headers:A,withCredentials:C="same-origin",fetchOptions:I}=nv(e);l=l?(l+"").toLowerCase():"text";let c,u=iv([i,o&&o.toAbortSignal()],a);const d=u&&u.unsubscribe&&(()=>{u.unsubscribe()});let h;try{if(s&&cv&&"get"!==n&&"head"!==n&&0!==(h=await fv(A,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(am.isFormData(r)&&(e=n.headers.get("content-type"))&&A.setContentType(e),n.body){const[e,t]=Qm(h,Km(Xm(s)));r=gv(n.body,65536,e,t)}}am.isString(C)||(C=C?"include":"omit");const i="credentials"in Request.prototype;c=new Request(t,{...I,signal:u,method:n.toUpperCase(),headers:A.normalize().toJSON(),body:r,duplex:"half",credentials:i?C:void 0});let o=await fetch(c);const a=uv&&("stream"===l||"response"===l);if(uv&&(g||a&&d)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=am.toFiniteNumber(o.headers.get("content-length")),[n,r]=g&&Qm(t,Km(Xm(g),!0))||[];o=new Response(gv(o.body,65536,n,(()=>{r&&r(),d&&d()})),e)}l=l||"text";let f=await dv[am.findKey(dv,l)||"text"](o,e);return!a&&d&&d(),await new Promise(((t,n)=>{Wm(t,n,{data:f,headers:zm.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:c})}))}catch(t){if(d&&d(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Am("Network Error",Am.ERR_NETWORK,e,c),{cause:t.cause||t});throw Am.from(t,t&&t.code,e,c)}}),mv={http:null,xhr:rv,fetch:pv};am.forEach(mv,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const vv=e=>`- ${e}`,yv=e=>am.isFunction(e)||null===e||!1===e,bv=e=>{e=am.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(vv).join("\n"):" "+vv(e[0]):"as no adapter specified";throw new Am("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function wv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gm(null,e)}function xv(e){wv(e),e.headers=zm.from(e.headers),e.data=Vm.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return bv(e.adapter||Dm.adapter)(e).then((function(t){return wv(e),t.data=Vm.call(e,e.transformResponse,t),t.headers=zm.from(t.headers),t}),(function(t){return Um(t)||(wv(e),t&&t.response&&(t.response.data=Vm.call(e,e.transformResponse,t.response),t.response.headers=zm.from(t.response.headers))),Promise.reject(t)}))}const Ev="1.7.7",kv={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{kv[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Sv={};kv.transitional=function(e,t,n){return(r,i,o)=>{if(!1===e)throw new Am(function(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}(i," has been removed"+(t?" in "+t:"")),Am.ERR_DEPRECATED);return t&&!Sv[i]&&(Sv[i]=!0),!e||e(r,i,o)}};const Tv={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Am("options must be an object",Am.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Am("option "+o+" must be "+n,Am.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Am("Unknown option "+o,Am.ERR_BAD_OPTION)}},validators:kv},Ov=Tv.validators;class Rv{constructor(e){this.defaults=e,this.interceptors={request:new bm,response:new bm}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=tv(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Tv.assertOptions(n,{silentJSONParsing:Ov.transitional(Ov.boolean),forcedJSONParsing:Ov.transitional(Ov.boolean),clarifyTimeoutError:Ov.transitional(Ov.boolean)},!1),null!=r&&(am.isFunction(r)?t.paramsSerializer={serialize:r}:Tv.assertOptions(r,{encode:Ov.function,serialize:Ov.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&am.merge(i.common,i[t.method]);i&&am.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=zm.concat(o,i);const a=[];let g=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(g=g&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let l;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let A,C=0;if(!g){const e=[xv.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),A=e.length,l=Promise.resolve(t);C{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Gm(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new _v((function(t){e=t}));return{token:t,cancel:e}}}const Dv=_v;const Pv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pv).forEach((([e,t])=>{Pv[t]=e}));const Mv=Pv;const Lv=function e(t){const n=new Nv(t),r=pp(Nv.prototype.request,n);return am.extend(r,Nv.prototype,n,{allOwnKeys:!0}),am.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(tv(t,n))},r}(Dm);Lv.Axios=Nv,Lv.CanceledError=Gm,Lv.CancelToken=Dv,Lv.isCancel=Um,Lv.VERSION=Ev,Lv.toFormData=dm,Lv.AxiosError=Am,Lv.Cancel=Lv.CanceledError,Lv.all=function(e){return Promise.all(e)},Lv.spread=function(e){return function(t){return e.apply(null,t)}},Lv.isAxiosError=function(e){return am.isObject(e)&&!0===e.isAxiosError},Lv.mergeConfig=tv,Lv.AxiosHeaders=zm,Lv.formToJSON=e=>Nm(am.isHTMLForm(e)?new FormData(e):e),Lv.getAdapter=bv,Lv.HttpStatusCode=Mv,Lv.default=Lv;const Fv=Lv,jv=e=>{try{return null==e?void 0:e.split("_")[0]}catch{}},Bv=()=>{const e=fp.get("csrftoken"),t=BI(),n=dp({mutationFn:t=>{let{componentId:n,quantity:r,editMode:i}=t;const o=jv(n);return Fv.post(`/api/shopping-list/${o}/anonymous-create-or-update/`,{quantity:r,editMode:i},{headers:{"X-CSRFToken":e},withCredentials:!0})},onSuccess:()=>{t.invalidateQueries(["shoppingList"])}});return n},zv=()=>{const e=fp.get("csrftoken")||"",t=BI(),n=dp({mutationFn:t=>{let{componentId:n,data:r}=t;const i=jv(n);return Fv.post(`/api/inventory/${i}/create-or-update/`,r,{headers:{"X-CSRFToken":e},withCredentials:!0})},onSuccess:()=>{t.invalidateQueries({queryKey:["inventory"]}),t.invalidateQueries({queryKey:["authenticatedUserHistory"]})}});return n},Vv=()=>{const e=fp.get("csrftoken"),t=BI(),n=dp({mutationFn:t=>{let{componentId:n,...r}=t;const i=jv(r.modulebomlistitem_pk),o=jv(n);return Fv.post(`/api/shopping-list/${o}/create-or-update/`,{...r,modulebomlistitem_pk:i},{headers:{"X-CSRFToken":e},withCredentials:!0})},onSuccess:()=>{t.invalidateQueries(["shoppingList"])}});return n};var Uv=class extends hI{constructor(e,t){super(),this.options=t,this.#f=e,this.#w=null,this.#x=mI(),this.options.experimental_prefetchInRender||this.#x.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#f;#E=void 0;#k=void 0;#p=void 0;#S;#T;#x;#w;#O;#R;#N;#_;#D;#P;#M=(()=>new Set)();bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#E.addObserver(this),Zv(this.#E,this.options)?this.#L():this.updateResult(),this.#F())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gv(this.#E,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gv(this.#E,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#j(),this.#B(),this.#E.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#E;if(this.options=this.#f.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof $C(this.options.enabled,this.#E))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#z(),this.#E.setOptions(this.options),n._defaulted&&!aI(this.options,n)&&this.#f.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#E,observer:this});const i=this.hasListeners();i&&Wv(this.#E,r,this.options,n)&&this.#L(),this.updateResult(t),!i||this.#E===r&&$C(this.options.enabled,this.#E)===$C(n.enabled,this.#E)&&JC(this.options.staleTime,this.#E)===JC(n.staleTime,this.#E)||this.#V();const o=this.#U();!i||this.#E===r&&$C(this.options.enabled,this.#E)===$C(n.enabled,this.#E)&&o===this.#P||this.#Z(o)}getOptimisticResult(e){const t=this.#f.getQueryCache().build(this.#f,e),n=this.createResult(t,e);return function(e,t){if(!aI(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#p=n,this.#T=this.options,this.#S=this.#E.state),n}getCurrentResult(){return this.#p}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),null==t||t(r),e[r])})})),n}trackProp(e){this.#M.add(e)}getCurrentQuery(){return this.#E}refetch(){let{...e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...e})}fetchOptimistic(e){const t=this.#f.defaultQueryOptions(e),n=this.#f.getQueryCache().build(this.#f,t);return n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.#L({...e,cancelRefetch:null===(t=e.cancelRefetch)||void 0===t||t}).then((()=>(this.updateResult(),this.#p)))}#L(e){this.#z();let t=this.#E.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(QC)),t}#V(){this.#j();const e=JC(this.options.staleTime,this.#E);if(KC||this.#p.isStale||!XC(e))return;const t=qC(this.#p.dataUpdatedAt,e)+1;this.#_=setTimeout((()=>{this.#p.isStale||this.updateResult()}),t)}#U(){var e;return null!==(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#E):this.options.refetchInterval)&&void 0!==e&&e}#Z(e){this.#B(),this.#P=e,!KC&&!1!==$C(this.options.enabled,this.#E)&&XC(this.#P)&&0!==this.#P&&(this.#D=setInterval((()=>{(this.options.refetchIntervalInBackground||fI.isFocused())&&this.#L()}),this.#P))}#F(){this.#V(),this.#Z(this.#U())}#j(){this.#_&&(clearTimeout(this.#_),this.#_=void 0)}#B(){this.#D&&(clearInterval(this.#D),this.#D=void 0)}createResult(e,t){const n=this.#E,r=this.options,i=this.#p,o=this.#S,a=this.#T,g=e!==n?e.state:this.#k,{state:s}=e;let l,A={...s},C=!1;if(t._optimisticResults){const i=this.hasListeners(),o=!i&&Zv(e,t),a=i&&Wv(e,n,t,r);(o||a)&&(A={...A,...SI(s.data,e.options)}),"isRestoring"===t._optimisticResults&&(A.fetchStatus="idle")}let{error:I,errorUpdatedAt:c,status:u}=A;if(t.select&&void 0!==A.data)if(i&&A.data===(null==o?void 0:o.data)&&t.select===this.#O)l=this.#R;else try{this.#O=t.select,l=t.select(A.data),l=AI(null==i?void 0:i.data,l,t),this.#R=l,this.#w=null}catch(e){this.#w=e}else l=A.data;if(void 0!==t.placeholderData&&void 0===l&&"pending"===u){let e;var d;if(null!=i&&i.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null===(d=this.#N)||void 0===d?void 0:d.state.data,this.#N):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#w=null}catch(e){this.#w=e}void 0!==e&&(u="success",l=AI(null==i?void 0:i.data,e,t),C=!0)}this.#w&&(I=this.#w,l=this.#R,c=Date.now(),u="error");const h="fetching"===A.fetchStatus,f="pending"===u,p="error"===u,m=f&&h,v=void 0!==l,y={status:u,fetchStatus:A.fetchStatus,isPending:f,isSuccess:"success"===u,isError:p,isInitialLoading:m,isLoading:m,data:l,dataUpdatedAt:A.dataUpdatedAt,error:I,errorUpdatedAt:c,failureCount:A.fetchFailureCount,failureReason:A.fetchFailureReason,errorUpdateCount:A.errorUpdateCount,isFetched:A.dataUpdateCount>0||A.errorUpdateCount>0,isFetchedAfterMount:A.dataUpdateCount>g.dataUpdateCount||A.errorUpdateCount>g.errorUpdateCount,isFetching:h,isRefetching:h&&!f,isLoadingError:p&&!v,isPaused:"paused"===A.fetchStatus,isPlaceholderData:C,isRefetchError:p&&v,isStale:Hv(e,t),refetch:this.refetch,promise:this.#x};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===y.status?e.reject(y.error):void 0!==y.data&&e.resolve(y.data)},r=()=>{const e=this.#x=y.promise=mI();t(e)},i=this.#x;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==y.status&&y.data===i.value||r();break;case"rejected":"error"===y.status&&y.error===i.reason||r()}}return y}updateResult(e){const t=this.#p,n=this.createResult(this.#E,this.options);if(this.#S=this.#E.state,this.#T=this.options,void 0!==this.#S.data&&(this.#N=this.#E),aI(n,t))return;this.#p=n;const r={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#M.size)return!0;const r=new Set(null!=n?n:this.#M);return this.options.throwOnError&&r.add("error"),Object.keys(this.#p).some((e=>{const n=e;return this.#p[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),this.#b({...r,...e})}#z(){const e=this.#f.getQueryCache().build(this.#f,this.options);if(e===this.#E)return;const t=this.#E;this.#E=e,this.#k=e.state,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#F()}#b(e){dI.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#p)})),this.#f.getQueryCache().notify({query:this.#E,type:"observerResultsUpdated"})}))}};function Zv(e,t){return function(e,t){return!1!==$C(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Gv(e,t,t.refetchOnMount)}function Gv(e,t,n){if(!1!==$C(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Hv(e,t)}return!1}function Wv(e,t,n,r){return(e!==t||!1===$C(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Hv(e,n)}function Hv(e,t){return!1!==$C(t.enabled,e)&&e.isStaleByTime(JC(t.staleTime,e))}function Yv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Kv=Jo.createContext(Yv()),Qv=Jo.createContext(!1),Xv=(Qv.Provider,(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()})));function qv(e,t,n){var r,i,o,a;const g=BI(n),s=Jo.useContext(Qv),l=Jo.useContext(Kv),A=g.defaultQueryOptions(e);null===(r=g.getDefaultOptions().queries)||void 0===r||null===(i=r._experimental_beforeQuery)||void 0===i||i.call(r,A),A._optimisticResults=s?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(A),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(A,l),(e=>{Jo.useEffect((()=>{e.clearReset()}),[e])})(l);const C=!g.getQueryCache().get(A.queryHash),[I]=Jo.useState((()=>new t(g,A))),c=I.getOptimisticResult(A);if(Jo.useSyncExternalStore(Jo.useCallback((e=>{const t=s?()=>{}:I.subscribe(dI.batchCalls(e));return I.updateResult(),t}),[I,s]),(()=>I.getCurrentResult()),(()=>I.getCurrentResult())),Jo.useEffect((()=>{I.setOptions(A,{listeners:!1})}),[A,I]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(A,c))throw Xv(A,I,l);if((e=>{let{result:t,errorResetBoundary:n,throwOnError:r,query:i}=e;return t.isError&&!n.isReset()&&!t.isFetching&&i&&cp(r,[t.error,i])})({result:c,errorResetBoundary:l,throwOnError:A.throwOnError,query:g.getQueryCache().get(A.queryHash)}))throw c.error;if(null===(o=g.getDefaultOptions().queries)||void 0===o||null===(a=o._experimental_afterQuery)||void 0===a||a.call(o,A,c),A.experimental_prefetchInRender&&!KC&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,s)){var u;const e=C?Xv(A,I,l):null===(u=g.getQueryCache().get(A.queryHash))||void 0===u?void 0:u.promise;null==e||e.catch(up).finally((()=>{I.updateResult()}))}return A.notifyOnChangeProps?c:I.trackResult(c)}function Jv(e,t){return qv(e,Uv,t)}const $v=()=>{const{data:e,isLoading:t,isError:n}=Jv({queryFn:async()=>{try{return(await Fv.get("/api/get-user-me/",{withCredentials:!0})).data}catch{throw new Error("Failed to fetch authenticated user")}},queryKey:["authenticatedUser"]});return{user:e,userIsError:n,userIsLoading:t}},ey=e=>{const t=jv(e),{data:n,isLoading:r,isError:i,error:o}=Jv({queryFn:async()=>{try{return(await Fv.get(`/api/inventory/${t}/locations/`)).data}catch(e){throw new Error(e.response.data.error)}},queryKey:["componentLocations",t]});return{data:n,error:o,isError:i,isLoading:r}},ty=e=>{const t=jv(e),{data:n,isLoading:r,isError:i}=Jv({enabled:!!t,queryFn:async()=>{try{return(await Fv.get(`/api/shopping-list/${t}/component-quantity/`)).data.quantity}catch(e){throw new Error(e.response.data.error)}},queryKey:["userAnonymousInventoryQuantity",t]});return{data:n,isError:i,isLoading:r}},ny=e=>{const t=jv(e),{data:n,isLoading:r,isError:i,error:o}=Jv({queryKey:["userInventoryQuantity",t],queryFn:async()=>{try{return(await Fv.get(`/api/inventory/${t}/component-quantity/`)).data.quantity}catch(e){throw new Error(e.response.data.error)}}});return{data:n,isLoading:r,isError:i,error:o}},ry=(e,t,n)=>{const r=jv(e),i=jv(t),o=jv(n);return Jv({queryFn:async()=>{try{return(await Fv.get(`/api/shopping-list/${r}/${i}/${o}/component-quantity/`)).data.quantity}catch(n){var e,t;throw new Error((null===(e=n.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Error fetching data")}},queryKey:["userInventoryQuantity",r,i,o]})},iy=e=>{let{open:t,setOpen:n,title:r,text:i,type:o,componentId:a,hookArgs:g,quantityRequired:s,componentName:l}=e;const[A,C]=(0,Jo.useState)(),[I,c]=(0,Jo.useState)(!1),[u,d]=(0,Jo.useState)(),[h,f]=(0,Jo.useState)(!1),[p,m]=(0,Jo.useState)(""),[v,y]=(0,Jo.useState)(!0),{user:b,userIsLoading:w,userIsError:x}=$v(),E=zv(),k=Vv(),S=Bv(),{data:T}=ny(a),{data:O}=ty(a),{data:R}=void 0!==g?ry(...Object.values(g)):{data:void 0},{data:N}=ey(a),_=null!=N?N:[],D=(0,Jo.useCallback)((async()=>{try{o===GI.INVENTORY?await E.mutateAsync({componentId:a,quantity:u,location:Array.isArray(p)?p.join(","):"",editMode:h},{onSuccess:()=>{n(!1)},onError:e=>{C("Failed to update quantity: ",e)}}):o===GI.SHOPPING?await k.mutateAsync({componentId:a,...g,quantity:u,editMode:h},{onSuccess:()=>{n(!1)},onError:e=>{C("Failed to update quantity: ",e)}}):o===GI.SHOPPING_ANON&&await S.mutateAsync({componentId:a,quantity:u,editMode:h},{onSuccess:()=>{n(!1)},onError:e=>{C("Failed to update quantity: ",e)}})}catch(e){C("Failed to update quantity: ",e)}}));(0,Jo.useEffect)((()=>{let e=parseInt(s);h&&(o===GI.SHOPPING?e=parseInt(R):o===GI.SHOPPING_ANON?e=parseInt(O):o===GI.INVENTORY&&(e=parseInt(T))),d(e)}),[s,h,o]);const P=!!T&&o===GI.INVENTORY||!!O&&o===GI.SHOPPING_ANON||!!R&&o===GI.SHOPPING;if(x)return Jo.createElement("div",null,"Error loading user");if(w)return Jo.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading...");const M=Array.isArray(_)?_.map((e=>({locations:e.location||[],quantity:e.quantity}))):[];return Jo.createElement(Jo.Fragment,null,Jo.createElement(zc.Root,{show:t&&!I,as:Jo.Fragment},Jo.createElement(cd,{as:"div",className:"relative",onClose:n},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Jo.createElement("div",{className:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-50"})),Jo.createElement("div",{className:"fixed inset-0 overflow-y-auto"},Jo.createElement("div",{className:"flex items-end justify-center min-h-full p-4 text-center sm:items-center sm:p-0"},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Jo.createElement(cd.Panel,{className:"relative px-4 pt-5 pb-4 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:w-full sm:p-6 md:max-w-lg"},Jo.createElement("div",null,Jo.createElement("div",{className:"mt-3 text-center sm:text-left"},Jo.createElement(cd.Title,{as:"h3",className:"text-base font-semibold leading-6 text-gray-900"},r),Jo.createElement("div",{className:"mt-2"},i&&Jo.createElement("p",{className:"pt-3 text-sm text-gray-500"},i),P&&Jo.createElement("div",{className:"pt-3 text-gray-700"},"Your"," ","shopping_anon"===o?"shopping list":o," ","already contains"," ",Jo.createElement(WI,{type:o,useHook:o===GI.INVENTORY?ny:o===GI.SHOPPING?ry:ty,hookArgs:g?Object.values(g):[a],replaceZero:!1}),h?`. Edit quantity to be ${u}?`:`. Add ${u} more?`),h?Jo.createElement("div",{className:"my-6"},Jo.createElement("label",{htmlFor:"quantityInput",className:"block mb-1 font-medium text-gray-700"},`Edit ${o===GI.INVENTORY?"inventory":"shopping list"} quantity:`),Jo.createElement("div",{className:"flex items-center w-full gap-2"},Jo.createElement("div",null,Jo.createElement("div",{className:"sm:w-2/5 md:w-1/5"},Jo.createElement(sp(),{id:"quantityInput",type:"number",min:1,value:null!=u?u:1,onChange:e=>d(e),className:"h-8 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500"}))),Jo.createElement("div",{role:"button",className:"text-blue-500 hover:text-blue-700",onClick:()=>f((e=>!e))},"or add to "+(o===GI.INVENTORY?"inventory":"shopping list")))):Jo.createElement("div",{className:"my-6"},Jo.createElement("label",{htmlFor:"quantityInput",className:"block mb-1 font-medium text-gray-700"},"Quantity to add:"),Jo.createElement("div",{className:"flex items-center w-full gap-2"},Jo.createElement("div",null,Jo.createElement("div",{className:"sm:w-2/5 md:w-1/5"},Jo.createElement(sp(),{id:"quantityInput",type:"number",min:1,value:null!=u?u:1,onChange:e=>d(e),className:"h-8 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500"}))),Jo.createElement("div",{role:"button",className:"text-blue-500 hover:text-blue-700",onClick:()=>f((e=>!e))},"or edit "+(o===GI.INVENTORY?"inventory":"shopping list"))))))),o===GI.INVENTORY&&Jo.createElement("div",{className:"p-4 mt-4 mb-2 bg-gray-100 rounded-md"},Jo.createElement("p",{className:"my-2 text-xs text-slate-500"},"Specify the location where you will store this item in your inventory. Separate locations with commas."),Jo.createElement(Cp,{locationArray:p,submitLocationChange:m,isEditable:v,setIsEditable:y,showSeparateLocationsWithCommas:!1})),o===GI.INVENTORY&&M.length>0&&Jo.createElement("div",null,Jo.createElement(hd,{title:`Your inventory locations for ${l}`},Jo.createElement("div",{className:"p-4 rounded-md bg-blue-50"},Jo.createElement("p",{className:"mb-4 text-xs text-slate-500"},"It looks like you already have this component in your inventory. Click to select a pre-existing location."),Jo.createElement(ap,{data:M,onRowClicked:e=>{m(e.locations),y(!1)},pointerEvents:"pointer-events-none"})))),Jo.createElement("div",{className:"flex gap-2 mt-5 sm:mt-4 sm:flex-row-reverse flex-nowrap"},Jo.createElement(Yf,{variant:"primary",onClick:()=>{D()}},h?"Update":"Add"),Jo.createElement(Yf,{variant:"muted",onClick:()=>n(!1)},"Cancel")),Jo.createElement("div",{className:"bg-red-500"},A))))))),Jo.createElement(tp,{open:I,title:"Limit reached: three modules already in shopping list",message:"Please become a subscriber to add more than 3 modules to your shopping list.",onClickSupport:()=>ep(),onClickCancel:()=>c(!1)}))};function oy({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25"}))}const ay=Jo.forwardRef(oy),gy=e=>{let{title:t,onButtonClick:n,buttonText:r,icon:i=Jo.createElement(ay,{className:"w-5 h-5"})}=e;return Jo.createElement("div",{className:"mb-6 relative"},Jo.createElement("div",{"aria-hidden":"true",className:"absolute inset-0 flex items-center"},Jo.createElement("div",{className:"w-full border-t border-gray-300"})),Jo.createElement("div",{className:"relative flex items-center justify-between"},Jo.createElement("h1",{className:"bg-white pr-3 text-3xl font-semibold text-gray-900 font-display"},t),Jo.createElement("button",{className:"inline-flex items-center gap-x-1.5 rounded-full bg-white px-3 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:text-white hover:bg-[#4f7f63] transition-all",onClick:n,type:"button"},i,Jo.createElement("span",null,r))))};var sy=n(5556),ly=n.n(sy),Ay=["color","size","title","className"];function Cy(){return Cy=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cy=(0,Jo.forwardRef)((function(e,t){var n=e.color,r=e.size,i=e.title,o=e.className,a=Iy(e,Ay);return Jo.createElement("svg",Cy({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-shuffle",o].filter(Boolean).join(" ")},a),i?Jo.createElement("title",null,i):null,Jo.createElement("path",{fillRule:"evenodd",d:"M0 3.5A.5.5 0 0 1 .5 3H1c2.202 0 3.827 1.24 4.874 2.418.49.552.865 1.102 1.126 1.532.26-.43.636-.98 1.126-1.532C9.173 4.24 10.798 3 13 3v1c-1.798 0-3.173 1.01-4.126 2.082A9.6 9.6 0 0 0 7.556 8a9.6 9.6 0 0 0 1.317 1.918C9.828 10.99 11.204 12 13 12v1c-2.202 0-3.827-1.24-4.874-2.418A10.6 10.6 0 0 1 7 9.05c-.26.43-.636.98-1.126 1.532C4.827 11.76 3.202 13 1 13H.5a.5.5 0 0 1 0-1H1c1.798 0 3.173-1.01 4.126-2.082A9.6 9.6 0 0 0 6.444 8a9.6 9.6 0 0 0-1.317-1.918C4.172 5.01 2.796 4 1 4H.5a.5.5 0 0 1-.5-.5"}),Jo.createElement("path",{d:"M13 5.466V1.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192m0 9v-3.932a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384l-2.36 1.966a.25.25 0 0 1-.41-.192"}))}));cy.propTypes={color:ly().string,size:ly().oneOfType([ly().string,ly().number]),title:ly().string,className:ly().string},cy.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const uy=cy;var dy=["color","size","title","className"];function hy(){return hy=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var py=(0,Jo.forwardRef)((function(e,t){var n=e.color,r=e.size,i=e.title,o=e.className,a=fy(e,dy);return Jo.createElement("svg",hy({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-cone-striped",o].filter(Boolean).join(" ")},a),i?Jo.createElement("title",null,i):null,Jo.createElement("path",{d:"m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9s-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12m-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4s1.2-.036 1.725-.098m4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257z"}))}));py.propTypes={color:ly().string,size:ly().oneOfType([ly().string,ly().number]),title:ly().string,className:ly().string},py.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const my=py;function vy({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const yy=Jo.forwardRef(vy),by={info:"bg-blue-50 text-blue-700",muted:"bg-gray-100 text-gray-500",sky:"bg-sky-200 text-blue-900",transparent:"bg-transparent text-gray-500",underConstruction:"bg-yellow-100 text-yellow-800",warning:"bg-yellow-100 text-yellow-800"},wy={compact:"p-3",normal:"p-6"},xy={info:Jo.createElement("div",{className:"flex-shrink-0"},Jo.createElement(yy,{"aria-hidden":"true",className:"w-5 h-5 text-blue-400"})),sky:Jo.createElement("div",{className:"flex-shrink-0",style:{paddingTop:"2px"}},Jo.createElement(uy,{"aria-hidden":"true",className:"w-5 h-5 text-blue-900"})),underConstruction:Jo.createElement("div",{className:"flex-shrink-0"},Jo.createElement(my,{"aria-hidden":"true",className:"w-6 h-6 text-yellow-800"}))},Ey={around:"justify-around",between:"justify-between",center:"justify-center",end:"justify-end",start:"justify-start"},ky=e=>{let{variant:t="muted",icon:n=!1,padding:r="normal",align:i="between",expand:o=!0,children:a}=e;return Jo.createElement("div",{className:ZI()("rounded w-full",by[t],wy[r]),role:"alert"},Jo.createElement("div",{className:ZI()("flex w-full",Ey[i])},n&&xy[t],Jo.createElement("div",{className:ZI()({"flex-1":o,"ml-3":n})},a)))};function Sy({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Ty=Jo.forwardRef(Sy);function Oy({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const Ry=Jo.forwardRef(Oy),Ny=e=>{let{show:t,setShow:n,title:r,message:i}=e;return(0,Jo.useEffect)((()=>{if(t){const e=setTimeout((()=>{n(!1)}),6e3);return()=>clearTimeout(e)}}),[t,n]),Jo.createElement(Jo.Fragment,null,Jo.createElement("div",{"aria-live":"assertive",className:"fixed inset-0 flex items-start justify-end px-4 py-6 pointer-events-none sm:p-6",style:{top:"75px",zIndex:9999999}},Jo.createElement("div",{className:"flex flex-col items-center w-full space-y-4 sm:items-end"},Jo.createElement(zc,{as:Jo.Fragment,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",show:t},Jo.createElement("div",{className:"w-full max-w-sm overflow-hidden bg-white rounded-lg shadow-lg pointer-events-auto ring-1 ring-black ring-opacity-5"},Jo.createElement("div",{className:"p-4"},Jo.createElement("div",{className:"flex items-start"},Jo.createElement("div",{className:"flex-shrink-0"},Jo.createElement(Ty,{"aria-hidden":"true",className:"w-6 h-6 text-brandgreen-400"})),Jo.createElement("div",{className:"ml-3 w-0 flex-1 pt-0.5"},Jo.createElement("p",{className:"text-sm font-medium text-gray-900"},r),Jo.createElement("p",{className:"mt-1 text-sm text-gray-500"},i)),Jo.createElement("div",{className:"flex flex-shrink-0 ml-4"},Jo.createElement("button",{className:"inline-flex text-gray-400 bg-white rounded-md hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>n(!1),type:"button"},Jo.createElement("span",{className:"sr-only"},"Close"),Jo.createElement(Ry,{"aria-hidden":"true",className:"w-5 h-5"}))))))))))},_y=e=>{let{open:t,setOpen:n,subtitle:r,subsubtitle:i="",title:o,submitButtonText:a,onSubmit:g=()=>{},customButtons:s,bgOpacity:l="bg-opacity-75",backdropBlur:A,disabled:C=!1,onlyCancelButton:I=!1,children:c}=e;const u=(0,Jo.useRef)(null),d=Jo.createElement("div",{className:"w-full mt-5 sm:mt-4 sm:flex sm:flex-row-reverse"},!I&&Jo.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 text-sm font-semibold text-white rounded-md shadow-sm sm:ml-3 sm:w-auto",disabled:C,onClick:()=>{g(),n(!1)},type:"button"},a),Jo.createElement("button",{className:"inline-flex justify-center w-full px-3 py-2 mt-3 text-sm font-semibold text-gray-900 bg-white rounded-md shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:()=>n(!1),ref:u,type:"button"},"Cancel"));return Jo.createElement(zc.Root,{as:Jo.Fragment,show:t},Jo.createElement(cd,{as:"div",className:"relative",initialFocus:u,onClose:()=>n(!1)},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Jo.createElement("div",{className:ZI()("fixed inset-0 z-50 transition-opacity bg-gray-500",l,A)})),Jo.createElement("div",{className:"fixed inset-0 z-50 overflow-y-auto"},Jo.createElement("div",{className:"flex items-center justify-center w-full min-h-full p-4"},Jo.createElement(zc.Child,{as:Jo.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},Jo.createElement(cd.Panel,{className:ZI()("relative w-full max-w-7xl overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl sm:my-8","flex flex-col max-h-[90vh]")},Jo.createElement("div",{className:"flex-1 overflow-y-auto p-8",id:"modal-content-container"},Jo.createElement(cd.Title,{as:"h3",className:"text-2xl text-left font-semibold leading-6 text-gray-900 py-4 font-display"},o),i&&Jo.createElement("div",{className:"text-xs mb-4"},Jo.createElement("small",null,i)),Jo.createElement("div",{className:"text-sm mb-4"},r),Jo.createElement("div",{className:"w-full mt-2"},c)),Jo.createElement("div",{className:"p-4 border-t border-gray-300"},s||d)))))))},Dy=()=>{const{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?`:${n}`:""}`},Py=e=>{let{id:t,left:n="-37px",user_submitted_status:r,children:i}=e;return Jo.createElement("div",{className:"relative"},"pending"===r&&Jo.createElement(Uf,{content:"This component is a user submission. User submissions are reviewed for accuracy and relevance, typically within 24 hours."},Jo.createElement("div",{className:"flex justify-center align-middle text-2xl",style:{backgroundColor:"#db2777",borderRadius:"12px",color:"#ffffff",fontSize:"8px",fontWeight:"bold",height:"20px",left:n,overflow:"visible",padding:"0.1rem 0.1rem",position:"absolute",top:"50%",transform:"translateY(-50%) rotate(-90deg)",whiteSpace:"nowrap",width:"45px",zIndex:1}},Jo.createElement("div",{style:{transform:"translateY(-45%)"}},"verifying"))),Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:`${Dy()}/components/${t}`},i))};function My({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const Ly=Jo.forwardRef(My);function Fy({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const jy=Jo.forwardRef(Fy);function By({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const zy=Jo.forwardRef(By);var Vy=n(2543),Uy=n.n(Vy);const Zy=e=>{let{currentPage:t,totalPages:n,navigate:r}=e;const i=Uy().range(1,n+1);return Jo.createElement("nav",{"aria-label":"Pagination",className:"inline-flex -space-x-px rounded-md shadow-sm isolate"},Jo.createElement("a",{className:"relative inline-flex items-center px-2 py-2 text-gray-400 rounded-l-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0",href:"#",onClick:e=>{e.preventDefault(),r(Math.max(1,t-1))}},Jo.createElement("span",{className:"sr-only"},"Previous"),Jo.createElement(jy,{"aria-hidden":"true",className:"w-5 h-5"})),i.map((e=>1===e||2===e||e===n||e>=t-1&&e<=t+1?Jo.createElement("a",{"aria-current":t===e?"page":void 0,className:ZI()("relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:outline-offset-0",{"bg-brandgreen-500 text-white":t===e,"text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-100":t!==e}),href:"#",key:e,onClick:t=>{t.preventDefault(),r(e)}},e):3===e||e===n-1?Jo.createElement("span",{className:"relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-900",key:e},"..."):null)),Jo.createElement("a",{className:"relative inline-flex items-center px-2 py-2 text-gray-400 rounded-r-md ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0",href:"#",onClick:e=>{e.preventDefault(),r(Math.min(n,t+1))}},Jo.createElement("span",{className:"sr-only"},"Next"),Jo.createElement(zy,{"aria-hidden":"true",className:"w-5 h-5"})))};var Gy=e=>"checkbox"===e.type,Wy=e=>e instanceof Date,Hy=e=>null==e;const Yy=e=>"object"==typeof e;var Ky=e=>!Hy(e)&&!Array.isArray(e)&&Yy(e)&&!Wy(e),Qy=e=>Ky(e)&&e.target?Gy(e.target)?e.target.checked:e.target.value:e,Xy=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),qy="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Jy(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(qy&&(e instanceof Blob||e instanceof FileList)||!n&&!Ky(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return Ky(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=Jy(e[n]));else t=e}return t}var $y=e=>Array.isArray(e)?e.filter(Boolean):[],eb=e=>void 0===e,tb=(e,t,n)=>{if(!t||!Ky(e))return n;const r=$y(t.split(/[,[\].]+?/)).reduce(((e,t)=>Hy(e)?e:e[t]),e);return eb(r)||r===e?eb(e[t])?n:e[t]:r},nb=e=>"boolean"==typeof e,rb=e=>/^\w*$/.test(e),ib=e=>$y(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ob=(e,t,n)=>{let r=-1;const i=rb(t)?[t]:ib(t),o=i.length,a=o-1;for(;++rJo.useContext(yb);var wb=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==cb&&(t._proxyFormState[i]=!r||cb),n&&(n[i]=!0),e[i]}});return i},xb=e=>Ky(e)&&!Object.keys(e).length,Eb=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return xb(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||cb)))},kb=e=>Array.isArray(e)?e:[e],Sb=(e,t,n)=>!e||!t||e===t||kb(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function Tb(e){const t=Jo.useRef(e);t.current=e,Jo.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Ob=e=>"string"==typeof e,Rb=(e,t,n,r,i)=>Ob(e)?(r&&t.watch.add(e),tb(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),tb(n,e)))):(r&&(t.watchAll=!0),n);function Nb(e){const t=bb(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},g=Jo.useRef(r);g.current=r,Tb({disabled:o,subject:n._subjects.values,next:e=>{Sb(g.current,e.name,a)&&l(Jy(Rb(g.current,n._names,e.values||n._formValues,!1,i)))}});const[s,l]=Jo.useState(n._getWatch(r,i));return Jo.useEffect((()=>n._removeUnmounted())),s}function _b(e){const t=bb(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=Xy(i._names.array,n),g=Nb({control:i,name:n,defaultValue:tb(i._formValues,n,tb(i._defaultValues,n,e.defaultValue)),exact:!0}),s=function(e){const t=bb(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,g]=Jo.useState(n._formState),s=Jo.useRef(!0),l=Jo.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),A=Jo.useRef(i);return A.current=i,Tb({disabled:r,next:e=>s.current&&Sb(A.current,e.name,o)&&Eb(e,l.current,n._updateFormState)&&g({...n._formState,...e}),subject:n._subjects.state}),Jo.useEffect((()=>(s.current=!0,l.current.isValid&&n._updateValid(!0),()=>{s.current=!1})),[n]),wb(a,n,l.current,!1)}({control:i,name:n,exact:!0}),l=Jo.useRef(i.register(n,{...e.rules,value:g,...nb(e.disabled)?{disabled:e.disabled}:{}}));return Jo.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=tb(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=Jy(tb(i._options.defaultValues,n));ob(i._defaultValues,n,e),eb(tb(i._formValues,n))&&ob(i._formValues,n,e)}return()=>{(a?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,a,o]),Jo.useEffect((()=>{tb(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:tb(i._fields,n)._f.value})}),[r,n,i]),{field:{name:n,value:g,...nb(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:Jo.useCallback((e=>l.current.onChange({target:{value:Qy(e),name:n},type:sb})),[n]),onBlur:Jo.useCallback((()=>l.current.onBlur({target:{value:tb(i._formValues,n),name:n},type:ab})),[n,i]),ref:Jo.useCallback((e=>{const t=tb(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,n])},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!tb(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!tb(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!tb(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!tb(s.validatingFields,n)},error:{enumerable:!0,get:()=>tb(s.errors,n)}})}}const Db=e=>e.render(_b(e));var Pb=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Mb=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},Lb=(e,t,n={})=>n.shouldFocus||eb(n.shouldFocus)?n.focusName||`${e}.${eb(n.focusIndex)?t:n.focusIndex}.`:"",Fb=e=>({isOnSubmit:!e||e===Cb,isOnBlur:e===lb,isOnChange:e===Ab,isOnAll:e===cb,isOnTouch:e===Ib}),jb=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const Bb=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=tb(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(Bb(o,t))break}else if(Ky(o)&&Bb(o,t))break}}};var zb=(e,t,n)=>{const r=kb(tb(e,n));return ob(r,"root",t[n]),ob(e,n,r),e},Vb=e=>"file"===e.type,Ub=e=>"function"==typeof e,Zb=e=>{if(!qy)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Gb=e=>Ob(e),Wb=e=>"radio"===e.type,Hb=e=>e instanceof RegExp;const Yb={value:!1,isValid:!1},Kb={value:!0,isValid:!0};var Qb=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!eb(e[0].attributes.value)?eb(e[0].value)||""===e[0].value?Kb:{value:e[0].value,isValid:!0}:Kb:Yb}return Yb};const Xb={isValid:!1,value:null};var qb=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Xb):Xb;function Jb(e,t,n="validate"){if(Gb(e)||Array.isArray(e)&&e.every(Gb)||nb(e)&&!e)return{type:n,message:Gb(e)?e:"",ref:t}}var $b=e=>Ky(e)&&!Hb(e)?e:{value:e,message:""},ew=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:g,maxLength:s,minLength:l,min:A,max:C,pattern:I,validate:c,name:u,valueAsNumber:d,mount:h,disabled:f}=e._f,p=tb(t,u);if(!h||f)return{};const m=a?a[0]:o,v=e=>{r&&m.reportValidity&&(m.setCustomValidity(nb(e)?"":e||""),m.reportValidity())},y={},b=Wb(o),w=Gy(o),x=b||w,E=(d||Vb(o))&&eb(o.value)&&eb(p)||Zb(o)&&""===o.value||""===p||Array.isArray(p)&&!p.length,k=Pb.bind(null,u,n,y),S=(e,t,n,r=hb,i=fb)=>{const a=e?t:n;y[u]={type:e?r:i,message:a,ref:o,...k(e?r:i,a)}};if(i?!Array.isArray(p)||!p.length:g&&(!x&&(E||Hy(p))||nb(p)&&!p||w&&!Qb(a).isValid||b&&!qb(a).isValid)){const{value:e,message:t}=Gb(g)?{value:!!g,message:g}:$b(g);if(e&&(y[u]={type:mb,message:t,ref:m,...k(mb,t)},!n))return v(t),y}if(!(E||Hy(A)&&Hy(C))){let e,t;const r=$b(C),i=$b(A);if(Hy(p)||isNaN(p)){const n=o.valueAsDate||new Date(p),a=e=>new Date((new Date).toDateString()+" "+e),g="time"==o.type,s="week"==o.type;Ob(r.value)&&p&&(e=g?a(p)>a(r.value):s?p>r.value:n>new Date(r.value)),Ob(i.value)&&p&&(t=g?a(p)r.value),Hy(i.value)||(t=n+e.value,i=!Hy(t.value)&&p.length<+t.value;if((r||i)&&(S(r,e.message,t.message),!n))return v(y[u].message),y}if(I&&!E&&Ob(p)){const{value:e,message:t}=$b(I);if(Hb(e)&&!p.match(e)&&(y[u]={type:pb,message:t,ref:o,...k(pb,t)},!n))return v(t),y}if(c)if(Ub(c)){const e=Jb(await c(p,t),m);if(e&&(y[u]={...e,...k(vb,e.message)},!n))return v(e.message),y}else if(Ky(c)){let e={};for(const r in c){if(!xb(e)&&!n)break;const i=Jb(await c[r](p,t),m,r);i&&(e={...i,...k(r,i.message)},v(i.message),n&&(y[u]=e))}if(!xb(e)&&(y[u]={ref:m,...e},!n))return y}return v(!0),y},tw=(e,t)=>[...e,...kb(t)],nw=e=>Array.isArray(e)?e.map((()=>{})):void 0;function rw(e,t,n){return[...e.slice(0,t),...kb(n),...e.slice(t)]}var iw=(e,t,n)=>Array.isArray(e)?(eb(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],ow=(e,t)=>[...kb(t),...kb(e)];var aw=(e,t)=>eb(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return $y(r).length?r:[]}(e,kb(t).sort(((e,t)=>e-t))),gw=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function sw(e,t){const n=Array.isArray(t)?t:rb(t)?[t]:ib(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function Aw(e){const t=bb(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o}=e,[a,g]=Jo.useState(n._getFieldArray(r)),s=Jo.useRef(n._getFieldArray(r).map(Mb)),l=Jo.useRef(a),A=Jo.useRef(r),C=Jo.useRef(!1);A.current=r,l.current=a,n._names.array.add(r),e.rules&&n.register(r,e.rules),Tb({next:({values:e,name:t})=>{if(t===A.current||!t){const t=tb(e,A.current);Array.isArray(t)&&(g(t),s.current=t.map(Mb))}},subject:n._subjects.array});const I=Jo.useCallback((e=>{C.current=!0,n._updateFieldArray(r,e)}),[n,r]);return Jo.useEffect((()=>{if(n._state.action=!1,jb(r,n._names)&&n._subjects.state.next({...n._formState}),C.current&&(!Fb(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then((e=>{const t=tb(e.errors,r),i=tb(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?ob(n._formState.errors,r,t):sw(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=tb(n._fields,r);!e||!e._f||Fb(n._options.reValidateMode).isOnSubmit&&Fb(n._options.mode).isOnSubmit||ew(e,n._formValues,n._options.criteriaMode===cb,n._options.shouldUseNativeValidation,!0).then((e=>!xb(e)&&n._subjects.state.next({errors:zb(n._formState.errors,e,r)})))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Bb(n._fields,((e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1})),n._names.focus="",n._updateValid(),C.current=!1}),[a,r,n]),Jo.useEffect((()=>(!tb(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)})),[r,n,i,o]),{swap:Jo.useCallback(((e,t)=>{const i=n._getFieldArray(r);gw(i,e,t),gw(s.current,e,t),I(i),g(i),n._updateFieldArray(r,i,gw,{argA:e,argB:t},!1)}),[I,r,n]),move:Jo.useCallback(((e,t)=>{const i=n._getFieldArray(r);iw(i,e,t),iw(s.current,e,t),I(i),g(i),n._updateFieldArray(r,i,iw,{argA:e,argB:t},!1)}),[I,r,n]),prepend:Jo.useCallback(((e,t)=>{const i=kb(Jy(e)),o=ow(n._getFieldArray(r),i);n._names.focus=Lb(r,0,t),s.current=ow(s.current,i.map(Mb)),I(o),g(o),n._updateFieldArray(r,o,ow,{argA:nw(e)})}),[I,r,n]),append:Jo.useCallback(((e,t)=>{const i=kb(Jy(e)),o=tw(n._getFieldArray(r),i);n._names.focus=Lb(r,o.length-1,t),s.current=tw(s.current,i.map(Mb)),I(o),g(o),n._updateFieldArray(r,o,tw,{argA:nw(e)})}),[I,r,n]),remove:Jo.useCallback((e=>{const t=aw(n._getFieldArray(r),e);s.current=aw(s.current,e),I(t),g(t),n._updateFieldArray(r,t,aw,{argA:e})}),[I,r,n]),insert:Jo.useCallback(((e,t,i)=>{const o=kb(Jy(t)),a=rw(n._getFieldArray(r),e,o);n._names.focus=Lb(r,e,i),s.current=rw(s.current,e,o.map(Mb)),I(a),g(a),n._updateFieldArray(r,a,rw,{argA:e,argB:nw(t)})}),[I,r,n]),update:Jo.useCallback(((e,t)=>{const i=Jy(t),o=lw(n._getFieldArray(r),e,i);s.current=[...o].map(((t,n)=>t&&n!==e?s.current[n]:Mb())),I(o),g([...o]),n._updateFieldArray(r,o,lw,{argA:e,argB:i},!0,!1)}),[I,r,n]),replace:Jo.useCallback((e=>{const t=kb(Jy(e));s.current=t.map(Mb),I([...t]),g([...t]),n._updateFieldArray(r,[...t],(e=>e),{},!0,!1)}),[I,r,n]),fields:Jo.useMemo((()=>a.map(((e,t)=>({...e,[i]:s.current[t]||Mb()})))),[a,i])}}var Cw=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Iw=e=>Hy(e)||!Yy(e);function cw(e,t){if(Iw(e)||Iw(t))return e===t;if(Wy(e)&&Wy(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Wy(n)&&Wy(e)||Ky(n)&&Ky(e)||Array.isArray(n)&&Array.isArray(e)?!cw(n,e):n!==e)return!1}}return!0}var uw=e=>"select-multiple"===e.type,dw=e=>Zb(e)&&e.isConnected,hw=e=>{for(const t in e)if(Ub(e[t]))return!0;return!1};function fw(e,t={}){const n=Array.isArray(e);if(Ky(e)||n)for(const n in e)Array.isArray(e[n])||Ky(e[n])&&!hw(e[n])?(t[n]=Array.isArray(e[n])?[]:{},fw(e[n],t[n])):Hy(e[n])||(t[n]=!0);return t}function pw(e,t,n){const r=Array.isArray(e);if(Ky(e)||r)for(const r in e)Array.isArray(e[r])||Ky(e[r])&&!hw(e[r])?eb(t)||Iw(n[r])?n[r]=Array.isArray(e[r])?fw(e[r],[]):{...fw(e[r])}:pw(e[r],Hy(t)?{}:t[r],n[r]):n[r]=!cw(e[r],t[r]);return n}var mw=(e,t)=>pw(e,t,fw(t)),vw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>eb(e)?e:t?""===e?NaN:e?+e:e:n&&Ob(e)?new Date(e):r?r(e):e;function yw(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Vb(t)?t.files:Wb(t)?qb(e.refs).value:uw(t)?[...t.selectedOptions].map((({value:e})=>e)):Gy(t)?Qb(e.refs).value:vw(eb(t.value)?e.ref.value:t.value,e)}var bw=e=>eb(e)?e:Hb(e)?e.source:Ky(e)?Hb(e.value)?e.value.source:e.value:e;const ww="AsyncFunction";function xw(e,t,n){const r=tb(e,n);if(r||rb(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=tb(t,r),a=tb(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const Ew={mode:Cb,reValidateMode:Ab,shouldFocusError:!0};function kw(e={}){let t,n={...Ew,...e},r={submitCount:0,isDirty:!1,isLoading:Ub(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},o=(Ky(n.defaultValues)||Ky(n.values))&&Jy(n.defaultValues||n.values)||{},a=n.shouldUnregister?{}:Jy(o),g={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},C={values:Cw(),array:Cw(),state:Cw()},I=Fb(n.mode),c=Fb(n.reValidateMode),u=n.criteriaMode===cb,d=async e=>{if(!n.disabled&&(A.isValid||e)){const e=n.resolver?xb((await v()).errors):await y(i,!0);e!==r.isValid&&C.state.next({isValid:e})}},h=(e,t)=>{n.disabled||!A.isValidating&&!A.validatingFields||((e||Array.from(s.mount)).forEach((e=>{e&&(t?ob(r.validatingFields,e,t):sw(r.validatingFields,e))})),C.state.next({validatingFields:r.validatingFields,isValidating:!xb(r.validatingFields)}))},f=(e,t,n,r)=>{const s=tb(i,e);if(s){const i=tb(a,e,eb(n)?tb(o,e):n);eb(i)||r&&r.defaultChecked||t?ob(a,e,t?i:yw(s._f)):x(e,i),g.mount&&d()}},p=(e,t,a,g,s)=>{let l=!1,I=!1;const c={name:e};if(!n.disabled){const n=!!(tb(i,e)&&tb(i,e)._f&&tb(i,e)._f.disabled);if(!a||g){A.isDirty&&(I=r.isDirty,r.isDirty=c.isDirty=b(),l=I!==c.isDirty);const i=n||cw(tb(o,e),t);I=!(n||!tb(r.dirtyFields,e)),i||n?sw(r.dirtyFields,e):ob(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||A.dirtyFields&&I!==!i}if(a){const t=tb(r.touchedFields,e);t||(ob(r.touchedFields,e,a),c.touchedFields=r.touchedFields,l=l||A.touchedFields&&t!==a)}l&&s&&C.state.next(c)}return l?c:{}},m=(n,i,o,a)=>{const g=tb(r.errors,n),s=A.isValid&&nb(i)&&r.isValid!==i;var I;if(e.delayError&&o?(I=()=>((e,t)=>{ob(r.errors,e,t),C.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(l),l=setTimeout(I,e)},t(e.delayError)):(clearTimeout(l),t=null,o?ob(r.errors,n,o):sw(r.errors,n)),(o?!cw(g,o):g)||!xb(a)||s){const e={...a,...s&&nb(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},C.state.next(e)}},v=async e=>{h(e,!0);const t=await n.resolver(a,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=tb(t,n);e&&ob(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||s.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return h(e),t},y=async(e,t,i={valid:!0})=>{for(const g in e){const l=e[g];if(l){const{_f:e,...C}=l;if(e){const C=s.array.has(e.name),I=l._f&&!((o=l._f)&&o.validate||!(Ub(o.validate)&&o.validate.constructor.name===ww||Ky(o.validate)&&Object.values(o.validate).find((e=>e.constructor.name===ww))));I&&A.validatingFields&&h([g],!0);const c=await ew(l,a,u,n.shouldUseNativeValidation&&!t,C);if(I&&A.validatingFields&&h([g]),c[e.name]&&(i.valid=!1,t))break;!t&&(tb(c,e.name)?C?zb(r.errors,c,e.name):ob(r.errors,e.name,c[e.name]):sw(r.errors,e.name))}!xb(C)&&await y(C,t,i)}}var o;return i.valid},b=(e,t)=>!n.disabled&&(e&&t&&ob(a,e,t),!cw(R(),o)),w=(e,t,n)=>Rb(e,s,{...g.mount?a:eb(t)?o:Ob(e)?{[e]:t}:t},n,t),x=(e,t,n={})=>{const r=tb(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&ob(a,e,vw(t,n)),o=Zb(n.ref)&&Hy(t)?"":t,uw(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?Gy(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Vb(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||C.values.next({name:e,values:{...a}})))}(n.shouldDirty||n.shouldTouch)&&p(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&O(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,g=tb(i,a);(s.array.has(e)||Ky(o)||g&&!g._f)&&!Wy(o)?E(a,o,n):x(a,o,n)}},k=(e,t,n={})=>{const l=tb(i,e),I=s.array.has(e),c=Jy(t);ob(a,e,c),I?(C.array.next({name:e,values:{...a}}),(A.isDirty||A.dirtyFields)&&n.shouldDirty&&C.state.next({name:e,dirtyFields:mw(o,a),isDirty:b(e,c)})):!l||l._f||Hy(c)?x(e,c,n):E(e,c,n),jb(e,s)&&C.state.next({...r}),C.values.next({name:g.mount?e:void 0,values:{...a}})},S=async o=>{g.mount=!0;const l=o.target;let f=l.name,b=!0;const w=tb(i,f),x=e=>{b=Number.isNaN(e)||Wy(e)&&isNaN(e.getTime())||cw(e,tb(a,f,e))};if(w){let g,E;const k=l.type?yw(w._f):Qy(o),S=o.type===ab||o.type===gb,T=!(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate))(w._f)&&!n.resolver&&!tb(r.errors,f)&&!w._f.deps||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(S,tb(r.touchedFields,f),r.isSubmitted,c,I),R=jb(f,s,S);ob(a,f,k),S?(w._f.onBlur&&w._f.onBlur(o),t&&t(0)):w._f.onChange&&w._f.onChange(o);const N=p(f,k,S,!1),_=!xb(N)||R;if(!S&&C.values.next({name:f,type:o.type,values:{...a}}),T)return A.isValid&&("onBlur"===e.mode?S&&d():d()),_&&C.state.next({name:f,...R?{}:N});if(!S&&R&&C.state.next({...r}),n.resolver){const{errors:e}=await v([f]);if(x(k),b){const t=xw(r.errors,i,f),n=xw(e,i,t.name||f);g=n.error,f=n.name,E=xb(e)}}else h([f],!0),g=(await ew(w,a,u,n.shouldUseNativeValidation))[f],h([f]),x(k),b&&(g?E=!1:A.isValid&&(E=await y(i,!0)));b&&(w._f.deps&&O(w._f.deps),m(f,E,g,N))}},T=(e,t)=>{if(tb(r.errors,t)&&e.focus)return e.focus(),1},O=async(e,t={})=>{let o,a;const g=kb(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await v(e);if(e)for(const n of e){const e=tb(t,n);e?ob(r.errors,n,e):sw(r.errors,n)}else r.errors=t;return t})(eb(e)?e:g);o=xb(t),a=e?!g.some((e=>tb(t,e))):o}else e?(a=(await Promise.all(g.map((async e=>{const t=tb(i,e);return await y(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&d()):a=o=await y(i);return C.state.next({...!Ob(e)||A.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors}),t.shouldFocus&&!a&&Bb(i,T,e?g:s.mount),a},R=e=>{const t={...g.mount?a:o};return eb(e)?t:Ob(e)?tb(t,e):e.map((e=>tb(t,e)))},N=(e,t)=>({invalid:!!tb((t||r).errors,e),isDirty:!!tb((t||r).dirtyFields,e),error:tb((t||r).errors,e),isValidating:!!tb(r.validatingFields,e),isTouched:!!tb((t||r).touchedFields,e)}),_=(e,t,n)=>{const o=(tb(i,e,{_f:{}})._f||{}).ref,a=tb(r.errors,e)||{},{ref:g,message:s,type:l,...A}=a;ob(r.errors,e,{...A,...t,ref:o}),C.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},D=(e,t={})=>{for(const g of e?kb(e):s.mount)s.mount.delete(g),s.array.delete(g),t.keepValue||(sw(i,g),sw(a,g)),!t.keepError&&sw(r.errors,g),!t.keepDirty&&sw(r.dirtyFields,g),!t.keepTouched&&sw(r.touchedFields,g),!t.keepIsValidating&&sw(r.validatingFields,g),!n.shouldUnregister&&!t.keepDefaultValue&&sw(o,g);C.values.next({values:{...a}}),C.state.next({...r,...t.keepDirty?{isDirty:b()}:{}}),!t.keepIsValid&&d()},P=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(nb(e)&&g.mount||e){const o=e?void 0:eb(i)?yw(n?n._f:tb(r,t)._f):i;ob(a,t,o),p(t,o,!1,!1,!0)}},M=(e,t={})=>{let r=tb(i,e);const a=nb(t.disabled)||nb(n.disabled);return ob(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),s.mount.add(e),r?P({field:r,disabled:nb(t.disabled)?t.disabled:n.disabled,name:e,value:t.value}):f(e,!0,t.value),{...a?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:bw(t.min),max:bw(t.max),minLength:bw(t.minLength),maxLength:bw(t.maxLength),pattern:bw(t.pattern)}:{},name:e,onChange:S,onBlur:S,ref:a=>{if(a){M(e,t),r=tb(i,e);const n=eb(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,g=(e=>Wb(e)||Gy(e))(n),s=r._f.refs||[];if(g?s.find((e=>e===n)):n===r._f.ref)return;ob(i,e,{_f:{...r._f,...g?{refs:[...s.filter(dw),n,...Array.isArray(tb(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),f(e,!1,void 0,n)}else r=tb(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Xy(s.array,e)||!g.action)&&s.unMount.add(e)}}},L=()=>n.shouldFocusError&&Bb(i,T,s.mount),F=(e,t)=>async o=>{let g;if(o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist()),n.disabled)return void(t&&await t({...r.errors},o));let s=Jy(a);if(C.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await v();r.errors=e,s=t}else await y(i);if(sw(r.errors,"root"),xb(r.errors)){C.state.next({errors:{}});try{await e(s,o)}catch(e){g=e}}else t&&await t({...r.errors},o),L(),setTimeout(L);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xb(r.errors)&&!g,submitCount:r.submitCount+1,errors:r.errors}),g)throw g},j=(t,n={})=>{const l=t?Jy(t):o,I=Jy(l),c=xb(t),u=c?o:I;if(n.keepDefaultValues||(o=l),!n.keepValues){if(n.keepDirtyValues){const e=new Set([...s.mount,...Object.keys(mw(o,a))]);for(const t of Array.from(e))tb(r.dirtyFields,t)?ob(u,t,tb(a,t)):k(t,tb(u,t))}else{if(qy&&eb(t))for(const e of s.mount){const t=tb(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Zb(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?Jy(o):{}:Jy(u),C.array.next({values:{...u}}),C.values.next({values:{...u}})}s={mount:n.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},g.mount=!A.isValid||!!n.keepIsValid||!!n.keepDirtyValues,g.watch=!!e.shouldUnregister,C.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!c&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||cw(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:c?{}:n.keepDirtyValues?n.keepDefaultValues&&a?mw(o,a):r.dirtyFields:n.keepDefaultValues&&t?mw(o,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>j(Ub(e)?e(a):e,t);return{control:{register:M,unregister:D,getFieldState:N,handleSubmit:F,setError:_,_executeSchema:v,_getWatch:w,_getDirty:b,_updateValid:d,_removeUnmounted:()=>{for(const e of s.unMount){const t=tb(i,e);t&&(t._f.refs?t._f.refs.every((e=>!dw(e))):!dw(t._f.ref))&&D(e)}s.unMount=new Set},_updateFieldArray:(e,t=[],s,l,I=!0,c=!0)=>{if(l&&s&&!n.disabled){if(g.action=!0,c&&Array.isArray(tb(i,e))){const t=s(tb(i,e),l.argA,l.argB);I&&ob(i,e,t)}if(c&&Array.isArray(tb(r.errors,e))){const t=s(tb(r.errors,e),l.argA,l.argB);I&&ob(r.errors,e,t),((e,t)=>{!$y(tb(e,t)).length&&sw(e,t)})(r.errors,e)}if(A.touchedFields&&c&&Array.isArray(tb(r.touchedFields,e))){const t=s(tb(r.touchedFields,e),l.argA,l.argB);I&&ob(r.touchedFields,e,t)}A.dirtyFields&&(r.dirtyFields=mw(o,a)),C.state.next({name:e,isDirty:b(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ob(a,e,t)},_updateDisabledField:P,_getFieldArray:t=>$y(tb(g.mount?a:o,t,e.shouldUnregister?tb(o,t,[]):[])),_reset:j,_resetDefaultValues:()=>Ub(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),C.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{nb(e)&&(C.state.next({disabled:e}),Bb(i,((t,n)=>{const r=tb(i,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:C,_proxyFormState:A,_setErrors:e=>{r.errors=e,C.state.next({errors:r.errors,isValid:!1})},get _fields(){return i},get _formValues(){return a},get _state(){return g},set _state(e){g=e},get _defaultValues(){return o},get _names(){return s},set _names(e){s=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:O,register:M,handleSubmit:F,watch:(e,t)=>Ub(e)?C.values.subscribe({next:n=>e(w(void 0,t),n)}):w(e,t,!0),setValue:k,getValues:R,reset:B,resetField:(e,t={})=>{tb(i,e)&&(eb(t.defaultValue)?k(e,Jy(tb(o,e))):(k(e,t.defaultValue),ob(o,e,Jy(t.defaultValue))),t.keepTouched||sw(r.touchedFields,e),t.keepDirty||(sw(r.dirtyFields,e),r.isDirty=t.defaultValue?b(e,Jy(tb(o,e))):b()),t.keepError||(sw(r.errors,e),A.isValid&&d()),C.state.next({...r}))},clearErrors:e=>{e&&kb(e).forEach((e=>sw(r.errors,e))),C.state.next({errors:e?r.errors:{}})},unregister:D,setError:_,setFocus:(e,t={})=>{const n=tb(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&Ub(e.select)&&e.select())}},getFieldState:N}}function Sw(e={}){const t=Jo.useRef(),n=Jo.useRef(),[r,i]=Jo.useState({isDirty:!1,isValidating:!1,isLoading:Ub(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ub(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...kw(e),formState:r});const o=t.current.control;return o._options=e,Tb({subject:o._subjects.state,next:e=>{Eb(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Jo.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),Jo.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),Jo.useEffect((()=>{e.values&&!cw(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),Jo.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),Jo.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),Jo.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=wb(r,o),t.current}function Tw(e){return Tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tw(e)}function Ow(e){var t=function(e,t){if("object"!=Tw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tw(t)?t:t+""}function Rw(e,t,n){return(t=Ow(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _w(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?tx(Cx,--lx):0,gx--,10===Ax&&(gx=1,ax--),Ax}function dx(){return Ax=lx2||mx(Ax)>3?"":" "}function xx(e,t){for(;--t&&dx()&&!(Ax<48||Ax>102||Ax>57&&Ax<65||Ax>70&&Ax<97););return px(e,fx()+(t<6&&32==hx()&&32==dx()))}function Ex(e){for(;dx();)switch(Ax){case e:return lx;case 34:case 39:34!==e&&39!==e&&Ex(Ax);break;case 40:41===e&&Ex(e);break;case 92:dx()}return lx}function kx(e,t){for(;dx()&&e+Ax!==57&&(e+Ax!==84||47!==hx()););return"/*"+px(t,lx-1)+"*"+Xw(47===e?e:dx())}function Sx(e){for(;!mx(hx());)dx();return px(e,lx)}var Tx="-ms-",Ox="-moz-",Rx="-webkit-",Nx="comm",_x="rule",Dx="decl",Px="@keyframes";function Mx(e,t){for(var n="",r=ix(e),i=0;i0&&rx(w)-C&&ox(c>32?Vx(w+";",r,n,C-1):Vx($w(w," ","")+";",r,n,C-2),s);break;case 59:w+=";";default:if(ox(b=Bx(w,t,n,l,A,i,g,m,v=[],y=[],C),o),123===p)if(0===A)jx(w,t,b,b,v,o,C,g,y);else switch(99===I&&110===tx(w,3)?100:I){case 100:case 108:case 109:case 115:jx(e,b,b,r&&ox(Bx(e,b,b,0,0,i,g,m,i,v=[],C),y),i,y,C,g,r?v:y);break;default:jx(w,b,b,b,[""],y,0,g,y)}}l=A=c=0,d=f=1,m=w="",C=a;break;case 58:C=1+rx(w),c=u;default:if(d<1)if(123==p)--d;else if(125==p&&0==d++&&125==ux())continue;switch(w+=Xw(p),p*d){case 38:f=A>0?1:(w+="\f",-1);break;case 44:g[l++]=(rx(w)-1)*f,f=1;break;case 64:45===hx()&&(w+=bx(dx())),I=hx(),A=C=rx(m=w+=Sx(fx())),p++;break;case 45:45===u&&2==rx(w)&&(d=0)}}return o}function Bx(e,t,n,r,i,o,a,g,s,l,A){for(var C=i-1,I=0===i?o:[""],c=ix(I),u=0,d=0,h=0;u0?I[f]+" "+p:$w(p,/&\f/g,I[f])))&&(s[h++]=m);return Ix(e,t,n,0===i?_x:g,s,l,A)}function zx(e,t,n){return Ix(e,t,n,Nx,Xw(Ax),nx(e,2,-2),0)}function Vx(e,t,n,r){return Ix(e,t,n,Dx,nx(e,0,r),nx(e,r+1,-1),r)}var Ux=function(e,t,n){for(var r=0,i=0;r=i,i=hx(),38===r&&12===i&&(t[n]=1),!mx(i);)dx();return px(e,lx)},Zx=function(e,t){return yx(function(e,t){var n=-1,r=44;do{switch(mx(r)){case 0:38===r&&12===hx()&&(t[n]=1),e[n]+=Ux(lx-1,t,n);break;case 2:e[n]+=bx(r);break;case 4:if(44===r){e[++n]=58===hx()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Xw(r)}}while(r=dx());return e}(vx(e),t))},Gx=new WeakMap,Wx=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Gx.get(n))&&!r){Gx.set(e,!0);for(var i=[],o=Zx(t,i),a=n.props,g=0,s=0;g6)switch(tx(e,t+1)){case 109:if(45!==tx(e,t+4))break;case 102:return $w(e,/(.+:)(.+)-([^]+)/,"$1"+Rx+"$2-$3$1"+Ox+(108==tx(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ex(e,"stretch")?Yx($w(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==tx(e,t+1))break;case 6444:switch(tx(e,rx(e)-3-(~ex(e,"!important")&&10))){case 107:return $w(e,":",":"+Rx)+e;case 101:return $w(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Rx+(45===tx(e,14)?"inline-":"")+"box$3$1"+Rx+"$2$3$1"+Tx+"$2box$3")+e}break;case 5936:switch(tx(e,t+11)){case 114:return Rx+e+Tx+$w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Rx+e+Tx+$w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Rx+e+Tx+$w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Rx+e+Tx+e+e}return e}var Kx=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Dx:e.return=Yx(e.value,e.length);break;case Px:return Mx([cx(e,{value:$w(e.value,"@","@"+Rx)})],r);case _x:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mx([cx(e,{props:[$w(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Mx([cx(e,{props:[$w(t,/:(plac\w+)/,":"+Rx+"input-$1")]}),cx(e,{props:[$w(t,/:(plac\w+)/,":-moz-$1")]}),cx(e,{props:[$w(t,/:(plac\w+)/,Tx+"input-$1")]})],r)}return""}))}}],Qx=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||Kx,a={},g=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+s;return{name:l,styles:i,next:aE}}var lE=!!$o.useInsertionEffect&&$o.useInsertionEffect,AE=lE||function(e){return e()},CE=(lE||Jo.useLayoutEffect,Jo.createContext("undefined"!=typeof HTMLElement?Qx({key:"css"}):null)),IE=(CE.Provider,function(e){return(0,Jo.forwardRef)((function(t,n){var r=(0,Jo.useContext)(CE);return e(t,r,n)}))}),cE=Jo.createContext({});var uE={}.hasOwnProperty,dE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",hE=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Xx(t,n,r),AE((function(){return function(e,t,n){Xx(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)})),null},fE=IE((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[dE],o=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var g=sE(o,void 0,Jo.useContext(cE));a+=t.key+"-"+g.name;var s={};for(var l in e)uE.call(e,l)&&"css"!==l&&l!==dE&&(s[l]=e[l]);return s.className=a,n&&(s.ref=n),Jo.createElement(Jo.Fragment,null,Jo.createElement(hE,{cache:t,serialized:g,isStringTag:"string"==typeof i}),Jo.createElement(i,s))})),pE=fE,mE=function(e,t){var n=arguments;if(null==t||!uE.call(t,"css"))return Jo.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=pE,i[1]=function(e,t){var n={};for(var r in t)uE.call(t,r)&&(n[r]=t[r]);return n[dE]=e,n}(e,t);for(var o=2;o({x:e,y:e});function kE(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function SE(){return"undefined"!=typeof window}function TE(e){return NE(e)?(e.nodeName||"").toLowerCase():"#document"}function OE(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function RE(e){var t;return null==(t=(NE(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function NE(e){return!!SE()&&(e instanceof Node||e instanceof OE(e).Node)}function _E(e){return!!SE()&&(e instanceof Element||e instanceof OE(e).Element)}function DE(e){return!!SE()&&(e instanceof HTMLElement||e instanceof OE(e).HTMLElement)}function PE(e){return!(!SE()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof OE(e).ShadowRoot)}function ME(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=jE(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function LE(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function FE(e){return["html","body","#document"].includes(TE(e))}function jE(e){return OE(e).getComputedStyle(e)}function BE(e){if("html"===TE(e))return e;const t=e.assignedSlot||e.parentNode||PE(e)&&e.host||RE(e);return PE(t)?t.host:t}function zE(e){const t=BE(e);return FE(t)?e.ownerDocument?e.ownerDocument.body:e.body:DE(t)&&ME(t)?t:zE(t)}function VE(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=zE(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=OE(i);if(o){const e=UE(a);return t.concat(a,a.visualViewport||[],ME(i)?i:[],e&&n?VE(e):[])}return t.concat(i,VE(i,[],n))}function UE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ZE(e){const t=jE(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=DE(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,g=wE(n)!==o||wE(r)!==a;return g&&(n=o,r=a),{width:n,height:r,$:g}}function GE(e){return _E(e)?e:e.contextElement}function WE(e){const t=GE(e);if(!DE(t))return EE(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ZE(t);let a=(o?wE(n.width):n.width)/r,g=(o?wE(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),g&&Number.isFinite(g)||(g=1),{x:a,y:g}}const HE=EE(0);function YE(e){const t=OE(e);return LE()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:HE}function KE(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=GE(e);let a=EE(1);t&&(r?_E(r)&&(a=WE(r)):a=WE(e));const g=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==OE(e))&&t}(o,n,r)?YE(o):EE(0);let s=(i.left+g.x)/a.x,l=(i.top+g.y)/a.y,A=i.width/a.x,C=i.height/a.y;if(o){const e=OE(o),t=r&&_E(r)?OE(r):r;let n=e,i=UE(n);for(;i&&r&&t!==n;){const e=WE(i),t=i.getBoundingClientRect(),r=jE(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,l*=e.y,A*=e.x,C*=e.y,s+=o,l+=a,n=OE(i),i=UE(n)}}return kE({width:A,height:C,x:s,y:l})}function QE(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:g="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,l=GE(e),A=i||o?[...l?VE(l):[],...VE(t)]:[];A.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const C=l&&g?function(e,t){let n,r=null;const i=RE(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(g,s){void 0===g&&(g=!1),void 0===s&&(s=1),o();const{left:l,top:A,width:C,height:I}=e.getBoundingClientRect();if(g||t(),!C||!I)return;const c={rootMargin:-xE(A)+"px "+-xE(i.clientWidth-(l+C))+"px "+-xE(i.clientHeight-(A+I))+"px "+-xE(l)+"px",threshold:bE(0,yE(1,s))||1};let u=!0;function d(e){const t=e[0].intersectionRatio;if(t!==s){if(!u)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}u=!1}try{r=new IntersectionObserver(d,{...c,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(d,c)}r.observe(e)}(!0),o}(l,n):null;let I,c=-1,u=null;a&&(u=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&u&&(u.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),n()})),l&&!s&&u.observe(l),u.observe(t));let d=s?KE(e):null;return s&&function t(){const r=KE(e);!d||r.x===d.x&&r.y===d.y&&r.width===d.width&&r.height===d.height||n();d=r,I=requestAnimationFrame(t)}(),n(),()=>{var e;A.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==C||C(),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(I)}}const XE=Jo.useLayoutEffect;var qE=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],JE=function(){};function $E(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ek(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i-1}function ok(e){return ik(e)?window.pageYOffset:e.scrollTop}function ak(e,t){ik(e)?window.scrollTo(0,t):e.scrollTop=t}function gk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:JE,i=ok(e),o=t-i,a=0;!function t(){var g=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,i,o,n);ak(e,g),an.bottom?ak(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i=u)return{placement:"bottom",maxHeight:t};if(x>=u&&!a)return o&&gk(s,E,S),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&b>=r)return o&&gk(s,E,S),{placement:"bottom",maxHeight:a?b-m:x-m};if("auto"===i||a){var T=t,O=a?y:w;return O>=r&&(T=Math.min(O-m-g,t)),{placement:"top",maxHeight:T}}if("bottom"===i)return o&&ak(s,E),{placement:"bottom",maxHeight:t};break;case"top":if(y>=u)return{placement:"top",maxHeight:t};if(w>=u&&!a)return o&&gk(s,k,S),{placement:"top",maxHeight:t};if(!a&&w>=r||a&&y>=r){var R=t;return(!a&&w>=r||a&&y>=r)&&(R=a?y-v:w-v),o&&gk(s,k,S),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return l}var mk,vk=function(e){return"auto"===e?"bottom":e},yk=(0,Jo.createContext)(null),bk=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,o=e.menuPosition,a=e.menuShouldScrollIntoView,g=e.theme,s=((0,Jo.useContext)(yk)||{}).setPortalPlacement,l=(0,Jo.useRef)(null),A=Mw((0,Jo.useState)(r),2),C=A[0],I=A[1],c=Mw((0,Jo.useState)(null),2),u=c[0],d=c[1],h=g.spacing.controlHeight;return XE((function(){var e=l.current;if(e){var t="fixed"===o,g=pk({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:h});I(g.maxHeight),d(g.placement),null==s||s(g.placement)}}),[r,i,o,a,n,s,h]),t({ref:l,placerProps:_w(_w({},e),{},{placement:u||vk(i),maxHeight:C})})},wk=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return mE("div",zw({},rk(e,"menu",{menu:!0}),{ref:n},r),t)},xk=function(e,t){var n=e.theme,r=n.spacing.baseUnit,i=n.colors;return _w({textAlign:"center"},t?{}:{color:i.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Ek=xk,kk=xk,Sk=["size"],Tk=["innerProps","isRtl","size"];var Ok={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Rk=function(e){var t=e.size,n=Fw(e,Sk);return mE("svg",zw({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ok},n))},Nk=function(e){return mE(Rk,zw({size:20},e),mE("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},_k=function(e){return mE(Rk,zw({size:20},e),mE("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Dk=function(e,t){var n=e.isFocused,r=e.theme,i=r.spacing.baseUnit,o=r.colors;return _w({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*i,":hover":{color:n?o.neutral80:o.neutral40}})},Pk=Dk,Mk=Dk,Lk=function(){var e=vE.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(mk||(mk=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Fk=function(e){var t=e.delay,n=e.offset;return mE("span",{css:vE({animation:"".concat(Lk," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},jk=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,o=e.innerProps,a=e.menuIsOpen;return mE("div",zw({ref:i},rk(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),o,{"aria-disabled":n||void 0}),t)},Bk=["data"],zk=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,o=e.Heading,a=e.headingProps,g=e.innerProps,s=e.label,l=e.theme,A=e.selectProps;return mE("div",zw({},rk(e,"group",{group:!0}),g),mE(o,zw({},a,{selectProps:A,theme:l,getStyles:r,getClassNames:i,cx:n}),s),mE("div",null,t))},Vk=["innerRef","isDisabled","isHidden","inputClassName"],Uk={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Zk={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_w({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Uk)},Gk=function(e){return _w({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Uk)},Wk=function(e){var t=e.children,n=e.innerProps;return mE("div",n,t)};var Hk=function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,o=e.isDisabled,a=e.removeProps,g=e.selectProps,s=n.Container,l=n.Label,A=n.Remove;return mE(s,{data:r,innerProps:_w(_w({},rk(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:g},mE(l,{data:r,innerProps:_w({},rk(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:g},t),mE(A,{data:r,innerProps:_w(_w({},rk(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:g}))},Yk={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return mE("div",zw({},rk(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||mE(Nk,null))},Control:jk,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return mE("div",zw({},rk(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||mE(_k,null))},DownChevron:_k,CrossIcon:Nk,Group:zk,GroupHeading:function(e){var t=nk(e);t.data;var n=Fw(t,Bk);return mE("div",zw({},rk(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return mE("div",zw({},rk(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return mE("span",zw({},t,rk(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=nk(e),i=r.innerRef,o=r.isDisabled,a=r.isHidden,g=r.inputClassName,s=Fw(r,Vk);return mE("div",zw({},rk(e,"input",{"input-container":!0}),{"data-value":n||""}),mE("input",zw({className:t({input:!0},g),ref:i,style:Gk(a),disabled:o},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=void 0===r?4:r,o=Fw(e,Tk);return mE("div",zw({},rk(_w(_w({},o),{},{innerProps:t,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),mE(Fk,{delay:0,offset:n}),mE(Fk,{delay:160,offset:!0}),mE(Fk,{delay:320,offset:!n}))},Menu:wk,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,i=e.isMulti;return mE("div",zw({},rk(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,o=e.menuPlacement,a=e.menuPosition,g=(0,Jo.useRef)(null),s=(0,Jo.useRef)(null),l=Mw((0,Jo.useState)(vk(o)),2),A=l[0],C=l[1],I=(0,Jo.useMemo)((function(){return{setPortalPlacement:C}}),[]),c=Mw((0,Jo.useState)(null),2),u=c[0],d=c[1],h=(0,Jo.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[A]+t;n===(null==u?void 0:u.offset)&&e.left===(null==u?void 0:u.rect.left)&&e.width===(null==u?void 0:u.rect.width)||d({offset:n,rect:e})}}),[r,a,A,null==u?void 0:u.offset,null==u?void 0:u.rect.left,null==u?void 0:u.rect.width]);XE((function(){h()}),[h]);var f=(0,Jo.useCallback)((function(){"function"==typeof s.current&&(s.current(),s.current=null),r&&g.current&&(s.current=QE(r,g.current,h,{elementResize:"ResizeObserver"in window}))}),[r,h]);XE((function(){f()}),[f]);var p=(0,Jo.useCallback)((function(e){g.current=e,f()}),[f]);if(!t&&"fixed"!==a||!u)return null;var m=mE("div",zw({ref:p},rk(_w(_w({},e),{},{offset:u.offset,position:a,rect:u.rect}),"menuPortal",{"menu-portal":!0}),i),n);return mE(yk.Provider,{value:I},t?(0,cu.createPortal)(m,t):m)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,i=Fw(e,fk);return mE("div",zw({},rk(_w(_w({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,i=Fw(e,hk);return mE("div",zw({},rk(_w(_w({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:Hk,MultiValueContainer:Wk,MultiValueLabel:Wk,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return mE("div",zw({role:"button"},n),t||mE(Nk,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,o=e.innerRef,a=e.innerProps;return mE("div",zw({},rk(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:o,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return mE("div",zw({},rk(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,i=e.isRtl;return mE("div",zw({},rk(e,"container",{"--is-disabled":r,"--is-rtl":i}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return mE("div",zw({},rk(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,i=e.hasValue;return mE("div",zw({},rk(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),t)}},Kk=function(e){return _w(_w({},Yk),e.components)},Qk=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Xk(e,t){return e===t||!(!Qk(e)||!Qk(t))}function qk(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,i=e.label,o=void 0===i?"":i,a=e.selectValue,g=e.isDisabled,s=e.isSelected,l=e.isAppleDevice,A=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(o," focused, ").concat(A(a,n),".");if("menu"===t&&l){var C=g?" disabled":"",I="".concat(s?" selected":"").concat(C);return"".concat(o).concat(I,", ").concat(A(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},nS=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,o=e.isFocused,a=e.selectValue,g=e.selectProps,s=e.id,l=e.isAppleDevice,A=g.ariaLiveMessages,C=g.getOptionLabel,I=g.inputValue,c=g.isMulti,u=g.isOptionDisabled,d=g.isSearchable,h=g.menuIsOpen,f=g.options,p=g.screenReaderStatus,m=g.tabSelectsValue,v=g.isLoading,y=g["aria-label"],b=g["aria-live"],w=(0,Jo.useMemo)((function(){return _w(_w({},tS),A||{})}),[A]),x=(0,Jo.useMemo)((function(){var e,n="";if(t&&w.onChange){var r=t.option,i=t.options,o=t.removedValue,g=t.removedValues,s=t.value,l=o||r||(e=s,Array.isArray(e)?null:e),A=l?C(l):"",I=i||g||void 0,c=I?I.map(C):[],d=_w({isDisabled:l&&u(l,a),label:A,labels:c},t);n=w.onChange(d)}return n}),[t,w,u,a,C]),E=(0,Jo.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&w.onFocus){var g={focused:t,label:C(t),isDisabled:u(t,a),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:a,isAppleDevice:l};e=w.onFocus(g)}return e}),[n,r,C,u,w,i,a,l]),k=(0,Jo.useMemo)((function(){var e="";if(h&&f.length&&!v&&w.onFilter){var t=p({count:i.length});e=w.onFilter({inputValue:I,resultsMessage:t})}return e}),[i,I,h,w,f,p,v]),S="initial-input-focus"===(null==t?void 0:t.action),T=(0,Jo.useMemo)((function(){var e="";if(w.guidance){var t=r?"value":h?"menu":"input";e=w.guidance({"aria-label":y,context:t,isDisabled:n&&u(n,a),isMulti:c,isSearchable:d,tabSelectsValue:m,isInitialFocus:S})}return e}),[y,n,r,c,u,d,h,w,a,m,S]),O=mE(Jo.Fragment,null,mE("span",{id:"aria-selection"},x),mE("span",{id:"aria-focused"},E),mE("span",{id:"aria-results"},k),mE("span",{id:"aria-guidance"},T));return mE(Jo.Fragment,null,mE(eS,{id:s},S&&O),mE(eS,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!S&&O))},rS=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],iS=new RegExp("["+rS.map((function(e){return e.letters})).join("")+"]","g"),oS={},aS=0;aS1?t-1:0),r=1;r0,d=C-I-A,h=!1;d>t&&a.current&&(r&&r(e),a.current=!1),u&&g.current&&(o&&o(e),g.current=!1),u&&t>d?(n&&!a.current&&n(e),c.scrollTop=C,h=!0,a.current=!0):!u&&-t>A&&(i&&!g.current&&i(e),c.scrollTop=0,h=!0,g.current=!0),h&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,i,o]),C=(0,Jo.useCallback)((function(e){A(e,e.deltaY)}),[A]),I=(0,Jo.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),c=(0,Jo.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;A(e,t)}),[A]),u=(0,Jo.useCallback)((function(e){if(e){var t=!!ck&&{passive:!1};e.addEventListener("wheel",C,t),e.addEventListener("touchstart",I,t),e.addEventListener("touchmove",c,t)}}),[c,I,C]),d=(0,Jo.useCallback)((function(e){e&&(e.removeEventListener("wheel",C,!1),e.removeEventListener("touchstart",I,!1),e.removeEventListener("touchmove",c,!1))}),[c,I,C]);return(0,Jo.useEffect)((function(){if(t){var e=l.current;return u(e),function(){d(e)}}}),[t,u,d]),function(e){l.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,Jo.useRef)({}),o=(0,Jo.useRef)(null),a=(0,Jo.useCallback)((function(e){if(yS){var t=document.body,n=t&&t.style;if(r&&dS.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&bS<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,g=window.innerWidth-a+o||0;Object.keys(hS).forEach((function(e){var t=hS[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(g,"px"))}t&&vS()&&(t.addEventListener("touchmove",fS,wS),e&&(e.addEventListener("touchstart",mS,wS),e.addEventListener("touchmove",pS,wS))),bS+=1}}),[r]),g=(0,Jo.useCallback)((function(e){if(yS){var t=document.body,n=t&&t.style;bS=Math.max(bS-1,0),r&&bS<1&&dS.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&vS()&&(t.removeEventListener("touchmove",fS,wS),e&&(e.removeEventListener("touchstart",mS,wS),e.removeEventListener("touchmove",pS,wS)))}}),[r]);return(0,Jo.useEffect)((function(){if(t){var e=o.current;return a(e),function(){g(e)}}}),[t,a,g]),function(e){o.current=e}}({isEnabled:n});return mE(Jo.Fragment,null,n&&mE("div",{onClick:xS,css:ES}),t((function(e){i(e),o(e)})))}var SS={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},TS=function(e){var t=e.name,n=e.onFocus;return mE("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:SS,value:"",onChange:function(){}})};function OS(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function RS(){return OS(/^Mac/i)}function NS(){return OS(/^iPhone/i)||OS(/^iPad/i)||RS()&&navigator.maxTouchPoints>1}var _S={clearIndicator:Mk,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.theme,o=i.colors,a=i.borderRadius;return _w({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},dropdownIndicator:Pk,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,i=n.spacing;return _w({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*i.baseUnit,paddingRight:3*i.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing.baseUnit,o=r.colors;return _w({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*i,marginTop:2*i})},input:function(e,t){var n=e.isDisabled,r=e.value,i=e.theme,o=i.spacing,a=i.colors;return _w(_w({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Zk),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,i=e.theme,o=i.colors,a=i.spacing.baseUnit;return _w({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*a})},loadingMessage:kk,menu:function(e,t){var n,r=e.placement,i=e.theme,o=i.borderRadius,a=i.spacing,g=i.colors;return _w((Rw(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Rw(n,"position","absolute"),Rw(n,"width","100%"),Rw(n,"zIndex",1),n),t?{}:{backgroundColor:g.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return _w({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,o=n.colors;return _w({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,i=n.colors,o=e.cropWithEllipsis;return _w({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,o=n.colors,a=e.isFocused;return _w({alignItems:"center",display:"flex"},t?{}:{borderRadius:i/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:Ek,option:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.isSelected,o=e.theme,a=o.spacing,g=o.colors;return _w({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:i?g.primary:r?g.primary25:"transparent",color:n?g.neutral20:i?g.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:i?g.primary:g.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,i=n.colors;return _w({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing,o=r.colors;return _w({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return _w({alignItems:"center",display:r&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var DS={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},PS={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:lk(),captureMenuScroll:!lk(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=_w({ignoreCase:!0,ignoreAccents:!0,stringify:IS,trim:!0,matchFrom:"any"},e),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,g=r.trim,s=r.matchFrom,l=g?CS(n):n,A=g?CS(a(t)):a(t);return i&&(l=l.toLowerCase(),A=A.toLowerCase()),o&&(l=AS(l),A=lS(A)),"start"===s?A.substr(0,l.length)===l:A.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function MS(e,t,n,r){return{type:"option",data:t,isDisabled:ZS(e,t,n),isSelected:GS(e,t,n),label:VS(e,t),value:US(e,t),index:r}}function LS(e,t){return e.options.map((function(n,r){if("options"in n){var i=n.options.map((function(n,r){return MS(e,n,t,r)})).filter((function(t){return BS(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=MS(e,n,t,r);return BS(e,o)?o:void 0})).filter(uk)}function FS(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Yw(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function jS(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,Yw(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function BS(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,o=t.isSelected,a=t.label,g=t.value;return(!HS(e)||!o)&&WS(e,{label:a,value:g,data:i},r)}var zS=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},VS=function(e,t){return e.getOptionLabel(t)},US=function(e,t){return e.getOptionValue(t)};function ZS(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function GS(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=US(e,t);return n.some((function(t){return US(e,t)===r}))}function WS(e,t,n){return!e.filterOption||e.filterOption(t,n)}var HS=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},YS=1,KS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uw(e,t)}(n,e);var t=Hw(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=RS()||NS(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e,t,n){var i=r.props,o=i.closeMenuOnSelect,a=i.isMulti,g=i.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:g}),o&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=t.name,a=r.state.selectValue,g=i&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(g){var l=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==l})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:o});i?r.setValue([].concat(Yw(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==i})),a=dk(t,o,o[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(dk(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),o=dk(e,i,i[0]||null);n&&r.onChange(o,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return zS(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return jS(LS(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return HS(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,g=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,A=t.onKeyDown,C=t.tabSelectsValue,I=t.openMenuOnFocus,c=r.state,u=c.focusedOption,d=c.focusedValue,h=c.selectValue;if(!(s||"function"==typeof A&&(A(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(d)r.removeValue(d);else{if(!i)return;n?r.popValue():g&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!C||!u||I&&r.isOptionSelected(u,h))return;r.selectOption(u);break;case"Enter":if(229===e.keyCode)break;if(l){if(!u)return;if(r.isComposing)return;r.selectOption(u);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):g&&o&&r.clearValue();break;case" ":if(a)return;if(!l){r.openMenu("first");break}if(!u)return;r.selectOption(u);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++YS),r.state.selectValue=tk(e.value),e.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),o=r.buildFocusableOptions(),a=o.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=o[a],r.state.focusedOptionId=zS(i,o[a])}return r}return function(e,t,n){t&&Vw(e.prototype,t),n&&Vw(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sk(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),a="first"===e?0:o.length-1;if(!this.props.isMulti){var g=o.indexOf(r[0]);g>-1&&(a=g)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[a],focusedOptionId:this.getFocusedOptionId(o[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===e?i=o>0?o-1:r.length-1:"down"===e?i=(o+1)%r.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[i])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(DS):_w(_w({},DS),this.props.theme):DS}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,i=this.getValue,o=this.selectOption,a=this.setValue,g=this.props,s=g.isMulti,l=g.isRtl,A=g.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:i,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:A,selectOption:o,selectProps:g,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ZS(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return GS(this.props,e,t)}},{key:"filterOption",value:function(e,t){return WS(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,a=e.form,g=e.menuIsOpen,s=e.required,l=this.getComponents().Input,A=this.state,C=A.inputIsHidden,I=A.ariaSelection,c=this.commonProps,u=r||this.getElementId("input"),d=_w(_w(_w({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":s,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==I?void 0:I.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Jo.createElement(l,zw({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:C,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:a,type:"text",value:i},d)):Jo.createElement(uS,zw({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:JE,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:a,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,a=t.SingleValue,g=t.Placeholder,s=this.commonProps,l=this.props,A=l.controlShouldRenderValue,C=l.isDisabled,I=l.isMulti,c=l.inputValue,u=l.placeholder,d=this.state,h=d.selectValue,f=d.focusedValue,p=d.isFocused;if(!this.hasValue()||!A)return c?null:Jo.createElement(g,zw({},s,{key:"placeholder",isDisabled:C,isFocused:p,innerProps:{id:this.getElementId("placeholder")}}),u);if(I)return h.map((function(t,a){var g=t===f,l="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Jo.createElement(n,zw({},s,{components:{Container:r,Label:i,Remove:o},isFocused:g,isDisabled:C,key:l,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(c)return null;var m=h[0];return Jo.createElement(a,zw({},s,{data:m,isDisabled:C}),this.formatOptionLabel(m,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Jo.createElement(e,zw({},t,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!e||!i)return null;return Jo.createElement(e,zw({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return Jo.createElement(n,zw({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Jo.createElement(e,zw({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,a=t.MenuPortal,g=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,A=this.commonProps,C=this.state.focusedOption,I=this.props,c=I.captureMenuScroll,u=I.inputValue,d=I.isLoading,h=I.loadingMessage,f=I.minMenuHeight,p=I.maxMenuHeight,m=I.menuIsOpen,v=I.menuPlacement,y=I.menuPosition,b=I.menuPortalTarget,w=I.menuShouldBlockScroll,x=I.menuShouldScrollIntoView,E=I.noOptionsMessage,k=I.onMenuScrollToTop,S=I.onMenuScrollToBottom;if(!m)return null;var T,O=function(t,n){var r=t.type,i=t.data,o=t.isDisabled,a=t.isSelected,g=t.label,s=t.value,I=C===i,c=o?void 0:function(){return e.onOptionHover(i)},u=o?void 0:function(){return e.selectOption(i)},d="".concat(e.getElementId("option"),"-").concat(n),h={id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return Jo.createElement(l,zw({},A,{innerProps:h,data:i,isDisabled:o,isSelected:a,key:d,label:g,type:r,value:s,isFocused:I,innerRef:I?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,o=t.options,a=t.index,g="".concat(e.getElementId("group"),"-").concat(a),s="".concat(g,"-heading");return Jo.createElement(n,zw({},A,{key:g,data:i,options:o,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return O(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return O(t,"".concat(t.index))}));else if(d){var R=h({inputValue:u});if(null===R)return null;T=Jo.createElement(g,A,R)}else{var N=E({inputValue:u});if(null===N)return null;T=Jo.createElement(s,A,N)}var _={minMenuHeight:f,maxMenuHeight:p,menuPlacement:v,menuPosition:y,menuShouldScrollIntoView:x},D=Jo.createElement(bk,zw({},A,_),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,g=r.maxHeight;return Jo.createElement(i,zw({},A,_,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:d,placement:a}),Jo.createElement(kS,{captureEnabled:c,onTopArrive:k,onBottomArrive:S,lockEnabled:w},(function(t){return Jo.createElement(o,zw({},A,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":A.isMulti,id:e.getElementId("listbox")},isLoading:d,maxHeight:g,focusedOption:C}),T)})))}));return b||"fixed"===y?Jo.createElement(a,zw({},A,{appendTo:b,controlElement:this.controlRef,menuPlacement:v,menuPosition:y}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=t.required,g=this.state.selectValue;if(a&&!this.hasValue()&&!r)return Jo.createElement(TS,{name:o,onFocus:this.onValueInputFocus});if(o&&!r){if(i){if(n){var s=g.map((function(t){return e.getOptionValue(t)})).join(n);return Jo.createElement("input",{name:o,type:"hidden",value:s})}var l=g.length>0?g.map((function(t,n){return Jo.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):Jo.createElement("input",{name:o,type:"hidden",value:""});return Jo.createElement("div",null,l)}var A=g[0]?this.getOptionValue(g[0]):"";return Jo.createElement("input",{name:o,type:"hidden",value:A})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.isFocused,a=t.selectValue,g=this.getFocusableOptions();return Jo.createElement(nS,zw({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:o,selectValue:a,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,g=o.id,s=o.isDisabled,l=o.menuIsOpen,A=this.state.isFocused,C=this.commonProps=this.getCommonProps();return Jo.createElement(r,zw({},C,{className:a,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:A}),this.renderLiveRegion(),Jo.createElement(t,zw({},C,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:A,menuIsOpen:l}),Jo.createElement(i,zw({},C,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),Jo.createElement(n,zw({},C,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,a=t.isFocused,g=t.prevWasFocused,s=t.instancePrefix,l=e.options,A=e.value,C=e.menuIsOpen,I=e.inputValue,c=e.isMulti,u=tk(A),d={};if(n&&(A!==n.value||l!==n.options||C!==n.menuIsOpen||I!==n.inputValue)){var h=C?function(e,t){return FS(LS(e,t))}(e,u):[],f=C?jS(LS(e,u),"".concat(s,"-option")):[],p=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,h);d={selectValue:u,focusedOption:m,focusedOptionId:zS(f,m),focusableOptionsWithIds:f,focusedValue:p,clearFocusValueOnUpdate:!1}}var v=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},y=o,b=a&&g;return a&&!b&&(y={value:dk(c,u,u[0]||null),options:u,action:"initial-input-focus"},b=!g),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),_w(_w(_w({},d),v),{},{prevProps:e,ariaSelection:y,prevWasFocused:b})}}]),n}(Jo.Component);KS.defaultProps=PS;var QS=(0,Jo.forwardRef)((function(e,t){var n=Bw(e);return Jo.createElement(KS,zw({ref:t},n))}));function XS(){return XS=Object.assign?Object.assign.bind():function(e){for(var t=1;te.map((e=>({label:e,value:e}))),JS=e=>{let{type:t,manufacturer:n,supplier:r,mounting_style:i,farads:o,ohms:a,register:g,handleSubmit:s,control:l,onSubmit:A}=e;const C=Nb({control:l,defaultValue:"",name:"type"}),I=(e,t,n,r)=>Jo.createElement("div",{className:"flex flex-col w-full",key:t},Jo.createElement("label",{className:"block mb-2 font-semibold text-gray-700 text-md",htmlFor:t},e),Jo.createElement(Db,{control:r,defaultValue:null,name:t,render:e=>{let{field:t}=e;return Jo.createElement(QS,{isClearable:!0,onChange:e=>t.onChange(null==e?void 0:e.value),options:[{label:"All",value:"all"},...n],value:n.find((e=>e.value===t.value))})}}));return Jo.createElement("form",{onSubmit:s(A)},Jo.createElement("div",{className:"flex flex-col gap-6 -mx-2 w-full"},Jo.createElement("div",{className:"w-full px-2"},Jo.createElement("label",{className:"block mb-2 font-semibold text-gray-700 text-md",htmlFor:"search"},"Search"),Jo.createElement("input",XS({type:"text"},g("search"),{autoComplete:"off",className:"w-full h-10 pl-2 border border-gray-300 rounded-md focus:border-brandgreen-500 focus:ring-1 focus:ring-brandgreen-500",id:"search",placeholder:"Search"}))),Jo.createElement("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 w-full px-2"},I("Type","type",qS(t),l),I("Manufacturer","manufacturer",n,l),I("Supplier","supplier",r,l),I("Mounting Style","mounting_style",i,l),"Capacitor"===C&&I("Farads","farads",qS(o),l),"Resistor"===C&&I("Ohms","ohms",qS(a),l)),Jo.createElement("div",{className:"w-full px-2 md:w-1/2 lg:w-1/3"},Jo.createElement("button",{className:"inline-flex items-center px-4 py-2 text-base font-medium text-white border border-transparent rounded-md bg-brandgreen-500 hover:bg-brandgreen-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brandgreen-500",type:"submit"},"Search"))))},$S=(Object.freeze({AUD:"Australian Dollar",BRL:"Brazilian Real",CAD:"Canadian Dollar",CHF:"Swiss Franc",CNH:"Chinese Yuan",CZK:"Czech Koruna",DKK:"Danish Krone",EUR:"Euro",GBP:"British Pound",HKD:"Hong Kong Dollar",HUF:"Hungarian Forint",IDR:"Indonesian Rupiah",INR:"Indian Rupee",ILS:"Israeli New Shekel",JPY:"Japanese Yen",KRW:"South Korean Won",MXN:"Mexican Peso",MYR:"Malaysian Ringgit",NOK:"Norwegian Krone",NZD:"New Zealand Dollar",PHP:"Philippine Peso",PLN:"Polish Złoty",QAR:"Qatari Riyal",RUB:"Russian Ruble",SAR:"Saudi Riyal",SEK:"Swedish Krona",SGD:"Singapore Dollar",THB:"Thai Baht",TRY:"Turkish Lira",USD:"US Dollar",ZAR:"South African Rand",AED:"UAE Dirham"}),function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";"number"!=typeof e&&(e=parseFloat(e)),isNaN(e)&&(e=0);const r=null!==(t={AUD:2,BRL:2,CAD:2,CHF:2,CNH:2,CZK:2,DKK:2,EUR:2,GBP:2,HKD:2,HUF:0,IDR:0,INR:2,ILS:2,JPY:0,KRW:0,MXN:2,MYR:2,NOK:2,NZD:2,PHP:2,PLN:2,QAR:2,RUB:2,SAR:2,SEK:2,SGD:2,THB:2,TRY:2,USD:2,ZAR:2,AED:2}[n])&&void 0!==t?t:2;return e.toFixed(r)}),eT=e=>{let{page:t=1,search:n,filters:r={},order:i}=e;const o=BI(),{data:a,isLoading:g,isError:s}=Jv({queryFn:async()=>(await Fv.get("/api/components/",{params:{page:t,search:n,...r,order:i}})).data,queryKey:["getComponents",JSON.stringify({filters:r,order:i,page:t,search:n})]});return{componentsAreError:s,componentsAreLoading:g,componentsData:a,refetchComponents:e=>{let{newPage:t,newSearch:n,newFilters:r,newOrder:i}=e;const a=["getComponents",JSON.stringify({filters:r,order:i,page:t,search:n})];o.invalidateQueries({queryKey:a})}}};let tT=function(e){return e.USD="USD",e.EUR="EUR",e.JPY="JPY",e.GBP="GBP",e.AUD="AUD",e.CAD="CAD",e.CHF="CHF",e.CNY="CNY",e.HKD="HKD",e.NZD="NZD",e.SEK="SEK",e.KRW="KRW",e.SGD="SGD",e.NOK="NOK",e.INR="INR",e}({});const nT={AUD:{name:"Australian Dollar",symbol:"A$"},CAD:{name:"Canadian Dollar",symbol:"C$"},CHF:{name:"Swiss Franc",symbol:"CHF"},CNY:{name:"Chinese Yuan",symbol:"¥"},EUR:{name:"Euro",symbol:"€"},GBP:{name:"British Pound",symbol:"£"},HKD:{name:"Hong Kong Dollar",symbol:"HK$"},INR:{name:"Indian Rupee",symbol:"₹"},JPY:{name:"Japanese Yen",symbol:"¥"},KRW:{name:"South Korean Won",symbol:"₩"},NOK:{name:"Norwegian Krone",symbol:"kr"},NZD:{name:"New Zealand Dollar",symbol:"NZ$"},SEK:{name:"Swedish Krona",symbol:"kr"},SGD:{name:"Singapore Dollar",symbol:"S$"},USD:{name:"US Dollar",symbol:"$"}},rT=e=>Object.keys(nT).includes(e),iT=()=>{const e=fp.get("csrftoken");return Jv({queryFn:async()=>{try{const t=await Fv.get("/api/currency/",{headers:{"X-CSRFToken":e||""},withCredentials:!0}),n=t.data.default_currency;if(!rT(n))throw new Error("Invalid currency received from the server.");return localStorage.setItem("currency",n),{...t.data,currency_name:nT[n].name,currency_symbol:nT[n].symbol}}catch(e){const t=localStorage.getItem("currency")||"USD";if(!rT(t))throw new Error("Invalid currency found in localStorage");return{currency_name:nT[t].name,currency_symbol:nT[t].symbol,default_currency:t,exchange_rate:1}}},queryKey:["userCurrency"],retry:!1,staleTime:0})};function oT(){return oT=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function gT(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const sT=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map;const lT=$o.startTransition;uu.flushSync,$o.useId;function AT(e){let{basename:t,children:n,future:r,window:i}=e,o=Jo.useRef();null==o.current&&(o.current=function(e){return void 0===e&&(e={}),zA((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return FA("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:jA(t)}),null,e)}({window:i,v5Compat:!0}));let a=o.current,[g,s]=Jo.useState({action:a.action,location:a.location}),{v7_startTransition:l}=r||{},A=Jo.useCallback((e=>{l&&lT?lT((()=>s(e))):s(e)}),[s,l]);return Jo.useLayoutEffect((()=>a.listen(A)),[a,A]),Jo.useEffect((()=>UC(r)),[r]),Jo.createElement(WC,{basename:t,children:n,location:g.location,navigationType:g.action,navigator:a,future:r})}const CT="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,IT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cT=Jo.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:o,replace:a,state:g,target:s,to:l,preventScrollReset:A,viewTransition:C}=e,I=aT(e,sT),{basename:c}=Jo.useContext(pC),u=!1;if("string"==typeof l&&IT.test(l)&&(n=l,CT))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),n=rC(t.pathname,c);t.origin===e.origin&&null!=n?l=n+t.search+t.hash:u=!0}catch(e){}let d=function(e,t){let{relative:n}=void 0===t?{}:t;bC()||PA(!1);let{basename:r,navigator:i}=Jo.useContext(pC),{hash:o,pathname:a,search:g}=SC(e,{relative:n}),s=a;return"/"!==r&&(s="/"===a?r:sC([r,a])),i.createHref({pathname:s,search:g,hash:o})}(l,{relative:i}),h=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:g}=void 0===t?{}:t,s=EC(),l=wC(),A=SC(e,{relative:a});return Jo.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:jA(l)===jA(A);s(e,{replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:g})}}),[l,s,A,r,i,n,e,o,a,g])}(l,{replace:a,state:g,target:s,preventScrollReset:A,relative:i,viewTransition:C});return Jo.createElement("a",oT({},I,{href:n||d,onClick:u||o?r:function(e){r&&r(e),e.defaultPrevented||h(e)},ref:t,target:s}))}));var uT,dT;function hT(e){let t=Jo.useRef(gT(e)),n=Jo.useRef(!1),r=wC(),i=Jo.useMemo((()=>function(e,t){let n=gT(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),o=EC(),a=Jo.useCallback(((e,t)=>{const r=gT("function"==typeof e?e(i):e);n.current=!0,o("?"+r,t)}),[o,i]);return[i,a]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(uT||(uT={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(dT||(dT={}));function fT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Uw(e,t)}const pT=!1,mT=Jo.createContext(null);var vT="unmounted",yT="exited",bT="entering",wT="entered",xT="exiting",ET=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=yT,r.appearStatus=bT):i=wT:i=t.unmountOnExit||t.mountOnEnter?vT:yT,r.state={status:i},r.nextCallback=null,r}fT(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===vT?{status:yT}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==bT&&n!==wT&&(t=bT):n!==bT&&n!==wT||(t=xT)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===bT){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:cu.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===yT&&this.setState({status:vT})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[cu.findDOMNode(this),r],o=i[0],a=i[1],g=this.getTimeouts(),s=r?g.appear:g.enter;!e&&!n||pT?this.safeSetState({status:wT},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:bT},(function(){t.props.onEntering(o,a),t.onTransitionEnd(s,(function(){t.safeSetState({status:wT},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:cu.findDOMNode(this);t&&!pT?(this.props.onExit(r),this.safeSetState({status:xT},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:yT},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:yT},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:cu.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===vT)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Lw(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return Jo.createElement(mT.Provider,{value:null},"function"==typeof n?n(e,r):Jo.cloneElement(Jo.Children.only(n),r))},t}(Jo.Component);function kT(){}ET.contextType=mT,ET.propTypes={},ET.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kT,onEntering:kT,onEntered:kT,onExit:kT,onExiting:kT,onExited:kT},ET.UNMOUNTED=vT,ET.EXITED=yT,ET.ENTERING=bT,ET.ENTERED=wT,ET.EXITING=xT;const ST=ET;function TT(e,t){var n=Object.create(null);return e&&Jo.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,Jo.isValidElement)(e)?t(e):e}(e)})),n}function OT(e,t,n){return null!=n[t]?n[t]:e.props[t]}function RT(e,t,n){var r=TT(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var g={};for(var s in t){if(i[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{}}),t=e.Input,n=e.MultiValue,r=e.Placeholder,i=e.SingleValue,o=e.ValueContainer,a=Fw(e,KT);return _w({Input:MT(t),MultiValue:zT(n),Placeholder:VT(r),SingleValue:UT(i),ValueContainer:YT(o)},a)},XT=QT(),qT=(XT.Input,XT.MultiValue,XT.Placeholder,XT.SingleValue,XT.ValueContainer,Jk(QT));function JT({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const $T=Jo.forwardRef(JT);function eO(){return eO=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t,n;let{clearErrors:r,control:i,register:o,suppliers:a,errors:g}=e;const{fields:s,append:l,remove:A}=Aw({control:i,name:"supplier_items"}),C=Jo.createElement("span",{className:"text-red-500"},"*");return Jo.createElement("div",{className:"md:col-span-2"},Jo.createElement("h4",{className:"text-sm font-medium text-gray-700 mb-1.5"},"Supplier Items ",C),(null===(t=g.supplier_items)||void 0===t?void 0:t.message)&&Jo.createElement("p",{className:"text-red-500 text-sm"},g.supplier_items.message),(null!=s?s:[]).map(((e,t)=>{var n,r,s,l,I,c,u,d,h,f;return Jo.createElement("div",{className:"border p-4 rounded-md mb-4",key:e.id},0===t&&Jo.createElement("div",{className:"mb-3"},Jo.createElement(ky,{icon:!0,padding:"compact",variant:"info"},Jo.createElement("p",{className:"text-xs text-blue-500"},"Suppliers are vendors where you can purchase components, such as Mouser or DigiKey, in contrast to manufacturers who produce the components. Please add one or more suppliers."))),Jo.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6"},Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:`supplier_items.${t}.supplier`},"Supplier ",C),Jo.createElement(Db,{control:i,name:`supplier_items.${t}.supplier`,render:e=>{let{field:t}=e;return Jo.createElement(QS,eO({},t,{className:"react-select-container",classNamePrefix:"react-select",options:a.map((e=>({label:e.name,value:e.id}))),placeholder:"Select Supplier"}))},rules:{required:"Supplier is required"}}),(null==g||null===(n=g.supplier_items)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.supplier)&&Jo.createElement("p",{className:"text-red-500 text-sm"}," ",g.supplier_items[t].supplier.message," ")),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:`supplier_items.${t}.supplier_item_no`},"Supplier Item No. ",C),Jo.createElement("input",eO({},o(`supplier_items.${t}.supplier_item_no`,{required:"Supplier Item No. is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:`supplier_items.${t}.supplier_item_no`,type:"text"})),(null==g||null===(s=g.supplier_items)||void 0===s||null===(l=s[t])||void 0===l?void 0:l.supplier_item_no)&&Jo.createElement("p",{className:"text-red-500 text-sm"},g.supplier_items[t].supplier_item_no.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:`supplier_items.${t}.price`},"Price ",C),Jo.createElement("input",eO({},o(`supplier_items.${t}.price`,{min:{message:"Price must be greater than 0",value:.01},required:"Price is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:`supplier_items.${t}.price`,step:"0.01",type:"number"})),(null===(I=g.supplier_items)||void 0===I||null===(c=I[t])||void 0===c?void 0:c.price)&&Jo.createElement("p",{className:"text-red-500 text-sm"},g.supplier_items[t].price.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:`supplier_items.${t}.currency`},"Currency ",C),Jo.createElement("select",eO({},o(`supplier_items.${t}.currency`,{required:"Currency is required"}),{className:"w-full p-2 border border-gray-300 rounded"}),Object.entries(nT).map((e=>{let[t,{name:n}]=e;return Jo.createElement("option",{key:t,value:t},n," (",t,")")}))),(null===(u=g.supplier_items)||void 0===u||null===(d=u[t])||void 0===d?void 0:d.currency)&&Jo.createElement("p",{className:"text-red-500 text-sm"},g.supplier_items[t].currency.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:`supplier_items.${t}.link`},"Link ",C),Jo.createElement("input",eO({},o(`supplier_items.${t}.link`,{pattern:{message:"Invalid URL",value:/^(https?:\/\/)?([\w\d\-]+\.)+[\w\d]{2,}(\/.*)?\/?$/},required:"Link is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:`supplier_items.${t}.link`,type:"url"})),(null===(h=g.supplier_items)||void 0===h||null===(f=h[t])||void 0===f?void 0:f.link)&&Jo.createElement("p",{className:"text-red-500 text-sm"},g.supplier_items[t].link.message)),Jo.createElement("div",{className:"md:col-span-3 flex justify-end"},Jo.createElement("button",{className:"mt-2 text-sm text-red-500 hover:text-red-700",onClick:()=>A(t),type:"button"},Jo.createElement($T,{className:"w-5 h-5"})))))})),Jo.createElement("button",{className:"mt-2 px-4 py-2 text-sm text-white bg-brandgreen-600 rounded-md hover:bg-brandgreen-500",onClick:()=>{r("supplier_items"),l({currency:"USD",link:"",pcs:1,price:0,supplier:"",supplier_item_no:""})},type:"button"},(null!=s?s:[]).length>=1?"Add another supplier":"Add supplier"),(null===(n=g.supplier_items)||void 0===n?void 0:n.root)&&Jo.createElement("p",{className:"text-red-500 text-sm mt-2"},g.supplier_items.root.message))};var nO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function rO(e,t){return e===t||!(!nO(e)||!nO(t))}function iO(e,t){if(e.length!==t.length)return!1;for(var n=0;n=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var lO=-1;function AO(e){if(void 0===e&&(e=!1),-1===lO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),lO=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return lO}var CO=null;function IO(e){if(void 0===e&&(e=!1),null===CO||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?CO="positive-descending":(t.scrollLeft=1,CO=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),CO}return CO}var cO=function(e,t){return e};function uO(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,g=e.getStopIndexForStartIndex,s=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,A=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=s(r.props,Ww(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ww(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=oO((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=oO((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,g=o.itemSize,s=o.layout,A=r._getItemStyleCache(l&&g,l&&s,l&&a);if(A.hasOwnProperty(e))t=A[e];else{var C=n(r.props,e,r._instanceProps),I=i(r.props,e,r._instanceProps),c="horizontal"===a||"horizontal"===s,u="rtl"===a,d=c?C:0;A[e]=t={position:"absolute",left:u?void 0:d,right:u?d:void 0,top:c?0:C,height:c?"100%":I,width:c?I:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=oO((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(IO()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffsets.clientWidth?AO():0:s.scrollHeight>s.clientHeight?AO():0}this.scrollTo(o(this.props,e,t,a,this._instanceProps,g))},C.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},C.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(IO()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,g=o.scrollWidth;o.scrollLeft=g-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},C.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&gO(this._resetIsScrollingTimeoutId)},C.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,g=e.innerElementType,s=e.innerTagName,l=e.itemCount,A=e.itemData,C=e.itemKey,I=void 0===C?cO:C,c=e.layout,u=e.outerElementType,d=e.outerTagName,h=e.style,f=e.useIsScrolling,p=e.width,m=this.state.isScrolling,v="horizontal"===i||"horizontal"===c,y=v?this._onScrollHorizontal:this._onScrollVertical,b=this._getRangeToRender(),w=b[0],x=b[1],E=[];if(l>0)for(var k=w;k<=x;k++)E.push((0,Jo.createElement)(t,{data:A,key:I(k,A),index:k,isScrolling:f?m:void 0,style:this._getItemStyle(k)}));var S=r(this.props,this._instanceProps);return(0,Jo.createElement)(u||d||"div",{className:n,onScroll:y,ref:this._outerRefSetter,style:zw({position:"relative",height:o,width:p,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},h)},(0,Jo.createElement)(g||s||"div",{children:E,ref:a,style:{height:v?"100%":S,pointerEvents:m?"none":void 0,width:v?S:"100%"}}))},C._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,g=o.scrollOffset,s=o.scrollUpdateWasRequested;this._callOnScroll(a,g,s)}},C._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,s=r.scrollOffset;if(0===t)return[0,0,0,0];var l=a(this.props,s,this._instanceProps),A=g(this.props,l,s,this._instanceProps),C=i&&"backward"!==o?1:Math.max(1,n),I=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,l-C),Math.max(0,Math.min(t-1,A+I)),l,A]},t}(Jo.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var dO=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},hO=uO({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,g=e.height,s=e.itemCount,l=e.itemSize,A=e.layout,C=e.width,I="horizontal"===a||"horizontal"===A?C:g,c=Math.max(0,s*l-I),u=Math.min(c,t*l),d=Math.max(0,t*l-I+l+o);switch("smart"===n&&(n=r>=d-I&&r<=u+I?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var h=Math.round(d+(u-d)/2);return hc+Math.floor(I/2)?c:h;default:return r>=d&&r<=u?r:r{var t;const{options:n,children:r,maxHeight:i,getValue:o}=e,a=(null===(t=o())||void 0===t?void 0:t[0])||null,g=35*n.findIndex((e=>e.value===(null==a?void 0:a.value)));return Jo.createElement(hO,{height:Math.min(i,35*n.length),initialScrollOffset:g,itemCount:n.length,itemSize:35,style:{overflow:"auto"}},(e=>{let{index:t,style:n}=e;return Jo.createElement("div",{style:n},r[t])}))};function pO(){return pO=Object.assign?Object.assign.bind():function(e){for(var t=1;tvoid 0!==e&&e>0||"Farads must be a positive number"}},ohms:{relevantTypes:["Resistor","Photoresistor (LDR)","Potentiometer","Trimpot"],rules:{required:"Ohms is required",validate:e=>void 0!==e&&e>0||"Ohms must be a positive number"}},tolerance:{relevantTypes:["Capacitor","Resistor","Potentiometer","Trimpot"],rules:{rules:{validate:e=>!e||/^(\+\/-|\+|-|\+-|-+)?\d+(\.\d+)?%$/.test(e)||"Invalid tolerance format (e.g., '+5%', '+/-10%', '-+3%')"}}},voltage_rating:{relevantTypes:["Resistor","Capacitor","Jack","Potentiometer","Trimpot"],rules:{validate:e=>{if(!e)return!0;const t=e.match(/^(\d+(\.\d+)?)(V|kV|mV)$/);if(!t)return"Invalid voltage rating format (e.g., '5V', '0.3kV', '120mV')";return!(parseFloat(t[1])<=0)||"Voltage must be greater than 0"}}},wattage:{relevantTypes:["Resistor","Potentiometer","Trimpot"],rules:{validate:e=>{if(!e)return!0;const t=e.match(/^(\d+(\.\d+)?)W$/);if(!t)return"Invalid wattage format (e.g., '5W', '0.3W')";return!(parseFloat(t[1])<=0)||"Wattage must be greater than 0"}}}},wO={farads:["Capacitor"],ohms:["Resistor","Photoresistor (LDR)","Potentiometer","Trimpot"],tolerance:["Capacitor","Resistor","Potentiometer","Trimpot"],voltage_rating:["Resistor","Capacitor","Jack","Potentiometer","Trimpot"],wattage:["Resistor","Potentiometer","Trimpot"]},xO=e=>{var t,n,r;let{formRef:i,isSubmitting:o,setIsSubmitting:a,handleSuccess:g,allowInventoryOption:s=!1}=e;const[l,A]=(0,Jo.useState)(null),[C,I]=(0,Jo.useState)(!1),{clearErrors:c,control:u,register:d,handleSubmit:h,setError:f,formState:{errors:p}}=Sw({defaultValues:{supplier_items:[]},mode:"onSubmit",reValidateMode:"onChange"}),{user:m,userIsLoading:v,userIsError:y}=$v(),{data:b,isLoading:w,isError:x}=(()=>{const e=fp.get("csrftoken");return Jv({queryFn:async()=>{try{return(await Fv.get("/api/components/options/",{headers:{"X-CSRFToken":e||""},withCredentials:!0})).data}catch(e){throw new Error("Failed to fetch dropdown options.")}},queryKey:["componentDropdownOptions"]})})(),E=(()=>{const e=fp.get("csrftoken"),t=BI();return dp({mutationFn:async t=>{try{return(await Fv.post("/api/components/create/",t,{headers:{"Content-Type":"application/json","X-CSRFToken":e||""},withCredentials:!0})).data}catch(e){if(e.response&&e.response.data)throw{fieldErrors:e.response.data,message:"Failed to submit component."};throw new Error("An unexpected error occurred while submitting the component.")}},onError:e=>{},onSuccess:()=>{t.invalidateQueries({queryKey:["inventory"]})}})})(),k=(null==b||null===(t=b.types)||void 0===t?void 0:t.map((e=>({label:e.name,value:e.id}))))||[],S=(null===(n=Nb({control:u,name:"type"}))||void 0===n?void 0:n.label)||"",T=e=>{var t;return(null===(t=wO[e])||void 0===t?void 0:t.includes(S))||!1},O=Jo.createElement("span",{className:"text-red-500"},"*");return w?Jo.createElement("div",null,"Loading..."):x?Jo.createElement("div",null,"Error loading dropdown options."):v?Jo.createElement("div",{className:"text-center text-gray-500 animate-pulse"},"Loading..."):y||!m?Jo.createElement(ky,{icon:!0,variant:"warning"},Jo.createElement("p",null,"Please"," ",Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"https://bom-squad.com/accounts/login/"},Jo.createElement("b",null,"login"))," ","or"," ",Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"https://bom-squad.com/accounts/signup/"},Jo.createElement("b",null,"create an account"))," ","to add components.")):Jo.createElement(Jo.Fragment,null,Jo.createElement("div",{className:"mb-6"},l&&Jo.createElement(ky,{variant:"warning"},Jo.createElement("p",null,l.message),l.detailedMessage&&Jo.createElement("pre",{className:"text-xs text-gray-500 whitespace-pre-wrap"},l.detailedMessage))),Jo.createElement("form",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",onSubmit:h((async e=>{if(o)return;if(a(!0),!e.supplier_items||0===e.supplier_items.length)return f("supplier_items",{message:"At least one supplier item is required.",type:"manual"}),void a(!1);const t=(e=>{const t=e=>e&&e.value?e.value:e;return{component:{farads:e.farads||null,farads_unit:t(e.farads_unit),manufacturer:t(e.manufacturer),manufacturer_part_no:e.manufacturer_part_no,mounting_style:t(e.mounting_style),ohms:t(e.ohms),ohms_unit:t(e.ohms_unit),tolerance:e.tolerance||null,type:t(e.type),voltage_rating:e.voltage_rating||null,wattage:e.wattage||null},quantity:e.quantity,supplier_items:e.supplier_items.map((e=>({currency:e.currency,link:e.link||"",pcs:e.pcs?parseInt(e.pcs,1):null,price:parseFloat(e.price||0),supplier:t(e.supplier),supplier_item_no:e.supplier_item_no||""})))}})(e);try{await E.mutateAsync(t),g()}catch(e){if(e.fieldErrors){const t=e.fieldErrors;t.component_errors&&Object.entries(t.component_errors).forEach((e=>{let[t,n]=e;Array.isArray(n)&&n.length>0&&f(t,{message:n.join(" "),type:"server"})})),t.supplier_item_no&&t.supplier_item_no.forEach(((e,t)=>{f(`supplier_items.${t}.supplier_item_no`,{message:e,type:"server"})}));const n=Object.entries(t).flatMap((e=>{let[t,n]=e;return"fieldErrors"===t&&"object"==typeof n?Object.entries(n).flatMap((e=>{let[t,n]=e;return"object"==typeof n?Object.entries(n).map((e=>{let[n,r]=e;return`${t}.${n}: ${Array.isArray(r)?r.join(", "):r}`})):`${t}: ${n}`})):"object"==typeof n?Object.entries(n).map((e=>{let[n,r]=e;return`${t}.${n}: ${Array.isArray(r)?r.join(", "):r}`})):`${t}: ${n}`})).join("\n");A({detailedMessage:n,message:e.message||"An error occurred while submitting the component.",type:"error"})}}finally{a(!1)}})),ref:i},Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"manufacturer"},"Manufacturer ",O),Jo.createElement(Db,{control:u,name:"manufacturer",render:e=>{var t;let{field:n}=e;return Jo.createElement(QS,pO({},n,{className:"react-select-container",classNamePrefix:"react-select",components:{MenuList:fO,...mO},options:(null==b||null===(t=b.manufacturers)||void 0===t?void 0:t.map((e=>({label:e.name,value:e.id}))))||[],placeholder:"Select Manufacturer"}))},rules:{required:'Manufacturer is required. If no specific manufacturer, select "Various."'}}),p.manufacturer&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.manufacturer.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"manufacturer_part_no"},"Manufacturer Part No. ",O),Jo.createElement("input",pO({},d("manufacturer_part_no",{required:"Manufacturer Part Number is required"}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"manufacturer_part_no",type:"text"})),p.manufacturer_part_no&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.manufacturer_part_no.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"mounting_style"},"Mounting Style ",O),Jo.createElement(Db,{control:u,name:"mounting_style",render:e=>{let{field:t}=e;return Jo.createElement(QS,pO({},t,{className:"react-select-container",classNamePrefix:"react-select",options:vO}))},rules:{required:"Mounting Style is required."}}),p.mounting_style&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.mounting_style.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"type"},"Type ",O),Jo.createElement(Db,{control:u,name:"type",render:e=>{let{field:t}=e;return Jo.createElement(QS,pO({},t,{className:"react-select-container",classNamePrefix:"react-select",options:k}))},rules:{required:"Type is required."}}),p.type&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.type.message)),T("ohms")&&Jo.createElement(Jo.Fragment,null,Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"ohms"},"Ohms ",O),Jo.createElement("input",pO({},d("ohms"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"ohms",min:0,type:"number"}))),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"ohms_unit"},"Ohms Unit ",O),Jo.createElement(Db,{control:u,name:"ohms_unit",render:e=>{let{field:t}=e;return Jo.createElement(QS,pO({},t,{className:"react-select-container",classNamePrefix:"react-select",options:yO.ohms}))}}),p.ohms&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.ohms.message))),T("farads")&&Jo.createElement(Jo.Fragment,null,Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"farads"},"Farads ",O),Jo.createElement("input",pO({},d("farads",T("farads")?bO.farads.rules:{}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"farads",min:0,type:"number"})),p.farads&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.farads.message)),Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"farads_unit"},"Farads Unit ",O),Jo.createElement(Db,{control:u,name:"farads_unit",render:e=>{let{field:t}=e;return Jo.createElement(QS,pO({},t,{className:"react-select-container",classNamePrefix:"react-select",options:yO.farads}))}}),p.farads_unit&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.farads_unit.message))),T("tolerance")&&Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"tolerance"},"Tolerance"),Jo.createElement("input",pO({},d("tolerance"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"tolerance",type:"text"})),p.tolerance&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.tolerance.message)),T("voltage_rating")&&Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"voltage_rating"},"Voltage Rating"),Jo.createElement("input",pO({},d("voltage_rating"),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"voltage_rating",type:"text"})),p.voltage_rating&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.voltage_rating.message)),T("wattage")&&Jo.createElement("div",null,Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"wattage"},"Wattage"),Jo.createElement("input",pO({},d("wattage",T("wattage")?bO.wattage.rules:{}),{className:"block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"wattage",type:"text"})),p.wattage&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.wattage.message)),Jo.createElement(tO,{clearErrors:c,control:u,errors:p,register:d,suppliers:null!==(r=null==b?void 0:b.suppliers)&&void 0!==r?r:[]}),s&&Jo.createElement("div",{className:"col-span-full"},Jo.createElement("div",{className:"flex items-center"},Jo.createElement("input",{checked:C,className:"mr-2",id:"add_to_inventory",onChange:e=>I(e.target.checked),type:"checkbox"}),Jo.createElement("label",{className:"text-sm font-medium text-gray-700",htmlFor:"add_to_inventory"},"Add this component to your inventory")),C&&Jo.createElement("div",{className:"mt-4"},Jo.createElement("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"quantity"},"Quantity"),Jo.createElement("input",pO({},d("quantity",{validate:e=>(null!=e?e:1)>0||"Quantity must be a positive number",valueAsNumber:!0}),{className:"block w-full md:w-24 mt-1 border-gray-300 rounded-md shadow-sm focus:ring-brandgreen-500 focus:border-brandgreen-500 sm:text-sm",id:"quantity",min:1,type:"number"})),p.quantity&&Jo.createElement("p",{className:"text-red-500 text-sm"},p.quantity.message)))))},EO={headCells:{style:{fontWeight:"bold"}},rows:{style:{padding:"0.2rem 0 0.2rem 0"}}},kO=()=>{var e,t,n,r,i,o,a,g,s,l,A,C,I,c,u,d;const[h,f]=(0,Jo.useState)({message:"",show:!1,title:""}),[p,m]=(0,Jo.useState)(),[v,y]=(0,Jo.useState)(),[b,w]=(0,Jo.useState)(!1),[x,E]=(0,Jo.useState)(1),[k,S]=(0,Jo.useState)(!1),[T,O]=hT(),{register:R,control:N,handleSubmit:_,setValue:D}=Sw({defaultValues:{filters:JSON.parse(T.get("filters")||"{}"),search:T.get("search")||""}}),P=(0,Jo.useRef)(null),{componentsData:M,componentsAreLoading:L,componentsAreError:F,refetchComponents:j}=eT({filters:JSON.parse(T.get("filters")||"{}"),page:Number(T.get("page")||x),search:T.get("search")||""}),{data:B}=iT(),{user:z}=$v();if((0,Jo.useEffect)((()=>{D("filters",JSON.parse(T.get("filters")||"{}")),D("search",T.get("search")||""),E(Number(T.get("page")||1))}),[T,D]),(0,Jo.useEffect)((()=>{const e=document.getElementById("table__wrapper");e&&e.children&&Array.from(e.children).forEach((e=>{e instanceof HTMLElement&&(e.style.overflow="visible")}))}),[M]),(0,Jo.useEffect)((()=>{null!=M&&M.page&&E(M.page)}),[null==M?void 0:M.page]),F)return Jo.createElement("div",{className:"p-3 ml-[47px] bg-gray-100"},"Error");const V=30,U=Math.ceil(((null==M?void 0:M.count)||0)/V),Z=[{cell:e=>{var t;return Jo.createElement(Py,{id:e.id,user_submitted_status:null!==(t=e.user_submitted_status)&&void 0!==t?t:"approved"},e.discontinued?Jo.createElement("span",null,Jo.createElement("s",null,e.description)," ",Jo.createElement("span",{className:"italic font-bold text-red-500"},"DISCONTINUED")):Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:`${Dy()}/components/${e.id}`},e.description))},grow:1,minWidth:"250px",name:"Name",sortable:!0,wrap:!0},{hide:1700,name:Jo.createElement("div",null,"Type"),selector:e=>{var t;return null===(t=e.type)||void 0===t?void 0:t.name},sortable:!0,wrap:!0},{hide:1700,name:Jo.createElement("div",null,"Manufacturer"),selector:e=>{var t;return(null===(t=e.manufacturer)||void 0===t?void 0:t.name)||""},sortable:!0,wrap:!0},{cell:e=>{var t;return(e.supplier_items||[]).length>0?Jo.createElement("ul",{className:"pl-5 list-disc"},null===(t=e.supplier_items)||void 0===t?void 0:t.map((e=>{var t;return Jo.createElement("li",{key:e.id},Jo.createElement("b",null,null===(t=e.supplier)||void 0===t?void 0:t.short_name,": "),e.supplier_item_no?Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:e.link,rel:"noreferrer",target:"_blank"},e.supplier_item_no):Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:e.link,rel:"noreferrer",target:"_blank"},Jo.createElement(Ly,{className:"inline-block w-4 h-4"})),e.unit_price&&Jo.createElement("span",{className:"text-xs text-gray-600"}," ","(",(e=>{if(!B||null==e)return"N/A";const t=e*B.exchange_rate;return`${B.currency_symbol}${$S(t,B.default_currency)}`})(e.unit_price),")"))}))):"No supplier items"},name:"Suppliers",sortable:!1,width:"210px"},{cell:e=>e.qualities||"",name:Jo.createElement("div",null,"Qualities"),sortable:!1,wrap:!0},{cell:e=>Jo.createElement(WI,{hideLoadingTag:!0,hookArgs:{componentId:e.id},useHook:ny}),name:Jo.createElement("div",null,"Qty in User Inv."),omit:!(null!=z&&z.username),sortable:!1,width:"80px"},{cell:e=>Jo.createElement(WI,{hideLoadingTag:!0,hookArgs:{componentId:e.id},useHook:ty}),name:Jo.createElement("div",null,"Qty in Shopping List"),omit:!(null!=z&&z.username),sortable:!1,width:"80px"},{button:!0,cell:e=>{var t,n,r;return Jo.createElement(Jo.Fragment,null,Jo.createElement(Yf,{onClick:()=>m(e.id),size:"xs",variant:"primary"},"+ Inventory"),Jo.createElement(iy,{componentId:e.id,componentName:e.supplier_item_no?`${null===(t=e.supplier)||void 0===t?void 0:t.short_name} ${e.supplier_item_no}`:e.description,open:p===e.id,quantityRequired:1,setOpen:m,text:`Add ${e.description} (${null===(n=e.supplier)||void 0===n?void 0:n.short_name} ${e.supplier_item_no}) to your inventory?`,title:e.supplier_item_no?`Add ${null===(r=e.supplier)||void 0===r?void 0:r.short_name} ${e.supplier_item_no} to Inventory?`:`Add ${e.description} to Inventory?`,type:GI.INVENTORY}))},ignoreRowClick:!0,name:"",omit:!(null!=z&&z.username),sortable:!1,width:"95px"},{button:!0,cell:e=>{var t,n;return Jo.createElement(Jo.Fragment,null,Jo.createElement(Yf,{onClick:()=>{y(e.id)},size:"xs",variant:"primary"},"+ Shopping List"),Jo.createElement(iy,{componentId:e.id,componentName:`${null===(t=e.supplier)||void 0===t?void 0:t.short_name} ${e.supplier_item_no}`,open:v===e.id,quantityRequired:1,setOpen:y,text:"",title:`Add ${null===(n=e.supplier)||void 0===n?void 0:n.short_name} ${e.supplier_item_no} to Shopping List?`,type:GI.SHOPPING_ANON}))},ignoreRowClick:!0,name:"",omit:!(null!=z&&z.username),sortable:!1,width:"115px"}];return Jo.createElement(Jo.Fragment,null,Jo.createElement("div",{className:"mb-8"},Jo.createElement("div",{className:"w-full py-12"},Jo.createElement("div",{className:"p-10 bg-gray-100 rounded-lg",id:"dataElem"},Jo.createElement(JS,{control:N,farads:null!==(e=null==M||null===(t=M.unique_values)||void 0===t?void 0:t.farads)&&void 0!==e?e:[],handleSubmit:_,manufacturer:null!==(n=null==M||null===(r=M.unique_values)||void 0===r?void 0:r.manufacturer)&&void 0!==n?n:[],mounting_style:null!==(i=null==M||null===(o=M.unique_values)||void 0===o?void 0:o.mounting_style)&&void 0!==i?i:[],ohms:null!==(a=null==M||null===(g=M.unique_values)||void 0===g?void 0:g.ohms)&&void 0!==a?a:[],onSubmit:e=>{const{search:t,type:n,manufacturer:r,supplier:i,mounting_style:o,...a}=e,g={manufacturer:"all"!==r?r:void 0,mounting_style:"all"!==o?o:void 0,supplier:"all"!==i?i:void 0,type:"all"!==n?n:void 0,...Object.fromEntries(Object.entries(a).filter((e=>{let[,t]=e;return"all"!==t&&""!==t&&void 0!==t})))},s={filters:g,search:t||""};j({newFilters:g,newPage:1,newSearch:s.search}),O({filters:JSON.stringify(g),page:"1",search:s.search}),E(1)},register:R,supplier:null!==(s=null==M||null===(l=M.unique_values)||void 0===l?void 0:l.supplier)&&void 0!==s?s:[],tolerance:null!==(A=null==M||null===(C=M.unique_values)||void 0===C?void 0:C.tolerance)&&void 0!==A?A:[],type:null!==(I=null==M||null===(c=M.unique_values)||void 0===c?void 0:c.type)&&void 0!==I?I:[],voltage_rating:null!==(u=null==M||null===(d=M.unique_values)||void 0===d?void 0:d.voltage_rating)&&void 0!==u?u:[]}))),Jo.createElement(gy,{buttonText:"Add a Component",icon:Jo.createElement(YI,{className:"w-5 h-5"}),onButtonClick:()=>S(!0),title:"Components"}),L?Jo.createElement("div",{className:"text-center animate-pulse"},"Loading..."):Jo.createElement(Jo.Fragment,null,Jo.createElement(Jo.Fragment,null,!(null!=z&&z.username)&&Jo.createElement("div",{className:"mb-8"},Jo.createElement(ky,{variant:"warning"},Jo.createElement("div",{className:"alert alert-warning",role:"alert"},Jo.createElement("a",{className:"text-blue-500 hover:text-blue-700",href:"/accounts/login/"},Jo.createElement("b",null,"Login"))," ","to add components to your shopping list and inventory.")))),Jo.createElement("div",{id:"table__wrapper",style:{overflowX:"visible"}},Jo.createElement(VI.Ay,{columns:Z,conditionalRowStyles:[{style:{borderRadius:"8px",boxShadow:"inset 0 0 0 2px #db2777",overflow:"visible"},when:e=>"pending"===e.user_submitted_status}],customStyles:EO,data:(null==M?void 0:M.results)||[],progressPending:L,responsive:!0})),(null==M?void 0:M.results)&&Jo.createElement("div",{className:"flex items-center justify-between py-4 bg-white border-t border-gray-200"},Jo.createElement(Zy,{currentPage:x,navigate:e=>{const t=Math.ceil(((null==M?void 0:M.count)||0)/V);e<1||e>t||(O({filters:T.get("filters")||"{}",page:String(e),search:T.get("search")||""}),j({newFilters:JSON.parse(T.get("filters")||"{}"),newPage:e,newSearch:T.get("search")||""}),E(e))},totalPages:U})))),Jo.createElement(_y,{customButtons:Jo.createElement("div",{className:"flex justify-end space-x-4"},Jo.createElement("button",{className:"mt-4 px-4 py-2 text-sm font-medium text-gray-900 bg-gray-200 rounded-md hover:bg-gray-300",onClick:()=>S(!1)},"Cancel"),Jo.createElement("button",{className:"mt-4 px-4 py-2 text-sm font-medium text-white bg-brandgreen-600 border border-transparent rounded-md shadow-sm hover:bg-brandgreen-700",onClick:()=>{P.current&&P.current.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}))}},Jo.createElement("p",{className:ZI()({"animate-pulse":b})},b?"Submiting...":"Submit"))),onSubmit:()=>{S(!1)},open:k,setOpen:S,submitButtonText:"Save",subtitle:Jo.createElement("p",null,'New components can be added to your inventory and shopping list. They can be suggested as options for BOM list items. New components will be marked as "pending" until reviewed by the BOM Squad team.'),title:"Add a Component"},Jo.createElement("div",null,Jo.createElement(xO,{formRef:P,handleSuccess:()=>{S(!1),f({message:"Your new component has been successfully submitted.",show:!0,title:"Component Added"})},isSubmitting:b,setIsSubmitting:w}))),Jo.createElement(Ny,{message:h.message,setShow:e=>f((t=>({...t,show:"function"==typeof e?e(t.show):e}))),show:h.show,title:h.title}))};function SO({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}const TO=Jo.forwardRef(SO);function OO({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0 1 20.25 6v12A2.25 2.25 0 0 1 18 20.25H6A2.25 2.25 0 0 1 3.75 18V6A2.25 2.25 0 0 1 6 3.75h1.5m9 0h-9"}))}const RO=Jo.forwardRef(OO);function NO({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 13.5 3 3m0 0 3-3m-3 3v-6m1.06-4.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const _O=Jo.forwardRef(NO);function DO(){return DO=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{value:t,onChange:n,...r}=e;const[i,o]=(0,Jo.useState)(null),a=(0,Jo.useRef)(null);(0,Jo.useEffect)((()=>{const e=a.current;e&&null!==i&&e.setSelectionRange(i,i)}),[a,i,t]);return Jo.createElement("input",DO({onChange:e=>{o(e.target.selectionStart||0),n&&n(e)},ref:a,value:t},r))},MO=e=>{let{row:t,locationIdToEdit:n,updatedLocationToSubmit:r,handleLocationChange:i,setLocationIdToEdit:o,handleSubmitLocation:a,handlePillClick:g,handleClick:s,setUpdatedLocationToSubmit:l,showSeparateLocationsWithCommas:A=!0,textSize:C=""}=e;const I=t.location?t.location.filter(Boolean):[];return Jo.createElement("div",{className:"flex justify-between w-full"},t.id===n?Jo.createElement("div",{className:"flex flex-col"},Jo.createElement("div",{className:"flex gap-1.5 pb-1 pt-6"},Jo.createElement("form",{className:"flex content-center w-full gap-1",onSubmit:e=>e.preventDefault()},Jo.createElement(PO,{className:"block w-full rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>i(e),type:"text",value:null!=r?r:t.location}),Jo.createElement(Yf,{onClick:()=>o(void 0),variant:"muted"},"Cancel"),Jo.createElement(Yf,{onClick:()=>a(t.id),type:"submit",variant:"primary"},"Update"))),A&&Jo.createElement("p",{className:"text-xs text-gray-500"},"Separate locations with commas.")):Jo.createElement("ul",{className:"flex flex-wrap w-full"},I.length>0?I.map(((e,n)=>Jo.createElement(ip,{key:n,onClick:()=>g(t.id,n),showArrow:n!==I.length-1,textSize:C},e))):Jo.createElement("li",{className:"text-gray-500"},"-")),t.id!==n&&Jo.createElement("div",{className:"flex flex-col justify-center",onClick:()=>{o(t.id),s(t,"location",n,o,l)},role:"button"},Jo.createElement(Ap,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};function LO({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const FO=Jo.forwardRef(LO);function jO({title:e,titleId:t,...n},r){return Jo.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?Jo.createElement("title",{id:t},e):null,Jo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const BO=Jo.forwardRef(jO),zO=e=>{let{row:t,quantityIdToEdit:n,updatedQuantityToSubmit:r,handleQuantityChange:i,handleSubmitQuantity:o,setQuantityIdToEdit:a,setUpdatedQuantityToSubmit:g,handleClick:s}=e;const{id:l,quantity:A}=t;return Jo.createElement("div",{className:"flex content-center justify-between w-full"},l===n?Jo.createElement("div",null,Jo.createElement("form",{className:"flex content-center w-full gap-1",onSubmit:e=>e.preventDefault()},Jo.createElement(sp(),{className:"block w-16 rounded-md border-0 px-2 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",onChange:e=>i(e),type:"number",value:null!=r?r:A}),Jo.createElement("div",{className:"flex justify-around gap-1"},Jo.createElement(Yf,{className:"h-full",Icon:FO,iconOnly:!0,onClick:()=>{a(void 0),g(void 0)},size:"xs",variant:"muted"},"Cancel"),Jo.createElement(Yf,{className:"h-full",Icon:BO,iconOnly:!0,onClick:()=>o(l),size:"xs",variant:"primary"},"Update")))):Jo.createElement("span",{className:"font-bold"},A),l!==n&&Jo.createElement("div",{onClick:()=>s(t,"quantity",n,a,g),role:"button"},Jo.createElement(Ap,{className:"w-4 h-4 stroke-slate-300 hover:stroke-pink-500"})))};function VO(e){return Array.isArray?Array.isArray(e):"[object Array]"===KO(e)}function UO(e){return"string"==typeof e}function ZO(e){return"number"==typeof e}function GO(e){return!0===e||!1===e||function(e){return WO(e)&&null!==e}(e)&&"[object Boolean]"==KO(e)}function WO(e){return"object"==typeof e}function HO(e){return null!=e}function YO(e){return!e.trim().length}function KO(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const QO=Object.prototype.hasOwnProperty;class XO{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=qO(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function qO(e){let t=null,n=null,r=null,i=1,o=null;if(UO(e)||VO(e))r=e,t=JO(e),n=$O(e);else{if(!QO.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const a=e.name;if(r=a,QO.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(a));t=JO(a),n=$O(a),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function JO(e){return VO(e)?e:e.split(".")}function $O(e){return VO(e)?e.join("."):e}const eR={useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,o)=>{if(HO(e))if(t[o]){const a=e[t[o]];if(!HO(a))return;if(o===t.length-1&&(UO(a)||ZO(a)||GO(a)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(a));else if(VO(a)){r=!0;for(let e=0,n=a.length;ee.score===t.score?e.idx{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,UO(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();UO(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(HO(i))if(VO(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(HO(r))if(UO(r)&&!YO(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else VO(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(UO(i)&&!YO(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function iR(e,t,{getFn:n=tR.getFn,fieldNormWeight:r=tR.fieldNormWeight}={}){const i=new rR({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(qO)),i.setSources(t),i.create(),i}function oR(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=tR.distance,ignoreLocation:o=tR.ignoreLocation}={}){const a=t/e.length;if(o)return a;const g=Math.abs(r-n);return i?a+g/i:g?1:a}const aR=32;function gR(e,t,n,{location:r=tR.location,distance:i=tR.distance,threshold:o=tR.threshold,findAllMatches:a=tR.findAllMatches,minMatchCharLength:g=tR.minMatchCharLength,includeMatches:s=tR.includeMatches,ignoreLocation:l=tR.ignoreLocation}={}){if(t.length>aR)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(aR));const A=t.length,C=e.length,I=Math.max(0,Math.min(r,C));let c=o,u=I;const d=g>1||s,h=d?Array(C):[];let f;for(;(f=e.indexOf(t,u))>-1;){let e=oR(t,{currentLocation:f,expectedLocation:I,distance:i,ignoreLocation:l});if(c=Math.min(e,c),u=f+A,d){let e=0;for(;e=s;o-=1){let a=o-1,g=n[e.charAt(a)];if(d&&(h[a]=+!!g),b[o]=(b[o+1]<<1|1)&g,r&&(b[o]|=(p[o+1]|p[o])<<1|1|p[o+1]),b[o]&y&&(m=oR(t,{errors:r,currentLocation:a,expectedLocation:I,distance:i,ignoreLocation:l}),m<=c)){if(c=m,u=a,u<=I)break;s=Math.max(1,2*I-u)}}if(oR(t,{errors:r+1,currentLocation:I,expectedLocation:I,distance:i,ignoreLocation:l})>c)break;p=b}const b={isMatch:u>=0,score:Math.max(.001,m)};if(d){const e=function(e=[],t=tR.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let a=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(h,g);e.length?s&&(b.indices=e):b.isMatch=!1}return b}function sR(e){let t={};for(let n=0,r=e.length;n{this.chunks.push({pattern:e,alphabet:sR(e),startIndex:t})},A=this.pattern.length;if(A>aR){let e=0;const t=A%aR,n=A-t;for(;e{const{isMatch:u,score:d,indices:h}=gR(e,t,I,{location:r+c,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:g,includeMatches:n,ignoreLocation:s});u&&(C=!0),A+=d,u&&h&&(l=[...l,...h])}));let I={isMatch:C,score:C?A/this.chunks.length:1};return C&&n&&(I.indices=l),I}}class AR{constructor(e){this.pattern=e}static isMultiMatch(e){return CR(e,this.multiRegex)}static isSingleMatch(e){return CR(e,this.singleRegex)}search(){}}function CR(e,t){const n=e.match(t);return n?n[1]:null}class IR extends AR{constructor(e,{location:t=tR.location,threshold:n=tR.threshold,distance:r=tR.distance,includeMatches:i=tR.includeMatches,findAllMatches:o=tR.findAllMatches,minMatchCharLength:a=tR.minMatchCharLength,isCaseSensitive:g=tR.isCaseSensitive,ignoreLocation:s=tR.ignoreLocation}={}){super(e),this._bitapSearch=new lR(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:g,ignoreLocation:s})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class cR extends AR{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const uR=[class extends AR{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},cR,class extends AR{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends AR{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends AR{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends AR{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends AR{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},IR],dR=uR.length,hR=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const fR=new Set([IR.type,cR.type]);class pR{constructor(e,{isCaseSensitive:t=tR.isCaseSensitive,includeMatches:n=tR.includeMatches,minMatchCharLength:r=tR.minMatchCharLength,ignoreLocation:i=tR.ignoreLocation,findAllMatches:o=tR.findAllMatches,location:a=tR.location,threshold:g=tR.threshold,distance:s=tR.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:a,threshold:g,distance:s},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(hR).filter((e=>e&&!!e.trim())),r=[];for(let e=0,i=n.length;e!(!e[yR]&&!e[bR]),kR=e=>({[yR]:Object.keys(e).map((t=>({[t]:e[t]})))});function SR(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const o=(e=>!!e[wR])(e);if(!o&&i.length>1&&!ER(e))return r(kR(e));if((e=>!VO(e)&&WO(e)&&!ER(e))(e)){const r=o?e[wR]:i[0],a=o?e[xR]:e[r];if(!UO(a))throw new Error((e=>`Invalid value for key ${e}`)(r));const g={keyId:$O(r),pattern:a};return n&&(g.searcher=vR(a,t)),g}let a={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];VO(n)&&n.forEach((e=>{a.children.push(r(e))}))})),a};return ER(e)||(e=kR(e)),r(e)}function TR(e,t){const n=e.matches;t.matches=[],HO(n)&&n.forEach((e=>{if(!HO(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function OR(e,t){t.score=e.score}class RR{constructor(e,t={},n){this.options={...tR,...t},this.options.useExtendedSearch,this._keyStore=new XO(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof rR))throw new Error("Incorrect 'index' type");this._myIndex=t||iR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){HO(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let n=0,r=this._docs.length;n{let n=1;e.matches.forEach((({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))})),e.score=n}))}(g,{ignoreFieldNorm:a}),i&&g.sort(o),ZO(t)&&t>-1&&(g=g.slice(0,t)),function(e,t,{includeMatches:n=tR.includeMatches,includeScore:r=tR.includeScore}={}){const i=[];return n&&i.push(TR),r&&i.push(OR),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,r)})),r}))}(g,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=vR(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:i})=>{if(!HO(e))return;const{isMatch:o,score:a,indices:g}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:a,value:e,norm:i,indices:g}]})})),r}_searchLogical(e){const t=SR(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}const i=[];for(let o=0,a=e.children.length;o{if(HO(e)){let a=n(t,e,r);a.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},o.push(i[r])),a.forEach((({matches:e})=>{i[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=vR(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:e,i:r})=>{if(!HO(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&i.push({idx:r,item:e,matches:o})})),i}_findMatches({key:e,value:t,searcher:n}){if(!HO(t))return[];let r=[];if(VO(t))t.forEach((({v:t,i,n:o})=>{if(!HO(t))return;const{isMatch:a,score:g,indices:s}=n.searchIn(t);a&&r.push({score:g,key:e,value:t,idx:i,norm:o,indices:s})}));else{const{v:i,n:o}=t,{isMatch:a,score:g,indices:s}=n.searchIn(i);a&&r.push({score:g,key:e,value:i,norm:o,indices:s})}return r}}RR.version="6.6.2",RR.createIndex=iR,RR.parseIndex=function(e,{getFn:t=tR.getFn,fieldNormWeight:n=tR.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new rR({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},RR.config=tR,RR.parseQuery=SR,function(...e){mR.push(...e)}(pR);const NR=e=>{let{searchTerm:t,setSearchTerm:n}=e;return Jo.createElement("input",{className:"block w-full rounded-md border-0 p-2 h-[32px] text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brandgreen-600 sm:text-sm sm:leading-6",id:"search",name:"search",onChange:e=>n(e.target.value),placeholder:"Search",type:"text",value:t})};var _R=["color","size","title","className"];function DR(){return DR=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var MR=(0,Jo.forwardRef)((function(e,t){var n=e.color,r=e.size,i=e.title,o=e.className,a=PR(e,_R);return Jo.createElement("svg",DR({ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:r,height:r,fill:n,className:["bi","bi-signpost-split",o].filter(Boolean).join(" ")},a),i?Jo.createElement("title",null,i):null,Jo.createElement("path",{d:"M7 7V1.414a1 1 0 0 1 2 0V2h5a1 1 0 0 1 .8.4l.975 1.3a.5.5 0 0 1 0 .6L14.8 5.6a1 1 0 0 1-.8.4H9v10H7v-5H2a1 1 0 0 1-.8-.4L.225 9.3a.5.5 0 0 1 0-.6L1.2 7.4A1 1 0 0 1 2 7zm1 3V8H2l-.75 1L2 10zm0-5h6l.75-1L14 3H8z"}))}));MR.propTypes={color:ly().string,size:ly().oneOfType([ly().string,ly().number]),title:ly().string,className:ly().string},MR.defaultProps={color:"currentColor",size:"1em",title:null,className:""};const LR=MR;function FR(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function jR(e,t){let[n,r]=(0,Jo.useState)((()=>FR(e)));return ec((()=>{r(FR(e))}),[e.type,e.as]),ec((()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}let BR=(0,Jo.createContext)(null);function zR(){let e=(0,Jo.useContext)(BR);if(null===e){let e=new Error("You used a