(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[92888],{574865:function(a,l,u){var d,h;void 0!==(h="function"==typeof(d=function(){var a,l,u,d={};d.version="0.2.0";var h=d.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function clamp(a,l,u){return a<l?l:a>u?u:a}d.configure=function(a){var l,u;for(l in a)void 0!==(u=a[l])&&a.hasOwnProperty(l)&&(h[l]=u);return this},d.status=null,d.set=function(a){var l=d.isStarted();a=clamp(a,h.minimum,1),d.status=1===a?null:a;var u=d.render(!l),g=u.querySelector(h.barSelector),m=h.speed,v=h.easing;return u.offsetWidth,f(function(l){var f,_;""===h.positionUsing&&(h.positionUsing=d.getPositioningCSS()),p(g,(f=a,(_="translate3d"===h.positionUsing?{transform:"translate3d("+(-1+f)*100+"%,0,0)"}:"translate"===h.positionUsing?{transform:"translate("+(-1+f)*100+"%,0)"}:{"margin-left":(-1+f)*100+"%"}).transition="all "+m+"ms "+v,_)),1===a?(p(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout(function(){p(u,{transition:"all "+m+"ms linear",opacity:0}),setTimeout(function(){d.remove(),l()},m)},m)):setTimeout(l,m)}),this},d.isStarted=function(){return"number"==typeof d.status},d.start=function(){d.status||d.set(0);var work=function(){setTimeout(function(){d.status&&(d.trickle(),work())},h.trickleSpeed)};return h.trickle&&work(),this},d.done=function(a){return a||d.status?d.inc(.3+.5*Math.random()).set(1):this},d.inc=function(a){var l=d.status;return l?("number"!=typeof a&&(a=(1-l)*clamp(Math.random()*l,.1,.95)),l=clamp(l+a,0,.994),d.set(l)):d.start()},d.trickle=function(){return d.inc(Math.random()*h.trickleRate)},a=0,l=0,d.promise=function(u){return u&&"resolved"!==u.state()&&(0===l&&d.start(),a++,l++,u.always(function(){0==--l?(a=0,d.done()):d.set((a-l)/a)})),this},d.render=function(a){if(d.isRendered())return document.getElementById("nprogress");addClass(document.documentElement,"nprogress-busy");var l=document.createElement("div");l.id="nprogress",l.innerHTML=h.template;var u,f,g=l.querySelector(h.barSelector),m=a?"-100":(-1+(d.status||0))*100,v=document.querySelector(h.parent);return p(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),!h.showSpinner&&(f=l.querySelector(h.spinnerSelector))&&removeElement(f),v!=document.body&&addClass(v,"nprogress-custom-parent"),v.appendChild(l),l},d.remove=function(){removeClass(document.documentElement,"nprogress-busy"),removeClass(document.querySelector(h.parent),"nprogress-custom-parent");var a=document.getElementById("nprogress");a&&removeElement(a)},d.isRendered=function(){return!!document.getElementById("nprogress")},d.getPositioningCSS=function(){var a=document.body.style,l="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return l+"Perspective" in a?"translate3d":l+"Transform" in a?"translate":"margin"};var f=(u=[],function(a){u.push(a),1==u.length&&function next(){var a=u.shift();a&&a(next)}()}),p=function(){var a=["Webkit","O","Moz","ms"],l={};function applyCss(u,d,h){var f;d=l[f=(f=d).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,l){return l.toUpperCase()})]||(l[f]=function(l){var u=document.body.style;if(l in u)return l;for(var d,h=a.length,f=l.charAt(0).toUpperCase()+l.slice(1);h--;)if((d=a[h]+f)in u)return d;return l}(f)),u.style[d]=h}return function(a,l){var u,d,h=arguments;if(2==h.length)for(u in l)void 0!==(d=l[u])&&l.hasOwnProperty(u)&&applyCss(a,u,d);else applyCss(a,h[1],h[2])}}();function hasClass(a,l){return("string"==typeof a?a:classList(a)).indexOf(" "+l+" ")>=0}function addClass(a,l){var u=classList(a),d=u+l;hasClass(u,l)||(a.className=d.substring(1))}function removeClass(a,l){var u,d=classList(a);hasClass(a,l)&&(u=d.replace(" "+l+" "," "),a.className=u.substring(1,u.length-1))}function classList(a){return(" "+(a.className||"")+" ").replace(/\s+/gi," ")}function removeElement(a){a&&a.parentNode&&a.parentNode.removeChild(a)}return d})?d.call(l,u,l,a):d)&&(a.exports=h)},77298:function(a,l,u){"use strict";u.d(l,{H4u:function(){return ed},Pxu:function(){return es},VAA:function(){return f},XCv:function(){return R},XHJ:function(){return ey},_8t:function(){return ec},g8U:function(){return V},jXb:function(){return ea},jnn:function(){return g},nQG:function(){return v},oDT:function(){return eg},pOD:function(){return ev},pY8:function(){return ef},v4q:function(){return T},ypG:function(){return en}});var d=u(202784);function _objectWithoutPropertiesLoose(a,l){if(null==a)return{};var u,d,h={},f=Object.keys(a);for(d=0;d<f.length;d++)u=f[d],l.indexOf(u)>=0||(h[u]=a[u]);return h}var h=["color"],f=(0,d.forwardRef)(function(a,l){var u=a.color,f=_objectWithoutPropertiesLoose(a,h);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f,{ref:l}),(0,d.createElement)("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),p=["color"],g=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,p);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),m=["color"],v=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,m);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),_=["color"],T=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,_);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),C=["color"],R=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,C);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),B=["color"],V=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,B);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),er=["color"],en=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,er);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),ei=["color"],es=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,ei);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),eo=["color"],ea=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,eo);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:void 0===u?"currentColor":u}))}),el=["color"],ec=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,el);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),eu=["color"],ed=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,eu);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),eh=["color"],ef=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,eh);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M4 2.5C4 2.22386 4.22386 2 4.5 2H10.5C10.7761 2 11 2.22386 11 2.5V12.5C11 12.7761 10.7761 13 10.5 13H4.5C4.22386 13 4 12.7761 4 12.5V2.5ZM4.5 1C3.67157 1 3 1.67157 3 2.5V12.5C3 13.3284 3.67157 14 4.5 14H10.5C11.3284 14 12 13.3284 12 12.5V2.5C12 1.67157 11.3284 1 10.5 1H4.5ZM6 11.65C5.8067 11.65 5.65 11.8067 5.65 12C5.65 12.1933 5.8067 12.35 6 12.35H9C9.1933 12.35 9.35 12.1933 9.35 12C9.35 11.8067 9.1933 11.65 9 11.65H6Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),ep=["color"],eg=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,ep);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M3.25781 3.11684C3.67771 3.45796 3.83523 3.43193 4.62369 3.37933L12.0571 2.93299C12.2147 2.93299 12.0836 2.77571 12.0311 2.74957L10.7965 1.85711C10.56 1.67347 10.2448 1.46315 9.64083 1.51576L2.44308 2.04074C2.18059 2.06677 2.12815 2.19801 2.2327 2.30322L3.25781 3.11684ZM3.7041 4.84917V12.6704C3.7041 13.0907 3.91415 13.248 4.38693 13.222L12.5562 12.7493C13.0292 12.7233 13.0819 12.4341 13.0819 12.0927V4.32397C13.0819 3.98306 12.9508 3.79921 12.6612 3.82545L4.12422 4.32397C3.80918 4.35044 3.7041 4.50803 3.7041 4.84917ZM11.7688 5.26872C11.8212 5.50518 11.7688 5.74142 11.5319 5.76799L11.1383 5.84641V11.6205C10.7965 11.8042 10.4814 11.9092 10.2188 11.9092C9.79835 11.9092 9.69305 11.7779 9.37812 11.3844L6.80345 7.34249V11.2532L7.61816 11.437C7.61816 11.437 7.61816 11.9092 6.96086 11.9092L5.14879 12.0143C5.09615 11.9092 5.14879 11.647 5.33259 11.5944L5.80546 11.4634V6.29276L5.1489 6.24015C5.09625 6.00369 5.22739 5.66278 5.5954 5.63631L7.53935 5.50528L10.2188 9.5998V5.97765L9.53564 5.89924C9.4832 5.61018 9.69305 5.40028 9.95576 5.37425L11.7688 5.26872ZM1.83874 1.33212L9.32557 0.780787C10.245 0.701932 10.4815 0.754753 11.0594 1.17452L13.4492 2.85424C13.8436 3.14309 13.975 3.22173 13.975 3.53661V12.7493C13.975 13.3266 13.7647 13.6681 13.0293 13.7203L4.33492 14.2454C3.78291 14.2717 3.52019 14.193 3.23111 13.8253L1.47116 11.5419C1.1558 11.1216 1.02466 10.8071 1.02466 10.4392V2.25041C1.02466 1.77825 1.23504 1.38441 1.83874 1.33212Z",fill:void 0===u?"currentColor":u}))}),em=["color"],ev=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,em);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))}),e_=["color"],ey=(0,d.forwardRef)(function(a,l){var u=a.color,h=_objectWithoutPropertiesLoose(a,e_);return(0,d.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h,{ref:l}),(0,d.createElement)("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:void 0===u?"currentColor":u,fillRule:"evenodd",clipRule:"evenodd"}))})},805130:function(a,l,u){"use strict";var d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,__async=(a,l,u)=>new Promise((d,h)=>{var fulfilled=a=>{try{step(u.next(a))}catch(a){h(a)}},rejected=a=>{try{step(u.throw(a))}catch(a){h(a)}},step=a=>a.done?d(a.value):Promise.resolve(a.value).then(fulfilled,rejected);step((u=u.apply(a,l)).next())}),g={};((a,l)=>{for(var u in l)d(a,u,{get:l[u],enumerable:!0})})(g,{SessionContextProvider:()=>SessionContextProvider,useSession:()=>useSession,useSessionContext:()=>useSessionContext,useSupabaseClient:()=>useSupabaseClient,useUser:()=>useUser}),a.exports=((a,l,u,g)=>{if(l&&"object"==typeof l||"function"==typeof l)for(let u of f(l))p.call(a,u)||void 0===u||d(a,u,{get:()=>l[u],enumerable:!(g=h(l,u))||g.enumerable});return a})(d({},"__esModule",{value:!0}),g);var m=u(202784),v=u(552322),_=(0,m.createContext)({isLoading:!0,session:null,error:null,supabaseClient:{}}),SessionContextProvider=({supabaseClient:a,initialSession:l=null,children:u})=>{let[d,h]=(0,m.useState)(l),[f,p]=(0,m.useState)(!l),[g,T]=(0,m.useState)();(0,m.useEffect)(()=>{!d&&l&&h(l)},[d,l]),(0,m.useEffect)(()=>{let l=!0;return function(){__async(this,null,function*(){let{data:{session:u},error:d}=yield a.auth.getSession();if(l){if(d){T(d),p(!1);return}h(u),p(!1)}})}(),()=>{l=!1}},[]),(0,m.useEffect)(()=>{let{data:{subscription:l}}=a.auth.onAuthStateChange((a,l)=>{l&&("SIGNED_IN"===a||"TOKEN_REFRESHED"===a||"USER_UPDATED"===a)&&h(l),"SIGNED_OUT"===a&&h(null)});return()=>{l.unsubscribe()}},[]);let C=(0,m.useMemo)(()=>f?{isLoading:!0,session:null,error:null,supabaseClient:a}:g?{isLoading:!1,session:null,error:g,supabaseClient:a}:{isLoading:!1,session:d,error:null,supabaseClient:a},[f,d,g]);return(0,v.jsx)(_.Provider,{value:C,children:u})},useSessionContext=()=>{let a=(0,m.useContext)(_);if(void 0===a)throw Error("useSessionContext must be used within a SessionContextProvider.");return a};function useSupabaseClient(){let a=(0,m.useContext)(_);if(void 0===a)throw Error("useSupabaseClient must be used within a SessionContextProvider.");return a.supabaseClient}var useSession=()=>{let a=(0,m.useContext)(_);if(void 0===a)throw Error("useSession must be used within a SessionContextProvider.");return a.session},useUser=()=>{var a,l;let u=(0,m.useContext)(_);if(void 0===u)throw Error("useUser must be used within a SessionContextProvider.");return null!=(l=null==(a=u.session)?void 0:a.user)?l:null}},765699:function(a,l,u){"use strict";u.r(l),u.d(l,{Headers:function(){return f},Request:function(){return p},Response:function(){return g},fetch:function(){return h}});var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==u.g)return u.g;throw Error("unable to locate global object")}();let h=d.fetch;l.default=d.fetch.bind(d);let f=d.Headers,p=d.Request,g=d.Response},595766:function(a,l){"use strict";l.byteLength=function(a){var l=getLens(a),u=l[0],d=l[1];return(u+d)*3/4-d},l.toByteArray=function(a){var l,u,f=getLens(a),p=f[0],g=f[1],m=new h((p+g)*3/4-g),v=0,_=g>0?p-4:p;for(u=0;u<_;u+=4)l=d[a.charCodeAt(u)]<<18|d[a.charCodeAt(u+1)]<<12|d[a.charCodeAt(u+2)]<<6|d[a.charCodeAt(u+3)],m[v++]=l>>16&255,m[v++]=l>>8&255,m[v++]=255&l;return 2===g&&(l=d[a.charCodeAt(u)]<<2|d[a.charCodeAt(u+1)]>>4,m[v++]=255&l),1===g&&(l=d[a.charCodeAt(u)]<<10|d[a.charCodeAt(u+1)]<<4|d[a.charCodeAt(u+2)]>>2,m[v++]=l>>8&255,m[v++]=255&l),m},l.fromByteArray=function(a){for(var l,d=a.length,h=d%3,f=[],p=0,g=d-h;p<g;p+=16383)f.push(function(a,l,d){for(var h,f=[],p=l;p<d;p+=3)f.push(u[(h=(a[p]<<16&16711680)+(a[p+1]<<8&65280)+(255&a[p+2]))>>18&63]+u[h>>12&63]+u[h>>6&63]+u[63&h]);return f.join("")}(a,p,p+16383>g?g:p+16383));return 1===h?f.push(u[(l=a[d-1])>>2]+u[l<<4&63]+"=="):2===h&&f.push(u[(l=(a[d-2]<<8)+a[d-1])>>10]+u[l>>4&63]+u[l<<2&63]+"="),f.join("")};for(var u=[],d=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,g=f.length;p<g;++p)u[p]=f[p],d[f.charCodeAt(p)]=p;function getLens(a){var l=a.length;if(l%4>0)throw Error("Invalid string. Length must be a multiple of 4");var u=a.indexOf("=");-1===u&&(u=l);var d=u===l?0:4-u%4;return[u,d]}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63},348834:function(a,l,u){"use strict";/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */var d=u(595766),h=u(462333),f=u(77906);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(a,l){if(kMaxLength()<l)throw RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(a=new Uint8Array(l)).__proto__=Buffer.prototype:(null===a&&(a=new Buffer(l)),a.length=l),a}function Buffer(a,l,u){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer))return new Buffer(a,l,u);if("number"==typeof a){if("string"==typeof l)throw Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,a)}return from(this,a,l,u)}function from(a,l,u,d){if("number"==typeof l)throw TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&l instanceof ArrayBuffer?function(a,l,u,d){if(l.byteLength,u<0||l.byteLength<u)throw RangeError("'offset' is out of bounds");if(l.byteLength<u+(d||0))throw RangeError("'length' is out of bounds");return l=void 0===u&&void 0===d?new Uint8Array(l):void 0===d?new Uint8Array(l,u):new Uint8Array(l,u,d),Buffer.TYPED_ARRAY_SUPPORT?(a=l).__proto__=Buffer.prototype:a=fromArrayLike(a,l),a}(a,l,u,d):"string"==typeof l?function(a,l,u){if(("string"!=typeof u||""===u)&&(u="utf8"),!Buffer.isEncoding(u))throw TypeError('"encoding" must be a valid string encoding');var d=0|byteLength(l,u),h=(a=createBuffer(a,d)).write(l,u);return h!==d&&(a=a.slice(0,h)),a}(a,l,u):function(a,l){if(Buffer.isBuffer(l)){var u,d=0|checked(l.length);return 0===(a=createBuffer(a,d)).length||l.copy(a,0,0,d),a}if(l){if("undefined"!=typeof ArrayBuffer&&l.buffer instanceof ArrayBuffer||"length"in l)return"number"!=typeof l.length||(u=l.length)!=u?createBuffer(a,0):fromArrayLike(a,l);if("Buffer"===l.type&&f(l.data))return fromArrayLike(a,l.data)}throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(a,l)}function assertSize(a){if("number"!=typeof a)throw TypeError('"size" argument must be a number');if(a<0)throw RangeError('"size" argument must not be negative')}function allocUnsafe(a,l){if(assertSize(l),a=createBuffer(a,l<0?0:0|checked(l)),!Buffer.TYPED_ARRAY_SUPPORT)for(var u=0;u<l;++u)a[u]=0;return a}function fromArrayLike(a,l){var u=l.length<0?0:0|checked(l.length);a=createBuffer(a,u);for(var d=0;d<u;d+=1)a[d]=255&l[d];return a}function checked(a){if(a>=kMaxLength())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|a}function byteLength(a,l){if(Buffer.isBuffer(a))return a.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)||a instanceof ArrayBuffer))return a.byteLength;"string"!=typeof a&&(a=""+a);var u=a.length;if(0===u)return 0;for(var d=!1;;)switch(l){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":case void 0:return utf8ToBytes(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*u;case"hex":return u>>>1;case"base64":return base64ToBytes(a).length;default:if(d)return utf8ToBytes(a).length;l=(""+l).toLowerCase(),d=!0}}function slowToString(a,l,u){var h,f,p=!1;if((void 0===l||l<0)&&(l=0),l>this.length||((void 0===u||u>this.length)&&(u=this.length),u<=0||(u>>>=0)<=(l>>>=0)))return"";for(a||(a="utf8");;)switch(a){case"hex":return function(a,l,u){var d,h=a.length;(!l||l<0)&&(l=0),(!u||u<0||u>h)&&(u=h);for(var f="",p=l;p<u;++p)f+=(d=a[p])<16?"0"+d.toString(16):d.toString(16);return f}(this,l,u);case"utf8":case"utf-8":return utf8Slice(this,l,u);case"ascii":return function(a,l,u){var d="";u=Math.min(a.length,u);for(var h=l;h<u;++h)d+=String.fromCharCode(127&a[h]);return d}(this,l,u);case"latin1":case"binary":return function(a,l,u){var d="";u=Math.min(a.length,u);for(var h=l;h<u;++h)d+=String.fromCharCode(a[h]);return d}(this,l,u);case"base64":return h=l,f=u,0===h&&f===this.length?d.fromByteArray(this):d.fromByteArray(this.slice(h,f));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(a,l,u){for(var d=a.slice(l,u),h="",f=0;f<d.length;f+=2)h+=String.fromCharCode(d[f]+256*d[f+1]);return h}(this,l,u);default:if(p)throw TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),p=!0}}function swap(a,l,u){var d=a[l];a[l]=a[u],a[u]=d}function bidirectionalIndexOf(a,l,u,d,h){if(0===a.length)return -1;if("string"==typeof u?(d=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),isNaN(u=+u)&&(u=h?0:a.length-1),u<0&&(u=a.length+u),u>=a.length){if(h)return -1;u=a.length-1}else if(u<0){if(!h)return -1;u=0}if("string"==typeof l&&(l=Buffer.from(l,d)),Buffer.isBuffer(l))return 0===l.length?-1:arrayIndexOf(a,l,u,d,h);if("number"==typeof l)return(l&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?h?Uint8Array.prototype.indexOf.call(a,l,u):Uint8Array.prototype.lastIndexOf.call(a,l,u):arrayIndexOf(a,[l],u,d,h);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(a,l,u,d,h){var f,p=1,g=a.length,m=l.length;if(void 0!==d&&("ucs2"===(d=String(d).toLowerCase())||"ucs-2"===d||"utf16le"===d||"utf-16le"===d)){if(a.length<2||l.length<2)return -1;p=2,g/=2,m/=2,u/=2}function read(a,l){return 1===p?a[l]:a.readUInt16BE(l*p)}if(h){var v=-1;for(f=u;f<g;f++)if(read(a,f)===read(l,-1===v?0:f-v)){if(-1===v&&(v=f),f-v+1===m)return v*p}else -1!==v&&(f-=f-v),v=-1}else for(u+m>g&&(u=g-m),f=u;f>=0;f--){for(var _=!0,T=0;T<m;T++)if(read(a,f+T)!==read(l,T)){_=!1;break}if(_)return f}return -1}function utf8Slice(a,l,u){u=Math.min(a.length,u);for(var d=[],h=l;h<u;){var f,p,g,m,v=a[h],_=null,T=v>239?4:v>223?3:v>191?2:1;if(h+T<=u)switch(T){case 1:v<128&&(_=v);break;case 2:(192&(f=a[h+1]))==128&&(m=(31&v)<<6|63&f)>127&&(_=m);break;case 3:f=a[h+1],p=a[h+2],(192&f)==128&&(192&p)==128&&(m=(15&v)<<12|(63&f)<<6|63&p)>2047&&(m<55296||m>57343)&&(_=m);break;case 4:f=a[h+1],p=a[h+2],g=a[h+3],(192&f)==128&&(192&p)==128&&(192&g)==128&&(m=(15&v)<<18|(63&f)<<12|(63&p)<<6|63&g)>65535&&m<1114112&&(_=m)}null===_?(_=65533,T=1):_>65535&&(_-=65536,d.push(_>>>10&1023|55296),_=56320|1023&_),d.push(_),h+=T}return function(a){var l=a.length;if(l<=4096)return String.fromCharCode.apply(String,a);for(var u="",d=0;d<l;)u+=String.fromCharCode.apply(String,a.slice(d,d+=4096));return u}(d)}function checkOffset(a,l,u){if(a%1!=0||a<0)throw RangeError("offset is not uint");if(a+l>u)throw RangeError("Trying to access beyond buffer length")}function checkInt(a,l,u,d,h,f){if(!Buffer.isBuffer(a))throw TypeError('"buffer" argument must be a Buffer instance');if(l>h||l<f)throw RangeError('"value" argument is out of bounds');if(u+d>a.length)throw RangeError("Index out of range")}function objectWriteUInt16(a,l,u,d){l<0&&(l=65535+l+1);for(var h=0,f=Math.min(a.length-u,2);h<f;++h)a[u+h]=(l&255<<8*(d?h:1-h))>>>(d?h:1-h)*8}function objectWriteUInt32(a,l,u,d){l<0&&(l=4294967295+l+1);for(var h=0,f=Math.min(a.length-u,4);h<f;++h)a[u+h]=l>>>(d?h:3-h)*8&255}function checkIEEE754(a,l,u,d,h,f){if(u+d>a.length||u<0)throw RangeError("Index out of range")}function writeFloat(a,l,u,d,f){return f||checkIEEE754(a,l,u,4,34028234663852886e22,-34028234663852886e22),h.write(a,l,u,d,23,4),u+4}function writeDouble(a,l,u,d,f){return f||checkIEEE754(a,l,u,8,17976931348623157e292,-17976931348623157e292),h.write(a,l,u,d,52,8),u+8}l.Buffer=Buffer,l.SlowBuffer=function(a){return+a!=a&&(a=0),Buffer.alloc(+a)},l.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==u.g.TYPED_ARRAY_SUPPORT?u.g.TYPED_ARRAY_SUPPORT:function(){try{var a=new Uint8Array(1);return a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===a.foo()&&"function"==typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(a){return!1}}(),l.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(a){return a.__proto__=Buffer.prototype,a},Buffer.from=function(a,l,u){return from(null,a,l,u)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(a,l,u){return(assertSize(a),a<=0)?createBuffer(null,a):void 0!==l?"string"==typeof u?createBuffer(null,a).fill(l,u):createBuffer(null,a).fill(l):createBuffer(null,a)},Buffer.allocUnsafe=function(a){return allocUnsafe(null,a)},Buffer.allocUnsafeSlow=function(a){return allocUnsafe(null,a)},Buffer.isBuffer=function(a){return!!(null!=a&&a._isBuffer)},Buffer.compare=function(a,l){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(l))throw TypeError("Arguments must be Buffers");if(a===l)return 0;for(var u=a.length,d=l.length,h=0,f=Math.min(u,d);h<f;++h)if(a[h]!==l[h]){u=a[h],d=l[h];break}return u<d?-1:d<u?1:0},Buffer.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(a,l){if(!f(a))throw TypeError('"list" argument must be an Array of Buffers');if(0===a.length)return Buffer.alloc(0);if(void 0===l)for(u=0,l=0;u<a.length;++u)l+=a[u].length;var u,d=Buffer.allocUnsafe(l),h=0;for(u=0;u<a.length;++u){var p=a[u];if(!Buffer.isBuffer(p))throw TypeError('"list" argument must be an Array of Buffers');p.copy(d,h),h+=p.length}return d},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var a=this.length;if(a%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<a;l+=2)swap(this,l,l+1);return this},Buffer.prototype.swap32=function(){var a=this.length;if(a%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<a;l+=4)swap(this,l,l+3),swap(this,l+1,l+2);return this},Buffer.prototype.swap64=function(){var a=this.length;if(a%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<a;l+=8)swap(this,l,l+7),swap(this,l+1,l+6),swap(this,l+2,l+5),swap(this,l+3,l+4);return this},Buffer.prototype.toString=function(){var a=0|this.length;return 0===a?"":0==arguments.length?utf8Slice(this,0,a):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(a){if(!Buffer.isBuffer(a))throw TypeError("Argument must be a Buffer");return this===a||0===Buffer.compare(this,a)},Buffer.prototype.inspect=function(){var a="",u=l.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(a+=" ... ")),"<Buffer "+a+">"},Buffer.prototype.compare=function(a,l,u,d,h){if(!Buffer.isBuffer(a))throw TypeError("Argument must be a Buffer");if(void 0===l&&(l=0),void 0===u&&(u=a?a.length:0),void 0===d&&(d=0),void 0===h&&(h=this.length),l<0||u>a.length||d<0||h>this.length)throw RangeError("out of range index");if(d>=h&&l>=u)return 0;if(d>=h)return -1;if(l>=u)return 1;if(l>>>=0,u>>>=0,d>>>=0,h>>>=0,this===a)return 0;for(var f=h-d,p=u-l,g=Math.min(f,p),m=this.slice(d,h),v=a.slice(l,u),_=0;_<g;++_)if(m[_]!==v[_]){f=m[_],p=v[_];break}return f<p?-1:p<f?1:0},Buffer.prototype.includes=function(a,l,u){return -1!==this.indexOf(a,l,u)},Buffer.prototype.indexOf=function(a,l,u){return bidirectionalIndexOf(this,a,l,u,!0)},Buffer.prototype.lastIndexOf=function(a,l,u){return bidirectionalIndexOf(this,a,l,u,!1)},Buffer.prototype.write=function(a,l,u,d){if(void 0===l)d="utf8",u=this.length,l=0;else if(void 0===u&&"string"==typeof l)d=l,u=this.length,l=0;else if(isFinite(l))l|=0,isFinite(u)?(u|=0,void 0===d&&(d="utf8")):(d=u,u=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var h,f,p,g,m,v,_,T,C,R,B,V,er=this.length-l;if((void 0===u||u>er)&&(u=er),a.length>0&&(u<0||l<0)||l>this.length)throw RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(var en=!1;;)switch(d){case"hex":return function(a,l,u,d){u=Number(u)||0;var h=a.length-u;d?(d=Number(d))>h&&(d=h):d=h;var f=l.length;if(f%2!=0)throw TypeError("Invalid hex string");d>f/2&&(d=f/2);for(var p=0;p<d;++p){var g=parseInt(l.substr(2*p,2),16);if(isNaN(g))break;a[u+p]=g}return p}(this,a,l,u);case"utf8":case"utf-8":return m=l,v=u,blitBuffer(utf8ToBytes(a,this.length-m),this,m,v);case"ascii":return _=l,T=u,blitBuffer(asciiToBytes(a),this,_,T);case"latin1":case"binary":return h=this,f=a,p=l,g=u,blitBuffer(asciiToBytes(f),h,p,g);case"base64":return C=l,R=u,blitBuffer(base64ToBytes(a),this,C,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B=l,V=u,blitBuffer(function(a,l){for(var u,d,h=[],f=0;f<a.length&&!((l-=2)<0);++f)d=(u=a.charCodeAt(f))>>8,h.push(u%256),h.push(d);return h}(a,this.length-B),this,B,V);default:if(en)throw TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),en=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(a,l){var u,d=this.length;if(a=~~a,l=void 0===l?d:~~l,a<0?(a+=d)<0&&(a=0):a>d&&(a=d),l<0?(l+=d)<0&&(l=0):l>d&&(l=d),l<a&&(l=a),Buffer.TYPED_ARRAY_SUPPORT)(u=this.subarray(a,l)).__proto__=Buffer.prototype;else{var h=l-a;u=new Buffer(h,void 0);for(var f=0;f<h;++f)u[f]=this[f+a]}return u},Buffer.prototype.readUIntLE=function(a,l,u){a|=0,l|=0,u||checkOffset(a,l,this.length);for(var d=this[a],h=1,f=0;++f<l&&(h*=256);)d+=this[a+f]*h;return d},Buffer.prototype.readUIntBE=function(a,l,u){a|=0,l|=0,u||checkOffset(a,l,this.length);for(var d=this[a+--l],h=1;l>0&&(h*=256);)d+=this[a+--l]*h;return d},Buffer.prototype.readUInt8=function(a,l){return l||checkOffset(a,1,this.length),this[a]},Buffer.prototype.readUInt16LE=function(a,l){return l||checkOffset(a,2,this.length),this[a]|this[a+1]<<8},Buffer.prototype.readUInt16BE=function(a,l){return l||checkOffset(a,2,this.length),this[a]<<8|this[a+1]},Buffer.prototype.readUInt32LE=function(a,l){return l||checkOffset(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},Buffer.prototype.readUInt32BE=function(a,l){return l||checkOffset(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},Buffer.prototype.readIntLE=function(a,l,u){a|=0,l|=0,u||checkOffset(a,l,this.length);for(var d=this[a],h=1,f=0;++f<l&&(h*=256);)d+=this[a+f]*h;return d>=(h*=128)&&(d-=Math.pow(2,8*l)),d},Buffer.prototype.readIntBE=function(a,l,u){a|=0,l|=0,u||checkOffset(a,l,this.length);for(var d=l,h=1,f=this[a+--d];d>0&&(h*=256);)f+=this[a+--d]*h;return f>=(h*=128)&&(f-=Math.pow(2,8*l)),f},Buffer.prototype.readInt8=function(a,l){return(l||checkOffset(a,1,this.length),128&this[a])?-((255-this[a]+1)*1):this[a]},Buffer.prototype.readInt16LE=function(a,l){l||checkOffset(a,2,this.length);var u=this[a]|this[a+1]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt16BE=function(a,l){l||checkOffset(a,2,this.length);var u=this[a+1]|this[a]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt32LE=function(a,l){return l||checkOffset(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},Buffer.prototype.readInt32BE=function(a,l){return l||checkOffset(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},Buffer.prototype.readFloatLE=function(a,l){return l||checkOffset(a,4,this.length),h.read(this,a,!0,23,4)},Buffer.prototype.readFloatBE=function(a,l){return l||checkOffset(a,4,this.length),h.read(this,a,!1,23,4)},Buffer.prototype.readDoubleLE=function(a,l){return l||checkOffset(a,8,this.length),h.read(this,a,!0,52,8)},Buffer.prototype.readDoubleBE=function(a,l){return l||checkOffset(a,8,this.length),h.read(this,a,!1,52,8)},Buffer.prototype.writeUIntLE=function(a,l,u,d){if(a=+a,l|=0,u|=0,!d){var h=Math.pow(2,8*u)-1;checkInt(this,a,l,u,h,0)}var f=1,p=0;for(this[l]=255&a;++p<u&&(f*=256);)this[l+p]=a/f&255;return l+u},Buffer.prototype.writeUIntBE=function(a,l,u,d){if(a=+a,l|=0,u|=0,!d){var h=Math.pow(2,8*u)-1;checkInt(this,a,l,u,h,0)}var f=u-1,p=1;for(this[l+f]=255&a;--f>=0&&(p*=256);)this[l+f]=a/p&255;return l+u},Buffer.prototype.writeUInt8=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[l]=255&a,l+1},Buffer.prototype.writeUInt16LE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=255&a,this[l+1]=a>>>8):objectWriteUInt16(this,a,l,!0),l+2},Buffer.prototype.writeUInt16BE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=a>>>8,this[l+1]=255&a):objectWriteUInt16(this,a,l,!1),l+2},Buffer.prototype.writeUInt32LE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[l+3]=a>>>24,this[l+2]=a>>>16,this[l+1]=a>>>8,this[l]=255&a):objectWriteUInt32(this,a,l,!0),l+4},Buffer.prototype.writeUInt32BE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=255&a):objectWriteUInt32(this,a,l,!1),l+4},Buffer.prototype.writeIntLE=function(a,l,u,d){if(a=+a,l|=0,!d){var h=Math.pow(2,8*u-1);checkInt(this,a,l,u,h-1,-h)}var f=0,p=1,g=0;for(this[l]=255&a;++f<u&&(p*=256);)a<0&&0===g&&0!==this[l+f-1]&&(g=1),this[l+f]=(a/p>>0)-g&255;return l+u},Buffer.prototype.writeIntBE=function(a,l,u,d){if(a=+a,l|=0,!d){var h=Math.pow(2,8*u-1);checkInt(this,a,l,u,h-1,-h)}var f=u-1,p=1,g=0;for(this[l+f]=255&a;--f>=0&&(p*=256);)a<0&&0===g&&0!==this[l+f+1]&&(g=1),this[l+f]=(a/p>>0)-g&255;return l+u},Buffer.prototype.writeInt8=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[l]=255&a,l+1},Buffer.prototype.writeInt16LE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=255&a,this[l+1]=a>>>8):objectWriteUInt16(this,a,l,!0),l+2},Buffer.prototype.writeInt16BE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=a>>>8,this[l+1]=255&a):objectWriteUInt16(this,a,l,!1),l+2},Buffer.prototype.writeInt32LE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=255&a,this[l+1]=a>>>8,this[l+2]=a>>>16,this[l+3]=a>>>24):objectWriteUInt32(this,a,l,!0),l+4},Buffer.prototype.writeInt32BE=function(a,l,u){return a=+a,l|=0,u||checkInt(this,a,l,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),Buffer.TYPED_ARRAY_SUPPORT?(this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=255&a):objectWriteUInt32(this,a,l,!1),l+4},Buffer.prototype.writeFloatLE=function(a,l,u){return writeFloat(this,a,l,!0,u)},Buffer.prototype.writeFloatBE=function(a,l,u){return writeFloat(this,a,l,!1,u)},Buffer.prototype.writeDoubleLE=function(a,l,u){return writeDouble(this,a,l,!0,u)},Buffer.prototype.writeDoubleBE=function(a,l,u){return writeDouble(this,a,l,!1,u)},Buffer.prototype.copy=function(a,l,u,d){if(u||(u=0),d||0===d||(d=this.length),l>=a.length&&(l=a.length),l||(l=0),d>0&&d<u&&(d=u),d===u||0===a.length||0===this.length)return 0;if(l<0)throw RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw RangeError("sourceStart out of bounds");if(d<0)throw RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-l<d-u&&(d=a.length-l+u);var h,f=d-u;if(this===a&&u<l&&l<d)for(h=f-1;h>=0;--h)a[h+l]=this[h+u];else if(f<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(h=0;h<f;++h)a[h+l]=this[h+u];else Uint8Array.prototype.set.call(a,this.subarray(u,u+f),l);return f},Buffer.prototype.fill=function(a,l,u,d){if("string"==typeof a){if("string"==typeof l?(d=l,l=0,u=this.length):"string"==typeof u&&(d=u,u=this.length),1===a.length){var h,f=a.charCodeAt(0);f<256&&(a=f)}if(void 0!==d&&"string"!=typeof d)throw TypeError("encoding must be a string");if("string"==typeof d&&!Buffer.isEncoding(d))throw TypeError("Unknown encoding: "+d)}else"number"==typeof a&&(a&=255);if(l<0||this.length<l||this.length<u)throw RangeError("Out of range index");if(u<=l)return this;if(l>>>=0,u=void 0===u?this.length:u>>>0,a||(a=0),"number"==typeof a)for(h=l;h<u;++h)this[h]=a;else{var p=Buffer.isBuffer(a)?a:utf8ToBytes(new Buffer(a,d).toString()),g=p.length;for(h=0;h<u-l;++h)this[h+l]=p[h%g]}return this};var p=/[^+\/0-9A-Za-z-_]/g;function utf8ToBytes(a,l){l=l||1/0;for(var u,d=a.length,h=null,f=[],p=0;p<d;++p){if((u=a.charCodeAt(p))>55295&&u<57344){if(!h){if(u>56319||p+1===d){(l-=3)>-1&&f.push(239,191,189);continue}h=u;continue}if(u<56320){(l-=3)>-1&&f.push(239,191,189),h=u;continue}u=(h-55296<<10|u-56320)+65536}else h&&(l-=3)>-1&&f.push(239,191,189);if(h=null,u<128){if((l-=1)<0)break;f.push(u)}else if(u<2048){if((l-=2)<0)break;f.push(u>>6|192,63&u|128)}else if(u<65536){if((l-=3)<0)break;f.push(u>>12|224,u>>6&63|128,63&u|128)}else if(u<1114112){if((l-=4)<0)break;f.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}else throw Error("Invalid code point")}return f}function asciiToBytes(a){for(var l=[],u=0;u<a.length;++u)l.push(255&a.charCodeAt(u));return l}function base64ToBytes(a){return d.toByteArray(function(a){var l;if((a=((l=a).trim?l.trim():l.replace(/^\s+|\s+$/g,"")).replace(p,"")).length<2)return"";for(;a.length%4!=0;)a+="=";return a}(a))}function blitBuffer(a,l,u,d){for(var h=0;h<d&&!(h+u>=l.length)&&!(h>=a.length);++h)l[h+u]=a[h];return h}},462333:function(a,l){l.read=function(a,l,u,d,h){var f,p,g=8*h-d-1,m=(1<<g)-1,v=m>>1,_=-7,T=u?h-1:0,C=u?-1:1,R=a[l+T];for(T+=C,f=R&(1<<-_)-1,R>>=-_,_+=g;_>0;f=256*f+a[l+T],T+=C,_-=8);for(p=f&(1<<-_)-1,f>>=-_,_+=d;_>0;p=256*p+a[l+T],T+=C,_-=8);if(0===f)f=1-v;else{if(f===m)return p?NaN:(R?-1:1)*(1/0);p+=Math.pow(2,d),f-=v}return(R?-1:1)*p*Math.pow(2,f-d)},l.write=function(a,l,u,d,h,f){var p,g,m,v=8*f-h-1,_=(1<<v)-1,T=_>>1,C=23===h?5960464477539062e-23:0,R=d?0:f-1,B=d?1:-1,V=l<0||0===l&&1/l<0?1:0;for(isNaN(l=Math.abs(l))||l===1/0?(g=isNaN(l)?1:0,p=_):(p=Math.floor(Math.log(l)/Math.LN2),l*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+T>=1?l+=C/m:l+=C*Math.pow(2,1-T),l*m>=2&&(p++,m/=2),p+T>=_?(g=0,p=_):p+T>=1?(g=(l*m-1)*Math.pow(2,h),p+=T):(g=l*Math.pow(2,T-1)*Math.pow(2,h),p=0));h>=8;a[u+R]=255&g,R+=B,g/=256,h-=8);for(p=p<<h|g,v+=h;v>0;a[u+R]=255&p,R+=B,p/=256,v-=8);a[u+R-B]|=128*V}},77906:function(a){var l={}.toString;a.exports=Array.isArray||function(a){return"[object Array]"==l.call(a)}},593542:function(a,l,u){"use strict";var d,h;a.exports=(null==(d=u.g.process)?void 0:d.env)&&"object"==typeof(null==(h=u.g.process)?void 0:h.env)?u.g.process:u(442351)},86570:function(a,l,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return u(605848)}])},81134:function(a,l,u){"use strict";u.d(l,{h:function(){return LogoLoading}});var d=u(552322);u(202784);var h=u(771937);let LogoLoading=a=>{let{className:l,size:u=108}=a;return(0,d.jsx)("div",{className:(0,h.cn)("h-full center",l),children:(0,d.jsx)("img",{className:"animate-pulse",height:u,width:u,src:"/logo.svg"})})}},195150:function(a,l,u){"use strict";u.d(l,{S:function(){return useUserContext},d:function(){return UserProvider}});var d=u(552322),h=u(202784),f=u(805130),p=u(267210),g=u(540559),m=u(205632),v=u(688965),_=u(81134);let T=(0,h.createContext)(null);function UserProvider(a){let{children:l}=a,[u,C]=(0,h.useState)(null),[R,B]=(0,h.useState)(null),[V,er]=(0,h.useState)(null),[en,ei]=(0,h.useState)(!1),[es,eo]=(0,h.useState)(!0),ea=(0,m.useRouter)(),el=(0,f.useSupabaseClient)();async function getUserData(){for(let a=0;a<5;a++)try{let{data:a,error:l}=await el.auth.getUser();if(l)continue;return a}catch(a){}return null}async function getUserType(a){for(let l=0;l<5;l++)try{let{data:l,error:u}=await el.from("user_type").select("type").eq("user_id",a.id).single();if(u)continue;return l}catch(a){console.log("Error",a)}}let checkAuth=async a=>{try{var l;eo(!0);let u=function(){let a=JSON.parse(localStorage.getItem("sb-".concat("mnmxcrqbhvdpcqvzmvxh","-auth-token"))||null);return a}();if(!u&&!a){eo(!1);return}let d=await getUserData();if(!d){eo(!1);return}let{user:h}=d;C(h);let f=await getUserType(h);if(!f)for(let a=0;a<5;a++)try{await p.h.patch("/user-type")}catch(a){console.log("Error",a)}let m=(null==f?void 0:f.type)||(null===(l=h.user_metadata)||void 0===l?void 0:l.type);if("suspended"===m){(0,g.Am)({variant:"destructive",title:"Your account is suspended.",description:"Please contact support for further information."}),await el.auth.signOut(),eo(!1),ea.replace("/");return}if(B(m),ei(!0),"user"===m)for(let a=0;a<5;a++)try{let{data:a}=await p.h.get("/plan-limit");er(null==a?void 0:a.limit);break}catch(a){console.log("Error",a)}eo(!1)}catch(a){v.Tb(a),eo(!1)}};return((0,h.useEffect)(()=>{checkAuth()},[]),es)?(0,d.jsx)(_.h,{}):(0,d.jsx)(T.Provider,{value:{user:u,setUser:C,userType:R,setUserType:B,userPlan:V,setUserPlan:er,isAuthenticated:en,checkAuth},children:l})}function useUserContext(){let a=(0,h.useContext)(T);if(void 0===a)throw Error("useUser must be used within a UserProvider");return a}},267210:function(a,l,u){"use strict";u.d(l,{_:function(){return setupApiWithHeaders},h:function(){return f}});var d=u(660418);let h="https://embed.elephant.ai/api/v1",f=d.Z.create({baseURL:h}),setupApiWithHeaders=a=>f=d.Z.create({baseURL:h,headers:a})},771937:function(a,l,u){"use strict";u.d(l,{cn:function(){return cn}});var d=u(840489),h=u(320324);function cn(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return(0,h.m6)((0,d.W)(l))}},989420:function(a,l,u){"use strict";let d;u.d(l,{J:function(){return createSupabaseClient},N:function(){return getSupabaseClient}});let resolveFetch=a=>{let l;return l=a||("undefined"==typeof fetch?(...a)=>Promise.resolve().then(u.bind(u,765699)).then(({default:l})=>l(...a)):fetch),(...a)=>l(...a)};let FunctionsError=class FunctionsError extends Error{constructor(a,l="FunctionsError",u){super(a),this.name=l,this.context=u}};let FunctionsFetchError=class FunctionsFetchError extends FunctionsError{constructor(a){super("Failed to send a request to the Edge Function","FunctionsFetchError",a)}};let FunctionsRelayError=class FunctionsRelayError extends FunctionsError{constructor(a){super("Relay Error invoking the Edge Function","FunctionsRelayError",a)}};let FunctionsHttpError=class FunctionsHttpError extends FunctionsError{constructor(a){super("Edge Function returned a non-2xx status code","FunctionsHttpError",a)}};let FunctionsClient=class FunctionsClient{constructor(a,{headers:l={},customFetch:u}={}){this.url=a,this.headers=l,this.fetch=resolveFetch(u)}setAuth(a){this.headers.Authorization=`Bearer ${a}`}invoke(a,l={}){var u,d,h,f,p;return d=this,h=void 0,f=void 0,p=function*(){try{let d;let{headers:h,method:f,body:p}=l,g={};p&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)&&("undefined"!=typeof Blob&&p instanceof Blob||p instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",d=p):"string"==typeof p?(g["Content-Type"]="text/plain",d=p):"undefined"!=typeof FormData&&p instanceof FormData?d=p:(g["Content-Type"]="application/json",d=JSON.stringify(p)));let m=yield this.fetch(`${this.url}/${a}`,{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),h),body:d}).catch(a=>{throw new FunctionsFetchError(a)}),v=m.headers.get("x-relay-error");if(v&&"true"===v)throw new FunctionsRelayError(m);if(!m.ok)throw new FunctionsHttpError(m);let _=(null!==(u=m.headers.get("Content-Type"))&&void 0!==u?u:"text/plain").split(";")[0].trim();return{data:"application/json"===_?yield m.json():"application/octet-stream"===_?yield m.blob():"multipart/form-data"===_?yield m.formData():yield m.text(),error:null}}catch(a){return{data:null,error:a}}},new(f||(f=Promise))(function(a,l){function fulfilled(a){try{step(p.next(a))}catch(a){l(a)}}function rejected(a){try{step(p.throw(a))}catch(a){l(a)}}function step(l){var u;l.done?a(l.value):((u=l.value)instanceof f?u:new f(function(a){a(u)})).then(fulfilled,rejected)}step((p=p.apply(d,h||[])).next())})}};var h,f,p,g,m,v,_,T,C,R,B,V,er,en,ei,es,eo,ea,el,ec=u(765699);let PostgrestBuilder=class PostgrestBuilder{constructor(a){this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=a.headers,this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=a.shouldThrowOnError,this.signal=a.signal,this.isMaybeSingle=a.isMaybeSingle,a.fetch?this.fetch=a.fetch:"undefined"==typeof fetch?this.fetch=ec.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(a,l){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let u=this.fetch,d=u(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{var l,u,d;let h=null,f=null,p=null,g=a.status,m=a.statusText;if(a.ok){if("HEAD"!==this.method){let l=await a.text();""===l||(f="text/csv"===this.headers.Accept?l:this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?l:JSON.parse(l))}let d=null===(l=this.headers.Prefer)||void 0===l?void 0:l.match(/count=(exact|planned|estimated)/),v=null===(u=a.headers.get("content-range"))||void 0===u?void 0:u.split("/");d&&v&&v.length>1&&(p=parseInt(v[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(f)&&(f.length>1?(h={code:"PGRST116",details:`Results contain ${f.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},f=null,p=null,g=406,m="Not Acceptable"):f=1===f.length?f[0]:null)}else{let l=await a.text();try{h=JSON.parse(l),Array.isArray(h)&&404===a.status&&(f=[],h=null,g=200,m="OK")}catch(u){404===a.status&&""===l?(g=204,m="No Content"):h={message:l}}if(h&&this.isMaybeSingle&&(null===(d=null==h?void 0:h.details)||void 0===d?void 0:d.includes("0 rows"))&&(h=null,g=200,m="OK"),h&&this.shouldThrowOnError)throw h}let v={error:h,data:f,count:p,status:g,statusText:m};return v});return this.shouldThrowOnError||(d=d.catch(a=>{var l,u,d;return{error:{message:`${null!==(l=null==a?void 0:a.name)&&void 0!==l?l:"FetchError"}: ${null==a?void 0:a.message}`,details:`${null!==(u=null==a?void 0:a.stack)&&void 0!==u?u:""}`,hint:"",code:`${null!==(d=null==a?void 0:a.code)&&void 0!==d?d:""}`},data:null,count:null,status:0,statusText:""}})),d.then(a,l)}};let PostgrestTransformBuilder=class PostgrestTransformBuilder extends PostgrestBuilder{select(a){let l=!1,u=(null!=a?a:"*").split("").map(a=>/\s/.test(a)&&!l?"":('"'===a&&(l=!l),a)).join("");return this.url.searchParams.set("select",u),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(a,{ascending:l=!0,nullsFirst:u,foreignTable:d,referencedTable:h=d}={}){let f=h?`${h}.order`:"order",p=this.url.searchParams.get(f);return this.url.searchParams.set(f,`${p?`${p},`:""}${a}.${l?"asc":"desc"}${void 0===u?"":u?".nullsfirst":".nullslast"}`),this}limit(a,{foreignTable:l,referencedTable:u=l}={}){let d=void 0===u?"limit":`${u}.limit`;return this.url.searchParams.set(d,`${a}`),this}range(a,l,{foreignTable:u,referencedTable:d=u}={}){let h=void 0===d?"offset":`${d}.offset`,f=void 0===d?"limit":`${d}.limit`;return this.url.searchParams.set(h,`${a}`),this.url.searchParams.set(f,`${l-a+1}`),this}abortSignal(a){return this.signal=a,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:a=!1,verbose:l=!1,settings:u=!1,buffers:d=!1,wal:h=!1,format:f="text"}={}){var p;let g=[a?"analyze":null,l?"verbose":null,u?"settings":null,d?"buffers":null,h?"wal":null].filter(Boolean).join("|"),m=null!==(p=this.headers.Accept)&&void 0!==p?p:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${f}; for="${m}"; options=${g};`,this}rollback(){var a;return(null!==(a=this.headers.Prefer)&&void 0!==a?a:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};let PostgrestFilterBuilder=class PostgrestFilterBuilder extends PostgrestTransformBuilder{eq(a,l){return this.url.searchParams.append(a,`eq.${l}`),this}neq(a,l){return this.url.searchParams.append(a,`neq.${l}`),this}gt(a,l){return this.url.searchParams.append(a,`gt.${l}`),this}gte(a,l){return this.url.searchParams.append(a,`gte.${l}`),this}lt(a,l){return this.url.searchParams.append(a,`lt.${l}`),this}lte(a,l){return this.url.searchParams.append(a,`lte.${l}`),this}like(a,l){return this.url.searchParams.append(a,`like.${l}`),this}likeAllOf(a,l){return this.url.searchParams.append(a,`like(all).{${l.join(",")}}`),this}likeAnyOf(a,l){return this.url.searchParams.append(a,`like(any).{${l.join(",")}}`),this}ilike(a,l){return this.url.searchParams.append(a,`ilike.${l}`),this}ilikeAllOf(a,l){return this.url.searchParams.append(a,`ilike(all).{${l.join(",")}}`),this}ilikeAnyOf(a,l){return this.url.searchParams.append(a,`ilike(any).{${l.join(",")}}`),this}is(a,l){return this.url.searchParams.append(a,`is.${l}`),this}in(a,l){let u=l.map(a=>"string"==typeof a&&RegExp("[,()]").test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(a,`in.(${u})`),this}contains(a,l){return"string"==typeof l?this.url.searchParams.append(a,`cs.${l}`):Array.isArray(l)?this.url.searchParams.append(a,`cs.{${l.join(",")}}`):this.url.searchParams.append(a,`cs.${JSON.stringify(l)}`),this}containedBy(a,l){return"string"==typeof l?this.url.searchParams.append(a,`cd.${l}`):Array.isArray(l)?this.url.searchParams.append(a,`cd.{${l.join(",")}}`):this.url.searchParams.append(a,`cd.${JSON.stringify(l)}`),this}rangeGt(a,l){return this.url.searchParams.append(a,`sr.${l}`),this}rangeGte(a,l){return this.url.searchParams.append(a,`nxl.${l}`),this}rangeLt(a,l){return this.url.searchParams.append(a,`sl.${l}`),this}rangeLte(a,l){return this.url.searchParams.append(a,`nxr.${l}`),this}rangeAdjacent(a,l){return this.url.searchParams.append(a,`adj.${l}`),this}overlaps(a,l){return"string"==typeof l?this.url.searchParams.append(a,`ov.${l}`):this.url.searchParams.append(a,`ov.{${l.join(",")}}`),this}textSearch(a,l,{config:u,type:d}={}){let h="";"plain"===d?h="pl":"phrase"===d?h="ph":"websearch"===d&&(h="w");let f=void 0===u?"":`(${u})`;return this.url.searchParams.append(a,`${h}fts${f}.${l}`),this}match(a){return Object.entries(a).forEach(([a,l])=>{this.url.searchParams.append(a,`eq.${l}`)}),this}not(a,l,u){return this.url.searchParams.append(a,`not.${l}.${u}`),this}or(a,{foreignTable:l,referencedTable:u=l}={}){let d=u?`${u}.or`:"or";return this.url.searchParams.append(d,`(${a})`),this}filter(a,l,u){return this.url.searchParams.append(a,`${l}.${u}`),this}};let PostgrestQueryBuilder=class PostgrestQueryBuilder{constructor(a,{headers:l={},schema:u,fetch:d}){this.url=a,this.headers=l,this.schema=u,this.fetch=d}select(a,{head:l=!1,count:u}={}){let d=!1,h=(null!=a?a:"*").split("").map(a=>/\s/.test(a)&&!d?"":('"'===a&&(d=!d),a)).join("");return this.url.searchParams.set("select",h),u&&(this.headers.Prefer=`count=${u}`),new PostgrestFilterBuilder({method:l?"HEAD":"GET",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(a,{count:l,defaultToNull:u=!0}={}){let d=[];if(this.headers.Prefer&&d.push(this.headers.Prefer),l&&d.push(`count=${l}`),u||d.push("missing=default"),this.headers.Prefer=d.join(","),Array.isArray(a)){let l=a.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(l.length>0){let a=[...new Set(l)].map(a=>`"${a}"`);this.url.searchParams.set("columns",a.join(","))}}return new PostgrestFilterBuilder({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}upsert(a,{onConflict:l,ignoreDuplicates:u=!1,count:d,defaultToNull:h=!0}={}){let f=[`resolution=${u?"ignore":"merge"}-duplicates`];if(void 0!==l&&this.url.searchParams.set("on_conflict",l),this.headers.Prefer&&f.push(this.headers.Prefer),d&&f.push(`count=${d}`),h||f.push("missing=default"),this.headers.Prefer=f.join(","),Array.isArray(a)){let l=a.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(l.length>0){let a=[...new Set(l)].map(a=>`"${a}"`);this.url.searchParams.set("columns",a.join(","))}}return new PostgrestFilterBuilder({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}update(a,{count:l}={}){let u=[];return this.headers.Prefer&&u.push(this.headers.Prefer),l&&u.push(`count=${l}`),this.headers.Prefer=u.join(","),new PostgrestFilterBuilder({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:this.fetch,allowEmpty:!1})}delete({count:a}={}){let l=[];return a&&l.push(`count=${a}`),this.headers.Prefer&&l.unshift(this.headers.Prefer),this.headers.Prefer=l.join(","),new PostgrestFilterBuilder({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};let eu={"X-Client-Info":"postgrest-js/1.9.0"};let PostgrestClient=class PostgrestClient{constructor(a,{headers:l={},schema:u,fetch:d}={}){this.url=a,this.headers=Object.assign(Object.assign({},eu),l),this.schemaName=u,this.fetch=d}from(a){let l=new URL(`${this.url}/${a}`);return new PostgrestQueryBuilder(l,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(a){return new PostgrestClient(this.url,{headers:this.headers,schema:a,fetch:this.fetch})}rpc(a,l={},{head:u=!1,count:d}={}){let h,f;let p=new URL(`${this.url}/rpc/${a}`);u?(h="HEAD",Object.entries(l).forEach(([a,l])=>{p.searchParams.append(a,`${l}`)})):(h="POST",f=l);let g=Object.assign({},this.headers);return d&&(g.Prefer=`count=${d}`),new PostgrestFilterBuilder({method:h,url:p,headers:g,schema:this.schemaName,body:f,fetch:this.fetch,allowEmpty:!1})}};let ed={"X-Client-Info":"realtime-js/2.9.0"};(B=h||(h={}))[B.connecting=0]="connecting",B[B.open=1]="open",B[B.closing=2]="closing",B[B.closed=3]="closed",(V=f||(f={})).closed="closed",V.errored="errored",V.joined="joined",V.joining="joining",V.leaving="leaving",(er=p||(p={})).close="phx_close",er.error="phx_error",er.join="phx_join",er.reply="phx_reply",er.leave="phx_leave",er.access_token="access_token",(g||(g={})).websocket="websocket",(en=m||(m={})).Connecting="connecting",en.Open="open",en.Closing="closing",en.Closed="closed";let Timer=class Timer{constructor(a,l){this.callback=a,this.timerCalc=l,this.timer=void 0,this.tries=0,this.callback=a,this.timerCalc=l}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}};let Serializer=class Serializer{constructor(){this.HEADER_LENGTH=1}decode(a,l){return a.constructor===ArrayBuffer?l(this._binaryDecode(a)):"string"==typeof a?l(JSON.parse(a)):l({})}_binaryDecode(a){let l=new DataView(a),u=new TextDecoder;return this._decodeBroadcast(a,l,u)}_decodeBroadcast(a,l,u){let d=l.getUint8(1),h=l.getUint8(2),f=this.HEADER_LENGTH+2,p=u.decode(a.slice(f,f+d));f+=d;let g=u.decode(a.slice(f,f+h));f+=h;let m=JSON.parse(u.decode(a.slice(f,a.byteLength)));return{ref:null,topic:p,event:g,payload:m}}};let Push=class Push{constructor(a,l,u={},d=1e4){this.channel=a,this.event=l,this.payload=u,this.timeout=d,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(a){this.timeout=a,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(a){this.payload=Object.assign(Object.assign({},this.payload),a)}receive(a,l){var u;return this._hasReceived(a)&&l(null===(u=this.receivedResp)||void 0===u?void 0:u.response),this.recHooks.push({status:a,callback:l}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},a=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=a,this._matchReceive(a)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout))}trigger(a,l){this.refEvent&&this.channel._trigger(this.refEvent,{status:a,response:l})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:a,response:l}){this.recHooks.filter(l=>l.status===a).forEach(a=>a.callback(l))}_hasReceived(a){return this.receivedResp&&this.receivedResp.status===a}};(ei=v||(v={})).SYNC="sync",ei.JOIN="join",ei.LEAVE="leave";let RealtimePresence=class RealtimePresence{constructor(a,l){this.channel=a,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let u=(null==l?void 0:l.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(u.state,{},a=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.joinRef=this.channel._joinRef(),this.state=RealtimePresence.syncState(this.state,a,l,u),this.pendingDiffs.forEach(a=>{this.state=RealtimePresence.syncDiff(this.state,a,l,u)}),this.pendingDiffs=[],d()}),this.channel._on(u.diff,{},a=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=RealtimePresence.syncDiff(this.state,a,l,u),d())}),this.onJoin((a,l,u)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:l,newPresences:u})}),this.onLeave((a,l,u)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:l,leftPresences:u})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(a,l,u,d){let h=this.cloneDeep(a),f=this.transformState(l),p={},g={};return this.map(h,(a,l)=>{f[a]||(g[a]=l)}),this.map(f,(a,l)=>{let u=h[a];if(u){let d=l.map(a=>a.presence_ref),h=u.map(a=>a.presence_ref),f=l.filter(a=>0>h.indexOf(a.presence_ref)),m=u.filter(a=>0>d.indexOf(a.presence_ref));f.length>0&&(p[a]=f),m.length>0&&(g[a]=m)}else p[a]=l}),this.syncDiff(h,{joins:p,leaves:g},u,d)}static syncDiff(a,l,u,d){let{joins:h,leaves:f}={joins:this.transformState(l.joins),leaves:this.transformState(l.leaves)};return u||(u=()=>{}),d||(d=()=>{}),this.map(h,(l,d)=>{var h;let f=null!==(h=a[l])&&void 0!==h?h:[];if(a[l]=this.cloneDeep(d),f.length>0){let u=a[l].map(a=>a.presence_ref),d=f.filter(a=>0>u.indexOf(a.presence_ref));a[l].unshift(...d)}u(l,f,d)}),this.map(f,(l,u)=>{let h=a[l];if(!h)return;let f=u.map(a=>a.presence_ref);h=h.filter(a=>0>f.indexOf(a.presence_ref)),a[l]=h,d(l,h,u),0===h.length&&delete a[l]}),a}static map(a,l){return Object.getOwnPropertyNames(a).map(u=>l(u,a[u]))}static transformState(a){return Object.getOwnPropertyNames(a=this.cloneDeep(a)).reduce((l,u)=>{let d=a[u];return"metas"in d?l[u]=d.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):l[u]=d,l},{})}static cloneDeep(a){return JSON.parse(JSON.stringify(a))}onJoin(a){this.caller.onJoin=a}onLeave(a){this.caller.onLeave=a}onSync(a){this.caller.onSync=a}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}};(es=_||(_={})).abstime="abstime",es.bool="bool",es.date="date",es.daterange="daterange",es.float4="float4",es.float8="float8",es.int2="int2",es.int4="int4",es.int4range="int4range",es.int8="int8",es.int8range="int8range",es.json="json",es.jsonb="jsonb",es.money="money",es.numeric="numeric",es.oid="oid",es.reltime="reltime",es.text="text",es.time="time",es.timestamp="timestamp",es.timestamptz="timestamptz",es.timetz="timetz",es.tsrange="tsrange",es.tstzrange="tstzrange";let convertChangeData=(a,l,u={})=>{var d;let h=null!==(d=u.skipTypes)&&void 0!==d?d:[];return Object.keys(l).reduce((u,d)=>(u[d]=convertColumn(d,a,l,h),u),{})},convertColumn=(a,l,u,d)=>{let h=l.find(l=>l.name===a),f=null==h?void 0:h.type,p=u[a];return f&&!d.includes(f)?convertCell(f,p):noop(p)},convertCell=(a,l)=>{if("_"===a.charAt(0)){let u=a.slice(1,a.length);return toArray(l,u)}switch(a){case _.bool:return toBoolean(l);case _.float4:case _.float8:case _.int2:case _.int4:case _.int8:case _.numeric:case _.oid:return toNumber(l);case _.json:case _.jsonb:return toJson(l);case _.timestamp:return toTimestampString(l);case _.abstime:case _.date:case _.daterange:case _.int4range:case _.int8range:case _.money:case _.reltime:case _.text:case _.time:case _.timestamptz:case _.timetz:case _.tsrange:case _.tstzrange:default:return noop(l)}},noop=a=>a,toBoolean=a=>{switch(a){case"t":return!0;case"f":return!1;default:return a}},toNumber=a=>{if("string"==typeof a){let l=parseFloat(a);if(!Number.isNaN(l))return l}return a},toJson=a=>{if("string"==typeof a)try{return JSON.parse(a)}catch(a){console.log(`JSON parse error: ${a}`)}return a},toArray=(a,l)=>{if("string"!=typeof a)return a;let u=a.length-1,d=a[u],h=a[0];if("{"===h&&"}"===d){let d;let h=a.slice(1,u);try{d=JSON.parse("["+h+"]")}catch(a){d=h?h.split(","):[]}return d.map(a=>convertCell(l,a))}return a},toTimestampString=a=>"string"==typeof a?a.replace(" ","T"):a;(eo=T||(T={})).ALL="*",eo.INSERT="INSERT",eo.UPDATE="UPDATE",eo.DELETE="DELETE",(ea=C||(C={})).BROADCAST="broadcast",ea.PRESENCE="presence",ea.POSTGRES_CHANGES="postgres_changes",(el=R||(R={})).SUBSCRIBED="SUBSCRIBED",el.TIMED_OUT="TIMED_OUT",el.CLOSED="CLOSED",el.CHANNEL_ERROR="CHANNEL_ERROR";let RealtimeChannel=class RealtimeChannel{constructor(a,l={config:{}},u){this.topic=a,this.params=l,this.socket=u,this.bindings={},this.state=f.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=a.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},l.config),this.timeout=this.socket.timeout,this.joinPush=new Push(this,p.join,this.params,this.timeout),this.rejoinTimer=new Timer(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=f.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=f.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=f.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=f.errored,this.rejoinTimer.scheduleTimeout())}),this._on(p.reply,{},(a,l)=>{this._trigger(this._replyEventName(l),a)}),this.presence=new RealtimePresence(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(a,l=this.timeout){var u,d;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{let{config:{broadcast:h,presence:f}}=this.params;this._onError(l=>a&&a("CHANNEL_ERROR",l)),this._onClose(()=>a&&a("CLOSED"));let p={},g={broadcast:h,presence:f,postgres_changes:null!==(d=null===(u=this.bindings.postgres_changes)||void 0===u?void 0:u.map(a=>a.filter))&&void 0!==d?d:[]};this.socket.accessToken&&(p.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:g},p)),this.joinedOnce=!0,this._rejoin(l),this.joinPush.receive("ok",({postgres_changes:l})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),void 0===l){a&&a("SUBSCRIBED");return}{let d=this.bindings.postgres_changes,h=null!==(u=null==d?void 0:d.length)&&void 0!==u?u:0,f=[];for(let u=0;u<h;u++){let h=d[u],{filter:{event:p,schema:g,table:m,filter:v}}=h,_=l&&l[u];if(_&&_.event===p&&_.schema===g&&_.table===m&&_.filter===v)f.push(Object.assign(Object.assign({},h),{id:_.id}));else{this.unsubscribe(),a&&a("CHANNEL_ERROR",Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=f,a&&a("SUBSCRIBED");return}}).receive("error",l=>{a&&a("CHANNEL_ERROR",Error(JSON.stringify(Object.values(l).join(", ")||"error")))}).receive("timeout",()=>{a&&a("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(a,l={}){return await this.send({type:"presence",event:"track",payload:a},l.timeout||this.timeout)}async untrack(a={}){return await this.send({type:"presence",event:"untrack"},a)}on(a,l,u){return this._on(a,l,u)}async send(a,l={}){var u,d;if(this._canPush()||"broadcast"!==a.type)return new Promise(u=>{var d,h,f;let p=this._push(a.type,a,l.timeout||this.timeout);"broadcast"!==a.type||(null===(f=null===(h=null===(d=this.params)||void 0===d?void 0:d.config)||void 0===h?void 0:h.broadcast)||void 0===f?void 0:f.ack)||u("ok"),p.receive("ok",()=>u("ok")),p.receive("timeout",()=>u("timed out"))});{let{event:h,payload:f}=a,p={method:"POST",headers:{apikey:null!==(u=this.socket.accessToken)&&void 0!==u?u:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:h,payload:f}]})};try{let a=await this._fetchWithTimeout(this.broadcastEndpointURL,p,null!==(d=l.timeout)&&void 0!==d?d:this.timeout);if(a.ok)return"ok";return"error"}catch(a){if("AbortError"===a.name)return"timed out";return"error"}}}updateJoinPayload(a){this.joinPush.updatePayload(a)}unsubscribe(a=this.timeout){this.state=f.leaving;let onClose=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(p.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(l=>{let u=new Push(this,p.leave,{},a);u.receive("ok",()=>{onClose(),l("ok")}).receive("timeout",()=>{onClose(),l("timed out")}).receive("error",()=>{l("error")}),u.send(),this._canPush()||u.trigger("ok",{})})}_broadcastEndpointURL(){let a=this.socket.endPoint;return(a=(a=a.replace(/^ws/i,"http")).replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,"")).replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(a,l,u){let d=new AbortController,h=setTimeout(()=>d.abort(),u),f=await this.socket.fetch(a,Object.assign(Object.assign({},l),{signal:d.signal}));return clearTimeout(h),f}_push(a,l,u=this.timeout){if(!this.joinedOnce)throw`tried to push '${a}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let d=new Push(this,a,l,u);return this._canPush()?d.send():(d.startTimeout(),this.pushBuffer.push(d)),d}_onMessage(a,l,u){return l}_isMember(a){return this.topic===a}_joinRef(){return this.joinPush.ref}_trigger(a,l,u){var d,h;let f=a.toLocaleLowerCase(),{close:g,error:m,leave:v,join:_}=p;if(u&&[g,m,v,_].indexOf(f)>=0&&u!==this._joinRef())return;let T=this._onMessage(f,l,u);if(l&&!T)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(f)?null===(d=this.bindings.postgres_changes)||void 0===d||d.filter(a=>{var l,u,d;return(null===(l=a.filter)||void 0===l?void 0:l.event)==="*"||(null===(d=null===(u=a.filter)||void 0===u?void 0:u.event)||void 0===d?void 0:d.toLocaleLowerCase())===f}).map(a=>a.callback(T,u)):null===(h=this.bindings[f])||void 0===h||h.filter(a=>{var u,d,h,p,g,m;if(!["broadcast","presence","postgres_changes"].includes(f))return a.type.toLocaleLowerCase()===f;if("id"in a){let f=a.id,p=null===(u=a.filter)||void 0===u?void 0:u.event;return f&&(null===(d=l.ids)||void 0===d?void 0:d.includes(f))&&("*"===p||(null==p?void 0:p.toLocaleLowerCase())===(null===(h=l.data)||void 0===h?void 0:h.type.toLocaleLowerCase()))}{let u=null===(g=null===(p=null==a?void 0:a.filter)||void 0===p?void 0:p.event)||void 0===g?void 0:g.toLocaleLowerCase();return"*"===u||u===(null===(m=null==l?void 0:l.event)||void 0===m?void 0:m.toLocaleLowerCase())}}).map(a=>{if("object"==typeof T&&"ids"in T){let a=T.data,{schema:l,table:u,commit_timestamp:d,type:h,errors:f}=a;T=Object.assign(Object.assign({},{schema:l,table:u,commit_timestamp:d,eventType:h,new:{},old:{},errors:f}),this._getPayloadRecords(a))}a.callback(T,u)})}_isClosed(){return this.state===f.closed}_isJoined(){return this.state===f.joined}_isJoining(){return this.state===f.joining}_isLeaving(){return this.state===f.leaving}_replyEventName(a){return`chan_reply_${a}`}_on(a,l,u){let d=a.toLocaleLowerCase(),h={type:d,filter:l,callback:u};return this.bindings[d]?this.bindings[d].push(h):this.bindings[d]=[h],this}_off(a,l){let u=a.toLocaleLowerCase();return this.bindings[u]=this.bindings[u].filter(a=>{var d;return!((null===(d=a.type)||void 0===d?void 0:d.toLocaleLowerCase())===u&&RealtimeChannel.isEqual(a.filter,l))}),this}static isEqual(a,l){if(Object.keys(a).length!==Object.keys(l).length)return!1;for(let u in a)if(a[u]!==l[u])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(a){this._on(p.close,{},a)}_onError(a){this._on(p.error,{},l=>a(l))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(a=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=f.joining,this.joinPush.resend(a))}_getPayloadRecords(a){let l={new:{},old:{}};return("INSERT"===a.type||"UPDATE"===a.type)&&(l.new=convertChangeData(a.columns,a.record)),("UPDATE"===a.type||"DELETE"===a.type)&&(l.old=convertChangeData(a.columns,a.old_record)),l}};let RealtimeClient_noop=()=>{},eh="undefined"!=typeof WebSocket,ef=eh?WebSocket:u(137031);let RealtimeClient=class RealtimeClient{constructor(a,l){var d;this.accessToken=null,this.channels=[],this.endPoint="",this.headers=ed,this.params={},this.timeout=1e4,this.transport=ef,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=RealtimeClient_noop,this.conn=null,this.sendBuffer=[],this.serializer=new Serializer,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let l;return l=a||("undefined"==typeof fetch?(...a)=>Promise.resolve().then(u.bind(u,765699)).then(({default:l})=>l(...a)):fetch),(...a)=>l(...a)},this.endPoint=`${a}/${g.websocket}`,(null==l?void 0:l.params)&&(this.params=l.params),(null==l?void 0:l.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),l.headers)),(null==l?void 0:l.timeout)&&(this.timeout=l.timeout),(null==l?void 0:l.logger)&&(this.logger=l.logger),(null==l?void 0:l.transport)&&(this.transport=l.transport),(null==l?void 0:l.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=l.heartbeatIntervalMs);let h=null===(d=null==l?void 0:l.params)||void 0===d?void 0:d.apikey;h&&(this.accessToken=h),this.reconnectAfterMs=(null==l?void 0:l.reconnectAfterMs)?l.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=(null==l?void 0:l.encode)?l.encode:(a,l)=>l(JSON.stringify(a)),this.decode=(null==l?void 0:l.decode)?l.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Timer(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(null==l?void 0:l.fetch)}connect(){!this.conn&&(eh?this.conn=new this.transport(this._endPointURL()):this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers}),this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=a=>this._onConnError(a),this.conn.onmessage=a=>this._onConnMessage(a),this.conn.onclose=a=>this._onConnClose(a)))}disconnect(a,l){this.conn&&(this.conn.onclose=function(){},a?this.conn.close(a,null!=l?l:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(a){let l=await a.unsubscribe();return 0===this.channels.length&&this.disconnect(),l}async removeAllChannels(){let a=await Promise.all(this.channels.map(a=>a.unsubscribe()));return this.disconnect(),a}log(a,l,u){this.logger(a,l,u)}connectionState(){switch(this.conn&&this.conn.readyState){case h.connecting:return m.Connecting;case h.open:return m.Open;case h.closing:return m.Closing;default:return m.Closed}}isConnected(){return this.connectionState()===m.Open}channel(a,l={config:{}}){let u=new RealtimeChannel(`realtime:${a}`,l,this);return this.channels.push(u),u}push(a){let{topic:l,event:u,payload:d,ref:h}=a,callback=()=>{this.encode(a,a=>{var l;null===(l=this.conn)||void 0===l||l.send(a)})};this.log("push",`${l} ${u} (${h})`,d),this.isConnected()?callback():this.sendBuffer.push(callback)}setAuth(a){this.accessToken=a,this.channels.forEach(l=>{a&&l.updateJoinPayload({access_token:a}),l.joinedOnce&&l._isJoined()&&l._push(p.access_token,{access_token:a})})}_makeRef(){let a=this.ref+1;return a===this.ref?this.ref=0:this.ref=a,this.ref.toString()}_leaveOpenTopic(a){let l=this.channels.find(l=>l.topic===a&&(l._isJoined()||l._isJoining()));l&&(this.log("transport",`leaving duplicate topic "${a}"`),l.unsubscribe())}_remove(a){this.channels=this.channels.filter(l=>l._joinRef()!==a._joinRef())}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}_onConnMessage(a){this.decode(a.data,a=>{let{topic:l,event:u,payload:d,ref:h}=a;(h&&h===this.pendingHeartbeatRef||u===(null==d?void 0:d.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${d.status||""} ${l} ${u} ${h&&"("+h+")"||""}`,d),this.channels.filter(a=>a._isMember(l)).forEach(a=>a._trigger(u,d,h)),this.stateChangeCallbacks.message.forEach(l=>l(a))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(a=>a())}_onConnClose(a){this.log("transport","close",a),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(l=>l(a))}_onConnError(a){this.log("transport",a.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(l=>l(a))}_triggerChanError(){this.channels.forEach(a=>a._trigger(p.error))}_appendParams(a,l){if(0===Object.keys(l).length)return a;let u=a.match(/\?/)?"&":"?",d=new URLSearchParams(l);return`${a}${u}${d}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(a=>a()),this.sendBuffer=[])}_sendHeartbeat(){var a;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),null===(a=this.conn)||void 0===a||a.close(1e3,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}};let StorageError=class StorageError extends Error{constructor(a){super(a),this.__isStorageError=!0,this.name="StorageError"}};function isStorageError(a){return"object"==typeof a&&null!==a&&"__isStorageError"in a}let StorageApiError=class StorageApiError extends StorageError{constructor(a,l){super(a),this.name="StorageApiError",this.status=l}toJSON(){return{name:this.name,message:this.message,status:this.status}}};let StorageUnknownError=class StorageUnknownError extends StorageError{constructor(a,l){super(a),this.name="StorageUnknownError",this.originalError=l}};let helpers_resolveFetch=a=>{let l;return l=a||("undefined"==typeof fetch?(...a)=>Promise.resolve().then(u.bind(u,765699)).then(({default:l})=>l(...a)):fetch),(...a)=>l(...a)},resolveResponse=()=>{var a,l,d,h;return a=void 0,l=void 0,d=void 0,h=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(u.bind(u,765699))).Response:Response},new(d||(d=Promise))(function(u,f){function fulfilled(a){try{step(h.next(a))}catch(a){f(a)}}function rejected(a){try{step(h.throw(a))}catch(a){f(a)}}function step(a){var l;a.done?u(a.value):((l=a.value)instanceof d?l:new d(function(a){a(l)})).then(fulfilled,rejected)}step((h=h.apply(a,l||[])).next())})};var fetch_awaiter=function(a,l,u,d){return new(u||(u=Promise))(function(h,f){function fulfilled(a){try{step(d.next(a))}catch(a){f(a)}}function rejected(a){try{step(d.throw(a))}catch(a){f(a)}}function step(a){var l;a.done?h(a.value):((l=a.value)instanceof u?l:new u(function(a){a(l)})).then(fulfilled,rejected)}step((d=d.apply(a,l||[])).next())})};let _getErrorMessage=a=>a.msg||a.message||a.error_description||a.error||JSON.stringify(a),handleError=(a,l)=>fetch_awaiter(void 0,void 0,void 0,function*(){let u=yield resolveResponse();a instanceof u?a.json().then(u=>{l(new StorageApiError(_getErrorMessage(u),a.status||500))}).catch(a=>{l(new StorageUnknownError(_getErrorMessage(a),a))}):l(new StorageUnknownError(_getErrorMessage(a),a))}),_getRequestParams=(a,l,u,d)=>{let h={method:a,headers:(null==l?void 0:l.headers)||{}};return"GET"===a?h:(h.headers=Object.assign({"Content-Type":"application/json"},null==l?void 0:l.headers),h.body=JSON.stringify(d),Object.assign(Object.assign({},h),u))};function _handleRequest(a,l,u,d,h,f){return fetch_awaiter(this,void 0,void 0,function*(){return new Promise((p,g)=>{a(u,_getRequestParams(l,d,h,f)).then(a=>{if(!a.ok)throw a;return(null==d?void 0:d.noResolveJson)?a:a.json()}).then(a=>p(a)).catch(a=>handleError(a,g))})})}function get(a,l,u,d){return fetch_awaiter(this,void 0,void 0,function*(){return _handleRequest(a,"GET",l,u,d)})}function post(a,l,u,d,h){return fetch_awaiter(this,void 0,void 0,function*(){return _handleRequest(a,"POST",l,d,h,u)})}function remove(a,l,u,d,h){return fetch_awaiter(this,void 0,void 0,function*(){return _handleRequest(a,"DELETE",l,d,h,u)})}var StorageFileApi_awaiter=function(a,l,u,d){return new(u||(u=Promise))(function(h,f){function fulfilled(a){try{step(d.next(a))}catch(a){f(a)}}function rejected(a){try{step(d.throw(a))}catch(a){f(a)}}function step(a){var l;a.done?h(a.value):((l=a.value)instanceof u?l:new u(function(a){a(l)})).then(fulfilled,rejected)}step((d=d.apply(a,l||[])).next())})};let ep={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},eg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};let StorageFileApi=class StorageFileApi{constructor(a,l={},u,d){this.url=a,this.headers=l,this.bucketId=u,this.fetch=helpers_resolveFetch(d)}uploadOrUpdate(a,l,u,d){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let h;let f=Object.assign(Object.assign({},eg),d),p=Object.assign(Object.assign({},this.headers),"POST"===a&&{"x-upsert":String(f.upsert)});"undefined"!=typeof Blob&&u instanceof Blob?((h=new FormData).append("cacheControl",f.cacheControl),h.append("",u)):"undefined"!=typeof FormData&&u instanceof FormData?(h=u).append("cacheControl",f.cacheControl):(h=u,p["cache-control"]=`max-age=${f.cacheControl}`,p["content-type"]=f.contentType);let g=this._removeEmptyFolders(l),m=this._getFinalPath(g),v=yield this.fetch(`${this.url}/object/${m}`,Object.assign({method:a,body:h,headers:p},(null==f?void 0:f.duplex)?{duplex:f.duplex}:{})),_=yield v.json();if(v.ok)return{data:{path:g,id:_.Id,fullPath:_.Key},error:null};return{data:null,error:_}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}upload(a,l,u){return StorageFileApi_awaiter(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",a,l,u)})}uploadToSignedUrl(a,l,u,d){return StorageFileApi_awaiter(this,void 0,void 0,function*(){let h=this._removeEmptyFolders(a),f=this._getFinalPath(h),p=new URL(this.url+`/object/upload/sign/${f}`);p.searchParams.set("token",l);try{let a;let l=Object.assign({upsert:eg.upsert},d),f=Object.assign(Object.assign({},this.headers),{"x-upsert":String(l.upsert)});"undefined"!=typeof Blob&&u instanceof Blob?((a=new FormData).append("cacheControl",l.cacheControl),a.append("",u)):"undefined"!=typeof FormData&&u instanceof FormData?(a=u).append("cacheControl",l.cacheControl):(a=u,f["cache-control"]=`max-age=${l.cacheControl}`,f["content-type"]=l.contentType);let g=yield this.fetch(p.toString(),{method:"PUT",body:a,headers:f}),m=yield g.json();if(g.ok)return{data:{path:h,fullPath:m.Key},error:null};return{data:null,error:m}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}createSignedUploadUrl(a){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let l=this._getFinalPath(a),u=yield post(this.fetch,`${this.url}/object/upload/sign/${l}`,{},{headers:this.headers}),d=new URL(this.url+u.url),h=d.searchParams.get("token");if(!h)throw new StorageError("No token returned by API");return{data:{signedUrl:d.toString(),path:a,token:h},error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}update(a,l,u){return StorageFileApi_awaiter(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",a,l,u)})}move(a,l){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let u=yield post(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:a,destinationKey:l},{headers:this.headers});return{data:u,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}copy(a,l){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let u=yield post(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:a,destinationKey:l},{headers:this.headers});return{data:{path:u.Key},error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}createSignedUrl(a,l,u){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let d=this._getFinalPath(a),h=yield post(this.fetch,`${this.url}/object/sign/${d}`,Object.assign({expiresIn:l},(null==u?void 0:u.transform)?{transform:u.transform}:{}),{headers:this.headers}),f=(null==u?void 0:u.download)?`&download=${!0===u.download?"":u.download}`:"",p=encodeURI(`${this.url}${h.signedURL}${f}`);return{data:h={signedUrl:p},error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}createSignedUrls(a,l,u){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let d=yield post(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:l,paths:a},{headers:this.headers}),h=(null==u?void 0:u.download)?`&download=${!0===u.download?"":u.download}`:"";return{data:d.map(a=>Object.assign(Object.assign({},a),{signedUrl:a.signedURL?encodeURI(`${this.url}${a.signedURL}${h}`):null})),error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}download(a,l){return StorageFileApi_awaiter(this,void 0,void 0,function*(){let u=void 0!==(null==l?void 0:l.transform),d=this.transformOptsToQueryString((null==l?void 0:l.transform)||{}),h=d?`?${d}`:"";try{let l=this._getFinalPath(a),d=yield get(this.fetch,`${this.url}/${u?"render/image/authenticated":"object"}/${l}${h}`,{headers:this.headers,noResolveJson:!0}),f=yield d.blob();return{data:f,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}getPublicUrl(a,l){let u=this._getFinalPath(a),d=[],h=(null==l?void 0:l.download)?`download=${!0===l.download?"":l.download}`:"";""!==h&&d.push(h);let f=void 0!==(null==l?void 0:l.transform),p=this.transformOptsToQueryString((null==l?void 0:l.transform)||{});""!==p&&d.push(p);let g=d.join("&");return""!==g&&(g=`?${g}`),{data:{publicUrl:encodeURI(`${this.url}/${f?"render/image":"object"}/public/${u}${g}`)}}}remove(a){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let l=yield remove(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:a},{headers:this.headers});return{data:l,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}list(a,l,u){return StorageFileApi_awaiter(this,void 0,void 0,function*(){try{let d=Object.assign(Object.assign(Object.assign({},ep),l),{prefix:a||""}),h=yield post(this.fetch,`${this.url}/object/list/${this.bucketId}`,d,{headers:this.headers},u);return{data:h,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}_getFinalPath(a){return`${this.bucketId}/${a}`}_removeEmptyFolders(a){return a.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(a){let l=[];return a.width&&l.push(`width=${a.width}`),a.height&&l.push(`height=${a.height}`),a.resize&&l.push(`resize=${a.resize}`),a.format&&l.push(`format=${a.format}`),a.quality&&l.push(`quality=${a.quality}`),l.join("&")}};let em={"X-Client-Info":"storage-js/2.5.5"};var StorageBucketApi_awaiter=function(a,l,u,d){return new(u||(u=Promise))(function(h,f){function fulfilled(a){try{step(d.next(a))}catch(a){f(a)}}function rejected(a){try{step(d.throw(a))}catch(a){f(a)}}function step(a){var l;a.done?h(a.value):((l=a.value)instanceof u?l:new u(function(a){a(l)})).then(fulfilled,rejected)}step((d=d.apply(a,l||[])).next())})};let StorageBucketApi=class StorageBucketApi{constructor(a,l={},u){this.url=a,this.headers=Object.assign(Object.assign({},em),l),this.fetch=helpers_resolveFetch(u)}listBuckets(){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let a=yield get(this.fetch,`${this.url}/bucket`,{headers:this.headers});return{data:a,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}getBucket(a){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let l=yield get(this.fetch,`${this.url}/bucket/${a}`,{headers:this.headers});return{data:l,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}createBucket(a,l={public:!1}){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let u=yield post(this.fetch,`${this.url}/bucket`,{id:a,name:a,public:l.public,file_size_limit:l.fileSizeLimit,allowed_mime_types:l.allowedMimeTypes},{headers:this.headers});return{data:u,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}updateBucket(a,l){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let u=yield function(a,l,u,d,h){return fetch_awaiter(this,void 0,void 0,function*(){return _handleRequest(a,"PUT",l,d,void 0,u)})}(this.fetch,`${this.url}/bucket/${a}`,{id:a,name:a,public:l.public,file_size_limit:l.fileSizeLimit,allowed_mime_types:l.allowedMimeTypes},{headers:this.headers});return{data:u,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}emptyBucket(a){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let l=yield post(this.fetch,`${this.url}/bucket/${a}/empty`,{},{headers:this.headers});return{data:l,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}deleteBucket(a){return StorageBucketApi_awaiter(this,void 0,void 0,function*(){try{let l=yield remove(this.fetch,`${this.url}/bucket/${a}`,{},{headers:this.headers});return{data:l,error:null}}catch(a){if(isStorageError(a))return{data:null,error:a};throw a}})}};let StorageClient=class StorageClient extends StorageBucketApi{constructor(a,l={},u){super(a,l,u)}from(a){return new StorageFileApi(this.url,this.headers,a,this.fetch)}};let ev="";ev="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";let e_={"X-Client-Info":`supabase-js-${ev}/2.39.2`},fetch_resolveFetch=a=>{let l;return l=a||("undefined"==typeof fetch?ec.default:fetch),(...a)=>l(...a)},resolveHeadersConstructor=()=>"undefined"==typeof Headers?ec.Headers:Headers,fetchWithAuth=(a,l,u)=>{let d=fetch_resolveFetch(u),h=resolveHeadersConstructor();return(u,f)=>{var p,g,m,v;return p=void 0,g=void 0,m=void 0,v=function*(){var p;let g=null!==(p=yield l())&&void 0!==p?p:a,m=new h(null==f?void 0:f.headers);return m.has("apikey")||m.set("apikey",a),m.has("Authorization")||m.set("Authorization",`Bearer ${g}`),d(u,Object.assign(Object.assign({},f),{headers:m}))},new(m||(m=Promise))(function(a,l){function fulfilled(a){try{step(v.next(a))}catch(a){l(a)}}function rejected(a){try{step(v.throw(a))}catch(a){l(a)}}function step(l){var u;l.done?a(l.value):((u=l.value)instanceof m?u:new m(function(a){a(u)})).then(fulfilled,rejected)}step((v=v.apply(p,g||[])).next())})}},helpers_isBrowser=()=>"undefined"!=typeof document,ey={tested:!1,writable:!1},supportsLocalStorage=()=>{if(!helpers_isBrowser())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(a){return!1}if(ey.tested)return ey.writable;let a=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(a,a),globalThis.localStorage.removeItem(a),ey.tested=!0,ey.writable=!0}catch(a){ey.tested=!0,ey.writable=!1}return ey.writable};function parseParametersFromURL(a){let l={},u=new URL(a);if(u.hash&&"#"===u.hash[0])try{let a=new URLSearchParams(u.hash.substring(1));a.forEach((a,u)=>{l[u]=a})}catch(a){}return u.searchParams.forEach((a,u)=>{l[u]=a}),l}let lib_helpers_resolveFetch=a=>{let l;return l=a||("undefined"==typeof fetch?(...a)=>Promise.resolve().then(u.bind(u,765699)).then(({default:l})=>l(...a)):fetch),(...a)=>l(...a)},looksLikeFetchResponse=a=>"object"==typeof a&&null!==a&&"status"in a&&"ok"in a&&"json"in a&&"function"==typeof a.json,setItemAsync=async(a,l,u)=>{await a.setItem(l,JSON.stringify(u))},getItemAsync=async(a,l)=>{let u=await a.getItem(l);if(!u)return null;try{return JSON.parse(u)}catch(a){return u}},removeItemAsync=async(a,l)=>{await a.removeItem(l)};let Deferred=class Deferred{constructor(){this.promise=new Deferred.promiseConstructor((a,l)=>{this.resolve=a,this.reject=l})}};function decodeJWTPayload(a){let l=a.split(".");if(3!==l.length)throw Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(l[1]))throw Error("JWT is not valid: payload is not in base64url format");let u=l[1];return JSON.parse(function(a){let l,u,d,h,f,p,g;let m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",v="",_=0;for(a=a.replace("-","+").replace("_","/");_<a.length;)h=m.indexOf(a.charAt(_++)),f=m.indexOf(a.charAt(_++)),p=m.indexOf(a.charAt(_++)),g=m.indexOf(a.charAt(_++)),l=h<<2|f>>4,u=(15&f)<<4|p>>2,d=(3&p)<<6|g,v+=String.fromCharCode(l),64!=p&&0!=u&&(v+=String.fromCharCode(u)),64!=g&&0!=d&&(v+=String.fromCharCode(d));return v}(u))}async function sleep(a){return await new Promise(l=>{setTimeout(()=>l(null),a)})}function dec2hex(a){return("0"+a.toString(16)).substr(-2)}function generatePKCEVerifier(){let a=new Uint32Array(56);if("undefined"==typeof crypto){let a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",l=a.length,u="";for(let d=0;d<56;d++)u+=a.charAt(Math.floor(Math.random()*l));return u}return crypto.getRandomValues(a),Array.from(a,dec2hex).join("")}async function sha256(a){let l=new TextEncoder,u=l.encode(a),d=await crypto.subtle.digest("SHA-256",u),h=new Uint8Array(d);return Array.from(h).map(a=>String.fromCharCode(a)).join("")}async function generatePKCEChallenge(a){let l="undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder;if(!l)return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),a;let u=await sha256(a);return btoa(u).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}Deferred.promiseConstructor=Promise;let AuthError=class AuthError extends Error{constructor(a,l){super(a),this.__isAuthError=!0,this.name="AuthError",this.status=l}};function isAuthError(a){return"object"==typeof a&&null!==a&&"__isAuthError"in a}let AuthApiError=class AuthApiError extends AuthError{constructor(a,l){super(a,l),this.name="AuthApiError",this.status=l}toJSON(){return{name:this.name,message:this.message,status:this.status}}};let AuthUnknownError=class AuthUnknownError extends AuthError{constructor(a,l){super(a),this.name="AuthUnknownError",this.originalError=l}};let CustomAuthError=class CustomAuthError extends AuthError{constructor(a,l,u){super(a),this.name=l,this.status=u}toJSON(){return{name:this.name,message:this.message,status:this.status}}};let AuthSessionMissingError=class AuthSessionMissingError extends CustomAuthError{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}};let AuthInvalidTokenResponseError=class AuthInvalidTokenResponseError extends CustomAuthError{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}};let AuthInvalidCredentialsError=class AuthInvalidCredentialsError extends CustomAuthError{constructor(a){super(a,"AuthInvalidCredentialsError",400)}};let AuthImplicitGrantRedirectError=class AuthImplicitGrantRedirectError extends CustomAuthError{constructor(a,l=null){super(a,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=l}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};let AuthPKCEGrantCodeExchangeError=class AuthPKCEGrantCodeExchangeError extends CustomAuthError{constructor(a,l=null){super(a,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=l}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};let AuthRetryableFetchError=class AuthRetryableFetchError extends CustomAuthError{constructor(a,l){super(a,"AuthRetryableFetchError",l)}};function isAuthRetryableFetchError(a){return isAuthError(a)&&"AuthRetryableFetchError"===a.name}let AuthWeakPasswordError=class AuthWeakPasswordError extends CustomAuthError{constructor(a,l,u){super(a,"AuthWeakPasswordError",l),this.reasons=u}};var __rest=function(a,l){var u={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>l.indexOf(d)&&(u[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var h=0,d=Object.getOwnPropertySymbols(a);h<d.length;h++)0>l.indexOf(d[h])&&Object.prototype.propertyIsEnumerable.call(a,d[h])&&(u[d[h]]=a[d[h]]);return u};let fetch_getErrorMessage=a=>a.msg||a.message||a.error_description||a.error||JSON.stringify(a),eb=[502,503,504];async function fetch_handleError(a){let l;if(!looksLikeFetchResponse(a))throw new AuthRetryableFetchError(fetch_getErrorMessage(a),0);if(eb.includes(a.status))throw new AuthRetryableFetchError(fetch_getErrorMessage(a),a.status);try{l=await a.json()}catch(a){throw new AuthUnknownError(fetch_getErrorMessage(a),a)}if("object"==typeof l&&l&&"object"==typeof l.weak_password&&l.weak_password&&Array.isArray(l.weak_password.reasons)&&l.weak_password.reasons.length&&l.weak_password.reasons.reduce((a,l)=>a&&"string"==typeof l,!0))throw new AuthWeakPasswordError(fetch_getErrorMessage(l),a.status,l.weak_password.reasons);throw new AuthApiError(fetch_getErrorMessage(l),a.status||500)}let fetch_getRequestParams=(a,l,u,d)=>{let h={method:a,headers:(null==l?void 0:l.headers)||{}};return"GET"===a?h:(h.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==l?void 0:l.headers),h.body=JSON.stringify(d),Object.assign(Object.assign({},h),u))};async function _request(a,l,u,d){var h;let f=Object.assign({},null==d?void 0:d.headers);(null==d?void 0:d.jwt)&&(f.Authorization=`Bearer ${d.jwt}`);let p=null!==(h=null==d?void 0:d.query)&&void 0!==h?h:{};(null==d?void 0:d.redirectTo)&&(p.redirect_to=d.redirectTo);let g=Object.keys(p).length?"?"+new URLSearchParams(p).toString():"",m=await fetch_handleRequest(a,l,u+g,{headers:f,noResolveJson:null==d?void 0:d.noResolveJson},{},null==d?void 0:d.body);return(null==d?void 0:d.xform)?null==d?void 0:d.xform(m):{data:Object.assign({},m),error:null}}async function fetch_handleRequest(a,l,u,d,h,f){let p;let g=fetch_getRequestParams(l,d,h,f);try{p=await a(u,g)}catch(a){throw console.error(a),new AuthRetryableFetchError(fetch_getErrorMessage(a),0)}if(p.ok||await fetch_handleError(p),null==d?void 0:d.noResolveJson)return p;try{return await p.json()}catch(a){await fetch_handleError(a)}}function _sessionResponse(a){var l;let u=null;a.access_token&&a.refresh_token&&a.expires_in&&(u=Object.assign({},a),a.expires_at||(u.expires_at=function(a){let l=Math.round(Date.now()/1e3);return l+a}(a.expires_in)));let d=null!==(l=a.user)&&void 0!==l?l:a;return{data:{session:u,user:d},error:null}}function _userResponse(a){var l;let u=null!==(l=a.user)&&void 0!==l?l:a;return{data:{user:u},error:null}}function _ssoResponse(a){return{data:a,error:null}}function _generateLinkResponse(a){let{action_link:l,email_otp:u,hashed_token:d,redirect_to:h,verification_type:f}=a,p=__rest(a,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),g=Object.assign({},p);return{data:{properties:{action_link:l,email_otp:u,hashed_token:d,redirect_to:h,verification_type:f},user:g},error:null}}function _noResolveJsonResponse(a){return a}var GoTrueAdminApi_rest=function(a,l){var u={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>l.indexOf(d)&&(u[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var h=0,d=Object.getOwnPropertySymbols(a);h<d.length;h++)0>l.indexOf(d[h])&&Object.prototype.propertyIsEnumerable.call(a,d[h])&&(u[d[h]]=a[d[h]]);return u};let GoTrueAdminApi=class GoTrueAdminApi{constructor({url:a="",headers:l={},fetch:u}){this.url=a,this.headers=l,this.fetch=lib_helpers_resolveFetch(u),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(a,l="global"){try{return await _request(this.fetch,"POST",`${this.url}/logout?scope=${l}`,{headers:this.headers,jwt:a,noResolveJson:!0}),{data:null,error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async inviteUserByEmail(a,l={}){try{return await _request(this.fetch,"POST",`${this.url}/invite`,{body:{email:a,data:l.data},headers:this.headers,redirectTo:l.redirectTo,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async generateLink(a){try{let{options:l}=a,u=GoTrueAdminApi_rest(a,["options"]),d=Object.assign(Object.assign({},u),l);return"newEmail"in u&&(d.new_email=null==u?void 0:u.newEmail,delete d.newEmail),await _request(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:d,headers:this.headers,xform:_generateLinkResponse,redirectTo:null==l?void 0:l.redirectTo})}catch(a){if(isAuthError(a))return{data:{properties:null,user:null},error:a};throw a}}async createUser(a){try{return await _request(this.fetch,"POST",`${this.url}/admin/users`,{body:a,headers:this.headers,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async listUsers(a){var l,u,d,h,f,p,g;try{let m={nextPage:null,lastPage:0,total:0},v=await _request(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(u=null===(l=null==a?void 0:a.page)||void 0===l?void 0:l.toString())&&void 0!==u?u:"",per_page:null!==(h=null===(d=null==a?void 0:a.perPage)||void 0===d?void 0:d.toString())&&void 0!==h?h:""},xform:_noResolveJsonResponse});if(v.error)throw v.error;let _=await v.json(),T=null!==(f=v.headers.get("x-total-count"))&&void 0!==f?f:0,C=null!==(g=null===(p=v.headers.get("link"))||void 0===p?void 0:p.split(","))&&void 0!==g?g:[];return C.length>0&&(C.forEach(a=>{let l=parseInt(a.split(";")[0].split("=")[1].substring(0,1)),u=JSON.parse(a.split(";")[1].split("=")[1]);m[`${u}Page`]=l}),m.total=parseInt(T)),{data:Object.assign(Object.assign({},_),m),error:null}}catch(a){if(isAuthError(a))return{data:{users:[]},error:a};throw a}}async getUserById(a){try{return await _request(this.fetch,"GET",`${this.url}/admin/users/${a}`,{headers:this.headers,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async updateUserById(a,l){try{return await _request(this.fetch,"PUT",`${this.url}/admin/users/${a}`,{body:l,headers:this.headers,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async deleteUser(a,l=!1){try{return await _request(this.fetch,"DELETE",`${this.url}/admin/users/${a}`,{headers:this.headers,body:{should_soft_delete:l},xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async _listFactors(a){try{let{data:l,error:u}=await _request(this.fetch,"GET",`${this.url}/admin/users/${a.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:l,error:u}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _deleteFactor(a){try{let l=await _request(this.fetch,"DELETE",`${this.url}/admin/users/${a.userId}/factors/${a.id}`,{headers:this.headers});return{data:l,error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}};let ew="2.60.1",eS={"X-Client-Info":`gotrue-js/${ew}`},eE={getItem:a=>supportsLocalStorage()?globalThis.localStorage.getItem(a):null,setItem:(a,l)=>{supportsLocalStorage()&&globalThis.localStorage.setItem(a,l)},removeItem:a=>{supportsLocalStorage()&&globalThis.localStorage.removeItem(a)}};function memoryLocalStorageAdapter(a={}){return{getItem:l=>a[l]||null,setItem:(l,u)=>{a[l]=u},removeItem:l=>{delete a[l]}}}globalThis&&supportsLocalStorage()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");let LockAcquireTimeoutError=class LockAcquireTimeoutError extends Error{constructor(a){super(a),this.isAcquireTimeout=!0}};!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(a){"undefined"!=typeof self&&(self.globalThis=self)}}();let ek={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:eS,flowType:"implicit",debug:!1};async function lockNoOp(a,l,u){return await u()}let GoTrueClient=class GoTrueClient{constructor(a){var l;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=GoTrueClient.nextInstanceID,GoTrueClient.nextInstanceID+=1,this.instanceID>0&&helpers_isBrowser()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let u=Object.assign(Object.assign({},ek),a);if(this.logDebugMessages=!!u.debug,"function"==typeof u.debug&&(this.logger=u.debug),this.persistSession=u.persistSession,this.storageKey=u.storageKey,this.autoRefreshToken=u.autoRefreshToken,this.admin=new GoTrueAdminApi({url:u.url,headers:u.headers,fetch:u.fetch}),this.url=u.url,this.headers=u.headers,this.fetch=lib_helpers_resolveFetch(u.fetch),this.lock=u.lock||lockNoOp,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?u.storage?this.storage=u.storage:supportsLocalStorage()?this.storage=eE:(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)):(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),helpers_isBrowser()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}null===(l=this.broadcastChannel)||void 0===l||l.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...a){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${ew}) ${new Date().toISOString()}`,...a),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){try{let a=!!helpers_isBrowser()&&await this._isPKCEFlow();if(this._debug("#_initialize()","begin","is PKCE flow",a),a||this.detectSessionInUrl&&this._isImplicitGrantFlow()){let{data:l,error:u}=await this._getSessionFromURL(a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),(null==u?void 0:u.message)==="Identity is already linked"||(null==u?void 0:u.message)==="Identity is already linked to another user")return{error:u};return await this._removeSession(),{error:u}}let{session:d,redirectType:h}=l;return this._debug("#_initialize()","detected session in URL",d,"redirect type",h),await this._saveSession(d),setTimeout(async()=>{"recovery"===h?await this._notifyAllSubscribers("PASSWORD_RECOVERY",d):await this._notifyAllSubscribers("SIGNED_IN",d)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(a){if(isAuthError(a))return{error:a};return{error:new AuthUnknownError("Unexpected error during initialization",a)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signUp(a){var l,u,d;try{let h;if(await this._removeSession(),"email"in a){let{email:u,password:d,options:f}=a,p=null,g=null;if("pkce"===this.flowType){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,a),p=await generatePKCEChallenge(a),g=a===p?"plain":"s256"}h=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==f?void 0:f.emailRedirectTo,body:{email:u,password:d,data:null!==(l=null==f?void 0:f.data)&&void 0!==l?l:{},gotrue_meta_security:{captcha_token:null==f?void 0:f.captchaToken},code_challenge:p,code_challenge_method:g},xform:_sessionResponse})}else if("phone"in a){let{phone:l,password:f,options:p}=a;h=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:l,password:f,data:null!==(u=null==p?void 0:p.data)&&void 0!==u?u:{},channel:null!==(d=null==p?void 0:p.channel)&&void 0!==d?d:"sms",gotrue_meta_security:{captcha_token:null==p?void 0:p.captchaToken}},xform:_sessionResponse})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:f,error:p}=h;if(p||!f)return{data:{user:null,session:null},error:p};let g=f.session,m=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",g)),{data:{user:m,session:g},error:null}}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(a){try{let l;if(await this._removeSession(),"email"in a){let{email:u,password:d,options:h}=a;l=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:d,gotrue_meta_security:{captcha_token:null==h?void 0:h.captchaToken}},xform:_sessionResponse})}else if("phone"in a){let{phone:u,password:d,options:h}=a;l=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:d,gotrue_meta_security:{captcha_token:null==h?void 0:h.captchaToken}},xform:_sessionResponse})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:u,error:d}=l;if(d)return{data:{user:null,session:null},error:d};if(!u||!u.session||!u.user)return{data:{user:null,session:null},error:new AuthInvalidTokenResponseError};return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),{data:{user:u.user,session:u.session},error:d}}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithOAuth(a){var l,u,d,h;return await this._removeSession(),await this._handleProviderSignIn(a.provider,{redirectTo:null===(l=a.options)||void 0===l?void 0:l.redirectTo,scopes:null===(u=a.options)||void 0===u?void 0:u.scopes,queryParams:null===(d=a.options)||void 0===d?void 0:d.queryParams,skipBrowserRedirect:null===(h=a.options)||void 0===h?void 0:h.skipBrowserRedirect})}async exchangeCodeForSession(a){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(a))}async _exchangeCodeForSession(a){let[l,u]=(await getItemAsync(this.storage,`${this.storageKey}-code-verifier`)).split("/"),{data:d,error:h}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:a,code_verifier:l},xform:_sessionResponse});return(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),h)?{data:{user:null,session:null,redirectType:null},error:h}:d&&d.session&&d.user?(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",d.session)),{data:Object.assign(Object.assign({},d),{redirectType:null!=u?u:null}),error:h}):{data:{user:null,session:null,redirectType:null},error:new AuthInvalidTokenResponseError}}async signInWithIdToken(a){await this._removeSession();try{let{options:l,provider:u,token:d,access_token:h,nonce:f}=a,p=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:u,id_token:d,access_token:h,nonce:f,gotrue_meta_security:{captcha_token:null==l?void 0:l.captchaToken}},xform:_sessionResponse}),{data:g,error:m}=p;if(m)return{data:{user:null,session:null},error:m};if(!g||!g.session||!g.user)return{data:{user:null,session:null},error:new AuthInvalidTokenResponseError};return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),{data:g,error:m}}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithOtp(a){var l,u,d,h,f;try{if(await this._removeSession(),"email"in a){let{email:d,options:h}=a,f=null,p=null;if("pkce"===this.flowType){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,a),f=await generatePKCEChallenge(a),p=a===f?"plain":"s256"}let{error:g}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:null!==(l=null==h?void 0:h.data)&&void 0!==l?l:{},create_user:null===(u=null==h?void 0:h.shouldCreateUser)||void 0===u||u,gotrue_meta_security:{captcha_token:null==h?void 0:h.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:null==h?void 0:h.emailRedirectTo});return{data:{user:null,session:null},error:g}}if("phone"in a){let{phone:l,options:u}=a,{data:p,error:g}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:null!==(d=null==u?void 0:u.data)&&void 0!==d?d:{},create_user:null===(h=null==u?void 0:u.shouldCreateUser)||void 0===h||h,gotrue_meta_security:{captcha_token:null==u?void 0:u.captchaToken},channel:null!==(f=null==u?void 0:u.channel)&&void 0!==f?f:"sms"}});return{data:{user:null,session:null,messageId:null==p?void 0:p.message_id},error:g}}throw new AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(a){var l,u;try{let d,h;"email_change"!==a.type&&"phone_change"!==a.type&&await this._removeSession(),"options"in a&&(d=null===(l=a.options)||void 0===l?void 0:l.redirectTo,h=null===(u=a.options)||void 0===u?void 0:u.captchaToken);let{data:f,error:p}=await _request(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},a),{gotrue_meta_security:{captcha_token:h}}),redirectTo:d,xform:_sessionResponse});if(p)throw p;if(!f)throw Error("An error occurred on token verification.");let g=f.session,m=f.user;return(null==g?void 0:g.access_token)&&(await this._saveSession(g),await this._notifyAllSubscribers("SIGNED_IN",g)),{data:{user:m,session:g},error:null}}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithSSO(a){var l,u,d;try{await this._removeSession();let h=null,f=null;if("pkce"===this.flowType){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,a),h=await generatePKCEChallenge(a),f=a===h?"plain":"s256"}return await _request(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in a?{provider_id:a.providerId}:null),"domain"in a?{domain:a.domain}:null),{redirect_to:null!==(u=null===(l=a.options)||void 0===l?void 0:l.redirectTo)&&void 0!==u?u:void 0}),(null===(d=null==a?void 0:a.options)||void 0===d?void 0:d.captchaToken)?{gotrue_meta_security:{captcha_token:a.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:f}),headers:this.headers,xform:_ssoResponse})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async a=>{let{data:{session:l},error:u}=a;if(u)throw u;if(!l)throw new AuthSessionMissingError;let{error:d}=await _request(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:l.access_token});return{data:{user:null,session:null},error:d}})}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async resend(a){try{"email_change"!=a.type&&"phone_change"!=a.type&&await this._removeSession();let l=`${this.url}/resend`;if("email"in a){let{email:u,type:d,options:h}=a,{error:f}=await _request(this.fetch,"POST",l,{headers:this.headers,body:{email:u,type:d,gotrue_meta_security:{captcha_token:null==h?void 0:h.captchaToken}},redirectTo:null==h?void 0:h.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in a){let{phone:u,type:d,options:h}=a,{data:f,error:p}=await _request(this.fetch,"POST",l,{headers:this.headers,body:{phone:u,type:d,gotrue_meta_security:{captcha_token:null==h?void 0:h.captchaToken}}});return{data:{user:null,session:null,messageId:null==f?void 0:f.message_id},error:p}}throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async getSession(){return await this.initializePromise,this._acquireLock(-1,async()=>this._useSession(async a=>a))}async _acquireLock(a,l){this._debug("#_acquireLock","begin",a);try{if(this.lockAcquired){let a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),u=(async()=>(await a,await l()))();return this.pendingInLock.push((async()=>{try{await u}catch(a){}})()),u}return await this.lock(`lock:${this.storageKey}`,a,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let a=l();for(this.pendingInLock.push((async()=>{try{await a}catch(a){}})()),await a;this.pendingInLock.length;){let a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(a){this._debug("#_useSession","begin");try{let l=await this.__loadSession();return await a(l)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let a=null,l=await getItemAsync(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",l),null!==l&&(this._isValidSession(l)?a=l:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!a)return{data:{session:null},error:null};let u=!!a.expires_at&&a.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${u?"":" not"} expired`,"expires_at",a.expires_at),!u)return{data:{session:a},error:null};let{session:d,error:h}=await this._callRefreshToken(a.refresh_token);if(h)return{data:{session:null},error:h};return{data:{session:d},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(a){return a?await this._getUser(a):(await this.initializePromise,this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(a){try{if(a)return await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:a,xform:_userResponse});return await this._useSession(async a=>{var l,u;let{data:d,error:h}=a;if(h)throw h;return await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(u=null===(l=d.session)||void 0===l?void 0:l.access_token)&&void 0!==u?u:void 0,xform:_userResponse})})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async updateUser(a,l={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(a,l))}async _updateUser(a,l={}){try{return await this._useSession(async u=>{let{data:d,error:h}=u;if(h)throw h;if(!d.session)throw new AuthSessionMissingError;let f=d.session,p=null,g=null;if("pkce"===this.flowType&&null!=a.email){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,a),p=await generatePKCEChallenge(a),g=a===p?"plain":"s256"}let{data:m,error:v}=await _request(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==l?void 0:l.emailRedirectTo,body:Object.assign(Object.assign({},a),{code_challenge:p,code_challenge_method:g}),jwt:f.access_token,xform:_userResponse});if(v)throw v;return f.user=m.user,await this._saveSession(f),await this._notifyAllSubscribers("USER_UPDATED",f),{data:{user:f.user},error:null}})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}_decodeJWT(a){return decodeJWTPayload(a)}async setSession(a){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(a))}async _setSession(a){try{if(!a.access_token||!a.refresh_token)throw new AuthSessionMissingError;let l=Date.now()/1e3,u=l,d=!0,h=null,f=decodeJWTPayload(a.access_token);if(f.exp&&(d=(u=f.exp)<=l),d){let{session:l,error:u}=await this._callRefreshToken(a.refresh_token);if(u)return{data:{user:null,session:null},error:u};if(!l)return{data:{user:null,session:null},error:null};h=l}else{let{data:d,error:f}=await this._getUser(a.access_token);if(f)throw f;h={access_token:a.access_token,refresh_token:a.refresh_token,user:d.user,token_type:"bearer",expires_in:u-l,expires_at:u},await this._saveSession(h),await this._notifyAllSubscribers("SIGNED_IN",h)}return{data:{user:h.user,session:h},error:null}}catch(a){if(isAuthError(a))return{data:{session:null,user:null},error:a};throw a}}async refreshSession(a){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(a))}async _refreshSession(a){try{return await this._useSession(async l=>{var u;if(!a){let{data:d,error:h}=l;if(h)throw h;a=null!==(u=d.session)&&void 0!==u?u:void 0}if(!(null==a?void 0:a.refresh_token))throw new AuthSessionMissingError;let{session:d,error:h}=await this._callRefreshToken(a.refresh_token);return h?{data:{user:null,session:null},error:h}:d?{data:{user:d.user,session:d},error:null}:{data:{user:null,session:null},error:null}})}catch(a){if(isAuthError(a))return{data:{user:null,session:null},error:a};throw a}}async _getSessionFromURL(a){try{if(!helpers_isBrowser())throw new AuthImplicitGrantRedirectError("No browser detected.");if("implicit"!==this.flowType||this._isImplicitGrantFlow()){if("pkce"==this.flowType&&!a)throw new AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.")}else throw new AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");let l=parseParametersFromURL(window.location.href);if(a){if(!l.code)throw new AuthPKCEGrantCodeExchangeError("No code detected.");let{data:a,error:u}=await this._exchangeCodeForSession(l.code);if(u)throw u;let d=new URL(window.location.href);return d.searchParams.delete("code"),window.history.replaceState(window.history.state,"",d.toString()),{data:{session:a.session,redirectType:null},error:null}}if(l.error||l.error_description||l.error_code)throw new AuthImplicitGrantRedirectError(l.error_description||"Error in URL with unspecified error_description",{error:l.error||"unspecified_error",code:l.error_code||"unspecified_code"});let{provider_token:u,provider_refresh_token:d,access_token:h,refresh_token:f,expires_in:p,expires_at:g,token_type:m}=l;if(!h||!p||!f||!m)throw new AuthImplicitGrantRedirectError("No session defined in URL");let v=Math.round(Date.now()/1e3),_=parseInt(p),T=v+_;g&&(T=parseInt(g));let C=T-v;1e3*C<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${C}s, should have been closer to ${_}s`);let R=T-_;v-R>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",R,T,v):v-R<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",R,T,v);let{data:B,error:V}=await this._getUser(h);if(V)throw V;let er={provider_token:u,provider_refresh_token:d,access_token:h,expires_in:_,expires_at:T,refresh_token:f,token_type:m,user:B.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:er,redirectType:l.type},error:null}}catch(a){if(isAuthError(a))return{data:{session:null,redirectType:null},error:a};throw a}}_isImplicitGrantFlow(){let a=parseParametersFromURL(window.location.href);return!!(helpers_isBrowser()&&(a.access_token||a.error_description))}async _isPKCEFlow(){let a=parseParametersFromURL(window.location.href),l=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`);return!!(a.code&&l)}async signOut(a={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(a))}async _signOut({scope:a}={scope:"global"}){return await this._useSession(async l=>{var u;let{data:d,error:h}=l;if(h)return{error:h};let f=null===(u=d.session)||void 0===u?void 0:u.access_token;if(f){let{error:l}=await this.admin.signOut(f,a);if(l&&!(isAuthError(l)&&"AuthApiError"===l.name&&(404===l.status||401===l.status)))return{error:l}}return"others"!==a&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(a){let l="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){let l=16*Math.random()|0;return("x"==a?l:3&l|8).toString(16)}),u={id:l,callback:a,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",l),this.stateChangeEmitters.delete(l)}};return this._debug("#onAuthStateChange()","registered callback with id",l),this.stateChangeEmitters.set(l,u),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(l)})})(),{data:{subscription:u}}}async _emitInitialSession(a){return await this._useSession(async l=>{var u,d;try{let{data:{session:d},error:h}=l;if(h)throw h;await (null===(u=this.stateChangeEmitters.get(a))||void 0===u?void 0:u.callback("INITIAL_SESSION",d)),this._debug("INITIAL_SESSION","callback id",a,"session",d)}catch(l){await (null===(d=this.stateChangeEmitters.get(a))||void 0===d?void 0:d.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",a,"error",l),console.error(l)}})}async resetPasswordForEmail(a,l={}){let u=null,d=null;if("pkce"===this.flowType){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,`${a}/PASSWORD_RECOVERY`),u=await generatePKCEChallenge(a),d=a===u?"plain":"s256"}try{return await _request(this.fetch,"POST",`${this.url}/recover`,{body:{email:a,code_challenge:u,code_challenge_method:d,gotrue_meta_security:{captcha_token:l.captchaToken}},headers:this.headers,redirectTo:l.redirectTo})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async getUserIdentities(){var a;try{let{data:l,error:u}=await this.getUser();if(u)throw u;return{data:{identities:null!==(a=l.user.identities)&&void 0!==a?a:[]},error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async linkIdentity(a){var l;try{let{data:u,error:d}=await this._useSession(async l=>{var u,d,h,f,p;let{data:g,error:m}=l;if(m)throw m;let v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,a.provider,{redirectTo:null===(u=a.options)||void 0===u?void 0:u.redirectTo,scopes:null===(d=a.options)||void 0===d?void 0:d.scopes,queryParams:null===(h=a.options)||void 0===h?void 0:h.queryParams,skipBrowserRedirect:!0});return await _request(this.fetch,"GET",v,{headers:this.headers,jwt:null!==(p=null===(f=g.session)||void 0===f?void 0:f.access_token)&&void 0!==p?p:void 0})});if(d)throw d;return!helpers_isBrowser()||(null===(l=a.options)||void 0===l?void 0:l.skipBrowserRedirect)||window.location.assign(null==u?void 0:u.url),{data:{provider:a.provider,url:null==u?void 0:u.url},error:null}}catch(l){if(isAuthError(l))return{data:{provider:a.provider,url:null},error:l};throw l}}async unlinkIdentity(a){try{return await this._useSession(async l=>{var u,d;let{data:h,error:f}=l;if(f)throw f;return await _request(this.fetch,"DELETE",`${this.url}/user/identities/${a.identity_id}`,{headers:this.headers,jwt:null!==(d=null===(u=h.session)||void 0===u?void 0:u.access_token)&&void 0!==d?d:void 0})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _refreshAccessToken(a){let l=`#_refreshAccessToken(${a.substring(0,5)}...)`;this._debug(l,"begin");try{let u=Date.now();return await function(a,l){let u=new Promise((u,d)=>{(async()=>{for(let h=0;h<1/0;h++)try{let d=await a(h);if(!l(h,null,d)){u(d);return}}catch(a){if(!l(h,a)){d(a);return}}})()});return u}(async u=>(await sleep(200*u),this._debug(l,"refreshing attempt",u),await _request(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:a},headers:this.headers,xform:_sessionResponse})),(a,l,d)=>d&&d.error&&isAuthRetryableFetchError(d.error)&&Date.now()+(a+1)*200-u<3e4)}catch(a){if(this._debug(l,"error",a),isAuthError(a))return{data:{session:null,user:null},error:a};throw a}finally{this._debug(l,"end")}}_isValidSession(a){return"object"==typeof a&&null!==a&&"access_token"in a&&"refresh_token"in a&&"expires_at"in a}async _handleProviderSignIn(a,l){let u=await this._getUrlForProvider(`${this.url}/authorize`,a,{redirectTo:l.redirectTo,scopes:l.scopes,queryParams:l.queryParams});return this._debug("#_handleProviderSignIn()","provider",a,"options",l,"url",u),helpers_isBrowser()&&!l.skipBrowserRedirect&&window.location.assign(u),{data:{provider:a,url:u},error:null}}async _recoverAndRefresh(){var a;let l="#_recoverAndRefresh()";this._debug(l,"begin");try{let u=await getItemAsync(this.storage,this.storageKey);if(this._debug(l,"session from storage",u),!this._isValidSession(u)){this._debug(l,"session is not valid"),null!==u&&await this._removeSession();return}let d=Math.round(Date.now()/1e3),h=(null!==(a=u.expires_at)&&void 0!==a?a:1/0)<d+10;if(this._debug(l,`session has${h?"":" not"} expired with margin of 10s`),h){if(this.autoRefreshToken&&u.refresh_token){let{error:a}=await this._callRefreshToken(u.refresh_token);a&&(console.error(a),isAuthRetryableFetchError(a)||(this._debug(l,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",u)}catch(a){this._debug(l,"error",a),console.error(a);return}finally{this._debug(l,"end")}}async _callRefreshToken(a){var l,u;if(!a)throw new AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let d=`#_callRefreshToken(${a.substring(0,5)}...)`;this._debug(d,"begin");try{this.refreshingDeferred=new Deferred;let{data:l,error:u}=await this._refreshAccessToken(a);if(u)throw u;if(!l.session)throw new AuthSessionMissingError;await this._saveSession(l.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",l.session);let d={session:l.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(a){if(this._debug(d,"error",a),isAuthError(a)){let u={session:null,error:a};return isAuthRetryableFetchError(a)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),null===(l=this.refreshingDeferred)||void 0===l||l.resolve(u),u}throw null===(u=this.refreshingDeferred)||void 0===u||u.reject(a),a}finally{this.refreshingDeferred=null,this._debug(d,"end")}}async _notifyAllSubscribers(a,l,u=!0){let d=`#_notifyAllSubscribers(${a})`;this._debug(d,"begin",l,`broadcast = ${u}`);try{this.broadcastChannel&&u&&this.broadcastChannel.postMessage({event:a,session:l});let d=[],h=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(a,l)}catch(a){d.push(a)}});if(await Promise.all(h),d.length>0){for(let a=0;a<d.length;a+=1)console.error(d[a]);throw d[0]}}finally{this._debug(d,"end")}}async _saveSession(a){this._debug("#_saveSession()",a),await setItemAsync(this.storage,this.storageKey,a)}async _removeSession(){this._debug("#_removeSession()"),await removeItemAsync(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let a=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{a&&helpers_isBrowser()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",a)}catch(a){console.error("removing visibilitychange callback failed",a)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let a=setInterval(()=>this._autoRefreshTokenTick(),3e4);this.autoRefreshTicker=a,a&&"object"==typeof a&&"function"==typeof a.unref?a.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(a),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let a=this.autoRefreshTicker;this.autoRefreshTicker=null,a&&clearInterval(a)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let a=Date.now();try{return await this._useSession(async l=>{let{data:{session:u}}=l;if(!u||!u.refresh_token||!u.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let d=Math.floor((1e3*u.expires_at-a)/3e4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${d} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),d<=3&&await this._callRefreshToken(u.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(a){if(a.isAcquireTimeout||a instanceof LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw a}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!helpers_isBrowser()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(a){console.error("_handleVisibilityChange",a)}}async _onVisibilityChanged(a){let l=`#_onVisibilityChanged(${a})`;this._debug(l,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),a||(await this.initializePromise,await this._acquireLock(-1,async()=>{if("visible"!==document.visibilityState){this._debug(l,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(a,l,u){let d=[`provider=${encodeURIComponent(l)}`];if((null==u?void 0:u.redirectTo)&&d.push(`redirect_to=${encodeURIComponent(u.redirectTo)}`),(null==u?void 0:u.scopes)&&d.push(`scopes=${encodeURIComponent(u.scopes)}`),"pkce"===this.flowType){let a=generatePKCEVerifier();await setItemAsync(this.storage,`${this.storageKey}-code-verifier`,a);let l=await generatePKCEChallenge(a),u=a===l?"plain":"s256";this._debug("PKCE","code verifier",`${a.substring(0,5)}...`,"code challenge",l,"method",u);let h=new URLSearchParams({code_challenge:`${encodeURIComponent(l)}`,code_challenge_method:`${encodeURIComponent(u)}`});d.push(h.toString())}if(null==u?void 0:u.queryParams){let a=new URLSearchParams(u.queryParams);d.push(a.toString())}return(null==u?void 0:u.skipBrowserRedirect)&&d.push(`skip_http_redirect=${u.skipBrowserRedirect}`),`${a}?${d.join("&")}`}async _unenroll(a){try{return await this._useSession(async l=>{var u;let{data:d,error:h}=l;return h?{data:null,error:h}:await _request(this.fetch,"DELETE",`${this.url}/factors/${a.factorId}`,{headers:this.headers,jwt:null===(u=null==d?void 0:d.session)||void 0===u?void 0:u.access_token})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _enroll(a){try{return await this._useSession(async l=>{var u,d;let{data:h,error:f}=l;if(f)return{data:null,error:f};let{data:p,error:g}=await _request(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:a.friendlyName,factor_type:a.factorType,issuer:a.issuer},headers:this.headers,jwt:null===(u=null==h?void 0:h.session)||void 0===u?void 0:u.access_token});return g?{data:null,error:g}:((null===(d=null==p?void 0:p.totp)||void 0===d?void 0:d.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),{data:p,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _verify(a){return this._acquireLock(-1,async()=>{try{return await this._useSession(async l=>{var u;let{data:d,error:h}=l;if(h)return{data:null,error:h};let{data:f,error:p}=await _request(this.fetch,"POST",`${this.url}/factors/${a.factorId}/verify`,{body:{code:a.code,challenge_id:a.challengeId},headers:this.headers,jwt:null===(u=null==d?void 0:d.session)||void 0===u?void 0:u.access_token});return p?{data:null,error:p}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),{data:f,error:p})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}})}async _challenge(a){return this._acquireLock(-1,async()=>{try{return await this._useSession(async l=>{var u;let{data:d,error:h}=l;return h?{data:null,error:h}:await _request(this.fetch,"POST",`${this.url}/factors/${a.factorId}/challenge`,{headers:this.headers,jwt:null===(u=null==d?void 0:d.session)||void 0===u?void 0:u.access_token})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}})}async _challengeAndVerify(a){let{data:l,error:u}=await this._challenge({factorId:a.factorId});return u?{data:null,error:u}:await this._verify({factorId:a.factorId,challengeId:l.id,code:a.code})}async _listFactors(){let{data:{user:a},error:l}=await this.getUser();if(l)return{data:null,error:l};let u=(null==a?void 0:a.factors)||[],d=u.filter(a=>"totp"===a.factor_type&&"verified"===a.status);return{data:{all:u,totp:d},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async a=>{var l,u;let{data:{session:d},error:h}=a;if(h)return{data:null,error:h};if(!d)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let f=this._decodeJWT(d.access_token),p=null;f.aal&&(p=f.aal);let g=p,m=null!==(u=null===(l=d.user.factors)||void 0===l?void 0:l.filter(a=>"verified"===a.status))&&void 0!==u?u:[];m.length>0&&(g="aal2");let v=f.amr||[];return{data:{currentLevel:p,nextLevel:g,currentAuthenticationMethods:v},error:null}}))}};GoTrueClient.nextInstanceID=0;let SupabaseAuthClient=class SupabaseAuthClient extends GoTrueClient{constructor(a){super(a)}};let eT={headers:e_},ex={schema:"public"},eC={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},eR={};let SupabaseClient=class SupabaseClient{constructor(a,l,u){var d,h,f,p,g,m,v,_;if(this.supabaseUrl=a,this.supabaseKey=l,this.from=a=>this.rest.from(a),this.schema=a=>this.rest.schema(a),this.rpc=(a,l={},u)=>this.rest.rpc(a,l,u),!a)throw Error("supabaseUrl is required.");if(!l)throw Error("supabaseKey is required.");let T=a.replace(/\/$/,"");this.realtimeUrl=`${T}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${T}/auth/v1`,this.storageUrl=`${T}/storage/v1`,this.functionsUrl=`${T}/functions/v1`;let C=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,R={db:ex,realtime:eR,auth:Object.assign(Object.assign({},eC),{storageKey:C}),global:eT},B=function(a,l){let{db:u,auth:d,realtime:h,global:f}=a,{db:p,auth:g,realtime:m,global:v}=l;return{db:Object.assign(Object.assign({},p),u),auth:Object.assign(Object.assign({},g),d),realtime:Object.assign(Object.assign({},m),h),global:Object.assign(Object.assign({},v),f)}}(null!=u?u:{},R);this.storageKey=null!==(h=null===(d=B.auth)||void 0===d?void 0:d.storageKey)&&void 0!==h?h:"",this.headers=null!==(p=null===(f=B.global)||void 0===f?void 0:f.headers)&&void 0!==p?p:{},this.auth=this._initSupabaseAuthClient(null!==(g=B.auth)&&void 0!==g?g:{},this.headers,null===(m=B.global)||void 0===m?void 0:m.fetch),this.fetch=fetchWithAuth(l,this._getAccessToken.bind(this),null===(v=B.global)||void 0===v?void 0:v.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},B.realtime)),this.rest=new PostgrestClient(`${T}/rest/v1`,{headers:this.headers,schema:null===(_=B.db)||void 0===_?void 0:_.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new FunctionsClient(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new StorageClient(this.storageUrl,this.headers,this.fetch)}channel(a,l={config:{}}){return this.realtime.channel(a,l)}getChannels(){return this.realtime.getChannels()}removeChannel(a){return this.realtime.removeChannel(a)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var a,l,u,d,h,f;return u=this,d=void 0,h=void 0,f=function*(){let{data:u}=yield this.auth.getSession();return null!==(l=null===(a=u.session)||void 0===a?void 0:a.access_token)&&void 0!==l?l:null},new(h||(h=Promise))(function(a,l){function fulfilled(a){try{step(f.next(a))}catch(a){l(a)}}function rejected(a){try{step(f.throw(a))}catch(a){l(a)}}function step(l){var u;l.done?a(l.value):((u=l.value)instanceof h?u:new h(function(a){a(u)})).then(fulfilled,rejected)}step((f=f.apply(u,d||[])).next())})}_initSupabaseAuthClient({autoRefreshToken:a,persistSession:l,detectSessionInUrl:u,storage:d,storageKey:h,flowType:f,debug:p},g,m){let v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new SupabaseAuthClient({url:this.authUrl,headers:Object.assign(Object.assign({},v),g),storageKey:h,autoRefreshToken:a,persistSession:l,detectSessionInUrl:u,storage:d,flowType:f,debug:p,fetch:m})}_initRealtimeClient(a){return new RealtimeClient(this.realtimeUrl,Object.assign(Object.assign({},a),{params:Object.assign({apikey:this.supabaseKey},null==a?void 0:a.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((a,l)=>{this._handleTokenChanged(a,"CLIENT",null==l?void 0:l.access_token)})}_handleTokenChanged(a,l,u){("TOKEN_REFRESHED"===a||"SIGNED_IN"===a)&&this.changedAccessToken!==u?(this.realtime.setAuth(null!=u?u:null),this.changedAccessToken=u):"SIGNED_OUT"===a&&(this.realtime.setAuth(this.supabaseKey),"STORAGE"==l&&this.auth.signOut(),this.changedAccessToken=void 0)}};let createClient=(a,l,u)=>new SupabaseClient(a,l,u),createSupabaseClient=a=>null!=d?d:d=createClient("https://mnmxcrqbhvdpcqvzmvxh.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1ubXhjcnFiaHZkcGNxdnptdnhoIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTU2NzE2MzQsImV4cCI6MjAzMTI0NzYzNH0.zWU6uJI6sXKpUwBPVGV0_Uz6IBPkcRyVi9VNld6W3qA",a),getSupabaseClient=()=>d},605848:function(a,l,u){"use strict";u.r(l),u.d(l,{default:function(){return App}});var d=u(552322),h=u(641135),f=u.n(h),p=u(637108),g=u.n(p),m=u(805130),v=u(205632),_=u.n(v),T=u(574865),C=u.n(T),R=u(202784),B=u(688965);let ErrorBoundary=class ErrorBoundary extends R.Component{componentDidCatch(a,l){this.setState({hasError:!0,error:a,info:l}),B.Tb(a)}reload(){location.reload()}render(){return this.state.hasError?(0,d.jsx)("div",{className:"flex items-center justify-center w-full h-full bg-zinc-100",children:(0,d.jsxs)("div",{className:"w-3/5 p-4 mx-auto my-auto space-y-4 text-black bg-white border shadow-xl rounded-2xl text-center",children:[(0,d.jsxs)("h2",{children:["Network connection error. Please check your connection and retry after sometime.",(0,d.jsx)("br",{})," If the issue persists, contact support@elephant.ai"]}),(0,d.jsx)("div",{className:"flex justify-between mt-2",children:(0,d.jsx)("button",{className:"px-3 py-2 text-sm text-white rounded-md shadow bg-zinc-900 mx-auto",onClick:()=>this.reload(),children:"Reload page"})})]})}):this.props.children}constructor(a){super(a),this.state={hasError:!1,error:null,info:null}}};var V=u(81134),er=u(267210),en=u(989420);let setupAPI=a=>(0,er._)({token:"Bearer ".concat(a)}),isJWTValid=a=>{if(!a)return!1;let[,l]=a.split(".");if(!l)return!1;try{let{exp:a}=JSON.parse(atob(l));return Date.now()<1e3*a}catch(a){return!1}},useSupabaseClientSetup=()=>{let[a,l]=(0,R.useState)();return(0,R.useEffect)(()=>{let a=(0,en.J)({auth:{autoRefreshToken:!0}}),setupWithValidToken=async()=>{let{data:{session:l}}=await a.auth.getSession();l&&isJWTValid(l.access_token)?setupAPI(l.access_token):setTimeout(setupWithValidToken,1e3)};a.auth.onAuthStateChange((a,l)=>{l&&isJWTValid(l.access_token)?setupAPI(l.access_token):setupWithValidToken()}),l(a),setupWithValidToken()},[]),a};u(343596),u(727834);var ei=u(77298),es=u(807896),eo=u(928316),ea=u(717998),el=u(262656),ec=u(462172),eu=u(392211),ed=u(835999),eh=u(678773),ef=u(379616),ep=u(172714),eg=u(627757),em=u(387695),ev=u(861644),e_=u(289785);let ey="ToastProvider",[eb,ew,eS]=(0,ec.B)("Toast"),[eE,ek]=(0,eu.b)("Toast",[eS]),[eT,ex]=eE(ey),$054eb8030ebde76e$export$f5d03d415824e0e=a=>{let{__scopeToast:l,label:u="Notification",duration:d=5e3,swipeDirection:h="right",swipeThreshold:f=50,children:p}=a,[g,m]=(0,R.useState)(null),[v,_]=(0,R.useState)(0),T=(0,R.useRef)(!1),C=(0,R.useRef)(!1);return(0,R.createElement)(eb.Provider,{scope:l},(0,R.createElement)(eT,{scope:l,label:u,duration:d,swipeDirection:h,swipeThreshold:f,toastCount:v,viewport:g,onViewportChange:m,onToastAdd:(0,R.useCallback)(()=>_(a=>a+1),[]),onToastRemove:(0,R.useCallback)(()=>_(a=>a-1),[]),isFocusedToastEscapeKeyDownRef:T,isClosePausedRef:C},p))};$054eb8030ebde76e$export$f5d03d415824e0e.propTypes={label(a){if(a.label&&"string"==typeof a.label&&!a.label.trim()){let a=`Invalid prop \`label\` supplied to \`${ey}\`. Expected non-empty \`string\`.`;return Error(a)}return null}};let eC=["F8"],eR="toast.viewportPause",eI="toast.viewportResume",eA=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,hotkey:d=eC,label:h="Notifications ({hotkey})",...f}=a,p=ex("ToastViewport",u),g=ew(u),m=(0,R.useRef)(null),v=(0,R.useRef)(null),_=(0,R.useRef)(null),T=(0,R.useRef)(null),C=(0,el.e)(l,T,p.onViewportChange),B=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=p.toastCount>0;(0,R.useEffect)(()=>{let handleKeyDown=a=>{var l;let u=d.every(l=>a[l]||a.code===l);u&&(null===(l=T.current)||void 0===l||l.focus())};return document.addEventListener("keydown",handleKeyDown),()=>document.removeEventListener("keydown",handleKeyDown)},[d]),(0,R.useEffect)(()=>{let a=m.current,l=T.current;if(V&&a&&l){let handlePause=()=>{if(!p.isClosePausedRef.current){let a=new CustomEvent(eR);l.dispatchEvent(a),p.isClosePausedRef.current=!0}},handleResume=()=>{if(p.isClosePausedRef.current){let a=new CustomEvent(eI);l.dispatchEvent(a),p.isClosePausedRef.current=!1}},handleFocusOutResume=l=>{let u=!a.contains(l.relatedTarget);u&&handleResume()},handlePointerLeaveResume=()=>{let l=a.contains(document.activeElement);l||handleResume()};return a.addEventListener("focusin",handlePause),a.addEventListener("focusout",handleFocusOutResume),a.addEventListener("pointermove",handlePause),a.addEventListener("pointerleave",handlePointerLeaveResume),window.addEventListener("blur",handlePause),window.addEventListener("focus",handleResume),()=>{a.removeEventListener("focusin",handlePause),a.removeEventListener("focusout",handleFocusOutResume),a.removeEventListener("pointermove",handlePause),a.removeEventListener("pointerleave",handlePointerLeaveResume),window.removeEventListener("blur",handlePause),window.removeEventListener("focus",handleResume)}}},[V,p.isClosePausedRef]);let er=(0,R.useCallback)(({tabbingDirection:a})=>{let l=g(),u=l.map(l=>{let u=l.ref.current,d=[u,...function(a){let l=[],u=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{let l="INPUT"===a.tagName&&"hidden"===a.type;return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;u.nextNode();)l.push(u.currentNode);return l}(u)];return"forwards"===a?d:d.reverse()});return("forwards"===a?u.reverse():u).flat()},[g]);return(0,R.useEffect)(()=>{let a=T.current;if(a){let handleKeyDown=l=>{let u=l.altKey||l.ctrlKey||l.metaKey,d="Tab"===l.key&&!u;if(d){var h,f,p;let u=document.activeElement,d=l.shiftKey,g=l.target===a;if(g&&d){null===(h=v.current)||void 0===h||h.focus();return}let m=er({tabbingDirection:d?"backwards":"forwards"}),T=m.findIndex(a=>a===u);$054eb8030ebde76e$var$focusFirst(m.slice(T+1))?l.preventDefault():d?null===(f=v.current)||void 0===f||f.focus():null===(p=_.current)||void 0===p||p.focus()}};return a.addEventListener("keydown",handleKeyDown),()=>a.removeEventListener("keydown",handleKeyDown)}},[g,er]),(0,R.createElement)(ed.I0,{ref:m,role:"region","aria-label":h.replace("{hotkey}",B),tabIndex:-1,style:{pointerEvents:V?void 0:"none"}},V&&(0,R.createElement)(eO,{ref:v,onFocusFromOutsideViewport:()=>{let a=er({tabbingDirection:"forwards"});$054eb8030ebde76e$var$focusFirst(a)}}),(0,R.createElement)(eb.Slot,{scope:u},(0,R.createElement)(ep.WV.ol,(0,es.Z)({tabIndex:-1},f,{ref:C}))),V&&(0,R.createElement)(eO,{ref:_,onFocusFromOutsideViewport:()=>{let a=er({tabbingDirection:"backwards"});$054eb8030ebde76e$var$focusFirst(a)}}))}),eO=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,onFocusFromOutsideViewport:d,...h}=a,f=ex("ToastFocusProxy",u);return(0,R.createElement)(e_.T,(0,es.Z)({"aria-hidden":!0,tabIndex:0},h,{ref:l,style:{position:"fixed"},onFocus:a=>{var l;let u=a.relatedTarget,h=!(null!==(l=f.viewport)&&void 0!==l&&l.contains(u));h&&d()}}))}),eP="Toast",eL=(0,R.forwardRef)((a,l)=>{let{forceMount:u,open:d,defaultOpen:h,onOpenChange:f,...p}=a,[g=!0,m]=(0,em.T)({prop:d,defaultProp:h,onChange:f});return(0,R.createElement)(ef.z,{present:u||g},(0,R.createElement)(eF,(0,es.Z)({open:g},p,{ref:l,onClose:()=>m(!1),onPause:(0,eg.W)(a.onPause),onResume:(0,eg.W)(a.onResume),onSwipeStart:(0,ea.M)(a.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,ea.M)(a.onSwipeMove,a=>{let{x:l,y:u}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${l}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:(0,ea.M)(a.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,ea.M)(a.onSwipeEnd,a=>{let{x:l,y:u}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${l}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),m(!1)})})))}),[eM,eN]=eE(eP,{onClose(){}}),eF=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,type:d="foreground",duration:h,open:f,onClose:p,onEscapeKeyDown:g,onPause:m,onResume:v,onSwipeStart:_,onSwipeMove:T,onSwipeCancel:C,onSwipeEnd:B,...V}=a,er=ex(eP,u),[en,ei]=(0,R.useState)(null),ec=(0,el.e)(l,a=>ei(a)),eu=(0,R.useRef)(null),eh=(0,R.useRef)(null),ef=h||er.duration,em=(0,R.useRef)(0),ev=(0,R.useRef)(ef),e_=(0,R.useRef)(0),{onToastAdd:ey,onToastRemove:ew}=er,eS=(0,eg.W)(()=>{var a;let l=null==en?void 0:en.contains(document.activeElement);l&&(null===(a=er.viewport)||void 0===a||a.focus()),p()}),eE=(0,R.useCallback)(a=>{a&&a!==1/0&&(window.clearTimeout(e_.current),em.current=new Date().getTime(),e_.current=window.setTimeout(eS,a))},[eS]);(0,R.useEffect)(()=>{let a=er.viewport;if(a){let handleResume=()=>{eE(ev.current),null==v||v()},handlePause=()=>{let a=new Date().getTime()-em.current;ev.current=ev.current-a,window.clearTimeout(e_.current),null==m||m()};return a.addEventListener(eR,handlePause),a.addEventListener(eI,handleResume),()=>{a.removeEventListener(eR,handlePause),a.removeEventListener(eI,handleResume)}}},[er.viewport,ef,m,v,eE]),(0,R.useEffect)(()=>{f&&!er.isClosePausedRef.current&&eE(ef)},[f,ef,er.isClosePausedRef,eE]),(0,R.useEffect)(()=>(ey(),()=>ew()),[ey,ew]);let ek=(0,R.useMemo)(()=>en?function $054eb8030ebde76e$var$getAnnounceTextContent(a){let l=[],u=Array.from(a.childNodes);return u.forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&l.push(a.textContent),a.nodeType===a.ELEMENT_NODE){let u=a.ariaHidden||a.hidden||"none"===a.style.display,d=""===a.dataset.radixToastAnnounceExclude;if(!u){if(d){let u=a.dataset.radixToastAnnounceAlt;u&&l.push(u)}else l.push(...$054eb8030ebde76e$var$getAnnounceTextContent(a))}}}),l}(en):null,[en]);return er.viewport?(0,R.createElement)(R.Fragment,null,ek&&(0,R.createElement)($054eb8030ebde76e$var$ToastAnnounce,{__scopeToast:u,role:"status","aria-live":"foreground"===d?"assertive":"polite","aria-atomic":!0},ek),(0,R.createElement)(eM,{scope:u,onClose:eS},(0,eo.createPortal)((0,R.createElement)(eb.ItemSlot,{scope:u},(0,R.createElement)(ed.fC,{asChild:!0,onEscapeKeyDown:(0,ea.M)(g,()=>{er.isFocusedToastEscapeKeyDownRef.current||eS(),er.isFocusedToastEscapeKeyDownRef.current=!1})},(0,R.createElement)(ep.WV.li,(0,es.Z)({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":f?"open":"closed","data-swipe-direction":er.swipeDirection},V,{ref:ec,style:{userSelect:"none",touchAction:"none",...a.style},onKeyDown:(0,ea.M)(a.onKeyDown,a=>{"Escape"!==a.key||(null==g||g(a.nativeEvent),a.nativeEvent.defaultPrevented||(er.isFocusedToastEscapeKeyDownRef.current=!0,eS()))}),onPointerDown:(0,ea.M)(a.onPointerDown,a=>{0===a.button&&(eu.current={x:a.clientX,y:a.clientY})}),onPointerMove:(0,ea.M)(a.onPointerMove,a=>{if(!eu.current)return;let l=a.clientX-eu.current.x,u=a.clientY-eu.current.y,d=!!eh.current,h=["left","right"].includes(er.swipeDirection),f=["left","up"].includes(er.swipeDirection)?Math.min:Math.max,p=h?f(0,l):0,g=h?0:f(0,u),m="touch"===a.pointerType?10:2,v={x:p,y:g},C={originalEvent:a,delta:v};d?(eh.current=v,$054eb8030ebde76e$var$handleAndDispatchCustomEvent("toast.swipeMove",T,C,{discrete:!1})):$054eb8030ebde76e$var$isDeltaInDirection(v,er.swipeDirection,m)?(eh.current=v,$054eb8030ebde76e$var$handleAndDispatchCustomEvent("toast.swipeStart",_,C,{discrete:!1}),a.target.setPointerCapture(a.pointerId)):(Math.abs(l)>m||Math.abs(u)>m)&&(eu.current=null)}),onPointerUp:(0,ea.M)(a.onPointerUp,a=>{let l=eh.current,u=a.target;if(u.hasPointerCapture(a.pointerId)&&u.releasePointerCapture(a.pointerId),eh.current=null,eu.current=null,l){let u=a.currentTarget,d={originalEvent:a,delta:l};$054eb8030ebde76e$var$isDeltaInDirection(l,er.swipeDirection,er.swipeThreshold)?$054eb8030ebde76e$var$handleAndDispatchCustomEvent("toast.swipeEnd",B,d,{discrete:!0}):$054eb8030ebde76e$var$handleAndDispatchCustomEvent("toast.swipeCancel",C,d,{discrete:!0}),u.addEventListener("click",a=>a.preventDefault(),{once:!0})}})})))),er.viewport))):null});eF.propTypes={type(a){if(a.type&&!["foreground","background"].includes(a.type)){let a=`Invalid prop \`type\` supplied to \`${eP}\`. Expected \`foreground | background\`.`;return Error(a)}return null}};let $054eb8030ebde76e$var$ToastAnnounce=a=>{let{__scopeToast:l,children:u,...d}=a,h=ex(eP,l),[f,p]=(0,R.useState)(!1),[g,m]=(0,R.useState)(!1);return function(a=()=>{}){let l=(0,eg.W)(a);(0,ev.b)(()=>{let a=0,u=0;return a=window.requestAnimationFrame(()=>u=window.requestAnimationFrame(l)),()=>{window.cancelAnimationFrame(a),window.cancelAnimationFrame(u)}},[l])}(()=>p(!0)),(0,R.useEffect)(()=>{let a=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(a)},[]),g?null:(0,R.createElement)(eh.h,{asChild:!0},(0,R.createElement)(e_.T,d,f&&(0,R.createElement)(R.Fragment,null,h.label," ",u)))},eD=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,...d}=a;return(0,R.createElement)(ep.WV.div,(0,es.Z)({},d,{ref:l}))}),ej=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,...d}=a;return(0,R.createElement)(ep.WV.div,(0,es.Z)({},d,{ref:l}))}),eB=(0,R.forwardRef)((a,l)=>{let{altText:u,...d}=a;return u?(0,R.createElement)(eU,{altText:u,asChild:!0},(0,R.createElement)(e$,(0,es.Z)({},d,{ref:l}))):null});eB.propTypes={altText:a=>a.altText?null:Error("Missing prop `altText` expected on `ToastAction`")};let e$=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,...d}=a,h=eN("ToastClose",u);return(0,R.createElement)(eU,{asChild:!0},(0,R.createElement)(ep.WV.button,(0,es.Z)({type:"button"},d,{ref:l,onClick:(0,ea.M)(a.onClick,h.onClose)})))}),eU=(0,R.forwardRef)((a,l)=>{let{__scopeToast:u,altText:d,...h}=a;return(0,R.createElement)(ep.WV.div,(0,es.Z)({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":d||void 0},h,{ref:l}))});function $054eb8030ebde76e$var$handleAndDispatchCustomEvent(a,l,u,{discrete:d}){let h=u.originalEvent.currentTarget,f=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:u});l&&h.addEventListener(a,l,{once:!0}),d?(0,ep.jH)(h,f):h.dispatchEvent(f)}let $054eb8030ebde76e$var$isDeltaInDirection=(a,l,u=0)=>{let d=Math.abs(a.x),h=Math.abs(a.y),f=d>h;return"left"===l||"right"===l?f&&d>u:!f&&h>u};function $054eb8030ebde76e$var$focusFirst(a){let l=document.activeElement;return a.some(a=>a===l||(a.focus(),document.activeElement!==l))}var eH=u(661335),eq=u(771937);let ez=R.forwardRef((a,l)=>{let{className:u,...h}=a;return(0,d.jsx)(eA,{ref:l,className:(0,eq.cn)("fixed bottom-0 z-[300] flex max-h-screen w-full flex-col-reverse p-4 sm:top-0 sm:right-0 sm:bottom-auto sm:flex-col md:max-w-[420px]",u),...h})});ez.displayName=eA.displayName;let eW=(0,eH.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border border-zinc-200 p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full dark:border-zinc-800",{variants:{variant:{default:"border bg-white text-zinc-950 dark:bg-zinc-950 dark:text-zinc-50",destructive:"w group bg-red-500 text-zinc-50 dark:bg-red-900",success:"w group bg-emerald-500 text-zinc-50 dark:bg-emerald-900"}},defaultVariants:{variant:"default"}}),eV=R.forwardRef((a,l)=>{let{className:u,variant:h,...f}=a;return(0,d.jsx)(eL,{ref:l,className:(0,eq.cn)(eW({variant:h}),u),...f})});eV.displayName=eL.displayName;let eG=R.forwardRef((a,l)=>{let{className:u,...h}=a;return(0,d.jsx)(eB,{ref:l,className:(0,eq.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-zinc-200 bg-transparent px-3 text-sm font-medium transition-colors hover:bg-zinc-100 focus:outline-none focus:ring-1 focus:ring-zinc-950 disabled:pointer-events-none disabled:opacity-50 group-[.w]:border-zinc-100/40 group-[.w]:hover:border-red-500/30 group-[.w]:hover:bg-red-500 group-[.w]:hover:text-zinc-50 group-[.w]:focus:ring-red-500 dark:border-zinc-800 dark:hover:bg-zinc-800 dark:focus:ring-zinc-300 dark:group-[.w]:border-zinc-800/40 dark:group-[.w]:hover:border-red-900/30 dark:group-[.w]:hover:bg-red-900 dark:group-[.w]:hover:text-zinc-50 dark:group-[.w]:focus:ring-red-900",u),...h})});eG.displayName=eB.displayName;let eJ=R.forwardRef((a,l)=>{let{className:u,...h}=a;return(0,d.jsx)(e$,{ref:l,className:(0,eq.cn)("absolute right-1 top-1 rounded-md p-1 text-zinc-950/50 opacity-0 transition-opacity hover:text-zinc-950 focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.w]:text-gray-200 group-[.w]:hover:text-white group-[.w]:focus:ring-inherit/75 dark:text-zinc-50/50 dark:hover:text-zinc-50",u),"toast-close":"",...h,children:(0,d.jsx)(ei.Pxu,{className:"w-4 h-4"})})});eJ.displayName=e$.displayName;let eK=R.forwardRef((a,l)=>{let{className:u,...h}=a;return(0,d.jsx)(eD,{ref:l,className:(0,eq.cn)("text-sm font-semibold [&+div]:text-xs",u),...h})});eK.displayName=eD.displayName;let eX=R.forwardRef((a,l)=>{let{className:u,...h}=a;return(0,d.jsx)(ej,{ref:l,className:(0,eq.cn)("text-sm opacity-90",u),...h})});eX.displayName=ej.displayName;var eY=u(540559);function Toaster(){let{toasts:a}=(0,eY.pm)();return(0,d.jsxs)($054eb8030ebde76e$export$f5d03d415824e0e,{children:[a.map(function(a){let{id:l,title:u,description:h,action:f,...p}=a;return(0,d.jsxs)(eV,{...p,children:[(0,d.jsxs)("div",{className:"grid gap-1",children:[u&&(0,d.jsx)(eK,{children:u}),h&&(0,d.jsx)(eX,{children:h})]}),f,(0,d.jsx)(eJ,{})]},l)}),(0,d.jsx)(ez,{})]})}var eZ=u(803255),eQ=u(195150);u(925047);var e0="undefined"!=typeof window?window:void 0,e1="undefined"!=typeof globalThis?globalThis:e0,e2=Array.prototype,e3=e2.forEach,e5=e2.indexOf,e6=null==e1?void 0:e1.navigator,e8=null==e1?void 0:e1.document,e4=null==e1?void 0:e1.location,e9=null==e1?void 0:e1.fetch,e7=null!=e1&&e1.XMLHttpRequest&&"withCredentials"in new e1.XMLHttpRequest?e1.XMLHttpRequest:void 0,tt=null==e1?void 0:e1.AbortController,tr=null==e6?void 0:e6.userAgent,tn=null!=e0?e0:{},ti={DEBUG:!1,LIB_VERSION:"1.166.1"},ts=Array.isArray,to=Object.prototype,ta=to.hasOwnProperty,tl=to.toString,tc=ts||function(a){return"[object Array]"===tl.call(a)},y=function(a){return"function"==typeof a},b=function(a){return a===Object(a)&&!tc(a)},k=function(a){if(b(a)){for(var l in a)if(ta.call(a,l))return!1;return!0}return!1},w=function(a){return void 0===a},S=function(a){return"[object String]"==tl.call(a)},E=function(a){return S(a)&&0===a.trim().length},x=function(a){return null===a},I=function(a){return w(a)||x(a)},F=function(a){return"[object Number]"==tl.call(a)},P=function(a){return"[object Boolean]"===tl.call(a)},tu="[PostHog.js]",td={_log:function(a){if(e0&&(ti.DEBUG||tn.POSTHOG_DEBUG)&&!w(e0.console)&&e0.console){for(var l=("__rrweb_original__"in e0.console[a])?e0.console[a].__rrweb_original__:e0.console[a],u=arguments.length,d=Array(u>1?u-1:0),h=1;h<u;h++)d[h-1]=arguments[h];l.apply(void 0,[tu].concat(d))}},info:function(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];td._log.apply(td,["log"].concat(l))},warn:function(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];td._log.apply(td,["warn"].concat(l))},error:function(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];td._log.apply(td,["error"].concat(l))},critical:function(){for(var a,l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];(a=console).error.apply(a,[tu].concat(u))},uninitializedWarning:function(a){td.error("You must initialize PostHog before calling ".concat(a))}},M=function(a,l,u){if(a.config.disable_external_dependency_loading)return td.warn("".concat(l," was requested but loading of external scripts is disabled.")),u("Loading of external scripts is disabled");var i=function(){if(!e8)return u("document not found");var a=e8.createElement("script");a.type="text/javascript",a.src=l,a.onload=function(a){return u(void 0,a)},a.onerror=function(a){return u(a)};var d,h=e8.querySelectorAll("body > script");h.length>0?null===(d=h[0].parentNode)||void 0===d||d.insertBefore(a,h[0]):e8.body.appendChild(a)};null!=e8&&e8.body?i():null==e8||e8.addEventListener("DOMContentLoaded",i)};function $(a,l){var u=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);l&&(d=d.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),u.push.apply(u,d)}return u}function O(a){for(var l=1;l<arguments.length;l++){var u=null!=arguments[l]?arguments[l]:{};l%2?$(Object(u),!0).forEach(function(l){q(a,l,u[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(u)):$(Object(u)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(u,l))})}return a}function A(a){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function L(a,l){if(!(a instanceof l))throw TypeError("Cannot call a class as a function")}function D(a,l){for(var u=0;u<l.length;u++){var d=l[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function N(a,l,u){return l&&D(a.prototype,l),u&&D(a,u),Object.defineProperty(a,"prototype",{writable:!1}),a}function q(a,l,u){return l in a?Object.defineProperty(a,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[l]=u,a}function H(a,l){return function(a){if(Array.isArray(a))return a}(a)||function(a,l){var u=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=u){var d,h,f=[],p=!0,g=!1;try{for(u=u.call(a);!(p=(d=u.next()).done)&&(f.push(d.value),!l||f.length!==l);p=!0);}catch(a){g=!0,h=a}finally{try{p||null==u.return||u.return()}finally{if(g)throw h}}return f}}(a,l)||j(a,l)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(a){return function(a){if(Array.isArray(a))return W(a)}(a)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||j(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(a,l){if(a){if("string"==typeof a)return W(a,l);var u=Object.prototype.toString.call(a).slice(8,-1);return"Object"===u&&a.constructor&&(u=a.constructor.name),"Map"===u||"Set"===u?Array.from(a):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?W(a,l):void 0}}function W(a,l){(null==l||l>a.length)&&(l=a.length);for(var u=0,d=Array(l);u<l;u++)d[u]=a[u];return d}function z(a,l){var u="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!u){if(Array.isArray(a)||(u=j(a))||l&&a&&"number"==typeof a.length){u&&(a=u);var d=0,r=function(){};return{s:r,n:function(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function(a){throw a},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h,f=!0,p=!1;return{s:function(){u=u.call(a)},n:function(){var a=u.next();return f=a.done,a},e:function(a){p=!0,h=a},f:function(){try{f||null==u.return||u.return()}finally{if(p)throw h}}}}tn.__PosthogExtensions__=tn.__PosthogExtensions__||{},tn.__PosthogExtensions__.loadExternalDependency=function(a,l,u){var d="/static/".concat(l,".js")+"?v=".concat(a.version);if("toolbar"===l){var h=3e5*Math.floor(Date.now()/3e5);d="".concat(d,"?&=").concat(h)}var f=a.requestRouter.endpointFor("assets",d);M(a,f,u)},tn.__PosthogExtensions__.loadSiteApp=function(a,l,u){var d=a.requestRouter.endpointFor("api",l);M(a,d,u)};var th={},G=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Q(a,l,u){if(tc(a)){if(e3&&a.forEach===e3)a.forEach(l,u);else if("length"in a&&a.length===+a.length){for(var d=0,h=a.length;d<h;d++)if(d in a&&l.call(u,a[d],d)===th)return}}}function J(a,l,u){if(!I(a)){if(tc(a))return Q(a,l,u);if(a instanceof FormData){var d,h=z(a.entries());try{for(h.s();!(d=h.n()).done;){var f=d.value;if(l.call(u,f[1],f[0])===th)return}}catch(a){h.e(a)}finally{h.f()}}else for(var p in a)if(ta.call(a,p)&&l.call(u,a[p],p)===th)return}}var Y=function(a){for(var l=arguments.length,u=Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];return Q(u,function(l){for(var u in l)void 0!==l[u]&&(a[u]=l[u])}),a};function X(a,l){return -1!==a.indexOf(l)}function K(a){for(var l=Object.keys(a),u=l.length,d=Array(u);u--;)d[u]=[l[u],a[l[u]]];return d}var tf,Z=function(a){try{return a()}catch(a){return}},ee=function(a){return function(){try{for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];return a.apply(this,u)}catch(a){td.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),td.critical(a)}}},te=function(a){var l={};return J(a,function(a,u){S(a)&&a.length>0&&(l[u]=a)}),l},ne=function(a){return a.replace(/^\$/,"")},se=function(a){var l,u,d,h,f="";for(l=u=0,d=(a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,h=0;h<d;h++){var p=a.charCodeAt(h),g=null;p<128?u++:g=p>127&&p<2048?String.fromCharCode(p>>6|192,63&p|128):String.fromCharCode(p>>12|224,p>>6&63|128,63&p|128),x(g)||(u>l&&(f+=a.substring(l,u)),f+=g,l=u=h+1)}return u>l&&(f+=a.substring(l,a.length)),f},tp=function(){function t(a){return a&&(a.preventDefault=t.preventDefault,a.stopPropagation=t.stopPropagation),a}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(a,l,u,d,h){if(a){if(a.addEventListener&&!d)a.addEventListener(l,u,!!h);else{var f="on"+l,p=a[f];a[f]=function(l){if(l=l||t(null==e0?void 0:e0.event)){var d,h=!0;y(p)&&(d=p(l));var f=u.call(a,l);return!1!==d&&!1!==f||(h=!1),h}}}}else td.error("No valid element provided to register_event")}}();function ae(a,l){for(var u=0;u<a.length;u++)if(l(a[u]))return a[u]}(t1=tf||(tf={})).GZipJS="gzip-js",t1.Base64="base64";var tg="$people_distinct_id",tm="__alias",tv="__timers",t_="$autocapture_disabled_server_side",ty="$heatmaps_enabled_server_side",tb="$exception_capture_enabled_server_side",tw="$exception_capture_endpoint_suffix",tS="$web_vitals_enabled_server_side",tE="$web_vitals_allowed_metrics",tk="$session_recording_enabled_server_side",tT="$console_log_recording_enabled_server_side",tx="$session_recording_network_payload_capture",tC="$session_recording_canvas_recording",tR="$replay_sample_rate",tI="$replay_minimum_duration",tA="$sesid",tO="$session_is_sampled",tP="$enabled_feature_flags",tL="$early_access_features",tM="$stored_person_properties",tN="$stored_group_properties",tF="$surveys",tD="$surveys_activated",tj="$flag_call_reported",tB="$user_state",t$="$client_session_props",tU="$capture_rate_limit",tH="$initial_campaign_params",tq="$initial_referrer_info",tz="$initial_person_info",tW="$epp",tV="__POSTHOG_TOOLBAR__",tG=[tg,tm,"__cmpns",tv,tk,ty,tA,tP,tB,tL,tN,tM,tF,tj,t$,tU,tH,tq,tW],tJ="$active_feature_flags",tK="$override_feature_flags",tX="$feature_flag_payloads",ze=function(a){var l,u={},d=z(K(a||{}));try{for(d.s();!(l=d.n()).done;){var h=H(l.value,2),f=h[0],p=h[1];p&&(u[f]=p)}}catch(a){d.e(a)}finally{d.f()}return u},tY=function(){function e(a){L(this,e),this.instance=a,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return N(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var a=this.instance.get_property(tP),l=this.instance.get_property(tK);if(!l)return a||{};for(var u=Y({},a),d=Object.keys(l),h=0;h<d.length;h++)u[d[h]]=l[d[h]];return this._override_warning||(td.warn(" Overriding feature flags!",{enabledFlags:a,overriddenFlags:l,finalFlags:u}),this._override_warning=!0),u}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(tX)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(a){this.$anon_distinct_id=a}},{key:"setReloadingPaused",value:function(a){this.reloadFeatureFlagsInAction=a}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var a=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!a.reloadFeatureFlagsInAction&&a.reloadFeatureFlagsQueued&&(a.reloadFeatureFlagsQueued=!1,a._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var a=this;if(!this.instance.config.advanced_disable_feature_flags){this.setReloadingPaused(!0);var l=this.instance.config.token,u=this.instance.get_property(tM),d=this.instance.get_property(tN),h={token:l,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:u,group_properties:d,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:h,compression:this.instance.config.disable_compression?void 0:tf.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(l){a.setReloadingPaused(!1);var u,d=!0;200===l.statusCode&&(a.$anon_distinct_id=void 0,d=!1),a.receivedFeatureFlags(null!==(u=l.json)&&void 0!==u?u:{},d),a._startReloadTimer()}})}}},{key:"getFeatureFlag",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var u,d=this.getFlagVariants()[a],h="".concat(d),f=this.instance.get_property(tj)||{};return!l.send_event&&"send_event"in l||a in f&&f[a].includes(h)||(tc(f[a])?f[a].push(h):f[a]=[h],null===(u=this.instance.persistence)||void 0===u||u.register(q({},tj,f)),this.instance.capture("$feature_flag_called",{$feature_flag:a,$feature_flag_response:d})),d}td.warn('getFeatureFlag for key "'+a+"\" failed. Feature flags didn't load in time.")}},{key:"getFeatureFlagPayload",value:function(a){return this.getFlagPayloads()[a]}},{key:"isFeatureEnabled",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(a,l);td.warn('isFeatureEnabled for key "'+a+"\" failed. Feature flags didn't load in time.")}},{key:"addFeatureFlagsHandler",value:function(a){this.featureFlagEventHandlers.push(a)}},{key:"removeFeatureFlagsHandler",value:function(a){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(l){return l!==a})}},{key:"receivedFeatureFlags",value:function(a,l){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var u=this.getFlagVariants(),d=this.getFlagPayloads();(function(a,l){var u,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=a.featureFlags,p=a.featureFlagPayloads;if(f){if(tc(f)){var g,m={};if(f)for(var v=0;v<f.length;v++)m[f[v]]=!0;l&&l.register((q(g={},tJ,f),q(g,tP,m),g))}else{var _=f,T=p;a.errorsWhileComputingFlags&&(_=O(O({},d),_),T=O(O({},h),T)),l&&l.register((q(u={},tJ,Object.keys(ze(_))),q(u,tP,_||{}),q(u,tX,T||{}),u))}}})(a,this.instance.persistence,u,d),this._fireFeatureFlagsCallbacks(l)}}},{key:"override",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.instance.__loaded||!this.instance.persistence)return td.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=l,!1===a)this.instance.persistence.unregister(tK);else if(tc(a)){for(var u={},d=0;d<a.length;d++)u[a[d]]=!0;this.instance.persistence.register(q({},tK,u))}else this.instance.persistence.register(q({},tK,a))}},{key:"onFeatureFlags",value:function(a){var l=this;if(this.addFeatureFlagsHandler(a),this.instance.decideEndpointWasHit){var u=this._prepareFeatureFlagsForCallbacks();a(u.flags,u.flagVariants)}return function(){return l.removeFeatureFlagsHandler(a)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(a,l){var u,d,h=q({},"$feature_enrollment/".concat(a),l);this.instance.capture("$feature_enrollment_update",{$feature_flag:a,$feature_enrollment:l,$set:h}),this.setPersonPropertiesForFlags(h,!1);var f=O(O({},this.getFlagVariants()),{},q({},a,l));null===(u=this.instance.persistence)||void 0===u||u.register((q(d={},tJ,Object.keys(ze(f))),q(d,tP,f),d)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(a){var l=this,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],d=this.instance.get_property(tL);if(d&&!u)return a(d);this.instance._send_request({transport:"XHR",url:this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),method:"GET",callback:function(u){var d;if(u.json){var h=u.json.earlyAccessFeatures;return null===(d=l.instance.persistence)||void 0===d||d.register(q({},tL,h)),a(h)}}})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var a=this.getFlags(),l=this.getFlagVariants();return{flags:a.filter(function(a){return l[a]}),flagVariants:Object.keys(l).filter(function(a){return l[a]}).reduce(function(a,u){return a[u]=l[u],a},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(a){var l=this._prepareFeatureFlagsForCallbacks(),u=l.flags,d=l.flagVariants;this.featureFlagEventHandlers.forEach(function(l){return l(u,d,{errorsLoading:a})})}},{key:"setPersonPropertiesForFlags",value:function(a){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=this.instance.get_property(tM)||{};this.instance.register(q({},tM,O(O({},u),a))),l&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(tM)}},{key:"setGroupPropertiesForFlags",value:function(a){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=this.instance.get_property(tN)||{};0!==Object.keys(u).length&&Object.keys(u).forEach(function(l){u[l]=O(O({},u[l]),a[l]),delete a[l]}),this.instance.register(q({},tN,O(O({},u),a))),l&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(a){if(a){var l=this.instance.get_property(tN)||{};this.instance.register(q({},tN,O(O({},l),{},q({},a,{}))))}else this.instance.unregister(tN)}}]),e}();Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),Number.isInteger||(Number.isInteger=function(a){return F(a)&&isFinite(a)&&Math.floor(a)===a});var tZ="0123456789abcdef",tQ=function(){function e(a){if(L(this,e),this.bytes=a,16!==a.length)throw TypeError("not 128-bit length")}return N(e,[{key:"toString",value:function(){for(var a="",l=0;l<this.bytes.length;l++)a=a+tZ.charAt(this.bytes[l]>>>4)+tZ.charAt(15&this.bytes[l]),3!==l&&5!==l&&7!==l&&9!==l||(a+="-");if(36!==a.length)throw Error("Invalid UUIDv7 was generated");return a}},{key:"clone",value:function(){return new e(this.bytes.slice(0))}},{key:"equals",value:function(a){return 0===this.compareTo(a)}},{key:"compareTo",value:function(a){for(var l=0;l<16;l++){var u=this.bytes[l]-a.bytes[l];if(0!==u)return Math.sign(u)}return 0}}],[{key:"fromFieldsV7",value:function(a,l,u,d){if(!Number.isInteger(a)||!Number.isInteger(l)||!Number.isInteger(u)||!Number.isInteger(d)||a<0||l<0||u<0||d<0||a>0xffffffffffff||l>4095||u>1073741823||d>4294967295)throw RangeError("invalid field value");var h=new Uint8Array(16);return h[0]=a/1099511627776,h[1]=a/4294967296,h[2]=a/16777216,h[3]=a/65536,h[4]=a/256,h[5]=a,h[6]=112|l>>>8,h[7]=l,h[8]=128|u>>>24,h[9]=u>>>16,h[10]=u>>>8,h[11]=u,h[12]=d>>>24,h[13]=d>>>16,h[14]=d>>>8,h[15]=d,new e(h)}}]),e}(),t0=function(){function e(){L(this,e),q(this,"timestamp",0),q(this,"counter",0),q(this,"random",new t5)}return N(e,[{key:"generate",value:function(){var a=this.generateOrAbort();if(w(a)){this.timestamp=0;var l=this.generateOrAbort();if(w(l))throw Error("Could not generate UUID after timestamp reset");return l}return a}},{key:"generateOrAbort",value:function(){var a=Date.now();if(a>this.timestamp)this.timestamp=a,this.resetCounter();else{if(!(a+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return tQ.fromFieldsV7(this.timestamp,Math.trunc(this.counter/1073741824),1073741823&this.counter,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),e}(),Ye=function(a){if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var l=0;l<a.length;l++)a[l]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return a};e0&&!w(e0.crypto)&&crypto.getRandomValues&&(Ye=function(a){return crypto.getRandomValues(a)});var t1,t2,t3,t5=function(){function e(){L(this,e),q(this,"buffer",new Uint32Array(8)),q(this,"cursor",1/0)}return N(e,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(Ye(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),e}(),Ze=function(){return et().toString()},et=function(){return(t2||(t2=new t0)).generate()},t6="",t8=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,t4={is_supported:function(){return!!e8},error:function(a){td.error("cookieStore error: "+a)},get:function(a){if(e8){try{for(var l=a+"=",u=e8.cookie.split(";").filter(function(a){return a.length}),d=0;d<u.length;d++){for(var h=u[d];" "==h.charAt(0);)h=h.substring(1,h.length);if(0===h.indexOf(l))return decodeURIComponent(h.substring(l.length,h.length))}}catch(a){}return null}},parse:function(a){var l;try{l=JSON.parse(t4.get(a))||{}}catch(a){}return l},set:function(a,l,u,d,h){if(e8)try{var f="",p="",g=function(a,l){if(l){var u=function(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e8;if(t6)return t6;if(!l||["localhost","127.0.0.1"].includes(a))return"";for(var u=a.split("."),d=Math.min(u.length,8),h="dmn_chk_"+Ze(),f=RegExp("(^|;)\\s*"+h+"=1");!t6&&d--;){var p=u.slice(d).join("."),g=h+"=1;domain=."+p;l.cookie=g,f.test(l.cookie)&&(l.cookie=g+";expires=Thu, 01 Jan 1970 00:00:00 GMT",t6=p)}return t6}(a);if(!u){var d,h=(d=a.match(t8))?d[0]:"";h!==u&&td.info("Warning: cookie subdomain discovery mismatch",h,u),u=h}return u?"; domain=."+u:""}return""}(e8.location.hostname,d);if(u){var m=new Date;m.setTime(m.getTime()+24*u*36e5),f="; expires="+m.toUTCString()}h&&(p="; secure");var v=a+"="+encodeURIComponent(JSON.stringify(l))+f+"; SameSite=Lax; path=/"+g+p;return v.length>3686.4&&td.warn("cookieStore warning: large cookie, len="+v.length),e8.cookie=v,v}catch(a){return}},remove:function(a,l){try{t4.set(a,"",-1,l)}catch(a){return}}},t9=null,t7={is_supported:function(){if(!x(t9))return t9;var a=!0;if(w(e0))a=!1;else try{var l="__mplssupport__";t7.set(l,"xyz"),'"xyz"'!==t7.get(l)&&(a=!1),t7.remove(l)}catch(l){a=!1}return a||td.error("localStorage unsupported; falling back to cookie store"),t9=a,a},error:function(a){td.error("localStorage error: "+a)},get:function(a){try{return null==e0?void 0:e0.localStorage.getItem(a)}catch(a){t7.error(a)}return null},parse:function(a){try{return JSON.parse(t7.get(a))||{}}catch(a){}return null},set:function(a,l){try{null==e0||e0.localStorage.setItem(a,JSON.stringify(l))}catch(a){t7.error(a)}},remove:function(a){try{null==e0||e0.localStorage.removeItem(a)}catch(a){t7.error(a)}}},re=["distinct_id",tA,tO,tW],rt=O(O({},t7),{},{parse:function(a){try{var l={};try{l=t4.parse(a)||{}}catch(a){}var u=Y(l,JSON.parse(t7.get(a)||"{}"));return t7.set(a,u),u}catch(a){}return null},set:function(a,l,u,d,h,f){try{t7.set(a,l,void 0,void 0,f);var p={};re.forEach(function(a){l[a]&&(p[a]=l[a])}),Object.keys(p).length&&t4.set(a,p,u,d,h,f)}catch(a){t7.error(a)}},remove:function(a,l){try{null==e0||e0.localStorage.removeItem(a),t4.remove(a,l)}catch(a){t7.error(a)}}}),rr={},rn={is_supported:function(){return!0},error:function(a){td.error("memoryStorage error: "+a)},get:function(a){return rr[a]||null},parse:function(a){return rr[a]||null},set:function(a,l){rr[a]=l},remove:function(a){delete rr[a]}},ri=null,rs={is_supported:function(){if(!x(ri))return ri;if(ri=!0,w(e0))ri=!1;else try{var a="__support__";rs.set(a,"xyz"),'"xyz"'!==rs.get(a)&&(ri=!1),rs.remove(a)}catch(a){ri=!1}return ri},error:function(a){td.error("sessionStorage error: ",a)},get:function(a){try{return null==e0?void 0:e0.sessionStorage.getItem(a)}catch(a){rs.error(a)}return null},parse:function(a){try{return JSON.parse(rs.get(a))||null}catch(a){}return null},set:function(a,l){try{null==e0||e0.sessionStorage.setItem(a,JSON.stringify(l))}catch(a){rs.error(a)}},remove:function(a){try{null==e0||e0.sessionStorage.removeItem(a)}catch(a){rs.error(a)}}},ro=["localhost","127.0.0.1"],gt=function(a){var l=null==e8?void 0:e8.createElement("a");return w(l)?null:(l.href=a,l)},_t=function(a,l){return!!function(a){try{new RegExp(a)}catch(a){return!1}return!0}(l)&&new RegExp(l).test(a)},mt=function(a){var l,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",h=[];return J(a,function(a,d){w(a)||w(d)||"undefined"===d||(l=encodeURIComponent(a instanceof File?a.name:a.toString()),u=encodeURIComponent(d),h[h.length]=u+"="+l)}),h.join(d)},yt=function(a,l){for(var u,d=((a.split("#")[0]||"").split("?")[1]||"").split("&"),h=0;h<d.length;h++){var f=d[h].split("=");if(f[0]===l){u=f;break}}if(!tc(u)||u.length<2)return"";var p=u[1];try{p=decodeURIComponent(p)}catch(a){td.error("Skipping decoding for malformed query param: "+p)}return p.replace(/\+/g," ")},bt=function(a,l){var u=a.match(RegExp(l+"=([^&]*)"));return u?u[1]:null},ra="Mobile",rl="Android",rc="Tablet",ru=rl+" "+rc,rd="iPad",rh="Apple",rf=rh+" Watch",rp="Safari",rg="BlackBerry",rm="Samsung",rv=rm+"Browser",r_=rm+" Internet",ry="Chrome",rb=ry+" OS",rw=ry+" iOS",rS="Internet Explorer",rE=rS+" "+ra,rk="Opera",rT=rk+" Mini",rx="Edge",rC="Microsoft "+rx,rR="Firefox",rI=rR+" iOS",rA="Nintendo",rO="PlayStation",rP="Xbox",rL=rl+" "+ra,rM=ra+" "+rp,rN="Windows",rF=rN+" Phone",rD="Nokia",rj="Ouya",rB="Generic",r$=rB+" "+ra.toLowerCase(),rU=rB+" "+rc.toLowerCase(),rH="Konqueror",rq="(\\d+(\\.\\d+)?)",rz=RegExp("Version/"+rq),rW=RegExp(rP,"i"),rV=RegExp(rO+" \\w+","i"),rG=RegExp(rA+" \\w+","i"),rJ=RegExp(rg+"|PlayBook|BB10","i"),rK={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},fn=function(a,l){var u,d;return l=l||"",X(a," OPR/")&&X(a,"Mini")?rT:X(a," OPR/")?rk:rJ.test(a)?rg:X(a,"IE"+ra)||X(a,"WPDesktop")?rE:X(a,rv)?r_:X(a,rx)||X(a,"Edg/")?rC:X(a,"FBIOS")?"Facebook "+ra:X(a,"UCWEB")||X(a,"UCBrowser")?"UC Browser":X(a,"CriOS")?rw:X(a,"CrMo")?ry:X(a,rl)&&X(a,rp)?rL:X(a,ry)?ry:X(a,"FxiOS")?rI:X(a.toLowerCase(),rH.toLowerCase())?rH:(u=a,(d=l)&&X(d,rh)||X(u,rp)&&!X(u,ry)&&!X(u,rl))?X(a,ra)?rM:rp:X(a,rR)?rR:X(a,"MSIE")||X(a,"Trident/")?rS:X(a,"Gecko")?rR:""},rX=(q(t3={},rE,[RegExp("rv:"+rq)]),q(t3,rC,[RegExp(rx+"?\\/"+rq)]),q(t3,ry,[RegExp("("+ry+"|CrMo)\\/"+rq)]),q(t3,rw,[RegExp("CriOS\\/"+rq)]),q(t3,"UC Browser",[RegExp("(UCBrowser|UCWEB)\\/"+rq)]),q(t3,rp,[rz]),q(t3,rM,[rz]),q(t3,rk,[RegExp("(Opera|OPR)\\/"+rq)]),q(t3,rR,[RegExp(rR+"\\/"+rq)]),q(t3,rI,[RegExp("FxiOS\\/"+rq)]),q(t3,rH,[RegExp("Konqueror[:/]?"+rq,"i")]),q(t3,rg,[RegExp(rg+" "+rq),rz]),q(t3,rL,[RegExp("android\\s"+rq,"i")]),q(t3,r_,[RegExp(rv+"\\/"+rq)]),q(t3,rS,[RegExp("(rv:|MSIE )"+rq)]),q(t3,"Mozilla",[RegExp("rv:"+rq)]),t3),rY=[[RegExp(rP+"; "+rP+" (.*?)[);]","i"),function(a){return[rP,a&&a[1]||""]}],[RegExp(rA,"i"),[rA,""]],[RegExp(rO,"i"),[rO,""]],[rJ,[rg,""]],[RegExp(rN,"i"),function(a,l){if(/Phone/.test(l)||/WPDesktop/.test(l))return[rF,""];if(new RegExp(ra).test(l)&&!/IEMobile\b/.test(l))return[rN+" "+ra,""];var u=/Windows NT ([0-9.]+)/i.exec(l);if(u&&u[1]){var d=rK[u[1]]||"";return/arm/i.test(l)&&(d="RT"),[rN,d]}return[rN,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(a){return a&&a[3]?["iOS",[a[3],a[4],a[5]||"0"].join(".")]:["iOS",""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(a){var l="";return a&&a.length>=3&&(l=w(a[2])?a[3]:a[2]),["watchOS",l]}],[RegExp("("+rl+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rl+")","i"),function(a){return a&&a[2]?[rl,[a[2],a[3],a[4]||"0"].join(".")]:[rl,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(a){var l=["Mac OS X",""];if(a&&a[1]){var u=[a[1],a[2],a[3]||"0"];l[1]=u.join(".")}return l}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[rb,""]],[/Linux|debian/i,["Linux",""]]],gn=function(a){return rG.test(a)?rA:rV.test(a)?rO:rW.test(a)?rP:RegExp(rj,"i").test(a)?rj:RegExp("("+rF+"|WPDesktop)","i").test(a)?rF:/iPad/.test(a)?rd:/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(a)?rf:rJ.test(a)?rg:/(kobo)\s(ereader|touch)/i.test(a)?"Kobo":RegExp(rD,"i").test(a)?rD:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(a)||/(kf[a-z]+)( bui|\)).+silk\//i.test(a)?"Kindle Fire":/(Android|ZTE)/i.test(a)?!new RegExp(ra).test(a)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(a)?/pixel[\daxl ]{1,6}/i.test(a)&&!/pixel c/i.test(a)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(a)||/lmy47v/i.test(a)&&!/QTAQZ3/i.test(a)?rl:ru:rl:RegExp("(pda|"+ra+")","i").test(a)?r$:RegExp(rc,"i").test(a)&&!RegExp(rc+" pc","i").test(a)?rU:""},rZ="https?://(.*)",rQ=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],r0={campaignParams:function(a){return e8?this._campaignParamsFromUrl(e8.URL,a):{}},_campaignParamsFromUrl:function(a,l){var u=rQ.concat(l||[]),d={};return J(u,function(l){var u=yt(a,l);u&&(d[l]=u)}),d},_searchEngine:function(a){return a?0===a.search(rZ+"google.([^/?]*)")?"google":0===a.search(rZ+"bing.com")?"bing":0===a.search(rZ+"yahoo.com")?"yahoo":0===a.search(rZ+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(a){var l=r0._searchEngine(a),u="yahoo"!=l?"q":"p",d={};if(!x(l)){d.$search_engine=l;var h=e8?yt(e8.referrer,u):"";h.length&&(d.ph_keyword=h)}return d},searchInfo:function(){var a=null==e8?void 0:e8.referrer;return a?this._searchInfoFromReferrer(a):{}},browser:fn,browserVersion:function(a,l){var u=rX[fn(a,l)];if(w(u))return null;for(var d=0;d<u.length;d++){var h=u[d],f=a.match(h);if(f)return parseFloat(f[f.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(a){for(var l=0;l<rY.length;l++){var u=H(rY[l],2),d=u[0],h=u[1],f=d.exec(a),p=f&&(y(h)?h(f,a):h);if(p)return p}return["",""]},device:gn,deviceType:function(a){var l=gn(a);return l===rd||l===ru||"Kobo"===l||"Kindle Fire"===l||l===rU?rc:l===rA||l===rP||l===rO||l===rj?"Console":l===rf?"Wearable":l?ra:"Desktop"},referrer:function(){return(null==e8?void 0:e8.referrer)||"$direct"},referringDomain:function(){var a;return null!=e8&&e8.referrer&&(null===(a=gt(e8.referrer))||void 0===a?void 0:a.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer(),u:null==e4?void 0:e4.href}},initialPersonPropsFromInfo:function(a){var l,u=a.r,d=a.u,h={$initial_referrer:u,$initial_referring_domain:null==u?void 0:"$direct"==u?"$direct":null===(l=gt(u))||void 0===l?void 0:l.host};if(d){h.$initial_current_url=d;var f=gt(d);h.$initial_host=null==f?void 0:f.host,h.$initial_pathname=null==f?void 0:f.pathname,J(this._campaignParamsFromUrl(d),function(a,l){h["$initial_"+ne(l)]=a})}return u&&J(this._searchInfoFromReferrer(u),function(a,l){h["$initial_"+ne(l)]=a}),h},properties:function(){if(!tr)return{};var a=H(r0.os(tr),2);return Y(te({$os:a[0],$os_version:a[1],$browser:r0.browser(tr,navigator.vendor),$device:r0.device(tr),$device_type:r0.deviceType(tr)}),{$current_url:null==e4?void 0:e4.href,$host:null==e4?void 0:e4.host,$pathname:null==e4?void 0:e4.pathname,$raw_user_agent:tr.length>1e3?tr.substring(0,997)+"...":tr,$browser_version:r0.browserVersion(tr,navigator.vendor),$browser_language:r0.browserLanguage(),$screen_height:null==e0?void 0:e0.screen.height,$screen_width:null==e0?void 0:e0.screen.width,$viewport_height:null==e0?void 0:e0.innerHeight,$viewport_width:null==e0?void 0:e0.innerWidth,$lib:"web",$lib_version:ti.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!tr)return{};var a=H(r0.os(tr),2);return Y(te({$os:a[0],$os_version:a[1],$browser:r0.browser(tr,navigator.vendor)}),{$browser_version:r0.browserVersion(tr,navigator.vendor)})}},r1=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],r2=function(){function e(a){var l;L(this,e),this.config=a,this.props={},this.campaign_params_saved=!1,this.name=(l="",a.token&&(l=a.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),a.persistence_name?"ph_"+a.persistence_name:"ph_"+l+"_posthog"),this.storage=this.buildStorage(a),this.load(),a.debug&&td.info("Persistence loaded",a.persistence,O({},this.props)),this.update_config(a,a),this.save()}return N(e,[{key:"buildStorage",value:function(a){-1===r1.indexOf(a.persistence.toLowerCase())&&(td.critical("Unknown persistence type "+a.persistence+"; falling back to localStorage+cookie"),a.persistence="localStorage+cookie");var l=a.persistence.toLowerCase();return"localstorage"===l&&t7.is_supported()?t7:"localstorage+cookie"===l&&rt.is_supported()?rt:"sessionstorage"===l&&rs.is_supported()?rs:"memory"===l?rn:"cookie"===l?t4:rt.is_supported()?rt:t4}},{key:"properties",value:function(){var a={};return J(this.props,function(l,u){if(u===tP&&b(l))for(var d,h=Object.keys(l),f=0;f<h.length;f++)a["$feature/".concat(h[f])]=l[h[f]];else d=!1,(x(tG)?d:e5&&tG.indexOf===e5?-1!=tG.indexOf(u):(J(tG,function(a){if(d||(d=a===u))return th}),d))||(a[u]=l)}),a}},{key:"load",value:function(){if(!this.disabled){var a=this.storage.parse(this.name);a&&(this.props=Y({},a))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure,this.config.debug)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(a,l,u){var d=this;if(b(a)){w(l)&&(l="None"),this.expire_days=w(u)?this.default_expiry:u;var h=!1;if(J(a,function(a,u){d.props.hasOwnProperty(u)&&d.props[u]!==l||(d.props[u]=a,h=!0)}),h)return this.save(),!0}return!1}},{key:"register",value:function(a,l){var u=this;if(b(a)){this.expire_days=w(l)?this.default_expiry:l;var d=!1;if(J(a,function(l,h){a.hasOwnProperty(h)&&u.props[h]!==l&&(u.props[h]=l,d=!0)}),d)return this.save(),!0}return!1}},{key:"unregister",value:function(a){a in this.props&&(delete this.props[a],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(r0.campaignParams(this.config.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(r0.searchInfo())}},{key:"update_referrer_info",value:function(){this.register_once(r0.referrerInfo(),void 0)}},{key:"set_initial_person_info",value:function(){this.props[tH]||this.props[tq]||this.register_once(q({},tz,r0.initialPersonInfo()),void 0)}},{key:"get_referrer_info",value:function(){return te({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"get_initial_props",value:function(){var a=this,l={};J([tq,tH],function(u){var d=a.props[u];d&&J(d,function(a,u){l["$initial_"+ne(u)]=a})});var u=this.props[tz];return u&&Y(l,r0.initialPersonPropsFromInfo(u)),l}},{key:"safe_merge",value:function(a){return J(this.props,function(l,u){u in a||(a[u]=l)}),a}},{key:"update_config",value:function(a,l){if(this.default_expiry=this.expire_days=a.cookie_expiration,this.set_disabled(a.disable_persistence),this.set_cross_subdomain(a.cross_subdomain_cookie),this.set_secure(a.secure_cookie),a.persistence!==l.persistence){var u=this.buildStorage(a),d=this.props;this.clear(),this.storage=u,this.props=d,this.save()}}},{key:"set_disabled",value:function(a){this.disabled=a,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(a){a!==this.cross_subdomain&&(this.cross_subdomain=a,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(a){a!==this.secure&&(this.secure=a,this.remove(),this.save())}},{key:"set_event_timer",value:function(a,l){var u=this.props[tv]||{};u[a]=l,this.props[tv]=u,this.save()}},{key:"remove_event_timer",value:function(a){var l=(this.props[tv]||{})[a];return w(l)||(delete this.props[tv][a],this.save()),l}},{key:"get_property",value:function(a){return this.props[a]}},{key:"set_property",value:function(a,l){this.props[a]=l,this.save()}}]),e}();function wn(a){var l;return JSON.stringify(a,(l=[],function(a,u){if(b(u)){for(;l.length>0&&l.at(-1)!==this;)l.pop();return l.includes(u)?"[Circular]":(l.push(u),u)}return u})).length}var r3=((nP=r3||{})[nP.DomContentLoaded=0]="DomContentLoaded",nP[nP.Load=1]="Load",nP[nP.FullSnapshot=2]="FullSnapshot",nP[nP.IncrementalSnapshot=3]="IncrementalSnapshot",nP[nP.Meta=4]="Meta",nP[nP.Custom=5]="Custom",nP[nP.Plugin=6]="Plugin",nP),r5=((nL=r5||{})[nL.Mutation=0]="Mutation",nL[nL.MouseMove=1]="MouseMove",nL[nL.MouseInteraction=2]="MouseInteraction",nL[nL.Scroll=3]="Scroll",nL[nL.ViewportResize=4]="ViewportResize",nL[nL.Input=5]="Input",nL[nL.TouchMove=6]="TouchMove",nL[nL.MediaInteraction=7]="MediaInteraction",nL[nL.StyleSheetRule=8]="StyleSheetRule",nL[nL.CanvasMutation=9]="CanvasMutation",nL[nL.Font=10]="Font",nL[nL.Log=11]="Log",nL[nL.Drag=12]="Drag",nL[nL.StyleDeclaration=13]="StyleDeclaration",nL[nL.Selection=14]="Selection",nL[nL.AdoptedStyleSheet=15]="AdoptedStyleSheet",nL[nL.CustomElement=16]="CustomElement",nL);function In(a){return a?G(a).split(/\s+/):[]}function Fn(a){var l=null==e0?void 0:e0.location.href;return!!(l&&a&&a.some(function(a){return l.match(a)}))}function Pn(a){var l="";switch(A(a.className)){case"string":l=a.className;break;case"object":l=(a.className&&"baseVal"in a.className?a.className.baseVal:null)||a.getAttribute("class")||"";break;default:l=""}return In(l)}function Rn(a){return I(a)?null:G(a).split(/(\s+)/).filter(function(a){return Gn(a)}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Tn(a){var l="";return qn(a)&&!Bn(a)&&a.childNodes&&a.childNodes.length&&J(a.childNodes,function(a){var u;On(a)&&a.textContent&&(l+=null!==(u=Rn(a.textContent))&&void 0!==u?u:"")}),G(l)}function Cn(a){var l;return w(a.target)?a.srcElement||null:null!==(l=a.target)&&void 0!==l&&l.shadowRoot?a.composedPath()[0]||null:a.target||null}function Mn(a){return!!a&&1===a.nodeType}function $n(a,l){return!!a&&!!a.tagName&&a.tagName.toLowerCase()===l.toLowerCase()}function On(a){return!!a&&3===a.nodeType}function An(a){return!!a&&11===a.nodeType}var r6=["a","button","form","input","select","textarea","label"];function Dn(a){var l=a.parentNode;return!(!l||!Mn(l))&&l}function qn(a){for(var l=a;l.parentNode&&!$n(l,"body");l=l.parentNode){var u=Pn(l);if(X(u,"ph-sensitive")||X(u,"ph-no-capture"))return!1}if(X(Pn(a),"ph-include"))return!0;var d=a.type||"";if(S(d))switch(d.toLowerCase()){case"hidden":case"password":return!1}var h=a.name||a.id||"";return!(S(h)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(h.replace(/[^a-zA-Z0-9]/g,"")))}function Bn(a){return!!($n(a,"input")&&!["button","checkbox","submit","reset"].includes(a.type)||$n(a,"select")||$n(a,"textarea")||"true"===a.getAttribute("contenteditable"))}var r8="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",r4=new RegExp("^(?:".concat(r8,")$")),r9=new RegExp(r8),r7="\\d{3}-?\\d{2}-?\\d{4}",nt=new RegExp("^(".concat(r7,")$")),nr=new RegExp("(".concat(r7,")"));function Gn(a){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(I(a)||S(a)&&(a=G(a),(l?r4:r9).test((a||"").replace(/[- ]/g,""))||(l?nt:nr).test(a)))}function Qn(a){var l=Tn(a);return Gn(l="".concat(l," ").concat(function Jn(a){var l="";return a&&a.childNodes&&a.childNodes.length&&J(a.childNodes,function(a){var u;if(a&&"span"===(null===(u=a.tagName)||void 0===u?void 0:u.toLowerCase()))try{var d=Tn(a);l="".concat(l," ").concat(d).trim(),a.childNodes&&a.childNodes.length&&(l="".concat(l," ").concat(Jn(a)).trim())}catch(a){td.error(a)}}),l}(a)).trim())?l:""}function Xn(a){return a.replace(/"|\\"/g,'\\"')}var nn="[SessionRecording]",ni="redacted",ns={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(a){return a},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io"]},no=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],na=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],nl=["/s/","/e/","/i/"];function si(a,l,u,d){if(I(a))return a;var h=(null==l?void 0:l["content-length"])||new Blob([a]).size;return S(h)&&(h=parseInt(h)),h>u?nn+" ".concat(d," body too large to record (").concat(h," bytes)"):a}function oi(a,l){if(I(a))return a;var u=a;return Gn(u,!1)||(u=nn+" "+l+" body "+ni),J(na,function(a){var d,h;null!==(d=u)&&void 0!==d&&d.length&&-1!==(null===(h=u)||void 0===h?void 0:h.indexOf(a))&&(u=nn+" "+l+" body "+ni+" as might contain: "+a)}),u}var ai=function(a,l){var u,d,h={payloadSizeLimitBytes:ns.payloadSizeLimitBytes,performanceEntryTypeToObserve:U(ns.performanceEntryTypeToObserve),payloadHostDenyList:[].concat(U(l.payloadHostDenyList||[]),U(ns.payloadHostDenyList))},f=!1!==a.session_recording.recordHeaders&&l.recordHeaders,p=!1!==a.session_recording.recordBody&&l.recordBody,g=!1!==a.capture_performance&&l.recordPerformance,m=(d=Math.min(1e6,null!==(u=h.payloadSizeLimitBytes)&&void 0!==u?u:1e6),function(a){return null!=a&&a.requestBody&&(a.requestBody=si(a.requestBody,a.requestHeaders,d,"Request")),null!=a&&a.responseBody&&(a.responseBody=si(a.responseBody,a.responseHeaders,d,"Response")),a}),c=function(a){var l;return m(function(a){var l=gt(a.name);if(!(l&&l.pathname&&nl.some(function(a){return 0===l.pathname.indexOf(a)})))return a}((I(l=a.requestHeaders)||J(Object.keys(null!=l?l:{}),function(a){no.includes(a.toLowerCase())&&(l[a]=ni)}),a)))},v=y(a.session_recording.maskNetworkRequestFn);return v&&y(a.session_recording.maskCapturedNetworkRequestFn)&&td.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),v&&(a.session_recording.maskCapturedNetworkRequestFn=function(l){var u=a.session_recording.maskNetworkRequestFn({url:l.name});return O(O({},l),{},{name:null==u?void 0:u.url})}),h.maskRequestFn=y(a.session_recording.maskCapturedNetworkRequestFn)?function(l){var u,d,h,f=c(l);return f&&null!==(u=null===(d=(h=a.session_recording).maskCapturedNetworkRequestFn)||void 0===d?void 0:d.call(h,f))&&void 0!==u?u:void 0}:function(a){return function(a){if(!w(a))return a.requestBody=oi(a.requestBody,"Request"),a.responseBody=oi(a.responseBody,"Response"),a}(c(a))},O(O(O({},ns),h),{},{recordHeaders:f,recordBody:p,recordPerformance:g,recordInitialRequests:g})},nc=N(function e(a){var l,u,d=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(this,e),q(this,"bucketSize",100),q(this,"refillRate",10),q(this,"mutationBuckets",{}),q(this,"loggedTracker",{}),q(this,"refillBuckets",function(){Object.keys(d.mutationBuckets).forEach(function(a){d.mutationBuckets[a]=d.mutationBuckets[a]+d.refillRate,d.mutationBuckets[a]>=d.bucketSize&&delete d.mutationBuckets[a]})}),q(this,"getNodeOrRelevantParent",function(a){var l=d.rrweb.mirror.getNode(a);if("svg"!==(null==l?void 0:l.nodeName)&&l instanceof Element){var u=l.closest("svg");if(u)return[d.rrweb.mirror.getId(u),u]}return[a,l]}),q(this,"numberOfChanges",function(a){var l,u,d,h,f,p,g,m;return(null!==(l=null===(u=a.removes)||void 0===u?void 0:u.length)&&void 0!==l?l:0)+(null!==(d=null===(h=a.attributes)||void 0===h?void 0:h.length)&&void 0!==d?d:0)+(null!==(f=null===(p=a.texts)||void 0===p?void 0:p.length)&&void 0!==f?f:0)+(null!==(g=null===(m=a.adds)||void 0===m?void 0:m.length)&&void 0!==g?g:0)}),q(this,"throttleMutations",function(a){if(3!==a.type||0!==a.data.source)return a;var l=a.data,u=d.numberOfChanges(l);l.attributes&&(l.attributes=l.attributes.filter(function(a){var l,u,h,f=H(d.getNodeOrRelevantParent(a.id),2),p=f[0],g=f[1];return 0!==d.mutationBuckets[p]&&(d.mutationBuckets[p]=null!==(l=d.mutationBuckets[p])&&void 0!==l?l:d.bucketSize,d.mutationBuckets[p]=Math.max(d.mutationBuckets[p]-1,0),0===d.mutationBuckets[p]&&(d.loggedTracker[p]||(d.loggedTracker[p]=!0,null===(u=(h=d.options).onBlockedNode)||void 0===u||u.call(h,p,g))),a)}));var h=d.numberOfChanges(l);return 0!==h||u===h?a:void 0}),this.rrweb=a,this.options=h,this.refillRate=null!==(l=this.options.refillRate)&&void 0!==l?l:this.refillRate,this.bucketSize=null!==(u=this.options.bucketSize)&&void 0!==u?u:this.bucketSize,setInterval(function(){d.refillBuckets()},1e3)}),nu=Uint8Array,nd=Uint16Array,nh=Uint32Array,nf=new nu([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]),np=new nu([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]),ng=new nu([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pi=function(a,l){for(var u=new nd(31),d=0;d<31;++d)u[d]=l+=1<<a[d-1];var h=new nh(u[30]);for(d=1;d<30;++d)for(var f=u[d];f<u[d+1];++f)h[f]=f-u[d]<<5|d;return[u,h]},nm=pi(nf,2),nv=nm[0],n_=nm[1];nv[28]=258,n_[258]=28;for(var ny=pi(np,0)[1],nb=new nd(32768),nw=0;nw<32768;++nw){var nS=(43690&nw)>>>1|(21845&nw)<<1;nS=(61680&(nS=(52428&nS)>>>2|(13107&nS)<<2))>>>4|(3855&nS)<<4,nb[nw]=((65280&nS)>>>8|(255&nS)<<8)>>>1}var Si=function(a,l,u){for(var d=a.length,h=0,f=new nd(l);h<d;++h)++f[a[h]-1];var p,g=new nd(l);for(h=0;h<l;++h)g[h]=g[h-1]+f[h-1]<<1;if(u){p=new nd(1<<l);var m=15-l;for(h=0;h<d;++h)if(a[h])for(var v=h<<4|a[h],_=l-a[h],T=g[a[h]-1]++<<_,C=T|(1<<_)-1;T<=C;++T)p[nb[T]>>>m]=v}else for(p=new nd(d),h=0;h<d;++h)p[h]=nb[g[a[h]-1]++]>>>15-a[h];return p},nE=new nu(288);for(nw=0;nw<144;++nw)nE[nw]=8;for(nw=144;nw<256;++nw)nE[nw]=9;for(nw=256;nw<280;++nw)nE[nw]=7;for(nw=280;nw<288;++nw)nE[nw]=8;var nk=new nu(32);for(nw=0;nw<32;++nw)nk[nw]=5;var nT=Si(nE,9,0),nx=Si(nk,5,0),Pi=function(a){return(a/8>>0)+(7&a&&1)},Ri=function(a,l,u){(null==l||l<0)&&(l=0),(null==u||u>a.length)&&(u=a.length);var d=new(a instanceof nd?nd:a instanceof nh?nh:nu)(u-l);return d.set(a.subarray(l,u)),d},Ti=function(a,l,u){u<<=7&l;var d=l/8>>0;a[d]|=u,a[d+1]|=u>>>8},Ci=function(a,l,u){u<<=7&l;var d=l/8>>0;a[d]|=u,a[d+1]|=u>>>8,a[d+2]|=u>>>16},Mi=function(a,l){for(var u=[],d=0;d<a.length;++d)a[d]&&u.push({s:d,f:a[d]});var h=u.length,f=u.slice();if(!h)return[new nu(0),0];if(1==h){var p=new nu(u[0].s+1);return p[u[0].s]=1,[p,1]}u.sort(function(a,l){return a.f-l.f}),u.push({s:-1,f:25001});var g=u[0],m=u[1],v=0,_=1,T=2;for(u[0]={s:-1,f:g.f+m.f,l:g,r:m};_!=h-1;)g=u[u[v].f<u[T].f?v++:T++],m=u[v!=_&&u[v].f<u[T].f?v++:T++],u[_++]={s:-1,f:g.f+m.f,l:g,r:m};var C=f[0].s;for(d=1;d<h;++d)f[d].s>C&&(C=f[d].s);var R=new nd(C+1),B=$i(u[_-1],R,0);if(B>l){d=0;var V=0,er=B-l,en=1<<er;for(f.sort(function(a,l){return R[l.s]-R[a.s]||a.f-l.f});d<h;++d){var ei=f[d].s;if(!(R[ei]>l))break;V+=en-(1<<B-R[ei]),R[ei]=l}for(V>>>=er;V>0;){var es=f[d].s;R[es]<l?V-=1<<l-R[es]++-1:++d}for(;d>=0&&V;--d){var eo=f[d].s;R[eo]==l&&(--R[eo],++V)}B=l}return[new nu(R),B]},$i=function e(a,l,u){return -1==a.s?Math.max(e(a.l,l,u+1),e(a.r,l,u+1)):l[a.s]=u},Oi=function(a){for(var l=a.length;l&&!a[--l];);for(var u=new nd(++l),d=0,h=a[0],f=1,o=function(a){u[d++]=a},p=1;p<=l;++p)if(a[p]==h&&p!=l)++f;else{if(!h&&f>2){for(;f>138;f-=138)o(32754);f>2&&(o(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(o(h),--f;f>6;f-=6)o(8304);f>2&&(o(f-3<<5|8208),f=0)}for(;f--;)o(h);f=1,h=a[p]}return[u.subarray(0,d),l]},Ai=function(a,l){for(var u=0,d=0;d<l.length;++d)u+=a[d]*l[d];return u},Li=function(a,l,u){var d=u.length,h=Pi(l+2);a[h]=255&d,a[h+1]=d>>>8,a[h+2]=255^a[h],a[h+3]=255^a[h+1];for(var f=0;f<d;++f)a[h+f+4]=u[f];return 8*(h+4+d)},Di=function(a,l,u,d,h,f,p,g,m,v,_){Ti(l,_++,u),++h[256];for(var T=Mi(h,15),C=T[0],R=T[1],B=Mi(f,15),V=B[0],er=B[1],en=Oi(C),ei=en[0],es=en[1],eo=Oi(V),ea=eo[0],el=eo[1],ec=new nd(19),eu=0;eu<ei.length;++eu)ec[31&ei[eu]]++;for(eu=0;eu<ea.length;++eu)ec[31&ea[eu]]++;for(var ed=Mi(ec,7),eh=ed[0],ef=ed[1],ep=19;ep>4&&!eh[ng[ep-1]];--ep);var eg,em,ev,e_,ey=v+5<<3,eb=Ai(h,nE)+Ai(f,nk)+p,ew=Ai(h,C)+Ai(f,V)+p+14+3*ep+Ai(ec,eh)+(2*ec[16]+3*ec[17]+7*ec[18]);if(ey<=eb&&ey<=ew)return Li(l,_,a.subarray(m,m+v));if(Ti(l,_,1+(ew<eb)),_+=2,ew<eb){eg=Si(C,R,0),em=C,ev=Si(V,er,0),e_=V;var eS=Si(eh,ef,0);for(Ti(l,_,es-257),Ti(l,_+5,el-1),Ti(l,_+10,ep-4),_+=14,eu=0;eu<ep;++eu)Ti(l,_+3*eu,eh[ng[eu]]);_+=3*ep;for(var eE=[ei,ea],ek=0;ek<2;++ek){var eT=eE[ek];for(eu=0;eu<eT.length;++eu){var ex=31&eT[eu];Ti(l,_,eS[ex]),_+=eh[ex],ex>15&&(Ti(l,_,eT[eu]>>>5&127),_+=eT[eu]>>>12)}}}else eg=nT,em=nE,ev=nx,e_=nk;for(eu=0;eu<g;++eu)if(d[eu]>255){Ci(l,_,eg[(ex=d[eu]>>>18&31)+257]),_+=em[ex+257],ex>7&&(Ti(l,_,d[eu]>>>23&31),_+=nf[ex]);var eC=31&d[eu];Ci(l,_,ev[eC]),_+=e_[eC],eC>3&&(Ci(l,_,d[eu]>>>5&8191),_+=np[eC])}else Ci(l,_,eg[d[eu]]),_+=em[d[eu]];return Ci(l,_,eg[256]),_+em[256]},nC=new nh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nR=new nu(0),nI=function(){for(var a=new nh(256),l=0;l<256;++l){for(var u=l,d=9;--d;)u=(1&u&&3988292384)^u>>>1;a[l]=u}return a}(),Hi=function(){var a=4294967295;return{p:function(l){for(var u=a,d=0;d<l.length;++d)u=nI[255&u^l[d]]^u>>>8;a=u},d:function(){return 4294967295^a}}},ji=function(a,l,u){for(;u;++l)a[l]=u,u>>>=8},Wi=function(a,l){var u=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:9==l.level?2:0,a[9]=3,0!=l.mtime&&ji(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),u){a[3]=8;for(var d=0;d<=u.length;++d)a[d+10]=u.charCodeAt(d)}};function Vi(a,l){void 0===l&&(l={});var u,d,h,f=Hi(),p=a.length;f.p(a);var g=(d=l,h=10+((u=l).filename&&u.filename.length+1||0),function(a,l,u,d,h,f){var p=a.length,g=new nu(d+p+5*(1+Math.floor(p/7e3))+h),m=g.subarray(d,g.length-h),v=0;if(!l||p<8)for(var _=0;_<=p;_+=65535){var T=_+65535;T<p?v=Li(m,v,a.subarray(_,T)):(m[_]=f,v=Li(m,v,a.subarray(_,p)))}else{for(var C=nC[l-1],R=C>>>13,B=8191&C,V=(1<<u)-1,er=new nd(32768),en=new nd(V+1),ei=Math.ceil(u/3),es=2*ei,b=function(l){return(a[l]^a[l+1]<<ei^a[l+2]<<es)&V},eo=new nh(25e3),ea=new nd(288),el=new nd(32),ec=0,eu=0,ed=(_=0,0),eh=0,ef=0;_<p;++_){var ep=b(_),eg=32767&_,em=en[ep];if(er[eg]=em,en[ep]=eg,eh<=_){var ev=p-_;if((ec>7e3||ed>24576)&&ev>423){v=Di(a,m,0,eo,ea,el,eu,ed,ef,_-ef,v),ed=ec=eu=0,ef=_;for(var e_=0;e_<286;++e_)ea[e_]=0;for(e_=0;e_<30;++e_)el[e_]=0}var ey=2,eb=0,ew=B,eS=eg-em&32767;if(ev>2&&ep==b(_-eS))for(var eE=Math.min(R,ev)-1,ek=Math.min(32767,_),eT=Math.min(258,ev);eS<=ek&&--ew&&eg!=em;){if(a[_+ey]==a[_+ey-eS]){for(var ex=0;ex<eT&&a[_+ex]==a[_+ex-eS];++ex);if(ex>ey){if(ey=ex,eb=eS,ex>eE)break;var eC=Math.min(eS,ex-2),eR=0;for(e_=0;e_<eC;++e_){var eI=_-eS+e_+32768&32767,eA=eI-er[eI]+32768&32767;eA>eR&&(eR=eA,em=eI)}}}eS+=(eg=em)-(em=er[eg])+32768&32767}if(eb){eo[ed++]=268435456|n_[ey]<<18|ny[eb];var eO=31&n_[ey],eP=31&ny[eb];eu+=nf[eO]+np[eP],++ea[257+eO],++el[eP],eh=_+ey,++ec}else eo[ed++]=a[_],++ea[a[_]]}}v=Di(a,m,f,eo,ea,el,eu,ed,ef,_-ef,v),f||(v=Li(m,v,nR))}return Ri(g,0,d+Pi(v)+h)}(a,null==d.level?6:d.level,null==d.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+d.mem,h,8,!0)),m=g.length;return Wi(g,l),ji(g,m-8,f.d()),ji(g,m-4,p),g}function Gi(a,l){var u=a.length;if(!l&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(a);for(var d=new nu(a.length+(a.length>>>1)),h=0,s=function(a){d[h++]=a},f=0;f<u;++f){if(h+5>d.length){var p=new nu(h+8+(u-f<<1));p.set(d),d=p}var g=a.charCodeAt(f);g<128||l?s(g):(g<2048?s(192|g>>>6):(g>55295&&g<57344?(s(240|(g=65536+(1047552&g)|1023&a.charCodeAt(++f))>>>18),s(128|g>>>12&63)):s(224|g>>>12),s(128|g>>>6&63)),s(128|63&g))}return Ri(d,0,h)}var nA=[r5.MouseMove,r5.MouseInteraction,r5.Scroll,r5.ViewportResize,r5.Input,r5.TouchMove,r5.MediaInteraction,r5.Drag],Yi=function(a){return{rrwebMethod:a,enqueuedAt:Date.now(),attempt:1}},nO="[SessionRecording]";function Ki(a){return function(a,l){var u="";if(!l&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(a);for(var d=0;d<a.length;){var h=a[d++];h<128||l?u+=String.fromCharCode(h):h<224?u+=String.fromCharCode((31&h)<<6|63&a[d++]):h<240?u+=String.fromCharCode((15&h)<<12|(63&a[d++])<<6|63&a[d++]):u+=String.fromCharCode(55296|(h=((15&h)<<18|(63&a[d++])<<12|(63&a[d++])<<6|63&a[d++])-65536)>>10,56320|1023&h)}return u}(Vi(Gi(JSON.stringify(a))),!0)}function Zi(a){return a.type===r3.Custom&&"sessionIdle"===a.data.tag}var nP,nL,nM,nN=function(){function t(a){var l=this;if(L(this,t),q(this,"queuedRRWebEvents",[]),q(this,"isIdle",!1),q(this,"_linkedFlagSeen",!1),q(this,"_lastActivityTimestamp",Date.now()),q(this,"_linkedFlag",null),q(this,"_removePageViewCaptureHook",void 0),q(this,"_onSessionIdListener",void 0),q(this,"_persistDecideOnSessionListener",void 0),q(this,"_samplingSessionListener",void 0),q(this,"_forceAllowLocalhostNetworkCapture",!1),q(this,"_onBeforeUnload",function(){l._flushBuffer()}),q(this,"_onOffline",function(){l._tryAddCustomEvent("browser offline",{})}),q(this,"_onOnline",function(){l._tryAddCustomEvent("browser online",{})}),q(this,"_onVisibilityChange",function(){if(null!=e8&&e8.visibilityState){var a="window "+e8.visibilityState;l._tryAddCustomEvent(a,{})}}),this.instance=a,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,!this.instance.sessionManager)throw td.error(nO+" started without valid sessionManager"),Error(nO+" started without valid sessionManager. This is a bug.");var u=this.sessionManager.checkAndGetSessionAndWindowId(),d=u.sessionId,h=u.windowId;this.sessionId=d,this.windowId=h,this.buffer=this.clearBuffer(),this.sessionIdleThresholdMilliseconds>=this.sessionManager.sessionTimeoutMs&&td.warn(nO+" session_idle_threshold_ms (".concat(this.sessionIdleThresholdMilliseconds,") is greater than the session timeout (").concat(this.sessionManager.sessionTimeoutMs,"). Session will never be detected as idle"))}return N(t,[{key:"sessionIdleThresholdMilliseconds",get:function(){return this.instance.config.session_recording.session_idle_threshold_ms||3e5}},{key:"rrwebRecord",get:function(){var a,l;return null==tn||null===(a=tn.__PosthogExtensions__)||void 0===a||null===(l=a.rrweb)||void 0===l?void 0:l.record}},{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw Error(nO+" must be started with a valid sessionManager.");return this.instance.sessionManager}},{key:"fullSnapshotIntervalMillis",get:function(){var a;return(null===(a=this.instance.config.session_recording)||void 0===a?void 0:a.full_snapshot_interval_millis)||3e5}},{key:"isSampled",get:function(){var a=this.instance.get_property(tO);return P(a)?a:null}},{key:"sessionDuration",get:function(){var a,l,u=null===(a=this.buffer)||void 0===a?void 0:a.data[(null===(l=this.buffer)||void 0===l?void 0:l.data.length)-1],d=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return u?u.timestamp-d:null}},{key:"isRecordingEnabled",get:function(){var a=!!this.instance.get_property(tk),l=!this.instance.config.disable_session_recording;return e0&&a&&l}},{key:"isConsoleLogCaptureEnabled",get:function(){var a=!!this.instance.get_property(tT),l=this.instance.config.enable_recording_console_log;return null!=l?l:a}},{key:"canvasRecording",get:function(){var a=this.instance.get_property(tC);return a&&a.fps&&a.quality?{enabled:a.enabled,fps:a.fps,quality:a.quality}:void 0}},{key:"networkPayloadCapture",get:function(){var a,l,u=this.instance.get_property(tx),d={recordHeaders:null===(a=this.instance.config.session_recording)||void 0===a?void 0:a.recordHeaders,recordBody:null===(l=this.instance.config.session_recording)||void 0===l?void 0:l.recordBody},h=(null==d?void 0:d.recordHeaders)||(null==u?void 0:u.recordHeaders),f=(null==d?void 0:d.recordBody)||(null==u?void 0:u.recordBody),p=b(this.instance.config.capture_performance)?this.instance.config.capture_performance.network_timing:this.instance.config.capture_performance,g=!!(P(p)?p:null==u?void 0:u.capturePerformance);return h||f||g?{recordHeaders:h,recordBody:f,recordPerformance:g}:void 0}},{key:"sampleRate",get:function(){var a=this.instance.get_property(tR);return F(a)?a:null}},{key:"minimumDuration",get:function(){var a=this.instance.get_property(tI);return F(a)?a:null}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?I(this._linkedFlag)||this._linkedFlagSeen?P(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}},{key:"startIfEnabledOrStop",value:function(){var a=this;this.isRecordingEnabled?(this._startCapture(),null==e0||e0.addEventListener("beforeunload",this._onBeforeUnload),null==e0||e0.addEventListener("offline",this._onOffline),null==e0||e0.addEventListener("online",this._onOnline),null==e0||e0.addEventListener("visibilitychange",this._onVisibilityChange),this._setupSampling(),I(this._removePageViewCaptureHook)&&(this._removePageViewCaptureHook=this.instance._addCaptureHook(function(l){try{if("$pageview"===l){var u=e0?a._maskUrl(e0.location.href):"";if(!u)return;a._tryAddCustomEvent("$pageview",{href:u})}}catch(a){td.error("Could not add $pageview to rrweb session",a)}})),this._onSessionIdListener||(this._onSessionIdListener=this.sessionManager.onSessionId(function(l,u,d){d&&a._tryAddCustomEvent("$session_id_change",{sessionId:l,windowId:u,changeReason:d})}))):this.stopRecording()}},{key:"stopRecording",value:function(){var a,l,u;this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,null==e0||e0.removeEventListener("beforeunload",this._onBeforeUnload),null==e0||e0.removeEventListener("offline",this._onOffline),null==e0||e0.removeEventListener("online",this._onOnline),null==e0||e0.removeEventListener("visibilitychange",this._onVisibilityChange),this.clearBuffer(),clearInterval(this._fullSnapshotTimer),null===(a=this._removePageViewCaptureHook)||void 0===a||a.call(this),this._removePageViewCaptureHook=void 0,null===(l=this._onSessionIdListener)||void 0===l||l.call(this),this._onSessionIdListener=void 0,null===(u=this._samplingSessionListener)||void 0===u||u.call(this),this._samplingSessionListener=void 0,td.info(nO+" stopped"))}},{key:"makeSamplingDecision",value:function(a){var l,u,d=this.sessionId!==a,h=this.sampleRate;if(F(h)){var f,p=this.isSampled,g=d||!P(p);(f=g?Math.random()<h:p)||!g||td.warn(nO+" Sample rate (".concat(h,") has determined that this sessionId (").concat(a,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:h}),null===(u=this.instance.persistence)||void 0===u||u.register(q({},tO,f))}else null===(l=this.instance.persistence)||void 0===l||l.register(q({},tO,null))}},{key:"afterDecideResponse",value:function(a){var l,u,d,h=this;if(this._persistDecideResponse(a),this._linkedFlag=(null===(l=a.sessionRecording)||void 0===l?void 0:l.linkedFlag)||null,null!==(u=a.sessionRecording)&&void 0!==u&&u.endpoint&&(this._endpoint=null===(d=a.sessionRecording)||void 0===d?void 0:d.endpoint),this._setupSampling(),!I(this._linkedFlag)&&!this._linkedFlagSeen){var f=S(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,p=S(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(function(a,l){var u=b(l)&&f in l,d=p?l[f]===p:u;if(d){var g={linkedFlag:f,linkedVariant:p},m="linked flag matched";td.info(nO+" "+m,g),h._tryAddCustomEvent(m,g)}h._linkedFlagSeen=d})}this.receivedDecide=!0,this.startIfEnabledOrStop()}},{key:"_setupSampling",value:function(){var a=this;F(this.sampleRate)&&I(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(function(l){a.makeSamplingDecision(l)}))}},{key:"_persistDecideResponse",value:function(a){if(this.instance.persistence){var l,u=this.instance.persistence,i=function(){var l,d,h,f,p,g,m,v,_=null===(l=a.sessionRecording)||void 0===l?void 0:l.sampleRate,T=I(_)?null:parseFloat(_),C=null===(d=a.sessionRecording)||void 0===d?void 0:d.minimumDurationMilliseconds;u.register((q(v={},tk,!!a.sessionRecording),q(v,tT,null===(h=a.sessionRecording)||void 0===h?void 0:h.consoleLogRecordingEnabled),q(v,tx,O({capturePerformance:a.capturePerformance},null===(f=a.sessionRecording)||void 0===f?void 0:f.networkPayloadCapture)),q(v,tC,{enabled:null===(p=a.sessionRecording)||void 0===p?void 0:p.recordCanvas,fps:null===(g=a.sessionRecording)||void 0===g?void 0:g.canvasFps,quality:null===(m=a.sessionRecording)||void 0===m?void 0:m.canvasQuality}),q(v,tR,T),q(v,tI,w(C)?null:C),v))};i(),null===(l=this._persistDecideOnSessionListener)||void 0===l||l.call(this),this._persistDecideOnSessionListener=this.sessionManager.onSessionId(i)}}},{key:"log",value:function(a){var l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";null===(l=this.instance.sessionRecording)||void 0===l||l.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:u,trace:[],payload:[JSON.stringify(a)]}},timestamp:Date.now()})}},{key:"_startCapture",value:function(){var a,l,u=this;w(Object.assign)||this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut()||(this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():null===(a=tn.__PosthogExtensions__)||void 0===a||null===(l=a.loadExternalDependency)||void 0===l||l.call(a,this.instance,"recorder",function(a){if(a)return td.error(nO+" could not load recorder",a);u._onScriptLoaded()}))}},{key:"isInteractiveEvent",value:function(a){var l;return 3===a.type&&-1!==nA.indexOf(null===(l=a.data)||void 0===l?void 0:l.source)}},{key:"_updateWindowAndSessionIds",value:function(a){var l=this.isInteractiveEvent(a);l||this.isIdle||a.timestamp-this._lastActivityTimestamp>this.sessionIdleThresholdMilliseconds&&(this.isIdle=!0,clearInterval(this._fullSnapshotTimer),this._tryAddCustomEvent("sessionIdle",{eventTimestamp:a.timestamp,lastActivityTimestamp:this._lastActivityTimestamp,threshold:this.sessionIdleThresholdMilliseconds,bufferLength:this.buffer.data.length,bufferSize:this.buffer.size}),this._flushBuffer());var u=!1;if(l&&(this._lastActivityTimestamp=a.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:a.type}),u=!0)),!this.isIdle){var d=this.sessionManager.checkAndGetSessionAndWindowId(!l,a.timestamp),h=d.windowId,f=d.sessionId,p=this.sessionId!==f,g=this.windowId!==h;this.windowId=h,this.sessionId=f,p||g?(this.stopRecording(),this.startIfEnabledOrStop()):u&&this._scheduleFullSnapshot()}}},{key:"_tryRRWebMethod",value:function(a){try{return a.rrwebMethod(),!0}catch(l){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:a.enqueuedAt||Date.now(),attempt:a.attempt++,rrwebMethod:a.rrwebMethod}):td.warn(nO+" could not emit queued rrweb event.",l,a),!1}}},{key:"_tryAddCustomEvent",value:function(a,l){var u=this;return this._tryRRWebMethod(Yi(function(){return u.rrwebRecord.addCustomEvent(a,l)}))}},{key:"_tryTakeFullSnapshot",value:function(){var a=this;return this._tryRRWebMethod(Yi(function(){return a.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){for(var a,l=this,u={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},d=this.instance.config.session_recording,h=0,f=Object.entries(d||{});h<f.length;h++){var p=H(f[h],2),g=p[0],m=p[1];g in u&&("maskInputOptions"===g?u.maskInputOptions=O({password:!0},m):u[g]=m)}if(this.canvasRecording&&this.canvasRecording.enabled&&(u.recordCanvas=!0,u.sampling={canvas:this.canvasRecording.fps},u.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=null!==(a=this.mutationRateLimiter)&&void 0!==a?a:new nc(this.rrwebRecord,{onBlockedNode:function(a,u){var d="Too many mutations on node '".concat(a,"'. Rate limiting. This could be due to SVG animations or something similar");td.info(d,{node:u}),l.log(nO+" "+d,"warn")}});var v=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(O({emit:function(a){l.onRRwebEmit(a)},plugins:v},u)),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:u,activePlugins:v.map(function(a){return null==a?void 0:a.name})}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config}),td.info(nO+" started",{idleThreshold:this.sessionIdleThresholdMilliseconds,maxIdleTime:this.sessionManager.sessionTimeoutMs})}else td.error(nO+"onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_scheduleFullSnapshot",value:function(){var a=this;if(this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),!this.isIdle){var l=this.fullSnapshotIntervalMillis;l&&(this._fullSnapshotTimer=setInterval(function(){a._tryTakeFullSnapshot()},l))}}},{key:"_gatherRRWebPlugins",value:function(){var a,l,u,d,h=[],f=null===(a=tn.__PosthogExtensions__)||void 0===a||null===(l=a.rrwebPlugins)||void 0===l?void 0:l.getRecordConsolePlugin;f&&this.isConsoleLogCaptureEnabled&&h.push(f());var p=null===(u=tn.__PosthogExtensions__)||void 0===u||null===(d=u.rrwebPlugins)||void 0===d?void 0:d.getRecordNetworkPlugin;return this.networkPayloadCapture&&y(p)&&(!ro.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?h.push(p(ai(this.instance.config,this.networkPayloadCapture))):td.info(nO+" NetworkCapture not started because we are on localhost.")),h}},{key:"onRRwebEmit",value:function(a){var l;if(this._processQueuedEvents(),a&&b(a)){if(a.type===r3.Meta){var u=this._maskUrl(a.data.href);if(this._lastHref=u,!u)return;a.data.href=u}else this._pageViewFallBack();a.type===r3.FullSnapshot&&this._scheduleFullSnapshot();var d=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(a):a;if(d){var h=function(a){if(a&&b(a)&&6===a.type&&b(a.data)&&"rrweb/console@1"===a.data.plugin){a.data.payload.payload.length>10&&(a.data.payload.payload=a.data.payload.payload.slice(0,10),a.data.payload.payload.push("...[truncated]"));for(var l=[],u=0;u<a.data.payload.payload.length;u++)a.data.payload.payload[u]&&a.data.payload.payload[u].length>2e3?l.push(a.data.payload.payload[u].slice(0,2e3)+"...[truncated]"):l.push(a.data.payload.payload[u]);return a.data.payload.payload=l,a}return a}(d);if(this._updateWindowAndSessionIds(h),!this.isIdle||Zi(h)){if(Zi(h)){var f=h.data.payload;if(f){var p=f.lastActivityTimestamp,g=f.threshold;h.timestamp=p+g}}var m=null===(l=this.instance.config.session_recording.compress_events)||void 0===l||l?function(a,l){if(1024>wn(a))return a;try{if(a.type===r3.FullSnapshot)return O(O({},a),{},{data:Ki(a.data),cv:"2024-10"});if(a.type===r3.IncrementalSnapshot&&a.data.source===r5.Mutation)return O(O({},a),{},{cv:"2024-10",data:O(O({},a.data),{},{texts:Ki(a.data.texts),attributes:Ki(a.data.attributes),removes:Ki(a.data.removes),adds:Ki(a.data.adds)})});if(a.type===r3.IncrementalSnapshot&&a.data.source===r5.StyleSheetRule)return O(O({},a),{},{cv:"2024-10",data:O(O({},a.data),{},{adds:Ki(a.data.adds),removes:Ki(a.data.removes)})})}catch(u){td.error(nO+" could not compress event",u),l.captureException(u||"e was not an error",{attempted_event_type:(null==a?void 0:a.type)||"no event type"})}return a}(h,this.instance):h,v={$snapshot_bytes:wn(m),$snapshot_data:m,$session_id:this.sessionId,$window_id:this.windowId};"disabled"!==this.status?this._captureSnapshotBuffered(v):this.clearBuffer()}}}}},{key:"_pageViewFallBack",value:function(){if(!this.instance.config.capture_pageview&&e0){var a=this._maskUrl(e0.location.href);this._lastHref!==a&&(this._tryAddCustomEvent("$url_changed",{href:a}),this._lastHref=a)}}},{key:"_processQueuedEvents",value:function(){var a=this;if(this.queuedRRWebEvents.length){var l=U(this.queuedRRWebEvents);this.queuedRRWebEvents=[],l.forEach(function(l){Date.now()-l.enqueuedAt<=2e3&&a._tryRRWebMethod(l)})}}},{key:"_maskUrl",value:function(a){var l=this.instance.config.session_recording;if(l.maskNetworkRequestFn){var u,d={url:a};return null===(u=d=l.maskNetworkRequestFn(d))||void 0===u?void 0:u.url}return a}},{key:"clearBuffer",value:function(){return this.buffer={size:0,data:[],sessionId:this.sessionId,windowId:this.windowId},this.buffer}},{key:"_flushBuffer",value:function(){var a=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var l=this.minimumDuration,u=this.sessionDuration,d=F(u)&&u>=0,h=F(l)&&d&&u<l;return"buffering"===this.status||h?(this.flushBufferTimer=setTimeout(function(){a._flushBuffer()},2e3),this.buffer):(this.buffer.data.length>0&&(function Sn(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6606028.8;if(a.size>=l&&a.data.length>1){var u=Math.floor(a.data.length/2),d=a.data.slice(0,u),h=a.data.slice(u);return[Sn({size:wn(d),data:d,sessionId:a.sessionId,windowId:a.windowId}),Sn({size:wn(h),data:h,sessionId:a.sessionId,windowId:a.windowId})].flatMap(function(a){return a})}return[a]})(this.buffer).forEach(function(l){a._captureSnapshot({$snapshot_bytes:l.size,$snapshot_data:l.data,$session_id:l.sessionId,$window_id:l.windowId})}),this.clearBuffer())}},{key:"_captureSnapshotBuffered",value:function(a){var l,u=this,d=2+((null===(l=this.buffer)||void 0===l?void 0:l.data.length)||0);!this.isIdle&&(this.buffer.size+a.$snapshot_bytes+d>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=a.$snapshot_bytes,this.buffer.data.push(a.$snapshot_data),this.flushBufferTimer||this.isIdle||(this.flushBufferTimer=setTimeout(function(){u._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(a){this.instance.capture("$snapshot",a,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}},{key:"overrideLinkedFlag",value:function(){this._linkedFlagSeen=!0}}]),t}(),nF=function(){function e(a){L(this,e),this.instance=a,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return N(e,[{key:"call",value:function(){var a=this,l={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(tM),group_properties:this.instance.get_property(tN),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:l,compression:this.instance.config.disable_compression?void 0:tf.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(l){return a.parseDecideResponse(l.json)}})}},{key:"parseDecideResponse",value:function(a){var l=this;this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();var u=!a;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(null!=a?a:{},u),u)td.error("Failed to fetch feature flags from PostHog.");else{if(!e8||!e8.body)return td.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){l.parseDecideResponse(a)},500);if(this.instance._afterDecideResponse(a),a.siteApps){if(this.instance.config.opt_in_site_apps){var d,h=z(a.siteApps);try{for(h.s();!(d=h.n()).done;)(function(){var a,u,h=d.value,f=h.id,p=h.url;tn["__$$ph_site_app_".concat(f)]=l.instance,null===(a=tn.__PosthogExtensions__)||void 0===a||null===(u=a.loadSiteApp)||void 0===u||u.call(a,l.instance,p,function(a){if(a)return td.error("Error while initializing PostHog app with config id ".concat(f),a)})})()}catch(a){h.e(a)}finally{h.f()}}else a.siteApps.length>0&&td.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}}]),e}(),nD=null!=e0&&e0.location?bt(e0.location.hash,"__posthog")||bt(location.hash,"state"):null,nj="_postHogToolbarParams";(nz=nM||(nM={}))[nz.UNINITIALIZED=0]="UNINITIALIZED",nz[nz.LOADING=1]="LOADING",nz[nz.LOADED=2]="LOADED";var nB=function(){function t(a){L(this,t),this.instance=a}return N(t,[{key:"setToolbarState",value:function(a){tn.ph_toolbar_state=a}},{key:"getToolbarState",value:function(){var a;return null!==(a=tn.ph_toolbar_state)&&void 0!==a?a:nM.UNINITIALIZED}},{key:"maybeLoadToolbar",value:function(){var a,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e0||!e8)return!1;u=null!==(a=u)&&void 0!==a?a:e0.location,h=null!==(l=h)&&void 0!==l?l:e0.history;try{if(!d){try{e0.localStorage.setItem("test","test"),e0.localStorage.removeItem("test")}catch(a){return!1}d=null==e0?void 0:e0.localStorage}var f,p=nD||bt(u.hash,"__posthog")||bt(u.hash,"state"),g=p?Z(function(){return JSON.parse(atob(decodeURIComponent(p)))})||Z(function(){return JSON.parse(decodeURIComponent(p))}):null;return g&&"ph_authorize"===g.action?((f=g).source="url",f&&Object.keys(f).length>0&&(g.desiredHash?u.hash=g.desiredHash:h?h.replaceState(h.state,"",u.pathname+u.search):u.hash="")):((f=JSON.parse(d.getItem(nj)||"{}")).source="localstorage",delete f.userIntent),!(!f.token||this.instance.config.token!==f.token)&&(this.loadToolbar(f),!0)}catch(a){return!1}}},{key:"_callLoadToolbar",value:function(a){(tn.ph_load_toolbar||tn.ph_load_editor)(a,this.instance)}},{key:"loadToolbar",value:function(a){var l,u,d=this,h=!(null==e8||!e8.getElementById(tV));if(!e0||h)return!1;var f="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,p=O(O({token:this.instance.config.token},a),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},f?{instrument:!1}:{});return(e0.localStorage.setItem(nj,JSON.stringify(O(O({},p),{},{source:void 0}))),this.getToolbarState()===nM.LOADED)?this._callLoadToolbar(p):this.getToolbarState()===nM.UNINITIALIZED&&(this.setToolbarState(nM.LOADING),null===(l=tn.__PosthogExtensions__)||void 0===l||null===(u=l.loadExternalDependency)||void 0===u||u.call(l,this.instance,"toolbar",function(a){if(a)return td.error("Failed to load toolbar",a),void d.setToolbarState(nM.UNINITIALIZED);d.setToolbarState(nM.LOADED),d._callLoadToolbar(p)}),tp(e0,"turbolinks:load",function(){d.setToolbarState(nM.UNINITIALIZED),d.loadToolbar(p)})),!0}},{key:"_loadEditor",value:function(a){return this.loadToolbar(a)}},{key:"maybeLoadEditor",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this.maybeLoadToolbar(a,l,u)}}]),t}(),n$=function(){function e(a){L(this,e),q(this,"isPaused",!0),q(this,"queue",[]),q(this,"flushTimeoutMs",3e3),this.sendRequest=a}return N(e,[{key:"enqueue",value:function(a){this.queue.push(a),this.flushTimeout||this.setFlushTimeout()}},{key:"unload",value:function(){var a=this;this.clearFlushTimeout();var l=Object.values(this.queue.length>0?this.formatQueue():{});[].concat(U(l.filter(function(a){return 0===a.url.indexOf("/e")})),U(l.filter(function(a){return 0!==a.url.indexOf("/e")}))).map(function(l){a.sendRequest(O(O({},l),{},{transport:"sendBeacon"}))})}},{key:"enable",value:function(){this.isPaused=!1,this.setFlushTimeout()}},{key:"setFlushTimeout",value:function(){var a=this;this.isPaused||(this.flushTimeout=setTimeout(function(){if(a.clearFlushTimeout(),a.queue.length>0){var l=a.formatQueue();for(var u in l)(function(u){var d=l[u],h=(new Date).getTime();d.data&&tc(d.data)&&J(d.data,function(a){a.offset=Math.abs(a.timestamp-h),delete a.timestamp}),a.sendRequest(d)})(u)}},this.flushTimeoutMs))}},{key:"clearFlushTimeout",value:function(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}},{key:"formatQueue",value:function(){var a={};return J(this.queue,function(l){var u,d=(l?l.batchKey:null)||l.url;w(a[d])&&(a[d]=O(O({},l),{},{data:[]})),null===(u=a[d].data)||void 0===u||u.push(l.data)}),this.queue=[],a}}]),e}(),nU=!!e7||!!e9,nH="text/plain",lr=function(a,l){var u=H(a.split("?"),2),d=u[0],h=u[1],f=O({},l);null==h||h.split("&").forEach(function(a){var l=H(a.split("="),1)[0];delete f[l]});var p=mt(f);return p=p?(h?h+"&":"")+p:h,"".concat(d,"?").concat(p)},cr=function(a){var l=a.data,u=a.compression;if(l){if(u===tf.GZipJS){var d=Vi(Gi(JSON.stringify(l)),{mtime:0}),h=new Blob([d],{type:nH});return{contentType:nH,body:h,estimatedSize:h.size}}if(u===tf.Base64){var f,p="data="+encodeURIComponent("string"==typeof(f=function(a){var l,u,d,h,f,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g=0,m=0,v="",_=[];if(!a)return a;a=se(a);do l=(f=a.charCodeAt(g++)<<16|a.charCodeAt(g++)<<8|a.charCodeAt(g++))>>18&63,u=f>>12&63,d=f>>6&63,h=63&f,_[m++]=p.charAt(l)+p.charAt(u)+p.charAt(d)+p.charAt(h);while(g<a.length);switch(v=_.join(""),a.length%3){case 1:v=v.slice(0,-2)+"==";break;case 2:v=v.slice(0,-1)+"="}return v}(JSON.stringify(l)))?f:JSON.stringify(f));return{contentType:"application/x-www-form-urlencoded",body:p,estimatedSize:new Blob([p]).size}}var g=JSON.stringify(l);return{contentType:"application/json",body:g,estimatedSize:new Blob([g]).size}}},nq=[];e7&&nq.push({transport:"XHR",method:function(a){var l,u=new e7;u.open(a.method||"GET",a.url,!0);var d=null!==(l=cr(a))&&void 0!==l?l:{},h=d.contentType,f=d.body;J(a.headers,function(a,l){u.setRequestHeader(l,a)}),h&&u.setRequestHeader("Content-Type",h),a.timeout&&(u.timeout=a.timeout),u.withCredentials=!0,u.onreadystatechange=function(){if(4===u.readyState){var l,d={statusCode:u.status,text:u.responseText};if(200===u.status)try{d.json=JSON.parse(u.responseText)}catch(a){}null===(l=a.callback)||void 0===l||l.call(a,d)}},u.send(f)}}),e9&&nq.push({transport:"fetch",method:function(a){var l,u,d=null!==(l=cr(a))&&void 0!==l?l:{},h=d.contentType,f=d.body,p=d.estimatedSize,g=new Headers;J(a.headers,function(a,l){g.append(l,a)}),h&&g.append("Content-Type",h);var m=a.url,v=null;if(tt){var _=new tt;v={signal:_.signal,timeout:setTimeout(function(){return _.abort()},a.timeout)}}e9(m,{method:(null==a?void 0:a.method)||"GET",headers:g,keepalive:"POST"===a.method&&65536>(p||0),body:f,signal:null===(u=v)||void 0===u?void 0:u.signal}).then(function(l){return l.text().then(function(u){var d,h={statusCode:l.status,text:u};if(200===l.status)try{h.json=JSON.parse(u)}catch(a){td.error(a)}null===(d=a.callback)||void 0===d||d.call(a,h)})}).catch(function(l){var u;td.error(l),null===(u=a.callback)||void 0===u||u.call(a,{statusCode:0,text:l})}).finally(function(){return v?clearTimeout(v.timeout):null})}}),null!=e6&&e6.sendBeacon&&nq.push({transport:"sendBeacon",method:function(a){var l=lr(a.url,{beacon:"1"});try{var u,d=null!==(u=cr(a))&&void 0!==u?u:{},h=d.contentType,f=d.body,p="string"==typeof f?new Blob([f],{type:h}):f;e6.sendBeacon(l,p)}catch(a){}}});var nz,nW,nV=["retriesPerformedSoFar"],nG=function(){function t(a){var l=this;L(this,t),q(this,"isPolling",!1),q(this,"pollIntervalMs",3e3),q(this,"queue",[]),this.instance=a,this.queue=[],this.areWeOnline=!0,!w(e0)&&"onLine"in e0.navigator&&(this.areWeOnline=e0.navigator.onLine,e0.addEventListener("online",function(){l.areWeOnline=!0,l.flush()}),e0.addEventListener("offline",function(){l.areWeOnline=!1}))}return N(t,[{key:"retriableRequest",value:function(a){var l=this,u=a.retriesPerformedSoFar,d=function(a,l){if(null==a)return{};var u,d,h=function(a,l){if(null==a)return{};var u,d,h={},f=Object.keys(a);for(d=0;d<f.length;d++)u=f[d],l.indexOf(u)>=0||(h[u]=a[u]);return h}(a,l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)u=f[d],l.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(a,u)&&(h[u]=a[u])}return h}(a,nV);F(u)&&u>0&&(d.url=lr(d.url,{retry_count:u})),this.instance._send_request(O(O({},d),{},{callback:function(a){var h;200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&(null!=u?u:0)<10?l.enqueue(O({retriesPerformedSoFar:u},d)):null===(h=d.callback)||void 0===h||h.call(d,a)}}))}},{key:"enqueue",value:function(a){var l,u,d,h=a.retriesPerformedSoFar||0;a.retriesPerformedSoFar=h+1;var f=(d=(Math.random()-.5)*((u=Math.min(18e5,l=3e3*Math.pow(2,h)))-l/2),Math.ceil(u+d)),p=Date.now()+f;this.queue.push({retryAt:p,requestOptions:a});var g="Enqueued failed request for retry in ".concat(f);navigator.onLine||(g+=" (Browser is offline)"),td.warn(g),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var a=this;this.poller&&clearTimeout(this.poller),this.poller=setTimeout(function(){a.areWeOnline&&a.queue.length>0&&a.flush(),a.poll()},this.pollIntervalMs)}},{key:"flush",value:function(){var a=Date.now(),l=[],u=this.queue.filter(function(u){return u.retryAt<a||(l.push(u),!1)});if(this.queue=l,u.length>0){var d,h=z(u);try{for(h.s();!(d=h.n()).done;){var f=d.value.requestOptions;this.retriableRequest(f)}}catch(a){h.e(a)}finally{h.f()}}}},{key:"unload",value:function(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);var a,l=z(this.queue);try{for(l.s();!(a=l.n()).done;){var u=a.value.requestOptions;try{this.instance._send_request(O(O({},u),{},{transport:"sendBeacon"}))}catch(a){td.error(a)}}}catch(a){l.e(a)}finally{l.f()}this.queue=[]}}]),t}(),nJ=function(){function t(a,l,u,d){L(this,t),q(this,"_sessionIdChangedHandlers",[]),this.config=a,this.persistence=l,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=u||Ze,this._windowIdGenerator=d||Ze;var h,f=a.persistence_name||a.token,p=a.session_idle_timeout_seconds||1800;if(F(p)?p>1800?td.warn("session_idle_timeout_seconds cannot be  greater than 30 minutes. Using 30 minutes instead."):p<60&&td.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(td.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),p=1800),this._sessionTimeoutMs=1e3*Math.min(Math.max(p,60),1800),this._window_id_storage_key="ph_"+f+"_window_id",this._primary_window_exists_storage_key="ph_"+f+"_primary_window_exists",this._canUseSessionStorage()){var g=rs.parse(this._window_id_storage_key),m=rs.parse(this._primary_window_exists_storage_key);g&&!m?this._windowId=g:rs.remove(this._window_id_storage_key),rs.set(this._primary_window_exists_storage_key,!0)}if(null!==(h=this.config.bootstrap)&&void 0!==h&&h.sessionID)try{var v=function(a){var l=a.replace(/-/g,"");if(32!==l.length)throw Error("Not a valid UUID");if("7"!==l[12])throw Error("Not a UUIDv7");return parseInt(l.substring(0,12),16)}(this.config.bootstrap.sessionID);this._setSessionId(this.config.bootstrap.sessionID,(new Date).getTime(),v)}catch(a){td.error("Invalid sessionID in bootstrap",a)}this._listenToReloadWindow()}return N(t,[{key:"sessionTimeoutMs",get:function(){return this._sessionTimeoutMs}},{key:"onSessionId",value:function(a){var l=this;return w(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(a),this._sessionId&&a(this._sessionId,this._windowId),function(){l._sessionIdChangedHandlers=l._sessionIdChangedHandlers.filter(function(l){return l!==a})}}},{key:"_canUseSessionStorage",value:function(){return"memory"!==this.config.persistence&&!this.persistence.disabled&&rs.is_supported()}},{key:"_setWindowId",value:function(a){a!==this._windowId&&(this._windowId=a,this._canUseSessionStorage()&&rs.set(this._window_id_storage_key,a))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?rs.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(a,l,u){a===this._sessionId&&l===this._sessionActivityTimestamp&&u===this._sessionStartTimestamp||(this._sessionStartTimestamp=u,this._sessionActivityTimestamp=l,this._sessionId=a,this.persistence.register(q({},tA,[l,a,u])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var a=this.persistence.props[tA];return tc(a)&&2===a.length&&a.push(a[0]),a||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var a=this;null==e0||e0.addEventListener("beforeunload",function(){a._canUseSessionStorage()&&rs.remove(a._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||(new Date).getTime(),u=H(this._getSessionId(),3),d=u[0],h=u[1],f=u[2],p=this._getWindowId(),g=F(f)&&f>0&&Math.abs(l-f)>864e5,m=!1,v=!h,_=!a&&Math.abs(l-d)>this.sessionTimeoutMs;v||_||g?(h=this._sessionIdGenerator(),p=this._windowIdGenerator(),td.info("[SessionId] new session ID generated",{sessionId:h,windowId:p,changeReason:{noSessionId:v,activityTimeout:_,sessionPastMaximumLength:g}}),f=l,m=!0):p||(p=this._windowIdGenerator(),m=!0);var T=0===d||!a||g?l:d,C=0===f?(new Date).getTime():f;return this._setWindowId(p),this._setSessionId(h,T,C),m&&this._sessionIdChangedHandlers.forEach(function(a){return a(h,p,m?{noSessionId:v,activityTimeout:_,sessionPastMaximumLength:g}:void 0)}),{sessionId:h,windowId:p,sessionStartTimestamp:C,changeReason:m?{noSessionId:v,activityTimeout:_,sessionPastMaximumLength:g}:void 0}}}]),t}();(nZ=nW||(nW={})).US="us",nZ.EU="eu",nZ.CUSTOM="custom";var nK="i.posthog.com",nX=function(){function e(a){L(this,e),q(this,"_regionCache",{}),this.instance=a}return N(e,[{key:"apiHost",get:function(){var a=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===a?"https://us.i.posthog.com":a}},{key:"uiHost",get:function(){var a,l=null===(a=this.instance.config.ui_host)||void 0===a?void 0:a.replace(/\/$/,"");return l||(l=this.apiHost.replace(".".concat(nK),".posthog.com")),"https://app.posthog.com"===l?"https://us.posthog.com":l}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=nW.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=nW.EU:this._regionCache[this.apiHost]=nW.CUSTOM),this._regionCache[this.apiHost]}},{key:"endpointFor",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(l&&(l="/"===l[0]?l:"/".concat(l)),"ui"===a)return this.uiHost+l;if(this.region===nW.CUSTOM)return this.apiHost+l;var u=nK+l;switch(a){case"assets":return"https://".concat(this.region,"-assets.").concat(u);case"api":return"https://".concat(this.region,".").concat(u)}}}]),e}(),nY="posthog-js";function br(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=l.organization,d=l.projectId,h=l.prefix,f=l.severityAllowList,p=void 0===f?["error"]:f;return function(l){if(!("*"===p||p.includes(l.level))||!a.__loaded)return l;l.tags||(l.tags={});var f,g,m,v,_,T=a.requestRouter.endpointFor("ui","/project/".concat(a.config.token,"/person/").concat(a.get_distinct_id()));l.tags["PostHog Person URL"]=T,a.sessionRecordingStarted()&&(l.tags["PostHog Recording URL"]=a.get_session_replay_url({withTimestamp:!0}));var C=(null===(f=l.exception)||void 0===f?void 0:f.values)||[],R={$exception_message:(null===(g=C[0])||void 0===g?void 0:g.value)||l.message,$exception_type:null===(m=C[0])||void 0===m?void 0:m.type,$exception_personURL:T,$exception_level:l.level,$sentry_event_id:l.event_id,$sentry_exception:l.exception,$sentry_exception_message:(null===(v=C[0])||void 0===v?void 0:v.value)||l.message,$sentry_exception_type:null===(_=C[0])||void 0===_?void 0:_.type,$sentry_tags:l.tags,$level:l.level};return u&&d&&(R.$sentry_url=(h||"https://sentry.io/organizations/")+u+"/issues/?project="+d+"&query="+l.event_id),a.exceptions.sendExceptionEvent(R),l}}var nZ,nQ,n0,n1,n2=N(function e(a,l,u,d,h){L(this,e),this.name=nY,this.setupOnce=function(f){f(br(a,{organization:l,projectId:u,prefix:d,severityAllowList:h}))}}),n3=function(){function t(a){L(this,t),this._instance=a}return N(t,[{key:"doPageView",value:function(a){var l,u=this._previousPageViewProperties(a);return this._currentPath=null!==(l=null==e0?void 0:e0.location.pathname)&&void 0!==l?l:"",this._instance.scrollManager.resetContext(),this._prevPageviewTimestamp=a,u}},{key:"doPageLeave",value:function(a){return this._previousPageViewProperties(a)}},{key:"_previousPageViewProperties",value:function(a){var l=this._currentPath,u=this._prevPageviewTimestamp,d=this._instance.scrollManager.getContext();if(!u)return{};var h={};if(d){var f=d.maxScrollHeight,p=d.lastScrollY,g=d.maxScrollY,m=d.maxContentHeight,v=d.lastContentY,_=d.maxContentY;w(f)||w(p)||w(g)||w(m)||w(v)||w(_)||(f=Math.ceil(f),p=Math.ceil(p),g=Math.ceil(g),m=Math.ceil(m),v=Math.ceil(v),_=Math.ceil(_),h={$prev_pageview_last_scroll:p,$prev_pageview_last_scroll_percentage:f<=1?1:Fr(p/f,0,1),$prev_pageview_max_scroll:g,$prev_pageview_max_scroll_percentage:f<=1?1:Fr(g/f,0,1),$prev_pageview_last_content:v,$prev_pageview_last_content_percentage:m<=1?1:Fr(v/m,0,1),$prev_pageview_max_content:_,$prev_pageview_max_content_percentage:m<=1?1:Fr(_/m,0,1)})}return l&&(h.$prev_pageview_pathname=l),u&&(h.$prev_pageview_duration=(a.getTime()-u.getTime())/1e3),h}}]),t}();function Fr(a,l,u){return Math.max(l,Math.min(a,u))}(il=nQ||(nQ={})).Popover="popover",il.API="api",il.Widget="widget",(ic=n0||(n0={})).Open="open",ic.MultipleChoice="multiple_choice",ic.SingleChoice="single_choice",ic.Rating="rating",ic.Link="link",(iu=n1||(n1={})).NextQuestion="next_question",iu.End="end",iu.ResponseBased="response_based",iu.SpecificQuestion="specific_question";var n5=function(){function e(){L(this,e),q(this,"events",{}),this.events={}}return N(e,[{key:"on",value:function(a,l){var u=this;return this.events[a]||(this.events[a]=[]),this.events[a].push(l),function(){u.events[a]=u.events[a].filter(function(a){return a!==l})}}},{key:"emit",value:function(a,l){var u,d=z(this.events[a]||[]);try{for(d.s();!(u=d.n()).done;)(0,u.value)(l)}catch(a){d.e(a)}finally{d.f()}var h,f=z(this.events["*"]||[]);try{for(f.s();!(h=f.n()).done;)(0,h.value)(a,l)}catch(a){f.e(a)}finally{f.f()}}}]),e}(),n6=function(){function t(a){var l=this;L(this,t),q(this,"_debugEventEmitter",new n5),q(this,"checkStep",function(a,u){return l.checkStepEvent(a,u)&&l.checkStepUrl(a,u)&&l.checkStepElement(a,u)}),q(this,"checkStepEvent",function(a,l){return null==l||!l.event||(null==a?void 0:a.event)===(null==l?void 0:l.event)}),this.instance=a,this.actionEvents=new Set,this.actionRegistry=new Set}return N(t,[{key:"init",value:function(){var a,l,u=this;w(null===(l=this.instance)||void 0===l?void 0:l._addCaptureHook)||null===(a=this.instance)||void 0===a||a._addCaptureHook(function(a,l){u.on(a,l)})}},{key:"register",value:function(a){var l,u,d=this;if(!w(null===(l=this.instance)||void 0===l?void 0:l._addCaptureHook)&&(a.forEach(function(a){var l,u;null===(l=d.actionRegistry)||void 0===l||l.add(a),null===(u=a.steps)||void 0===u||u.forEach(function(a){var l;null===(l=d.actionEvents)||void 0===l||l.add((null==a?void 0:a.event)||"")})}),null!==(u=this.instance)&&void 0!==u&&u.autocapture)){var h,f=new Set;a.forEach(function(a){var l;null===(l=a.steps)||void 0===l||l.forEach(function(a){null!=a&&a.selector&&f.add(null==a?void 0:a.selector)})}),null===(h=this.instance)||void 0===h||h.autocapture.setElementSelectors(f)}}},{key:"on",value:function(a,l){var u,d=this;null!=l&&0!=a.length&&(this.actionEvents.has(a)||this.actionEvents.has(null==l?void 0:l.event))&&this.actionRegistry&&(null===(u=this.actionRegistry)||void 0===u?void 0:u.size)>0&&this.actionRegistry.forEach(function(a){d.checkAction(l,a)&&d._debugEventEmitter.emit("actionCaptured",a.name)})}},{key:"_addActionHook",value:function(a){this.onAction("actionCaptured",function(l){return a(l)})}},{key:"checkAction",value:function(a,l){if(null==(null==l?void 0:l.steps))return!1;var u,d=z(l.steps);try{for(d.s();!(u=d.n()).done;){var h=u.value;if(this.checkStep(a,h))return!0}}catch(a){d.e(a)}finally{d.f()}return!1}},{key:"onAction",value:function(a,l){return this._debugEventEmitter.on(a,l)}},{key:"checkStepUrl",value:function(a,l){if(null!=l&&l.url){var u,d=null==a||null===(u=a.properties)||void 0===u?void 0:u.$current_url;if(!d||"string"!=typeof d||!t.matchString(d,null==l?void 0:l.url,(null==l?void 0:l.url_matching)||"contains"))return!1}return!0}},{key:"checkStepElement",value:function(a,l){if((null!=l&&l.href||null!=l&&l.tag_name||null!=l&&l.text)&&!this.getElementsList(a).some(function(a){return!(null!=l&&l.href&&!t.matchString(a.href||"",null==l?void 0:l.href,(null==l?void 0:l.href_matching)||"exact"))&&(null==l||!l.tag_name||a.tag_name===(null==l?void 0:l.tag_name))&&!(null!=l&&l.text&&!t.matchString(a.text||"",null==l?void 0:l.text,(null==l?void 0:l.text_matching)||"exact")&&!t.matchString(a.$el_text||"",null==l?void 0:l.text,(null==l?void 0:l.text_matching)||"exact"))}))return!1;if(null!=l&&l.selector){var u,d=null==a||null===(u=a.properties)||void 0===u?void 0:u.$element_selectors;if(!d||!d.includes(null==l?void 0:l.selector))return!1}return!0}},{key:"getElementsList",value:function(a){return null==(null==a?void 0:a.properties.$elements)?[]:null==a?void 0:a.properties.$elements}}],[{key:"matchString",value:function(a,l,u){switch(u){case"regex":return!!e0&&_t(a,l);case"exact":return l===a;case"contains":return _t(a,t.escapeStringRegexp(l).replace(/_/g,".").replace(/%/g,".*"));default:return!1}}},{key:"escapeStringRegexp",value:function(a){return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}}]),t}(),n8=function(){function e(a){L(this,e),this.instance=a,this.eventToSurveys=new Map,this.actionToSurveys=new Map}return N(e,[{key:"register",value:function(a){var l;w(null===(l=this.instance)||void 0===l?void 0:l._addCaptureHook)||(this.setupEventBasedSurveys(a),this.setupActionBasedSurveys(a))}},{key:"setupActionBasedSurveys",value:function(a){var l=this,u=a.filter(function(a){var l,u,d,h;return(null===(l=a.conditions)||void 0===l?void 0:l.actions)&&(null===(u=a.conditions)||void 0===u||null===(d=u.actions)||void 0===d||null===(h=d.values)||void 0===h?void 0:h.length)>0});0!==u.length&&(null==this.actionMatcher&&(this.actionMatcher=new n6(this.instance),this.actionMatcher.init(),this.actionMatcher._addActionHook(function(a){l.onAction(a)})),u.forEach(function(a){var u,d,h,f,p,g,m,v,_,T;a.conditions&&null!==(u=a.conditions)&&void 0!==u&&u.actions&&null!==(d=a.conditions)&&void 0!==d&&null!==(h=d.actions)&&void 0!==h&&h.values&&(null===(f=a.conditions)||void 0===f||null===(p=f.actions)||void 0===p||null===(g=p.values)||void 0===g?void 0:g.length)>0&&(null===(m=l.actionMatcher)||void 0===m||m.register(a.conditions.actions.values),null===(v=a.conditions)||void 0===v||null===(_=v.actions)||void 0===_||null===(T=_.values)||void 0===T||T.forEach(function(u){if(u&&u.name){var d=l.actionToSurveys.get(u.name);d&&d.push(a.id),l.actionToSurveys.set(u.name,d||[a.id])}}))}))}},{key:"setupEventBasedSurveys",value:function(a){var l,u=this;0!==a.filter(function(a){var l,u,d,h;return(null===(l=a.conditions)||void 0===l?void 0:l.events)&&(null===(u=a.conditions)||void 0===u||null===(d=u.events)||void 0===d||null===(h=d.values)||void 0===h?void 0:h.length)>0}).length&&(null===(l=this.instance)||void 0===l||l._addCaptureHook(function(a,l){u.onEvent(a,l)}),a.forEach(function(a){var l,d,h;null===(l=a.conditions)||void 0===l||null===(d=l.events)||void 0===d||null===(h=d.values)||void 0===h||h.forEach(function(l){if(l&&l.name){var d=u.eventToSurveys.get(l.name);d&&d.push(a.id),u.eventToSurveys.set(l.name,d||[a.id])}})}))}},{key:"onEvent",value:function(a,l){var u,d,h=(null===(u=this.instance)||void 0===u||null===(d=u.persistence)||void 0===d?void 0:d.props[tD])||[];if(e.SURVEY_SHOWN_EVENT_NAME==a&&l&&h.length>0){var f,p=null==l||null===(f=l.properties)||void 0===f?void 0:f.$survey_id;if(p){var g=h.indexOf(p);g>=0&&(h.splice(g,1),this._updateActivatedSurveys(h))}}else this.eventToSurveys.has(a)&&this._updateActivatedSurveys(h.concat(this.eventToSurveys.get(a)||[]))}},{key:"onAction",value:function(a){var l,u,d=(null===(l=this.instance)||void 0===l||null===(u=l.persistence)||void 0===u?void 0:u.props[tD])||[];this.actionToSurveys.has(a)&&this._updateActivatedSurveys(d.concat(this.actionToSurveys.get(a)||[]))}},{key:"_updateActivatedSurveys",value:function(a){var l,u;null===(l=this.instance)||void 0===l||null===(u=l.persistence)||void 0===u||u.register(q({},tD,U(new Set(a))))}},{key:"getSurveys",value:function(){var a,l;return(null===(a=this.instance)||void 0===a||null===(l=a.persistence)||void 0===l?void 0:l.props[tD])||[]}},{key:"getEventToSurveys",value:function(){return this.eventToSurveys}},{key:"_getActionMatcher",value:function(){return this.actionMatcher}}]),e}();q(n8,"SURVEY_SHOWN_EVENT_NAME","survey shown");var n4="[Surveys]",n9={icontains:function(a){return!!e0&&e0.location.href.toLowerCase().indexOf(a.toLowerCase())>-1},not_icontains:function(a){return!!e0&&-1===e0.location.href.toLowerCase().indexOf(a.toLowerCase())},regex:function(a){return!!e0&&_t(e0.location.href,a)},not_regex:function(a){return!!e0&&!_t(e0.location.href,a)},exact:function(a){return(null==e0?void 0:e0.location.href)===a},is_not:function(a){return(null==e0?void 0:e0.location.href)!==a}},n7=function(){function e(a){L(this,e),this.instance=a,this._surveyEventReceiver=null}return N(e,[{key:"afterDecideResponse",value:function(a){this._decideServerResponse=!!a.surveys,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){var a,l,u,d=this,h=null==tn||null===(a=tn.__PosthogExtensions__)||void 0===a?void 0:a.generateSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||h||(null==this._surveyEventReceiver&&(this._surveyEventReceiver=new n8(this.instance)),null===(l=tn.__PosthogExtensions__)||void 0===l||null===(u=l.loadExternalDependency)||void 0===u||u.call(l,this.instance,"surveys",function(a){var l,u;if(a)return td.error(n4,"Could not load surveys script",a);d._surveyManager=null===(l=tn.__PosthogExtensions__)||void 0===l||null===(u=l.generateSurveys)||void 0===u?void 0:u.call(l,d.instance)}))}},{key:"getSurveys",value:function(a){var l=this,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.instance.config.disable_surveys)return a([]);null==this._surveyEventReceiver&&(this._surveyEventReceiver=new n8(this.instance));var d=this.instance.get_property(tF);if(d&&!u)return a(d);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),method:"GET",transport:"XHR",callback:function(u){if(200!==u.statusCode||!u.json)return a([]);var d,h,f=u.json.surveys||[],p=f.filter(function(a){var l,u,d,h,f,p,g,m,v,_,T,C;return(null===(l=a.conditions)||void 0===l?void 0:l.events)&&(null===(u=a.conditions)||void 0===u||null===(d=u.events)||void 0===d?void 0:d.values)&&(null===(h=a.conditions)||void 0===h||null===(f=h.events)||void 0===f||null===(p=f.values)||void 0===p?void 0:p.length)>0||(null===(g=a.conditions)||void 0===g?void 0:g.actions)&&(null===(m=a.conditions)||void 0===m||null===(v=m.actions)||void 0===v?void 0:v.values)&&(null===(_=a.conditions)||void 0===_||null===(T=_.actions)||void 0===T||null===(C=T.values)||void 0===C?void 0:C.length)>0});return p.length>0&&(null===(h=l._surveyEventReceiver)||void 0===h||h.register(p)),null===(d=l.instance.persistence)||void 0===d||d.register(q({},tF,f)),a(f)}})}},{key:"getActiveMatchingSurveys",value:function(a){var l=this,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.getSurveys(function(u){var d,h=u.filter(function(a){return!(!a.start_date||a.end_date)}).filter(function(a){if(!a.conditions)return!0;var l,u,d,h,f=null===(l=a.conditions)||void 0===l||!l.url||n9[null!==(u=null===(d=a.conditions)||void 0===d?void 0:d.urlMatchType)&&void 0!==u?u:"icontains"](a.conditions.url),p=null===(h=a.conditions)||void 0===h||!h.selector||(null==e8?void 0:e8.querySelector(a.conditions.selector));return f&&p}),f=null===(d=l._surveyEventReceiver)||void 0===d?void 0:d.getSurveys();return a(h.filter(function(a){if(!a.linked_flag_key&&!a.targeting_flag_key&&!a.internal_targeting_flag_key)return!0;var u,d,h,p,g,m,v,_,T,C,R=!a.linked_flag_key||l.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),B=!a.targeting_flag_key||l.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key),V=(null===(u=a.conditions)||void 0===u?void 0:u.events)&&(null===(d=a.conditions)||void 0===d||null===(h=d.events)||void 0===h?void 0:h.values)&&(null===(p=a.conditions)||void 0===p||null===(g=p.events)||void 0===g?void 0:g.values.length)>0,er=(null===(m=a.conditions)||void 0===m?void 0:m.actions)&&(null===(v=a.conditions)||void 0===v||null===(_=v.actions)||void 0===_?void 0:_.values)&&(null===(T=a.conditions)||void 0===T||null===(C=T.actions)||void 0===C?void 0:C.values.length)>0,en=!V&&!er||(null==f?void 0:f.includes(a.id)),ei=l._canActivateRepeatedly(a),es=!(a.internal_targeting_flag_key&&!ei)||l.instance.featureFlags.isFeatureEnabled(a.internal_targeting_flag_key);return R&&B&&es&&en}))},u)}},{key:"getNextSurveyStep",value:function(a,l,u){var d,h=a.questions[l],f=l+1;if(null===(d=h.branching)||void 0===d||!d.type)return l===a.questions.length-1?n1.End:f;if(h.branching.type===n1.End)return n1.End;if(h.branching.type===n1.SpecificQuestion){if(Number.isInteger(h.branching.index))return h.branching.index}else if(h.branching.type===n1.ResponseBased){if(h.type===n0.SingleChoice){var p,g,m=h.choices.indexOf("".concat(u));if(null!==(p=h.branching)&&void 0!==p&&null!==(g=p.responseValues)&&void 0!==g&&g.hasOwnProperty(m)){var v=h.branching.responseValues[m];return Number.isInteger(v)?v:v===n1.End?n1.End:f}}else if(h.type===n0.Rating){if("number"!=typeof u||!Number.isInteger(u))throw Error("The response type must be an integer");var _,T,C=function(a,l){if(3===l){if(a<1||a>3)throw Error("The response must be in range 1-3");return 1===a?"negative":2===a?"neutral":"positive"}if(5===l){if(a<1||a>5)throw Error("The response must be in range 1-5");return a<=2?"negative":3===a?"neutral":"positive"}if(7===l){if(a<1||a>7)throw Error("The response must be in range 1-7");return a<=3?"negative":4===a?"neutral":"positive"}if(10===l){if(a<0||a>10)throw Error("The response must be in range 0-10");return a<=6?"detractors":a<=8?"passives":"promoters"}throw Error("The scale must be one of: 3, 5, 7, 10")}(u,h.scale);if(null!==(_=h.branching)&&void 0!==_&&null!==(T=_.responseValues)&&void 0!==T&&T.hasOwnProperty(C)){var R=h.branching.responseValues[C];return Number.isInteger(R)?R:R===n1.End?n1.End:f}}return f}return td.warn(n4,"Falling back to next question index due to unexpected branching type"),f}},{key:"_canActivateRepeatedly",value:function(a){var l;return I(null===(l=tn.__PosthogExtensions__)||void 0===l?void 0:l.canActivateRepeatedly)?(td.warn(n4,"canActivateRepeatedly is not defined, must init before calling"),!1):tn.__PosthogExtensions__.canActivateRepeatedly(a)}},{key:"canRenderSurvey",value:function(a){var l=this;I(this._surveyManager)?td.warn(n4,"canActivateRepeatedly is not defined, must init before calling"):this.getSurveys(function(u){var d=u.filter(function(l){return l.id===a})[0];l._surveyManager.canRenderSurvey(d)})}},{key:"renderSurvey",value:function(a,l){var u=this;I(this._surveyManager)?td.warn(n4,"canActivateRepeatedly is not defined, must init before calling"):this.getSurveys(function(d){var h=d.filter(function(l){return l.id===a})[0];u._surveyManager.renderSurvey(h,null==e8?void 0:e8.querySelector(l))})}}]),e}(),ie=function(){function e(a){var l,u,d=this;L(this,e),q(this,"serverLimits",{}),q(this,"lastEventRateLimited",!1),q(this,"checkForLimiting",function(a){var l=a.text;if(l&&l.length)try{(JSON.parse(l).quota_limited||[]).forEach(function(a){td.info("[RateLimiter] ".concat(a||"events"," is quota limited.")),d.serverLimits[a]=(new Date).getTime()+6e4})}catch(a){return void td.warn('[RateLimiter] could not rate limit - continuing. Error: "'.concat(null==a?void 0:a.message,'"'),{text:l})}}),this.instance=a,this.captureEventsPerSecond=(null===(l=a.config.rate_limiting)||void 0===l?void 0:l.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null===(u=a.config.rate_limiting)||void 0===u?void 0:u.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}return N(e,[{key:"clientRateLimitContext",value:function(){var a,l,u,d=arguments.length>0&&void 0!==arguments[0]&&arguments[0],h=(new Date).getTime(),f=null!==(a=null===(l=this.instance.persistence)||void 0===l?void 0:l.get_property(tU))&&void 0!==a?a:{tokens:this.captureEventsBurstLimit,last:h};f.tokens+=(h-f.last)/1e3*this.captureEventsPerSecond,f.last=h,f.tokens>this.captureEventsBurstLimit&&(f.tokens=this.captureEventsBurstLimit);var p=f.tokens<1;return p||d||(f.tokens=Math.max(0,f.tokens-1)),!p||this.lastEventRateLimited||d||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond," events per second and ").concat(this.captureEventsBurstLimit," events burst limit.")},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=p,null===(u=this.instance.persistence)||void 0===u||u.set_property(tU,f),{isRateLimited:p,remainingTokens:f.tokens}}},{key:"isServerRateLimited",value:function(a){var l=this.serverLimits[a||"events"]||!1;return!1!==l&&(new Date).getTime()<l}}]),e}(),Ar=function(){return O({initialPathName:(null==e4?void 0:e4.pathname)||"",referringDomain:r0.referringDomain()},r0.campaignParams())},it=function(){function e(a,l,u){var d=this;L(this,e),q(this,"_onSessionIdCallback",function(a){var l=d._getStoredProps();if(!l||l.sessionId!==a){var u={sessionId:a,props:d._sessionSourceParamGenerator()};d._persistence.register(q({},t$,u))}}),this._sessionIdManager=a,this._persistence=l,this._sessionSourceParamGenerator=u||Ar,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return N(e,[{key:"_getStoredProps",value:function(){return this._persistence.props[t$]}},{key:"getSessionProps",value:function(){var a,l=null===(a=this._getStoredProps())||void 0===a?void 0:a.props;return l?{$client_session_initial_referring_host:l.referringDomain,$client_session_initial_pathname:l.initialPathName,$client_session_initial_utm_source:l.utm_source,$client_session_initial_utm_campaign:l.utm_campaign,$client_session_initial_utm_medium:l.utm_medium,$client_session_initial_utm_content:l.utm_content,$client_session_initial_utm_term:l.utm_term}:{}}}]),e}(),ir=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","headlesschrome","cypress","Google-HotelAdsVerifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],Nr=function(a,l){if(!a)return!1;var u=a.toLowerCase();return ir.concat(l||[]).some(function(a){var l=a.toLowerCase();return -1!==u.indexOf(l)})},ii=function(){function e(){L(this,e),this.clicks=[]}return N(e,[{key:"isRageClick",value:function(a,l,u){var d=this.clicks[this.clicks.length-1];if(d&&Math.abs(a-d.x)+Math.abs(l-d.y)<30&&u-d.timestamp<1e3){if(this.clicks.push({x:a,y:l,timestamp:u}),3===this.clicks.length)return!0}else this.clicks=[{x:a,y:l,timestamp:u}];return!1}}]),e}();function Br(a){var l;return a.id===tV||!(null===(l=a.closest)||void 0===l||!l.call(a,"#"+tV))}var is=function(){function t(a){var l,u=this;L(this,t),q(this,"rageclicks",new ii),q(this,"_enabledServerSide",!1),q(this,"_initialized",!1),q(this,"_flushInterval",null),this.instance=a,this._enabledServerSide=!(null===(l=this.instance.persistence)||void 0===l||!l.props[ty]),null==e0||e0.addEventListener("beforeunload",function(){u.flush()})}return N(t,[{key:"flushIntervalMilliseconds",get:function(){var a=5e3;return b(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(a=this.instance.config.capture_heatmaps.flush_interval_milliseconds),a}},{key:"isEnabled",get:function(){return w(this.instance.config.capture_heatmaps)?w(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}},{key:"startIfEnabled",value:function(){if(this.isEnabled)this._initialized||(td.info("[heatmaps] starting..."),this._setupListeners(),this._flushInterval=setInterval(this.flush.bind(this),this.flushIntervalMilliseconds));else{var a;clearInterval(null!==(a=this._flushInterval)&&void 0!==a?a:void 0),this.getAndClearBuffer()}}},{key:"afterDecideResponse",value:function(a){var l=!!a.heatmaps;this.instance.persistence&&this.instance.persistence.register(q({},ty,l)),this._enabledServerSide=l,this.startIfEnabled()}},{key:"getAndClearBuffer",value:function(){var a=this.buffer;return this.buffer=void 0,a}},{key:"_setupListeners",value:function(){var a=this;e0&&e8&&(tp(e8,"click",function(l){return a._onClick(l||(null==e0?void 0:e0.event))},!1,!0),tp(e8,"mousemove",function(l){return a._onMouseMove(l||(null==e0?void 0:e0.event))},!1,!0),this._initialized=!0)}},{key:"_getProperties",value:function(a,l){var u=this.instance.scrollManager.scrollY(),d=this.instance.scrollManager.scrollX(),h=this.instance.scrollManager.scrollElement(),f=function(a,l,u){for(var d=a;d&&Mn(d)&&!$n(d,"body")&&d!==u;){if(X(l,null==e0?void 0:e0.getComputedStyle(d).position))return!0;d=Dn(d)}return!1}(Cn(a),["fixed","sticky"],h);return{x:a.clientX+(f?0:d),y:a.clientY+(f?0:u),target_fixed:f,type:l}}},{key:"_onClick",value:function(a){var l;if(!Br(a.target)){var u=this._getProperties(a,"click");null!==(l=this.rageclicks)&&void 0!==l&&l.isRageClick(a.clientX,a.clientY,(new Date).getTime())&&this._capture(O(O({},u),{},{type:"rageclick"})),this._capture(u)}}},{key:"_onMouseMove",value:function(a){var l=this;Br(a.target)||(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(function(){l._capture(l._getProperties(a,"mousemove"))},500))}},{key:"_capture",value:function(a){if(e0){var l=e0.location.href;this.buffer=this.buffer||{},this.buffer[l]||(this.buffer[l]=[]),this.buffer[l].push(a)}}},{key:"flush",value:function(){this.buffer&&!k(this.buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}]),t}(),io=function(){function t(a){var l=this;L(this,t),q(this,"_updateScrollData",function(){l.context||(l.context={});var a,u,d,h,f=l.scrollElement(),p=l.scrollY(),g=f?Math.max(0,f.scrollHeight-f.clientHeight):0,m=p+((null==f?void 0:f.clientHeight)||0),v=(null==f?void 0:f.scrollHeight)||0;l.context.lastScrollY=Math.ceil(p),l.context.maxScrollY=Math.max(p,null!==(a=l.context.maxScrollY)&&void 0!==a?a:0),l.context.maxScrollHeight=Math.max(g,null!==(u=l.context.maxScrollHeight)&&void 0!==u?u:0),l.context.lastContentY=m,l.context.maxContentY=Math.max(m,null!==(d=l.context.maxContentY)&&void 0!==d?d:0),l.context.maxContentHeight=Math.max(v,null!==(h=l.context.maxContentHeight)&&void 0!==h?h:0)}),this.instance=a}return N(t,[{key:"getContext",value:function(){return this.context}},{key:"resetContext",value:function(){var a=this.context;return setTimeout(this._updateScrollData,0),a}},{key:"startMeasuringScrollPosition",value:function(){null==e0||e0.addEventListener("scroll",this._updateScrollData,!0),null==e0||e0.addEventListener("scrollend",this._updateScrollData,!0),null==e0||e0.addEventListener("resize",this._updateScrollData)}},{key:"scrollElement",value:function(){if(!this.instance.config.scroll_root_selector)return null==e0?void 0:e0.document.documentElement;var a,l=z(tc(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector]);try{for(l.s();!(a=l.n()).done;){var u=a.value,d=null==e0?void 0:e0.document.querySelector(u);if(d)return d}}catch(a){l.e(a)}finally{l.f()}}},{key:"scrollY",value:function(){if(this.instance.config.scroll_root_selector){var a=this.scrollElement();return a&&a.scrollTop||0}return e0&&(e0.scrollY||e0.pageYOffset||e0.document.documentElement.scrollTop)||0}},{key:"scrollX",value:function(){if(this.instance.config.scroll_root_selector){var a=this.scrollElement();return a&&a.scrollLeft||0}return e0&&(e0.scrollX||e0.pageXOffset||e0.document.documentElement.scrollLeft)||0}}]),t}(),ia="$copy_autocapture";function Wr(a,l){return l.length>a?l.slice(0,a)+"...":l}var il,ic,iu,id,ih=function(){function t(a){L(this,t),q(this,"_initialized",!1),q(this,"_isDisabledServerSide",null),q(this,"rageclicks",new ii),q(this,"_elementsChainAsString",!1),this.instance=a,this._elementSelectors=null}return N(t,[{key:"config",get:function(){var a,l,u=b(this.instance.config.autocapture)?this.instance.config.autocapture:{};return u.url_allowlist=null===(a=u.url_allowlist)||void 0===a?void 0:a.map(function(a){return new RegExp(a)}),u.url_ignorelist=null===(l=u.url_ignorelist)||void 0===l?void 0:l.map(function(a){return new RegExp(a)}),u}},{key:"_addDomEventHandlers",value:function(){var a=this;if(this.isBrowserSupported()){if(e0&&e8){var n=function(l){l=l||(null==e0?void 0:e0.event);try{a._captureEvent(l)}catch(a){td.error("Failed to capture event",a)}},i=function(l){l=l||(null==e0?void 0:e0.event),a._captureEvent(l,ia)};tp(e8,"submit",n,!1,!0),tp(e8,"change",n,!1,!0),tp(e8,"click",n,!1,!0),this.config.capture_copied_text&&(tp(e8,"copy",i,!1,!0),tp(e8,"cut",i,!1,!0))}}else td.info("Disabling Automatic Event Collection because this browser is not supported")}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}},{key:"afterDecideResponse",value:function(a){a.elementsChainAsString&&(this._elementsChainAsString=a.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(q({},t_,!!a.autocapture_opt_out)),this._isDisabledServerSide=!!a.autocapture_opt_out,this.startIfEnabled()}},{key:"setElementSelectors",value:function(a){this._elementSelectors=a}},{key:"getElementSelectors",value:function(a){var l,u=[];return null===(l=this._elementSelectors)||void 0===l||l.forEach(function(l){var d=null==e8?void 0:e8.querySelectorAll(l);null==d||d.forEach(function(d){a===d&&u.push(l)})}),u}},{key:"isEnabled",get:function(){var a,l,u=null===(a=this.instance.persistence)||void 0===a?void 0:a.props[t_];if(x(this._isDisabledServerSide)&&!P(u)&&!this.instance.config.advanced_disable_decide)return!1;var d=null!==(l=this._isDisabledServerSide)&&void 0!==l?l:!!u;return!!this.instance.config.autocapture&&!d}},{key:"_previousElementSibling",value:function(a){if(a.previousElementSibling)return a.previousElementSibling;var l=a;do l=l.previousSibling;while(l&&!Mn(l));return l}},{key:"_getAugmentPropertiesFromElement",value:function(a){if(!qn(a))return{};var l={};return J(a.attributes,function(a){if(a.name&&0===a.name.indexOf("data-ph-capture-attribute")){var u=a.name.replace("data-ph-capture-attribute-",""),d=a.value;u&&d&&Gn(d)&&(l[u]=d)}}),l}},{key:"_getPropertiesFromElement",value:function(a,l,u){var d,h=a.tagName.toLowerCase(),f={tag_name:h};r6.indexOf(h)>-1&&!u&&("a"===h.toLowerCase()||"button"===h.toLowerCase()?f.$el_text=Wr(1024,Qn(a)):f.$el_text=Wr(1024,Tn(a)));var p=Pn(a);p.length>0&&(f.classes=p.filter(function(a){return""!==a}));var g=null===(d=this.config)||void 0===d?void 0:d.element_attribute_ignorelist;J(a.attributes,function(u){var d;if((!Bn(a)||-1!==["name","id","class","aria-label"].indexOf(u.name))&&(null==g||!g.includes(u.name))&&!l&&Gn(u.value)&&(!S(d=u.name)||"_ngcontent"!==d.substring(0,10)&&"_nghost"!==d.substring(0,7))){var h=u.value;"class"===u.name&&(h=In(h).join(" ")),f["attr__"+u.name]=Wr(1024,h)}});for(var m=1,v=1,_=a;_=this._previousElementSibling(_);)m++,_.tagName===a.tagName&&v++;return f.nth_child=m,f.nth_of_type=v,f}},{key:"_getDefaultProperties",value:function(a){return{$event_type:a,$ce_version:1}}},{key:"_captureEvent",value:function(a){var l=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$autocapture";if(this.isEnabled){var d,h=Cn(a);On(h)&&(h=h.parentNode||null),"$autocapture"===u&&"click"===a.type&&a instanceof MouseEvent&&this.instance.config.rageclick&&null!==(d=this.rageclicks)&&void 0!==d&&d.isRageClick(a.clientX,a.clientY,(new Date).getTime())&&this._captureEvent(a,"$rageclick");var f=u===ia;if(h&&function(a,l){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,d=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0;if(!e0||!a||$n(a,"html")||!Mn(a)||null!=u&&u.url_allowlist&&!Fn(u.url_allowlist)||null!=u&&u.url_ignorelist&&Fn(u.url_ignorelist))return!1;if(null!=u&&u.dom_event_allowlist){var f=u.dom_event_allowlist;if(f&&!f.some(function(a){return l.type===a}))return!1}for(var p=!1,g=[a],m=!0,v=a;v.parentNode&&!$n(v,"body");)if(An(v.parentNode))g.push(v.parentNode.host),v=v.parentNode.host;else{if(!(m=Dn(v)))break;if(d||r6.indexOf(m.tagName.toLowerCase())>-1)p=!0;else{var _=e0.getComputedStyle(m);_&&"pointer"===_.getPropertyValue("cursor")&&(p=!0)}g.push(m),v=m}if(!function(a,l){var u=null==l?void 0:l.element_allowlist;if(w(u))return!0;var d,h=z(a);try{for(h.s();!(d=h.n()).done;){var f=function(){var a=d.value;if(u.some(function(l){return a.tagName.toLowerCase()===l}))return{v:!0}}();if("object"===A(f))return f.v}}catch(a){h.e(a)}finally{h.f()}return!1}(g,u)||!function(a,l){var u=null==l?void 0:l.css_selector_allowlist;if(w(u))return!0;var d,h=z(a);try{for(h.s();!(d=h.n()).done;){var f=function(){var a=d.value;if(u.some(function(l){return a.matches(l)}))return{v:!0}}();if("object"===A(f))return f.v}}catch(a){h.e(a)}finally{h.f()}return!1}(g,u))return!1;var T=e0.getComputedStyle(a);if(T&&"pointer"===T.getPropertyValue("cursor")&&"click"===l.type)return!0;var C=a.tagName.toLowerCase();switch(C){case"html":return!1;case"form":return(h||["submit"]).indexOf(l.type)>=0;case"input":case"select":case"textarea":return(h||["change","click"]).indexOf(l.type)>=0;default:return p?(h||["click"]).indexOf(l.type)>=0:(h||["click"]).indexOf(l.type)>=0&&(r6.indexOf(C)>-1||"true"===a.getAttribute("contenteditable"))}}(h,a,this.config,f,f?["copy","cut"]:void 0)){for(var p,g,m=[h],v=h;v.parentNode&&!$n(v,"body");)An(v.parentNode)?(m.push(v.parentNode.host),v=v.parentNode.host):(m.push(v.parentNode),v=v.parentNode);var _,T,C=[],R={},B=!1;if(J(m,function(a){var u=qn(a);"a"===a.tagName.toLowerCase()&&(_=a.getAttribute("href"),_=u&&Gn(_)&&_),X(Pn(a),"ph-no-capture")&&(B=!0),C.push(l._getPropertiesFromElement(a,l.instance.config.mask_all_element_attributes,l.instance.config.mask_all_text)),Y(R,l._getAugmentPropertiesFromElement(a))}),this.instance.config.mask_all_text||("a"===h.tagName.toLowerCase()||"button"===h.tagName.toLowerCase()?C[0].$el_text=Qn(h):C[0].$el_text=Tn(h)),_){C[0].attr__href=_;var V,er,en=null===(V=gt(_))||void 0===V?void 0:V.host,ei=null==e0||null===(er=e0.location)||void 0===er?void 0:er.host;en&&ei&&en!==ei&&(T=_)}if(B)return!1;var es=Y(this._getDefaultProperties(a.type),this._elementsChainAsString?{$elements_chain:C.map(function(a){var l,u,d,h={text:null===(u=a.$el_text)||void 0===u?void 0:u.slice(0,400),tag_name:a.tag_name,href:null===(d=a.attr__href)||void 0===d?void 0:d.slice(0,2048),attr_class:(l=a.attr__class)?tc(l)?l:In(l):void 0,attr_id:a.attr__id,nth_child:a.nth_child,nth_of_type:a.nth_of_type,attributes:{}};return K(a).filter(function(a){return 0===H(a,1)[0].indexOf("attr__")}).forEach(function(a){var l=H(a,2),u=l[0],d=l[1];return h.attributes[u]=d}),h}).map(function(a){var l,u,d="";if(a.tag_name&&(d+=a.tag_name),a.attr_class){a.attr_class.sort();var h,f=z(a.attr_class);try{for(f.s();!(h=f.n()).done;){var p=h.value;d+=".".concat(p.replace(/"/g,""))}}catch(a){f.e(a)}finally{f.f()}}var g=O(O(O(O({},a.text?{text:a.text}:{}),{},{"nth-child":null!==(l=a.nth_child)&&void 0!==l?l:0,"nth-of-type":null!==(u=a.nth_of_type)&&void 0!==u?u:0},a.href?{href:a.href}:{}),a.attr_id?{attr_id:a.attr_id}:{}),a.attributes),m={};return K(g).sort(function(a,l){var u=H(a,1)[0],d=H(l,1)[0];return u.localeCompare(d)}).forEach(function(a){var l=H(a,2),u=l[0],d=l[1];return m[Xn(u.toString())]=Xn(d.toString())}),d+=":"+K(g).map(function(a){var l=H(a,2),u=l[0],d=l[1];return"".concat(u,'="').concat(d,'"')}).join("")}).join(";")}:{$elements:C},null!==(p=C[0])&&void 0!==p&&p.$el_text?{$el_text:null===(g=C[0])||void 0===g?void 0:g.$el_text}:{},T&&"click"===a.type?{$external_click_url:T}:{},R),eo=this.getElementSelectors(h);if(eo&&eo.length>0&&(es.$element_selectors=eo),u===ia){var ea,el=Rn(null==e0||null===(ea=e0.getSelection())||void 0===ea?void 0:ea.toString()),ec=a.type||"clipboard";if(!el)return!1;es.$selected_content=el,es.$copy_type=ec}return this.instance.capture(u,es),!0}}}},{key:"isBrowserSupported",value:function(){return y(null==e8?void 0:e8.querySelectorAll)}}]),t}(),ip=function(){function e(a){var l=this;L(this,e),q(this,"_restoreXHRPatch",void 0),q(this,"_restoreFetchPatch",void 0),q(this,"_startCapturing",function(){var a,u,d,h;w(l._restoreXHRPatch)&&(null===(a=tn.__PosthogExtensions__)||void 0===a||null===(u=a.tracingHeadersPatchFns)||void 0===u||u._patchXHR(l.instance.sessionManager)),w(l._restoreFetchPatch)&&(null===(d=tn.__PosthogExtensions__)||void 0===d||null===(h=d.tracingHeadersPatchFns)||void 0===h||h._patchFetch(l.instance.sessionManager))}),this.instance=a}return N(e,[{key:"_loadScript",value:function(a){var l,u,d;null!==(l=tn.__PosthogExtensions__)&&void 0!==l&&l.tracingHeadersPatchFns&&a(),null===(u=tn.__PosthogExtensions__)||void 0===u||null===(d=u.loadExternalDependency)||void 0===d||d.call(u,this.instance,"tracing-headers",function(l){if(l)return td.error("[TRACING-HEADERS] failed to load script",l);a()})}},{key:"startIfEnabledOrStop",value:function(){var a,l;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):(null===(a=this._restoreXHRPatch)||void 0===a||a.call(this),null===(l=this._restoreFetchPatch)||void 0===l||l.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}}]),e}();(iR=id||(id={}))[iR.PENDING=-1]="PENDING",iR[iR.DENIED=0]="DENIED",iR[iR.GRANTED=1]="GRANTED";var ig=function(){function e(a){L(this,e),this.instance=a}return N(e,[{key:"config",get:function(){return this.instance.config}},{key:"consent",get:function(){return this.getDnt()?id.DENIED:this.storedConsent}},{key:"isOptedOut",value:function(){return this.consent===id.DENIED||this.consent===id.PENDING&&this.config.opt_out_capturing_by_default}},{key:"isOptedIn",value:function(){return!this.isOptedOut()}},{key:"optInOut",value:function(a){this.storage.set(this.storageKey,a?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}},{key:"reset",value:function(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}},{key:"storageKey",get:function(){var a=this.instance.config,l=a.token;return(a.opt_out_capturing_cookie_prefix||"__ph_opt_in_out_")+l}},{key:"storedConsent",get:function(){var a=this.storage.get(this.storageKey);return"1"===a?id.GRANTED:"0"===a?id.DENIED:id.PENDING}},{key:"storage",get:function(){if(!this._storage){var a=this.config.opt_out_capturing_persistence_type;this._storage="localStorage"===a?t7:t4;var l="localStorage"===a?t4:t7;l.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut("1"===l.get(this.storageKey)),l.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}},{key:"getDnt",value:function(){return!!this.config.respect_dnt&&!!ae([null==e6?void 0:e6.doNotTrack,null==e6?void 0:e6.msDoNotTrack,tn.doNotTrack],function(a){return X([!0,1,"1","yes"],a)})}}]),e}(),im="[Exception Autocapture]",iv=function(){function t(a){var l,u=this;L(this,t),q(this,"originalOnUnhandledRejectionHandler",void 0),q(this,"startCapturing",function(){var a,l,d,h;if(e0&&u.isEnabled&&!u.hasHandlers&&!u.isCapturing){var f=null===(a=tn.__PosthogExtensions__)||void 0===a||null===(l=a.errorWrappingFunctions)||void 0===l?void 0:l.wrapOnError,p=null===(d=tn.__PosthogExtensions__)||void 0===d||null===(h=d.errorWrappingFunctions)||void 0===h?void 0:h.wrapUnhandledRejection;if(f&&p)try{u.unwrapOnError=f(u.captureException.bind(u)),u.unwrapUnhandledRejection=p(u.captureException.bind(u))}catch(a){td.error(im+" failed to start",a),u.stopCapturing()}else td.error(im+" failed to load error wrapping functions - cannot start")}}),this.instance=a,this.remoteEnabled=!(null===(l=this.instance.persistence)||void 0===l||!l.props[tb]),this.startIfEnabled()}return N(t,[{key:"isEnabled",get:function(){var a;return null!==(a=this.remoteEnabled)&&void 0!==a&&a}},{key:"isCapturing",get:function(){var a;return!(null==e0||null===(a=e0.onerror)||void 0===a||!a.__POSTHOG_INSTRUMENTED__)}},{key:"hasHandlers",get:function(){return this.originalOnUnhandledRejectionHandler||this.unwrapOnError}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this.isCapturing&&(td.info(im+" enabled, starting..."),this.loadScript(this.startCapturing))}},{key:"loadScript",value:function(a){var l,u;this.hasHandlers&&a(),null===(l=tn.__PosthogExtensions__)||void 0===l||null===(u=l.loadExternalDependency)||void 0===u||u.call(l,this.instance,"exception-autocapture",function(l){if(l)return td.error(im+" failed to load script",l);a()})}},{key:"stopCapturing",value:function(){var a,l;null===(a=this.unwrapOnError)||void 0===a||a.call(this),null===(l=this.unwrapUnhandledRejection)||void 0===l||l.call(this)}},{key:"afterDecideResponse",value:function(a){var l=a.autocaptureExceptions;this.remoteEnabled=!!l,this.instance.persistence&&this.instance.persistence.register(q({},tb,this.remoteEnabled)),this.startIfEnabled()}},{key:"captureException",value:function(a){var l=this.instance.requestRouter.endpointFor("ui");a.$exception_personURL="".concat(l,"/project/").concat(this.instance.config.token,"/person/").concat(this.instance.get_distinct_id()),this.instance.exceptions.sendExceptionEvent(a)}}]),t}(),i_="[Web Vitals]",iy=function(){function t(a){var l,u=this;L(this,t),q(this,"_enabledServerSide",!1),q(this,"_initialized",!1),q(this,"buffer",{url:void 0,metrics:[],firstMetricTimestamp:void 0}),q(this,"_flushToCapture",function(){clearTimeout(u._delayedFlushTimer),0!==u.buffer.metrics.length&&(u.instance.capture("$web_vitals",u.buffer.metrics.reduce(function(a,l){var u;return O(O({},a),{},(q(u={},"$web_vitals_".concat(l.name,"_event"),O({},l)),q(u,"$web_vitals_".concat(l.name,"_value"),l.value),u))},{})),u.buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})}),q(this,"_addToBuffer",function(a){var l,d=null===(l=u.instance.sessionManager)||void 0===l?void 0:l.checkAndGetSessionAndWindowId(!0);if(w(d))td.error(i_+"Could not read session ID. Dropping metrics!");else{u.buffer=u.buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var h=u._currentURL();w(h)||(I(null==a?void 0:a.name)||I(null==a?void 0:a.value)?td.error(i_+"Invalid metric received",a):u._maxAllowedValue&&a.value>=u._maxAllowedValue?td.error(i_+"Ignoring metric with value >= "+u._maxAllowedValue,a):(u.buffer.url!==h&&(u._flushToCapture(),u._delayedFlushTimer=setTimeout(u._flushToCapture,8e3)),w(u.buffer.url)&&(u.buffer.url=h),u.buffer.firstMetricTimestamp=w(u.buffer.firstMetricTimestamp)?Date.now():u.buffer.firstMetricTimestamp,u.buffer.metrics.push(O(O({},a),{},{$current_url:h,$session_id:d.sessionId,$window_id:d.windowId,timestamp:Date.now()})),u.buffer.metrics.length===u.allowedMetrics.length&&u._flushToCapture()))}}),q(this,"_startCapturing",function(){var a,l,d,h,f=tn.__PosthogExtensions__;if(!w(f)&&!w(f.postHogWebVitalsCallbacks)){var p=f.postHogWebVitalsCallbacks;a=p.onLCP,l=p.onCLS,d=p.onFCP,h=p.onINP}a&&l&&d&&h?(u.allowedMetrics.indexOf("LCP")>-1&&a(u._addToBuffer.bind(u)),u.allowedMetrics.indexOf("CLS")>-1&&l(u._addToBuffer.bind(u)),u.allowedMetrics.indexOf("FCP")>-1&&d(u._addToBuffer.bind(u)),u.allowedMetrics.indexOf("INP")>-1&&h(u._addToBuffer.bind(u)),u._initialized=!0):td.error(i_+"web vitals callbacks not loaded - not starting")}),this.instance=a,this._enabledServerSide=!(null===(l=this.instance.persistence)||void 0===l||!l.props[tS]),this.startIfEnabled()}return N(t,[{key:"allowedMetrics",get:function(){var a,l,u=b(this.instance.config.capture_performance)?null===(a=this.instance.config.capture_performance)||void 0===a?void 0:a.web_vitals_allowed_metrics:void 0;return w(u)?(null===(l=this.instance.persistence)||void 0===l?void 0:l.props[tE])||["CLS","FCP","INP","LCP"]:u}},{key:"_maxAllowedValue",get:function(){var a=b(this.instance.config.capture_performance)&&F(this.instance.config.capture_performance.__web_vitals_max_value)?this.instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<a&&a<=6e4?9e5:a}},{key:"isEnabled",get:function(){var a=b(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals:void 0;return P(a)?a:this._enabledServerSide}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(td.info(i_+" enabled, starting..."),this.loadScript(this._startCapturing))}},{key:"afterDecideResponse",value:function(a){var l=b(a.capturePerformance)&&!!a.capturePerformance.web_vitals,u=b(a.capturePerformance)?a.capturePerformance.web_vitals_allowed_metrics:void 0;this.instance.persistence&&(this.instance.persistence.register(q({},tS,l)),this.instance.persistence.register(q({},tE,u))),this._enabledServerSide=l,this.startIfEnabled()}},{key:"loadScript",value:function(a){var l,u,d;null!==(l=tn.__PosthogExtensions__)&&void 0!==l&&l.postHogWebVitalsCallbacks&&a(),null===(u=tn.__PosthogExtensions__)||void 0===u||null===(d=u.loadExternalDependency)||void 0===d||d.call(u,this.instance,"web-vitals",function(l){l?td.error(i_+" failed to load script",l):a()})}},{key:"_currentURL",value:function(){var a=e0?e0.location.href:void 0;return a||td.error(i_+"Could not determine current URL"),a}}]),t}(),ib={icontains:function(a,l){return!!e0&&l.href.toLowerCase().indexOf(a.toLowerCase())>-1},not_icontains:function(a,l){return!!e0&&-1===l.href.toLowerCase().indexOf(a.toLowerCase())},regex:function(a,l){return!!e0&&_t(l.href,a)},not_regex:function(a,l){return!!e0&&!_t(l.href,a)},exact:function(a,l){return l.href===a},is_not:function(a,l){return l.href!==a}},iw=function(){function t(a){var l=this;L(this,t),q(this,"getWebExperimentsAndEvaluateDisplayLogic",function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l.getWebExperiments(function(a){t.logInfo("retrieved web experiments from the server"),l._flagToExperiments=new Map,a.forEach(function(a){if(a.feature_flag_key&&l._featureFlags&&l._featureFlags[a.feature_flag_key]){l._flagToExperiments&&(t.logInfo("setting flag key ",a.feature_flag_key," to web experiment ",a),null===(u=l._flagToExperiments)||void 0===u||u.set(a.feature_flag_key,a));var u,d=l._featureFlags[a.feature_flag_key];d&&a.variants[d]&&t.applyTransforms(a.name,d,a.variants[d].transforms)}else if(a.variants)for(var h in a.variants){var f=a.variants[h];t.matchesTestVariant(f)&&t.applyTransforms(a.name,h,f.transforms)}})},a)}),this.instance=a,this.instance.onFeatureFlags&&this.instance.onFeatureFlags(function(a){l.applyFeatureFlagChanges(a)}),this._flagToExperiments=new Map}return N(t,[{key:"applyFeatureFlagChanges",value:function(a){var l=this;t.logInfo("applying feature flags",a),I(this._flagToExperiments)||this.instance.config.disable_web_experiments||a.forEach(function(a){var u;if(l._flagToExperiments&&null!==(u=l._flagToExperiments)&&void 0!==u&&u.has(a)){var d,h=l.instance.getFeatureFlag(a),f=null===(d=l._flagToExperiments)||void 0===d?void 0:d.get(a);h&&null!=f&&f.variants[h]&&t.applyTransforms(f.name,h,f.variants[h].transforms)}})}},{key:"afterDecideResponse",value:function(a){this._featureFlags=a.featureFlags,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){this.instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}},{key:"getWebExperiments",value:function(a,l){if(this.instance.config.disable_web_experiments)return a([]);var u=this.instance.get_property("$web_experiments");if(u&&!l)return a(u);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/web_experiments/?token=".concat(this.instance.config.token)),method:"GET",transport:"XHR",callback:function(l){return 200===l.statusCode&&l.json?a(l.json.experiments||[]):a([])}})}}],[{key:"matchesTestVariant",value:function(a){return!I(a.conditions)&&t.matchUrlConditions(a)&&t.matchUTMConditions(a)}},{key:"matchUrlConditions",value:function(a){if(I(a.conditions)||I(null===(l=a.conditions)||void 0===l?void 0:l.url))return!0;var l,u,d,h,f=t.getWindowLocation();return!!f&&(null===(u=a.conditions)||void 0===u||!u.url||ib[null!==(d=null===(h=a.conditions)||void 0===h?void 0:h.urlMatchType)&&void 0!==d?d:"icontains"](a.conditions.url,f))}},{key:"getWindowLocation",value:function(){return null==e0?void 0:e0.location}},{key:"matchUTMConditions",value:function(a){if(I(a.conditions)||I(null===(u=a.conditions)||void 0===u?void 0:u.utm))return!0;var l=r0.campaignParams();if(l.utm_source){var u,d,h,f,p,g,m,v,_,T,C,R,B,V,er,en,ei,es=null===(d=a.conditions)||void 0===d||null===(h=d.utm)||void 0===h||!h.utm_campaign||(null===(f=a.conditions)||void 0===f||null===(p=f.utm)||void 0===p?void 0:p.utm_campaign)==l.utm_campaign,eo=null===(g=a.conditions)||void 0===g||null===(m=g.utm)||void 0===m||!m.utm_source||(null===(v=a.conditions)||void 0===v||null===(_=v.utm)||void 0===_?void 0:_.utm_source)==l.utm_source,ea=null===(T=a.conditions)||void 0===T||null===(C=T.utm)||void 0===C||!C.utm_medium||(null===(R=a.conditions)||void 0===R||null===(B=R.utm)||void 0===B?void 0:B.utm_medium)==l.utm_medium,el=null===(V=a.conditions)||void 0===V||null===(er=V.utm)||void 0===er||!er.utm_term||(null===(en=a.conditions)||void 0===en||null===(ei=en.utm)||void 0===ei?void 0:ei.utm_term)==l.utm_term;return es&&ea&&el&&eo}return!1}},{key:"logInfo",value:function(a){for(var l=arguments.length,u=Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];td.info("[WebExperiments] ".concat(a),u)}},{key:"applyTransforms",value:function(a,l,u){u.forEach(function(u){if(u.selector){t.logInfo("applying transform of variant ".concat(l," for experiment ").concat(a," "),u);var d,h=null===(d=document)||void 0===d?void 0:d.querySelectorAll(u.selector);null==h||h.forEach(function(a){u.attributes&&u.attributes.forEach(function(l){switch(l.name){case"text":a.innerText=l.value;break;case"html":a.innerHTML=l.value;break;case"cssClass":a.className=l.value;break;default:a.setAttribute(l.name,l.value)}}),u.text&&(a.innerText=u.text),u.html&&(a.innerHTML=u.html),u.className&&(a.className=u.className)})}})}}]),t}(),iS=function(){function e(a){var l;L(this,e),this.instance=a,this._endpointSuffix=(null===(l=this.instance.persistence)||void 0===l?void 0:l.props[tw])||"/e/"}return N(e,[{key:"endpoint",get:function(){return this.instance.requestRouter.endpointFor("api",this._endpointSuffix)}},{key:"afterDecideResponse",value:function(a){var l=a.autocaptureExceptions;this._endpointSuffix=b(l)&&l.endpoint||"/e/",this.instance.persistence&&this.instance.persistence.register(q({},tw,this._endpointSuffix))}},{key:"sendExceptionEvent",value:function(a){this.instance.capture("$exception",a,{_noTruncate:!0,_batchKey:"exceptionEvent",_url:this.endpoint})}}]),e}(),iE={},ss=function(){},ik="posthog",iT=!nU&&-1===(null==tr?void 0:tr.indexOf("MSIE"))&&-1===(null==tr?void 0:tr.indexOf("Mozilla")),us=function(){var a,l,u;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:!!S(u=null==(l=null==e8?void 0:e8.location)?void 0:l.hostname)&&"herokuapp.com"!==u.split(".").slice(-2).join("."),persistence:"localStorage+cookie",persistence_name:"",loaded:ss,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:e4&&S(null==e4?void 0:e4.search)&&-1!==e4.search.indexOf("__posthog_debug=true")||!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==e0||null===(a=e0.location)||void 0===a?void 0:a.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:function(a){var l="Bad HTTP status: "+a.statusCode+" "+a.text;td.error(l)},get_device_id:function(a){return a},_onCapture:ss,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"always",__add_tracing_headers:!1}},ls=function(a){var l={};w(a.process_person)||(l.person_profiles=a.process_person),w(a.xhr_headers)||(l.request_headers=a.xhr_headers),w(a.cookie_name)||(l.persistence_name=a.cookie_name),w(a.disable_cookie)||(l.disable_persistence=a.disable_cookie);var u=Y({},l,a);return tc(a.property_blacklist)&&(w(a.property_denylist)?u.property_denylist=a.property_blacklist:tc(a.property_denylist)?u.property_denylist=[].concat(U(a.property_blacklist),U(a.property_denylist)):td.error("Invalid value for property_denylist config: "+a.property_denylist)),u},ix=function(){function e(){L(this,e),q(this,"__forceAllowLocalhost",!1)}return N(e,[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(a){td.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=a}}]),e}(),iC=function(){function t(){var a=this;L(this,t),q(this,"webPerformance",new ix),q(this,"version",ti.LIB_VERSION),q(this,"_internalEventEmitter",new n5),this.config=us(),this.decideEndpointWasHit=!1,this.SentryIntegration=n2,this.sentryIntegration=function(l){var u;return u=br(a,l),{name:nY,processEvent:function(a){return u(a)}}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this.featureFlags=new tY(this),this.toolbar=new nB(this),this.scrollManager=new io(this),this.pageViewManager=new n3(this),this.surveys=new n7(this),this.experiments=new iw(this),this.exceptions=new iS(this),this.rateLimiter=new ie(this),this.requestRouter=new nX(this),this.consent=new ig(this),this.people={set:function(l,u,d){var h=S(l)?q({},l,u):l;a.setPersonProperties(h),null==d||d({})},set_once:function(l,u,d){var h=S(l)?q({},l,u):l;a.setPersonProperties(void 0,h),null==d||d({})}},this.on("eventCaptured",function(a){return td.info("send",a)})}return N(t,[{key:"init",value:function(a,l,u){if(u&&u!==ik){var d,h=null!==(d=iE[u])&&void 0!==d?d:new t;return h._init(a,l,u),iE[u]=h,iE[ik][u]=h,h}return this._init(a,l,u)}},{key:"_init",value:function(a){var l,u,d=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=arguments.length>2?arguments[2]:void 0;if(w(a)||E(a))return td.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return td.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config(Y({},us(),ls(h),{name:f,token:a})),this.config.on_xhr_error&&td.error("[posthog] on_xhr_error is deprecated. Use on_request_error instead"),this.compression=h.disable_compression?void 0:tf.GZipJS,this.persistence=new r2(this.config),this.sessionPersistence="sessionStorage"===this.config.persistence?this.persistence:new r2(O(O({},this.config),{},{persistence:"sessionStorage"}));var p=O({},this.persistence.props),g=O({},this.sessionPersistence.props);if(this._requestQueue=new n$(function(a){return d._send_retriable_request(a)}),this._retryQueue=new nG(this),this.__request_queue=[],this.sessionManager=new nJ(this.config,this.persistence),this.sessionPropsManager=new it(this.sessionManager,this.persistence),new ip(this).startIfEnabledOrStop(),this.sessionRecording=new nN(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new ih(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new is(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new iy(this),this.exceptionObserver=new iv(this),this.exceptionObserver.startIfEnabled(),ti.DEBUG=ti.DEBUG||this.config.debug,ti.DEBUG&&td.info("Starting in debug mode",{this:this,config:h,thisC:O({},this.config),p:p,s:g}),this._sync_opt_out_with_persistence(),void 0!==(null===(l=h.bootstrap)||void 0===l?void 0:l.distinctID)){var m,v,_=this.config.get_device_id(Ze()),T=null!==(m=h.bootstrap)&&void 0!==m&&m.isIdentifiedID?_:h.bootstrap.distinctID;this.persistence.set_property(tB,null!==(v=h.bootstrap)&&void 0!==v&&v.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:h.bootstrap.distinctID,$device_id:T})}if(this._hasBootstrappedFeatureFlags()){var C,R,B=Object.keys((null===(C=h.bootstrap)||void 0===C?void 0:C.featureFlags)||{}).filter(function(a){var l,u;return!(null===(l=h.bootstrap)||void 0===l||null===(u=l.featureFlags)||void 0===u||!u[a])}).reduce(function(a,l){var u,d;return a[l]=(null===(u=h.bootstrap)||void 0===u||null===(d=u.featureFlags)||void 0===d?void 0:d[l])||!1,a},{}),V=Object.keys((null===(R=h.bootstrap)||void 0===R?void 0:R.featureFlagPayloads)||{}).filter(function(a){return B[a]}).reduce(function(a,l){var u,d,f,p;return null!==(u=h.bootstrap)&&void 0!==u&&null!==(d=u.featureFlagPayloads)&&void 0!==d&&d[l]&&(a[l]=null===(f=h.bootstrap)||void 0===f||null===(p=f.featureFlagPayloads)||void 0===p?void 0:p[l]),a},{});this.featureFlags.receivedFeatureFlags({featureFlags:B,featureFlagPayloads:V})}if(!this.get_distinct_id()){var er=this.config.get_device_id(Ze());this.register_once({distinct_id:er,$device_id:er},""),this.persistence.set_property(tB,"anonymous")}return null==e0||null===(u=e0.addEventListener)||void 0===u||u.call(e0,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),h.segment?function(a,l){var u=a.config.segment;if(!u)return l();!function(a,l){var u=a.config.segment;if(!u)return l();var i=function(u){var i=function(){return u.anonymousId()||Ze()};a.config.get_device_id=i,u.id()&&(a.register({distinct_id:u.id(),$device_id:i()}),a.persistence.set_property(tB,"identified")),l()},d=u.user();"then"in d&&y(d.then)?d.then(function(a){return i(a)}):i(d)}(a,function(){var d;u.register((Promise&&Promise.resolve||td.warn("This browser does not have Promise support, and can not use the segment integration"),d=function(l,u){if(!u)return l;l.event.userId||l.event.anonymousId===a.get_distinct_id()||(td.info("Segment integration does not have a userId set, resetting PostHog"),a.reset()),l.event.userId&&l.event.userId!==a.get_distinct_id()&&(td.info("Segment integration has a userId set, identifying with PostHog"),a.identify(l.event.userId));var d,h=a._calculate_event_properties(u,null!==(d=l.event.properties)&&void 0!==d?d:{},new Date);return l.event.properties=Object.assign({},h,l.event.properties),l},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(a){return d(a,a.event.event)},page:function(a){return d(a,"$pageview")},identify:function(a){return d(a,"$identify")},screen:function(a){return d(a,"$screen")}})).then(function(){l()})})}(this,function(){return d._loaded()}):this._loaded(),y(this.config._onCapture)&&this.on("eventCaptured",function(a){return d.config._onCapture(a.event,a)}),this}},{key:"_afterDecideResponse",value:function(a){var l,u,d,h,f,p,g,m,v;this.compression=void 0,a.supportedCompression&&!this.config.disable_compression&&(this.compression=X(a.supportedCompression,tf.GZipJS)?tf.GZipJS:X(a.supportedCompression,tf.Base64)?tf.Base64:void 0),null!==(l=a.analytics)&&void 0!==l&&l.endpoint&&(this.analyticsDefaultEndpoint=a.analytics.endpoint),null===(u=this.sessionRecording)||void 0===u||u.afterDecideResponse(a),null===(d=this.autocapture)||void 0===d||d.afterDecideResponse(a),null===(h=this.heatmaps)||void 0===h||h.afterDecideResponse(a),null===(f=this.experiments)||void 0===f||f.afterDecideResponse(a),null===(p=this.surveys)||void 0===p||p.afterDecideResponse(a),null===(g=this.webVitalsAutocapture)||void 0===g||g.afterDecideResponse(a),null===(m=this.exceptions)||void 0===m||m.afterDecideResponse(a),null===(v=this.exceptionObserver)||void 0===v||v.afterDecideResponse(a)}},{key:"_loaded",value:function(){var a=this,l=this.config.advanced_disable_decide;l||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(a){td.critical("`loaded` function failed",a)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(function(){a.consent.isOptedIn()&&a._captureInitialPageview()},1),l||(new nF(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var a;this.has_opted_out_capturing()||this.config.request_batching&&(null===(a=this._requestQueue)||void 0===a||a.enable())}},{key:"_dom_loaded",value:function(){var a=this;this.has_opted_out_capturing()||Q(this.__request_queue,function(l){return a._send_retriable_request(l)}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_handle_unload",value:function(){var a,l;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),null===(a=this._requestQueue)||void 0===a||a.unload(),null===(l=this._retryQueue)||void 0===l||l.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_send_request",value:function(a){var l=this;this.__loaded&&(iT?this.__request_queue.push(a):this.rateLimiter.isServerRateLimited(a.batchKey)||(a.transport=a.transport||this.config.api_transport,a.url=lr(a.url,{ip:this.config.ip?1:0}),a.headers=O({},this.config.request_headers),a.compression="best-available"===a.compression?this.compression:a.compression,function(a){var l,u,d,h=O({},a);h.timeout=h.timeout||6e4,h.url=lr(h.url,{_:(new Date).getTime().toString(),ver:ti.LIB_VERSION,compression:h.compression});var f=null!==(l=h.transport)&&void 0!==l?l:"XHR",p=null!==(u=null===(d=ae(nq,function(a){return a.transport===f}))||void 0===d?void 0:d.method)&&void 0!==u?u:nq[0].method;if(!p)throw Error("No available transport method");p(h)}(O(O({},a),{},{callback:function(u){var d,h,f;l.rateLimiter.checkForLimiting(u),u.statusCode>=400&&(null===(h=(f=l.config).on_request_error)||void 0===h||h.call(f,u)),null===(d=a.callback)||void 0===d||d.call(a,u)}}))))}},{key:"_send_retriable_request",value:function(a){this._retryQueue?this._retryQueue.retriableRequest(a):this._send_request(a)}},{key:"_execute_array",value:function(a){var l,u=this,d=[],h=[],f=[];Q(a,function(a){a&&(tc(l=a[0])?f.push(a):y(a)?a.call(u):tc(a)&&"alias"===l?d.push(a):tc(a)&&-1!==l.indexOf("capture")&&y(u[l])?f.push(a):h.push(a))});var o=function(a,l){Q(a,function(a){if(tc(a[0])){var u=l;J(a,function(a){u=u[a[0]].apply(u,a.slice(1))})}else this[a[0]].apply(this,a.slice(1))},l)};o(d,this),o(h,this),o(f,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var a,l;return(null===(a=this.config.bootstrap)||void 0===a?void 0:a.featureFlags)&&Object.keys(null===(l=this.config.bootstrap)||void 0===l?void 0:l.featureFlags).length>0||!1}},{key:"push",value:function(a){this._execute_array([a])}},{key:"capture",value:function(a,l,u){var d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(!this.consent.isOptedOut()){if(!w(a)&&S(a)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var h=null!=u&&u.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==h||!h.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f,p,g,m,v=new Date,_=(null==u?void 0:u.timestamp)||v,T={uuid:Ze(),event:a,properties:this._calculate_event_properties(a,l||{},_)};h&&(T.properties.$lib_rate_limit_remaining_tokens=h.remainingTokens),(null==u?void 0:u.$set)&&(T.$set=null==u?void 0:u.$set);var C=this._calculate_set_once_properties(null==u?void 0:u.$set_once);C&&(T.$set_once=C),(f=T,p=null!=u&&u._noTruncate?null:this.config.properties_string_max_length,g=function(a){return S(a)&&!x(p)?a.slice(0,p):a},m=new Set,T=function e(a,l){var u;return a!==Object(a)?g?g(a,l):a:m.has(a)?void 0:(m.add(a),tc(a)?(u=[],Q(a,function(a){u.push(e(a))})):(u={},J(a,function(a,l){m.has(a)||(u[l]=e(a,l))})),u)}(f)).timestamp=_,w(null==u?void 0:u.timestamp)||(T.properties.$event_time_override_provided=!0,T.properties.$event_time_override_system_time=v);var R=O(O({},T.properties.$set),T.$set);k(R)||this.setPersonPropertiesForFlags(R),this._internalEventEmitter.emit("eventCaptured",T);var B={method:"POST",url:null!==(d=null==u?void 0:u._url)&&void 0!==d?d:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:T,compression:"best-available",batchKey:null==u?void 0:u._batchKey};return!this.config.request_batching||u&&(null==u||!u._batchKey)||null!=u&&u.send_instantly?this._send_retriable_request(B):this._requestQueue.enqueue(B),T}td.critical("This capture call is ignored due to client rate limiting.")}}else td.error("No event name provided to posthog.capture")}}else td.uninitializedWarning("posthog.capture")}},{key:"_addCaptureHook",value:function(a){return this.on("eventCaptured",function(l){return a(l.event,l)})}},{key:"_calculate_event_properties",value:function(a,l,u){if(u=u||new Date,!this.persistence||!this.sessionPersistence)return l;var d=this.persistence.remove_event_timer(a),h=O({},l);if(h.token=this.config.token,"$snapshot"===a){var f=O(O({},this.persistence.properties()),this.sessionPersistence.properties());return h.distinct_id=f.distinct_id,(!S(h.distinct_id)&&!F(h.distinct_id)||E(h.distinct_id))&&td.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),h}var p=r0.properties();if(this.sessionManager){var g=this.sessionManager.checkAndGetSessionAndWindowId(),m=g.sessionId,v=g.windowId;h.$session_id=m,h.$window_id=v}if(this.requestRouter.region===nW.CUSTOM&&(h.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&("$pageview"===a||"$pageleave"===a||"$autocapture"===a)){var _=this.sessionPropsManager.getSessionProps();h=Y(h,_)}if(!this.config.disable_scroll_properties){var T={};"$pageview"===a?T=this.pageViewManager.doPageView(u):"$pageleave"===a&&(T=this.pageViewManager.doPageLeave(u)),h=Y(h,T)}if("$pageview"===a&&e8&&(h.title=e8.title),!w(d)){var C=u.getTime()-d;h.$duration=parseFloat((C/1e3).toFixed(3))}tr&&this.config.opt_out_useragent_filter&&(h.$browser_type=this._is_bot()?"bot":"browser"),(h=Y({},p,this.persistence.properties(),this.sessionPersistence.properties(),h)).$is_identified=this._isIdentified(),tc(this.config.property_denylist)?J(this.config.property_denylist,function(a){delete h[a]}):td.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var R=this.config.sanitize_properties;return R&&(h=R(h,a)),h.$process_person_profile=this._hasPersonProcessing(),h}},{key:"_calculate_set_once_properties",value:function(a){if(!this.persistence||!this._hasPersonProcessing())return a;var l=Y({},this.persistence.get_initial_props(),a||{});return k(l)?void 0:l}},{key:"register",value:function(a,l){var u;null===(u=this.persistence)||void 0===u||u.register(a,l)}},{key:"register_once",value:function(a,l,u){var d;null===(d=this.persistence)||void 0===d||d.register_once(a,l,u)}},{key:"register_for_session",value:function(a){var l;null===(l=this.sessionPersistence)||void 0===l||l.register(a)}},{key:"unregister",value:function(a){var l;null===(l=this.persistence)||void 0===l||l.unregister(a)}},{key:"unregister_for_session",value:function(a){var l;null===(l=this.sessionPersistence)||void 0===l||l.unregister(a)}},{key:"_register_single",value:function(a,l){this.register(q({},a,l))}},{key:"getFeatureFlag",value:function(a,l){return this.featureFlags.getFeatureFlag(a,l)}},{key:"getFeatureFlagPayload",value:function(a){var l=this.featureFlags.getFeatureFlagPayload(a);try{return JSON.parse(l)}catch(a){return l}}},{key:"isFeatureEnabled",value:function(a,l){return this.featureFlags.isFeatureEnabled(a,l)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(a,l){this.featureFlags.updateEarlyAccessFeatureEnrollment(a,l)}},{key:"getEarlyAccessFeatures",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(a,l)}},{key:"on",value:function(a,l){return this._internalEventEmitter.on(a,l)}},{key:"onFeatureFlags",value:function(a){return this.featureFlags.onFeatureFlags(a)}},{key:"onSessionId",value:function(a){var l,u;return null!==(l=null===(u=this.sessionManager)||void 0===u?void 0:u.onSessionId(a))&&void 0!==l?l:function(){}}},{key:"getSurveys",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.surveys.getSurveys(a,l)}},{key:"getActiveMatchingSurveys",value:function(a){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.surveys.getActiveMatchingSurveys(a,l)}},{key:"renderSurvey",value:function(a,l){this.surveys.renderSurvey(a,l)}},{key:"canRenderSurvey",value:function(a){this.surveys.canRenderSurvey(a)}},{key:"getNextSurveyStep",value:function(a,l,u){return this.surveys.getNextSurveyStep(a,l,u)}},{key:"identify",value:function(a,l,u){if(!this.__loaded||!this.persistence)return td.uninitializedWarning("posthog.identify");if(F(a)&&(a=a.toString(),td.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),a){if(["distinct_id","distinctid"].includes(a.toLowerCase()))td.critical('The string "'.concat(a,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'));else if(this._requirePersonProcessing("posthog.identify")){var d=this.get_distinct_id();this.register({$user_id:a}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:d},""),a!==d&&a!==this.get_property(tm)&&(this.unregister(tm),this.register({distinct_id:a}));var h="anonymous"===(this.persistence.get_property(tB)||"anonymous");a!==d&&h?(this.persistence.set_property(tB,"identified"),this.setPersonPropertiesForFlags(l||{},!1),this.capture("$identify",{distinct_id:a,$anon_distinct_id:d},{$set:l||{},$set_once:u||{}}),this.featureFlags.setAnonymousDistinctId(d)):(l||u)&&this.setPersonProperties(l,u),a!==d&&(this.reloadFeatureFlags(),this.unregister(tj))}}else td.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(a,l){(a||l)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(a||{}),this.capture("$set",{$set:a||{},$set_once:l||{}}))}},{key:"group",value:function(a,l,u){if(a&&l){if(this._requirePersonProcessing("posthog.group")){var d=this.getGroups();d[a]!==l&&this.resetGroupPropertiesForFlags(a),this.register({$groups:O(O({},d),{},q({},a,l))}),u&&(this.capture("$groupidentify",{$group_type:a,$group_key:l,$group_set:u}),this.setGroupPropertiesForFlags(q({},a,u))),d[a]===l||u||this.reloadFeatureFlags()}}else td.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(a){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._requirePersonProcessing("posthog.setPersonPropertiesForFlags")&&this.featureFlags.setPersonPropertiesForFlags(a,l)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(a){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(a,l)}},{key:"resetGroupPropertiesForFlags",value:function(a){this.featureFlags.resetGroupPropertiesForFlags(a)}},{key:"reset",value:function(a){if(td.info("reset"),!this.__loaded)return td.uninitializedWarning("posthog.reset");var l,u,d,h,f=this.get_property("$device_id");this.consent.reset(),null===(l=this.persistence)||void 0===l||l.clear(),null===(u=this.sessionPersistence)||void 0===u||u.clear(),null===(d=this.persistence)||void 0===d||d.set_property(tB,"anonymous"),null===(h=this.sessionManager)||void 0===h||h.resetSessionId();var p=this.config.get_device_id(Ze());this.register_once({distinct_id:p,$device_id:a?p:f},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var a,l;return null!==(a=null===(l=this.sessionManager)||void 0===l?void 0:l.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==a?a:""}},{key:"get_session_replay_url",value:function(a){if(!this.sessionManager)return"";var l=this.sessionManager.checkAndGetSessionAndWindowId(!0),u=l.sessionId,d=l.sessionStartTimestamp,h=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(u));if(null!=a&&a.withTimestamp&&d){var f,p=null!==(f=a.timestampLookBack)&&void 0!==f?f:10;if(!d)return h;var g=Math.max(Math.floor(((new Date).getTime()-d)/1e3)-p,0);h+="?t=".concat(g)}return h}},{key:"alias",value:function(a,l){return a===this.get_property(tg)?(td.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(w(l)&&(l=this.get_distinct_id()),a!==l?(this._register_single(tm,a),this.capture("$create_alias",{alias:a,distinct_id:l})):(td.warn("alias matches current distinct_id - skipping api call."),this.identify(a),-1)):void 0}},{key:"set_config",value:function(a){var l,u,d,h,f=O({},this.config);b(a)&&(Y(this.config,ls(a)),null===(l=this.persistence)||void 0===l||l.update_config(this.config,f),this.sessionPersistence="sessionStorage"===this.config.persistence?this.persistence:new r2(O(O({},this.config),{},{persistence:"sessionStorage"})),t7.is_supported()&&"true"===t7.get("ph_debug")&&(this.config.debug=!0),this.config.debug&&(ti.DEBUG=!0,td.info("set_config",{config:a,oldConfig:f,newConfig:O({},this.config)})),null===(u=this.sessionRecording)||void 0===u||u.startIfEnabledOrStop(),null===(d=this.autocapture)||void 0===d||d.startIfEnabled(),null===(h=this.heatmaps)||void 0===h||h.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}},{key:"startSessionRecording",value:function(a){var l,u=P(a)&&a;if(u||null!=a&&a.sampling){var d,h,f=null===(d=this.sessionManager)||void 0===d?void 0:d.checkAndGetSessionAndWindowId();null===(h=this.persistence)||void 0===h||h.register(q({},tO,!0)),td.info("Session recording started with sampling override for session: ",null==f?void 0:f.sessionId)}(u||null!=a&&a.linked_flag)&&(null===(l=this.sessionRecording)||void 0===l||l.overrideLinkedFlag(),td.info("Session recording started with linked_flags override")),this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var a;return!(null===(a=this.sessionRecording)||void 0===a||!a.started)}},{key:"captureException",value:function(a,l){var u,d=y(null===(u=tn.__PosthogExtensions__)||void 0===u?void 0:u.parseErrorAsProperties)?tn.__PosthogExtensions__.parseErrorAsProperties([a.message,void 0,void 0,void 0,a]):O({$exception_type:a.name,$exception_message:a.message,$exception_level:"error"},l);this.exceptions.sendExceptionEvent(d)}},{key:"loadToolbar",value:function(a){return this.toolbar.loadToolbar(a)}},{key:"get_property",value:function(a){var l;return null===(l=this.persistence)||void 0===l?void 0:l.props[a]}},{key:"getSessionProperty",value:function(a){var l;return null===(l=this.sessionPersistence)||void 0===l?void 0:l.props[a]}},{key:"toString",value:function(){var a,l=null!==(a=this.config.name)&&void 0!==a?a:ik;return l!==ik&&(l=ik+"."+l),l}},{key:"_isIdentified",value:function(){var a,l;return"identified"===(null===(a=this.persistence)||void 0===a?void 0:a.get_property(tB))||"identified"===(null===(l=this.sessionPersistence)||void 0===l?void 0:l.get_property(tB))}},{key:"_hasPersonProcessing",value:function(){var a,l,u,d;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&k(this.getGroups())&&(null===(a=this.persistence)||void 0===a||null===(l=a.props)||void 0===l||!l[tm])&&(null===(u=this.persistence)||void 0===u||null===(d=u.props)||void 0===d||!d[tW]))}},{key:"_shouldCapturePageleave",value:function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&this.config.capture_pageview}},{key:"createPersonProfile",value:function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}},{key:"_requirePersonProcessing",value:function(a){return"never"===this.config.person_profiles?(td.error(a+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(tW,!0),!0)}},{key:"_sync_opt_out_with_persistence",value:function(){var a,l,u,d,h=this.consent.isOptedOut(),f=this.config.opt_out_persistence_by_default,p=this.config.disable_persistence||h&&!!f;(null===(a=this.persistence)||void 0===a?void 0:a.disabled)!==p&&(null===(u=this.persistence)||void 0===u||u.set_disabled(p)),(null===(l=this.sessionPersistence)||void 0===l?void 0:l.disabled)!==p&&(null===(d=this.sessionPersistence)||void 0===d||d.set_disabled(p))}},{key:"opt_in_capturing",value:function(a){var l;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),(w(null==a?void 0:a.captureEventName)||null!=a&&a.captureEventName)&&this.capture(null!==(l=null==a?void 0:a.captureEventName)&&void 0!==l?l:"$opt_in",null==a?void 0:a.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}},{key:"opt_out_capturing",value:function(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}},{key:"has_opted_in_capturing",value:function(){return this.consent.isOptedIn()}},{key:"has_opted_out_capturing",value:function(){return this.consent.isOptedOut()}},{key:"clear_opt_in_out_capturing",value:function(){this.consent.reset(),this._sync_opt_out_with_persistence()}},{key:"_is_bot",value:function(){return e6?function(a,l){if(!a)return!1;var u=a.userAgent;if(u&&Nr(u,l))return!0;try{var d=null==a?void 0:a.userAgentData;if(null!=d&&d.brands&&d.brands.some(function(a){return Nr(null==a?void 0:a.brand,l)}))return!0}catch(a){}return!!a.webdriver}(e6,this.config.custom_blocked_useragents):void 0}},{key:"_captureInitialPageview",value:function(){e8&&!this._initialPageviewCaptured&&(this._initialPageviewCaptured=!0,this.capture("$pageview",{title:e8.title},{send_instantly:!0}))}},{key:"debug",value:function(a){!1===a?(null==e0||e0.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(null==e0||e0.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),t}();!function(a,l){for(var u=0;u<l.length;u++)a.prototype[l[u]]=ee(a.prototype[l[u]])}(iC,["identify"]);var iR,iI,iA=(iI=iE[ik]=new iC,function(){function t(){t.done||(t.done=!0,iT=!1,J(iE,function(a){a._dom_loaded()}))}null!=e8&&e8.addEventListener&&("complete"===e8.readyState?t():e8.addEventListener("DOMContentLoaded",t,!1)),e0&&tp(e0,"load",t,!0)}(),iI),iO=(0,R.createContext)({client:iA});function PostHogProvider(a){var l=a.children,u=a.client,d=a.apiKey,h=a.options,f=(0,R.useMemo)(function(){return(u&&d&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),u&&h&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),u)?u:(d&&(iA.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),iA.init(d,h)),iA)},[u,d]);return R.createElement(iO.Provider,{value:{client:f}},l)}function App(a){var l;let{Component:u,pageProps:h}=a,p=useSupabaseClientSetup();if(!p)return(0,d.jsx)(V.h,{});let v=null!==(l=u.getLayout)&&void 0!==l?l:a=>a;return(0,d.jsxs)(ErrorBoundary,{children:[(0,d.jsx)(g(),{id:"6a759dc724bbc310",dynamic:[f().style.fontFamily],children:"html{font-family:".concat(f().style.fontFamily,"}")}),(0,d.jsx)("script",{async:!0,src:"https://cdn.tolt.io/tolt.js","data-tolt":"84d9493c-42b9-43e1-963d-49f91a4ebeba",className:g().dynamic([["6a759dc724bbc310",[f().style.fontFamily]]])}),(0,d.jsx)(Toaster,{}),(0,d.jsx)(PostHogProvider,{client:iA,children:(0,d.jsx)(eZ.J$,{value:{fetcher:a=>er.h.get(a).then(a=>a.data),refreshWhenHidden:!1,errorRetryInterval:6e4},children:(0,d.jsx)(m.SessionContextProvider,{supabaseClient:p,children:(0,d.jsx)(eQ.d,{children:v((0,d.jsx)(u,{...h,className:g().dynamic([["6a759dc724bbc310",[f().style.fontFamily]]])+" "+(h&&null!=h.className&&h.className||"")}))})})})})]})}_().events.on("routeChangeStart",C().start),_().events.on("routeChangeComplete",C().done),_().events.on("routeChangeError",C().done),iA.init("phc_IDlpZCLBE1jEcNk86usKNgy6EGg0LQHBgHQLAoTDzdm",{api_host:"https://us.i.posthog.com",person_profiles:"always",loaded:a=>{}})},540559:function(a,l,u){"use strict";u.d(l,{Am:function(){return toast},pm:function(){return useToast}});var d=u(202784);let h=0,f=new Map,addToRemoveQueue=a=>{if(f.has(a))return;let l=setTimeout(()=>{f.delete(a),dispatch({type:"REMOVE_TOAST",toastId:a})},1e6);f.set(a,l)},reducer=(a,l)=>{switch(l.type){case"ADD_TOAST":return{...a,toasts:[l.toast,...a.toasts].slice(0,1)};case"UPDATE_TOAST":return{...a,toasts:a.toasts.map(a=>a.id===l.toast.id?{...a,...l.toast}:a)};case"DISMISS_TOAST":{let{toastId:u}=l;return u?addToRemoveQueue(u):a.toasts.forEach(a=>{addToRemoveQueue(a.id)}),{...a,toasts:a.toasts.map(a=>a.id===u||void 0===u?{...a,open:!1}:a)}}case"REMOVE_TOAST":if(void 0===l.toastId)return{...a,toasts:[]};return{...a,toasts:a.toasts.filter(a=>a.id!==l.toastId)}}},p=[],g={toasts:[]};function dispatch(a){g=reducer(g,a),p.forEach(a=>{a(g)})}function toast(a){let{...l}=a,u=(h=(h+1)%Number.MAX_SAFE_INTEGER).toString(),dismiss=()=>dispatch({type:"DISMISS_TOAST",toastId:u});return dispatch({type:"ADD_TOAST",toast:{...l,id:u,open:!0,onOpenChange:a=>{a||dismiss()}}}),{id:u,dismiss,update:a=>dispatch({type:"UPDATE_TOAST",toast:{...a,id:u}})}}function useToast(){let[a,l]=d.useState(g);return d.useEffect(()=>(p.push(l),()=>{let a=p.indexOf(l);a>-1&&p.splice(a,1)}),[a]),{...a,toast,dismiss:a=>dispatch({type:"DISMISS_TOAST",toastId:a})}}},441258:function(a,l,u){"use strict";u.d(l,{J:function(){return d}});let d="production"},849686:function(a,l,u){"use strict";u.d(l,{X:function(){return d}});let d=!1},331246:function(a,l,u){"use strict";u.d(l,{RP:function(){return function notifyEventProcessors(a,l,u){let d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new h.cW((h,m)=>{let v=a[d];if(null===l||"function"!=typeof v)h(l);else{let _=v({...l},u);g.X&&v.id&&null===_&&f.kg.log('Event processor "'.concat(v.id,'" dropped event')),(0,p.J8)(_)?_.then(l=>notifyEventProcessors(a,l,u,d+1).then(h)).then(null,m):notifyEventProcessors(a,_,u,d+1).then(h).then(null,m)}})}},cc:function(){return addGlobalEventProcessor},fH:function(){return getGlobalEventProcessors}});var d=u(628621),h=u(837190),f=u(466193),p=u(198102),g=u(849686);function getGlobalEventProcessors(){return(0,d.Y)("globalEventProcessors",()=>[])}function addGlobalEventProcessor(a){getGlobalEventProcessors().push(a)}},688965:function(a,l,u){"use strict";u.d(l,{$e:function(){return withScope},Tb:function(){return captureException},cg:function(){return captureSession},eN:function(){return captureEvent},nZ:function(){return getCurrentScope},n_:function(){return addBreadcrumb},s3:function(){return getClient},v:function(){return setContext},yj:function(){return startSession}});var d=u(628621),h=u(441258),f=u(860805),p=u(690638),g=u(537696);function captureException(a,l){return(0,f.Gd)().captureException(a,(0,g.U0)(l))}function captureEvent(a,l){return(0,f.Gd)().captureEvent(a,l)}function addBreadcrumb(a,l){(0,f.Gd)().addBreadcrumb(a,l)}function setContext(a,l){(0,f.Gd)().setContext(a,l)}function withScope(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];let d=(0,f.Gd)();if(2===l.length){let[a,u]=l;return a?d.withScope(()=>(d.getStackTop().scope=a,u(a))):d.withScope(u)}return d.withScope(l[0])}function getClient(){return(0,f.Gd)().getClient()}function getCurrentScope(){return(0,f.Gd)().getScope()}function startSession(a){let l=getClient(),u=(0,f.aF)(),g=getCurrentScope(),{release:m,environment:v=h.J}=l&&l.getOptions()||{},{userAgent:_}=d.GLOBAL_OBJ.navigator||{},T=(0,p.Hv)({release:m,environment:v,user:g.getUser()||u.getUser(),..._&&{userAgent:_},...a}),C=u.getSession();return C&&"ok"===C.status&&(0,p.CT)(C,{status:"exited"}),endSession(),u.setSession(T),g.setSession(T),T}function endSession(){let a=(0,f.aF)(),l=getCurrentScope(),u=l.getSession()||a.getSession();u&&(0,p.RJ)(u),_sendSessionUpdate(),a.setSession(),l.setSession()}function _sendSessionUpdate(){let a=(0,f.aF)(),l=getCurrentScope(),u=getClient(),d=l.getSession()||a.getSession();d&&u&&u.captureSession&&u.captureSession(d)}function captureSession(){let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a){endSession();return}_sendSessionUpdate()}},860805:function(a,l,u){"use strict";u.d(l,{Gd:function(){return getCurrentHub},aF:function(){return getIsolationScope},cu:function(){return getMainCarrier}});var d=u(198102),h=u(154291),f=u(965838),p=u(466193),g=u(628621),m=u(441258),v=u(849686),_=u(534266),T=u(690638),C=u(408715);let R=parseFloat(C.J);let Hub=class Hub{isOlderThan(a){return this._version<a}bindClient(a){let l=this.getStackTop();l.client=a,l.scope.setClient(a),a&&a.setupIntegrations&&a.setupIntegrations()}pushScope(){let a=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:a}),a}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(a){let l;let u=this.pushScope();try{l=a(u)}catch(a){throw this.popScope(),a}return(0,d.J8)(l)?l.then(a=>(this.popScope(),a),a=>{throw this.popScope(),a}):(this.popScope(),l)}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(a,l){let u=this._lastEventId=l&&l.event_id?l.event_id:(0,h.DM)(),d=Error("Sentry syntheticException");return this.getScope().captureException(a,{originalException:a,syntheticException:d,...l,event_id:u}),u}captureMessage(a,l,u){let d=this._lastEventId=u&&u.event_id?u.event_id:(0,h.DM)(),f=Error(a);return this.getScope().captureMessage(a,l,{originalException:a,syntheticException:f,...u,event_id:d}),d}captureEvent(a,l){let u=l&&l.event_id?l.event_id:(0,h.DM)();return a.type||(this._lastEventId=u),this.getScope().captureEvent(a,{...l,event_id:u}),u}lastEventId(){return this._lastEventId}addBreadcrumb(a,l){let{scope:u,client:d}=this.getStackTop();if(!d)return;let{beforeBreadcrumb:h=null,maxBreadcrumbs:g=100}=d.getOptions&&d.getOptions()||{};if(g<=0)return;let m=(0,f.yW)(),v={timestamp:m,...a},_=h?(0,p.Cf)(()=>h(v,l)):v;null!==_&&(d.emit&&d.emit("beforeAddBreadcrumb",_,l),u.addBreadcrumb(_,g))}setUser(a){this.getScope().setUser(a),this.getIsolationScope().setUser(a)}setTags(a){this.getScope().setTags(a),this.getIsolationScope().setTags(a)}setExtras(a){this.getScope().setExtras(a),this.getIsolationScope().setExtras(a)}setTag(a,l){this.getScope().setTag(a,l),this.getIsolationScope().setTag(a,l)}setExtra(a,l){this.getScope().setExtra(a,l),this.getIsolationScope().setExtra(a,l)}setContext(a,l){this.getScope().setContext(a,l),this.getIsolationScope().setContext(a,l)}configureScope(a){let{scope:l,client:u}=this.getStackTop();u&&a(l)}run(a){let l=makeMain(this);try{a(this)}finally{makeMain(l)}}getIntegration(a){let l=this.getClient();if(!l)return null;try{return l.getIntegration(a)}catch(l){return v.X&&p.kg.warn("Cannot retrieve integration ".concat(a.id," from the current Hub")),null}}startTransaction(a,l){let u=this._callExtensionMethod("startTransaction",a,l);if(v.X&&!u){let a=this.getClient();a?p.kg.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):p.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return u}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(){let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a)return this.endSession();this._sendSessionUpdate()}endSession(){let a=this.getStackTop(),l=a.scope,u=l.getSession();u&&(0,T.RJ)(u),this._sendSessionUpdate(),l.setSession()}startSession(a){let{scope:l,client:u}=this.getStackTop(),{release:d,environment:h=m.J}=u&&u.getOptions()||{},{userAgent:f}=g.GLOBAL_OBJ.navigator||{},p=(0,T.Hv)({release:d,environment:h,user:l.getUser(),...f&&{userAgent:f},...a}),v=l.getSession&&l.getSession();return v&&"ok"===v.status&&(0,T.CT)(v,{status:"exited"}),this.endSession(),l.setSession(p),p}shouldSendDefaultPii(){let a=this.getClient(),l=a&&a.getOptions();return!!(l&&l.sendDefaultPii)}_sendSessionUpdate(){let{scope:a,client:l}=this.getStackTop(),u=a.getSession();u&&l&&l.captureSession&&l.captureSession(u)}_callExtensionMethod(a){for(var l=arguments.length,u=Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];let h=getMainCarrier(),f=h.__SENTRY__;if(f&&f.extensions&&"function"==typeof f.extensions[a])return f.extensions[a].apply(this,u);v.X&&p.kg.warn("Extension method ".concat(a," couldn't be found, doing nothing."))}constructor(a,l,u,d=R){let h,f;this._version=d,l?h=l:(h=new _.sX).setClient(a),u?f=u:(f=new _.sX).setClient(a),this._stack=[{scope:h}],a&&this.bindClient(a),this._isolationScope=f}};function getMainCarrier(){return g.GLOBAL_OBJ.__SENTRY__=g.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},g.GLOBAL_OBJ}function makeMain(a){let l=getMainCarrier(),u=getHubFromCarrier(l);return setHubOnCarrier(l,a),u}function getCurrentHub(){let a=getMainCarrier();if(a.__SENTRY__&&a.__SENTRY__.acs){let l=a.__SENTRY__.acs.getCurrentHub();if(l)return l}return function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:getMainCarrier();return(!(a&&a.__SENTRY__&&a.__SENTRY__.hub)||getHubFromCarrier(a).isOlderThan(R))&&setHubOnCarrier(a,new Hub),getHubFromCarrier(a)}(a)}function getIsolationScope(){return getCurrentHub().getIsolationScope()}function getHubFromCarrier(a){return(0,g.Y)("hub",()=>new Hub,a)}function setHubOnCarrier(a,l){if(!a)return!1;let u=a.__SENTRY__=a.__SENTRY__||{};return u.hub=l,!0}},534266:function(a,l,u){"use strict";let d;u.d(l,{lW:function(){return getGlobalScope},sX:function(){return Scope}});var h=u(198102),f=u(965838),p=u(154291),g=u(466193),m=u(331246),v=u(690638),_=u(341819);let Scope=class Scope{static clone(a){return a?a.clone():new Scope}clone(){let a=new Scope;return a._breadcrumbs=[...this._breadcrumbs],a._tags={...this._tags},a._extra={...this._extra},a._contexts={...this._contexts},a._user=this._user,a._level=this._level,a._span=this._span,a._session=this._session,a._transactionName=this._transactionName,a._fingerprint=this._fingerprint,a._eventProcessors=[...this._eventProcessors],a._requestSession=this._requestSession,a._attachments=[...this._attachments],a._sdkProcessingMetadata={...this._sdkProcessingMetadata},a._propagationContext={...this._propagationContext},a._client=this._client,a}setClient(a){this._client=a}getClient(){return this._client}addScopeListener(a){this._scopeListeners.push(a)}addEventProcessor(a){return this._eventProcessors.push(a),this}setUser(a){return this._user=a||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&(0,v.CT)(this._session,{user:a}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(a){return this._requestSession=a,this}setTags(a){return this._tags={...this._tags,...a},this._notifyScopeListeners(),this}setTag(a,l){return this._tags={...this._tags,[a]:l},this._notifyScopeListeners(),this}setExtras(a){return this._extra={...this._extra,...a},this._notifyScopeListeners(),this}setExtra(a,l){return this._extra={...this._extra,[a]:l},this._notifyScopeListeners(),this}setFingerprint(a){return this._fingerprint=a,this._notifyScopeListeners(),this}setLevel(a){return this._level=a,this._notifyScopeListeners(),this}setTransactionName(a){return this._transactionName=a,this._notifyScopeListeners(),this}setContext(a,l){return null===l?delete this._contexts[a]:this._contexts[a]=l,this._notifyScopeListeners(),this}setSpan(a){return this._span=a,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let a=this._span;return a&&a.transaction}setSession(a){return a?this._session=a:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(a){if(!a)return this;if("function"==typeof a){let l=a(this);return l instanceof Scope?l:this}return a instanceof Scope?(this._tags={...this._tags,...a._tags},this._extra={...this._extra,...a._extra},this._contexts={...this._contexts,...a._contexts},a._user&&Object.keys(a._user).length&&(this._user=a._user),a._level&&(this._level=a._level),a._fingerprint&&(this._fingerprint=a._fingerprint),a._requestSession&&(this._requestSession=a._requestSession),a._propagationContext&&(this._propagationContext=a._propagationContext)):(0,h.PO)(a)&&(this._tags={...this._tags,...a.tags},this._extra={...this._extra,...a.extra},this._contexts={...this._contexts,...a.contexts},a.user&&(this._user=a.user),a.level&&(this._level=a.level),a.fingerprint&&(this._fingerprint=a.fingerprint),a.requestSession&&(this._requestSession=a.requestSession),a.propagationContext&&(this._propagationContext=a.propagationContext)),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=generatePropagationContext(),this}addBreadcrumb(a,l){let u="number"==typeof l?l:100;if(u<=0)return this;let d={timestamp:(0,f.yW)(),...a},h=this._breadcrumbs;return h.push(d),this._breadcrumbs=h.length>u?h.slice(-u):h,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(a){return this._attachments.push(a),this}getAttachments(){let a=this.getScopeData();return a.attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:a,_attachments:l,_contexts:u,_tags:d,_extra:h,_user:f,_level:p,_fingerprint:g,_eventProcessors:m,_propagationContext:v,_sdkProcessingMetadata:_,_transactionName:T,_span:C}=this;return{breadcrumbs:a,attachments:l,contexts:u,tags:d,extra:h,user:f,level:p,fingerprint:g||[],eventProcessors:m,propagationContext:v,sdkProcessingMetadata:_,transactionName:T,span:C}}applyToEvent(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,_.gi)(a,this.getScopeData());let d=[...u,...(0,m.fH)(),...this._eventProcessors];return(0,m.RP)(d,a,l)}setSDKProcessingMetadata(a){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...a},this}setPropagationContext(a){return this._propagationContext=a,this}getPropagationContext(){return this._propagationContext}captureException(a,l){let u=l&&l.event_id?l.event_id:(0,p.DM)();if(!this._client)return g.kg.warn("No client configured on scope - will not capture exception!"),u;let d=Error("Sentry syntheticException");return this._client.captureException(a,{originalException:a,syntheticException:d,...l,event_id:u},this),u}captureMessage(a,l,u){let d=u&&u.event_id?u.event_id:(0,p.DM)();if(!this._client)return g.kg.warn("No client configured on scope - will not capture message!"),d;let h=Error(a);return this._client.captureMessage(a,l,{originalException:a,syntheticException:h,...u,event_id:d},this),d}captureEvent(a,l){let u=l&&l.event_id?l.event_id:(0,p.DM)();return this._client?this._client.captureEvent(a,{...l,event_id:u},this):g.kg.warn("No client configured on scope - will not capture event!"),u}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(a=>{a(this)}),this._notifyingListeners=!1)}constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=generatePropagationContext()}};function getGlobalScope(){return d||(d=new Scope),d}function generatePropagationContext(){return{traceId:(0,p.DM)(),spanId:(0,p.DM)().substring(16)}}},690638:function(a,l,u){"use strict";u.d(l,{CT:function(){return updateSession},Hv:function(){return makeSession},RJ:function(){return closeSession}});var d=u(965838),h=u(154291),f=u(662441);function makeSession(a){let l=(0,d.ph)(),u={sid:(0,h.DM)(),init:!0,timestamp:l,started:l,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(0,f.Jr)({sid:"".concat(u.sid),init:u.init,started:new Date(1e3*u.started).toISOString(),timestamp:new Date(1e3*u.timestamp).toISOString(),status:u.status,errors:u.errors,did:"number"==typeof u.did||"string"==typeof u.did?"".concat(u.did):void 0,duration:u.duration,abnormal_mechanism:u.abnormal_mechanism,attrs:{release:u.release,environment:u.environment,ip_address:u.ipAddress,user_agent:u.userAgent}})};return a&&updateSession(u,a),u}function updateSession(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!l.user||(!a.ipAddress&&l.user.ip_address&&(a.ipAddress=l.user.ip_address),a.did||l.did||(a.did=l.user.id||l.user.email||l.user.username)),a.timestamp=l.timestamp||(0,d.ph)(),l.abnormal_mechanism&&(a.abnormal_mechanism=l.abnormal_mechanism),l.ignoreDuration&&(a.ignoreDuration=l.ignoreDuration),l.sid&&(a.sid=32===l.sid.length?l.sid:(0,h.DM)()),void 0!==l.init&&(a.init=l.init),!a.did&&l.did&&(a.did="".concat(l.did)),"number"==typeof l.started&&(a.started=l.started),a.ignoreDuration)a.duration=void 0;else if("number"==typeof l.duration)a.duration=l.duration;else{let l=a.timestamp-a.started;a.duration=l>=0?l:0}l.release&&(a.release=l.release),l.environment&&(a.environment=l.environment),!a.ipAddress&&l.ipAddress&&(a.ipAddress=l.ipAddress),!a.userAgent&&l.userAgent&&(a.userAgent=l.userAgent),"number"==typeof l.errors&&(a.errors=l.errors),l.status&&(a.status=l.status)}function closeSession(a,l){let u={};l?u={status:l}:"ok"===a.status&&(u={status:"exited"}),updateSession(a,u)}},832171:function(a,l,u){"use strict";u.d(l,{_:function(){return getDynamicSamplingContextFromClient},j:function(){return getDynamicSamplingContextFromSpan}});var d=u(662441),h=u(441258),f=u(688965),p=u(364880),g=u(707409);function getDynamicSamplingContextFromClient(a,l,u){let f=l.getOptions(),{publicKey:p}=l.getDsn()||{},{segment:g}=u&&u.getUser()||{},m=(0,d.Jr)({environment:f.environment||h.J,release:f.release,user_segment:g,public_key:p,trace_id:a});return l.emit&&l.emit("createDsc",m),m}function getDynamicSamplingContextFromSpan(a){let l=(0,f.s3)();if(!l)return{};let u=getDynamicSamplingContextFromClient((0,g.XU)(a).trace_id||"",l,(0,f.nZ)()),d=(0,p.G)(a);if(!d)return u;let h=d&&d._frozenDynamicSamplingContext;if(h)return h;let{sampleRate:m,source:v}=d.metadata;null!=m&&(u.sample_rate="".concat(m));let _=(0,g.XU)(d);return v&&"url"!==v&&(u.transaction=_.description),u.sampled=String((0,g.Tt)(d)),l.emit&&l.emit("createDsc",u),u}},341819:function(a,l,u){"use strict";u.d(l,{gi:function(){return applyScopeDataToEvent},yo:function(){return mergeScopeData}});var d=u(662441),h=u(154291),f=u(832171),p=u(364880),g=u(707409);function applyScopeDataToEvent(a,l){let{fingerprint:u,span:m,breadcrumbs:v,sdkProcessingMetadata:_}=l;(function(a,l){let{extra:u,tags:h,user:f,contexts:p,level:g,transactionName:m}=l,v=(0,d.Jr)(u);v&&Object.keys(v).length&&(a.extra={...v,...a.extra});let _=(0,d.Jr)(h);_&&Object.keys(_).length&&(a.tags={..._,...a.tags});let T=(0,d.Jr)(f);T&&Object.keys(T).length&&(a.user={...T,...a.user});let C=(0,d.Jr)(p);C&&Object.keys(C).length&&(a.contexts={...C,...a.contexts}),g&&(a.level=g),m&&(a.transaction=m)})(a,l),m&&function(a,l){a.contexts={trace:(0,g.wy)(l),...a.contexts};let u=(0,p.G)(l);if(u){a.sdkProcessingMetadata={dynamicSamplingContext:(0,f.j)(l),...a.sdkProcessingMetadata};let d=(0,g.XU)(u).description;d&&(a.tags={transaction:d,...a.tags})}}(a,m),a.fingerprint=a.fingerprint?(0,h.lE)(a.fingerprint):[],u&&(a.fingerprint=a.fingerprint.concat(u)),a.fingerprint&&!a.fingerprint.length&&delete a.fingerprint,function(a,l){let u=[...a.breadcrumbs||[],...l];a.breadcrumbs=u.length?u:void 0}(a,v),a.sdkProcessingMetadata={...a.sdkProcessingMetadata,..._}}function mergeScopeData(a,l){let{extra:u,tags:d,user:h,contexts:f,level:p,sdkProcessingMetadata:g,breadcrumbs:m,fingerprint:v,eventProcessors:_,attachments:T,propagationContext:C,transactionName:R,span:B}=l;mergeAndOverwriteScopeData(a,"extra",u),mergeAndOverwriteScopeData(a,"tags",d),mergeAndOverwriteScopeData(a,"user",h),mergeAndOverwriteScopeData(a,"contexts",f),mergeAndOverwriteScopeData(a,"sdkProcessingMetadata",g),p&&(a.level=p),R&&(a.transactionName=R),B&&(a.span=B),m.length&&(a.breadcrumbs=[...a.breadcrumbs,...m]),v.length&&(a.fingerprint=[...a.fingerprint,...v]),_.length&&(a.eventProcessors=[...a.eventProcessors,..._]),T.length&&(a.attachments=[...a.attachments,...T]),a.propagationContext={...a.propagationContext,...C}}function mergeAndOverwriteScopeData(a,l,u){if(u&&Object.keys(u).length)for(let d in a[l]={...a[l]},u)Object.prototype.hasOwnProperty.call(u,d)&&(a[l][d]=u[d])}},364880:function(a,l,u){"use strict";function getRootSpan(a){return a.transaction}u.d(l,{G:function(){return getRootSpan}})},537696:function(a,l,u){"use strict";u.d(l,{R:function(){return prepareEvent},U0:function(){return parseEventHintOrCaptureContext}});var d=u(154291),h=u(965838),f=u(69012),p=u(628621),g=u(887538),m=u(441258),v=u(331246),_=u(534266),T=u(341819),C=u(707409);function prepareEvent(a,l,u,B,V,er){let{normalizeDepth:en=3,normalizeMaxBreadth:ei=1e3}=a,es={...l,event_id:l.event_id||u.event_id||(0,d.DM)(),timestamp:l.timestamp||(0,h.yW)()},eo=u.integrations||a.integrations.map(a=>a.name);(function(a,l){let{environment:u,release:d,dist:h,maxValueLength:p=250}=l;"environment"in a||(a.environment="environment"in l?u:m.J),void 0===a.release&&void 0!==d&&(a.release=d),void 0===a.dist&&void 0!==h&&(a.dist=h),a.message&&(a.message=(0,f.$G)(a.message,p));let g=a.exception&&a.exception.values&&a.exception.values[0];g&&g.value&&(g.value=(0,f.$G)(g.value,p));let v=a.request;v&&v.url&&(v.url=(0,f.$G)(v.url,p))})(es,a),eo.length>0&&(es.sdk=es.sdk||{},es.sdk.integrations=[...es.sdk.integrations||[],...eo]),void 0===l.type&&function(a,l){let u;let d=p.GLOBAL_OBJ._sentryDebugIds;if(!d)return;let h=R.get(l);h?u=h:(u=new Map,R.set(l,u));let f=Object.keys(d).reduce((a,h)=>{let f;let p=u.get(h);p?f=p:(f=l(h),u.set(h,f));for(let l=f.length-1;l>=0;l--){let u=f[l];if(u.filename){a[u.filename]=d[h];break}}return a},{});try{a.exception.values.forEach(a=>{a.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=f[a.filename])})})}catch(a){}}(es,a.stackParser);let ea=function(a,l){if(!l)return a;let u=a?a.clone():new _.sX;return u.update(l),u}(B,u.captureContext);u.mechanism&&(0,d.EG)(es,u.mechanism);let el=V&&V.getEventProcessors?V.getEventProcessors():[],ec=(0,_.lW)().getScopeData();if(er){let a=er.getScopeData();(0,T.yo)(ec,a)}if(ea){let a=ea.getScopeData();(0,T.yo)(ec,a)}let eu=[...u.attachments||[],...ec.attachments];eu.length&&(u.attachments=eu),(0,T.gi)(es,ec);let ed=[...el,...(0,v.fH)(),...ec.eventProcessors],eh=(0,v.RP)(ed,es,u);return eh.then(a=>(a&&function(a){let l={};try{a.exception.values.forEach(a=>{a.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?l[a.abs_path]=a.debug_id:a.filename&&(l[a.filename]=a.debug_id),delete a.debug_id)})})}catch(a){}if(0===Object.keys(l).length)return;a.debug_meta=a.debug_meta||{},a.debug_meta.images=a.debug_meta.images||[];let u=a.debug_meta.images;Object.keys(l).forEach(a=>{u.push({type:"sourcemap",code_file:a,debug_id:l[a]})})}(a),"number"==typeof en&&en>0)?function(a,l,u){if(!a)return null;let d={...a,...a.breadcrumbs&&{breadcrumbs:a.breadcrumbs.map(a=>({...a,...a.data&&{data:(0,g.Fv)(a.data,l,u)}}))},...a.user&&{user:(0,g.Fv)(a.user,l,u)},...a.contexts&&{contexts:(0,g.Fv)(a.contexts,l,u)},...a.extra&&{extra:(0,g.Fv)(a.extra,l,u)}};return a.contexts&&a.contexts.trace&&d.contexts&&(d.contexts.trace=a.contexts.trace,a.contexts.trace.data&&(d.contexts.trace.data=(0,g.Fv)(a.contexts.trace.data,l,u))),a.spans&&(d.spans=a.spans.map(a=>{let d=(0,C.XU)(a).data;return d&&(a.data=(0,g.Fv)(d,l,u)),a})),d}(a,en,ei):a)}let R=new WeakMap;function parseEventHintOrCaptureContext(a){return a?a instanceof _.sX||"function"==typeof a||Object.keys(a).some(a=>B.includes(a))?{captureContext:a}:a:void 0}let B=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},707409:function(a,l,u){"use strict";u.d(l,{$k:function(){return spanTimeInputToSeconds},Hb:function(){return spanToTraceHeader},Tt:function(){return spanIsSampled},XU:function(){return spanToJSON},i0:function(){return g},ve:function(){return p},wy:function(){return spanToTraceContext}});var d=u(662441),h=u(223283),f=u(965838);let p=0,g=1;function spanToTraceContext(a){let{spanId:l,traceId:u}=a.spanContext(),{data:h,op:f,parent_span_id:p,status:g,tags:m,origin:v}=spanToJSON(a);return(0,d.Jr)({data:h,op:f,parent_span_id:p,span_id:l,status:g,tags:m,trace_id:u,origin:v})}function spanToTraceHeader(a){let{traceId:l,spanId:u}=a.spanContext(),d=spanIsSampled(a);return(0,h.$p)(l,u,d)}function spanTimeInputToSeconds(a){return"number"==typeof a?ensureTimestampInSeconds(a):Array.isArray(a)?a[0]+a[1]/1e9:a instanceof Date?ensureTimestampInSeconds(a.getTime()):(0,f.ph)()}function ensureTimestampInSeconds(a){return a>9999999999?a/1e3:a}function spanToJSON(a){return"function"==typeof a.getSpanJSON?a.getSpanJSON():"function"==typeof a.toJSON?a.toJSON():{}}function spanIsSampled(a){let{traceFlags:l}=a.spanContext();return!!(l&g)}},408715:function(a,l,u){"use strict";u.d(l,{J:function(){return d}});let d="7.101.1"},429670:function(a,l,u){"use strict";let d,h,f,p,g,m,v,_,T,C,R,B,V,er,en,ei,es,eo,ea,el;var ec,eu,ed,eh,ef,ep,eg,em,ev,e_,ey={};u.r(ey),u.d(ey,{FunctionToString:function(){return eP},InboundFilters:function(){return eD},LinkedErrors:function(){return e$}});var eb={};u.r(eb),u.d(eb,{Breadcrumbs:function(){return ti},Dedupe:function(){return tu},GlobalHandlers:function(){return e1},HttpContext:function(){return tl},LinkedErrors:function(){return to},TryCatch:function(){return e5}});var ew=u(408715);function applySdkMetadata(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[l],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"npm",h=a._metadata||{};h.sdk||(h.sdk={name:"sentry.javascript.".concat(l),packages:u.map(a=>({name:"".concat(d,":@sentry/").concat(a),version:ew.J})),version:ew.J}),a._metadata=h}var eS=u(688965);function hasTracingEnabled_hasTracingEnabled(a){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let l=(0,eS.s3)(),u=a||l&&l.getOptions();return!!u&&(u.enableTracing||"tracesSampleRate"in u||"tracesSampler"in u)}var eE=u(662441),ek=u(154291),eT=u(466193),ex=u(849686),eC=u(331246),eR=u(860805);let eI=[];function afterSetupIntegrations(a,l){for(let u of l)u&&u.afterAllSetup&&u.afterAllSetup(a)}function setupIntegration(a,l,u){if(u[l.name]){ex.X&&eT.kg.log("Integration skipped because it was already installed: ".concat(l.name));return}if(u[l.name]=l,-1===eI.indexOf(l.name)&&(l.setupOnce(eC.cc,eR.Gd),eI.push(l.name)),l.setup&&"function"==typeof l.setup&&l.setup(a),a.on&&"function"==typeof l.preprocessEvent){let u=l.preprocessEvent.bind(l);a.on("preprocessEvent",(l,d)=>u(l,d,a))}if(a.addEventProcessor&&"function"==typeof l.processEvent){let u=l.processEvent.bind(l),d=Object.assign((l,d)=>u(l,d,a),{id:l.name});a.addEventProcessor(d)}ex.X&&eT.kg.log("Integration installed: ".concat(l.name))}function convertIntegrationFnToClass(a,l){return Object.assign(function(){for(var a=arguments.length,u=Array(a),d=0;d<a;d++)u[d]=arguments[d];return l(...u)},{id:a})}let eA="FunctionToString",eO=new WeakMap,functionToStringIntegration=()=>({name:eA,setupOnce(){d=Function.prototype.toString;try{Function.prototype.toString=function(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];let h=(0,eE.HK)(this),f=eO.has((0,eS.s3)())&&void 0!==h?h:this;return d.apply(f,l)}}catch(a){}},setup(a){eO.set(a,!0)}}),eP=convertIntegrationFnToClass(eA,functionToStringIntegration);var eL=u(69012);let eM=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],eN=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],eF="InboundFilters",inboundFiltersIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{name:eF,setupOnce(){},processEvent(l,u,d){var h;let f=d.getOptions(),p=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[...a.allowUrls||[],...l.allowUrls||[]],denyUrls:[...a.denyUrls||[],...l.denyUrls||[]],ignoreErrors:[...a.ignoreErrors||[],...l.ignoreErrors||[],...a.disableErrorDefaults?[]:eM],ignoreTransactions:[...a.ignoreTransactions||[],...l.ignoreTransactions||[],...a.disableTransactionDefaults?[]:eN],ignoreInternal:void 0===a.ignoreInternal||a.ignoreInternal}}(a,f);return(p.ignoreInternal&&function(a){try{return"SentryError"===a.exception.values[0].type}catch(a){}return!1}(l)?(ex.X&&eT.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat((0,ek.jH)(l))),0):(h=p.ignoreErrors,!l.type&&h&&h.length&&(function(a){let l;let u=[];a.message&&u.push(a.message);try{l=a.exception.values[a.exception.values.length-1]}catch(a){}return l&&l.value&&(u.push(l.value),l.type&&u.push("".concat(l.type,": ").concat(l.value))),ex.X&&0===u.length&&eT.kg.error("Could not extract message for event ".concat((0,ek.jH)(a))),u})(l).some(a=>(0,eL.U0)(a,h)))?(ex.X&&eT.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat((0,ek.jH)(l))),0):!function(a,l){if("transaction"!==a.type||!l||!l.length)return!1;let u=a.transaction;return!!u&&(0,eL.U0)(u,l)}(l,p.ignoreTransactions)?!function(a,l){if(!l||!l.length)return!1;let u=_getEventFilterUrl(a);return!!u&&(0,eL.U0)(u,l)}(l,p.denyUrls)?function(a,l){if(!l||!l.length)return!0;let u=_getEventFilterUrl(a);return!u||(0,eL.U0)(u,l)}(l,p.allowUrls)||(ex.X&&eT.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat((0,ek.jH)(l),".\nUrl: ").concat(_getEventFilterUrl(l))),0):(ex.X&&eT.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat((0,ek.jH)(l),".\nUrl: ").concat(_getEventFilterUrl(l))),0):(ex.X&&eT.kg.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat((0,ek.jH)(l))),0))?l:null}}},eD=convertIntegrationFnToClass(eF,inboundFiltersIntegration);function _getEventFilterUrl(a){try{let l;try{l=a.exception.values[0].stacktrace.frames}catch(a){}return l?function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let l=a.length-1;l>=0;l--){let u=a[l];if(u&&"<anonymous>"!==u.filename&&"[native code]"!==u.filename)return u.filename||null}return null}(l):null}catch(l){return ex.X&&eT.kg.error("Cannot extract url for event ".concat((0,ek.jH)(a))),null}}var ej=u(198102);function applyAggregateErrorsToEvent(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,d=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,f=arguments.length>5?arguments[5]:void 0,p=arguments.length>6?arguments[6]:void 0;if(!f.exception||!f.exception.values||!p||!(0,ej.V9)(p.originalException,Error))return;let g=f.exception.values.length>0?f.exception.values[f.exception.values.length-1]:void 0;g&&(f.exception.values=(function aggregateExceptionsFromError(a,l,u,d,h,f,p,g){if(f.length>=u+1)return f;let m=[...f];if((0,ej.V9)(d[h],Error)){applyExceptionGroupFieldsForParentException(p,g);let f=a(l,d[h]),v=m.length;applyExceptionGroupFieldsForChildException(f,h,v,g),m=aggregateExceptionsFromError(a,l,u,d[h],h,[f,...m],f,v)}return Array.isArray(d.errors)&&d.errors.forEach((d,f)=>{if((0,ej.V9)(d,Error)){applyExceptionGroupFieldsForParentException(p,g);let v=a(l,d),_=m.length;applyExceptionGroupFieldsForChildException(v,"errors[".concat(f,"]"),_,g),m=aggregateExceptionsFromError(a,l,u,d,h,[v,...m],v,_)}}),m})(a,l,h,p.originalException,d,f.exception.values,g,0).map(a=>(a.value&&(a.value=(0,eL.$G)(a.value,u)),a)))}function applyExceptionGroupFieldsForParentException(a,l){a.mechanism=a.mechanism||{type:"generic",handled:!0},a.mechanism={...a.mechanism,is_exception_group:!0,exception_id:l}}function applyExceptionGroupFieldsForChildException(a,l,u,d){a.mechanism=a.mechanism||{type:"generic",handled:!0},a.mechanism={...a.mechanism,type:"chained",source:l,exception_id:u,parent_id:d}}function exceptionFromError(a,l){let u={type:l.name||l.constructor.name,value:l.message},d=a(l.stack||"",1);return d.length&&(u.stacktrace={frames:d}),u}let eB="LinkedErrors",e$=convertIntegrationFnToClass(eB,function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=a.limit||5,u=a.key||"cause";return{name:eB,setupOnce(){},preprocessEvent(a,d,h){let f=h.getOptions();applyAggregateErrorsToEvent(exceptionFromError,f.stackParser,f.maxValueLength,u,l,a,d)}}});var eU=u(628621);let eH=eU.GLOBAL_OBJ,eq=0;function wrap(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;if("function"!=typeof a)return a;try{let l=a.__sentry_wrapped__;if(l)return l;if((0,eE.HK)(a))return a}catch(l){return a}let sentryWrapped=function(){let d=Array.prototype.slice.call(arguments);try{u&&"function"==typeof u&&u.apply(this,arguments);let h=d.map(a=>wrap(a,l));return a.apply(this,h)}catch(a){throw eq++,setTimeout(()=>{eq--}),(0,eS.$e)(u=>{u.addEventProcessor(a=>(l.mechanism&&((0,ek.Db)(a,void 0,void 0),(0,ek.EG)(a,l.mechanism)),a.extra={...a.extra,arguments:d},a)),(0,eS.Tb)(a)}),a}};try{for(let l in a)Object.prototype.hasOwnProperty.call(a,l)&&(sentryWrapped[l]=a[l])}catch(a){}(0,eE.$Q)(sentryWrapped,a),(0,eE.xp)(a,"__sentry_wrapped__",sentryWrapped);try{let l=Object.getOwnPropertyDescriptor(sentryWrapped,"name");l.configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>a.name})}catch(a){}return sentryWrapped}var ez=u(771312),eW=u(903789);let eV={},eG={};function addHandler(a,l){eV[a]=eV[a]||[],eV[a].push(l)}function maybeInstrument(a,l){eG[a]||(l(),eG[a]=!0)}function triggerHandlers(a,l){let u=a&&eV[a];if(u)for(let d of u)try{d(l)}catch(l){ez.X&&eT.kg.error("Error while triggering instrumentation handler.\nType: ".concat(a,"\nName: ").concat((0,eW.$P)(d),"\nError:"),l)}}let eJ=null;function addGlobalErrorInstrumentationHandler(a){let l="error";addHandler(l,a),maybeInstrument(l,instrumentError)}function instrumentError(){eJ=eU.GLOBAL_OBJ.onerror,eU.GLOBAL_OBJ.onerror=function(a,l,u,d,h){return triggerHandlers("error",{column:d,error:h,line:u,msg:a,url:l}),!!eJ&&!eJ.__SENTRY_LOADER__&&eJ.apply(this,arguments)},eU.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let eK=null;function addGlobalUnhandledRejectionInstrumentationHandler(a){let l="unhandledrejection";addHandler(l,a),maybeInstrument(l,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){eK=eU.GLOBAL_OBJ.onunhandledrejection,eU.GLOBAL_OBJ.onunhandledrejection=function(a){return triggerHandlers("unhandledrejection",a),!eK||!!eK.__SENTRY_LOADER__||eK.apply(this,arguments)},eU.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var eX=u(255390),eY=u(887538),eZ=u(837190);function eventbuilder_exceptionFromError(a,l){let u=eventbuilder_parseStackFrames(a,l),d={type:l&&l.name,value:function(a){let l=a&&a.message;return l?l.error&&"string"==typeof l.error.message?l.error.message:l:"No error message"}(l)};return u.length&&(d.stacktrace={frames:u}),void 0===d.type&&""===d.value&&(d.value="Unrecoverable error caught"),d}function eventFromError(a,l){return{exception:{values:[eventbuilder_exceptionFromError(a,l)]}}}function eventbuilder_parseStackFrames(a,l){let u=l.stacktrace||l.stack||"",d=function(a){if(a){if("number"==typeof a.framesToPop)return a.framesToPop;if(eQ.test(a.message))return 1}return 0}(l);try{return a(u,d)}catch(a){}return[]}let eQ=/Minified React error #\d+;/i;function eventbuilder_eventFromUnknownInput(a,l,u,d,h){let f;if((0,ej.VW)(l)&&l.error)return eventFromError(a,l.error);if((0,ej.TX)(l)||(0,ej.fm)(l)){if("stack"in l)f=eventFromError(a,l);else{let h=l.name||((0,ej.TX)(l)?"DOMError":"DOMException"),p=l.message?"".concat(h,": ").concat(l.message):h;f=eventFromString(a,p,u,d),(0,ek.Db)(f,p)}return"code"in l&&(f.tags={...f.tags,"DOMException.code":"".concat(l.code)}),f}return(0,ej.VZ)(l)?eventFromError(a,l):((0,ej.PO)(l)||(0,ej.cO)(l)?f=function(a,l,u,d){let h=(0,eS.s3)(),f=h&&h.getOptions().normalizeDepth,p={exception:{values:[{type:(0,ej.cO)(l)?l.constructor.name:d?"UnhandledRejection":"Error",value:function(a,l){let{isUnhandledRejection:u}=l,d=(0,eE.zf)(a),h=u?"promise rejection":"exception";if((0,ej.VW)(a))return"Event `ErrorEvent` captured as ".concat(h," with message `").concat(a.message,"`");if((0,ej.cO)(a)){let l=function(a){try{let l=Object.getPrototypeOf(a);return l?l.constructor.name:void 0}catch(a){}}(a);return"Event `".concat(l,"` (type=").concat(a.type,") captured as ").concat(h)}return"Object captured as ".concat(h," with keys: ").concat(d)}(l,{isUnhandledRejection:d})}]},extra:{__serialized__:(0,eY.Qy)(l,f)}};if(u){let l=eventbuilder_parseStackFrames(a,u);l.length&&(p.exception.values[0].stacktrace={frames:l})}return p}(a,l,u,h):(f=eventFromString(a,l,u,d),(0,ek.Db)(f,"".concat(l),void 0)),(0,ek.EG)(f,{synthetic:!0}),f)}function eventFromString(a,l,u,d){let h={};if(d&&u){let d=eventbuilder_parseStackFrames(a,u);d.length&&(h.exception={values:[{value:l,stacktrace:{frames:d}}]})}if((0,ej.Le)(l)){let{__sentry_template_string__:a,__sentry_template_values__:u}=l;return h.logentry={message:a,params:u},h}return h.message=l,h}let e0="GlobalHandlers",globalHandlersIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={onerror:!0,onunhandledrejection:!0,...a};return{name:e0,setupOnce(){Error.stackTraceLimit=50},setup(a){l.onerror&&addGlobalErrorInstrumentationHandler(l=>{let{stackParser:u,attachStacktrace:d}=getOptions();if((0,eS.s3)()!==a||eq>0)return;let{msg:h,url:f,line:p,column:g,error:m}=l,v=void 0===m&&(0,ej.HD)(h)?function(a,l,u,d){let h=(0,ej.VW)(a)?a.message:a,f="Error",p=h.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);p&&(f=p[1],h=p[2]);let g={exception:{values:[{type:f,value:h}]}};return _enhanceEventWithInitialFrame(g,l,u,d)}(h,f,p,g):_enhanceEventWithInitialFrame(eventbuilder_eventFromUnknownInput(u,m||h,void 0,d,!1),f,p,g);v.level="error",(0,eS.eN)(v,{originalException:m,mechanism:{handled:!1,type:"onerror"}})}),l.onunhandledrejection&&addGlobalUnhandledRejectionInstrumentationHandler(l=>{let{stackParser:u,attachStacktrace:d}=getOptions();if((0,eS.s3)()!==a||eq>0)return;let h=function(a){if((0,ej.pt)(a))return a;try{if("reason"in a)return a.reason;if("detail"in a&&"reason"in a.detail)return a.detail.reason}catch(a){}return a}(l),f=(0,ej.pt)(h)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(h))}]}}:eventbuilder_eventFromUnknownInput(u,h,void 0,d,!0);f.level="error",(0,eS.eN)(f,{originalException:h,mechanism:{handled:!1,type:"onunhandledrejection"}})})}}},e1=convertIntegrationFnToClass(e0,globalHandlersIntegration);function _enhanceEventWithInitialFrame(a,l,u,d){let h=a.exception=a.exception||{},f=h.values=h.values||[],p=f[0]=f[0]||{},g=p.stacktrace=p.stacktrace||{},m=g.frames=g.frames||[],v=isNaN(parseInt(d,10))?void 0:d,_=isNaN(parseInt(u,10))?void 0:u,T=(0,ej.HD)(l)&&l.length>0?l:(0,eX.l4)();return 0===m.length&&m.push({colno:v,filename:T,function:"?",in_app:!0,lineno:_}),a}function getOptions(){let a=(0,eS.s3)(),l=a&&a.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return l}let e2=["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"],e3="TryCatch",browserApiErrorsIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...a};return{name:e3,setupOnce(){l.setTimeout&&(0,eE.hl)(eH,"setTimeout",_wrapTimeFunction),l.setInterval&&(0,eE.hl)(eH,"setInterval",_wrapTimeFunction),l.requestAnimationFrame&&(0,eE.hl)(eH,"requestAnimationFrame",_wrapRAF),l.XMLHttpRequest&&"XMLHttpRequest"in eH&&(0,eE.hl)(XMLHttpRequest.prototype,"send",_wrapXHR);let a=l.eventTarget;if(a){let l=Array.isArray(a)?a:e2;l.forEach(_wrapEventTarget)}}}},e5=convertIntegrationFnToClass(e3,browserApiErrorsIntegration);function _wrapTimeFunction(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=u[0];return u[0]=wrap(h,{mechanism:{data:{function:(0,eW.$P)(a)},handled:!1,type:"instrument"}}),a.apply(this,u)}}function _wrapRAF(a){return function(l){return a.apply(this,[wrap(l,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,eW.$P)(a)},handled:!1,type:"instrument"}})])}}function _wrapXHR(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in h&&"function"==typeof h[a]&&(0,eE.hl)(h,a,function(l){let u={mechanism:{data:{function:a,handler:(0,eW.$P)(l)},handled:!1,type:"instrument"}},d=(0,eE.HK)(l);return d&&(u.mechanism.data.handler=(0,eW.$P)(d)),wrap(l,u)})}),a.apply(this,u)}}function _wrapEventTarget(a){let l=eH[a]&&eH[a].prototype;l&&l.hasOwnProperty&&l.hasOwnProperty("addEventListener")&&((0,eE.hl)(l,"addEventListener",function(l){return function(u,d,h){try{"function"==typeof d.handleEvent&&(d.handleEvent=wrap(d.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,eW.$P)(d),target:a},handled:!1,type:"instrument"}}))}catch(a){}return l.apply(this,[u,wrap(d,{mechanism:{data:{function:"addEventListener",handler:(0,eW.$P)(d),target:a},handled:!1,type:"instrument"}}),h])}}),(0,eE.hl)(l,"removeEventListener",function(a){return function(l,u,d){try{let h=u&&u.__sentry_wrapped__;h&&a.call(this,l,h,d)}catch(a){}return a.call(this,l,u,d)}}))}function instrumentConsole(){"console"in eU.GLOBAL_OBJ&&eT.RU.forEach(function(a){a in eU.GLOBAL_OBJ.console&&(0,eE.hl)(eU.GLOBAL_OBJ.console,a,function(l){return eT.LD[a]=l,function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];triggerHandlers("console",{args:u,level:a});let h=eT.LD[a];h&&h.apply(eU.GLOBAL_OBJ.console,u)}})})}let e6=eU.GLOBAL_OBJ;function addClickKeypressInstrumentationHandler(a){addHandler("dom",a),maybeInstrument("dom",instrumentDOM)}function instrumentDOM(){if(!e6.document)return;let a=triggerHandlers.bind(null,"dom"),l=makeDOMEventHandler(a,!0);e6.document.addEventListener("click",l,!1),e6.document.addEventListener("keypress",l,!1),["EventTarget","Node"].forEach(l=>{let u=e6[l]&&e6[l].prototype;u&&u.hasOwnProperty&&u.hasOwnProperty("addEventListener")&&((0,eE.hl)(u,"addEventListener",function(l){return function(u,d,h){if("click"===u||"keypress"==u)try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[u]=d[u]||{refCount:0};if(!f.handler){let d=makeDOMEventHandler(a);f.handler=d,l.call(this,u,d,h)}f.refCount++}catch(a){}return l.call(this,u,d,h)}}),(0,eE.hl)(u,"removeEventListener",function(a){return function(l,u,d){if("click"===l||"keypress"==l)try{let u=this.__sentry_instrumentation_handlers__||{},h=u[l];h&&(h.refCount--,h.refCount<=0&&(a.call(this,l,h.handler,d),h.handler=void 0,delete u[l]),0===Object.keys(u).length&&delete this.__sentry_instrumentation_handlers__)}catch(a){}return a.call(this,l,u,d)}}))})}function makeDOMEventHandler(a){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return u=>{if(!u||u._sentryCaptured)return;let d=function(a){try{return a.target}catch(a){return null}}(u);if("keypress"===u.type&&(!d||!d.tagName||"INPUT"!==d.tagName&&"TEXTAREA"!==d.tagName&&!d.isContentEditable))return;(0,eE.xp)(u,"_sentryCaptured",!0),d&&!d._sentryId&&(0,eE.xp)(d,"_sentryId",(0,ek.DM)());let g="keypress"===u.type?"input":u.type;!function(a){if(a.type!==f)return!1;try{if(!a.target||a.target._sentryId!==p)return!1}catch(a){}return!0}(u)&&(a({event:u,name:g,global:l}),f=u.type,p=d?d._sentryId:void 0),clearTimeout(h),h=e6.setTimeout(()=>{p=void 0,f=void 0},1e3)}}let e8=eU.GLOBAL_OBJ,e4="__sentry_xhr_v3__";function addXhrInstrumentationHandler(a){addHandler("xhr",a),maybeInstrument("xhr",instrumentXHR)}function instrumentXHR(){if(!e8.XMLHttpRequest)return;let a=XMLHttpRequest.prototype;(0,eE.hl)(a,"open",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=Date.now(),f=(0,ej.HD)(u[0])?u[0].toUpperCase():void 0,p=function(a){if((0,ej.HD)(a))return a;try{return a.toString()}catch(a){}}(u[1]);if(!f||!p)return a.apply(this,u);this[e4]={method:f,url:p,request_headers:{}},"POST"===f&&p.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let onreadystatechangeHandler=()=>{let a=this[e4];if(a&&4===this.readyState){try{a.status_code=this.status}catch(a){}let l={args:[f,p],endTimestamp:Date.now(),startTimestamp:h,xhr:this};triggerHandlers("xhr",l)}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,eE.hl)(this,"onreadystatechange",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];return onreadystatechangeHandler(),a.apply(this,u)}}):this.addEventListener("readystatechange",onreadystatechangeHandler),(0,eE.hl)(this,"setRequestHeader",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let[h,f]=u,p=this[e4];return p&&(0,ej.HD)(h)&&(0,ej.HD)(f)&&(p.request_headers[h.toLowerCase()]=f),a.apply(this,u)}}),a.apply(this,u)}}),(0,eE.hl)(a,"send",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=this[e4];if(!h)return a.apply(this,u);void 0!==u[0]&&(h.body=u[0]);let f={args:[h.method,h.url],startTimestamp:Date.now(),xhr:this};return triggerHandlers("xhr",f),a.apply(this,u)}})}let e9=(0,eU.R)();function supportsFetch(){if(!("fetch"in e9))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(a){return!1}}function isNativeFetch(a){return a&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(a.toString())}function addFetchInstrumentationHandler(a){let l="fetch";addHandler(l,a),maybeInstrument(l,instrumentFetch)}function instrumentFetch(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!supportsFetch())return!1;if(isNativeFetch(e9.fetch))return!0;let a=!1,l=e9.document;if(l&&"function"==typeof l.createElement)try{let u=l.createElement("iframe");u.hidden=!0,l.head.appendChild(u),u.contentWindow&&u.contentWindow.fetch&&(a=isNativeFetch(u.contentWindow.fetch)),l.head.removeChild(u)}catch(a){ez.X&&eT.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return a})()&&(0,eE.hl)(eU.GLOBAL_OBJ,"fetch",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let{method:h,url:f}=function(a){if(0===a.length)return{method:"GET",url:""};if(2===a.length){let[l,u]=a;return{url:getUrlFromResource(l),method:hasProp(u,"method")?String(u.method).toUpperCase():"GET"}}let l=a[0];return{url:getUrlFromResource(l),method:hasProp(l,"method")?String(l.method).toUpperCase():"GET"}}(u),p={args:u,fetchData:{method:h,url:f},startTimestamp:Date.now()};return triggerHandlers("fetch",{...p}),a.apply(eU.GLOBAL_OBJ,u).then(a=>{let l={...p,endTimestamp:Date.now(),response:a};return triggerHandlers("fetch",l),a},a=>{let l={...p,endTimestamp:Date.now(),error:a};throw triggerHandlers("fetch",l),a})}})}function hasProp(a,l){return!!a&&"object"==typeof a&&!!a[l]}function getUrlFromResource(a){return"string"==typeof a?a:a?hasProp(a,"url")?a.url:a.toString?a.toString():"":""}let e7=(0,eU.R)(),tt=eU.GLOBAL_OBJ;function addHistoryInstrumentationHandler(a){let l="history";addHandler(l,a),maybeInstrument(l,instrumentHistory)}function instrumentHistory(){if(!function(){let a=e7.chrome,l=a&&a.app&&a.app.runtime,u="history"in e7&&!!e7.history.pushState&&!!e7.history.replaceState;return!l&&u}())return;let a=tt.onpopstate;function historyReplacementFunction(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=u.length>2?u[2]:void 0;if(h){let a=g,l=String(h);g=l,triggerHandlers("history",{from:a,to:l})}return a.apply(this,u)}}tt.onpopstate=function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];let h=tt.location.href,f=g;if(g=h,triggerHandlers("history",{from:f,to:h}),a)try{return a.apply(this,u)}catch(a){}},(0,eE.hl)(tt.history,"pushState",historyReplacementFunction),(0,eE.hl)(tt.history,"replaceState",historyReplacementFunction)}let tr=["fatal","error","warning","log","info","debug"];function url_parseUrl(a){if(!a)return{};let l=a.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!l)return{};let u=l[6]||"",d=l[8]||"";return{host:l[4],path:l[5],protocol:l[2],search:u,hash:d,relative:l[5]+u+d}}let tn="Breadcrumbs",breadcrumbsIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...a};return{name:tn,setupOnce(){},setup(a){var u;l.console&&function(a){let l="console";addHandler(l,a),maybeInstrument(l,instrumentConsole)}(function(l){var u;if((0,eS.s3)()!==a)return;let d={category:"console",data:{arguments:l.args,logger:"console"},level:"warn"===(u=l.level)?"warning":tr.includes(u)?u:"log",message:(0,eL.nK)(l.args," ")};if("assert"===l.level){if(!1!==l.args[0])return;d.message="Assertion failed: ".concat((0,eL.nK)(l.args.slice(1)," ")||"console.assert"),d.data.arguments=l.args.slice(1)}(0,eS.n_)(d,{input:l.args,level:l.level})}),l.dom&&addClickKeypressInstrumentationHandler((u=l.dom,function(l){let d,h;if((0,eS.s3)()!==a)return;let f="object"==typeof u?u.serializeAttribute:void 0,p="object"==typeof u&&"number"==typeof u.maxStringLength?u.maxStringLength:void 0;p&&p>1024&&(p=1024),"string"==typeof f&&(f=[f]);try{let a=l.event,u=a&&a.target?a.target:a;d=(0,eX.Rt)(u,{keyAttrs:f,maxStringLength:p}),h=(0,eX.iY)(u)}catch(a){d="<unknown>"}if(0===d.length)return;let g={category:"ui.".concat(l.name),message:d};h&&(g.data={"ui.component_name":h}),(0,eS.n_)(g,{event:l.event,name:l.name,global:l.global})})),l.xhr&&addXhrInstrumentationHandler(function(l){if((0,eS.s3)()!==a)return;let{startTimestamp:u,endTimestamp:d}=l,h=l.xhr[e4];if(!u||!d||!h)return;let{method:f,url:p,status_code:g,body:m}=h,v={xhr:l.xhr,input:m,startTimestamp:u,endTimestamp:d};(0,eS.n_)({category:"xhr",data:{method:f,url:p,status_code:g},type:"http"},v)}),l.fetch&&addFetchInstrumentationHandler(function(l){if((0,eS.s3)()!==a)return;let{startTimestamp:u,endTimestamp:d}=l;if(!(!d||l.fetchData.url.match(/sentry_key/)&&"POST"===l.fetchData.method)){if(l.error){let a=l.fetchData,h={data:l.error,input:l.args,startTimestamp:u,endTimestamp:d};(0,eS.n_)({category:"fetch",data:a,level:"error",type:"http"},h)}else{let a=l.response,h={...l.fetchData,status_code:a&&a.status},f={input:l.args,response:a,startTimestamp:u,endTimestamp:d};(0,eS.n_)({category:"fetch",data:h,type:"http"},f)}}}),l.history&&addHistoryInstrumentationHandler(function(l){if((0,eS.s3)()!==a)return;let u=l.from,d=l.to,h=url_parseUrl(eH.location.href),f=u?url_parseUrl(u):void 0,p=url_parseUrl(d);f&&f.path||(f=h),h.protocol===p.protocol&&h.host===p.host&&(d=p.relative),h.protocol===f.protocol&&h.host===f.host&&(u=f.relative),(0,eS.n_)({category:"navigation",data:{from:u,to:d}})}),l.sentry&&a.on&&a.on("beforeSendEvent",function(l){(0,eS.s3)()===a&&(0,eS.n_)({category:"sentry.".concat("transaction"===l.type?"transaction":"event"),event_id:l.event_id,level:l.level,message:(0,ek.jH)(l)},{event:l})})}}},ti=convertIntegrationFnToClass(tn,breadcrumbsIntegration),ts="LinkedErrors",integrations_linkederrors_linkedErrorsIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=a.limit||5,u=a.key||"cause";return{name:ts,setupOnce(){},preprocessEvent(a,d,h){let f=h.getOptions();applyAggregateErrorsToEvent(eventbuilder_exceptionFromError,f.stackParser,f.maxValueLength,u,l,a,d)}}},to=convertIntegrationFnToClass(ts,integrations_linkederrors_linkedErrorsIntegration),ta="HttpContext",httpContextIntegration=()=>({name:ta,setupOnce(){},preprocessEvent(a){if(!eH.navigator&&!eH.location&&!eH.document)return;let l=a.request&&a.request.url||eH.location&&eH.location.href,{referrer:u}=eH.document||{},{userAgent:d}=eH.navigator||{},h={...a.request&&a.request.headers,...u&&{Referer:u},...d&&{"User-Agent":d}},f={...a.request,...l&&{url:l},headers:h};a.request=f}}),tl=convertIntegrationFnToClass(ta,httpContextIntegration),tc="Dedupe",dedupeIntegration=()=>{let a;return{name:tc,setupOnce(){},processEvent(l){if(l.type)return l;try{var u;if((u=a)&&(function(a,l){let u=a.message,d=l.message;return!!((u||d)&&(!u||d)&&(u||!d)&&u===d&&_isSameFingerprint(a,l)&&_isSameStacktrace(a,l))}(l,u)||function(a,l){let u=_getExceptionFromEvent(l),d=_getExceptionFromEvent(a);return!!(u&&d&&u.type===d.type&&u.value===d.value&&_isSameFingerprint(a,l)&&_isSameStacktrace(a,l))}(l,u)))return null}catch(a){}return a=l}}},tu=convertIntegrationFnToClass(tc,dedupeIntegration);function _isSameStacktrace(a,l){let u=_getFramesFromEvent(a),d=_getFramesFromEvent(l);if(!u&&!d)return!0;if(u&&!d||!u&&d||d.length!==u.length)return!1;for(let a=0;a<d.length;a++){let l=d[a],h=u[a];if(l.filename!==h.filename||l.lineno!==h.lineno||l.colno!==h.colno||l.function!==h.function)return!1}return!0}function _isSameFingerprint(a,l){let u=a.fingerprint,d=l.fingerprint;if(!u&&!d)return!0;if(u&&!d||!u&&d)return!1;try{return!(u.join("")!==d.join(""))}catch(a){return!1}}function _getExceptionFromEvent(a){return a.exception&&a.exception.values&&a.exception.values[0]}function _getFramesFromEvent(a){let l=a.exception;if(l)try{return l.values[0].stacktrace.frames}catch(a){}}let td={};eH.Sentry&&eH.Sentry.Integrations&&(td=eH.Sentry.Integrations);let th={...td,...ey,...eb},tf=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function dsn_dsnToString(a){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{host:u,path:d,pass:h,port:f,projectId:p,protocol:g,publicKey:m}=a;return"".concat(g,"://").concat(m).concat(l&&h?":".concat(h):"")+"@".concat(u).concat(f?":".concat(f):"","/").concat(d?"".concat(d,"/"):d).concat(p)}function dsnFromString(a){let l=tf.exec(a);if(!l){(0,eT.Cf)(()=>{console.error("Invalid Sentry Dsn: ".concat(a))});return}let[u,d,h="",f,p="",g]=l.slice(1),m="",v=g,_=v.split("/");if(_.length>1&&(m=_.slice(0,-1).join("/"),v=_.pop()),v){let a=v.match(/^\d+/);a&&(v=a[0])}return dsnFromComponents({host:f,pass:h,path:m,projectId:v,port:p,protocol:u,publicKey:d})}function dsnFromComponents(a){return{protocol:a.protocol,publicKey:a.publicKey||"",pass:a.pass||"",host:a.host,port:a.port||"",path:a.path||"",projectId:a.projectId}}function createEnvelope(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[a,l]}function forEachEnvelopeItem(a,l){let u=a[1];for(let a of u){let u=a[0].type,d=l(a,u);if(d)return!0}return!1}function encodeUTF8(a,l){let u=l||new TextEncoder;return u.encode(a)}let tp={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",statsd:"unknown"};function getSdkMetadataForEnvelopeHeader(a){if(!a||!a.sdk)return;let{name:l,version:u}=a.sdk;return{name:l,version:u}}function createEventEnvelopeHeaders(a,l,u,d){let h=a.sdkProcessingMetadata&&a.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:a.event_id,sent_at:new Date().toISOString(),...l&&{sdk:l},...!!u&&d&&{dsn:dsn_dsnToString(d)},...h&&{trace:(0,eE.Jr)({...h})}}}let SentryError=class SentryError extends Error{constructor(a,l="warn"){super(a),this.message=a,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=l}};var tg=u(690638),tm=u(832171),tv=u(537696);let t_="Not capturing exception because it's already been captured.";let BaseClient=class BaseClient{captureException(a,l,u){if((0,ek.YO)(a)){ex.X&&eT.kg.log(t_);return}let d=l&&l.event_id;return this._process(this.eventFromException(a,l).then(a=>this._captureEvent(a,l,u)).then(a=>{d=a})),d}captureMessage(a,l,u,d){let h=u&&u.event_id,f=(0,ej.Le)(a)?a:String(a),p=(0,ej.pt)(a)?this.eventFromMessage(f,l,u):this.eventFromException(a,u);return this._process(p.then(a=>this._captureEvent(a,u,d)).then(a=>{h=a})),h}captureEvent(a,l,u){if(l&&l.originalException&&(0,ek.YO)(l.originalException)){ex.X&&eT.kg.log(t_);return}let d=l&&l.event_id,h=a.sdkProcessingMetadata||{},f=h.capturedSpanScope;return this._process(this._captureEvent(a,l,f||u).then(a=>{d=a})),d}captureSession(a){"string"!=typeof a.release?ex.X&&eT.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(a),(0,tg.CT)(a,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(a){let l=this._transport;return l?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(a).then(u=>l.flush(a).then(a=>u&&a))):(0,eZ.WD)(!0)}close(a){return this.flush(a).then(a=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),a))}getEventProcessors(){return this._eventProcessors}addEventProcessor(a){this._eventProcessors.push(a)}setupIntegrations(a){(a&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(a){return this.getIntegrationByName(a)}getIntegrationByName(a){return this._integrations[a]}getIntegration(a){try{return this._integrations[a.id]||null}catch(l){return ex.X&&eT.kg.warn("Cannot retrieve integration ".concat(a.id," from the current Client")),null}}addIntegration(a){let l=this._integrations[a.name];setupIntegration(this,a,this._integrations),l||afterSetupIntegrations(this,[a])}sendEvent(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.emit("beforeSendEvent",a,l);let u=function(a,l,u,d){var h;let f=getSdkMetadataForEnvelopeHeader(u),p=a.type&&"replay_event"!==a.type?a.type:"event";(h=u&&u.sdk)&&(a.sdk=a.sdk||{},a.sdk.name=a.sdk.name||h.name,a.sdk.version=a.sdk.version||h.version,a.sdk.integrations=[...a.sdk.integrations||[],...h.integrations||[]],a.sdk.packages=[...a.sdk.packages||[],...h.packages||[]]);let g=createEventEnvelopeHeaders(a,f,d,l);delete a.sdkProcessingMetadata;let m=[{type:p},a];return createEnvelope(g,[m])}(a,this._dsn,this._options._metadata,this._options.tunnel);for(let a of l.attachments||[])u=function(a,l){let[u,d]=a;return[u,[...d,l]]}(u,function(a,l){let u="string"==typeof a.data?encodeUTF8(a.data,l):a.data;return[(0,eE.Jr)({type:"attachment",length:u.length,filename:a.filename,content_type:a.contentType,attachment_type:a.attachmentType}),u]}(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));let d=this._sendEnvelope(u);d&&d.then(l=>this.emit("afterSendEvent",a,l),null)}sendSession(a){let l=function(a,l,u,d){let h=getSdkMetadataForEnvelopeHeader(u),f={sent_at:new Date().toISOString(),...h&&{sdk:h},...!!d&&l&&{dsn:dsn_dsnToString(l)}},p="aggregates"in a?[{type:"sessions"},a]:[{type:"session"},a.toJSON()];return createEnvelope(f,[p])}(a,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(l)}recordDroppedEvent(a,l,u){if(this._options.sendClientReports){let u="".concat(a,":").concat(l);ex.X&&eT.kg.log('Adding outcome: "'.concat(u,'"')),this._outcomes[u]=this._outcomes[u]+1||1}}captureAggregateMetrics(a){ex.X&&eT.kg.log("Flushing aggregated metrics, number of metrics: ".concat(a.length));let l=function(a,l,u,d){let h={sent_at:new Date().toISOString()};u&&u.sdk&&(h.sdk={name:u.sdk.name,version:u.sdk.version}),d&&l&&(h.dsn=dsn_dsnToString(l));let f=function(a){let l=function(a){let l="";for(let u of a){let a=Object.entries(u.tags),d=a.length>0?"|#".concat(a.map(a=>{let[l,u]=a;return"".concat(l,":").concat(u)}).join(",")):"";l+="".concat(u.name,"@").concat(u.unit,":").concat(u.metric,"|").concat(u.metricType).concat(d,"|T").concat(u.timestamp,"\n")}return l}(a),u={type:"statsd",length:l.length};return[u,l]}(a);return createEnvelope(h,[f])}(a,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(l)}on(a,l){this._hooks[a]||(this._hooks[a]=[]),this._hooks[a].push(l)}emit(a){for(var l=arguments.length,u=Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];this._hooks[a]&&this._hooks[a].forEach(a=>a(...u))}_setupIntegrations(){let{integrations:a}=this._options;this._integrations=function(a,l){let u={};return l.forEach(l=>{l&&setupIntegration(a,l,u)}),u}(this,a),afterSetupIntegrations(this,a),this._integrationsInitialized=!0}_updateSessionFromEvent(a,l){let u=!1,d=!1,h=l.exception&&l.exception.values;if(h)for(let a of(d=!0,h)){let l=a.mechanism;if(l&&!1===l.handled){u=!0;break}}let f="ok"===a.status,p=f&&0===a.errors||f&&u;p&&((0,tg.CT)(a,{...u&&{status:"crashed"},errors:a.errors||Number(d||u)}),this.captureSession(a))}_isClientDoneProcessing(a){return new eZ.cW(l=>{let u=0,d=setInterval(()=>{0==this._numProcessing?(clearInterval(d),l(!0)):(u+=1,a&&u>=a&&(clearInterval(d),l(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(a,l,u){let d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,eR.aF)(),h=this.getOptions(),f=Object.keys(this._integrations);return!l.integrations&&f.length>0&&(l.integrations=f),this.emit("preprocessEvent",a,l),(0,tv.R)(h,a,l,u,this,d).then(a=>{if(null===a)return a;let l={...d.getPropagationContext(),...u?u.getPropagationContext():void 0},h=a.contexts&&a.contexts.trace;if(!h&&l){let{traceId:d,spanId:h,parentSpanId:f,dsc:p}=l;a.contexts={trace:{trace_id:d,span_id:h,parent_span_id:f},...a.contexts};let g=p||(0,tm._)(d,this,u);a.sdkProcessingMetadata={dynamicSamplingContext:g,...a.sdkProcessingMetadata}}return a})}_captureEvent(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;return this._processEvent(a,l,u).then(a=>a.event_id,a=>{ex.X&&("log"===a.logLevel?eT.kg.log(a.message):eT.kg.warn(a))})}_processEvent(a,l,u){let d=this.getOptions(),{sampleRate:h}=d,f=isTransactionEvent(a),p=isErrorEvent(a),g=a.type||"error",m="before send for type `".concat(g,"`");if(p&&"number"==typeof h&&Math.random()>h)return this.recordDroppedEvent("sample_rate","error",a),(0,eZ.$2)(new SentryError("Discarding event because it's not included in the random sample (sampling rate = ".concat(h,")"),"log"));let v="replay_event"===g?"replay":g,_=a.sdkProcessingMetadata||{},T=_.capturedSpanIsolationScope;return this._prepareEvent(a,l,u,T).then(u=>{if(null===u)throw this.recordDroppedEvent("event_processor",v,a),new SentryError("An event processor returned `null`, will not send event.","log");let h=l.data&&!0===l.data.__sentry__;if(h)return u;let f=function(a,l,u){let{beforeSend:d,beforeSendTransaction:h}=a;return isErrorEvent(l)&&d?d(l,u):isTransactionEvent(l)&&h?h(l,u):l}(d,u,l);return function(a,l){let u="".concat(l," must return `null` or a valid event.");if((0,ej.J8)(a))return a.then(a=>{if(!(0,ej.PO)(a)&&null!==a)throw new SentryError(u);return a},a=>{throw new SentryError("".concat(l," rejected with ").concat(a))});if(!(0,ej.PO)(a)&&null!==a)throw new SentryError(u);return a}(f,m)}).then(d=>{if(null===d)throw this.recordDroppedEvent("before_send",v,a),new SentryError("".concat(m," returned `null`, will not send event."),"log");let h=u&&u.getSession();!f&&h&&this._updateSessionFromEvent(h,d);let p=d.transaction_info;return f&&p&&d.transaction!==a.transaction&&(d.transaction_info={...p,source:"custom"}),this.sendEvent(d,l),d}).then(null,a=>{if(a instanceof SentryError)throw a;throw this.captureException(a,{data:{__sentry__:!0},originalException:a}),new SentryError("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(a))})}_process(a){this._numProcessing++,a.then(a=>(this._numProcessing--,a),a=>(this._numProcessing--,a))}_sendEnvelope(a){if(this.emit("beforeEnvelope",a),this._isEnabled()&&this._transport)return this._transport.send(a).then(null,a=>{ex.X&&eT.kg.error("Error while sending event:",a)});ex.X&&eT.kg.error("Transport disabled")}_clearOutcomes(){let a=this._outcomes;return this._outcomes={},Object.keys(a).map(l=>{let[u,d]=l.split(":");return{reason:u,category:d,quantity:a[l]}})}constructor(a){if(this._options=a,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],a.dsn?this._dsn=function(a){let l="string"==typeof a?dsnFromString(a):dsnFromComponents(a);if(l&&function(a){if(!ez.X)return!0;let{port:l,projectId:u,protocol:d}=a,h=["protocol","publicKey","host","projectId"].find(l=>!a[l]&&(eT.kg.error("Invalid Sentry Dsn: ".concat(l," missing")),!0));return!h&&(u.match(/^\d+$/)?"http"===d||"https"===d?!(l&&isNaN(parseInt(l,10)))||(eT.kg.error("Invalid Sentry Dsn: Invalid port ".concat(l)),!1):(eT.kg.error("Invalid Sentry Dsn: Invalid protocol ".concat(d)),!1):(eT.kg.error("Invalid Sentry Dsn: Invalid projectId ".concat(u)),!1))}(l))return l}(a.dsn):ex.X&&eT.kg.warn("No DSN provided, client will not send events."),this._dsn){let l=function(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u="string"==typeof l?l:l.tunnel,d="string"!=typeof l&&l._metadata?l._metadata.sdk:void 0;return u||"".concat("".concat(function(a){let l=a.protocol?"".concat(a.protocol,":"):"",u=a.port?":".concat(a.port):"";return"".concat(l,"//").concat(a.host).concat(u).concat(a.path?"/".concat(a.path):"","/api/")}(a)).concat(a.projectId,"/envelope/"),"?").concat((0,eE._j)({sentry_key:a.publicKey,sentry_version:"7",...d&&{sentry_client:"".concat(d.name,"/").concat(d.version)}}))}(this._dsn,a);this._transport=a.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...a.transportOptions,url:l})}}};function isErrorEvent(a){return void 0===a.type}function isTransactionEvent(a){return"transaction"===a.type}var ty=u(965838),tb=u(197073);let BrowserClient=class BrowserClient extends BaseClient{eventFromException(a,l){return function(a,l,u,d){let h=u&&u.syntheticException||void 0,f=eventbuilder_eventFromUnknownInput(a,l,h,d);return(0,ek.EG)(f),f.level="error",u&&u.event_id&&(f.event_id=u.event_id),(0,eZ.WD)(f)}(this._options.stackParser,a,l,this._options.attachStacktrace)}eventFromMessage(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",u=arguments.length>2?arguments[2]:void 0;return function(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",d=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,f=d&&d.syntheticException||void 0,p=eventFromString(a,l,f,h);return p.level=u,d&&d.event_id&&(p.event_id=d.event_id),(0,eZ.WD)(p)}(this._options.stackParser,a,l,u,this._options.attachStacktrace)}captureUserFeedback(a){if(!this._isEnabled())return;let l=function(a,l){let{metadata:u,tunnel:d,dsn:h}=l,f={event_id:a.event_id,sent_at:new Date().toISOString(),...u&&u.sdk&&{sdk:{name:u.sdk.name,version:u.sdk.version}},...!!d&&!!h&&{dsn:dsn_dsnToString(h)}},p=[{type:"user_report"},a];return createEnvelope(f,[p])}(a,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(l)}_prepareEvent(a,l,u){return a.platform=a.platform||"javascript",super._prepareEvent(a,l,u)}_flushOutcomes(){let a=this._clearOutcomes();if(0===a.length||!this._dsn)return;let l=function(a,l,u){let d=[{type:"client_report"},{timestamp:(0,ty.yW)(),discarded_events:a}];return createEnvelope(l?{dsn:l}:{},[d])}(a,this._options.tunnel&&dsn_dsnToString(this._dsn));this._sendEnvelope(l)}constructor(a){let l=eH.SENTRY_SDK_SOURCE||(0,tb.S)();applySdkMetadata(a,"browser",["browser"],l),super(a),a.sendClientReports&&eH.document&&eH.document.addEventListener("visibilitychange",()=>{"hidden"===eH.document.visibilityState&&this._flushOutcomes()})}};function createFrame(a,l,u,d){let h={filename:a,function:l,in_app:!0};return void 0!==u&&(h.lineno=u),void 0!==d&&(h.colno=d),h}let tw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tS=/\((\S*)(?::(\d+))(?::(\d+))\)/,tE=[30,a=>{let l=tw.exec(a);if(l){let a=l[2]&&0===l[2].indexOf("eval");if(a){let a=tS.exec(l[2]);a&&(l[2]=a[1],l[3]=a[2],l[4]=a[3])}let[u,d]=extractSafariExtensionDetails(l[1]||"?",l[2]);return createFrame(d,u,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}}],tk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tx=[50,a=>{let l=tk.exec(a);if(l){let a=l[3]&&l[3].indexOf(" > eval")>-1;if(a){let a=tT.exec(l[3]);a&&(l[1]=l[1]||"eval",l[3]=a[1],l[4]=a[2],l[5]="")}let u=l[3],d=l[1]||"?";return[d,u]=extractSafariExtensionDetails(d,u),createFrame(u,d,l[4]?+l[4]:void 0,l[5]?+l[5]:void 0)}}],tC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,tR=[40,a=>{let l=tC.exec(a);return l?createFrame(l[2],l[1]||"?",+l[3],l[4]?+l[4]:void 0):void 0}],tI=(0,eW.pE)(...[tE,tx,tR]),extractSafariExtensionDetails=(a,l)=>{let u=-1!==a.indexOf("safari-extension"),d=-1!==a.indexOf("safari-web-extension");return u||d?[-1!==a.indexOf("@")?a.split("@")[0]:"?",u?"safari-extension:".concat(l):"safari-web-extension:".concat(l)]:[a,l]};function isRateLimited(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return(a[l]||a.all||0)>u}function updateRateLimits(a,l){let{statusCode:u,headers:d}=l,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),f={...a},p=d&&d["x-sentry-rate-limits"],g=d&&d["retry-after"];if(p)for(let a of p.trim().split(",")){let[l,u]=a.split(":",2),d=parseInt(l,10),p=(isNaN(d)?60:d)*1e3;if(u)for(let a of u.split(";"))f[a]=h+p;else f.all=h+p}else g?f.all=h+function(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),u=parseInt("".concat(a),10);if(!isNaN(u))return 1e3*u;let d=Date.parse("".concat(a));return isNaN(d)?6e4:d-l}(g,h):429===u&&(f.all=h+6e4);return f}function createTransport(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){let l=[];function remove(a){return l.splice(l.indexOf(a),1)[0]}return{$:l,add:function(u){if(!(void 0===a||l.length<a))return(0,eZ.$2)(new SentryError("Not adding Promise because buffer limit was reached."));let d=u();return -1===l.indexOf(d)&&l.push(d),d.then(()=>remove(d)).then(null,()=>remove(d).then(null,()=>{})),d},drain:function(a){return new eZ.cW((u,d)=>{let h=l.length;if(!h)return u(!0);let f=setTimeout(()=>{a&&a>0&&u(!1)},a);l.forEach(a=>{(0,eZ.WD)(a).then(()=>{--h||(clearTimeout(f),u(!0))},d)})})}}}(a.bufferSize||30),d={};function send(h){let f=[];if(forEachEnvelopeItem(h,(l,u)=>{let h=tp[u];if(isRateLimited(d,h)){let d=getEventForEnvelopeItem(l,u);a.recordDroppedEvent("ratelimit_backoff",h,d)}else f.push(l)}),0===f.length)return(0,eZ.WD)();let p=createEnvelope(h[0],f),recordEnvelopeLoss=l=>{forEachEnvelopeItem(p,(u,d)=>{let h=getEventForEnvelopeItem(u,d);a.recordDroppedEvent(l,tp[d],h)})};return u.add(()=>l({body:function(a,l){let[u,d]=a,h=JSON.stringify(u);function append(a){"string"==typeof h?h="string"==typeof a?h+a:[encodeUTF8(h,l),a]:h.push("string"==typeof a?encodeUTF8(a,l):a)}for(let a of d){let[l,u]=a;if(append("\n".concat(JSON.stringify(l),"\n")),"string"==typeof u||u instanceof Uint8Array)append(u);else{let a;try{a=JSON.stringify(u)}catch(l){a=JSON.stringify((0,eY.Fv)(u))}append(a)}}return"string"==typeof h?h:function(a){let l=a.reduce((a,l)=>a+l.length,0),u=new Uint8Array(l),d=0;for(let l of a)u.set(l,d),d+=l.length;return u}(h)}(p,a.textEncoder)}).then(a=>(void 0!==a.statusCode&&(a.statusCode<200||a.statusCode>=300)&&ex.X&&eT.kg.warn("Sentry responded with status code ".concat(a.statusCode," to sent event.")),d=updateRateLimits(d,a),a),a=>{throw recordEnvelopeLoss("network_error"),a})).then(a=>a,a=>{if(a instanceof SentryError)return ex.X&&eT.kg.error("Skipped sending event because buffer is full."),recordEnvelopeLoss("queue_overflow"),(0,eZ.WD)();throw a})}return send.__sentry__baseTransport__=!0,{send,flush:a=>u.drain(a)}}function getEventForEnvelopeItem(a,l){if("event"===l||"transaction"===l)return Array.isArray(a)?a[1]:void 0}function makeFetchTransport(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){if(eo)return eo;if(isNativeFetch(eH.fetch))return eo=eH.fetch.bind(eH);let a=eH.document,l=eH.fetch;if(a&&"function"==typeof a.createElement)try{let u=a.createElement("iframe");u.hidden=!0,a.head.appendChild(u);let d=u.contentWindow;d&&d.fetch&&(l=d.fetch),a.head.removeChild(u)}catch(a){}return eo=l.bind(eH)}(),u=0,d=0;return createTransport(a,function(h){let f=h.body.length;u+=f,d++;let p={body:h.body,method:"POST",referrerPolicy:"origin",headers:a.headers,keepalive:u<=6e4&&d<15,...a.fetchOptions};try{return l(a.url,p).then(a=>(u-=f,d--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return eo=void 0,u-=f,d--,(0,eZ.$2)(a)}})}function makeXHRTransport(a){return createTransport(a,function(l){return new eZ.cW((u,d)=>{let h=new XMLHttpRequest;for(let l in h.onerror=d,h.onreadystatechange=()=>{4===h.readyState&&u({statusCode:h.status,headers:{"x-sentry-rate-limits":h.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":h.getResponseHeader("Retry-After")}})},h.open("POST",a.url),a.headers)Object.prototype.hasOwnProperty.call(a.headers,l)&&h.setRequestHeader(l,a.headers[l]);h.send(l.body)})})}let tA=[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),integrations_linkederrors_linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration()];var tO=u(593542);function _optionalChain(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}var tP=u(707409);function getMetricSummaryJsonForSpan(a){let l=m?m.get(a):void 0;if(!l)return;let u={};for(let[,[a,d]]of l)u[a]||(u[a]=[]),u[a].push((0,eE.Jr)(d));return u}let tL="sentry.source",tM="sentry.sample_rate",tN="sentry.op",tF="sentry.origin";var tD=u(364880);function setHttpStatus(a,l){a.setTag("http.status_code",String(l)),a.setData("http.response.status_code",l);let u=function(a){if(a<400&&a>=100)return"ok";if(a>=400&&a<500)switch(a){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(a>=500&&a<600)switch(a){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(l);"unknown_error"!==u&&a.setStatus(u)}(ec=em||(em={})).Ok="ok",ec.DeadlineExceeded="deadline_exceeded",ec.Unauthenticated="unauthenticated",ec.PermissionDenied="permission_denied",ec.NotFound="not_found",ec.ResourceExhausted="resource_exhausted",ec.InvalidArgument="invalid_argument",ec.Unimplemented="unimplemented",ec.Unavailable="unavailable",ec.InternalError="internal_error",ec.UnknownError="unknown_error",ec.Cancelled="cancelled",ec.AlreadyExists="already_exists",ec.FailedPrecondition="failed_precondition",ec.Aborted="aborted",ec.OutOfRange="out_of_range",ec.DataLoss="data_loss";let SpanRecorder=class SpanRecorder{add(a){this.spans.length>this._maxlen?a.spanRecorder=void 0:this.spans.push(a)}constructor(a=1e3){this._maxlen=a,this.spans=[]}};let Span=class Span{get name(){return this._name||""}set name(a){this.updateName(a)}get description(){return this._name}set description(a){this._name=a}get traceId(){return this._traceId}set traceId(a){this._traceId=a}get spanId(){return this._spanId}set spanId(a){this._spanId=a}set parentSpanId(a){this._parentSpanId=a}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(a){this._sampled=a}get attributes(){return this._attributes}set attributes(a){this._attributes=a}get startTimestamp(){return this._startTime}set startTimestamp(a){this._startTime=a}get endTimestamp(){return this._endTime}set endTimestamp(a){this._endTime=a}get status(){return this._status}set status(a){this._status=a}get op(){return this._attributes[tN]}set op(a){this.setAttribute(tN,a)}get origin(){return this._attributes[tF]}set origin(a){this.setAttribute(tF,a)}spanContext(){let{_spanId:a,_traceId:l,_sampled:u}=this;return{spanId:a,traceId:l,traceFlags:u?tP.i0:tP.ve}}startChild(a){let l=new Span({...a,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});l.spanRecorder=this.spanRecorder,l.spanRecorder&&l.spanRecorder.add(l);let u=(0,tD.G)(this);if(l.transaction=u,ex.X&&u){let d=a&&a.op||"< unknown op >",h=(0,tP.XU)(l).description||"< unknown name >",f=u.spanContext().spanId,p="[Tracing] Starting '".concat(d,"' span on transaction '").concat(h,"' (").concat(f,").");eT.kg.log(p),this._logMessage=p}return l}setTag(a,l){return this.tags={...this.tags,[a]:l},this}setData(a,l){return this.data={...this.data,[a]:l},this}setAttribute(a,l){void 0===l?delete this._attributes[a]:this._attributes[a]=l}setAttributes(a){Object.keys(a).forEach(l=>this.setAttribute(l,a[l]))}setStatus(a){return this._status=a,this}setHttpStatus(a){return setHttpStatus(this,a),this}setName(a){this.updateName(a)}updateName(a){return this._name=a,this}isSuccess(){return"ok"===this._status}finish(a){return this.end(a)}end(a){if(this._endTime)return;let l=(0,tD.G)(this);if(ex.X&&l&&l.spanContext().spanId!==this._spanId){let a=this._logMessage;a&&eT.kg.log(a.replace("Starting","Finishing"))}this._endTime=(0,tP.$k)(a)}toTraceparent(){return(0,tP.Hb)(this)}toContext(){return(0,eE.Jr)({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(a){return this.data=a.data||{},this._name=a.name||a.description,this._endTime=a.endTimestamp,this.op=a.op,this._parentSpanId=a.parentSpanId,this._sampled=a.sampled,this._spanId=a.spanId||this._spanId,this._startTime=a.startTimestamp||this._startTime,this._status=a.status,this.tags=a.tags||{},this._traceId=a.traceId||this._traceId,this}getTraceContext(){return(0,tP.wy)(this)}getSpanJSON(){return(0,eE.Jr)({data:this._getData(),description:this._name,op:this._attributes[tN],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[tF],_metrics_summary:getMetricSummaryJsonForSpan(this)})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:a,_attributes:l}=this,u=Object.keys(a).length>0,d=Object.keys(l).length>0;return u||d?u&&d?{...a,...l}:u?a:l:void 0}constructor(a={}){this._traceId=a.traceId||(0,ek.DM)(),this._spanId=a.spanId||(0,ek.DM)().substring(16),this._startTime=a.startTimestamp||(0,ty.ph)(),this.tags=a.tags?{...a.tags}:{},this.data=a.data?{...a.data}:{},this.instrumenter=a.instrumenter||"sentry",this._attributes={},this.setAttributes({[tF]:a.origin||"manual",[tN]:a.op,...a.attributes}),this._name=a.name||a.description,a.parentSpanId&&(this._parentSpanId=a.parentSpanId),"sampled"in a&&(this._sampled=a.sampled),a.status&&(this._status=a.status),a.endTimestamp&&(this._endTime=a.endTimestamp)}};function startInactiveSpan(a){var l;let u;if(!hasTracingEnabled_hasTracingEnabled())return;let d=function(a){if(a.startTime){let l={...a};return l.startTimestamp=(0,tP.$k)(a.startTime),delete l.startTime,l}return a}(a),h=(0,eR.Gd)(),f=a.scope?a.scope.getSpan():trace_getActiveSpan(),p=a.onlyIfParent&&!f;if(p)return;let g=(0,eR.aF)(),m=(0,eS.nZ)();if(f)u=f.startChild(d);else{let{traceId:a,dsc:l,parentSpanId:f,sampled:p}={...g.getPropagationContext(),...m.getPropagationContext()};u=h.startTransaction({traceId:a,parentSpanId:f,parentSampled:p,...d,metadata:{dynamicSamplingContext:l,...d.metadata}})}return(l=u)&&((0,eE.xp)(l,tB,g),(0,eE.xp)(l,tj,m)),u}function trace_getActiveSpan(){return(0,eS.nZ)().getSpan()}let tj="_sentryScope",tB="_sentryIsolationScope";let Transaction=class Transaction extends Span{get name(){return this._name}set name(a){this.setName(a)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[tL]&&{source:this._attributes[tL]},...this._attributes[tM]&&{sampleRate:this._attributes[tM]}}}set metadata(a){this._metadata=a}setName(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom";this._name=a,this.setAttribute(tL,l)}updateName(a){return this._name=a,this}initSpanRecorder(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;this.spanRecorder||(this.spanRecorder=new SpanRecorder(a)),this.spanRecorder.add(this)}setContext(a,l){null===l?delete this._contexts[a]:this._contexts[a]=l}setMeasurement(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this._measurements[a]={value:l,unit:u}}setMetadata(a){this._metadata={...this._metadata,...a}}end(a){let l=(0,tP.$k)(a),u=this._finishTransaction(l);if(u)return this._hub.captureEvent(u)}toContext(){let a=super.toContext();return(0,eE.Jr)({...a,name:this._name,trimEnd:this._trimEnd})}updateWithContext(a){return super.updateWithContext(a),this._name=a.name||"",this._trimEnd=a.trimEnd,this}getDynamicSamplingContext(){return(0,tm.j)(this)}setHub(a){this._hub=a}_finishTransaction(a){if(void 0!==this._endTime)return;this._name||(ex.X&&eT.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(a);let l=this._hub.getClient();if(l&&l.emit&&l.emit("finishTransaction",this),!0!==this._sampled){ex.X&&eT.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),l&&l.recordDroppedEvent("sample_rate","transaction");return}let u=this.spanRecorder?this.spanRecorder.spans.filter(a=>a!==this&&(0,tP.XU)(a).timestamp):[];if(this._trimEnd&&u.length>0){let a=u.map(a=>(0,tP.XU)(a).timestamp).filter(Boolean);this._endTime=a.reduce((a,l)=>a>l?a:l)}let{scope:d,isolationScope:h}={scope:this[tj],isolationScope:this[tB]},{metadata:f}=this,{source:p}=f,g={contexts:{...this._contexts,trace:(0,tP.wy)(this)},spans:u,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...f,capturedSpanScope:d,capturedSpanIsolationScope:h,dynamicSamplingContext:(0,tm.j)(this)},_metrics_summary:getMetricSummaryJsonForSpan(this),...p&&{transaction_info:{source:p}}},m=Object.keys(this._measurements).length>0;return m&&(ex.X&&eT.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),g.measurements=this._measurements),ex.X&&eT.kg.log("[Tracing] Finishing ".concat(this.op," transaction: ").concat(this._name,".")),g}constructor(a,l){super(a),this._measurements={},this._contexts={},this._hub=l||(0,eR.Gd)(),this._name=a.name||"",this._metadata={...a.metadata},this._trimEnd=a.trimEnd,this.transaction=this;let u=this._metadata.dynamicSamplingContext;u&&(this._frozenDynamicSamplingContext={...u})}};let t$={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3};let IdleTransactionSpanRecorder=class IdleTransactionSpanRecorder extends SpanRecorder{add(a){if(a.spanContext().spanId!==this.transactionSpanId){var l=this;let u=a.end;a.end=function(){for(var d=arguments.length,h=Array(d),f=0;f<d;f++)h[f]=arguments[f];return l._popActivity(a.spanContext().spanId),u.apply(a,h)},void 0===(0,tP.XU)(a).timestamp&&this._pushActivity(a.spanContext().spanId)}super.add(a)}constructor(a,l,u,d){super(d),this._pushActivity=a,this._popActivity=l,this.transactionSpanId=u}};let IdleTransaction=class IdleTransaction extends Transaction{end(a){let l=(0,tP.$k)(a);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){for(let a of(ex.X&&eT.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*l).toISOString(),this.op),this._beforeFinishCallbacks))a(this,l);this.spanRecorder.spans=this.spanRecorder.spans.filter(a=>{if(a.spanContext().spanId===this.spanContext().spanId)return!0;!(0,tP.XU)(a).timestamp&&(a.setStatus("cancelled"),a.end(l),ex.X&&eT.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(a,void 0,2)));let{start_timestamp:u,timestamp:d}=(0,tP.XU)(a),h=u&&u<l,f=(this._finalTimeout+this._idleTimeout)/1e3,p=d&&u&&d-u<f;if(ex.X){let l=JSON.stringify(a,void 0,2);h?p||eT.kg.log("[Tracing] discarding Span since it finished after Transaction final timeout",l):eT.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",l)}return h&&p}),ex.X&&eT.kg.log("[Tracing] flushing IdleTransaction")}else ex.X&&eT.kg.log("[Tracing] No active IdleTransaction");if(this._onScope){let a=this._idleHub.getScope();a.getTransaction()===this&&a.setSpan(void 0)}return super.end(a)}registerBeforeFinishCallback(a){this._beforeFinishCallbacks.push(a)}initSpanRecorder(a){this.spanRecorder||(this.spanRecorder=new IdleTransactionSpanRecorder(a=>{this._finished||this._pushActivity(a)},a=>{this._finished||this._popActivity(a)},this.spanContext().spanId,a),ex.X&&eT.kg.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(a){let{restartOnChildSpanChange:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{restartOnChildSpanChange:!0};this._idleTimeoutCanceledPermanently=!1===l,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason="cancelled",this.end(a)))}setFinishReason(a){this._finishReason=a}sendAutoFinishSignal(){this._autoFinishAllowed||(ex.X&&eT.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(a){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason="idleTimeout",this.end(a))},this._idleTimeout)}_pushActivity(a){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),ex.X&&eT.kg.log("[Tracing] pushActivity: ".concat(a)),this.activities[a]=!0,ex.X&&eT.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(a){if(this.activities[a]&&(ex.X&&eT.kg.log("[Tracing] popActivity ".concat(a)),delete this.activities[a],ex.X&&eT.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){let a=(0,ty.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason="cancelled",this.end(a)):this._restartIdleTimeout(a+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let a=Object.keys(this.activities).join("");a===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=a,this._heartbeatCounter>=3?this._autoFinishAllowed&&(ex.X&&eT.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason="heartbeatFailed",this.end()):this._pingHeartbeat()}_pingHeartbeat(){ex.X&&eT.kg.log("pinging Heartbeat -> current counter: ".concat(this._heartbeatCounter)),setTimeout(()=>{this._beat()},this._heartbeatInterval)}constructor(a,l,u=t$.idleTimeout,d=t$.finalTimeout,h=t$.heartbeatInterval,f=!1,p=!1){super(a,l),this._idleHub=l,this._idleTimeout=u,this._finalTimeout=d,this._heartbeatInterval=h,this._onScope=f,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason="externalFinish",this._autoFinishAllowed=!p,f&&(ex.X&&eT.kg.log("Setting idle transaction on scope. Span ID: ".concat(this.spanContext().spanId)),l.getScope().setSpan(this)),p||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason="finalTimeout",this.end())},this._finalTimeout)}};function getActiveTransaction(a){let l=a||(0,eR.Gd)(),u=l.getScope();return u.getTransaction()}let tU=!1;function errorCallback(){let a=getActiveTransaction();if(a){let l="internal_error";ex.X&&eT.kg.log("[Tracing] Transaction: ".concat(l," -> Global error occured")),a.setStatus(l)}}function sampleTransaction(a,l,u){var d;let h;return hasTracingEnabled_hasTracingEnabled(l)?void 0!==a.sampled?a.setAttribute(tM,Number(a.sampled)):("function"==typeof l.tracesSampler?(h=l.tracesSampler(u),a.setAttribute(tM,Number(h))):void 0!==u.parentSampled?h=u.parentSampled:void 0!==l.tracesSampleRate?(h=l.tracesSampleRate,a.setAttribute(tM,Number(h))):(h=1,a.setAttribute(tM,h)),d=h,(0,ej.i2)(d)||!("number"==typeof d||"boolean"==typeof d)?(ex.X&&eT.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(d)," of type ").concat(JSON.stringify(typeof d),".")),1):(d<0||d>1)&&(ex.X&&eT.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ".concat(d,".")),1))?(ex.X&&eT.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),a.sampled=!1):h?(a.sampled=Math.random()<h,a.sampled)?ex.X&&eT.kg.log("[Tracing] starting ".concat(a.op," transaction - ").concat((0,tP.XU)(a).description)):ex.X&&eT.kg.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(h),")")):(ex.X&&eT.kg.log("[Tracing] Discarding transaction because ".concat("function"==typeof l.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),a.sampled=!1):a.sampled=!1,a}function traceHeaders(){let a=this.getScope(),l=a.getSpan();return l?{"sentry-trace":(0,tP.Hb)(l)}:{}}function _startTransaction(a,l){let u=this.getClient(),d=u&&u.getOptions()||{},h=d.instrumenter||"sentry",f=a.instrumenter||"sentry";h!==f&&(ex.X&&eT.kg.error("A transaction was started with instrumenter=`".concat(f,"`, but the SDK is configured with the `").concat(h,"` instrumenter.\nThe transaction will not be sampled. Please use the ").concat(h," instrumentation to start transactions.")),a.sampled=!1);let p=new Transaction(a,this);return(p=sampleTransaction(p,d,{name:a.name,parentSampled:a.parentSampled,transactionContext:a,attributes:{...a.data,...a.attributes},...l})).isRecording()&&p.initSpanRecorder(d._experiments&&d._experiments.maxSpans),u&&u.emit&&u.emit("startTransaction",p),p}function startIdleTransaction(a,l,u,d,h,f,p){let g=arguments.length>7&&void 0!==arguments[7]&&arguments[7],m=a.getClient(),v=m&&m.getOptions()||{},_=new IdleTransaction(l,a,u,d,p,h,g);return(_=sampleTransaction(_,v,{name:l.name,parentSampled:l.parentSampled,transactionContext:l,attributes:{...l.data,...l.attributes},...f})).isRecording()&&_.initSpanRecorder(v._experiments&&v._experiments.maxSpans),m&&m.emit&&m.emit("startTransaction",_),_}function addTracingExtensions(){let a=(0,eR.cu)();a.__SENTRY__&&(a.__SENTRY__.extensions=a.__SENTRY__.extensions||{},a.__SENTRY__.extensions.startTransaction||(a.__SENTRY__.extensions.startTransaction=_startTransaction),a.__SENTRY__.extensions.traceHeaders||(a.__SENTRY__.extensions.traceHeaders=traceHeaders),tU||(tU=!0,addGlobalErrorInstrumentationHandler(errorCallback),addGlobalUnhandledRejectionInstrumentationHandler(errorCallback)))}errorCallback.tag="sentry_tracingErrorCallback";var tH=u(223283);let tq=eU.GLOBAL_OBJ;function registerBackgroundTabDetection(){tq&&tq.document&&tq.document.addEventListener("visibilitychange",()=>{let a=getActiveTransaction();if(tq.document.hidden&&a){let{op:l,status:u}=(0,tP.XU)(a);u||a.setStatus("cancelled"),a.setTag("visibilitychange","document.hidden"),a.end()}})}let bindReporter=(a,l,u)=>{let d,h;return f=>{l.value>=0&&(f||u)&&((h=l.value-(d||0))||void 0===d)&&(d=l.value,l.delta=h,a(l))}},generateUniqueID=()=>"v3-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12),getNavigationEntryFromPerformanceTiming=()=>{let a=tq.performance.timing,l=tq.performance.navigation.type,u={entryType:"navigation",startTime:0,type:2==l?"back_forward":1===l?"reload":"navigate"};for(let l in a)"navigationStart"!==l&&"toJSON"!==l&&(u[l]=Math.max(a[l]-a.navigationStart,0));return u},getNavigationEntry=()=>tq.__WEB_VITALS_POLYFILL__?tq.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||getNavigationEntryFromPerformanceTiming()):tq.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],getActivationStart=()=>{let a=getNavigationEntry();return a&&a.activationStart||0},initMetric=(a,l)=>{let u=getNavigationEntry(),d="navigate";return u&&(d=tq.document.prerendering||getActivationStart()>0?"prerender":u.type.replace(/_/g,"-")),{name:a,value:void 0===l?-1:l,rating:"good",delta:0,entries:[],id:generateUniqueID(),navigationType:d}},observe=(a,l,u)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(a)){let d=new PerformanceObserver(a=>{l(a.getEntries())});return d.observe(Object.assign({type:a,buffered:!0},u||{})),d}}catch(a){}},onHidden=(a,l)=>{let onHiddenOrPageHide=u=>{("pagehide"===u.type||"hidden"===tq.document.visibilityState)&&(a(u),l&&(removeEventListener("visibilitychange",onHiddenOrPageHide,!0),removeEventListener("pagehide",onHiddenOrPageHide,!0)))};addEventListener("visibilitychange",onHiddenOrPageHide,!0),addEventListener("pagehide",onHiddenOrPageHide,!0)},onCLS=a=>{let l;let u=initMetric("CLS",0),d=0,h=[],handleEntries=a=>{a.forEach(a=>{if(!a.hadRecentInput){let f=h[0],p=h[h.length-1];d&&0!==h.length&&a.startTime-p.startTime<1e3&&a.startTime-f.startTime<5e3?(d+=a.value,h.push(a)):(d=a.value,h=[a]),d>u.value&&(u.value=d,u.entries=h,l&&l())}})},f=observe("layout-shift",handleEntries);if(f){l=bindReporter(a,u);let stopListening=()=>{handleEntries(f.takeRecords()),l(!0)};return onHidden(stopListening),stopListening}},tz=-1,initHiddenTime=()=>"hidden"!==tq.document.visibilityState||tq.document.prerendering?1/0:0,trackChanges=()=>{onHidden(a=>{let{timeStamp:l}=a;tz=l},!0)},getVisibilityWatcher=()=>(tz<0&&(tz=initHiddenTime(),trackChanges()),{get firstHiddenTime(){return tz}}),onFID=a=>{let l;let u=getVisibilityWatcher(),d=initMetric("FID"),handleEntry=a=>{a.startTime<u.firstHiddenTime&&(d.value=a.processingStart-a.startTime,d.entries.push(a),l(!0))},handleEntries=a=>{a.forEach(handleEntry)},h=observe("first-input",handleEntries);l=bindReporter(a,d),h&&onHidden(()=>{handleEntries(h.takeRecords()),h.disconnect()},!0)},tW={},onLCP=a=>{let l;let u=getVisibilityWatcher(),d=initMetric("LCP"),handleEntries=a=>{let h=a[a.length-1];if(h){let a=Math.max(h.startTime-getActivationStart(),0);a<u.firstHiddenTime&&(d.value=a,d.entries=[h],l())}},h=observe("largest-contentful-paint",handleEntries);if(h){l=bindReporter(a,d);let stopListening=()=>{tW[d.id]||(handleEntries(h.takeRecords()),h.disconnect(),tW[d.id]=!0,l(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,stopListening,{once:!0,capture:!0})}),onHidden(stopListening,!0),stopListening}},tV={},tG={};function addLcpInstrumentationHandler(a){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return addMetricObserver("lcp",a,instrumentLcp,T,l)}function addPerformanceInstrumentationHandler(a,l){return instrument_addHandler(a,l),tG[a]||(function(a){let l={};"event"===a&&(l.durationThreshold=0),observe(a,l=>{instrument_triggerHandlers(a,{entries:l})},l)}(a),tG[a]=!0),getCleanupCallback(a,l)}function instrument_triggerHandlers(a,l){let u=tV[a];if(u&&u.length)for(let a of u)try{a(l)}catch(a){}}function instrumentCls(){return onCLS(a=>{instrument_triggerHandlers("cls",{metric:a}),v=a})}function instrumentFid(){return onFID(a=>{instrument_triggerHandlers("fid",{metric:a}),_=a})}function instrumentLcp(){return onLCP(a=>{instrument_triggerHandlers("lcp",{metric:a}),T=a})}function addMetricObserver(a,l,u,d){let h,f=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return instrument_addHandler(a,l),tG[a]||(h=u(),tG[a]=!0),d&&l({metric:d}),getCleanupCallback(a,l,f?h:void 0)}function instrument_addHandler(a,l){tV[a]=tV[a]||[],tV[a].push(l)}function getCleanupCallback(a,l,u){return()=>{u&&u();let d=tV[a];if(!d)return;let h=d.indexOf(l);-1!==h&&d.splice(h,1)}}function isMeasurementValue(a){return"number"==typeof a&&isFinite(a)}function _startChild(a,l){let{startTimestamp:u,...d}=l;return u&&a.startTimestamp>u&&(a.startTimestamp=u),a.startChild({startTimestamp:u,...d})}function msToSec(a){return a/1e3}function getBrowserPerformanceAPI(){return tq&&tq.addEventListener&&tq.performance}let tJ=0,tK={};function startTrackingWebVitals(){let a=getBrowserPerformanceAPI();if(a&&ty.Z1){a.mark&&tq.performance.mark("sentry-tracing-init");let l=addMetricObserver("fid",a=>{let{metric:l}=a,u=l.entries[l.entries.length-1];if(!u)return;let d=msToSec(ty.Z1),h=msToSec(u.startTime);tK.fid={value:l.value,unit:"millisecond"},tK["mark.fid"]={value:d+h,unit:"second"}},instrumentFid,_),u=function(a){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return addMetricObserver("cls",a,instrumentCls,v,l)}(a=>{let{metric:l}=a,u=l.entries[l.entries.length-1];u&&(tK.cls={value:l.value,unit:""},R=u)},!0),d=addLcpInstrumentationHandler(a=>{let{metric:l}=a,u=l.entries[l.entries.length-1];u&&(tK.lcp={value:l.value,unit:"millisecond"},C=u)},!0);return()=>{l(),u(),d()}}return()=>void 0}function startTrackingLongTasks(){addPerformanceInstrumentationHandler("longtask",a=>{let{entries:l}=a;for(let a of l){let l=getActiveTransaction();if(!l)return;let u=msToSec(ty.Z1+a.startTime),d=msToSec(a.duration);l.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:u,endTimestamp:u+d})}})}function startTrackingInteractions(){addPerformanceInstrumentationHandler("event",a=>{let{entries:l}=a;for(let a of l){let l=getActiveTransaction();if(!l)return;if("click"===a.name){let u=msToSec(ty.Z1+a.startTime),d=msToSec(a.duration),h={description:(0,eX.Rt)(a.target),op:"ui.interaction.".concat(a.name),origin:"auto.ui.browser.metrics",startTimestamp:u,endTimestamp:u+d},f=(0,eX.iY)(a.target);f&&(h.attributes={"ui.component_name":f}),l.startChild(h)}}})}function addPerformanceEntries(a){let l,u;let d=getBrowserPerformanceAPI();if(!d||!tq.performance.getEntries||!ty.Z1)return;let h=msToSec(ty.Z1),f=d.getEntries(),{op:p,start_timestamp:g}=(0,tP.XU)(a);if(f.slice(tJ).forEach(d=>{let f=msToSec(d.startTime),p=msToSec(d.duration);if("navigation"!==a.op||!g||!(h+f<g))switch(d.entryType){case"navigation":["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(l=>{_addPerformanceNavigationTiming(a,d,l,h)}),_addPerformanceNavigationTiming(a,d,"secureConnection",h,"TLS/SSL","connectEnd"),_addPerformanceNavigationTiming(a,d,"fetch",h,"cache","domainLookupStart"),_addPerformanceNavigationTiming(a,d,"domainLookup",h,"DNS"),d.responseEnd&&(_startChild(a,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:h+msToSec(d.requestStart),endTimestamp:h+msToSec(d.responseEnd)}),_startChild(a,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:h+msToSec(d.responseStart),endTimestamp:h+msToSec(d.responseEnd)})),l=h+msToSec(d.responseStart),u=h+msToSec(d.requestStart);break;case"mark":case"paint":case"measure":{(function(a,l,u,d,h){let f=h+u;_startChild(a,{description:l.name,endTimestamp:f+d,op:l.entryType,origin:"auto.resource.browser.metrics",startTimestamp:f})})(a,d,f,p,h);let l=getVisibilityWatcher(),u=d.startTime<l.firstHiddenTime;"first-paint"===d.name&&u&&(tK.fp={value:d.startTime,unit:"millisecond"}),"first-contentful-paint"===d.name&&u&&(tK.fcp={value:d.startTime,unit:"millisecond"});break}case"resource":(function(a,l,u,d,h,f){if("xmlhttprequest"===l.initiatorType||"fetch"===l.initiatorType)return;let p=url_parseUrl(u),g={};setResourceEntrySizeData(g,l,"transferSize","http.response_transfer_size"),setResourceEntrySizeData(g,l,"encodedBodySize","http.response_content_length"),setResourceEntrySizeData(g,l,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in l&&(g["resource.render_blocking_status"]=l.renderBlockingStatus),p.protocol&&(g["url.scheme"]=p.protocol.split(":").pop()),p.host&&(g["server.address"]=p.host),g["url.same_origin"]=u.includes(tq.location.origin);let m=f+d,v=m+h;_startChild(a,{description:u.replace(tq.location.origin,""),endTimestamp:v,op:l.initiatorType?"resource.".concat(l.initiatorType):"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:m,data:g})})(a,d,d.name,f,p,h)}}),tJ=Math.max(f.length-1,0),function(a){let l=tq.navigator;if(!l)return;let u=l.connection;u&&(u.effectiveType&&a.setTag("effectiveConnectionType",u.effectiveType),u.type&&a.setTag("connectionType",u.type),isMeasurementValue(u.rtt)&&(tK["connection.rtt"]={value:u.rtt,unit:"millisecond"})),isMeasurementValue(l.deviceMemory)&&a.setTag("deviceMemory","".concat(l.deviceMemory," GB")),isMeasurementValue(l.hardwareConcurrency)&&a.setTag("hardwareConcurrency",String(l.hardwareConcurrency))}(a),"pageload"===p){var m,v,_;m=tK,v=l,_=u,"number"==typeof v&&g&&(m.ttfb={value:1e3*Math.max(v-g,0),unit:"millisecond"},"number"==typeof _&&_<=v&&(m["ttfb.requestTime"]={value:(v-_)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(a=>{if(!tK[a]||!g||h>=g)return;let l=tK[a].value,u=h+msToSec(l),d=Math.abs((u-g)*1e3);tK[a].value=d});let d=tK["mark.fid"];d&&tK.fid&&(_startChild(a,{description:"first input delay",endTimestamp:d.value+msToSec(tK.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:d.value}),delete tK["mark.fid"]),"fcp"in tK||delete tK.cls,Object.keys(tK).forEach(a=>{!function(a,l,u){let d=getActiveTransaction();d&&d.setMeasurement(a,l,u)}(a,tK[a].value,tK[a].unit)}),C&&(C.element&&a.setTag("lcp.element",(0,eX.Rt)(C.element)),C.id&&a.setTag("lcp.id",C.id),C.url&&a.setTag("lcp.url",C.url.trim().slice(0,200)),a.setTag("lcp.size",C.size)),R&&R.sources&&R.sources.forEach((l,u)=>a.setTag("cls.source.".concat(u+1),(0,eX.Rt)(l.node)))}C=void 0,R=void 0,tK={}}function _addPerformanceNavigationTiming(a,l,u,d,h,f){let p=f?l[f]:l["".concat(u,"End")],g=l["".concat(u,"Start")];g&&p&&_startChild(a,{op:"browser",origin:"auto.browser.browser.metrics",description:h||u,startTimestamp:d+msToSec(g),endTimestamp:d+msToSec(p)})}function setResourceEntrySizeData(a,l,u,d){let h=l[u];null!=h&&h<2147483647&&(a[d]=h)}var tX=u(798955);let tY=["localhost",/^\/(?!\/)/],tZ={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:tY,tracePropagationTargets:tY};function instrumentOutgoingRequests(a){let{traceFetch:l,traceXHR:u,tracePropagationTargets:d,tracingOrigins:h,shouldCreateSpanForRequest:f,enableHTTPTimings:p}={traceFetch:tZ.traceFetch,traceXHR:tZ.traceXHR,...a},g="function"==typeof f?f:a=>!0,shouldAttachHeadersWithTargets=a=>{var l;return l=d||h,(0,eL.U0)(a,l||tY)},m={};l&&addFetchInstrumentationHandler(a=>{let l=function(a,l,u,d){let h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"auto.http.browser";if(!hasTracingEnabled_hasTracingEnabled()||!a.fetchData)return;let f=l(a.fetchData.url);if(a.endTimestamp&&f){let l=a.fetchData.__span;if(!l)return;let u=d[l];if(u){if(a.response){setHttpStatus(u,a.response.status);let l=a.response&&a.response.headers&&a.response.headers.get("content-length");if(l){let a=parseInt(l);a>0&&u.setAttribute("http.response_content_length",a)}}else a.error&&u.setStatus("internal_error");u.end(),delete d[l]}return}let p=(0,eS.nZ)(),g=(0,eS.s3)(),{method:m,url:v}=a.fetchData,_=f?startInactiveSpan({name:"".concat(m," ").concat(v),onlyIfParent:!0,attributes:{url:v,type:"fetch","http.method":m,[tF]:h},op:"http.client"}):void 0;if(_&&(a.fetchData.__span=_.spanContext().spanId,d[_.spanContext().spanId]=_),u(a.fetchData.url)&&g){let l=a.args[0];a.args[1]=a.args[1]||{};let u=a.args[1];u.headers=function(a,l,u,d,h){let f=h||u.getSpan(),p=(0,eR.aF)(),{traceId:g,spanId:m,sampled:v,dsc:_}={...p.getPropagationContext(),...u.getPropagationContext()},T=f?(0,tP.Hb)(f):(0,tH.$p)(g,m,v),C=(0,tX.IQ)(_||(f?(0,tm.j)(f):(0,tm._)(g,l,u))),R=d.headers||("undefined"!=typeof Request&&(0,ej.V9)(a,Request)?a.headers:void 0);if(!R)return{"sentry-trace":T,baggage:C};if("undefined"!=typeof Headers&&(0,ej.V9)(R,Headers)){let a=new Headers(R);return a.append("sentry-trace",T),C&&a.append(tX.bU,C),a}if(Array.isArray(R)){let a=[...R,["sentry-trace",T]];return C&&a.push([tX.bU,C]),a}{let a="baggage"in R?R.baggage:void 0,l=[];return Array.isArray(a)?l.push(...a):a&&l.push(a),C&&l.push(C),{...R,"sentry-trace":T,baggage:l.length>0?l.join(","):void 0}}}(l,g,p,u,_)}return _}(a,g,shouldAttachHeadersWithTargets,m);p&&l&&addHTTPTimings(l)}),u&&addXhrInstrumentationHandler(a=>{let l=function(a,l,u,d){let h=a.xhr,f=h&&h[e4];if(!hasTracingEnabled_hasTracingEnabled()||!h||h.__sentry_own_request__||!f)return;let p=l(f.url);if(a.endTimestamp&&p){let a=h.__sentry_xhr_span_id__;if(!a)return;let l=d[a];l&&void 0!==f.status_code&&(setHttpStatus(l,f.status_code),l.end(),delete d[a]);return}let g=(0,eS.nZ)(),m=(0,eR.aF)(),v=p?startInactiveSpan({name:"".concat(f.method," ").concat(f.url),onlyIfParent:!0,attributes:{type:"xhr","http.method":f.method,url:f.url,[tF]:"auto.http.browser"},op:"http.client"}):void 0;v&&(h.__sentry_xhr_span_id__=v.spanContext().spanId,d[h.__sentry_xhr_span_id__]=v);let _=(0,eS.s3)();if(h.setRequestHeader&&u(f.url)&&_){let{traceId:a,spanId:l,sampled:u,dsc:d}={...m.getPropagationContext(),...g.getPropagationContext()},f=v?(0,tP.Hb)(v):(0,tH.$p)(a,l,u),p=(0,tX.IQ)(d||(v?(0,tm.j)(v):(0,tm._)(a,_,g)));(function(a,l,u){try{a.setRequestHeader("sentry-trace",l),u&&a.setRequestHeader(tX.bU,u)}catch(a){}})(h,f,p)}return v}(a,g,shouldAttachHeadersWithTargets,m);p&&l&&addHTTPTimings(l)})}function addHTTPTimings(a){let{url:l}=(0,tP.XU)(a).data||{};if(!l||"string"!=typeof l)return;let u=addPerformanceInstrumentationHandler("resource",d=>{let{entries:h}=d;h.forEach(d=>{if("resource"===d.entryType&&"initiatorType"in d&&"string"==typeof d.nextHopProtocol&&("fetch"===d.initiatorType||"xmlhttprequest"===d.initiatorType)&&d.name.endsWith(l)){let l=function(a){let{name:l,version:u}=function(a){let l="unknown",u="unknown",d="";for(let h of a){if("/"===h){[l,u]=a.split("/");break}if(!isNaN(Number(h))){l="h"===d?"http":d,u=a.split(d)[1];break}d+=h}return d===a&&(l=d),{name:l,version:u}}(a.nextHopProtocol),d=[];return(d.push(["network.protocol.version",u],["network.protocol.name",l]),ty.Z1)?[...d,["http.request.redirect_start",getAbsoluteTime(a.redirectStart)],["http.request.fetch_start",getAbsoluteTime(a.fetchStart)],["http.request.domain_lookup_start",getAbsoluteTime(a.domainLookupStart)],["http.request.domain_lookup_end",getAbsoluteTime(a.domainLookupEnd)],["http.request.connect_start",getAbsoluteTime(a.connectStart)],["http.request.secure_connection_start",getAbsoluteTime(a.secureConnectionStart)],["http.request.connection_end",getAbsoluteTime(a.connectEnd)],["http.request.request_start",getAbsoluteTime(a.requestStart)],["http.request.response_start",getAbsoluteTime(a.responseStart)],["http.request.response_end",getAbsoluteTime(a.responseEnd)]]:d}(d);l.forEach(l=>a.setAttribute(...l)),setTimeout(u)}})})}function getAbsoluteTime(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return((ty.Z1||performance.timeOrigin)+a)/1e3}let tQ={...t$,markBackgroundTransactions:!0,routingInstrumentation:function(a){let l,u=!(arguments.length>1)||void 0===arguments[1]||arguments[1],d=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!tq||!tq.location)return;let h=tq.location.href;u&&(l=a({name:tq.location.pathname,startTimestamp:ty.Z1?ty.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),d&&addHistoryInstrumentationHandler(u=>{let{to:d,from:f}=u;if(void 0===f&&h&&-1!==h.indexOf(d)){h=void 0;return}f!==d&&(h=void 0,l&&l.end(),l=a({name:tq.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...tZ};let browsertracing_BrowserTracing=class browsertracing_BrowserTracing{setupOnce(a,l){this._getCurrentHub=l;let u=l(),d=u.getClient(),h=d&&d.getOptions(),{routingInstrumentation:f,startTransactionOnLocationChange:p,startTransactionOnPageLoad:g,markBackgroundTransactions:m,traceFetch:v,traceXHR:_,shouldCreateSpanForRequest:T,enableHTTPTimings:C,_experiments:R}=this.options,B=h&&h.tracePropagationTargets,V=B||this.options.tracePropagationTargets;f(a=>{let u=this._createRouteTransaction(a);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(u,a,l),u},g,p),m&&registerBackgroundTabDetection(),R.enableInteractions&&this._registerInteractionListener(),instrumentOutgoingRequests({traceFetch:v,traceXHR:_,tracePropagationTargets:V,shouldCreateSpanForRequest:T,enableHTTPTimings:C})}_createRouteTransaction(a){let l;if(!this._getCurrentHub)return;let u=this._getCurrentHub(),{beforeNavigate:d,idleTimeout:h,finalTimeout:f,heartbeatInterval:p}=this.options,g="pageload"===a.op;if(g){let u=g?getMetaContent("sentry-trace"):"",d=g?getMetaContent("baggage"):void 0,{traceId:h,dsc:f,parentSpanId:p,sampled:m}=(0,tH.pT)(u,d);l={traceId:h,parentSpanId:p,parentSampled:m,...a,metadata:{...a.metadata,dynamicSamplingContext:f},trimEnd:!0}}else l={trimEnd:!0,...a};let m="function"==typeof d?d(l):l,v=void 0===m?{...l,sampled:!1}:m;v.metadata=v.name!==l.name?{...v.metadata,source:"custom"}:v.metadata,this._latestRouteName=v.name,this._latestRouteSource=function(a){let l=a.attributes&&a.attributes[tL],u=a.data&&a.data[tL],d=a.metadata&&a.metadata.source;return l||u||d}(v),v.sampled;let{location:_}=tq,T=startIdleTransaction(u,v,h,f,!0,{location:_},p,g);return g&&(tq.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(tq.document.readyState)&&T.sendAutoFinishSignal()}),["interactive","complete"].includes(tq.document.readyState)&&T.sendAutoFinishSignal()),T.registerBeforeFinishCallback(a=>{this._collectWebVitals(),addPerformanceEntries(a)}),T}_registerInteractionListener(){let a;let registerInteractionTransaction=()=>{let{idleTimeout:l,finalTimeout:u,heartbeatInterval:d}=this.options,h=getActiveTransaction();if(h&&h.op&&["navigation","pageload"].includes(h.op)||(a&&(a.setFinishReason("interactionInterrupted"),a.end(),a=void 0),!this._getCurrentHub)||!this._latestRouteName)return;let f=this._getCurrentHub(),{location:p}=tq,g={name:this._latestRouteName,op:"ui.action.click",trimEnd:!0,data:{[tL]:this._latestRouteSource||"url"}};a=startIdleTransaction(f,g,l,u,!0,{location:p},d)};["click"].forEach(a=>{addEventListener(a,registerInteractionTransaction,{once:!1,capture:!0})})}constructor(a){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,addTracingExtensions(),this.options={...tQ,...a},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),a&&!a.tracePropagationTargets&&a.tracingOrigins&&(this.options.tracePropagationTargets=a.tracingOrigins),this._collectWebVitals=startTrackingWebVitals(),this.options.enableLongTask&&startTrackingLongTasks(),this.options._experiments.enableInteractions&&startTrackingInteractions()}};function getMetaContent(a){let l=(0,eX.qT)("meta[name=".concat(a,"]"));return l?l.getAttribute("content"):void 0}let t0={...t$,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,_experiments:{},...tZ},browserTracingIntegration=function(){let a,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};addTracingExtensions(),!u.tracePropagationTargets&&u.tracingOrigins&&(u.tracePropagationTargets=u.tracingOrigins);let d={...t0,...u},h=startTrackingWebVitals();function _createRouteTransaction(u){let f;let p=(0,eR.Gd)(),{beforeStartSpan:g,idleTimeout:m,finalTimeout:v,heartbeatInterval:_}=d,T="pageload"===u.op;if(T){let a=T?browserTracingIntegration_getMetaContent("sentry-trace"):"",l=T?browserTracingIntegration_getMetaContent("baggage"):void 0,{traceId:d,dsc:h,parentSpanId:p,sampled:g}=(0,tH.pT)(a,l);f={traceId:d,parentSpanId:p,parentSampled:g,...u,metadata:{...u.metadata,dynamicSamplingContext:h},trimEnd:!0}}else f={trimEnd:!0,...u};let C=g?g(f):f;C.metadata=C.name!==f.name?{...C.metadata,source:"custom"}:C.metadata,a=C.name,l=function(a){let l=a.attributes&&a.attributes[tL],u=a.data&&a.data[tL],d=a.metadata&&a.metadata.source;return l||u||d}(C),C.sampled;let{location:R}=tq,B=startIdleTransaction(p,C,m,v,!0,{location:R},_,T);return T&&(tq.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(tq.document.readyState)&&B.sendAutoFinishSignal()}),["interactive","complete"].includes(tq.document.readyState)&&B.sendAutoFinishSignal()),B.registerBeforeFinishCallback(a=>{h(),addPerformanceEntries(a)}),B}return d.enableLongTask&&startTrackingLongTasks(),d._experiments.enableInteractions&&startTrackingInteractions(),{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(u){let h;let f=u.getOptions(),{markBackgroundSpan:p,traceFetch:g,traceXHR:m,shouldCreateSpanForRequest:v,enableHTTPTimings:_,_experiments:T}=d,C=f&&f.tracePropagationTargets,R=C||d.tracePropagationTargets,B=tq.location.href;if(u.on&&(u.on("startNavigationSpan",a=>{h&&h.end(),h=_createRouteTransaction({op:"navigation",...a})}),u.on("startPageLoadSpan",a=>{h&&h.end(),h=_createRouteTransaction({op:"pageload",...a})})),d.instrumentPageLoad&&u.emit){let a={name:tq.location.pathname,startTimestamp:ty.Z1?ty.Z1/1e3:void 0,origin:"auto.pageload.browser",attributes:{[tL]:"url"}};startBrowserTracingPageLoadSpan(u,a)}d.instrumentNavigation&&u.emit&&addHistoryInstrumentationHandler(a=>{let{to:l,from:d}=a;if(void 0===d&&B&&-1!==B.indexOf(l)){B=void 0;return}if(d!==l){B=void 0;let a={name:tq.location.pathname,origin:"auto.navigation.browser",attributes:{[tL]:"url"}};startBrowserTracingNavigationSpan(u,a)}}),p&&registerBackgroundTabDetection(),T.enableInteractions&&function(a,l,u){let d;let registerInteractionTransaction=()=>{let{idleTimeout:h,finalTimeout:f,heartbeatInterval:p}=a,g=getActiveTransaction();if(g&&g.op&&["navigation","pageload"].includes(g.op)||(d&&(d.setFinishReason("interactionInterrupted"),d.end(),d=void 0),!l))return;let{location:m}=tq;d=startIdleTransaction((0,eR.Gd)(),{name:l,op:"ui.action.click",trimEnd:!0,data:{[tL]:u||"url"}},h,f,!0,{location:m},p)};["click"].forEach(a=>{addEventListener(a,registerInteractionTransaction,{once:!1,capture:!0})})}(d,a,l),instrumentOutgoingRequests({traceFetch:g,traceXHR:m,tracePropagationTargets:R,shouldCreateSpanForRequest:v,enableHTTPTimings:_})},options:d}};function startBrowserTracingPageLoadSpan(a,l){if(!a.emit)return;a.emit("startPageLoadSpan",l);let u=trace_getActiveSpan(),d=u&&(0,tP.XU)(u).op;return"pageload"===d?u:void 0}function startBrowserTracingNavigationSpan(a,l){if(!a.emit)return;a.emit("startNavigationSpan",l);let u=trace_getActiveSpan(),d=u&&(0,tP.XU)(u).op;return"navigation"===d?u:void 0}function browserTracingIntegration_getMetaContent(a){let l=(0,eX.qT)("meta[name=".concat(a,"]"));return l?l.getAttribute("content"):void 0}let t1={"routing.instrumentation":"next-app-router"};var t2=u(205632),t3=u.n(t2);let t5={"routing.instrumentation":"next-pages-router"},t6=(0,eS.s3)();function nextRouterInstrumentation(a){let l=!(arguments.length>1)||void 0===arguments[1]||arguments[1],u=!(arguments.length>2)||void 0===arguments[2]||arguments[2],d=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,f=!eH.document.getElementById("__NEXT_DATA__");f?function(a){let l,u=!(arguments.length>1)||void 0===arguments[1]||arguments[1],d=!(arguments.length>2)||void 0===arguments[2]||arguments[2],h=arguments.length>3?arguments[3]:void 0,f=arguments.length>4?arguments[4]:void 0,p=eH.location.pathname;if(u){let u={name:p,op:"pageload",origin:"auto.pageload.nextjs.app_router_instrumentation",tags:t1,startTimestamp:ty.Z1?ty.Z1/1e3:void 0,metadata:{source:"url"}};l=a(u),h(u)}d&&addFetchInstrumentationHandler(u=>{if(void 0!==u.endTimestamp||"GET"!==u.fetchData.method)return;let d=function(a){if(!a[0]||"object"!=typeof a[0]||void 0===a[0].searchParams||!a[1]||"object"!=typeof a[1]||!("headers"in a[1]))return null;try{let l=a[0],u=a[1].headers;if("1"!==u.RSC||"1"===u["Next-Router-Prefetch"])return null;return{targetPathname:l.pathname}}catch(a){return null}}(u.args);if(null===d)return;let h=d.targetPathname,g={...t1,from:p};p=h,l&&l.end();let m={name:h,op:"navigation",origin:"auto.navigation.nextjs.app_router_instrumentation",tags:g,metadata:{source:"url"}};a(m),f(m)})}(a,l,u,d||(()=>void 0),h||(()=>void 0)):function(a){let l=!(arguments.length>1)||void 0===arguments[1]||arguments[1],u=!(arguments.length>2)||void 0===arguments[2]||arguments[2],d=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,{route:f,params:p,sentryTrace:g,baggage:m}=function(){let a;let l=eH.document.getElementById("__NEXT_DATA__");if(l&&l.innerHTML)try{a=JSON.parse(l.innerHTML)}catch(a){}if(!a)return{};let u={},{page:d,query:h,props:f}=a;return u.route=d,u.params=h,f&&f.pageProps&&(u.sentryTrace=f.pageProps._sentryTraceData,u.baggage=f.pageProps._sentryBaggage),u}(),{traceparentData:v,dynamicSamplingContext:_,propagationContext:T}=(0,tH.KA)(g,m);if((0,eS.nZ)().setPropagationContext(T),el=f||eH.location.pathname,l){let l={name:el,op:"pageload",origin:"auto.pageload.nextjs.pages_router_instrumentation",tags:t5,startTimestamp:ty.Z1?ty.Z1/1e3:void 0,...p&&t6&&t6.getOptions().sendDefaultPii&&{data:p},...v,metadata:{source:f?"route":"url",dynamicSamplingContext:v&&!_?{}:_}};ea=a(l),d(l)}u&&t3().events.on("routeChangeStart",l=>{let u,d;let f=l.split(/[\?#]/,1)[0],p=function(a){let l=(eH.__BUILD_MANIFEST||{}).sortedPages;if(l)return l.find(l=>{let u=function(a){let l=a.split("/"),u="";l[l.length-1].match(/^\[\[\.\.\..+\]\]$/)&&(l.pop(),u="(?:/(.+?))?");let d=l.map(a=>a.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)")).join("/");return new RegExp("^".concat(d).concat(u,"(?:/)?$"))}(l);return a.match(u)})}(f);p?(u=p,d="route"):(u=f,d="url");let g={...t5,from:el};el=u,ea&&ea.end();let m={name:u,op:"navigation",origin:"auto.navigation.nextjs.pages_router_instrumentation",tags:g,metadata:{source:d}},v=a(m);if(h(m),v){let a=v.startChild({op:"ui.nextjs.route-change",origin:"auto.ui.nextjs.pages_router_instrumentation",description:"Next.js Route Change"}),finishRouteChangeSpan=()=>{a.end(),t3().events.off("routeChangeComplete",finishRouteChangeSpan)};t3().events.on("routeChangeComplete",finishRouteChangeSpan)}})}(a,l,u,d||(()=>void 0),h||(()=>void 0))}let BrowserTracing=class BrowserTracing extends browsertracing_BrowserTracing{constructor(a){super({tracingOrigins:[...tZ.tracingOrigins,/^(api\/)/],routingInstrumentation:nextRouterInstrumentation,...a})}};let t8=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function resolve(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];let d="",h=!1;for(let a=l.length-1;a>=-1&&!h;a--){let u=a>=0?l[a]:"/";u&&(d="".concat(u,"/").concat(d),h="/"===u.charAt(0))}return d=(function(a,l){let u=0;for(let l=a.length-1;l>=0;l--){let d=a[l];"."===d?a.splice(l,1):".."===d?(a.splice(l,1),u++):u&&(a.splice(l,1),u--)}if(l)for(;u--;u)a.unshift("..");return a})(d.split("/").filter(a=>!!a),!h).join("/"),(h?"/":"")+d||"."}function trim(a){let l=0;for(;l<a.length&&""===a[l];l++);let u=a.length-1;for(;u>=0&&""===a[u];u--);return l>u?[]:a.slice(l,u-l+1)}let t4="RewriteFrames",rewriteFramesIntegration=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=a.root,u=a.prefix||"app:///",d=a.iteratee||(a=>{if(!a.filename)return a;let d=/^[a-zA-Z]:\\/.test(a.filename)||a.filename.includes("\\")&&!a.filename.includes("/"),h=/^\//.test(a.filename);if(d||h){var f;let h;let p=d?a.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):a.filename,g=l?function(a,l){a=resolve(a).slice(1),l=resolve(l).slice(1);let u=trim(a.split("/")),d=trim(l.split("/")),h=Math.min(u.length,d.length),f=h;for(let a=0;a<h;a++)if(u[a]!==d[a]){f=a;break}let p=[];for(let a=f;a<u.length;a++)p.push("..");return(p=p.concat(d.slice(f))).join("/")}(l,p):(h=function(a){let l=a.length>1024?"<truncated>".concat(a.slice(-1024)):a,u=t8.exec(l);return u?u.slice(1):[]}(p)[2],f&&h.slice(-1*f.length)===f&&(h=h.slice(0,h.length-f.length)),h);a.filename="".concat(u).concat(g)}return a});return{name:t4,setupOnce(){},processEvent(a){let l=a;return a.exception&&Array.isArray(a.exception.values)&&(l=function(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(a=>{var l;return{...a,...a.stacktrace&&{stacktrace:{...l=a.stacktrace,frames:l&&l.frames&&l.frames.map(a=>d(a))}}}})}}}catch(l){return a}}(l)),l}}};convertIntegrationFnToClass(t4,rewriteFramesIntegration);let t9=u.g,rewriteFramesIntegration_rewriteFramesIntegration=a=>{let l=t9.__rewriteFramesAssetPrefixPath__||"";return rewriteFramesIntegration({iteratee:a=>{try{let{origin:u}=new URL(a.filename);a.filename=_optionalChain([a,"access",a=>a.filename,"optionalAccess",a=>a.replace,"call",a=>a(u,"app://"),"access",a=>a.replace,"call",a=>a(l,"")])}catch(a){}return a.filename&&a.filename.startsWith("app:///_next")&&(a.filename=decodeURI(a.filename)),a.filename&&a.filename.match(/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/)&&(a.in_app=!1),a},...a})},t7=u.g;function maybeUpdateBrowserTracingIntegration(a){let l=a.find(a=>"BrowserTracing"===a.name);if(!l)return a;if(l.afterAllSetup&&l.options){let{options:u}=l;a[a.indexOf(l)]=new BrowserTracing(u)}if(!(l instanceof BrowserTracing)){let u=l.options;delete u.routingInstrumentation,delete u.tracingOrigins,a[a.indexOf(l)]=new BrowserTracing(u)}return a}function removeTrailingSlash(a){return"/"===a[a.length-1]?a.slice(0,-1):a}({...th});var re=u(831151);function isBrowser(){return!(0,re.KV)()||void 0!==eU.GLOBAL_OBJ.process&&"renderer"===eU.GLOBAL_OBJ.process.type}let rt=eU.GLOBAL_OBJ,rr="sentryReplaySession",rn="Unable to send Replay";function _optionalChain$5(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}function isShadowRoot(a){let l=_optionalChain$5([a,"optionalAccess",a=>a.host]);return _optionalChain$5([l,"optionalAccess",a=>a.shadowRoot])===a}function isNativeShadowDom(a){return"[object ShadowRoot]"===Object.prototype.toString.call(a)}function stringifyStylesheet(a){try{var l;let u=a.rules||a.cssRules;return u?((l=Array.from(u,stringifyRule).join("")).includes(" background-clip: text;")&&!l.includes(" -webkit-background-clip: text;")&&(l=l.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),l):null}catch(a){return null}}function stringifyRule(a){let l;if("styleSheet"in a)try{l=stringifyStylesheet(a.styleSheet)||function(a){let{cssText:l}=a;if(l.split('"').length<3)return l;let u=["@import","url(".concat(JSON.stringify(a.href),")")];return""===a.layerName?u.push("layer"):a.layerName&&u.push("layer(".concat(a.layerName,")")),a.supportsText&&u.push("supports(".concat(a.supportsText,")")),a.media.length&&u.push(a.media.mediaText),u.join(" ")+";"}(a)}catch(a){}else if("selectorText"in a&&a.selectorText.includes(":"))return a.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return l||a.cssText}(eu=ev||(ev={}))[eu.Document=0]="Document",eu[eu.DocumentType=1]="DocumentType",eu[eu.Element=2]="Element",eu[eu.Text=3]="Text",eu[eu.CDATA=4]="CDATA",eu[eu.Comment=5]="Comment";let Mirror=class Mirror{getId(a){if(!a)return -1;let l=_optionalChain$5([this,"access",a=>a.getMeta,"call",l=>l(a),"optionalAccess",a=>a.id]);return()=>-1,null!=l?l:-1}getNode(a){return this.idNodeMap.get(a)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(a){return this.nodeMetaMap.get(a)||null}removeNodeFromMap(a){let l=this.getId(a);this.idNodeMap.delete(l),a.childNodes&&a.childNodes.forEach(a=>this.removeNodeFromMap(a))}has(a){return this.idNodeMap.has(a)}hasNode(a){return this.nodeMetaMap.has(a)}add(a,l){let u=l.id;this.idNodeMap.set(u,a),this.nodeMetaMap.set(a,l)}replace(a,l){let u=this.getNode(a);if(u){let a=this.nodeMetaMap.get(u);a&&this.nodeMetaMap.set(l,a)}this.idNodeMap.set(a,l)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function shouldMaskInput(a){let{maskInputOptions:l,tagName:u,type:d}=a;return"OPTION"===u&&(u="SELECT"),!!(l[u.toLowerCase()]||d&&l[d]||"password"===d||"INPUT"===u&&!d&&l.text)}function maskInputValue(a){let{isMasked:l,element:u,value:d,maskInputFn:h}=a,f=d||"";return l?(h&&(f=h(f,u)),"*".repeat(f.length)):f}function toLowerCase(a){return a.toLowerCase()}function toUpperCase(a){return a.toUpperCase()}let ri="__rrweb_original__";function getInputType(a){let l=a.type;return a.hasAttribute("data-rr-is-password")?"password":l?toLowerCase(l):null}function getInputValue(a,l,u){return"INPUT"===l&&("radio"===u||"checkbox"===u)?a.getAttribute("value")||"":a.value}let rs=1,ro=RegExp("[^a-z0-9-_:]");function genId(){return rs++}let ra=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rl=/^(?:[a-z+]+:)?\/\//i,rc=/^www\..*/i,ru=/^(data:)([^,]*),(.*)/i;function absoluteToStylesheet(a,l){return(a||"").replace(ra,(a,u,d,h,f,p)=>{let g=d||f||p,m=u||h||"";if(!g)return a;if(rl.test(g)||rc.test(g)||ru.test(g))return"url(".concat(m).concat(g).concat(m,")");if("/"===g[0])return"url(".concat(m).concat((l.indexOf("//")>-1?l.split("/").slice(0,3).join("/"):l.split("/")[0]).split("?")[0]+g).concat(m,")");let v=l.split("/"),_=g.split("/");for(let a of(v.pop(),_))"."!==a&&(".."===a?v.pop():v.push(a));return"url(".concat(m).concat(v.join("/")).concat(m,")")})}let rd=/^[^ \t\n\r\u000c]+/,rh=/^[, \t\n\r\u000c]+/;function absoluteToDoc(a,l){if(!l||""===l.trim())return l;let u=a.createElement("a");return u.href=l,u.href}function getHref(){let a=document.createElement("a");return a.href="",a.href}function transformAttribute(a,l,u,d,h,f){return d?"src"!==u&&("href"!==u||"use"===l&&"#"===d[0])&&("xlink:href"!==u||"#"===d[0])&&("background"!==u||"table"!==l&&"td"!==l&&"th"!==l)?"srcset"===u?function(a,l){if(""===l.trim())return l;let u=0;function collectCharacters(a){let d;let h=a.exec(l.substring(u));return h?(d=h[0],u+=d.length,d):""}let d=[];for(;collectCharacters(rh),!(u>=l.length);){let h=collectCharacters(rd);if(","===h.slice(-1))h=absoluteToDoc(a,h.substring(0,h.length-1)),d.push(h);else{let f="";h=absoluteToDoc(a,h);let p=!1;for(;;){let a=l.charAt(u);if(""===a){d.push((h+f).trim());break}if(p)")"===a&&(p=!1);else{if(","===a){u+=1,d.push((h+f).trim());break}"("===a&&(p=!0)}f+=a,u+=1}}}return d.join(", ")}(a,d):"style"===u?absoluteToStylesheet(d,getHref()):"object"===l&&"data"===u?absoluteToDoc(a,d):"function"==typeof f?f(u,d,h):d:absoluteToDoc(a,d):d}function ignoreAttribute(a,l,u){return("video"===a||"audio"===a)&&"autoplay"===l}function distanceToMatch(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return!a||a.nodeType!==a.ELEMENT_NODE||d>u?-1:l(a)?d:distanceToMatch(a.parentNode,l,u,d+1)}function createMatchPredicate(a,l){return u=>{if(null===u)return!1;try{if(a){if("string"==typeof a){if(u.matches(".".concat(a)))return!0}else if(function(a,l){for(let u=a.classList.length;u--;){let d=a.classList[u];if(l.test(d))return!0}return!1}(u,a))return!0}if(l&&u.matches(l))return!0;return!1}catch(a){return!1}}}function needMaskingText(a,l,u,d,h,f){try{let p=a.nodeType===a.ELEMENT_NODE?a:a.parentElement;if(null===p)return!1;if("INPUT"===p.tagName){let a=p.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(a))return!0}let g=-1,m=-1;if(f){if((m=distanceToMatch(p,createMatchPredicate(d,h)))<0)return!0;g=distanceToMatch(p,createMatchPredicate(l,u),m>=0?m:1/0)}else{if((g=distanceToMatch(p,createMatchPredicate(l,u)))<0)return!1;m=distanceToMatch(p,createMatchPredicate(d,h),g>=0?g:1/0)}return g>=0?!(m>=0)||g<=m:!(m>=0)&&!!f}catch(a){}return!!f}function lowerIfExists(a){return null==a?"":a.toLowerCase()}function serializeNodeWithId(a,l){let u;let{doc:d,mirror:h,blockClass:f,blockSelector:p,unblockSelector:g,maskAllText:m,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,skipChild:R=!1,inlineStylesheet:er=!0,maskInputOptions:en={},maskAttributeFn:ei,maskTextFn:es,maskInputFn:eo,slimDOMOptions:ea,dataURLOptions:el={},inlineImages:ec=!1,recordCanvas:eu=!1,onSerialize:ed,onIframeLoad:eh,iframeLoadTimeout:ef=5e3,onStylesheetLoad:ep,stylesheetLoadTimeout:eg=5e3,keepIframeSrcFn:em=()=>!1,newlyAddedElement:e_=!1}=l,{preserveWhiteSpace:ey=!0}=l,eb=function(a,l){let{doc:u,mirror:d,blockClass:h,blockSelector:f,unblockSelector:p,maskAllText:g,maskAttributeFn:m,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,inlineStylesheet:R,maskInputOptions:er={},maskTextFn:en,maskInputFn:ei,dataURLOptions:es={},inlineImages:eo,recordCanvas:ea,keepIframeSrcFn:el,newlyAddedElement:ec=!1}=l,eu=function(a,l){if(!l.hasNode(a))return;let u=l.getId(a);return 1===u?void 0:u}(u,d);switch(a.nodeType){case a.DOCUMENT_NODE:if("CSS1Compat"!==a.compatMode)return{type:ev.Document,childNodes:[],compatMode:a.compatMode};return{type:ev.Document,childNodes:[]};case a.DOCUMENT_TYPE_NODE:return{type:ev.DocumentType,name:a.name,publicId:a.publicId,systemId:a.systemId,rootId:eu};case a.ELEMENT_NODE:return function(a,l){let u;let{doc:d,blockClass:h,blockSelector:f,unblockSelector:p,inlineStylesheet:g,maskInputOptions:m={},maskAttributeFn:v,maskInputFn:_,dataURLOptions:T={},inlineImages:C,recordCanvas:R,keepIframeSrcFn:er,newlyAddedElement:en=!1,rootId:ei,maskAllText:es,maskTextClass:eo,unmaskTextClass:ea,maskTextSelector:el,unmaskTextSelector:ec}=l,eu=function(a,l,u,d){try{if(d&&a.matches(d))return!1;if("string"==typeof l){if(a.classList.contains(l))return!0}else for(let u=a.classList.length;u--;){let d=a.classList[u];if(l.test(d))return!0}if(u)return a.matches(u)}catch(a){}return!1}(a,h,f,p),ed=function(a){if(a instanceof HTMLFormElement)return"form";let l=toLowerCase(a.tagName);return ro.test(l)?"div":l}(a),eh={},ef=a.attributes.length;for(let l=0;l<ef;l++){let u=a.attributes[l];u.name&&!ignoreAttribute(ed,u.name,u.value)&&(eh[u.name]=transformAttribute(d,ed,toLowerCase(u.name),u.value,a,v))}if("link"===ed&&g){let l=Array.from(d.styleSheets).find(l=>l.href===a.href),u=null;l&&(u=stringifyStylesheet(l)),u&&(delete eh.rel,delete eh.href,eh._cssText=absoluteToStylesheet(u,l.href))}if("style"===ed&&a.sheet&&!(a.innerText||a.textContent||"").trim().length){let l=stringifyStylesheet(a.sheet);l&&(eh._cssText=absoluteToStylesheet(l,getHref()))}if("input"===ed||"textarea"===ed||"select"===ed||"option"===ed){let l=getInputType(a),u=getInputValue(a,toUpperCase(ed),l),d=a.checked;if("submit"!==l&&"button"!==l&&u){let d=needMaskingText(a,eo,el,ea,ec,shouldMaskInput({type:l,tagName:toUpperCase(ed),maskInputOptions:m}));eh.value=maskInputValue({isMasked:d,element:a,value:u,maskInputFn:_})}d&&(eh.checked=d)}if("option"===ed&&(a.selected&&!m.select?eh.selected=!0:delete eh.selected),"canvas"===ed&&R){if("2d"===a.__context)!function(a){let l=a.getContext("2d");if(!l)return!0;for(let u=0;u<a.width;u+=50)for(let d=0;d<a.height;d+=50){let h=l.getImageData,f=ri in h?h[ri]:h,p=new Uint32Array(f.call(l,u,d,Math.min(50,a.width-u),Math.min(50,a.height-d)).data.buffer);if(p.some(a=>0!==a))return!1}return!0}(a)&&(eh.rr_dataURL=a.toDataURL(T.type,T.quality));else if(!("__context"in a)){let l=a.toDataURL(T.type,T.quality),u=document.createElement("canvas");u.width=a.width,u.height=a.height;let d=u.toDataURL(T.type,T.quality);l!==d&&(eh.rr_dataURL=l)}}if("img"===ed&&C){B||(V=(B=d.createElement("canvas")).getContext("2d"));let l=a.crossOrigin;a.crossOrigin="anonymous";let recordInlineImage=()=>{a.removeEventListener("load",recordInlineImage);try{B.width=a.naturalWidth,B.height=a.naturalHeight,V.drawImage(a,0,0),eh.rr_dataURL=B.toDataURL(T.type,T.quality)}catch(l){console.warn("Cannot inline img src=".concat(a.currentSrc,"! Error: ").concat(l))}l?eh.crossOrigin=l:a.removeAttribute("crossorigin")};a.complete&&0!==a.naturalWidth?recordInlineImage():a.addEventListener("load",recordInlineImage)}if(("audio"===ed||"video"===ed)&&(eh.rr_mediaState=a.paused?"paused":"played",eh.rr_mediaCurrentTime=a.currentTime),!en&&(a.scrollLeft&&(eh.rr_scrollLeft=a.scrollLeft),a.scrollTop&&(eh.rr_scrollTop=a.scrollTop)),eu){let{width:l,height:u}=a.getBoundingClientRect();eh={class:eh.class,rr_width:"".concat(l,"px"),rr_height:"".concat(u,"px")}}"iframe"!==ed||er(eh.src)||(a.contentDocument||(eh.rr_src=eh.src),delete eh.src);try{customElements.get(ed)&&(u=!0)}catch(a){}return{type:ev.Element,tagName:ed,attributes:eh,childNodes:[],isSVG:!!("svg"===a.tagName||a.ownerSVGElement)||void 0,needBlock:eu,rootId:ei,isCustom:u}}(a,{doc:u,blockClass:h,blockSelector:f,unblockSelector:p,inlineStylesheet:R,maskAttributeFn:m,maskInputOptions:er,maskInputFn:ei,dataURLOptions:es,inlineImages:eo,recordCanvas:ea,keepIframeSrcFn:el,newlyAddedElement:ec,rootId:eu,maskAllText:g,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C});case a.TEXT_NODE:return function(a,l){let{maskAllText:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:m,maskInputFn:v,rootId:_}=l,T=a.parentNode&&a.parentNode.tagName,C=a.textContent,R="STYLE"===T||void 0,B="SCRIPT"===T||void 0,V="TEXTAREA"===T||void 0;if(R&&C){try{a.nextSibling||a.previousSibling||_optionalChain$5([a,"access",a=>a.parentNode,"access",a=>a.sheet,"optionalAccess",a=>a.cssRules])&&(C=stringifyStylesheet(a.parentNode.sheet))}catch(l){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(l),a)}C=absoluteToStylesheet(C,getHref())}B&&(C="SCRIPT_PLACEHOLDER");let er=needMaskingText(a,d,f,h,p,u);if(R||B||V||!C||!er||(C=g?g(C):C.replace(/[\S]/g,"*")),V&&C&&(m.textarea||er)&&(C=v?v(C,a.parentNode):C.replace(/[\S]/g,"*")),"OPTION"===T&&C){let l=shouldMaskInput({type:null,tagName:T,maskInputOptions:m});C=maskInputValue({isMasked:needMaskingText(a,d,f,h,p,l),element:a,value:C,maskInputFn:v})}return{type:ev.Text,textContent:C||"",isStyle:R,rootId:_}}(a,{maskAllText:g,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,maskTextFn:en,maskInputOptions:er,maskInputFn:ei,rootId:eu});case a.CDATA_SECTION_NODE:return{type:ev.CDATA,textContent:"",rootId:eu};case a.COMMENT_NODE:return{type:ev.Comment,textContent:a.textContent||"",rootId:eu};default:return!1}}(a,{doc:d,mirror:h,blockClass:f,blockSelector:p,maskAllText:m,unblockSelector:g,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,inlineStylesheet:er,maskInputOptions:en,maskAttributeFn:ei,maskTextFn:es,maskInputFn:eo,dataURLOptions:el,inlineImages:ec,recordCanvas:eu,keepIframeSrcFn:em,newlyAddedElement:e_});if(!eb)return console.warn(a,"not serialized"),null;u=h.hasNode(a)?h.getId(a):!function(a,l){if(l.comment&&a.type===ev.Comment)return!0;if(a.type===ev.Element){if(l.script&&("script"===a.tagName||"link"===a.tagName&&("preload"===a.attributes.rel||"modulepreload"===a.attributes.rel)&&"script"===a.attributes.as||"link"===a.tagName&&"prefetch"===a.attributes.rel&&"string"==typeof a.attributes.href&&a.attributes.href.endsWith(".js"))||l.headFavicon&&("link"===a.tagName&&"shortcut icon"===a.attributes.rel||"meta"===a.tagName&&(lowerIfExists(a.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===lowerIfExists(a.attributes.name)||"icon"===lowerIfExists(a.attributes.rel)||"apple-touch-icon"===lowerIfExists(a.attributes.rel)||"shortcut icon"===lowerIfExists(a.attributes.rel))))return!0;if("meta"===a.tagName){if(l.headMetaDescKeywords&&lowerIfExists(a.attributes.name).match(/^description|keywords$/)||l.headMetaSocial&&(lowerIfExists(a.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(a.attributes.name).match(/^(og|twitter):/)||"pinterest"===lowerIfExists(a.attributes.name)))return!0;if(l.headMetaRobots&&("robots"===lowerIfExists(a.attributes.name)||"googlebot"===lowerIfExists(a.attributes.name)||"bingbot"===lowerIfExists(a.attributes.name)))return!0;if(l.headMetaHttpEquiv&&void 0!==a.attributes["http-equiv"])return!0;else if(l.headMetaAuthorship&&("author"===lowerIfExists(a.attributes.name)||"generator"===lowerIfExists(a.attributes.name)||"framework"===lowerIfExists(a.attributes.name)||"publisher"===lowerIfExists(a.attributes.name)||"progid"===lowerIfExists(a.attributes.name)||lowerIfExists(a.attributes.property).match(/^article:/)||lowerIfExists(a.attributes.property).match(/^product:/)))return!0;else if(l.headMetaVerification&&("google-site-verification"===lowerIfExists(a.attributes.name)||"yandex-verification"===lowerIfExists(a.attributes.name)||"csrf-token"===lowerIfExists(a.attributes.name)||"p:domain_verify"===lowerIfExists(a.attributes.name)||"verify-v1"===lowerIfExists(a.attributes.name)||"verification"===lowerIfExists(a.attributes.name)||"shopify-checkout-api-token"===lowerIfExists(a.attributes.name)))return!0}}return!1}(eb,ea)&&(ey||eb.type!==ev.Text||eb.isStyle||eb.textContent.replace(/^\s+|\s+$/gm,"").length)?genId():-2;let ew=Object.assign(eb,{id:u});if(h.add(a,ew),-2===u)return null;ed&&ed(a);let eS=!R;if(ew.type===ev.Element){eS=eS&&!ew.needBlock,delete ew.needBlock;let l=a.shadowRoot;l&&isNativeShadowDom(l)&&(ew.isShadowHost=!0)}if((ew.type===ev.Document||ew.type===ev.Element)&&eS){ea.headWhitespace&&ew.type===ev.Element&&"head"===ew.tagName&&(ey=!1);let l={doc:d,mirror:h,blockClass:f,blockSelector:p,maskAllText:m,unblockSelector:g,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,skipChild:R,inlineStylesheet:er,maskInputOptions:en,maskAttributeFn:ei,maskTextFn:es,maskInputFn:eo,slimDOMOptions:ea,dataURLOptions:el,inlineImages:ec,recordCanvas:eu,preserveWhiteSpace:ey,onSerialize:ed,onIframeLoad:eh,iframeLoadTimeout:ef,onStylesheetLoad:ep,stylesheetLoadTimeout:eg,keepIframeSrcFn:em};for(let u of Array.from(a.childNodes)){let a=serializeNodeWithId(u,l);a&&ew.childNodes.push(a)}if(a.nodeType===a.ELEMENT_NODE&&a.shadowRoot)for(let u of Array.from(a.shadowRoot.childNodes)){let d=serializeNodeWithId(u,l);d&&(isNativeShadowDom(a.shadowRoot)&&(d.isShadow=!0),ew.childNodes.push(d))}}return a.parentNode&&isShadowRoot(a.parentNode)&&isNativeShadowDom(a.parentNode)&&(ew.isShadow=!0),ew.type===ev.Element&&"iframe"===ew.tagName&&function(a,l,u){let d;let h=a.contentWindow;if(!h)return;let f=!1;try{d=h.document.readyState}catch(a){return}if("complete"!==d){let d=setTimeout(()=>{f||(l(),f=!0)},u);a.addEventListener("load",()=>{clearTimeout(d),f=!0,l()});return}let p="about:blank";if(h.location.href!==p||a.src===p||""===a.src)return setTimeout(l,0),a.addEventListener("load",l);a.addEventListener("load",l)}(a,()=>{let l=a.contentDocument;if(l&&eh){let u=serializeNodeWithId(l,{doc:l,mirror:h,blockClass:f,blockSelector:p,unblockSelector:g,maskAllText:m,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:er,maskInputOptions:en,maskAttributeFn:ei,maskTextFn:es,maskInputFn:eo,slimDOMOptions:ea,dataURLOptions:el,inlineImages:ec,recordCanvas:eu,preserveWhiteSpace:ey,onSerialize:ed,onIframeLoad:eh,iframeLoadTimeout:ef,onStylesheetLoad:ep,stylesheetLoadTimeout:eg,keepIframeSrcFn:em});u&&eh(a,u)}},ef),ew.type===ev.Element&&"link"===ew.tagName&&"stylesheet"===ew.attributes.rel&&function(a,l,u){let d,h=!1;try{d=a.sheet}catch(a){return}if(d)return;let f=setTimeout(()=>{h||(l(),h=!0)},u);a.addEventListener("load",()=>{clearTimeout(f),h=!0,l()})}(a,()=>{if(ep){let l=serializeNodeWithId(a,{doc:d,mirror:h,blockClass:f,blockSelector:p,unblockSelector:g,maskAllText:m,maskTextClass:v,unmaskTextClass:_,maskTextSelector:T,unmaskTextSelector:C,skipChild:!1,inlineStylesheet:er,maskInputOptions:en,maskAttributeFn:ei,maskTextFn:es,maskInputFn:eo,slimDOMOptions:ea,dataURLOptions:el,inlineImages:ec,recordCanvas:eu,preserveWhiteSpace:ey,onSerialize:ed,onIframeLoad:eh,iframeLoadTimeout:ef,onStylesheetLoad:ep,stylesheetLoadTimeout:eg,keepIframeSrcFn:em});l&&ep(a,l)}},eg),ew}function _optionalChain$4(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}function on(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,d={capture:!0,passive:!0};return u.addEventListener(a,l,d),()=>u.removeEventListener(a,l,d)}let rf="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",rp={map:{},getId:()=>(console.error(rf),-1),getNode:()=>(console.error(rf),null),removeNodeFromMap(){console.error(rf)},has:()=>(console.error(rf),!1),reset(){console.error(rf)}};function throttle$1(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=null,h=0;return function(){for(var f=arguments.length,p=Array(f),g=0;g<f;g++)p[g]=arguments[g];let m=Date.now();h||!1!==u.leading||(h=m);let v=l-(m-h),_=this;v<=0||v>l?(d&&(clearTimeout(d),d=null),h=m,a.apply(_,p)):d||!1===u.trailing||(d=setTimeout(()=>{h=!1===u.leading?0:Date.now(),d=null,a.apply(_,p)},v))}}function patch(a,l,u){try{if(!(l in a))return()=>{};let d=a[l],h=u(d);return"function"==typeof h&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__rrweb_original__:{enumerable:!1,value:d}})),a[l]=h,()=>{a[l]=d}}catch(a){return()=>{}}}window.Proxy&&window.Reflect&&(rp=new Proxy(rp,{get:(a,l,u)=>("map"===l&&console.error(rf),Reflect.get(a,l,u))}));let rg=Date.now;function getWindowScroll(a){let l=a.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:void 0!==a.pageXOffset?a.pageXOffset:_optionalChain$4([l,"optionalAccess",a=>a.documentElement,"access",a=>a.scrollLeft])||_optionalChain$4([l,"optionalAccess",a=>a.body,"optionalAccess",a=>a.parentElement,"optionalAccess",a=>a.scrollLeft])||_optionalChain$4([l,"optionalAccess",a=>a.body,"optionalAccess",a=>a.scrollLeft])||0,top:l.scrollingElement?l.scrollingElement.scrollTop:void 0!==a.pageYOffset?a.pageYOffset:_optionalChain$4([l,"optionalAccess",a=>a.documentElement,"access",a=>a.scrollTop])||_optionalChain$4([l,"optionalAccess",a=>a.body,"optionalAccess",a=>a.parentElement,"optionalAccess",a=>a.scrollTop])||_optionalChain$4([l,"optionalAccess",a=>a.body,"optionalAccess",a=>a.scrollTop])||0}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(a,l,u,d,h){if(!a)return!1;let f=a.nodeType===a.ELEMENT_NODE?a:a.parentElement;if(!f)return!1;let p=createMatchPredicate(l,u);if(!h){let a=d&&f.matches(d);return p(f)&&!a}let g=distanceToMatch(f,p),m=-1;return!(g<0)&&(d&&(m=distanceToMatch(f,createMatchPredicate(null,d))),g>-1&&m<0||g<m)}function isIgnored(a,l){return -2===l.getId(a)}function legacy_isTouchEvent(a){return!!a.changedTouches}function isSerializedIframe(a,l){return!!("IFRAME"===a.nodeName&&l.getMeta(a))}function isSerializedStylesheet(a,l){return!!("LINK"===a.nodeName&&a.nodeType===a.ELEMENT_NODE&&a.getAttribute&&"stylesheet"===a.getAttribute("rel")&&l.getMeta(a))}function hasShadowRoot(a){return!!_optionalChain$4([a,"optionalAccess",a=>a.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(rg=()=>new Date().getTime());let StyleSheetMirror=class StyleSheetMirror{getId(a){var l;return l=this.styleIDMap.get(a),null!=l?l:-1}has(a){return this.styleIDMap.has(a)}add(a,l){let u;return this.has(a)?this.getId(a):(u=void 0===l?this.id++:l,this.styleIDMap.set(a,u),this.idStyleMap.set(u,a),u)}getStyle(a){return this.idStyleMap.get(a)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}};function getShadowHost(a){let l=null;return _optionalChain$4([a,"access",a=>a.getRootNode,"optionalCall",a=>a(),"optionalAccess",a=>a.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(l=a.getRootNode().host),l}function inDom(a){let l=a.ownerDocument;return!!l&&(l.contains(a)||function(a){let l=a.ownerDocument;if(!l)return!1;let u=function(a){let l,u=a;for(;l=getShadowHost(u);)u=l;return u}(a);return l.contains(u)}(a))}var rm=((ed=rm||{})[ed.DomContentLoaded=0]="DomContentLoaded",ed[ed.Load=1]="Load",ed[ed.FullSnapshot=2]="FullSnapshot",ed[ed.IncrementalSnapshot=3]="IncrementalSnapshot",ed[ed.Meta=4]="Meta",ed[ed.Custom=5]="Custom",ed[ed.Plugin=6]="Plugin",ed),rv=((eh=rv||{})[eh.Mutation=0]="Mutation",eh[eh.MouseMove=1]="MouseMove",eh[eh.MouseInteraction=2]="MouseInteraction",eh[eh.Scroll=3]="Scroll",eh[eh.ViewportResize=4]="ViewportResize",eh[eh.Input=5]="Input",eh[eh.TouchMove=6]="TouchMove",eh[eh.MediaInteraction=7]="MediaInteraction",eh[eh.StyleSheetRule=8]="StyleSheetRule",eh[eh.CanvasMutation=9]="CanvasMutation",eh[eh.Font=10]="Font",eh[eh.Log=11]="Log",eh[eh.Drag=12]="Drag",eh[eh.StyleDeclaration=13]="StyleDeclaration",eh[eh.Selection=14]="Selection",eh[eh.AdoptedStyleSheet=15]="AdoptedStyleSheet",eh[eh.CustomElement=16]="CustomElement",eh),r_=((ef=r_||{})[ef.MouseUp=0]="MouseUp",ef[ef.MouseDown=1]="MouseDown",ef[ef.Click=2]="Click",ef[ef.ContextMenu=3]="ContextMenu",ef[ef.DblClick=4]="DblClick",ef[ef.Focus=5]="Focus",ef[ef.Blur=6]="Blur",ef[ef.TouchStart=7]="TouchStart",ef[ef.TouchMove_Departed=8]="TouchMove_Departed",ef[ef.TouchEnd=9]="TouchEnd",ef[ef.TouchCancel=10]="TouchCancel",ef),ry=((ep=ry||{})[ep.Mouse=0]="Mouse",ep[ep.Pen=1]="Pen",ep[ep.Touch=2]="Touch",ep);let DoubleLinkedList=class DoubleLinkedList{get(a){if(a>=this.length)throw Error("Position outside of list range");let l=this.head;for(let u=0;u<a;u++)l=function(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}([l,"optionalAccess",a=>a.next])||null;return l}addNode(a){let l={value:a,previous:null,next:null};if(a.__ln=l,a.previousSibling&&"__ln"in a.previousSibling){let u=a.previousSibling.__ln.next;l.next=u,l.previous=a.previousSibling.__ln,a.previousSibling.__ln.next=l,u&&(u.previous=l)}else if(a.nextSibling&&"__ln"in a.nextSibling&&a.nextSibling.__ln.previous){let u=a.nextSibling.__ln.previous;l.previous=u,l.next=a.nextSibling.__ln,a.nextSibling.__ln.previous=l,u&&(u.next=l)}else this.head&&(this.head.previous=l),l.next=this.head,this.head=l;null===l.next&&(this.tail=l),this.length++}removeNode(a){let l=a.__ln;this.head&&(l.previous?(l.previous.next=l.next,l.next?l.next.previous=l.previous:this.tail=l.previous):(this.head=l.next,this.head?this.head.previous=null:this.tail=null),a.__ln&&delete a.__ln,this.length--)}constructor(){this.length=0,this.head=null,this.tail=null}};let moveKey=(a,l)=>"".concat(a,"@").concat(l);let MutationBuffer=class MutationBuffer{init(a){["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(l=>{this[l]=a[l]})}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()}constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=a=>{a.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let a=[],l=new Set,u=new DoubleLinkedList,getNextId=a=>{let l=a,u=-2;for(;-2===u;)u=(l=l&&l.nextSibling)&&this.mirror.getId(l);return u},pushAdd=d=>{if(!d.parentNode||!inDom(d))return;let h=isShadowRoot(d.parentNode)?this.mirror.getId(getShadowHost(d)):this.mirror.getId(d.parentNode),f=getNextId(d);if(-1===h||-1===f)return u.addNode(d);let p=serializeNodeWithId(d,{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:a=>{isSerializedIframe(a,this.mirror)&&this.iframeManager.addIframe(a),isSerializedStylesheet(a,this.mirror)&&this.stylesheetManager.trackLinkElement(a),hasShadowRoot(d)&&this.shadowDomManager.addShadowRoot(d.shadowRoot,this.doc)},onIframeLoad:(a,l)=>{this.iframeManager.attachIframe(a,l),this.shadowDomManager.observeAttachShadow(a)},onStylesheetLoad:(a,l)=>{this.stylesheetManager.attachLinkElement(a,l)}});p&&(a.push({parentId:h,nextId:f,node:p}),l.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)(!isParentRemoved(this.removes,a,this.mirror)||this.movedSet.has(a.parentNode))&&pushAdd(a);for(let a of this.addedSet)isAncestorInSet(this.droppedSet,a)||isParentRemoved(this.removes,a,this.mirror)?isAncestorInSet(this.movedSet,a)?pushAdd(a):this.droppedSet.add(a):pushAdd(a);let d=null;for(;u.length;){let a=null;if(d){let l=this.mirror.getId(d.value.parentNode),u=getNextId(d.value);-1!==l&&-1!==u&&(a=d)}if(!a){let l=u.tail;for(;l;){let u=l;if(l=l.previous,u){let l=this.mirror.getId(u.value.parentNode),d=getNextId(u.value);if(-1===d)continue;if(-1!==l){a=u;break}{let l=u.value;if(l.parentNode&&l.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=l.parentNode.host,h=this.mirror.getId(d);if(-1!==h){a=u;break}}}}}}if(!a){for(;u.head;)u.removeNode(u.head.value);break}d=a.previous,u.removeNode(a.value),pushAdd(a.value)}let h={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!l.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:l}=a;if("string"==typeof l.style){let u=JSON.stringify(a.styleDiff),d=JSON.stringify(a._unchangedStyles);u.length<l.style.length&&(u+d).split("var(").length===l.style.split("var(").length&&(l.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:l}}).filter(a=>!l.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:a};(h.texts.length||h.attributes.length||h.removes.length||h.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(h))},this.processMutation=a=>{let l;if(!isIgnored(a.target,this.mirror)){try{l=document.implementation.createHTMLDocument()}catch(a){l=this.doc}switch(a.type){case"characterData":{let l=a.target.textContent;isBlocked(a.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||l===a.oldValue||this.texts.push({value:needMaskingText(a.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&l?this.maskTextFn?this.maskTextFn(l):l.replace(/[\S]/g,"*"):l,node:a.target});break}case"attributes":{let u=a.target,d=a.attributeName,h=a.target.getAttribute(d);if("value"===d){let l=getInputType(u),d=u.tagName;h=getInputValue(u,d,l);let f=shouldMaskInput({maskInputOptions:this.maskInputOptions,tagName:d,type:l}),p=needMaskingText(a.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,f);h=maskInputValue({isMasked:p,element:u,value:h,maskInputFn:this.maskInputFn})}if(isBlocked(a.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||h===a.oldValue)return;let f=this.attributes.find(l=>l.node===a.target);if("IFRAME"===u.tagName&&"src"===d&&!this.keepIframeSrcFn(h)){if(u.contentDocument)return;d="rr_src"}if(f||(f={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f)),"type"===d&&"INPUT"===u.tagName&&"password"===(a.oldValue||"").toLowerCase()&&u.setAttribute("data-rr-is-password","true"),!ignoreAttribute(u.tagName,d)&&(f.attributes[d]=transformAttribute(this.doc,toLowerCase(u.tagName),toLowerCase(d),h,u,this.maskAttributeFn),"style"===d)){let d=l.createElement("span");for(let l of(a.oldValue&&d.setAttribute("style",a.oldValue),Array.from(u.style))){let a=u.style.getPropertyValue(l),h=u.style.getPropertyPriority(l);a!==d.style.getPropertyValue(l)||h!==d.style.getPropertyPriority(l)?""===h?f.styleDiff[l]=a:f.styleDiff[l]=[a,h]:f._unchangedStyles[l]=[a,h]}for(let a of Array.from(d.style))""===u.style.getPropertyValue(a)&&(f.styleDiff[a]=!1)}break}case"childList":if(isBlocked(a.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;a.addedNodes.forEach(l=>this.genAdds(l,a.target)),a.removedNodes.forEach(l=>{let u=this.mirror.getId(l),d=isShadowRoot(a.target)?this.mirror.getId(a.target.host):this.mirror.getId(a.target);isBlocked(a.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||isIgnored(l,this.mirror)||-1===this.mirror.getId(l)||(this.addedSet.has(l)?(deepDelete(this.addedSet,l),this.droppedSet.add(l)):this.addedSet.has(a.target)&&-1===u||function isAncestorRemoved(a,l){if(isShadowRoot(a))return!1;let u=l.getId(a);return!l.has(u)||(!a.parentNode||a.parentNode.nodeType!==a.DOCUMENT_NODE)&&(!a.parentNode||isAncestorRemoved(a.parentNode,l))}(a.target,this.mirror)||(this.movedSet.has(l)&&this.movedMap[moveKey(u,d)]?deepDelete(this.movedSet,l):this.removes.push({parentId:d,id:u,isShadow:!!(isShadowRoot(a.target)&&isNativeShadowDom(a.target))||void 0})),this.mapRemoves.push(l))})}}},this.genAdds=(a,l)=>{if(!this.processedNodeManager.inOtherBuffer(a,this)&&!(this.addedSet.has(a)||this.movedSet.has(a))){if(this.mirror.hasNode(a)){if(isIgnored(a,this.mirror))return;this.movedSet.add(a);let u=null;l&&this.mirror.hasNode(l)&&(u=this.mirror.getId(l)),u&&-1!==u&&(this.movedMap[moveKey(this.mirror.getId(a),u)]=!0)}else this.addedSet.add(a),this.droppedSet.delete(a);!isBlocked(a,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(a.childNodes.forEach(a=>this.genAdds(a)),hasShadowRoot(a)&&a.shadowRoot.childNodes.forEach(l=>{this.processedNodeManager.add(l,this),this.genAdds(l,a)}))}}}};function deepDelete(a,l){a.delete(l),l.childNodes.forEach(l=>deepDelete(a,l))}function isParentRemoved(a,l,u){return 0!==a.length&&function _isParentRemoved(a,l,u){let{parentNode:d}=l;if(!d)return!1;let h=u.getId(d);return!!a.some(a=>a.id===h)||_isParentRemoved(a,d,u)}(a,l,u)}function isAncestorInSet(a,l){return 0!==a.size&&function _isAncestorInSet(a,l){let{parentNode:u}=l;return!!u&&(!!a.has(u)||_isAncestorInSet(a,u))}(a,l)}let callbackWrapper=a=>en?function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];try{return a(...u)}catch(a){if(en&&!0===en(a))return()=>{};throw a}}:a;function _optionalChain$2(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}let rb=[];function esm_getEventTarget(a){try{if("composedPath"in a){let l=a.composedPath();if(l.length)return l[0]}else if("path"in a&&a.path.length)return a.path[0]}catch(a){}return a&&a.target}function initMutationObserver(a,l){let u=new MutationBuffer;rb.push(u),u.init(a);let d=window.MutationObserver||window.__rrMutationObserver,h=_optionalChain$2([window,"optionalAccess",a=>a.Zone,"optionalAccess",a=>a.__symbol__,"optionalCall",a=>a("MutationObserver")]);h&&window[h]&&(d=window[h]);let f=new d(callbackWrapper(l=>{a.onMutation&&!1===a.onMutation(l)||u.processMutations.bind(u)(l)}));return f.observe(l,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),f}function initScrollObserver(a){let{scrollCb:l,doc:u,mirror:d,blockClass:h,blockSelector:f,unblockSelector:p,sampling:g}=a,m=callbackWrapper(throttle$1(callbackWrapper(a=>{let g=esm_getEventTarget(a);if(!g||isBlocked(g,h,f,p,!0))return;let m=d.getId(g);if(g===u&&u.defaultView){let a=getWindowScroll(u.defaultView);l({id:m,x:a.left,y:a.top})}else l({id:m,x:g.scrollLeft,y:g.scrollTop})}),g.scroll||100));return on("scroll",m,u)}let rw=["INPUT","TEXTAREA","SELECT"],rS=new WeakMap;function getNestedCSSRulePositions(a){return function(a,l){if(hasNestedCSSRule("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||hasNestedCSSRule("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||hasNestedCSSRule("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||hasNestedCSSRule("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){let u=Array.from(a.parentRule.cssRules),d=u.indexOf(a);l.unshift(d)}else if(a.parentStyleSheet){let u=Array.from(a.parentStyleSheet.cssRules),d=u.indexOf(a);l.unshift(d)}return l}(a,[])}function getIdAndStyleId(a,l,u){let d,h;return a?(a.ownerNode?d=l.getId(a.ownerNode):h=u.getId(a),{styleId:h,id:d}):{}}function initAdoptedStyleSheetObserver(a,l){let{mirror:u,stylesheetManager:d}=a,h=null;h="#document"===l.nodeName?u.getId(l):u.getId(l.host);let f="#document"===l.nodeName?_optionalChain$2([l,"access",a=>a.defaultView,"optionalAccess",a=>a.Document]):_optionalChain$2([l,"access",a=>a.ownerDocument,"optionalAccess",a=>a.defaultView,"optionalAccess",a=>a.ShadowRoot]),p=_optionalChain$2([f,"optionalAccess",a=>a.prototype])?Object.getOwnPropertyDescriptor(_optionalChain$2([f,"optionalAccess",a=>a.prototype]),"adoptedStyleSheets"):void 0;return null!==h&&-1!==h&&f&&p?(Object.defineProperty(l,"adoptedStyleSheets",{configurable:p.configurable,enumerable:p.enumerable,get(){return _optionalChain$2([p,"access",a=>a.get,"optionalAccess",a=>a.call,"call",a=>a(this)])},set(a){let l=_optionalChain$2([p,"access",a=>a.set,"optionalAccess",a=>a.call,"call",l=>l(this,a)]);if(null!==h&&-1!==h)try{d.adoptStyleSheets(a,h)}catch(a){}return l}}),callbackWrapper(()=>{Object.defineProperty(l,"adoptedStyleSheets",{configurable:p.configurable,enumerable:p.enumerable,get:p.get,set:p.set})})):()=>{}}function initObservers(a){arguments.length>1&&void 0!==arguments[1]&&arguments[1];let l=a.doc.defaultView;if(!l)return()=>{};let u=initMutationObserver(a,a.doc),d=function(a){let l,{mousemoveCb:u,sampling:d,doc:h,mirror:f}=a;if(!1===d.mousemove)return()=>{};let p="number"==typeof d.mousemove?d.mousemove:50,g="number"==typeof d.mousemoveCallback?d.mousemoveCallback:500,m=[],v=throttle$1(callbackWrapper(a=>{let d=Date.now()-l;u(m.map(a=>(a.timeOffset-=d,a)),a),m=[],l=null}),g),_=callbackWrapper(throttle$1(callbackWrapper(a=>{let u=esm_getEventTarget(a),{clientX:d,clientY:h}=legacy_isTouchEvent(a)?a.changedTouches[0]:a;l||(l=rg()),m.push({x:d,y:h,id:f.getId(u),timeOffset:rg()-l}),v("undefined"!=typeof DragEvent&&a instanceof DragEvent?rv.Drag:a instanceof MouseEvent?rv.MouseMove:rv.TouchMove)}),p,{trailing:!1})),T=[on("mousemove",_,h),on("touchmove",_,h),on("drag",_,h)];return callbackWrapper(()=>{T.forEach(a=>a())})}(a),h=function(a){let{mouseInteractionCb:l,doc:u,mirror:d,blockClass:h,blockSelector:f,unblockSelector:p,sampling:g}=a;if(!1===g.mouseInteraction)return()=>{};let m=!0===g.mouseInteraction||void 0===g.mouseInteraction?{}:g.mouseInteraction,v=[],_=null,getHandler=a=>u=>{let g=esm_getEventTarget(u);if(isBlocked(g,h,f,p,!0))return;let m=null,v=a;if("pointerType"in u){switch(u.pointerType){case"mouse":m=ry.Mouse;break;case"touch":m=ry.Touch;break;case"pen":m=ry.Pen}m===ry.Touch?r_[a]===r_.MouseDown?v="TouchStart":r_[a]===r_.MouseUp&&(v="TouchEnd"):ry.Pen}else legacy_isTouchEvent(u)&&(m=ry.Touch);null!==m?(_=m,(v.startsWith("Touch")&&m===ry.Touch||v.startsWith("Mouse")&&m===ry.Mouse)&&(m=null)):r_[a]===r_.Click&&(m=_,_=null);let T=legacy_isTouchEvent(u)?u.changedTouches[0]:u;if(!T)return;let C=d.getId(g),{clientX:R,clientY:B}=T;callbackWrapper(l)({type:r_[v],id:C,x:R,y:B,...null!==m&&{pointerType:m}})};return Object.keys(r_).filter(a=>Number.isNaN(Number(a))&&!a.endsWith("_Departed")&&!1!==m[a]).forEach(a=>{let l=toLowerCase(a),d=getHandler(a);if(window.PointerEvent)switch(r_[a]){case r_.MouseDown:case r_.MouseUp:l=l.replace("mouse","pointer");break;case r_.TouchStart:case r_.TouchEnd:return}v.push(on(l,d,u))}),callbackWrapper(()=>{v.forEach(a=>a())})}(a),f=initScrollObserver(a),p=function(a,l){let{viewportResizeCb:u}=a,{win:d}=l,h=-1,f=-1,p=callbackWrapper(throttle$1(callbackWrapper(()=>{let a=getWindowHeight(),l=getWindowWidth();(h!==a||f!==l)&&(u({width:Number(l),height:Number(a)}),h=a,f=l)}),200));return on("resize",p,d)}(a,{win:l}),g=function(a){let{inputCb:l,doc:u,mirror:d,blockClass:h,blockSelector:f,unblockSelector:p,ignoreClass:g,ignoreSelector:m,maskInputOptions:v,maskInputFn:_,sampling:T,userTriggeredOnInput:C,maskTextClass:R,unmaskTextClass:B,maskTextSelector:V,unmaskTextSelector:er}=a;function eventHandler(a){let l=esm_getEventTarget(a),d=a.isTrusted,T=l&&toUpperCase(l.tagName);if("OPTION"===T&&(l=l.parentElement),!l||!T||0>rw.indexOf(T)||isBlocked(l,h,f,p,!0))return;let en=l;if(en.classList.contains(g)||m&&en.matches(m))return;let ei=getInputType(l),es=getInputValue(en,T,ei),eo=!1,ea=shouldMaskInput({maskInputOptions:v,tagName:T,type:ei}),el=needMaskingText(l,R,V,B,er,ea);("radio"===ei||"checkbox"===ei)&&(eo=l.checked),es=maskInputValue({isMasked:el,element:l,value:es,maskInputFn:_}),cbWithDedup(l,C?{text:es,isChecked:eo,userTriggered:d}:{text:es,isChecked:eo});let ec=l.name;"radio"===ei&&ec&&eo&&u.querySelectorAll('input[type="radio"][name="'.concat(ec,'"]')).forEach(a=>{if(a!==l){let l=maskInputValue({isMasked:el,element:a,value:getInputValue(a,T,ei),maskInputFn:_});cbWithDedup(a,C?{text:l,isChecked:!eo,userTriggered:!1}:{text:l,isChecked:!eo})}})}function cbWithDedup(a,u){let h=rS.get(a);if(!h||h.text!==u.text||h.isChecked!==u.isChecked){rS.set(a,u);let h=d.getId(a);callbackWrapper(l)({...u,id:h})}}let en="last"===T.input?["change"]:["input","change"],ei=en.map(a=>on(a,callbackWrapper(eventHandler),u)),es=u.defaultView;if(!es)return()=>{ei.forEach(a=>a())};let eo=es.Object.getOwnPropertyDescriptor(es.HTMLInputElement.prototype,"value"),ea=[[es.HTMLInputElement.prototype,"value"],[es.HTMLInputElement.prototype,"checked"],[es.HTMLSelectElement.prototype,"value"],[es.HTMLTextAreaElement.prototype,"value"],[es.HTMLSelectElement.prototype,"selectedIndex"],[es.HTMLOptionElement.prototype,"selected"]];return eo&&eo.set&&ei.push(...ea.map(a=>(function hookSetter(a,l,u,d){let h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,f=h.Object.getOwnPropertyDescriptor(a,l);return h.Object.defineProperty(a,l,d?u:{set(a){setTimeout(()=>{u.set.call(this,a)},0),f&&f.set&&f.set.call(this,a)}}),()=>hookSetter(a,l,f||{},!0)})(a[0],a[1],{set(){callbackWrapper(eventHandler)({target:this,isTrusted:!1})}},!1,es))),callbackWrapper(()=>{ei.forEach(a=>a())})}(a),m=function(a){let{mediaInteractionCb:l,blockClass:u,blockSelector:d,unblockSelector:h,mirror:f,sampling:p,doc:g}=a,m=callbackWrapper(a=>throttle$1(callbackWrapper(p=>{let g=esm_getEventTarget(p);if(!g||isBlocked(g,u,d,h,!0))return;let{currentTime:m,volume:v,muted:_,playbackRate:T}=g;l({type:a,id:f.getId(g),currentTime:m,volume:v,muted:_,playbackRate:T})}),p.media||500)),v=[on("play",m(0),g),on("pause",m(1),g),on("seeked",m(2),g),on("volumechange",m(3),g),on("ratechange",m(4),g)];return callbackWrapper(()=>{v.forEach(a=>a())})}(a),v=function(a,l){let u,d,{styleSheetRuleCb:h,mirror:f,stylesheetManager:p}=a,{win:g}=l;if(!g.CSSStyleSheet||!g.CSSStyleSheet.prototype)return()=>{};let m=g.CSSStyleSheet.prototype.insertRule;g.CSSStyleSheet.prototype.insertRule=new Proxy(m,{apply:callbackWrapper((a,l,u)=>{let[d,g]=u,{id:m,styleId:v}=getIdAndStyleId(l,f,p.styleMirror);return(m&&-1!==m||v&&-1!==v)&&h({id:m,styleId:v,adds:[{rule:d,index:g}]}),a.apply(l,u)})});let v=g.CSSStyleSheet.prototype.deleteRule;g.CSSStyleSheet.prototype.deleteRule=new Proxy(v,{apply:callbackWrapper((a,l,u)=>{let[d]=u,{id:g,styleId:m}=getIdAndStyleId(l,f,p.styleMirror);return(g&&-1!==g||m&&-1!==m)&&h({id:g,styleId:m,removes:[{index:d}]}),a.apply(l,u)})}),g.CSSStyleSheet.prototype.replace&&(u=g.CSSStyleSheet.prototype.replace,g.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:callbackWrapper((a,l,u)=>{let[d]=u,{id:g,styleId:m}=getIdAndStyleId(l,f,p.styleMirror);return(g&&-1!==g||m&&-1!==m)&&h({id:g,styleId:m,replace:d}),a.apply(l,u)})})),g.CSSStyleSheet.prototype.replaceSync&&(d=g.CSSStyleSheet.prototype.replaceSync,g.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:callbackWrapper((a,l,u)=>{let[d]=u,{id:g,styleId:m}=getIdAndStyleId(l,f,p.styleMirror);return(g&&-1!==g||m&&-1!==m)&&h({id:g,styleId:m,replaceSync:d}),a.apply(l,u)})}));let _={};canMonkeyPatchNestedCSSRule("CSSGroupingRule")?_.CSSGroupingRule=g.CSSGroupingRule:(canMonkeyPatchNestedCSSRule("CSSMediaRule")&&(_.CSSMediaRule=g.CSSMediaRule),canMonkeyPatchNestedCSSRule("CSSConditionRule")&&(_.CSSConditionRule=g.CSSConditionRule),canMonkeyPatchNestedCSSRule("CSSSupportsRule")&&(_.CSSSupportsRule=g.CSSSupportsRule));let T={};return Object.entries(_).forEach(a=>{let[l,u]=a;T[l]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(T[l].insertRule,{apply:callbackWrapper((a,l,u)=>{let[d,g]=u,{id:m,styleId:v}=getIdAndStyleId(l.parentStyleSheet,f,p.styleMirror);return(m&&-1!==m||v&&-1!==v)&&h({id:m,styleId:v,adds:[{rule:d,index:[...getNestedCSSRulePositions(l),g||0]}]}),a.apply(l,u)})}),u.prototype.deleteRule=new Proxy(T[l].deleteRule,{apply:callbackWrapper((a,l,u)=>{let[d]=u,{id:g,styleId:m}=getIdAndStyleId(l.parentStyleSheet,f,p.styleMirror);return(g&&-1!==g||m&&-1!==m)&&h({id:g,styleId:m,removes:[{index:[...getNestedCSSRulePositions(l),d]}]}),a.apply(l,u)})})}),callbackWrapper(()=>{g.CSSStyleSheet.prototype.insertRule=m,g.CSSStyleSheet.prototype.deleteRule=v,u&&(g.CSSStyleSheet.prototype.replace=u),d&&(g.CSSStyleSheet.prototype.replaceSync=d),Object.entries(_).forEach(a=>{let[l,u]=a;u.prototype.insertRule=T[l].insertRule,u.prototype.deleteRule=T[l].deleteRule})})}(a,{win:l}),_=initAdoptedStyleSheetObserver(a,a.doc),T=function(a,l){let{styleDeclarationCb:u,mirror:d,ignoreCSSAttributes:h,stylesheetManager:f}=a,{win:p}=l,g=p.CSSStyleDeclaration.prototype.setProperty;p.CSSStyleDeclaration.prototype.setProperty=new Proxy(g,{apply:callbackWrapper((a,l,p)=>{let[m,v,_]=p;if(h.has(m))return g.apply(l,[m,v,_]);let{id:T,styleId:C}=getIdAndStyleId(_optionalChain$2([l,"access",a=>a.parentRule,"optionalAccess",a=>a.parentStyleSheet]),d,f.styleMirror);return(T&&-1!==T||C&&-1!==C)&&u({id:T,styleId:C,set:{property:m,value:v,priority:_},index:getNestedCSSRulePositions(l.parentRule)}),a.apply(l,p)})});let m=p.CSSStyleDeclaration.prototype.removeProperty;return p.CSSStyleDeclaration.prototype.removeProperty=new Proxy(m,{apply:callbackWrapper((a,l,p)=>{let[g]=p;if(h.has(g))return m.apply(l,[g]);let{id:v,styleId:_}=getIdAndStyleId(_optionalChain$2([l,"access",a=>a.parentRule,"optionalAccess",a=>a.parentStyleSheet]),d,f.styleMirror);return(v&&-1!==v||_&&-1!==_)&&u({id:v,styleId:_,remove:{property:g},index:getNestedCSSRulePositions(l.parentRule)}),a.apply(l,p)})}),callbackWrapper(()=>{p.CSSStyleDeclaration.prototype.setProperty=g,p.CSSStyleDeclaration.prototype.removeProperty=m})}(a,{win:l}),C=a.collectFonts?function(a){let{fontCb:l,doc:u}=a,d=u.defaultView;if(!d)return()=>{};let h=[],f=new WeakMap,p=d.FontFace;d.FontFace=function(a,l,u){let d=new p(a,l,u);return f.set(d,{family:a,buffer:"string"!=typeof l,descriptors:u,fontSource:"string"==typeof l?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d};let g=patch(u.fonts,"add",function(a){return function(u){return setTimeout(callbackWrapper(()=>{let a=f.get(u);a&&(l(a),f.delete(u))}),0),a.apply(this,[u])}});return h.push(()=>{d.FontFace=p}),h.push(g),callbackWrapper(()=>{h.forEach(a=>a())})}(a):()=>{},R=function(a){let{doc:l,mirror:u,blockClass:d,blockSelector:h,unblockSelector:f,selectionCb:p}=a,g=!0,m=callbackWrapper(()=>{let a=l.getSelection();if(!a||g&&_optionalChain$2([a,"optionalAccess",a=>a.isCollapsed]))return;g=a.isCollapsed||!1;let m=[],v=a.rangeCount||0;for(let l=0;l<v;l++){let p=a.getRangeAt(l),{startContainer:g,startOffset:v,endContainer:_,endOffset:T}=p,C=isBlocked(g,d,h,f,!0)||isBlocked(_,d,h,f,!0);C||m.push({start:u.getId(g),startOffset:v,end:u.getId(_),endOffset:T})}p({ranges:m})});return m(),on("selectionchange",m)}(a),B=function(a){let{doc:l,customElementCb:u}=a,d=l.defaultView;if(!d||!d.customElements)return()=>{};let h=patch(d.customElements,"define",function(a){return function(l,d,h){try{u({define:{name:l}})}catch(a){}return a.apply(this,[l,d,h])}});return h}(a),V=[];for(let u of a.plugins)V.push(u.observer(u.callback,l,u.options));return callbackWrapper(()=>{rb.forEach(a=>a.reset()),u.disconnect(),d(),h(),f(),p(),g(),m(),v(),_(),T(),C(),R(),B(),V.forEach(a=>a())})}function hasNestedCSSRule(a){return void 0!==window[a]}function canMonkeyPatchNestedCSSRule(a){return!!(void 0!==window[a]&&window[a].prototype&&"insertRule"in window[a].prototype&&"deleteRule"in window[a].prototype)}let CrossOriginIframeMirror=class CrossOriginIframeMirror{getId(a,l,u,d){let h=u||this.getIdToRemoteIdMap(a),f=d||this.getRemoteIdToIdMap(a),p=h.get(l);return p||(p=this.generateIdFn(),h.set(l,p),f.set(p,l)),p}getIds(a,l){let u=this.getIdToRemoteIdMap(a),d=this.getRemoteIdToIdMap(a);return l.map(l=>this.getId(a,l,u,d))}getRemoteId(a,l,u){let d=u||this.getRemoteIdToIdMap(a);if("number"!=typeof l)return l;let h=d.get(l);return h||-1}getRemoteIds(a,l){let u=this.getRemoteIdToIdMap(a);return l.map(l=>this.getRemoteId(a,l,u))}reset(a){if(!a){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(a),this.iframeRemoteIdToIdMap.delete(a)}getIdToRemoteIdMap(a){let l=this.iframeIdToRemoteIdMap.get(a);return l||(l=new Map,this.iframeIdToRemoteIdMap.set(a,l)),l}getRemoteIdToIdMap(a){let l=this.iframeRemoteIdToIdMap.get(a);return l||(l=new Map,this.iframeRemoteIdToIdMap.set(a,l)),l}constructor(a){this.generateIdFn=a,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}};function _optionalChain$1(a){let l;let u=a[0],d=1;for(;d<a.length;){let h=a[d],f=a[d+1];if(d+=2,("optionalAccess"===h||"optionalCall"===h)&&null==u)return;"access"===h||"optionalAccess"===h?(l=u,u=f(u)):("call"===h||"optionalCall"===h)&&(u=f(function(){for(var a=arguments.length,d=Array(a),h=0;h<a;h++)d[h]=arguments[h];return u.call(l,...d)}),l=void 0)}return u}let IframeManagerNoop=class IframeManagerNoop{addIframe(){}addLoadListener(){}attachIframe(){}constructor(){this.crossOriginIframeMirror=new CrossOriginIframeMirror(genId),this.crossOriginIframeRootIdMap=new WeakMap}};let IframeManager=class IframeManager{addIframe(a){this.iframes.set(a,!0),a.contentWindow&&this.crossOriginIframeMap.set(a.contentWindow,a)}addLoadListener(a){this.loadListener=a}attachIframe(a,l){this.mutationCb({adds:[{parentId:this.mirror.getId(a),nextId:null,node:l}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),_optionalChain$1([this,"access",a=>a.loadListener,"optionalCall",l=>l(a)]),a.contentDocument&&a.contentDocument.adoptedStyleSheets&&a.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(a.contentDocument.adoptedStyleSheets,this.mirror.getId(a.contentDocument))}handleMessage(a){if("rrweb"!==a.data.type||a.origin!==a.data.origin)return;let l=a.source;if(!l)return;let u=this.crossOriginIframeMap.get(a.source);if(!u)return;let d=this.transformCrossOriginEvent(u,a.data.event);d&&this.wrappedEmit(d,a.data.isCheckout)}transformCrossOriginEvent(a,l){switch(l.type){case rm.FullSnapshot:{this.crossOriginIframeMirror.reset(a),this.crossOriginIframeStyleMirror.reset(a),this.replaceIdOnNode(l.data.node,a);let u=l.data.node.id;return this.crossOriginIframeRootIdMap.set(a,u),this.patchRootIdOnNode(l.data.node,u),{timestamp:l.timestamp,type:rm.IncrementalSnapshot,data:{source:rv.Mutation,adds:[{parentId:this.mirror.getId(a),nextId:null,node:l.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rm.Meta:case rm.Load:case rm.DomContentLoaded:break;case rm.Plugin:return l;case rm.Custom:return this.replaceIds(l.data.payload,a,["id","parentId","previousId","nextId"]),l;case rm.IncrementalSnapshot:switch(l.data.source){case rv.Mutation:return l.data.adds.forEach(l=>{this.replaceIds(l,a,["parentId","nextId","previousId"]),this.replaceIdOnNode(l.node,a);let u=this.crossOriginIframeRootIdMap.get(a);u&&this.patchRootIdOnNode(l.node,u)}),l.data.removes.forEach(l=>{this.replaceIds(l,a,["parentId","id"])}),l.data.attributes.forEach(l=>{this.replaceIds(l,a,["id"])}),l.data.texts.forEach(l=>{this.replaceIds(l,a,["id"])}),l;case rv.Drag:case rv.TouchMove:case rv.MouseMove:return l.data.positions.forEach(l=>{this.replaceIds(l,a,["id"])}),l;case rv.ViewportResize:return!1;case rv.MediaInteraction:case rv.MouseInteraction:case rv.Scroll:case rv.CanvasMutation:case rv.Input:return this.replaceIds(l.data,a,["id"]),l;case rv.StyleSheetRule:case rv.StyleDeclaration:return this.replaceIds(l.data,a,["id"]),this.replaceStyleIds(l.data,a,["styleId"]),l;case rv.Font:return l;case rv.Selection:return l.data.ranges.forEach(l=>{this.replaceIds(l,a,["start","end"])}),l;case rv.AdoptedStyleSheet:return this.replaceIds(l.data,a,["id"]),this.replaceStyleIds(l.data,a,["styleIds"]),_optionalChain$1([l,"access",a=>a.data,"access",a=>a.styles,"optionalAccess",a=>a.forEach,"call",l=>l(l=>{this.replaceStyleIds(l,a,["styleId"])})]),l}}return!1}replace(a,l,u,d){for(let h of d)(Array.isArray(l[h])||"number"==typeof l[h])&&(Array.isArray(l[h])?l[h]=a.getIds(u,l[h]):l[h]=a.getId(u,l[h]));return l}replaceIds(a,l,u){return this.replace(this.crossOriginIframeMirror,a,l,u)}replaceStyleIds(a,l,u){return this.replace(this.crossOriginIframeStyleMirror,a,l,u)}replaceIdOnNode(a,l){this.replaceIds(a,l,["id","rootId"]),"childNodes"in a&&a.childNodes.forEach(a=>{this.replaceIdOnNode(a,l)})}patchRootIdOnNode(a,l){a.type===ev.Document||a.rootId||(a.rootId=l),"childNodes"in a&&a.childNodes.forEach(a=>{this.patchRootIdOnNode(a,l)})}constructor(a){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new CrossOriginIframeMirror(genId),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=a.mutationCb,this.wrappedEmit=a.wrappedEmit,this.stylesheetManager=a.stylesheetManager,this.recordCrossOriginIframes=a.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=a.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}};let ShadowDomManagerNoop=class ShadowDomManagerNoop{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}};let ShadowDomManager=class ShadowDomManager{init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(a,l){if(!isNativeShadowDom(a)||this.shadowDoms.has(a))return;this.shadowDoms.add(a);let u=initMutationObserver({...this.bypassOptions,doc:l,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},a);this.restoreHandlers.push(()=>u.disconnect()),this.restoreHandlers.push(initScrollObserver({...this.bypassOptions,scrollCb:this.scrollCb,doc:a,mirror:this.mirror})),setTimeout(()=>{a.adoptedStyleSheets&&a.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(a.adoptedStyleSheets,this.mirror.getId(a.host)),this.restoreHandlers.push(initAdoptedStyleSheetObserver({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},a))},0)}observeAttachShadow(a){a.contentWindow&&a.contentDocument&&this.patchAttachShadow(a.contentWindow.Element,a.contentDocument)}patchAttachShadow(a,l){let u=this;this.restoreHandlers.push(patch(a.prototype,"attachShadow",function(a){return function(d){let h=a.call(this,d);return this.shadowRoot&&inDom(this)&&u.addShadowRoot(this.shadowRoot,l),h}}))}reset(){this.restoreHandlers.forEach(a=>{try{a()}catch(a){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}constructor(a){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=a.mutationCb,this.scrollCb=a.scrollCb,this.bypassOptions=a.bypassOptions,this.mirror=a.mirror,this.init()}};let CanvasManagerNoop=class CanvasManagerNoop{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}};let StylesheetManager=class StylesheetManager{attachLinkElement(a,l){"_cssText"in l.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:l.id,attributes:l.attributes}]}),this.trackLinkElement(a)}trackLinkElement(a){this.trackedLinkElements.has(a)||(this.trackedLinkElements.add(a),this.trackStylesheetInLinkElement(a))}adoptStyleSheets(a,l){if(0===a.length)return;let u={id:l,styleIds:[]},d=[];for(let l of a){let a;this.styleMirror.has(l)?a=this.styleMirror.getId(l):(a=this.styleMirror.add(l),d.push({styleId:a,rules:Array.from(l.rules||CSSRule,(a,l)=>({rule:stringifyRule(a),index:l}))})),u.styleIds.push(a)}d.length>0&&(u.styles=d),this.adoptedStyleSheetCb(u)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(a){}constructor(a){this.trackedLinkElements=new WeakSet,this.styleMirror=new StyleSheetMirror,this.mutationCb=a.mutationCb,this.adoptedStyleSheetCb=a.adoptedStyleSheetCb}};let ProcessedNodeManager=class ProcessedNodeManager{periodicallyClear(){!function(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];(function(){if(er)return er;let a=window.document,l=window.requestAnimationFrame;if(a&&"function"==typeof a.createElement)try{let u=a.createElement("iframe");u.hidden=!0,a.head.appendChild(u);let d=u.contentWindow;d&&d.requestAnimationFrame&&(l=d.requestAnimationFrame),a.head.removeChild(u)}catch(a){}return er=l.bind(window)})()(...l)}(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(a,l){let u=this.nodeMap.get(a);return u&&Array.from(u).some(a=>a!==l)}add(a,l){this.nodeMap.set(a,(this.nodeMap.get(a)||new Set).add(l))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}};function wrapEvent(a){return a.timestamp=rg(),a}let rE=new Mirror;function record(){let a,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:u,checkoutEveryNms:d,checkoutEveryNth:h,blockClass:f="rr-block",blockSelector:p=null,unblockSelector:g=null,ignoreClass:m="rr-ignore",ignoreSelector:v=null,maskAllText:_=!1,maskTextClass:T="rr-mask",unmaskTextClass:C=null,maskTextSelector:R=null,unmaskTextSelector:B=null,inlineStylesheet:V=!0,maskAllInputs:er,maskInputOptions:es,slimDOMOptions:eo,maskAttributeFn:ea,maskInputFn:el,maskTextFn:ec,packFn:eu,sampling:ed={},dataURLOptions:eh={},mousemoveWait:ef,recordCanvas:ep=!1,recordCrossOriginIframes:eg=!1,recordAfter:em="DOMContentLoaded"===l.recordAfter?l.recordAfter:"load",userTriggeredOnInput:ev=!1,collectFonts:e_=!1,inlineImages:ey=!1,plugins:eb,keepIframeSrcFn:ew=()=>!1,ignoreCSSAttributes:eS=new Set([]),errorHandler:eE,onMutation:ek,getCanvasManager:eT}=l;en=eE;let ex=!eg||window.parent===window,eC=!1;if(!ex)try{window.parent.document&&(eC=!1)}catch(a){eC=!0}if(ex&&!u)throw Error("emit function is required");void 0!==ef&&void 0===ed.mousemove&&(ed.mousemove=ef),rE.reset();let eR=!0===er?{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!==es?es:{},eI=!0===eo||"all"===eo?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===eo,headMetaDescKeywords:"all"===eo}:eo||{};!function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if("NodeList"in a&&!a.NodeList.prototype.forEach&&(a.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in a&&!a.DOMTokenList.prototype.forEach&&(a.DOMTokenList.prototype.forEach=Array.prototype.forEach),!Node.prototype.contains){var l=this;Node.prototype.contains=function(){for(var a=arguments.length,u=Array(a),d=0;d<a;d++)u[d]=arguments[d];let h=u[0];if(!(0 in u))throw TypeError("1 argument is required");do if(l===h)return!0;while(h=h&&h.parentNode);return!1}}}();let eA=0,eventProcessor=a=>{for(let l of eb||[])l.eventProcessor&&(a=l.eventProcessor(a));return eu&&!eC&&(a=eu(a)),a},wrappedEmit=(l,f)=>{if(_optionalChain([rb,"access",a=>a[0],"optionalAccess",a=>a.isFrozen,"call",a=>a()])&&l.type!==rm.FullSnapshot&&!(l.type===rm.IncrementalSnapshot&&l.data.source===rv.Mutation)&&rb.forEach(a=>a.unfreeze()),ex)_optionalChain([u,"optionalCall",a=>a(eventProcessor(l),f)]);else if(eC){let a={type:"rrweb",event:eventProcessor(l),origin:window.location.origin,isCheckout:f};window.parent.postMessage(a,"*")}if(l.type===rm.FullSnapshot)a=l,eA=0;else if(l.type===rm.IncrementalSnapshot){if(l.data.source===rv.Mutation&&l.data.isAttachIframe)return;eA++;let u=h&&eA>=h,f=d&&l.timestamp-a.timestamp>d;(u||f)&&takeFullSnapshot(!0)}},wrappedMutationEmit=a=>{wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.Mutation,...a}}))},wrappedScrollEmit=a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.Scroll,...a}})),wrappedCanvasMutationEmit=a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.CanvasMutation,...a}})),eO=new StylesheetManager({mutationCb:wrappedMutationEmit,adoptedStyleSheetCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.AdoptedStyleSheet,...a}}))}),eP="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new IframeManagerNoop:new IframeManager({mirror:rE,mutationCb:wrappedMutationEmit,stylesheetManager:eO,recordCrossOriginIframes:eg,wrappedEmit});for(let a of eb||[])a.getMirror&&a.getMirror({nodeMirror:rE,crossOriginIframeMirror:eP.crossOriginIframeMirror,crossOriginIframeStyleMirror:eP.crossOriginIframeStyleMirror});let eL=new ProcessedNodeManager,eM=function(a,l){try{return a?a(l):new CanvasManagerNoop}catch(a){return console.warn("Unable to initialize CanvasManager"),new CanvasManagerNoop}}(eT,{mirror:rE,win:window,mutationCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.CanvasMutation,...a}})),recordCanvas:ep,blockClass:f,blockSelector:p,unblockSelector:g,sampling:ed.canvas,dataURLOptions:eh,errorHandler:eE}),eN="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ShadowDomManagerNoop:new ShadowDomManager({mutationCb:wrappedMutationEmit,scrollCb:wrappedScrollEmit,bypassOptions:{onMutation:ek,blockClass:f,blockSelector:p,unblockSelector:g,maskAllText:_,maskTextClass:T,unmaskTextClass:C,maskTextSelector:R,unmaskTextSelector:B,inlineStylesheet:V,maskInputOptions:eR,dataURLOptions:eh,maskAttributeFn:ea,maskTextFn:ec,maskInputFn:el,recordCanvas:ep,inlineImages:ey,sampling:ed,slimDOMOptions:eI,iframeManager:eP,stylesheetManager:eO,canvasManager:eM,keepIframeSrcFn:ew,processedNodeManager:eL},mirror:rE}),takeFullSnapshot=function(){let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];wrappedEmit(wrapEvent({type:rm.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),a),eO.reset(),eN.init(),rb.forEach(a=>a.lock());let l=function(a,l){let{mirror:u=new Mirror,blockClass:d="rr-block",blockSelector:h=null,unblockSelector:f=null,maskAllText:p=!1,maskTextClass:g="rr-mask",unmaskTextClass:m=null,maskTextSelector:v=null,unmaskTextSelector:_=null,inlineStylesheet:T=!0,inlineImages:C=!1,recordCanvas:R=!1,maskAllInputs:B=!1,maskAttributeFn:V,maskTextFn:er,maskInputFn:en,slimDOM:ei=!1,dataURLOptions:es,preserveWhiteSpace:eo,onSerialize:ea,onIframeLoad:el,iframeLoadTimeout:ec,onStylesheetLoad:eu,stylesheetLoadTimeout:ed,keepIframeSrcFn:eh=()=>!1}=l||{},ef=!0===B?{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===B?{}:B,ep=!0===ei||"all"===ei?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===ei,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===ei?{}:ei;return serializeNodeWithId(a,{doc:a,mirror:u,blockClass:d,blockSelector:h,unblockSelector:f,maskAllText:p,maskTextClass:g,unmaskTextClass:m,maskTextSelector:v,unmaskTextSelector:_,skipChild:!1,inlineStylesheet:T,maskInputOptions:ef,maskAttributeFn:V,maskTextFn:er,maskInputFn:en,slimDOMOptions:ep,dataURLOptions:es,inlineImages:C,recordCanvas:R,preserveWhiteSpace:eo,onSerialize:ea,onIframeLoad:el,iframeLoadTimeout:ec,onStylesheetLoad:eu,stylesheetLoadTimeout:ed,keepIframeSrcFn:eh,newlyAddedElement:!1})}(document,{mirror:rE,blockClass:f,blockSelector:p,unblockSelector:g,maskAllText:_,maskTextClass:T,unmaskTextClass:C,maskTextSelector:R,unmaskTextSelector:B,inlineStylesheet:V,maskAllInputs:eR,maskAttributeFn:ea,maskInputFn:el,maskTextFn:ec,slimDOM:eI,dataURLOptions:eh,recordCanvas:ep,inlineImages:ey,onSerialize:a=>{isSerializedIframe(a,rE)&&eP.addIframe(a),isSerializedStylesheet(a,rE)&&eO.trackLinkElement(a),hasShadowRoot(a)&&eN.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(a,l)=>{eP.attachIframe(a,l),eN.observeAttachShadow(a)},onStylesheetLoad:(a,l)=>{eO.attachLinkElement(a,l)},keepIframeSrcFn:ew});if(!l)return console.warn("Failed to snapshot the document");wrappedEmit(wrapEvent({type:rm.FullSnapshot,data:{node:l,initialOffset:getWindowScroll(window)}})),rb.forEach(a=>a.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&eO.adoptStyleSheets(document.adoptedStyleSheets,rE.getId(document))};ei=takeFullSnapshot;try{let a=[],observe=a=>callbackWrapper(initObservers)({onMutation:ek,mutationCb:wrappedMutationEmit,mousemoveCb:(a,l)=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:l,positions:a}})),mouseInteractionCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.MouseInteraction,...a}})),scrollCb:wrappedScrollEmit,viewportResizeCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.ViewportResize,...a}})),inputCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.Input,...a}})),mediaInteractionCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.MediaInteraction,...a}})),styleSheetRuleCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.StyleSheetRule,...a}})),styleDeclarationCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.StyleDeclaration,...a}})),canvasMutationCb:wrappedCanvasMutationEmit,fontCb:a=>wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.Font,...a}})),selectionCb:a=>{wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.Selection,...a}}))},customElementCb:a=>{wrappedEmit(wrapEvent({type:rm.IncrementalSnapshot,data:{source:rv.CustomElement,...a}}))},blockClass:f,ignoreClass:m,ignoreSelector:v,maskAllText:_,maskTextClass:T,unmaskTextClass:C,maskTextSelector:R,unmaskTextSelector:B,maskInputOptions:eR,inlineStylesheet:V,sampling:ed,recordCanvas:ep,inlineImages:ey,userTriggeredOnInput:ev,collectFonts:e_,doc:a,maskAttributeFn:ea,maskInputFn:el,maskTextFn:ec,keepIframeSrcFn:ew,blockSelector:p,unblockSelector:g,slimDOMOptions:eI,dataURLOptions:eh,mirror:rE,iframeManager:eP,stylesheetManager:eO,shadowDomManager:eN,processedNodeManager:eL,canvasManager:eM,ignoreCSSAttributes:eS,plugins:_optionalChain([eb,"optionalAccess",a=>a.filter,"call",a=>a(a=>a.observer),"optionalAccess",a=>a.map,"call",a=>a(a=>({observer:a.observer,options:a.options,callback:l=>wrappedEmit(wrapEvent({type:rm.Plugin,data:{plugin:a.name,payload:l}}))}))])||[]},{});eP.addLoadListener(l=>{try{a.push(observe(l.contentDocument))}catch(a){console.warn(a)}});let init=()=>{takeFullSnapshot(),a.push(observe(document))};return"interactive"===document.readyState||"complete"===document.readyState?init():(a.push(on("DOMContentLoaded",()=>{wrappedEmit(wrapEvent({type:rm.DomContentLoaded,data:{}})),"DOMContentLoaded"===em&&init()})),a.push(on("load",()=>{wrappedEmit(wrapEvent({type:rm.Load,data:{}})),"load"===em&&init()},window))),()=>{a.forEach(a=>a()),eL.destroy(),ei=void 0,en=void 0}}catch(a){console.warn(a)}}function timestampToMs(a){return a>9999999999?a:1e3*a}function timestampToS(a){return a>9999999999?a/1e3:a}function addBreadcrumbEvent(a,l){"sentry.transaction"!==l.category&&(["ui.click","ui.input"].includes(l.category)?a.triggerUserActivity():a.checkAndHandleExpiredSession(),a.addUpdate(()=>(a.throttledAddEvent({type:rm.Custom,timestamp:1e3*(l.timestamp||0),data:{tag:"breadcrumb",payload:(0,eY.Fv)(l,10,1e3)}}),"console"===l.category)))}function getClosestInteractive(a){let l=a.closest("button,a");return l||a}function getClickTargetNode(a){let l=getTargetNode(a);return l&&l instanceof Element?getClosestInteractive(l):l}function getTargetNode(a){return"object"==typeof a&&a&&"target"in a?a.target:a}record.mirror=rE,record.takeFullSnapshot=function(a){if(!ei)throw Error("please take full snapshot after start recording");ei(a)};let ClickDetector=class ClickDetector{addListeners(){var a;let l=(a=()=>{this._lastMutation=nowInSeconds()},es||(es=[],(0,eE.hl)(rt,"open",function(a){return function(){for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];if(es)try{es.forEach(a=>a())}catch(a){}return a.apply(rt,u)}})),es.push(a),()=>{let l=es?es.indexOf(a):-1;l>-1&&es.splice(l,1)});this._teardown=()=>{l(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(a,l){var u;if(u=this._ignoreSelector,!rk.includes(l.tagName)||"INPUT"===l.tagName&&!["submit","button"].includes(l.getAttribute("type")||"")||"A"===l.tagName&&(l.hasAttribute("download")||l.hasAttribute("target")&&"_self"!==l.getAttribute("target"))||u&&l.matches(u)||!(a.data&&"number"==typeof a.data.nodeId&&a.timestamp))return;let d={timestamp:timestampToS(a.timestamp),clickBreadcrumb:a,clickCount:0,node:l};this._clicks.some(a=>a.node===d.node&&1>Math.abs(a.timestamp-d.timestamp))||(this._clicks.push(d),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastMutation=timestampToS(a)}registerScroll(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastScroll=timestampToS(a)}registerClick(a){let l=getClosestInteractive(a);this._handleMultiClick(l)}_handleMultiClick(a){this._getClicks(a).forEach(a=>{a.clickCount++})}_getClicks(a){return this._clicks.filter(l=>l.node===a)}_checkClicks(){let a=[],l=nowInSeconds();for(let u of(this._clicks.forEach(u=>{!u.mutationAfter&&this._lastMutation&&(u.mutationAfter=u.timestamp<=this._lastMutation?this._lastMutation-u.timestamp:void 0),!u.scrollAfter&&this._lastScroll&&(u.scrollAfter=u.timestamp<=this._lastScroll?this._lastScroll-u.timestamp:void 0),u.timestamp+this._timeout<=l&&a.push(u)}),a)){let a=this._clicks.indexOf(u);a>-1&&(this._generateBreadcrumbs(u),this._clicks.splice(a,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(a){let l=this._replay,u=a.scrollAfter&&a.scrollAfter<=this._scollTimeout,d=a.mutationAfter&&a.mutationAfter<=this._threshold,{clickCount:h,clickBreadcrumb:f}=a;if(!u&&!d){let u=1e3*Math.min(a.mutationAfter||this._timeout,this._timeout),d=u<1e3*this._timeout?"mutation":"timeout",p={type:"default",message:f.message,timestamp:f.timestamp,category:"ui.slowClickDetected",data:{...f.data,url:rt.location.href,route:l.getCurrentRoute(),timeAfterClickMs:u,endReason:d,clickCount:h||1}};this._addBreadcrumbEvent(l,p);return}if(h>1){let a={type:"default",message:f.message,timestamp:f.timestamp,category:"ui.multiClick",data:{...f.data,url:rt.location.href,route:l.getCurrentRoute(),clickCount:h,metric:!0}};this._addBreadcrumbEvent(l,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}constructor(a,l,u=addBreadcrumbEvent){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=l.timeout/1e3,this._threshold=l.threshold/1e3,this._scollTimeout=l.scrollTimeout/1e3,this._replay=a,this._ignoreSelector=l.ignoreSelector,this._addBreadcrumbEvent=u}};let rk=["A","BUTTON","INPUT"];function nowInSeconds(){return Date.now()/1e3}function createBreadcrumb(a){return{timestamp:Date.now()/1e3,type:"default",...a}}(eg=e_||(e_={}))[eg.Document=0]="Document",eg[eg.DocumentType=1]="DocumentType",eg[eg.Element=2]="Element",eg[eg.Text=3]="Text",eg[eg.CDATA=4]="CDATA",eg[eg.Comment=5]="Comment";let rT=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),handleDomListener=a=>l=>{if(!a.isEnabled())return;let u=function(a){let{target:l,message:u}=function(a){let l;let u="click"===a.name,d=null;try{d=u?getClickTargetNode(a.event):getTargetNode(a.event),l=(0,eX.Rt)(d,{maxStringLength:200})||"<unknown>"}catch(a){l="<unknown>"}return{target:d,message:l}}(a);return createBreadcrumb({category:"ui.".concat(a.name),...getBaseDomBreadcrumb(l,u)})}(l);if(!u)return;let d="click"===l.name,h=d?l.event:void 0;d&&a.clickDetector&&h&&h.target&&!h.altKey&&!h.metaKey&&!h.ctrlKey&&!h.shiftKey&&function(a,l,u){a.handleClick(l,u)}(a.clickDetector,u,getClickTargetNode(l.event)),addBreadcrumbEvent(a,u)};function getBaseDomBreadcrumb(a,l){let u=record.mirror.getId(a),d=u&&record.mirror.getNode(u),h=d&&record.mirror.getMeta(d),f=h&&h.type===e_.Element?h:null;return{message:l,data:f?{nodeId:u,node:{id:u,tagName:f.tagName,textContent:Array.from(f.childNodes).map(a=>a.type===e_.Text&&a.textContent).filter(Boolean).map(a=>a.trim()).join(""),attributes:function(a){let l={};for(let u in a)if(rT.has(u)){let d=u;("data-testid"===u||"data-test-id"===u)&&(d="testId"),l[d]=a[u]}return l}(f.attributes)}}:{}}}let rx={resource:function(a){let{entryType:l,initiatorType:u,name:d,responseEnd:h,startTime:f,decodedBodySize:p,encodedBodySize:g,responseStatus:m,transferSize:v}=a;return["fetch","xmlhttprequest"].includes(u)?null:{type:"".concat(l,".").concat(u),start:esm_getAbsoluteTime(f),end:esm_getAbsoluteTime(h),name:d,data:{size:v,statusCode:m,decodedBodySize:p,encodedBodySize:g}}},paint:function(a){let{duration:l,entryType:u,name:d,startTime:h}=a,f=esm_getAbsoluteTime(h);return{type:u,name:d,start:f,end:f+l,data:void 0}},navigation:function(a){let{entryType:l,name:u,decodedBodySize:d,duration:h,domComplete:f,encodedBodySize:p,domContentLoadedEventStart:g,domContentLoadedEventEnd:m,domInteractive:v,loadEventStart:_,loadEventEnd:T,redirectCount:C,startTime:R,transferSize:B,type:V}=a;return 0===h?null:{type:"".concat(l,".").concat(V),start:esm_getAbsoluteTime(R),end:esm_getAbsoluteTime(f),name:u,data:{size:B,decodedBodySize:d,encodedBodySize:p,duration:h,domInteractive:v,domContentLoadedEventStart:g,domContentLoadedEventEnd:m,loadEventStart:_,loadEventEnd:T,domComplete:f,redirectCount:C}}}};function createPerformanceEntry(a){return rx[a.entryType]?rx[a.entryType](a):null}function esm_getAbsoluteTime(a){return((ty.Z1||rt.performance.timeOrigin)+a)/1e3}let EventBufferSizeExceededError=class EventBufferSizeExceededError extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(2e7,"."))}};let EventBufferArray=class EventBufferArray{get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(a){let l=JSON.stringify(a).length;if(this._totalSize+=l,this._totalSize>2e7)throw new EventBufferSizeExceededError;this.events.push(a)}finish(){return new Promise(a=>{let l=this.events;this.clear(),a(JSON.stringify(l))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let a=this.events.map(a=>a.timestamp).sort()[0];return a?timestampToMs(a):null}constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}};let WorkerHandler=class WorkerHandler{ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((a,l)=>{this._worker.addEventListener("message",u=>{let{data:d}=u;d.success?a():l()},{once:!0}),this._worker.addEventListener("error",a=>{l(a)},{once:!0})})),this._ensureReadyPromise}destroy(){this._worker.terminate()}postMessage(a,l){let u=this._getAndIncrementId();return new Promise((d,h)=>{let listener=l=>{let{data:f}=l;if(f.method===a&&f.id===u){if(this._worker.removeEventListener("message",listener),!f.success){h(Error("Error in compression worker"));return}d(f.response)}};this._worker.addEventListener("message",listener),this._worker.postMessage({id:u,method:a,arg:l})})}_getAndIncrementId(){return this._id++}constructor(a){this._worker=a,this._id=0}};let EventBufferCompressionWorker=class EventBufferCompressionWorker{get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(a){let l=timestampToMs(a.timestamp);(!this._earliestTimestamp||l<this._earliestTimestamp)&&(this._earliestTimestamp=l);let u=JSON.stringify(a);return(this._totalSize+=u.length,this._totalSize>2e7)?Promise.reject(new EventBufferSizeExceededError):this._sendEventToWorker(u)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,a=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(a){return this._worker.postMessage("addEvent",a)}async _finishRequest(){let a=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,a}constructor(a){this._worker=new WorkerHandler(a),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}};let EventBufferProxy=class EventBufferProxy{get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(a){this._used.hasCheckout=a}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(a){return this._used.addEvent(a)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(a){return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:a,hasCheckout:l}=this._fallback,u=[];for(let l of a)u.push(this._compression.addEvent(l));this._compression.hasCheckout=l,this._used=this._compression;try{await Promise.all(u)}catch(a){}}constructor(a){this._fallback=new EventBufferArray,this._compression=new EventBufferCompressionWorker(a),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}};function hasSessionStorage(){try{return"sessionStorage"in rt&&!!rt.sessionStorage}catch(a){return!1}}function isSampled(a){return void 0!==a&&Math.random()<a}function makeSession(a){let l=Date.now(),u=a.id||(0,ek.DM)(),d=a.started||l,h=a.lastActivity||l,f=a.segmentId||0,p=a.sampled,g=a.previousSessionId;return{id:u,started:d,lastActivity:h,segmentId:f,sampled:p,previousSessionId:g}}function saveSession(a){if(hasSessionStorage())try{rt.sessionStorage.setItem(rr,JSON.stringify(a))}catch(a){}}function createSession(a){let{sessionSampleRate:l,allowBuffering:u,stickySession:d=!1}=a,{previousSessionId:h}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=isSampled(l)?"session":!!u&&"buffer",p=makeSession({sampled:f,previousSessionId:h});return d&&saveSession(p),p}function isExpired(a,l){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date;return null===a||void 0===l||l<0||0!==l&&a+l<=u}function isSessionExpired(a,l){let{maxReplayDuration:u,sessionIdleExpire:d,targetTime:h=Date.now()}=l;return isExpired(a.started,u,h)||isExpired(a.lastActivity,d,h)}function shouldRefreshSession(a,l){let{sessionIdleExpire:u,maxReplayDuration:d}=l;return!!isSessionExpired(a,{sessionIdleExpire:u,maxReplayDuration:d})&&("buffer"!==a.sampled||0!==a.segmentId)}function loadOrCreateSession(a,l){let{traceInternals:u,sessionIdleExpire:d,maxReplayDuration:h,previousSessionId:f}=a,p=l.stickySession&&function(a){if(!hasSessionStorage())return null;try{let a=rt.sessionStorage.getItem(rr);if(!a)return null;let l=JSON.parse(a);return makeSession(l)}catch(a){return null}}(0);return p?shouldRefreshSession(p,{sessionIdleExpire:d,maxReplayDuration:h})?createSession(l,{previousSessionId:p.id}):p:createSession(l,{previousSessionId:f})}function addEventSync(a,l,u){return!!shouldAddEvent(a,l)&&(_addEvent(a,l,u),!0)}async function _addEvent(a,l,u){if(!a.eventBuffer)return null;try{u&&"buffer"===a.recordingMode&&a.eventBuffer.clear(),u&&(a.eventBuffer.hasCheckout=!0);let d=a.getOptions(),h=function(a,l){try{if("function"==typeof l&&a.type===rm.Custom)return l(a)}catch(a){return null}return a}(l,d.beforeAddRecordingEvent);if(!h)return;return await a.eventBuffer.addEvent(h)}catch(d){let l=d&&d instanceof EventBufferSizeExceededError?"addEventSizeExceeded":"addEvent";await a.stop({reason:l});let u=(0,eS.s3)();u&&u.recordDroppedEvent("internal_sdk_error","replay")}}function shouldAddEvent(a,l){if(!a.eventBuffer||a.isPaused()||!a.isEnabled())return!1;let u=timestampToMs(l.timestamp);return!(u+a.timeouts.sessionIdlePause<Date.now())&&(!(u>a.getContext().initialTimestamp+a.getOptions().maxReplayDuration)||(a.getOptions()._experiments.traceInternals,!1))}function esm_isTransactionEvent(a){return"transaction"===a.type}function isFeedbackEvent(a){return"feedback"===a.type}function handleAfterSendEvent(a){let l=function(){let a=(0,eS.s3)();if(!a)return!1;let l=a.getTransport();return!!l&&(l.send.__sentry__baseTransport__||!1)}();return(u,d)=>{if(!a.isEnabled()||u.type&&!esm_isTransactionEvent(u))return;let h=d&&d.statusCode;if(!l||h&&!(h<200)&&!(h>=300)){if(esm_isTransactionEvent(u)){!function(a,l){let u=a.getContext();l.contexts&&l.contexts.trace&&l.contexts.trace.trace_id&&u.traceIds.size<100&&u.traceIds.add(l.contexts.trace.trace_id)}(a,u);return}!function(a,l){let u=a.getContext();if(l.event_id&&u.errorIds.size<100&&u.errorIds.add(l.event_id),"buffer"!==a.recordingMode||!l.tags||!l.tags.replayId)return;let{beforeErrorSampling:d}=a.getOptions();("function"!=typeof d||d(l))&&setTimeout(()=>{a.sendBufferedReplayOrFlush()})}(a,u)}}}function createPerformanceSpans(a,l){return l.map(l=>{let{type:u,start:d,end:h,name:f,data:p}=l,g=a.throttledAddEvent({type:rm.Custom,timestamp:d,data:{tag:"performanceSpan",payload:{op:u,description:f,startTimestamp:d,endTimestamp:h,data:p}}});return"string"==typeof g?Promise.resolve(null):g})}function addNetworkBreadcrumb(a,l){a.isEnabled()&&null!==l&&!function(a,l){let u=l&&void 0!==l.getClient?l.getClient():l,d=u&&u.getDsn(),h=u&&u.getOptions().tunnel;return!!d&&a.includes(d.host)||!!h&&removeTrailingSlash(a)===removeTrailingSlash(h)}(l.name,(0,eS.s3)())&&a.addUpdate(()=>(createPerformanceSpans(a,[l]),!0))}function getBodySize(a,l){if(a)try{if("string"==typeof a)return l.encode(a).length;if(a instanceof URLSearchParams)return l.encode(a.toString()).length;if(a instanceof FormData){let u=_serializeFormData(a);return l.encode(u).length}if(a instanceof Blob)return a.size;if(a instanceof ArrayBuffer)return a.byteLength}catch(a){}}function parseContentLengthHeader(a){if(!a)return;let l=parseInt(a,10);return isNaN(l)?void 0:l}function getBodyString(a){try{if("string"==typeof a)return[a];if(a instanceof URLSearchParams)return[a.toString()];if(a instanceof FormData)return[_serializeFormData(a)];if(!a)return[void 0]}catch(a){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function mergeWarning(a,l){if(!a)return{headers:{},size:void 0,_meta:{warnings:[l]}};let u={...a._meta},d=u.warnings||[];return u.warnings=[...d,l],a._meta=u,a}function makeNetworkReplayBreadcrumb(a,l){if(!l)return null;let{startTimestamp:u,endTimestamp:d,url:h,method:f,statusCode:p,request:g,response:m}=l,v={type:a,start:u/1e3,end:d/1e3,name:h,data:(0,eE.Jr)({method:f,statusCode:p,request:g,response:m})};return v}function buildSkippedNetworkRequestOrResponse(a){return{headers:{},size:a,_meta:{warnings:["URL_SKIPPED"]}}}function buildNetworkRequestOrResponse(a,l,u){if(!l&&0===Object.keys(a).length)return;if(!l)return{headers:a};if(!u)return{headers:a,size:l};let d={headers:a,size:l},{body:h,warnings:f}=function(a){if(!a||"string"!=typeof a)return{body:a};let l=a.length>15e4,u=function(a){let l=a[0],u=a[a.length-1];return"["===l&&"]"===u||"{"===l&&"}"===u}(a);if(l){let l=a.slice(0,15e4);return u?{body:l,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:"".concat(l,"…"),warnings:["TEXT_TRUNCATED"]}}if(u)try{let l=JSON.parse(a);return{body:l}}catch(a){}return{body:a}}(u);return d.body=h,f&&f.length>0&&(d._meta={warnings:f}),d}function getAllowedHeaders(a,l){return Object.keys(a).reduce((u,d)=>{let h=d.toLowerCase();return l.includes(h)&&a[d]&&(u[h]=a[d]),u},{})}function _serializeFormData(a){return new URLSearchParams(a).toString()}function urlMatches(a,l){let u=function(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rt.document.baseURI;if(a.startsWith("http://")||a.startsWith("https://")||a.startsWith(rt.location.origin))return a;let u=new URL(a,l);if(u.origin!==new URL(l).origin)return a;let d=u.href;return!a.endsWith("/")&&d.endsWith("/")?d.slice(0,-1):d}(a);return(0,eL.U0)(u,l)}async function captureFetchBreadcrumbToReplay(a,l,u){try{let d=await _prepareFetchData(a,l,u),h=makeNetworkReplayBreadcrumb("resource.fetch",d);addNetworkBreadcrumb(u.replay,h)}catch(a){}}async function _prepareFetchData(a,l,u){let d=Date.now(),{startTimestamp:h=d,endTimestamp:f=d}=l,{url:p,method:g,status_code:m=0,request_body_size:v,response_body_size:_}=a.data,T=urlMatches(p,u.networkDetailAllowUrls)&&!urlMatches(p,u.networkDetailDenyUrls),C=T?function(a,l,u){let{networkCaptureBodies:d,networkRequestHeaders:h}=a,f=l?1===l.length&&"string"!=typeof l[0]?getHeadersFromOptions(l[0],h):2===l.length?getHeadersFromOptions(l[1],h):{}:{};if(!d)return buildNetworkRequestOrResponse(f,u,void 0);let p=_getFetchRequestArgBody(l),[g,m]=getBodyString(p),v=buildNetworkRequestOrResponse(f,u,g);return m?mergeWarning(v,m):v}(u,l.input,v):buildSkippedNetworkRequestOrResponse(v),R=await _getResponseInfo(T,u,l.response,_);return{startTimestamp:h,endTimestamp:f,url:p,method:g,statusCode:m,request:C,response:R}}async function _getResponseInfo(a,l,u,d){let{networkCaptureBodies:h,textEncoder:f,networkResponseHeaders:p}=l;if(!a&&void 0!==d)return buildSkippedNetworkRequestOrResponse(d);let g=u?getAllHeaders(u.headers,p):{};if(!u||!h&&void 0!==d)return buildNetworkRequestOrResponse(g,d,void 0);let[m,v]=await _parseFetchResponseBody(u),_=function(a,l){let{networkCaptureBodies:u,textEncoder:d,responseBodySize:h,captureDetails:f,headers:p}=l;try{let l=a&&a.length&&void 0===h?getBodySize(a,d):h;if(!f)return buildSkippedNetworkRequestOrResponse(l);if(u)return buildNetworkRequestOrResponse(p,l,a);return buildNetworkRequestOrResponse(p,l,void 0)}catch(a){return buildNetworkRequestOrResponse(p,h,void 0)}}(m,{networkCaptureBodies:h,textEncoder:f,responseBodySize:d,captureDetails:a,headers:g});return v?mergeWarning(_,v):_}async function _parseFetchResponseBody(a){let l=function(a){try{return a.clone()}catch(a){}}(a);if(!l)return[void 0,"BODY_PARSE_ERROR"];try{let a=await new Promise((a,u)=>{let d=setTimeout(()=>u(Error("Timeout while trying to read response body")),500);_getResponseText(l).then(l=>a(l),a=>u(a)).finally(()=>clearTimeout(d))});return[a]}catch(a){return[void 0,"BODY_PARSE_ERROR"]}}function _getFetchRequestArgBody(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(2===a.length&&"object"==typeof a[1])return a[1].body}function getAllHeaders(a,l){let u={};return l.forEach(l=>{a.get(l)&&(u[l]=a.get(l))}),u}function getHeadersFromOptions(a,l){if(!a)return{};let u=a.headers;return u?u instanceof Headers?getAllHeaders(u,l):Array.isArray(u)?{}:getAllowedHeaders(u,l):{}}async function _getResponseText(a){return await a.text()}async function captureXhrBreadcrumbToReplay(a,l,u){try{let d=function(a,l,u){let d=Date.now(),{startTimestamp:h=d,endTimestamp:f=d,input:p,xhr:g}=l,{url:m,method:v,status_code:_=0,request_body_size:T,response_body_size:C}=a.data;if(!m)return null;if(!g||!urlMatches(m,u.networkDetailAllowUrls)||urlMatches(m,u.networkDetailDenyUrls)){let a=buildSkippedNetworkRequestOrResponse(T),l=buildSkippedNetworkRequestOrResponse(C);return{startTimestamp:h,endTimestamp:f,url:m,method:v,statusCode:_,request:a,response:l}}let R=g[e4],B=R?getAllowedHeaders(R.request_headers,u.networkRequestHeaders):{},V=getAllowedHeaders(function(a){let l=a.getAllResponseHeaders();return l?l.split("\r\n").reduce((a,l)=>{let[u,d]=l.split(": ");return a[u.toLowerCase()]=d,a},{}):{}}(g),u.networkResponseHeaders),[er,en]=u.networkCaptureBodies?getBodyString(p):[void 0],[ei,es]=u.networkCaptureBodies?function(a){let l=[];try{return[a.responseText]}catch(a){l.push(a)}try{return function(a,l){try{if("string"==typeof a)return[a];if(a instanceof Document)return[a.body.outerHTML];if("json"===l&&a&&"object"==typeof a)return[JSON.stringify(a)];if(!a)return[void 0]}catch(a){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(a.response,a.responseType)}catch(a){l.push(a)}return[void 0]}(g):[void 0],eo=buildNetworkRequestOrResponse(B,T,er),ea=buildNetworkRequestOrResponse(V,C,ei);return{startTimestamp:h,endTimestamp:f,url:m,method:v,statusCode:_,request:en?mergeWarning(eo,en):eo,response:es?mergeWarning(ea,es):ea}}(a,l,u),h=makeNetworkReplayBreadcrumb("resource.xhr",d);addNetworkBreadcrumb(u.replay,h)}catch(a){}}let rC=null,handleScopeListener=a=>l=>{if(!a.isEnabled())return;let u=function(a){let l=a.getLastBreadcrumb&&a.getLastBreadcrumb();return rC!==l&&l?(rC=l,!l.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(l.category)||l.category.startsWith("ui."))?null:"console"===l.category?function(a){let l=a.data&&a.data.arguments;if(!Array.isArray(l)||0===l.length)return createBreadcrumb(a);let u=!1,d=l.map(a=>{if(!a)return a;if("string"==typeof a)return a.length>5e3?(u=!0,"".concat(a.slice(0,5e3),"…")):a;if("object"==typeof a)try{let l=(0,eY.Fv)(a,7),d=JSON.stringify(l);if(d.length>5e3)return u=!0,"".concat(JSON.stringify(l,null,2).slice(0,5e3),"…");return l}catch(a){}return a});return createBreadcrumb({...a,data:{...a.data,arguments:d,...u?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(l):createBreadcrumb(l):null}(l);u&&addBreadcrumbEvent(a,u)};async function addMemoryEntry(a){try{return Promise.all(createPerformanceSpans(a,[function(a){let{jsHeapSizeLimit:l,totalJSHeapSize:u,usedJSHeapSize:d}=a,h=Date.now()/1e3;return{type:"memory",name:"memory",start:h,end:h,data:{memory:{jsHeapSizeLimit:l,totalJSHeapSize:u,usedJSHeapSize:d}}}}(rt.performance.memory)]))}catch(a){return[]}}async function prepareReplayEvent(a){let{client:l,scope:u,replayId:d,event:h}=a,f="object"!=typeof l._integrations||null===l._integrations||Array.isArray(l._integrations)?void 0:Object.keys(l._integrations),p={event_id:d,integrations:f};l.emit&&l.emit("preprocessEvent",h,p);let g=await (0,tv.R)(l.getOptions(),h,p,u,l,(0,eR.aF)());if(!g)return null;g.platform=g.platform||"javascript";let m=l.getSdkMetadata&&l.getSdkMetadata(),{name:v,version:_}=m&&m.sdk||{};return g.sdk={...g.sdk,name:v||"sentry.javascript.unknown",version:_||"0.0.0"},g}async function sendReplayRequest(a){var l;let u,{recordingData:d,replayId:h,segmentId:f,eventContext:p,timestamp:g,session:m}=a,v=function(a){let l,{recordingData:u,headers:d}=a,h="".concat(JSON.stringify(d),"\n");if("string"==typeof u)l="".concat(h).concat(u);else{let a=new TextEncoder,d=a.encode(h);(l=new Uint8Array(d.length+u.length)).set(d),l.set(u,d.length)}return l}({recordingData:d,headers:{segment_id:f}}),{urls:_,errorIds:T,traceIds:C,initialTimestamp:R}=p,B=(0,eS.s3)(),V=(0,eS.nZ)(),er=B&&B.getTransport(),en=B&&B.getDsn();if(!B||!er||!en||!m.sampled)return;let ei={type:"replay_event",replay_start_timestamp:R/1e3,timestamp:g/1e3,error_ids:T,trace_ids:C,urls:_,replay_id:h,segment_id:f,replay_type:m.sampled},es=await prepareReplayEvent({scope:V,client:B,replayId:h,event:ei});if(!es){B.recordDroppedEvent("event_processor","replay",ei);return}delete es.sdkProcessingMetadata;let eo=(l=B.getOptions().tunnel,createEnvelope(createEventEnvelopeHeaders(es,getSdkMetadataForEnvelopeHeader(es),l,en),[[{type:"replay_event"},es],[{type:"replay_recording",length:"string"==typeof v?new TextEncoder().encode(v).length:v.length},v]]));try{u=await er.send(eo)}catch(l){let a=Error(rn);try{a.cause=l}catch(a){}throw a}if(!u)return u;if("number"==typeof u.statusCode&&(u.statusCode<200||u.statusCode>=300))throw new TransportStatusCodeError(u.statusCode);let ea=updateRateLimits({},u);if(isRateLimited(ea,"replay"))throw new RateLimitError(ea);return u}let TransportStatusCodeError=class TransportStatusCodeError extends Error{constructor(a){super("Transport returned status code ".concat(a))}};let RateLimitError=class RateLimitError extends Error{constructor(a){super("Rate limit hit"),this.rateLimits=a}};async function sendReplay(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{count:0,interval:5e3},{recordingData:u,options:d}=a;if(u.length)try{return await sendReplayRequest(a),!0}catch(u){if(u instanceof TransportStatusCodeError||u instanceof RateLimitError)throw u;if((0,eS.v)("Replays",{_retryCount:l.count}),l.count>=3){let a=Error("".concat(rn," - max retries exceeded"));try{a.cause=u}catch(a){}throw a}return l.interval*=++l.count,new Promise((u,d)=>{setTimeout(async()=>{try{await sendReplay(a,l),u(!0)}catch(a){d(a)}},l.interval)})}}let rR="__THROTTLED";let ReplayContainer=class ReplayContainer{getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(a){let{errorSampleRate:l,sessionSampleRate:u}=this._options;if(!(l<=0)||!(u<=0)){if(this._initializeSessionForSampling(a),!this.session){this._handleException(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.recordingMode,this._options._experiments.traceInternals,this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)throw Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw Error("Replay buffering is in progress, call `flush()` to save the replay");this._options._experiments.traceInternals;let a=loadOrCreateSession({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=a,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw Error("Replay recording is already in progress");this._options._experiments.traceInternals;let a=loadOrCreateSession({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=a,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var a;let l;let u=this._canvas;this._stopRecording=record({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:(a=this,l=!1,(u,d)=>{if(!a.checkAndHandleExpiredSession())return;let h=d||!l;l=!0,a.clickDetector&&function(a,l){try{if(3!==l.type)return;let{source:u}=l.data;if(u===rv.Mutation&&a.registerMutation(l.timestamp),u===rv.Scroll&&a.registerScroll(l.timestamp),l.data.source===rv.MouseInteraction){let{type:u,id:d}=l.data,h=record.mirror.getNode(d);h instanceof HTMLElement&&u===r_.Click&&a.registerClick(h)}}catch(a){}}(a.clickDetector,u),a.addUpdate(()=>{if("buffer"===a.recordingMode&&h&&a.setInitialState(),!addEventSync(a,u,h))return!0;if(!h)return!1;if(h&&a.session&&0===a.session.segmentId&&addEventSync(a,function(a){let l=a.getOptions();return{type:rm.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:a.isRecordingCanvas(),sessionSampleRate:l.sessionSampleRate,errorSampleRate:l.errorSampleRate,useCompressionOption:l.useCompression,blockAllMedia:l.blockAllMedia,maskAllText:l.maskAllText,maskAllInputs:l.maskAllInputs,useCompression:!!a.eventBuffer&&"worker"===a.eventBuffer.type,networkDetailHasUrls:l.networkDetailAllowUrls.length>0,networkCaptureBodies:l.networkCaptureBodies,networkRequestHasHeaders:l.networkRequestHeaders.length>0,networkResponseHasHeaders:l.networkResponseHeaders.length>0}}}}(a),!1),a.session&&a.session.previousSessionId)return!0;if("buffer"===a.recordingMode&&a.session&&a.eventBuffer){let l=a.eventBuffer.getEarliestTimestamp();l&&(a.getOptions()._experiments.traceInternals,a.session.started=l,a.getOptions().stickySession&&saveSession(a.session))}return"session"===a.recordingMode&&a.flush(),!0})}),onMutation:this._onMutationHandler,...u?{recordCanvas:u.recordCanvas,getCanvasManager:u.getCanvasManager,sampling:u.sampling,dataURLOptions:u.dataURLOptions}:{}})}catch(a){this._handleException(a)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(a){return this._handleException(a),!1}}async stop(){let{forceFlush:a=!1,reason:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isEnabled){this._isEnabled=!1;try{this._options._experiments.traceInternals,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),a&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(hasSessionStorage())try{rt.sessionStorage.removeItem(rr)}catch(a){}}(),this.session=void 0}catch(a){this._handleException(a)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),this._options._experiments.traceInternals)}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),this._options._experiments.traceInternals)}async sendBufferedReplayOrFlush(){let{continueRecording:a=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("session"===this.recordingMode)return this.flushImmediate();let l=Date.now();this._options._experiments.traceInternals,await this.flushImmediate();let u=this.stopRecording();a&&u&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(l),this._updateSessionActivity(l),this._maybeSaveSession()),this.startRecording())}addUpdate(a){let l=a();"buffer"!==this.recordingMode&&!0!==l&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}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&&isExpired(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled){this.pause();return}return!!this._checkSession()}setInitialState(){let a="".concat(rt.location.pathname).concat(rt.location.hash).concat(rt.location.search),l="".concat(rt.location.origin).concat(a);this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=l,this._context.initialTimestamp=Date.now(),this._context.urls.push(l)}throttledAddEvent(a,l){let u=this._throttledAddEvent(a,l);if(u===rR){let a=createBreadcrumb({category:"replay.throttled"});this.addUpdate(()=>!addEventSync(this,{type:5,timestamp:a.timestamp||0,data:{tag:"breadcrumb",payload:a,metric:!0}}))}return u}getCurrentRoute(){let a=this.lastTransaction||(0,eS.nZ)().getTransaction(),l=a&&(0,tP.XU)(a).data||{},u=l[tL];if(a&&u&&["route","custom"].includes(u))return(0,tP.XU)(a).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function(a){let{useCompression:l,workerUrl:u}=a;if(l&&window.Worker){let a=function(a){try{let l=a||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){let a=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<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>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<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>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;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(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<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=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<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!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+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){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<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>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<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>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;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(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;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=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<n.length;++e)r=I[255&r^n[e]]^r>>>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<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.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<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{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(a)}());if(!l)return;let u=new Worker(l);return new EventBufferProxy(u)}catch(a){}}(u);if(a)return a}return new EventBufferArray}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(a){}_initializeSessionForSampling(a){let l=this._options.errorSampleRate>0,u=loadOrCreateSession({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:a},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:l});this.session=u}_checkSession(){if(!this.session)return!1;let a=this.session;return!shouldRefreshSession(a,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(a),!1)}async _refreshSession(a){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(a.id))}_addListeners(){try{rt.document.addEventListener("visibilitychange",this._handleVisibilityChange),rt.addEventListener("blur",this._handleWindowBlur),rt.addEventListener("focus",this._handleWindowFocus),rt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(a){let l=(0,eS.nZ)(),u=(0,eS.s3)();l.addScopeListener(handleScopeListener(a)),addClickKeypressInstrumentationHandler(handleDomListener(a)),addHistoryInstrumentationHandler(l=>{if(!a.isEnabled())return;let u=function(a){let{from:l,to:u}=a,d=Date.now()/1e3;return{type:"navigation.push",start:d,end:d,name:u,data:{previous:l}}}(l);null!==u&&(a.getContext().urls.push(u.name),a.triggerUserActivity(),a.addUpdate(()=>(createPerformanceSpans(a,[u]),!1)))}),function(a){let l=(0,eS.s3)();try{let u=new TextEncoder,{networkDetailAllowUrls:d,networkDetailDenyUrls:h,networkCaptureBodies:f,networkRequestHeaders:p,networkResponseHeaders:g}=a.getOptions(),m={replay:a,textEncoder:u,networkDetailAllowUrls:d,networkDetailDenyUrls:h,networkCaptureBodies:f,networkRequestHeaders:p,networkResponseHeaders:g};l&&l.on?l.on("beforeAddBreadcrumb",(a,l)=>(function(a,l,u){if(l.data)try{var d,h;"xhr"===l.category&&(d=u)&&d.xhr&&(function(a,l,u){let{xhr:d,input:h}=l;if(!d)return;let f=getBodySize(h,u.textEncoder),p=d.getResponseHeader("content-length")?parseContentLengthHeader(d.getResponseHeader("content-length")):function(a,l,u){try{let d="json"===l&&a&&"object"==typeof a?JSON.stringify(a):a;return getBodySize(d,u)}catch(a){return}}(d.response,d.responseType,u.textEncoder);void 0!==f&&(a.data.request_body_size=f),void 0!==p&&(a.data.response_body_size=p)}(l,u,a),captureXhrBreadcrumbToReplay(l,u,a)),"fetch"===l.category&&(h=u)&&h.response&&(function(a,l,u){let{input:d,response:h}=l,f=d?_getFetchRequestArgBody(d):void 0,p=getBodySize(f,u.textEncoder),g=h?parseContentLengthHeader(h.headers.get("content-length")):void 0;void 0!==p&&(a.data.request_body_size=p),void 0!==g&&(a.data.response_body_size=g)}(l,u,a),captureFetchBreadcrumbToReplay(l,u,a))}catch(a){}})(m,a,l)):(addFetchInstrumentationHandler(l=>{if(!a.isEnabled())return;let u=function(a){let{startTimestamp:l,endTimestamp:u,fetchData:d,response:h}=a;if(!u)return null;let{method:f,url:p}=d;return{type:"resource.fetch",start:l/1e3,end:u/1e3,name:p,data:{method:f,statusCode:h?h.status:void 0}}}(l);addNetworkBreadcrumb(a,u)}),addXhrInstrumentationHandler(l=>{if(!a.isEnabled())return;let u=function(a){let{startTimestamp:l,endTimestamp:u,xhr:d}=a,h=d[e4];if(!l||!u||!h)return null;let{method:f,url:p,status_code:g}=h;return void 0===p?null:{type:"resource.xhr",name:p,start:l/1e3,end:u/1e3,data:{method:f,statusCode:g}}}(l);addNetworkBreadcrumb(a,u)}))}catch(a){}}(a);let d=function(a){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=l?handleAfterSendEvent(a):void 0;return Object.assign((l,d)=>{if(!a.isEnabled())return l;if("replay_event"===l.type)return delete l.breadcrumbs,l;if(l.type&&!esm_isTransactionEvent(l)&&!isFeedbackEvent(l))return l;let h=a.checkAndHandleExpiredSession();if(!h)return l;if(isFeedbackEvent(l))return a.flush(),l.contexts.feedback.replay_id=a.getSessionId(),a.triggerUserActivity(),a.addUpdate(()=>!l.timestamp||(a.throttledAddEvent({type:rm.Custom,timestamp:1e3*l.timestamp,data:{tag:"breadcrumb",payload:{timestamp:l.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:l.event_id}}}}),!1)),l;if(!l.type&&l.exception&&l.exception.values&&l.exception.values.length&&d.originalException&&d.originalException.__rrweb__&&!a.getOptions()._experiments.captureExceptions)return null;let f="buffer"===a.recordingMode&&l.message!==rn&&!!l.exception&&!l.type&&isSampled(a.getOptions().errorSampleRate),p=f||"session"===a.recordingMode;return p&&(l.tags={...l.tags,replayId:a.getSessionId()}),u&&u(l,{statusCode:200}),l},{id:"Replay"})}(a,!(u&&u.on));u&&u.addEventProcessor?u.addEventProcessor(d):function(a){let l=(0,eS.s3)();l&&l.addEventProcessor&&l.addEventProcessor(a)}(d),u&&u.on&&(u.on("beforeSendEvent",l=>{a.isEnabled()&&!l.type&&function(a,l){let u=l.exception&&l.exception.values&&l.exception.values[0].value;if("string"==typeof u&&(u.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||u.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let l=createBreadcrumb({category:"replay.hydrate-error"});addBreadcrumbEvent(a,l)}}(a,l)}),u.on("afterSendEvent",handleAfterSendEvent(a)),u.on("createDsc",l=>{let u=a.getSessionId();if(u&&a.isEnabled()&&"session"===a.recordingMode){let d=a.checkAndHandleExpiredSession();d&&(l.replay_id=u)}}),u.on("startTransaction",l=>{a.lastTransaction=l}),u.on("finishTransaction",l=>{a.lastTransaction=l}),u.on("beforeSendFeedback",(l,u)=>{let d=a.getSessionId();u&&u.includeReplay&&a.isEnabled()&&d&&(a.flush(),l.contexts&&l.contexts.feedback&&(l.contexts.feedback.replay_id=d))}))}(this),this._hasInitializedCoreListeners=!0)}catch(a){this._handleException(a)}this._performanceCleanupCallback=function(a){function addPerformanceEntry(l){a.performanceEntries.includes(l)||a.performanceEntries.push(l)}function onEntries(a){let{entries:l}=a;l.forEach(addPerformanceEntry)}let l=[];return["navigation","paint","resource"].forEach(a=>{l.push(addPerformanceInstrumentationHandler(a,onEntries))}),l.push(addLcpInstrumentationHandler(l=>{let{metric:u}=l;a.replayPerformanceEntries.push(function(a){let l=a.entries,u=l[l.length-1],d=u?u.element:void 0,h=a.value,f=esm_getAbsoluteTime(h),p={type:"largest-contentful-paint",name:"largest-contentful-paint",start:f,end:f,data:{value:h,size:h,nodeId:d?record.mirror.getId(d):void 0}};return p}(u))})),()=>{l.forEach(a=>a())}}(this)}_removeListeners(){try{rt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),rt.removeEventListener("blur",this._handleWindowBlur),rt.removeEventListener("focus",this._handleWindowFocus),rt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(a){this._handleException(a)}}__init(){this._handleVisibilityChange=()=>{"visible"===rt.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let a=createBreadcrumb({category:"ui.blur"});this._doChangeToBackgroundTasks(a)}}__init3(){this._handleWindowFocus=()=>{let a=createBreadcrumb({category:"ui.focus"});this._doChangeToForegroundTasks(a)}}__init4(){this._handleKeyboardEvent=a=>{!function(a,l){if(!a.isEnabled())return;a.updateUserActivity();let u=function(a){var l;let{metaKey:u,shiftKey:d,ctrlKey:h,altKey:f,key:p,target:g}=a;if(!g||"INPUT"===(l=g).tagName||"TEXTAREA"===l.tagName||l.isContentEditable||!p)return null;let m=1===p.length;if(!(u||h||f)&&m)return null;let v=(0,eX.Rt)(g,{maxStringLength:200})||"<unknown>",_=getBaseDomBreadcrumb(g,v);return createBreadcrumb({category:"ui.keyDown",message:v,data:{..._.data,metaKey:u,shiftKey:d,ctrlKey:h,altKey:f,key:p}})}(l);u&&addBreadcrumbEvent(a,u)}(this,a)}}_doChangeToBackgroundTasks(a){if(!this.session)return;let l=isSessionExpired(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire});l||(a&&this._createCustomBreadcrumb(a),this.conditionalFlush())}_doChangeToForegroundTasks(a){if(!this.session)return;let l=this.checkAndHandleExpiredSession();l&&a&&this._createCustomBreadcrumb(a)}_updateUserActivity(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastActivity=a}_updateSessionActivity(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.session&&(this.session.lastActivity=a,this._maybeSaveSession())}_createCustomBreadcrumb(a){this.addUpdate(()=>{this.throttledAddEvent({type:rm.Custom,timestamp:a.timestamp||0,data:{tag:"breadcrumb",payload:a}})})}_addPerformanceEntries(){let a=this.performanceEntries.map(createPerformanceEntry).filter(Boolean).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(createPerformanceSpans(this,a))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:a,eventBuffer:l}=this;if(!a||!l||a.segmentId)return;let u=l.getEarliestTimestamp();u&&u<this._context.initialTimestamp&&(this._context.initialTimestamp=u)}_popEventContext(){let a={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),a}async _runFlush(){let a=this.getSessionId();if(this.session&&this.eventBuffer&&a&&(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents)&&(await addMemoryEntry(this),this.eventBuffer&&a===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let l=Date.now();if(l-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error("Session is too long, not sending replay");let u=this._popEventContext(),d=this.session.segmentId++;this._maybeSaveSession();let h=await this.eventBuffer.finish();await sendReplay({replayId:a,recordingData:h,segmentId:d,eventContext:u,session:this.session,options:this.getOptions(),timestamp:l})}catch(l){this._handleException(l),this.stop({reason:"sendReplay"});let a=(0,eS.s3)();a&&a.recordDroppedEvent("send_error","replay")}}__init5(){var a=this;this._flush=async function(){let{force:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a._isEnabled&&!l||!a.checkAndHandleExpiredSession()||!a.session)return;let u=a.session.started,d=Date.now(),h=d-u;a._debouncedFlush.cancel();let f=h<a._options.minReplayDuration,p=h>a._options.maxReplayDuration+5e3;if(f||p){"[Replay] Session duration (".concat(Math.floor(h/1e3),"s) is too ").concat(f?"short":"long",", not sending replay."),a._options._experiments.traceInternals,f&&a._debouncedFlush();return}let g=a.eventBuffer;if(g&&0===a.session.segmentId&&!g.hasCheckout&&a._options._experiments.traceInternals,!a._flushLock){a._flushLock=a._runFlush(),await a._flushLock,a._flushLock=void 0;return}try{await a._flushLock}catch(a){}finally{a._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&saveSession(this.session)}__init6(){this._onMutationHandler=a=>{let l=a.length,u=this._options.mutationLimit,d=this._options.mutationBreadcrumbLimit,h=u&&l>u;if(l>d||h){let a=createBreadcrumb({category:"replay.mutations",data:{count:l,limit:h}});this._createCustomBreadcrumb(a)}return!h||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}constructor({options:a,recordingOptions:l}){ReplayContainer.prototype.__init.call(this),ReplayContainer.prototype.__init2.call(this),ReplayContainer.prototype.__init3.call(this),ReplayContainer.prototype.__init4.call(this),ReplayContainer.prototype.__init5.call(this),ReplayContainer.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=l,this._options=a,this._debouncedFlush=function(a,l,u){let d,h,f;let p=u&&u.maxWait?Math.max(u.maxWait,l):0;function invokeFunc(){return cancelTimers(),d=a()}function cancelTimers(){void 0!==h&&clearTimeout(h),void 0!==f&&clearTimeout(f),h=f=void 0}function debounced(){return h&&clearTimeout(h),h=setTimeout(invokeFunc,l),p&&void 0===f&&(f=setTimeout(invokeFunc,p)),d}return debounced.cancel=cancelTimers,debounced.flush=function(){return void 0!==h||void 0!==f?invokeFunc():d},debounced}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(a,l,u){let d=new Map,_cleanup=a=>{let l=a-5;d.forEach((a,u)=>{u<l&&d.delete(u)})},_getTotalCount=()=>[...d.values()].reduce((a,l)=>a+l,0),h=!1;return function(){for(var l=arguments.length,u=Array(l),f=0;f<l;f++)u[f]=arguments[f];let p=Math.floor(Date.now()/1e3);if(_cleanup(p),_getTotalCount()>=300){let a=h;return h=!0,a?"__SKIPPED":rR}h=!1;let g=d.get(p)||0;return d.set(p,g+1),a(...u)}}((a,l)=>shouldAddEvent(this,a)?_addEvent(this,a,l):Promise.resolve(null),0,0);let{slowClickTimeout:u,slowClickIgnoreSelectors:d}=this.getOptions(),h=u?{threshold:Math.min(3e3,u),timeout:u,scrollTimeout:300,ignoreSelector:d?d.join(","):""}:void 0;h&&(this.clickDetector=new ClickDetector(this,h))}};function getOption(a,l,u,d){let h="string"==typeof d?d.split(","):[],f=[...a,...h,...l];return void 0!==u&&("string"==typeof u&&f.push(".".concat(u)),(0,eT.Cf)(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),f.join(",")}let rI='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',rA=["content-length","content-type","accept"],rO=!1;let Replay=class Replay{static __initStatic(){this.id="Replay"}get _isInitialized(){return rO}set _isInitialized(a){rO=a}setupOnce(){isBrowser()&&(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(a){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(a):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let a=function(a){let l=(0,eS.s3)(),u=l&&l.getOptions(),d={sessionSampleRate:0,errorSampleRate:0,...(0,eE.Jr)(a)};return u?(null==a.sessionSampleRate&&null==a.errorSampleRate&&null==u.replaysSessionSampleRate&&null==u.replaysOnErrorSampleRate&&(0,eT.Cf)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),"number"==typeof u.replaysSessionSampleRate&&(d.sessionSampleRate=u.replaysSessionSampleRate),"number"==typeof u.replaysOnErrorSampleRate&&(d.errorSampleRate=u.replaysOnErrorSampleRate)):(0,eT.Cf)(()=>{console.warn("SDK client is not available.")}),d}(this._initialOptions);this._replay=new ReplayContainer({options:a,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let a=(0,eS.s3)(),l=a.getIntegrationByName("ReplayCanvas");if(!l)return;this._replay._canvas=l.getOptions()}catch(a){}}constructor({flushMinDelay:a=5e3,flushMaxDelay:l=5500,minReplayDuration:u=4999,maxReplayDuration:d=36e5,stickySession:h=!0,useCompression:f=!0,workerUrl:p,_experiments:g={},sessionSampleRate:m,errorSampleRate:v,maskAllText:_=!0,maskAllInputs:T=!0,blockAllMedia:C=!0,mutationBreadcrumbLimit:R=750,mutationLimit:B=1e4,slowClickTimeout:V=7e3,slowClickIgnoreSelectors:er=[],networkDetailAllowUrls:en=[],networkDetailDenyUrls:ei=[],networkCaptureBodies:es=!0,networkRequestHeaders:eo=[],networkResponseHeaders:ea=[],mask:el=[],maskAttributes:ec=["title","placeholder"],unmask:eu=[],block:ed=[],unblock:eh=[],ignore:ef=[],maskFn:ep,beforeAddRecordingEvent:eg,beforeErrorSampling:em,blockClass:ev,blockSelector:e_,maskInputOptions:ey,maskTextClass:eb,maskTextSelector:ew,ignoreClass:eS}={}){this.name=Replay.id;let eE=function(a){let{mask:l,unmask:u,block:d,unblock:h,ignore:f,blockClass:p,blockSelector:g,maskTextClass:m,maskTextSelector:v,ignoreClass:_}=a,T=getOption(l,[".sentry-mask","[data-sentry-mask]"],m,v),C=getOption(u,[".sentry-unmask","[data-sentry-unmask]"]),R={maskTextSelector:T,unmaskTextSelector:C,blockSelector:getOption(d,[".sentry-block","[data-sentry-block]",'base[href="/"]'],p,g),unblockSelector:getOption(h,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:getOption(f,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],_)};return p instanceof RegExp&&(R.blockClass=p),m instanceof RegExp&&(R.maskTextClass=m),R}({mask:el,unmask:eu,block:ed,unblock:eh,ignore:ef,blockClass:ev,blockSelector:e_,maskTextClass:eb,maskTextSelector:ew,ignoreClass:eS});if(this._recordingOptions={maskAllInputs:T,maskAllText:_,maskInputOptions:{...ey||{},password:!0},maskTextFn:ep,maskInputFn:ep,maskAttributeFn:(a,l,u)=>(function(a){let{el:l,key:u,maskAttributes:d,maskAllText:h,privacyOptions:f,value:p}=a;return!h||f.unmaskTextSelector&&l.matches(f.unmaskTextSelector)?p:d.includes(u)||"value"===u&&"INPUT"===l.tagName&&["submit","button"].includes(l.getAttribute("type")||"")?p.replace(/[\S]/g,"*"):p})({maskAttributes:ec,maskAllText:_,privacyOptions:eE,key:a,value:l,el:u}),...eE,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:a=>{try{a.__rrweb__=!0}catch(a){}}},this._initialOptions={flushMinDelay:a,flushMaxDelay:l,minReplayDuration:Math.min(u,15e3),maxReplayDuration:Math.min(d,36e5),stickySession:h,sessionSampleRate:m,errorSampleRate:v,useCompression:f,workerUrl:p,blockAllMedia:C,maskAllInputs:T,maskAllText:_,mutationBreadcrumbLimit:R,mutationLimit:B,slowClickTimeout:V,slowClickIgnoreSelectors:er,networkDetailAllowUrls:en,networkDetailDenyUrls:ei,networkCaptureBodies:es,networkRequestHeaders:_getMergedNetworkHeaders(eo),networkResponseHeaders:_getMergedNetworkHeaders(ea),beforeAddRecordingEvent:eg,beforeErrorSampling:em,_experiments:g},"number"==typeof m&&(console.warn("[Replay] You are passing `sessionSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysSessionSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ".concat(m," })")),this._initialOptions.sessionSampleRate=m),"number"==typeof v&&(console.warn("[Replay] You are passing `errorSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysOnErrorSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ".concat(v," })")),this._initialOptions.errorSampleRate=v),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(rI):rI),this._isInitialized&&isBrowser())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}};function _getMergedNetworkHeaders(a){return[...rA,...a.map(a=>a.toLowerCase())]}Replay.__initStatic();var rP=window;rP.__sentryRewritesTunnelPath__="/monitoring",rP.SENTRY_RELEASE={id:"05a89213279db938b9c341aac3700540ac100eec"},rP.__sentryBasePath=void 0,rP.__rewriteFramesAssetPrefixPath__="",function(a){let l={environment:function(a){let l=a?"production":tO.env.VERCEL_ENV;return l?"vercel-".concat(l):void 0}(!0)||"production",defaultIntegrations:function(a){let l=[...tA,rewriteFramesIntegration_rewriteFramesIntegration()];return("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&hasTracingEnabled_hasTracingEnabled(a)&&l.push(function(a){let l=browserTracingIntegration({tracingOrigins:[...tZ.tracingOrigins,/^(api\/)/],...a,instrumentNavigation:!1,instrumentPageLoad:!1});return{...l,afterAllSetup(u){let startPageloadCallback=a=>{startBrowserTracingPageLoadSpan(u,a)},startNavigationCallback=a=>{startBrowserTracingNavigationSpan(u,a)};nextRouterInstrumentation(()=>void 0,!1,_optionalChain([a,"optionalAccess",a=>a.instrumentNavigation]),startPageloadCallback,startNavigationCallback),l.afterAllSetup(u),nextRouterInstrumentation(()=>void 0,_optionalChain([a,"optionalAccess",a=>a.instrumentPageLoad]),!1,startPageloadCallback,startNavigationCallback)}}}()),l}(a),...a};(function(a){let{integrations:l}=a;l&&(Array.isArray(l)?a.integrations=maybeUpdateBrowserTracingIntegration(l):a.integrations=a=>{let u=l(a);return maybeUpdateBrowserTracingIntegration(u)})})(l),function(a){let l=t7.__sentryRewritesTunnelPath__;if(l&&a.dsn){let u=dsnFromString(a.dsn);if(!u)return;let d=u.host.match(/^o(\d+)\.ingest\.sentry\.io$/);if(d){let h=d[1],f="".concat(l,"?o=").concat(h,"&p=").concat(u.projectId);a.tunnel=f}}}(l),applySdkMetadata(l,"nextjs",["nextjs","react"]),function(a){let l={...a};applySdkMetadata(l,"react"),function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0===a.defaultIntegrations&&(a.defaultIntegrations=[...tA]),void 0===a.release&&("string"==typeof __SENTRY_RELEASE__&&(a.release=__SENTRY_RELEASE__),eH.SENTRY_RELEASE&&eH.SENTRY_RELEASE.id&&(a.release=eH.SENTRY_RELEASE.id)),void 0===a.autoSessionTracking&&(a.autoSessionTracking=!0),void 0===a.sendClientReports&&(a.sendClientReports=!0);let l={...a,stackParser:(0,eW.Sq)(a.stackParser||tI),integrations:function(a){let l;let u=a.defaultIntegrations||[],d=a.integrations;u.forEach(a=>{a.isDefaultInstance=!0}),l=Array.isArray(d)?[...u,...d]:"function"==typeof d?(0,ek.lE)(d(u)):u;let h=function(a){let l={};return a.forEach(a=>{let{name:u}=a,d=l[u];d&&!d.isDefaultInstance&&a.isDefaultInstance||(l[u]=a)}),Object.keys(l).map(a=>l[a])}(l),f=function(a,l){for(let u=0;u<a.length;u++)if(!0===l(a[u]))return u;return -1}(h,a=>"Debug"===a.name);if(-1!==f){let[a]=h.splice(f,1);h.push(a)}return h}(a),transport:a.transport||(supportsFetch()?makeFetchTransport:makeXHRTransport)};(function(a,l){!0===l.debug&&(ex.X?eT.kg.enable():(0,eT.Cf)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));let u=(0,eS.nZ)();u.update(l.initialScope);let d=new a(l);(function(a){let l=(0,eR.Gd)(),u=l.getStackTop();u.client=a,u.scope.setClient(a)})(d),d.init?d.init():d.setupIntegrations&&d.setupIntegrations()})(BrowserClient,l),a.autoSessionTracking&&void 0!==eH.document&&((0,eS.yj)({ignoreDuration:!0}),(0,eS.cg)(),addHistoryInstrumentationHandler(a=>{let{from:l,to:u}=a;void 0!==l&&l!==u&&((0,eS.yj)({ignoreDuration:!0}),(0,eS.cg)())}))}(l)}(l);let u=(0,eS.nZ)();u.setTag("runtime","browser");let filterTransactions=a=>"transaction"===a.type&&"/404"===a.transaction?null:a;filterTransactions.id="NextClient404Filter",u.addEventProcessor(filterTransactions)}({dsn:"https://848babaa7af83f2cdb19ccd6f9b2b772@o4506959176925184.ingest.us.sentry.io/4506959179350016",tracesSampleRate:1,debug:!1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,integrations:[new Replay({maskAllText:!0,blockAllMedia:!0})]})},798955:function(a,l,u){"use strict";u.d(l,{EN:function(){return baggageHeaderToDynamicSamplingContext},IQ:function(){return dynamicSamplingContextToSentryBaggageHeader},bU:function(){return p}});var d=u(771312),h=u(198102),f=u(466193);let p="baggage",g="sentry-",m=/^sentry-/;function baggageHeaderToDynamicSamplingContext(a){if(!(0,h.HD)(a)&&!Array.isArray(a))return;let l={};if(Array.isArray(a))l=a.reduce((a,l)=>{let u=baggageHeaderToObject(l);for(let l of Object.keys(u))a[l]=u[l];return a},{});else{if(!a)return;l=baggageHeaderToObject(a)}let u=Object.entries(l).reduce((a,l)=>{let[u,d]=l;if(u.match(m)){let l=u.slice(g.length);a[l]=d}return a},{});return Object.keys(u).length>0?u:void 0}function dynamicSamplingContextToSentryBaggageHeader(a){if(!a)return;let l=Object.entries(a).reduce((a,l)=>{let[u,d]=l;return d&&(a["".concat(g).concat(u)]=d),a},{});return function(a){if(0!==Object.keys(a).length)return Object.entries(a).reduce((a,l,u)=>{let[h,p]=l,g="".concat(encodeURIComponent(h),"=").concat(encodeURIComponent(p)),m=0===u?g:"".concat(a,",").concat(g);return m.length>8192?(d.X&&f.kg.warn("Not adding key: ".concat(h," with val: ").concat(p," to baggage header due to exceeding baggage size limits.")),a):m},"")}(l)}function baggageHeaderToObject(a){return a.split(",").map(a=>a.split("=").map(a=>decodeURIComponent(a.trim()))).reduce((a,l)=>{let[u,d]=l;return a[u]=d,a},{})}},255390:function(a,l,u){"use strict";u.d(l,{Rt:function(){return htmlTreeAsString},iY:function(){return getComponentName},l4:function(){return getLocationHref},qT:function(){return getDomElement}});var d=u(198102),h=u(628621);let f=(0,h.R)();function htmlTreeAsString(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)return"<unknown>";try{let u,h=a,p=[],g=0,m=0,v=Array.isArray(l)?l:l.keyAttrs,_=!Array.isArray(l)&&l.maxStringLength||80;for(;h&&g++<5&&(u=function(a,l){let u,h,p,g,m;let v=[];if(!a||!a.tagName)return"";if(f.HTMLElement&&a instanceof HTMLElement&&a.dataset&&a.dataset.sentryComponent)return a.dataset.sentryComponent;v.push(a.tagName.toLowerCase());let _=l&&l.length?l.filter(l=>a.getAttribute(l)).map(l=>[l,a.getAttribute(l)]):null;if(_&&_.length)_.forEach(a=>{v.push("[".concat(a[0],'="').concat(a[1],'"]'))});else if(a.id&&v.push("#".concat(a.id)),(u=a.className)&&(0,d.HD)(u))for(m=0,h=u.split(/\s+/);m<h.length;m++)v.push(".".concat(h[m]));let T=["aria-label","type","name","title","alt"];for(m=0;m<T.length;m++)p=T[m],(g=a.getAttribute(p))&&v.push("[".concat(p,'="').concat(g,'"]'));return v.join("")}(h,v),"html"!==u&&(!(g>1)||!(m+3*p.length+u.length>=_)));)p.push(u),m+=u.length,h=h.parentNode;return p.reverse().join(" > ")}catch(a){return"<unknown>"}}function getLocationHref(){try{return f.document.location.href}catch(a){return""}}function getDomElement(a){return f.document&&f.document.querySelector?f.document.querySelector(a):null}function getComponentName(a){if(!f.HTMLElement)return null;let l=a;for(let a=0;a<5&&l;a++){if(l instanceof HTMLElement&&l.dataset.sentryComponent)return l.dataset.sentryComponent;l=l.parentNode}return null}},771312:function(a,l,u){"use strict";u.d(l,{X:function(){return d}});let d=!1},197073:function(a,l,u){"use strict";function isBrowserBundle(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function getSDKSource(){return"npm"}u.d(l,{S:function(){return getSDKSource},n:function(){return isBrowserBundle}})},198102:function(a,l,u){"use strict";u.d(l,{Cy:function(){return isSyntheticEvent},HD:function(){return isString},J8:function(){return isThenable},Kj:function(){return isRegExp},Le:function(){return isParameterizedString},PO:function(){return isPlainObject},TX:function(){return isDOMError},V9:function(){return isInstanceOf},VW:function(){return isErrorEvent},VZ:function(){return isError},cO:function(){return isEvent},fm:function(){return isDOMException},i2:function(){return isNaN},kK:function(){return isElement},pt:function(){return isPrimitive},y1:function(){return isVueViewModel}});let d=Object.prototype.toString;function isError(a){switch(d.call(a)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return isInstanceOf(a,Error)}}function isBuiltin(a,l){return d.call(a)==="[object ".concat(l,"]")}function isErrorEvent(a){return isBuiltin(a,"ErrorEvent")}function isDOMError(a){return isBuiltin(a,"DOMError")}function isDOMException(a){return isBuiltin(a,"DOMException")}function isString(a){return isBuiltin(a,"String")}function isParameterizedString(a){return"object"==typeof a&&null!==a&&"__sentry_template_string__"in a&&"__sentry_template_values__"in a}function isPrimitive(a){return null===a||isParameterizedString(a)||"object"!=typeof a&&"function"!=typeof a}function isPlainObject(a){return isBuiltin(a,"Object")}function isEvent(a){return"undefined"!=typeof Event&&isInstanceOf(a,Event)}function isElement(a){return"undefined"!=typeof Element&&isInstanceOf(a,Element)}function isRegExp(a){return isBuiltin(a,"RegExp")}function isThenable(a){return!!(a&&a.then&&"function"==typeof a.then)}function isSyntheticEvent(a){return isPlainObject(a)&&"nativeEvent"in a&&"preventDefault"in a&&"stopPropagation"in a}function isNaN(a){return"number"==typeof a&&a!=a}function isInstanceOf(a,l){try{return a instanceof l}catch(a){return!1}}function isVueViewModel(a){return!!("object"==typeof a&&null!==a&&(a.__isVue||a._isVue))}},466193:function(a,l,u){"use strict";u.d(l,{Cf:function(){return consoleSandbox},LD:function(){return p},RU:function(){return f},kg:function(){return g}});var d=u(771312),h=u(628621);let f=["debug","info","warn","error","log","assert","trace"],p={};function consoleSandbox(a){if(!("console"in h.GLOBAL_OBJ))return a();let l=h.GLOBAL_OBJ.console,u={},d=Object.keys(p);d.forEach(a=>{let d=p[a];u[a]=l[a],l[a]=d});try{return a()}finally{d.forEach(a=>{l[a]=u[a]})}}let g=function(){let a=!1,l={enable:()=>{a=!0},disable:()=>{a=!1},isEnabled:()=>a};return d.X?f.forEach(u=>{l[u]=function(){for(var l=arguments.length,d=Array(l),f=0;f<l;f++)d[f]=arguments[f];a&&consoleSandbox(()=>{h.GLOBAL_OBJ.console[u]("".concat("Sentry Logger ","[").concat(u,"]:"),...d)})}}):f.forEach(a=>{l[a]=()=>void 0}),l}()},154291:function(a,l,u){"use strict";u.d(l,{DM:function(){return uuid4},Db:function(){return addExceptionTypeValue},EG:function(){return addExceptionMechanism},YO:function(){return checkOrSetAlreadyCaught},jH:function(){return getEventDescription},lE:function(){return arrayify}});var d=u(662441),h=u(628621);function uuid4(){let a=h.GLOBAL_OBJ,l=a.crypto||a.msCrypto,getRandomByte=()=>16*Math.random();try{if(l&&l.randomUUID)return l.randomUUID().replace(/-/g,"");l&&l.getRandomValues&&(getRandomByte=()=>{let a=new Uint8Array(1);return l.getRandomValues(a),a[0]})}catch(a){}return"10000000100040008000100000000000".replace(/[018]/g,a=>(a^(15&getRandomByte())>>a/4).toString(16))}function getFirstException(a){return a.exception&&a.exception.values?a.exception.values[0]:void 0}function getEventDescription(a){let{message:l,event_id:u}=a;if(l)return l;let d=getFirstException(a);return d?d.type&&d.value?"".concat(d.type,": ").concat(d.value):d.type||d.value||u||"<unknown>":u||"<unknown>"}function addExceptionTypeValue(a,l,u){let d=a.exception=a.exception||{},h=d.values=d.values||[],f=h[0]=h[0]||{};f.value||(f.value=l||""),f.type||(f.type=u||"Error")}function addExceptionMechanism(a,l){let u=getFirstException(a);if(!u)return;let d=u.mechanism;if(u.mechanism={type:"generic",handled:!0,...d,...l},l&&"data"in l){let a={...d&&d.data,...l.data};u.mechanism.data=a}}function checkOrSetAlreadyCaught(a){if(a&&a.__sentry_captured__)return!0;try{(0,d.xp)(a,"__sentry_captured__",!0)}catch(a){}return!1}function arrayify(a){return Array.isArray(a)?a:[a]}},831151:function(a,l,u){"use strict";u.d(l,{KV:function(){return isNodeEnv}});var d=u(197073);a=u.hmd(a);var h=u(593542);function isNodeEnv(){return!(0,d.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==h?h:0)}},887538:function(a,l,u){"use strict";u.d(l,{Fv:function(){return normalize},Qy:function(){return function normalizeToSize(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,d=normalize(a,l);return~-encodeURI(JSON.stringify(d)).split(/%..|./).length>u?normalizeToSize(a,l-1,u):d}}});var d=u(198102),h=u(662441),f=u(903789);function normalize(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Infinity;try{return function visit(a,l){let p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Infinity,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Infinity,m=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){let a="function"==typeof WeakSet,l=a?new WeakSet:[];return[function(u){if(a)return!!l.has(u)||(l.add(u),!1);for(let a=0;a<l.length;a++){let d=l[a];if(d===u)return!0}return l.push(u),!1},function(u){if(a)l.delete(u);else for(let a=0;a<l.length;a++)if(l[a]===u){l.splice(a,1);break}}]}(),[v,_]=m;if(null==l||["number","boolean","string"].includes(typeof l)&&!(0,d.i2)(l))return l;let T=function(a,l){try{if("domain"===a&&l&&"object"==typeof l&&l._events)return"[Domain]";if("domainEmitter"===a)return"[DomainEmitter]";if(void 0!==u.g&&l===u.g)return"[Global]";if(l===window)return"[Window]";if("undefined"!=typeof document&&l===document)return"[Document]";if((0,d.y1)(l))return"[VueViewModel]";if((0,d.Cy)(l))return"[SyntheticEvent]";if("number"==typeof l&&l!=l)return"[NaN]";if("function"==typeof l)return"[Function: ".concat((0,f.$P)(l),"]");if("symbol"==typeof l)return"[".concat(String(l),"]");if("bigint"==typeof l)return"[BigInt: ".concat(String(l),"]");let h=function(a){let l=Object.getPrototypeOf(a);return l?l.constructor.name:"null prototype"}(l);if(/^HTML(\w*)Element$/.test(h))return"[HTMLElement: ".concat(h,"]");return"[object ".concat(h,"]")}catch(a){return"**non-serializable** (".concat(a,")")}}(a,l);if(!T.startsWith("[object "))return T;if(l.__sentry_skip_normalization__)return l;let C="number"==typeof l.__sentry_override_normalization_depth__?l.__sentry_override_normalization_depth__:p;if(0===C)return T.replace("object ","");if(v(l))return"[Circular ~]";if(l&&"function"==typeof l.toJSON)try{let a=l.toJSON();return visit("",a,C-1,g,m)}catch(a){}let R=Array.isArray(l)?[]:{},B=0,V=(0,h.Sh)(l);for(let a in V){if(!Object.prototype.hasOwnProperty.call(V,a))continue;if(B>=g){R[a]="[MaxProperties ~]";break}let l=V[a];R[a]=visit(a,l,C-1,g,m),B++}return _(l),R}("",a,l,p)}catch(a){return{ERROR:"**non-serializable** (".concat(a,")")}}}},662441:function(a,l,u){"use strict";u.d(l,{$Q:function(){return markFunctionWrapped},HK:function(){return getOriginalFunction},Jr:function(){return dropUndefinedKeys},Sh:function(){return convertToPlainObject},_j:function(){return urlEncode},hl:function(){return fill},xp:function(){return addNonEnumerableProperty},zf:function(){return extractExceptionKeysForMessage}});var d=u(255390),h=u(771312),f=u(198102),p=u(466193),g=u(69012);function fill(a,l,u){if(!(l in a))return;let d=a[l],h=u(d);"function"==typeof h&&markFunctionWrapped(h,d),a[l]=h}function addNonEnumerableProperty(a,l,u){try{Object.defineProperty(a,l,{value:u,writable:!0,configurable:!0})}catch(u){h.X&&p.kg.log('Failed to add non-enumerable property "'.concat(l,'" to object'),a)}}function markFunctionWrapped(a,l){try{let u=l.prototype||{};a.prototype=l.prototype=u,addNonEnumerableProperty(a,"__sentry_original__",l)}catch(a){}}function getOriginalFunction(a){return a.__sentry_original__}function urlEncode(a){return Object.keys(a).map(l=>"".concat(encodeURIComponent(l),"=").concat(encodeURIComponent(a[l]))).join("&")}function convertToPlainObject(a){if((0,f.VZ)(a))return{message:a.message,name:a.name,stack:a.stack,...getOwnProperties(a)};if(!(0,f.cO)(a))return a;{let l={type:a.type,target:serializeEventTarget(a.target),currentTarget:serializeEventTarget(a.currentTarget),...getOwnProperties(a)};return"undefined"!=typeof CustomEvent&&(0,f.V9)(a,CustomEvent)&&(l.detail=a.detail),l}}function serializeEventTarget(a){try{return(0,f.kK)(a)?(0,d.Rt)(a):Object.prototype.toString.call(a)}catch(a){return"<unknown>"}}function getOwnProperties(a){if("object"!=typeof a||null===a)return{};{let l={};for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&(l[u]=a[u]);return l}}function extractExceptionKeysForMessage(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,u=Object.keys(convertToPlainObject(a));if(u.sort(),!u.length)return"[object has no keys]";if(u[0].length>=l)return(0,g.$G)(u[0],l);for(let a=u.length;a>0;a--){let d=u.slice(0,a).join(", ");if(!(d.length>l)){if(a===u.length)return d;return(0,g.$G)(d,l)}}return""}function dropUndefinedKeys(a){let l=new Map;return function _dropUndefinedKeys(a,l){if(function(a){if(!(0,f.PO)(a))return!1;try{let l=Object.getPrototypeOf(a).constructor.name;return!l||"Object"===l}catch(a){return!0}}(a)){let u=l.get(a);if(void 0!==u)return u;let d={};for(let u of(l.set(a,d),Object.keys(a)))void 0!==a[u]&&(d[u]=_dropUndefinedKeys(a[u],l));return d}if(Array.isArray(a)){let u=l.get(a);if(void 0!==u)return u;let d=[];return l.set(a,d),a.forEach(a=>{d.push(_dropUndefinedKeys(a,l))}),d}return a}(a,l)}},903789:function(a,l,u){"use strict";u.d(l,{$P:function(){return getFunctionName},Sq:function(){return stackParserFromStackParserOptions},pE:function(){return createStackParser}});let d=/\(error: (.*)\)/,h=/captureMessage|captureException/;function createStackParser(){for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];let f=l.sort((a,l)=>a[0]-l[0]).map(a=>a[1]);return function(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=[],p=a.split("\n");for(let a=l;a<p.length;a++){let l=p[a];if(l.length>1024)continue;let h=d.test(l)?l.replace(d,"$1"):l;if(!h.match(/\S*Error: /)){for(let a of f){let l=a(h);if(l){u.push(l);break}}if(u.length>=50)break}}return function(a){if(!a.length)return[];let l=Array.from(a);return/sentryWrapped/.test(l[l.length-1].function||"")&&l.pop(),l.reverse(),h.test(l[l.length-1].function||"")&&(l.pop(),h.test(l[l.length-1].function||"")&&l.pop()),l.slice(0,50).map(a=>({...a,filename:a.filename||l[l.length-1].filename,function:a.function||"?"}))}(u)}}function stackParserFromStackParserOptions(a){return Array.isArray(a)?createStackParser(...a):a}let f="<anonymous>";function getFunctionName(a){try{if(!a||"function"!=typeof a)return f;return a.name||f}catch(a){return f}}},69012:function(a,l,u){"use strict";u.d(l,{$G:function(){return truncate},U0:function(){return stringMatchesSomePattern},nK:function(){return safeJoin}});var d=u(198102);function truncate(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!=typeof a||0===l?a:a.length<=l?a:"".concat(a.slice(0,l),"...")}function safeJoin(a,l){if(!Array.isArray(a))return"";let u=[];for(let l=0;l<a.length;l++){let h=a[l];try{(0,d.y1)(h)?u.push("[VueViewModel]"):u.push(String(h))}catch(a){u.push("[value cannot be serialized]")}}return u.join(l)}function stringMatchesSomePattern(a){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return l.some(l=>(function(a,l){let u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!(0,d.HD)(a)&&((0,d.Kj)(l)?l.test(a):!!(0,d.HD)(l)&&(u?a===l:a.includes(l)))})(a,l,u))}},837190:function(a,l,u){"use strict";u.d(l,{$2:function(){return rejectedSyncPromise},WD:function(){return resolvedSyncPromise},cW:function(){return SyncPromise}});var d,h,f=u(198102);function resolvedSyncPromise(a){return new SyncPromise(l=>{l(a)})}function rejectedSyncPromise(a){return new SyncPromise((l,u)=>{u(a)})}(d=h||(h={}))[d.PENDING=0]="PENDING",d[d.RESOLVED=1]="RESOLVED",d[d.REJECTED=2]="REJECTED";let SyncPromise=class SyncPromise{then(a,l){return new SyncPromise((u,d)=>{this._handlers.push([!1,l=>{if(a)try{u(a(l))}catch(a){d(a)}else u(l)},a=>{if(l)try{u(l(a))}catch(a){d(a)}else d(a)}]),this._executeHandlers()})}catch(a){return this.then(a=>a,a)}finally(a){return new SyncPromise((l,u)=>{let d,h;return this.then(l=>{h=!1,d=l,a&&a()},l=>{h=!0,d=l,a&&a()}).then(()=>{if(h){u(d);return}l(d)})})}__init(){this._resolve=a=>{this._setResult(h.RESOLVED,a)}}__init2(){this._reject=a=>{this._setResult(h.REJECTED,a)}}__init3(){this._setResult=(a,l)=>{if(this._state===h.PENDING){if((0,f.J8)(l)){l.then(this._resolve,this._reject);return}this._state=a,this._value=l,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===h.PENDING)return;let a=this._handlers.slice();this._handlers=[],a.forEach(a=>{a[0]||(this._state===h.RESOLVED&&a[1](this._value),this._state===h.REJECTED&&a[2](this._value),a[0]=!0)})}}constructor(a){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=h.PENDING,this._handlers=[];try{a(this._resolve,this._reject)}catch(a){this._reject(a)}}}},965838:function(a,l,u){"use strict";u.d(l,{Z1:function(){return f},ph:function(){return h},yW:function(){return dateTimestampInSeconds}});var d=u(628621);function dateTimestampInSeconds(){return Date.now()/1e3}let h=function(){let{performance:a}=d.GLOBAL_OBJ;if(!a||!a.now)return dateTimestampInSeconds;let l=Date.now()-a.now(),u=void 0==a.timeOrigin?l:a.timeOrigin;return()=>(u+a.now())/1e3}(),f=(()=>{let{performance:a}=d.GLOBAL_OBJ;if(!a||!a.now)return;let l=a.now(),u=Date.now(),h=a.timeOrigin?Math.abs(a.timeOrigin+l-u):36e5,f=a.timing&&a.timing.navigationStart,p="number"==typeof f?Math.abs(f+l-u):36e5;return h<36e5||p<36e5?h<=p?a.timeOrigin:f:u})()},223283:function(a,l,u){"use strict";u.d(l,{$p:function(){return generateSentryTraceHeader},KA:function(){return tracingContextFromHeaders},pT:function(){return propagationContextFromHeaders}});var d=u(798955),h=u(154291);let f=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function extractTraceparentData(a){let l;if(!a)return;let u=a.match(f);if(u)return"1"===u[3]?l=!0:"0"===u[3]&&(l=!1),{traceId:u[1],parentSampled:l,parentSpanId:u[2]}}function tracingContextFromHeaders(a,l){let u=extractTraceparentData(a),f=(0,d.EN)(l),{traceId:p,parentSpanId:g,parentSampled:m}=u||{};return u?{traceparentData:u,dynamicSamplingContext:f||{},propagationContext:{traceId:p||(0,h.DM)(),parentSpanId:g||(0,h.DM)().substring(16),spanId:(0,h.DM)().substring(16),sampled:m,dsc:f||{}}}:{traceparentData:u,dynamicSamplingContext:void 0,propagationContext:{traceId:p||(0,h.DM)(),spanId:(0,h.DM)().substring(16)}}}function propagationContextFromHeaders(a,l){let u=extractTraceparentData(a),f=(0,d.EN)(l),{traceId:p,parentSpanId:g,parentSampled:m}=u||{};return u?{traceId:p||(0,h.DM)(),parentSpanId:g||(0,h.DM)().substring(16),spanId:(0,h.DM)().substring(16),sampled:m,dsc:f||{}}:{traceId:p||(0,h.DM)(),spanId:(0,h.DM)().substring(16)}}function generateSentryTraceHeader(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,h.DM)(),l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,h.DM)().substring(16),u=arguments.length>2?arguments[2]:void 0,d="";return void 0!==u&&(d=u?"-1":"-0"),"".concat(a,"-").concat(l).concat(d)}},628621:function(a,l,u){"use strict";function isGlobalObj(a){return a&&a.Math==Math?a:void 0}u.d(l,{GLOBAL_OBJ:function(){return d},R:function(){return getGlobalObject},Y:function(){return getGlobalSingleton}});let d="object"==typeof globalThis&&isGlobalObj(globalThis)||isGlobalObj(window)||"object"==typeof self&&isGlobalObj(self)||"object"==typeof u.g&&isGlobalObj(u.g)||function(){return this}()||{};function getGlobalObject(){return d}function getGlobalSingleton(a,l,u){let h=u||d,f=h.__SENTRY__=h.__SENTRY__||{},p=f[a]||(f[a]=l());return p}},114258:function(a,l,u){var d=u(593542);u(381633);var h=u(202784),f=h&&"object"==typeof h&&"default"in h?h:{default:h};function _defineProperties(a,l){for(var u=0;u<l.length;u++){var d=l[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}var p=void 0!==d&&d.env&&!0,isString=function(a){return"[object String]"===Object.prototype.toString.call(a)},g=function(){function StyleSheet(a){var l=void 0===a?{}:a,u=l.name,d=void 0===u?"stylesheet":u,h=l.optimizeForSpeed,f=void 0===h?p:h;invariant$1(isString(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",invariant$1("boolean"==typeof f,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=f,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var g=document.querySelector('meta[property="csp-nonce"]');this._nonce=g?g.getAttribute("content"):null}var a,l=StyleSheet.prototype;return l.setOptimizeForSpeed=function(a){invariant$1("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),invariant$1(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},l.isOptimizeForSpeed=function(){return this._optimizeForSpeed},l.inject=function(){var a=this;if(invariant$1(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(p||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(l,u){return"number"==typeof u?a._serverSheet.cssRules[u]={cssText:l}:a._serverSheet.cssRules.push({cssText:l}),u},deleteRule:function(l){a._serverSheet.cssRules[l]=null}}},l.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var l=0;l<document.styleSheets.length;l++)if(document.styleSheets[l].ownerNode===a)return document.styleSheets[l]},l.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},l.insertRule=function(a,l){if(invariant$1(isString(a),"`insertRule` accepts only strings"),this._optimizeForSpeed){var u=this.getSheet();"number"!=typeof l&&(l=u.cssRules.length);try{u.insertRule(a,l)}catch(l){return p||console.warn("StyleSheet: illegal rule: \n\n"+a+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var d=this._tags[l];this._tags.push(this.makeStyleTag(this._name,a,d))}return this._rulesCount++},l.replaceRule=function(a,l){if(this._optimizeForSpeed){var u=this.getSheet();if(l.trim()||(l=this._deletedRulePlaceholder),!u.cssRules[a])return a;u.deleteRule(a);try{u.insertRule(l,a)}catch(d){p||console.warn("StyleSheet: illegal rule: \n\n"+l+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),u.insertRule(this._deletedRulePlaceholder,a)}}else{var d=this._tags[a];invariant$1(d,"old rule at index `"+a+"` not found"),d.textContent=l}return a},l.deleteRule=function(a){if(this._optimizeForSpeed)this.replaceRule(a,"");else{var l=this._tags[a];invariant$1(l,"rule at index `"+a+"` not found"),l.parentNode.removeChild(l),this._tags[a]=null}},l.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEach(function(a){return a&&a.parentNode.removeChild(a)}),this._tags=[]},l.cssRules=function(){var a=this;return this._tags.reduce(function(l,u){return u?l=l.concat(Array.prototype.map.call(a.getSheetForTag(u).cssRules,function(l){return l.cssText===a._deletedRulePlaceholder?null:l})):l.push(null),l},[])},l.makeStyleTag=function(a,l,u){l&&invariant$1(isString(l),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),l&&d.appendChild(document.createTextNode(l));var h=document.head||document.getElementsByTagName("head")[0];return u?h.insertBefore(d,u):h.appendChild(d),d},_defineProperties(StyleSheet.prototype,[{key:"length",get:function(){return this._rulesCount}}]),a&&_defineProperties(StyleSheet,a),StyleSheet}();function invariant$1(a,l){if(!a)throw Error("StyleSheet: "+l+".")}var stringHash=function(a){for(var l=5381,u=a.length;u;)l=33*l^a.charCodeAt(--u);return l>>>0},m={};function computeId(a,l){if(!l)return"jsx-"+a;var u=String(l),d=a+u;return m[d]||(m[d]="jsx-"+stringHash(a+"-"+u)),m[d]}function computeSelector(a,l){var u=a+l;return m[u]||(m[u]=l.replace(/__jsx-style-dynamic-selector/g,a)),m[u]}var v=function(){function StyleSheetRegistry(a){var l=void 0===a?{}:a,u=l.styleSheet,d=void 0===u?null:u,h=l.optimizeForSpeed,f=void 0!==h&&h;this._sheet=d||new g({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var a=StyleSheetRegistry.prototype;return a.add=function(a){var l=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(a,l){return a[l]=0,a},{}));var u=this.getIdAndRules(a),d=u.styleId,h=u.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=h.map(function(a){return l._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},a.remove=function(a){var l=this,u=this.getIdAndRules(a).styleId;if(function(a,l){if(!a)throw Error("StyleSheetRegistry: "+l+".")}(u in this._instancesCounts,"styleId: `"+u+"` not found"),this._instancesCounts[u]-=1,this._instancesCounts[u]<1){var d=this._fromServer&&this._fromServer[u];d?(d.parentNode.removeChild(d),delete this._fromServer[u]):(this._indices[u].forEach(function(a){return l._sheet.deleteRule(a)}),delete this._indices[u]),delete this._instancesCounts[u]}},a.update=function(a,l){this.add(l),this.remove(a)},a.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},a.cssRules=function(){var a=this,l=this._fromServer?Object.keys(this._fromServer).map(function(l){return[l,a._fromServer[l]]}):[],u=this._sheet.cssRules();return l.concat(Object.keys(this._indices).map(function(l){return[l,a._indices[l].map(function(a){return u[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},a.styles=function(a){var l,u;return l=this.cssRules(),void 0===(u=a)&&(u={}),l.map(function(a){var l=a[0],d=a[1];return f.default.createElement("style",{id:"__"+l,key:"__"+l,nonce:u.nonce?u.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},a.getIdAndRules=function(a){var l=a.children,u=a.dynamic,d=a.id;if(u){var h=computeId(d,u);return{styleId:h,rules:Array.isArray(l)?l.map(function(a){return computeSelector(h,a)}):[computeSelector(h,l)]}}return{styleId:computeId(d),rules:Array.isArray(l)?l:[l]}},a.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,l){return a[l.id.slice(2)]=l,a},{})},StyleSheetRegistry}(),_=h.createContext(null);_.displayName="StyleSheetContext";var T=f.default.useInsertionEffect||f.default.useLayoutEffect,C=new v;function JSXStyle(a){var l=C||h.useContext(_);return l&&T(function(){return l.add(a),function(){l.remove(a)}},[a.id,String(a.dynamic)]),null}JSXStyle.dynamic=function(a){return a.map(function(a){return computeId(a[0],a[1])}).join(" ")},l.style=JSXStyle},637108:function(a,l,u){"use strict";a.exports=u(114258).style},381633:function(){},343596:function(){},727834:function(){},641135:function(a){a.exports={style:{fontFamily:"'__Inter_d65c78', '__Inter_Fallback_d65c78'",fontStyle:"normal"},className:"__className_d65c78"}},442351:function(a){!function(){var l={229:function(a){var l,u,d,h=a.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(a){if(l===setTimeout)return setTimeout(a,0);if((l===defaultSetTimout||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(u){try{return l.call(null,a,0)}catch(u){return l.call(this,a,0)}}}!function(){try{l="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(a){l=defaultSetTimout}try{u="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(a){u=defaultClearTimeout}}();var f=[],p=!1,g=-1;function cleanUpNextTick(){p&&d&&(p=!1,d.length?f=d.concat(f):g=-1,f.length&&drainQueue())}function drainQueue(){if(!p){var a=runTimeout(cleanUpNextTick);p=!0;for(var l=f.length;l;){for(d=f,f=[];++g<l;)d&&d[g].run();g=-1,l=f.length}d=null,p=!1,function(a){if(u===clearTimeout)return clearTimeout(a);if((u===defaultClearTimeout||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(a);try{u(a)}catch(l){try{return u.call(null,a)}catch(l){return u.call(this,a)}}}(a)}}function Item(a,l){this.fun=a,this.array=l}function noop(){}h.nextTick=function(a){var l=Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)l[u-1]=arguments[u];f.push(new Item(a,l)),1!==f.length||p||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=noop,h.addListener=noop,h.once=noop,h.off=noop,h.removeListener=noop,h.removeAllListeners=noop,h.emit=noop,h.prependListener=noop,h.prependOnceListener=noop,h.listeners=function(a){return[]},h.binding=function(a){throw Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(a){throw Error("process.chdir is not supported")},h.umask=function(){return 0}}},u={};function __nccwpck_require__(a){var d=u[a];if(void 0!==d)return d.exports;var h=u[a]={exports:{}},f=!0;try{l[a](h,h.exports,__nccwpck_require__),f=!1}finally{f&&delete u[a]}return h.exports}__nccwpck_require__.ab="//";var d=__nccwpck_require__(229);a.exports=d}()},205632:function(a,l,u){a.exports=u(665123)},925047:function(a){var l=function(a){"use strict";var l,u=Object.prototype,d=u.hasOwnProperty,h=Object.defineProperty||function(a,l,u){a[l]=u.value},f="function"==typeof Symbol?Symbol:{},p=f.iterator||"@@iterator",g=f.asyncIterator||"@@asyncIterator",m=f.toStringTag||"@@toStringTag";function define(a,l,u){return Object.defineProperty(a,l,{value:u,enumerable:!0,configurable:!0,writable:!0}),a[l]}try{define({},"")}catch(a){define=function(a,l,u){return a[l]=u}}function wrap(a,u,d,f){var p,g,m=Object.create((u&&u.prototype instanceof Generator?u:Generator).prototype);return h(m,"_invoke",{value:(p=new Context(f||[]),g=v,function(u,h){if(g===_)throw Error("Generator is already running");if(g===T){if("throw"===u)throw h;return{value:l,done:!0}}for(p.method=u,p.arg=h;;){var f=p.delegate;if(f){var m=function maybeInvokeDelegate(a,u){var d=u.method,h=a.iterator[d];if(l===h)return u.delegate=null,"throw"===d&&a.iterator.return&&(u.method="return",u.arg=l,maybeInvokeDelegate(a,u),"throw"===u.method)||"return"!==d&&(u.method="throw",u.arg=TypeError("The iterator does not provide a '"+d+"' method")),C;var f=tryCatch(h,a.iterator,u.arg);if("throw"===f.type)return u.method="throw",u.arg=f.arg,u.delegate=null,C;var p=f.arg;return p?p.done?(u[a.resultName]=p.value,u.next=a.nextLoc,"return"!==u.method&&(u.method="next",u.arg=l),u.delegate=null,C):p:(u.method="throw",u.arg=TypeError("iterator result is not an object"),u.delegate=null,C)}(f,p);if(m){if(m===C)continue;return m}}if("next"===p.method)p.sent=p._sent=p.arg;else if("throw"===p.method){if(g===v)throw g=T,p.arg;p.dispatchException(p.arg)}else"return"===p.method&&p.abrupt("return",p.arg);g=_;var R=tryCatch(a,d,p);if("normal"===R.type){if(g=p.done?T:"suspendedYield",R.arg===C)continue;return{value:R.arg,done:p.done}}"throw"===R.type&&(g=T,p.method="throw",p.arg=R.arg)}})}),m}function tryCatch(a,l,u){try{return{type:"normal",arg:a.call(l,u)}}catch(a){return{type:"throw",arg:a}}}a.wrap=wrap;var v="suspendedStart",_="executing",T="completed",C={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var R={};define(R,p,function(){return this});var B=Object.getPrototypeOf,V=B&&B(B(values([])));V&&V!==u&&d.call(V,p)&&(R=V);var er=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(R);function defineIteratorMethods(a){["next","throw","return"].forEach(function(l){define(a,l,function(a){return this._invoke(l,a)})})}function AsyncIterator(a,l){var u;h(this,"_invoke",{value:function(h,f){function callInvokeWithMethodAndArg(){return new l(function(u,p){!function invoke(u,h,f,p){var g=tryCatch(a[u],a,h);if("throw"===g.type)p(g.arg);else{var m=g.arg,v=m.value;return v&&"object"==typeof v&&d.call(v,"__await")?l.resolve(v.__await).then(function(a){invoke("next",a,f,p)},function(a){invoke("throw",a,f,p)}):l.resolve(v).then(function(a){m.value=a,f(m)},function(a){return invoke("throw",a,f,p)})}}(h,f,u,p)})}return u=u?u.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function pushTryEntry(a){var l={tryLoc:a[0]};1 in a&&(l.catchLoc=a[1]),2 in a&&(l.finallyLoc=a[2],l.afterLoc=a[3]),this.tryEntries.push(l)}function resetTryEntry(a){var l=a.completion||{};l.type="normal",delete l.arg,a.completion=l}function Context(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(pushTryEntry,this),this.reset(!0)}function values(a){if(null!=a){var u=a[p];if(u)return u.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var h=-1,next=function next(){for(;++h<a.length;)if(d.call(a,h))return next.value=a[h],next.done=!1,next;return next.value=l,next.done=!0,next};return next.next=next}}throw TypeError(typeof a+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,h(er,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),h(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,m,"GeneratorFunction"),a.isGeneratorFunction=function(a){var l="function"==typeof a&&a.constructor;return!!l&&(l===GeneratorFunction||"GeneratorFunction"===(l.displayName||l.name))},a.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,GeneratorFunctionPrototype):(a.__proto__=GeneratorFunctionPrototype,define(a,m,"GeneratorFunction")),a.prototype=Object.create(er),a},a.awrap=function(a){return{__await:a}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,g,function(){return this}),a.AsyncIterator=AsyncIterator,a.async=function(l,u,d,h,f){void 0===f&&(f=Promise);var p=new AsyncIterator(wrap(l,u,d,h),f);return a.isGeneratorFunction(u)?p:p.next().then(function(a){return a.done?a.value:p.next()})},defineIteratorMethods(er),define(er,m,"Generator"),define(er,p,function(){return this}),define(er,"toString",function(){return"[object Generator]"}),a.keys=function(a){var l=Object(a),u=[];for(var d in l)u.push(d);return u.reverse(),function next(){for(;u.length;){var a=u.pop();if(a in l)return next.value=a,next.done=!1,next}return next.done=!0,next}},a.values=values,Context.prototype={constructor:Context,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(resetTryEntry),!a)for(var u in this)"t"===u.charAt(0)&&d.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=l)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function(a){if(this.done)throw a;var u=this;function handle(d,h){return p.type="throw",p.arg=a,u.next=d,h&&(u.method="next",u.arg=l),!!h}for(var h=this.tryEntries.length-1;h>=0;--h){var f=this.tryEntries[h],p=f.completion;if("root"===f.tryLoc)return handle("end");if(f.tryLoc<=this.prev){var g=d.call(f,"catchLoc"),m=d.call(f,"finallyLoc");if(g&&m){if(this.prev<f.catchLoc)return handle(f.catchLoc,!0);if(this.prev<f.finallyLoc)return handle(f.finallyLoc)}else if(g){if(this.prev<f.catchLoc)return handle(f.catchLoc,!0)}else if(m){if(this.prev<f.finallyLoc)return handle(f.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(a,l){for(var u=this.tryEntries.length-1;u>=0;--u){var h=this.tryEntries[u];if(h.tryLoc<=this.prev&&d.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var f=h;break}}f&&("break"===a||"continue"===a)&&f.tryLoc<=l&&l<=f.finallyLoc&&(f=null);var p=f?f.completion:{};return(p.type=a,p.arg=l,f)?(this.method="next",this.next=f.finallyLoc,C):this.complete(p)},complete:function(a,l){if("throw"===a.type)throw a.arg;return"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===a.type&&l&&(this.next=l),C},finish:function(a){for(var l=this.tryEntries.length-1;l>=0;--l){var u=this.tryEntries[l];if(u.finallyLoc===a)return this.complete(u.completion,u.afterLoc),resetTryEntry(u),C}},catch:function(a){for(var l=this.tryEntries.length-1;l>=0;--l){var u=this.tryEntries[l];if(u.tryLoc===a){var d=u.completion;if("throw"===d.type){var h=d.arg;resetTryEntry(u)}return h}}throw Error("illegal catch attempt")},delegateYield:function(a,u,d){return this.delegate={iterator:values(a),resultName:u,nextLoc:d},"next"===this.method&&(this.arg=l),C}},a}(a.exports);try{regeneratorRuntime=l}catch(a){"object"==typeof globalThis?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}},920452:function(a,l,u){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var d=u(202784),h="function"==typeof Object.is?Object.is:function(a,l){return a===l&&(0!==a||1/a==1/l)||a!=a&&l!=l},f=d.useState,p=d.useEffect,g=d.useLayoutEffect,m=d.useDebugValue;function r(a){var l=a.getSnapshot;a=a.value;try{var u=l();return!h(a,u)}catch(a){return!0}}var v="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(a,l){return l()}:function(a,l){var u=l(),d=f({inst:{value:u,getSnapshot:l}}),h=d[0].inst,v=d[1];return g(function(){h.value=u,h.getSnapshot=l,r(h)&&v({inst:h})},[a,u,l]),p(function(){return r(h)&&v({inst:h}),a(function(){r(h)&&v({inst:h})})},[a]),m(u),u};l.useSyncExternalStore=void 0!==d.useSyncExternalStore?d.useSyncExternalStore:v},743100:function(a,l,u){"use strict";a.exports=u(920452)},137031:function(a){"use strict";a.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},807896:function(a,l,u){"use strict";function _extends(){return(_extends=Object.assign?Object.assign.bind():function(a){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(a[d]=u[d])}return a}).apply(this,arguments)}u.d(l,{Z:function(){return _extends}})},717998:function(a,l,u){"use strict";function $e42e1063c40fb3ef$export$b9ecd428b558ff10(a,l,{checkForDefaultPrevented:u=!0}={}){return function(d){if(null==a||a(d),!1===u||!d.defaultPrevented)return null==l?void 0:l(d)}}u.d(l,{M:function(){return $e42e1063c40fb3ef$export$b9ecd428b558ff10}})},462172:function(a,l,u){"use strict";u.d(l,{B:function(){return $e02a7d9cb1dc128c$export$c74125a8e3af6bb2}});var d=u(202784),h=u(392211),f=u(262656),p=u(549815);function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(a){let l=a+"CollectionProvider",[u,g]=(0,h.b)(l),[m,v]=u(l,{collectionRef:{current:null},itemMap:new Map}),_=a+"CollectionSlot",T=d.forwardRef((a,l)=>{let{scope:u,children:h}=a,g=v(_,u),m=(0,f.e)(l,g.collectionRef);return d.createElement(p.g7,{ref:m},h)}),C=a+"CollectionItemSlot",R="data-radix-collection-item",B=d.forwardRef((a,l)=>{let{scope:u,children:h,...g}=a,m=d.useRef(null),_=(0,f.e)(l,m),T=v(C,u);return d.useEffect(()=>(T.itemMap.set(m,{ref:m,...g}),()=>void T.itemMap.delete(m))),d.createElement(p.g7,{[R]:"",ref:_},h)});return[{Provider:a=>{let{scope:l,children:u}=a,h=d.useRef(null),f=d.useRef(new Map).current;return d.createElement(m,{scope:l,itemMap:f,collectionRef:h},u)},Slot:T,ItemSlot:B},function(l){let u=v(a+"CollectionConsumer",l),h=d.useCallback(()=>{let a=u.collectionRef.current;if(!a)return[];let l=Array.from(a.querySelectorAll(`[${R}]`)),d=Array.from(u.itemMap.values()),h=d.sort((a,u)=>l.indexOf(a.ref.current)-l.indexOf(u.ref.current));return h},[u.collectionRef,u.itemMap]);return h},g]}},262656:function(a,l,u){"use strict";u.d(l,{F:function(){return $6ed0406888f73fc4$export$43e446d32b3d21af},e:function(){return $6ed0406888f73fc4$export$c7b2cbe3552a0d05}});var d=u(202784);function $6ed0406888f73fc4$export$43e446d32b3d21af(...a){return l=>a.forEach(a=>{"function"==typeof a?a(l):null!=a&&(a.current=l)})}function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...a){return(0,d.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...a),a)}},392211:function(a,l,u){"use strict";u.d(l,{b:function(){return $c512c27ab02ef895$export$50c7b4e9d9f19c1},k:function(){return $c512c27ab02ef895$export$fd42f52fd3ae1109}});var d=u(202784);function $c512c27ab02ef895$export$fd42f52fd3ae1109(a,l){let u=(0,d.createContext)(l);function Provider(a){let{children:l,...h}=a,f=(0,d.useMemo)(()=>h,Object.values(h));return(0,d.createElement)(u.Provider,{value:f},l)}return Provider.displayName=a+"Provider",[Provider,function(h){let f=(0,d.useContext)(u);if(f)return f;if(void 0!==l)return l;throw Error(`\`${h}\` must be used within \`${a}\``)}]}function $c512c27ab02ef895$export$50c7b4e9d9f19c1(a,l=[]){let u=[],createScope=()=>{let l=u.map(a=>(0,d.createContext)(a));return function(u){let h=(null==u?void 0:u[a])||l;return(0,d.useMemo)(()=>({[`__scope${a}`]:{...u,[a]:h}}),[u,h])}};return createScope.scopeName=a,[function(l,h){let f=(0,d.createContext)(h),p=u.length;function Provider(l){let{scope:u,children:h,...g}=l,m=(null==u?void 0:u[a][p])||f,v=(0,d.useMemo)(()=>g,Object.values(g));return(0,d.createElement)(m.Provider,{value:v},h)}return u=[...u,h],Provider.displayName=l+"Provider",[Provider,function(u,g){let m=(null==g?void 0:g[a][p])||f,v=(0,d.useContext)(m);if(v)return v;if(void 0!==h)return h;throw Error(`\`${u}\` must be used within \`${l}\``)}]},function(...a){let l=a[0];if(1===a.length)return l;let createScope1=()=>{let u=a.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){let h=u.reduce((l,{useScope:u,scopeName:d})=>{let h=u(a),f=h[`__scope${d}`];return{...l,...f}},{});return(0,d.useMemo)(()=>({[`__scope${l.scopeName}`]:h}),[h])}};return createScope1.scopeName=l.scopeName,createScope1}(createScope,...l)]}},835999:function(a,l,u){"use strict";let d;u.d(l,{I0:function(){return V},XB:function(){return C},fC:function(){return B}});var h=u(807896),f=u(202784),p=u(717998),g=u(172714),m=u(262656),v=u(627757);let _="dismissableLayer.update",T=(0,f.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C=(0,f.forwardRef)((a,l)=>{var u;let{disableOutsidePointerEvents:C=!1,onEscapeKeyDown:R,onPointerDownOutside:B,onFocusOutside:V,onInteractOutside:er,onDismiss:en,...ei}=a,es=(0,f.useContext)(T),[eo,ea]=(0,f.useState)(null),el=null!==(u=null==eo?void 0:eo.ownerDocument)&&void 0!==u?u:null==globalThis?void 0:globalThis.document,[,ec]=(0,f.useState)({}),eu=(0,m.e)(l,a=>ea(a)),ed=Array.from(es.layers),[eh]=[...es.layersWithOutsidePointerEventsDisabled].slice(-1),ef=ed.indexOf(eh),ep=eo?ed.indexOf(eo):-1,eg=es.layersWithOutsidePointerEventsDisabled.size>0,em=ep>=ef,ev=function(a,l=null==globalThis?void 0:globalThis.document){let u=(0,v.W)(a),d=(0,f.useRef)(!1),h=(0,f.useRef)(()=>{});return(0,f.useEffect)(()=>{let handlePointerDown=a=>{if(a.target&&!d.current){let d={originalEvent:a};function handleAndDispatchPointerDownOutsideEvent(){$5cb92bef7577960e$var$handleAndDispatchCustomEvent("dismissableLayer.pointerDownOutside",u,d,{discrete:!0})}"touch"===a.pointerType?(l.removeEventListener("click",h.current),h.current=handleAndDispatchPointerDownOutsideEvent,l.addEventListener("click",h.current,{once:!0})):handleAndDispatchPointerDownOutsideEvent()}else l.removeEventListener("click",h.current);d.current=!1},a=window.setTimeout(()=>{l.addEventListener("pointerdown",handlePointerDown)},0);return()=>{window.clearTimeout(a),l.removeEventListener("pointerdown",handlePointerDown),l.removeEventListener("click",h.current)}},[l,u]),{onPointerDownCapture:()=>d.current=!0}}(a=>{let l=a.target,u=[...es.branches].some(a=>a.contains(l));!em||u||(null==B||B(a),null==er||er(a),a.defaultPrevented||null==en||en())},el),e_=function(a,l=null==globalThis?void 0:globalThis.document){let u=(0,v.W)(a),d=(0,f.useRef)(!1);return(0,f.useEffect)(()=>{let handleFocus=a=>{a.target&&!d.current&&$5cb92bef7577960e$var$handleAndDispatchCustomEvent("dismissableLayer.focusOutside",u,{originalEvent:a},{discrete:!1})};return l.addEventListener("focusin",handleFocus),()=>l.removeEventListener("focusin",handleFocus)},[l,u]),{onFocusCapture:()=>d.current=!0,onBlurCapture:()=>d.current=!1}}(a=>{let l=a.target,u=[...es.branches].some(a=>a.contains(l));u||(null==V||V(a),null==er||er(a),a.defaultPrevented||null==en||en())},el);return!function(a,l=null==globalThis?void 0:globalThis.document){let u=(0,v.W)(a);(0,f.useEffect)(()=>{let handleKeyDown=a=>{"Escape"===a.key&&u(a)};return l.addEventListener("keydown",handleKeyDown),()=>l.removeEventListener("keydown",handleKeyDown)},[u,l])}(a=>{let l=ep===es.layers.size-1;l&&(null==R||R(a),!a.defaultPrevented&&en&&(a.preventDefault(),en()))},el),(0,f.useEffect)(()=>{if(eo)return C&&(0===es.layersWithOutsidePointerEventsDisabled.size&&(d=el.body.style.pointerEvents,el.body.style.pointerEvents="none"),es.layersWithOutsidePointerEventsDisabled.add(eo)),es.layers.add(eo),$5cb92bef7577960e$var$dispatchUpdate(),()=>{C&&1===es.layersWithOutsidePointerEventsDisabled.size&&(el.body.style.pointerEvents=d)}},[eo,el,C,es]),(0,f.useEffect)(()=>()=>{eo&&(es.layers.delete(eo),es.layersWithOutsidePointerEventsDisabled.delete(eo),$5cb92bef7577960e$var$dispatchUpdate())},[eo,es]),(0,f.useEffect)(()=>{let handleUpdate=()=>ec({});return document.addEventListener(_,handleUpdate),()=>document.removeEventListener(_,handleUpdate)},[]),(0,f.createElement)(g.WV.div,(0,h.Z)({},ei,{ref:eu,style:{pointerEvents:eg?em?"auto":"none":void 0,...a.style},onFocusCapture:(0,p.M)(a.onFocusCapture,e_.onFocusCapture),onBlurCapture:(0,p.M)(a.onBlurCapture,e_.onBlurCapture),onPointerDownCapture:(0,p.M)(a.onPointerDownCapture,ev.onPointerDownCapture)}))}),R=(0,f.forwardRef)((a,l)=>{let u=(0,f.useContext)(T),d=(0,f.useRef)(null),p=(0,m.e)(l,d);return(0,f.useEffect)(()=>{let a=d.current;if(a)return u.branches.add(a),()=>{u.branches.delete(a)}},[u.branches]),(0,f.createElement)(g.WV.div,(0,h.Z)({},a,{ref:p}))});function $5cb92bef7577960e$var$dispatchUpdate(){let a=new CustomEvent(_);document.dispatchEvent(a)}function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(a,l,u,{discrete:d}){let h=u.originalEvent.target,f=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:u});l&&h.addEventListener(a,l,{once:!0}),d?(0,g.jH)(h,f):h.dispatchEvent(f)}let B=C,V=R},678773:function(a,l,u){"use strict";u.d(l,{h:function(){return g}});var d=u(807896),h=u(202784),f=u(928316),p=u(172714);let g=(0,h.forwardRef)((a,l)=>{var u;let{container:g=null==globalThis?void 0:null===(u=globalThis.document)||void 0===u?void 0:u.body,...m}=a;return g?f.createPortal((0,h.createElement)(p.WV.div,(0,d.Z)({},m,{ref:l})),g):null})},379616:function(a,l,u){"use strict";u.d(l,{z:function(){return $921a889cee6df7e8$export$99c2b779aa4e8b8b}});var d=u(202784),h=u(928316),f=u(262656),p=u(861644);let $921a889cee6df7e8$export$99c2b779aa4e8b8b=a=>{let{present:l,children:u}=a,g=function(a){var l;let[u,f]=(0,d.useState)(),g=(0,d.useRef)({}),m=(0,d.useRef)(a),v=(0,d.useRef)("none"),_=a?"mounted":"unmounted",[T,C]=(l={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,d.useReducer)((a,u)=>{let d=l[a][u];return null!=d?d:a},_));return(0,d.useEffect)(()=>{let a=$921a889cee6df7e8$var$getAnimationName(g.current);v.current="mounted"===T?a:"none"},[T]),(0,p.b)(()=>{let l=g.current,u=m.current,d=u!==a;if(d){let d=v.current,h=$921a889cee6df7e8$var$getAnimationName(l);a?C("MOUNT"):"none"===h||(null==l?void 0:l.display)==="none"?C("UNMOUNT"):u&&d!==h?C("ANIMATION_OUT"):C("UNMOUNT"),m.current=a}},[a,C]),(0,p.b)(()=>{if(u){let handleAnimationEnd=a=>{let l=$921a889cee6df7e8$var$getAnimationName(g.current),d=l.includes(a.animationName);a.target===u&&d&&(0,h.flushSync)(()=>C("ANIMATION_END"))},handleAnimationStart=a=>{a.target===u&&(v.current=$921a889cee6df7e8$var$getAnimationName(g.current))};return u.addEventListener("animationstart",handleAnimationStart),u.addEventListener("animationcancel",handleAnimationEnd),u.addEventListener("animationend",handleAnimationEnd),()=>{u.removeEventListener("animationstart",handleAnimationStart),u.removeEventListener("animationcancel",handleAnimationEnd),u.removeEventListener("animationend",handleAnimationEnd)}}C("ANIMATION_END")},[u,C]),{isPresent:["mounted","unmountSuspended"].includes(T),ref:(0,d.useCallback)(a=>{a&&(g.current=getComputedStyle(a)),f(a)},[])}}(l),m="function"==typeof u?u({present:g.isPresent}):d.Children.only(u),v=(0,f.e)(g.ref,m.ref),_="function"==typeof u;return _||g.isPresent?(0,d.cloneElement)(m,{ref:v}):null};function $921a889cee6df7e8$var$getAnimationName(a){return(null==a?void 0:a.animationName)||"none"}$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName="Presence"},172714:function(a,l,u){"use strict";u.d(l,{WV:function(){return g},jH:function(){return $8927f6f2acc4f386$export$6d1a0317bde7de7f}});var d=u(807896),h=u(202784),f=u(928316),p=u(549815);let g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((a,l)=>{let u=(0,h.forwardRef)((a,u)=>{let{asChild:f,...g}=a,m=f?p.g7:l;return(0,h.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,h.createElement)(m,(0,d.Z)({},g,{ref:u}))});return u.displayName=`Primitive.${l}`,{...a,[l]:u}},{});function $8927f6f2acc4f386$export$6d1a0317bde7de7f(a,l){a&&(0,f.flushSync)(()=>a.dispatchEvent(l))}},549815:function(a,l,u){"use strict";u.d(l,{A4:function(){return $5e63c961fc1ce211$export$d9f1ccf0bdb05d45},g7:function(){return p}});var d=u(807896),h=u(202784),f=u(262656);let p=(0,h.forwardRef)((a,l)=>{let{children:u,...f}=a,p=h.Children.toArray(u),m=p.find($5e63c961fc1ce211$var$isSlottable);if(m){let a=m.props.children,u=p.map(l=>l!==m?l:h.Children.count(a)>1?h.Children.only(null):(0,h.isValidElement)(a)?a.props.children:null);return(0,h.createElement)(g,(0,d.Z)({},f,{ref:l}),(0,h.isValidElement)(a)?(0,h.cloneElement)(a,void 0,u):null)}return(0,h.createElement)(g,(0,d.Z)({},f,{ref:l}),u)});p.displayName="Slot";let g=(0,h.forwardRef)((a,l)=>{let{children:u,...d}=a;return(0,h.isValidElement)(u)?(0,h.cloneElement)(u,{...function(a,l){let u={...l};for(let d in l){let h=a[d],f=l[d],p=/^on[A-Z]/.test(d);p?h&&f?u[d]=(...a)=>{f(...a),h(...a)}:h&&(u[d]=h):"style"===d?u[d]={...h,...f}:"className"===d&&(u[d]=[h,f].filter(Boolean).join(" "))}return{...a,...u}}(d,u.props),ref:l?(0,f.F)(l,u.ref):u.ref}):h.Children.count(u)>1?h.Children.only(null):null});g.displayName="SlotClone";let $5e63c961fc1ce211$export$d9f1ccf0bdb05d45=({children:a})=>(0,h.createElement)(h.Fragment,null,a);function $5e63c961fc1ce211$var$isSlottable(a){return(0,h.isValidElement)(a)&&a.type===$5e63c961fc1ce211$export$d9f1ccf0bdb05d45}},627757:function(a,l,u){"use strict";u.d(l,{W:function(){return $b1b2314f5f9a1d84$export$25bec8c6f54ee79a}});var d=u(202784);function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(a){let l=(0,d.useRef)(a);return(0,d.useEffect)(()=>{l.current=a}),(0,d.useMemo)(()=>(...a)=>{var u;return null===(u=l.current)||void 0===u?void 0:u.call(l,...a)},[])}},387695:function(a,l,u){"use strict";u.d(l,{T:function(){return $71cd76cc60e0454e$export$6f32135080cb4c3}});var d=u(202784),h=u(627757);function $71cd76cc60e0454e$export$6f32135080cb4c3({prop:a,defaultProp:l,onChange:u=()=>{}}){let[f,p]=function({defaultProp:a,onChange:l}){let u=(0,d.useState)(a),[f]=u,p=(0,d.useRef)(f),g=(0,h.W)(l);return(0,d.useEffect)(()=>{p.current!==f&&(g(f),p.current=f)},[f,p,g]),u}({defaultProp:l,onChange:u}),g=void 0!==a,m=g?a:f,v=(0,h.W)(u),_=(0,d.useCallback)(l=>{if(g){let u="function"==typeof l?l(a):l;u!==a&&v(u)}else p(l)},[g,a,p,v]);return[m,_]}},861644:function(a,l,u){"use strict";u.d(l,{b:function(){return h}});var d=u(202784);let h=(null==globalThis?void 0:globalThis.document)?d.useLayoutEffect:()=>{}},289785:function(a,l,u){"use strict";u.d(l,{T:function(){return p},f:function(){return g}});var d=u(807896),h=u(202784),f=u(172714);let p=(0,h.forwardRef)((a,l)=>(0,h.createElement)(f.WV.span,(0,d.Z)({},a,{ref:l,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...a.style}}))),g=p},660418:function(a,l,u){"use strict";u.d(l,{Z:function(){return e4}});var d,h,f,p,g,m={};function bind(a,l){return function(){return a.apply(l,arguments)}}u.r(m),u.d(m,{hasBrowserEnv:function(){return eL},hasStandardBrowserEnv:function(){return eM},hasStandardBrowserWebWorkerEnv:function(){return eN},origin:function(){return eF}});let{toString:v}=Object.prototype,{getPrototypeOf:_}=Object,T=(d=Object.create(null),a=>{let l=v.call(a);return d[l]||(d[l]=l.slice(8,-1).toLowerCase())}),kindOfTest=a=>(a=a.toLowerCase(),l=>T(l)===a),typeOfTest=a=>l=>typeof l===a,{isArray:C}=Array,R=typeOfTest("undefined"),B=kindOfTest("ArrayBuffer"),V=typeOfTest("string"),er=typeOfTest("function"),en=typeOfTest("number"),isObject=a=>null!==a&&"object"==typeof a,isPlainObject=a=>{if("object"!==T(a))return!1;let l=_(a);return(null===l||l===Object.prototype||null===Object.getPrototypeOf(l))&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)},ei=kindOfTest("Date"),es=kindOfTest("File"),eo=kindOfTest("Blob"),ea=kindOfTest("FileList"),el=kindOfTest("URLSearchParams"),[ec,eu,ed,eh]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(a,l,{allOwnKeys:u=!1}={}){let d,h;if(null!=a){if("object"!=typeof a&&(a=[a]),C(a))for(d=0,h=a.length;d<h;d++)l.call(null,a[d],d,a);else{let h;let f=u?Object.getOwnPropertyNames(a):Object.keys(a),p=f.length;for(d=0;d<p;d++)h=f[d],l.call(null,a[h],h,a)}}}function findKey(a,l){let u;l=l.toLowerCase();let d=Object.keys(a),h=d.length;for(;h-- >0;)if(l===(u=d[h]).toLowerCase())return u;return null}let ef="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=a=>!R(a)&&a!==ef,ep=(h="undefined"!=typeof Uint8Array&&_(Uint8Array),a=>h&&a instanceof h),eg=kindOfTest("HTMLFormElement"),em=(({hasOwnProperty:a})=>(l,u)=>a.call(l,u))(Object.prototype),ev=kindOfTest("RegExp"),reduceDescriptors=(a,l)=>{let u=Object.getOwnPropertyDescriptors(a),d={};forEach(u,(u,h)=>{let f;!1!==(f=l(u,h,a))&&(d[h]=f||u)}),Object.defineProperties(a,d)},e_="abcdefghijklmnopqrstuvwxyz",ey="0123456789",eb={DIGIT:ey,ALPHA:e_,ALPHA_DIGIT:e_+e_.toUpperCase()+ey},ew=kindOfTest("AsyncFunction");var eS={isArray:C,isArrayBuffer:B,isBuffer:function(a){return null!==a&&!R(a)&&null!==a.constructor&&!R(a.constructor)&&er(a.constructor.isBuffer)&&a.constructor.isBuffer(a)},isFormData:a=>{let l;return a&&("function"==typeof FormData&&a instanceof FormData||er(a.append)&&("formdata"===(l=T(a))||"object"===l&&er(a.toString)&&"[object FormData]"===a.toString()))},isArrayBufferView:function(a){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer&&B(a.buffer)},isString:V,isNumber:en,isBoolean:a=>!0===a||!1===a,isObject,isPlainObject,isReadableStream:ec,isRequest:eu,isResponse:ed,isHeaders:eh,isUndefined:R,isDate:ei,isFile:es,isBlob:eo,isRegExp:ev,isFunction:er,isStream:a=>isObject(a)&&er(a.pipe),isURLSearchParams:el,isTypedArray:ep,isFileList:ea,forEach,merge:function merge(){let{caseless:a}=isContextDefined(this)&&this||{},l={},assignValue=(u,d)=>{let h=a&&findKey(l,d)||d;isPlainObject(l[h])&&isPlainObject(u)?l[h]=merge(l[h],u):isPlainObject(u)?l[h]=merge({},u):C(u)?l[h]=u.slice():l[h]=u};for(let a=0,l=arguments.length;a<l;a++)arguments[a]&&forEach(arguments[a],assignValue);return l},extend:(a,l,u,{allOwnKeys:d}={})=>(forEach(l,(l,d)=>{u&&er(l)?a[d]=bind(l,u):a[d]=l},{allOwnKeys:d}),a),trim:a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:a=>(65279===a.charCodeAt(0)&&(a=a.slice(1)),a),inherits:(a,l,u,d)=>{a.prototype=Object.create(l.prototype,d),a.prototype.constructor=a,Object.defineProperty(a,"super",{value:l.prototype}),u&&Object.assign(a.prototype,u)},toFlatObject:(a,l,u,d)=>{let h,f,p;let g={};if(l=l||{},null==a)return l;do{for(f=(h=Object.getOwnPropertyNames(a)).length;f-- >0;)p=h[f],(!d||d(p,a,l))&&!g[p]&&(l[p]=a[p],g[p]=!0);a=!1!==u&&_(a)}while(a&&(!u||u(a,l))&&a!==Object.prototype);return l},kindOf:T,kindOfTest,endsWith:(a,l,u)=>{a=String(a),(void 0===u||u>a.length)&&(u=a.length),u-=l.length;let d=a.indexOf(l,u);return -1!==d&&d===u},toArray:a=>{if(!a)return null;if(C(a))return a;let l=a.length;if(!en(l))return null;let u=Array(l);for(;l-- >0;)u[l]=a[l];return u},forEachEntry:(a,l)=>{let u;let d=a&&a[Symbol.iterator],h=d.call(a);for(;(u=h.next())&&!u.done;){let d=u.value;l.call(a,d[0],d[1])}},matchAll:(a,l)=>{let u;let d=[];for(;null!==(u=a.exec(l));)d.push(u);return d},isHTMLForm:eg,hasOwnProperty:em,hasOwnProp:em,reduceDescriptors,freezeMethods:a=>{reduceDescriptors(a,(l,u)=>{if(er(a)&&-1!==["arguments","caller","callee"].indexOf(u))return!1;let d=a[u];if(er(d)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},toObjectSet:(a,l)=>{let u={};return(a=>{a.forEach(a=>{u[a]=!0})})(C(a)?a:String(a).split(l)),u},toCamelCase:a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,l,u){return l.toUpperCase()+u}),noop:()=>{},toFiniteNumber:(a,l)=>null!=a&&Number.isFinite(a=+a)?a:l,findKey,global:ef,isContextDefined,ALPHABET:eb,generateString:(a=16,l=eb.ALPHA_DIGIT)=>{let u="",{length:d}=l;for(;a--;)u+=l[Math.random()*d|0];return u},isSpecCompliantForm:function(a){return!!(a&&er(a.append)&&"FormData"===a[Symbol.toStringTag]&&a[Symbol.iterator])},toJSONObject:a=>{let l=Array(10),visit=(a,u)=>{if(isObject(a)){if(l.indexOf(a)>=0)return;if(!("toJSON"in a)){l[u]=a;let d=C(a)?[]:{};return forEach(a,(a,l)=>{let h=visit(a,u+1);R(h)||(d[l]=h)}),l[u]=void 0,d}}return a};return visit(a,0)},isAsyncFn:ew,isThenable:a=>a&&(isObject(a)||er(a))&&er(a.then)&&er(a.catch)};function AxiosError(a,l,u,d,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=a,this.name="AxiosError",l&&(this.code=l),u&&(this.config=u),d&&(this.request=d),h&&(this.response=h)}eS.inherits(AxiosError,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:eS.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let eE=AxiosError.prototype,ek={};["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(a=>{ek[a]={value:a}}),Object.defineProperties(AxiosError,ek),Object.defineProperty(eE,"isAxiosError",{value:!0}),AxiosError.from=(a,l,u,d,h,f)=>{let p=Object.create(eE);return eS.toFlatObject(a,p,function(a){return a!==Error.prototype},a=>"isAxiosError"!==a),AxiosError.call(p,a.message,l,u,d,h),p.cause=a,p.name=a.name,f&&Object.assign(p,f),p};var eT=u(348834).Buffer;function isVisitable(a){return eS.isPlainObject(a)||eS.isArray(a)}function removeBrackets(a){return eS.endsWith(a,"[]")?a.slice(0,-2):a}function renderKey(a,l,u){return a?a.concat(l).map(function(a,l){return a=removeBrackets(a),!u&&l?"["+a+"]":a}).join(u?".":""):l}let ex=eS.toFlatObject(eS,{},null,function(a){return/^is[A-Z]/.test(a)});var helpers_toFormData=function(a,l,u){if(!eS.isObject(a))throw TypeError("target must be an object");l=l||new FormData,u=eS.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,l){return!eS.isUndefined(l[a])});let d=u.metaTokens,h=u.visitor||defaultVisitor,f=u.dots,p=u.indexes,g=u.Blob||"undefined"!=typeof Blob&&Blob,m=g&&eS.isSpecCompliantForm(l);if(!eS.isFunction(h))throw TypeError("visitor must be a function");function convertValue(a){if(null===a)return"";if(eS.isDate(a))return a.toISOString();if(!m&&eS.isBlob(a))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return eS.isArrayBuffer(a)||eS.isTypedArray(a)?m&&"function"==typeof Blob?new Blob([a]):eT.from(a):a}function defaultVisitor(a,u,h){let g=a;if(a&&!h&&"object"==typeof a){if(eS.endsWith(u,"{}"))u=d?u:u.slice(0,-2),a=JSON.stringify(a);else{var m;if(eS.isArray(a)&&(m=a,eS.isArray(m)&&!m.some(isVisitable))||(eS.isFileList(a)||eS.endsWith(u,"[]"))&&(g=eS.toArray(a)))return u=removeBrackets(u),g.forEach(function(a,d){eS.isUndefined(a)||null===a||l.append(!0===p?renderKey([u],d,f):null===p?u:u+"[]",convertValue(a))}),!1}}return!!isVisitable(a)||(l.append(renderKey(h,u,f),convertValue(a)),!1)}let v=[],_=Object.assign(ex,{defaultVisitor,convertValue,isVisitable});if(!eS.isObject(a))throw TypeError("data must be an object");return!function build(a,u){if(!eS.isUndefined(a)){if(-1!==v.indexOf(a))throw Error("Circular reference detected in "+u.join("."));v.push(a),eS.forEach(a,function(a,d){let f=!(eS.isUndefined(a)||null===a)&&h.call(l,a,eS.isString(d)?d.trim():d,u,_);!0===f&&build(a,u?u.concat(d):[d])}),v.pop()}}(a),l};function encode(a){let l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(a){return l[a]})}function AxiosURLSearchParams(a,l){this._pairs=[],a&&helpers_toFormData(a,this,l)}let eC=AxiosURLSearchParams.prototype;function buildURL_encode(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(a,l,u){let d;if(!l)return a;let h=u&&u.encode||buildURL_encode,f=u&&u.serialize;if(d=f?f(l,u):eS.isURLSearchParams(l)?l.toString():new AxiosURLSearchParams(l,u).toString(h)){let l=a.indexOf("#");-1!==l&&(a=a.slice(0,l)),a+=(-1===a.indexOf("?")?"?":"&")+d}return a}eC.append=function(a,l){this._pairs.push([a,l])},eC.toString=function(a){let l=a?function(l){return a.call(this,l,encode)}:encode;return this._pairs.map(function(a){return l(a[0])+"="+l(a[1])},"").join("&")};var eR=class{constructor(){this.handlers=[]}use(a,l,u){return this.handlers.push({fulfilled:a,rejected:l,synchronous:!!u&&u.synchronous,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){eS.forEach(this.handlers,function(l){null!==l&&a(l)})}},eI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eA="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,eO="undefined"!=typeof FormData?FormData:null,eP="undefined"!=typeof Blob?Blob:null;let eL="undefined"!=typeof window&&"undefined"!=typeof document,eM=(f="undefined"!=typeof navigator&&navigator.product,eL&&0>["ReactNative","NativeScript","NS"].indexOf(f)),eN="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eF=eL&&window.location.href||"http://localhost";var eD={...m,isBrowser:!0,classes:{URLSearchParams:eA,FormData:eO,Blob:eP},protocols:["http","https","file","blob","url","data"]},helpers_formDataToJSON=function(a){if(eS.isFormData(a)&&eS.isFunction(a.entries)){let l={};return eS.forEachEntry(a,(a,u)=>{!function buildPath(a,l,u,d){let h=a[d++];if("__proto__"===h)return!0;let f=Number.isFinite(+h),p=d>=a.length;if(h=!h&&eS.isArray(u)?u.length:h,p)return eS.hasOwnProp(u,h)?u[h]=[u[h],l]:u[h]=l,!f;u[h]&&eS.isObject(u[h])||(u[h]=[]);let g=buildPath(a,l,u[h],d);return g&&eS.isArray(u[h])&&(u[h]=function(a){let l,u;let d={},h=Object.keys(a),f=h.length;for(l=0;l<f;l++)d[u=h[l]]=a[u];return d}(u[h])),!f}(eS.matchAll(/\w+|\[(\w*)]/g,a).map(a=>"[]"===a[0]?"":a[1]||a[0]),u,l,0)}),l}return null};let ej={transitional:eI,adapter:["xhr","http","fetch"],transformRequest:[function(a,l){let u;let d=l.getContentType()||"",h=d.indexOf("application/json")>-1,f=eS.isObject(a);f&&eS.isHTMLForm(a)&&(a=new FormData(a));let p=eS.isFormData(a);if(p)return h?JSON.stringify(helpers_formDataToJSON(a)):a;if(eS.isArrayBuffer(a)||eS.isBuffer(a)||eS.isStream(a)||eS.isFile(a)||eS.isBlob(a)||eS.isReadableStream(a))return a;if(eS.isArrayBufferView(a))return a.buffer;if(eS.isURLSearchParams(a))return l.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();if(f){if(d.indexOf("application/x-www-form-urlencoded")>-1){var g,m;return(g=a,m=this.formSerializer,helpers_toFormData(g,new eD.classes.URLSearchParams,Object.assign({visitor:function(a,l,u,d){return eD.isNode&&eS.isBuffer(a)?(this.append(l,a.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},m))).toString()}if((u=eS.isFileList(a))||d.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return helpers_toFormData(u?{"files[]":a}:a,l&&new l,this.formSerializer)}}return f||h?(l.setContentType("application/json",!1),function(a,l,u){if(eS.isString(a))try{return(0,JSON.parse)(a),eS.trim(a)}catch(a){if("SyntaxError"!==a.name)throw a}return(0,JSON.stringify)(a)}(a)):a}],transformResponse:[function(a){let l=this.transitional||ej.transitional,u=l&&l.forcedJSONParsing,d="json"===this.responseType;if(eS.isResponse(a)||eS.isReadableStream(a))return a;if(a&&eS.isString(a)&&(u&&!this.responseType||d)){let u=l&&l.silentJSONParsing;try{return JSON.parse(a)}catch(a){if(!u&&d){if("SyntaxError"===a.name)throw AxiosError.from(a,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eD.classes.FormData,Blob:eD.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eS.forEach(["delete","get","head","post","put","patch"],a=>{ej.headers[a]={}});let eB=eS.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"]);var parseHeaders=a=>{let l,u,d;let h={};return a&&a.split("\n").forEach(function(a){d=a.indexOf(":"),l=a.substring(0,d).trim().toLowerCase(),u=a.substring(d+1).trim(),!l||h[l]&&eB[l]||("set-cookie"===l?h[l]?h[l].push(u):h[l]=[u]:h[l]=h[l]?h[l]+", "+u:u)}),h};let e$=Symbol("internals");function normalizeHeader(a){return a&&String(a).trim().toLowerCase()}function normalizeValue(a){return!1===a||null==a?a:eS.isArray(a)?a.map(normalizeValue):String(a)}let isValidHeaderName=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function matchHeaderValue(a,l,u,d,h){if(eS.isFunction(d))return d.call(this,l,u);if(h&&(l=u),eS.isString(l)){if(eS.isString(d))return -1!==l.indexOf(d);if(eS.isRegExp(d))return d.test(l)}}let AxiosHeaders=class AxiosHeaders{constructor(a){a&&this.set(a)}set(a,l,u){let d=this;function setHeader(a,l,u){let h=normalizeHeader(l);if(!h)throw Error("header name must be a non-empty string");let f=eS.findKey(d,h);f&&void 0!==d[f]&&!0!==u&&(void 0!==u||!1===d[f])||(d[f||l]=normalizeValue(a))}let setHeaders=(a,l)=>eS.forEach(a,(a,u)=>setHeader(a,u,l));if(eS.isPlainObject(a)||a instanceof this.constructor)setHeaders(a,l);else if(eS.isString(a)&&(a=a.trim())&&!isValidHeaderName(a))setHeaders(parseHeaders(a),l);else if(eS.isHeaders(a))for(let[l,d]of a.entries())setHeader(d,l,u);else null!=a&&setHeader(l,a,u);return this}get(a,l){if(a=normalizeHeader(a)){let u=eS.findKey(this,a);if(u){let a=this[u];if(!l)return a;if(!0===l)return function(a){let l;let u=Object.create(null),d=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;l=d.exec(a);)u[l[1]]=l[2];return u}(a);if(eS.isFunction(l))return l.call(this,a,u);if(eS.isRegExp(l))return l.exec(a);throw TypeError("parser must be boolean|regexp|function")}}}has(a,l){if(a=normalizeHeader(a)){let u=eS.findKey(this,a);return!!(u&&void 0!==this[u]&&(!l||matchHeaderValue(this,this[u],u,l)))}return!1}delete(a,l){let u=this,d=!1;function deleteHeader(a){if(a=normalizeHeader(a)){let h=eS.findKey(u,a);h&&(!l||matchHeaderValue(u,u[h],h,l))&&(delete u[h],d=!0)}}return eS.isArray(a)?a.forEach(deleteHeader):deleteHeader(a),d}clear(a){let l=Object.keys(this),u=l.length,d=!1;for(;u--;){let h=l[u];(!a||matchHeaderValue(this,this[h],h,a,!0))&&(delete this[h],d=!0)}return d}normalize(a){let l=this,u={};return eS.forEach(this,(d,h)=>{let f=eS.findKey(u,h);if(f){l[f]=normalizeValue(d),delete l[h];return}let p=a?h.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,l,u)=>l.toUpperCase()+u):String(h).trim();p!==h&&delete l[h],l[p]=normalizeValue(d),u[p]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){let l=Object.create(null);return eS.forEach(this,(u,d)=>{null!=u&&!1!==u&&(l[d]=a&&eS.isArray(u)?u.join(", "):u)}),l}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,l])=>a+": "+l).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...l){let u=new this(a);return l.forEach(a=>u.set(a)),u}static accessor(a){let l=this[e$]=this[e$]={accessors:{}},u=l.accessors,d=this.prototype;function defineAccessor(a){let l=normalizeHeader(a);u[l]||(!function(a,l){let u=eS.toCamelCase(" "+l);["get","set","has"].forEach(d=>{Object.defineProperty(a,d+u,{value:function(a,u,h){return this[d].call(this,l,a,u,h)},configurable:!0})})}(d,a),u[l]=!0)}return eS.isArray(a)?a.forEach(defineAccessor):defineAccessor(a),this}};function transformData(a,l){let u=this||ej,d=l||u,h=AxiosHeaders.from(d.headers),f=d.data;return eS.forEach(a,function(a){f=a.call(u,f,h.normalize(),l?l.status:void 0)}),h.normalize(),f}function isCancel(a){return!!(a&&a.__CANCEL__)}function CanceledError(a,l,u){AxiosError.call(this,null==a?"canceled":a,AxiosError.ERR_CANCELED,l,u),this.name="CanceledError"}function settle(a,l,u){let d=u.config.validateStatus;!u.status||!d||d(u.status)?a(u):l(new AxiosError("Request failed with status code "+u.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eS.reduceDescriptors(AxiosHeaders.prototype,({value:a},l)=>{let u=l[0].toUpperCase()+l.slice(1);return{get:()=>a,set(a){this[u]=a}}}),eS.freezeMethods(AxiosHeaders),eS.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var helpers_speedometer=function(a,l){let u;a=a||10;let d=Array(a),h=Array(a),f=0,p=0;return l=void 0!==l?l:1e3,function(g){let m=Date.now(),v=h[p];u||(u=m),d[f]=g,h[f]=m;let _=p,T=0;for(;_!==f;)T+=d[_++],_%=a;if((f=(f+1)%a)===p&&(p=(p+1)%a),m-u<l)return;let C=v&&m-v;return C?Math.round(1e3*T/C):void 0}},helpers_throttle=function(a,l){let u=0,d=1e3/l,h=null;return function(){let l=Date.now();if(this===!0||l-u>d)return h&&(clearTimeout(h),h=null),u=l,a.apply(null,arguments);h||(h=setTimeout(()=>(h=null,u=Date.now(),a.apply(null,arguments)),d-(l-u)))}},progressEventReducer=(a,l,u=3)=>{let d=0,h=helpers_speedometer(50,250);return helpers_throttle(u=>{let f=u.loaded,p=u.lengthComputable?u.total:void 0,g=f-d,m=h(g),v=f<=p;d=f;let _={loaded:f,total:p,progress:p?f/p:void 0,bytes:g,rate:m||void 0,estimated:m&&p&&v?(p-f)/m:void 0,event:u,lengthComputable:null!=p};_[l?"download":"upload"]=!0,a(_)},u)},eU=eD.hasStandardBrowserEnv?function(){let a;let l=/(msie|trident)/i.test(navigator.userAgent),u=document.createElement("a");function resolveURL(a){let d=a;return l&&(u.setAttribute("href",d),d=u.href),u.setAttribute("href",d),{href:u.href,protocol:u.protocol?u.protocol.replace(/:$/,""):"",host:u.host,search:u.search?u.search.replace(/^\?/,""):"",hash:u.hash?u.hash.replace(/^#/,""):"",hostname:u.hostname,port:u.port,pathname:"/"===u.pathname.charAt(0)?u.pathname:"/"+u.pathname}}return a=resolveURL(window.location.href),function(l){let u=eS.isString(l)?resolveURL(l):l;return u.protocol===a.protocol&&u.host===a.host}}():function(){return!0},eH=eD.hasStandardBrowserEnv?{write(a,l,u,d,h,f){let p=[a+"="+encodeURIComponent(l)];eS.isNumber(u)&&p.push("expires="+new Date(u).toGMTString()),eS.isString(d)&&p.push("path="+d),eS.isString(h)&&p.push("domain="+h),!0===f&&p.push("secure"),document.cookie=p.join("; ")},read(a){let l=document.cookie.match(RegExp("(^|;\\s*)("+a+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(a,l){return a&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)?l?a.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):a:l}let headersToObject=a=>a instanceof AxiosHeaders?{...a}:a;function mergeConfig(a,l){l=l||{};let u={};function getMergedValue(a,l,u){return eS.isPlainObject(a)&&eS.isPlainObject(l)?eS.merge.call({caseless:u},a,l):eS.isPlainObject(l)?eS.merge({},l):eS.isArray(l)?l.slice():l}function mergeDeepProperties(a,l,u){return eS.isUndefined(l)?eS.isUndefined(a)?void 0:getMergedValue(void 0,a,u):getMergedValue(a,l,u)}function valueFromConfig2(a,l){if(!eS.isUndefined(l))return getMergedValue(void 0,l)}function defaultToConfig2(a,l){return eS.isUndefined(l)?eS.isUndefined(a)?void 0:getMergedValue(void 0,a):getMergedValue(void 0,l)}function mergeDirectKeys(u,d,h){return h in l?getMergedValue(u,d):h in a?getMergedValue(void 0,u):void 0}let d={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(a,l)=>mergeDeepProperties(headersToObject(a),headersToObject(l),!0)};return eS.forEach(Object.keys(Object.assign({},a,l)),function(h){let f=d[h]||mergeDeepProperties,p=f(a[h],l[h],h);eS.isUndefined(p)&&f!==mergeDirectKeys||(u[h]=p)}),u}var resolveConfig=a=>{let l;let u=mergeConfig({},a),{data:d,withXSRFToken:h,xsrfHeaderName:f,xsrfCookieName:p,headers:g,auth:m}=u;if(u.headers=g=AxiosHeaders.from(g),u.url=buildURL(buildFullPath(u.baseURL,u.url),a.params,a.paramsSerializer),m&&g.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),eS.isFormData(d)){if(eD.hasStandardBrowserEnv||eD.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(!1!==(l=g.getContentType())){let[a,...u]=l?l.split(";").map(a=>a.trim()).filter(Boolean):[];g.setContentType([a||"multipart/form-data",...u].join("; "))}}if(eD.hasStandardBrowserEnv&&(h&&eS.isFunction(h)&&(h=h(u)),h||!1!==h&&eU(u.url))){let a=f&&p&&eH.read(p);a&&g.set(f,a)}return u};let eq="undefined"!=typeof XMLHttpRequest;var ez=eq&&function(a){return new Promise(function(l,u){let d;let h=resolveConfig(a),f=h.data,p=AxiosHeaders.from(h.headers).normalize(),{responseType:g}=h;function done(){h.cancelToken&&h.cancelToken.unsubscribe(d),h.signal&&h.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;function onloadend(){if(!m)return;let d=AxiosHeaders.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),h=g&&"text"!==g&&"json"!==g?m.response:m.responseText,f={data:h,status:m.status,statusText:m.statusText,headers:d,config:a,request:m};settle(function(a){l(a),done()},function(a){u(a),done()},f),m=null}m.open(h.method.toUpperCase(),h.url,!0),m.timeout=h.timeout,"onloadend"in m?m.onloadend=onloadend:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(onloadend)},m.onabort=function(){m&&(u(new AxiosError("Request aborted",AxiosError.ECONNABORTED,h,m)),m=null)},m.onerror=function(){u(new AxiosError("Network Error",AxiosError.ERR_NETWORK,h,m)),m=null},m.ontimeout=function(){let a=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded",l=h.transitional||eI;h.timeoutErrorMessage&&(a=h.timeoutErrorMessage),u(new AxiosError(a,l.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,h,m)),m=null},void 0===f&&p.setContentType(null),"setRequestHeader"in m&&eS.forEach(p.toJSON(),function(a,l){m.setRequestHeader(l,a)}),eS.isUndefined(h.withCredentials)||(m.withCredentials=!!h.withCredentials),g&&"json"!==g&&(m.responseType=h.responseType),"function"==typeof h.onDownloadProgress&&m.addEventListener("progress",progressEventReducer(h.onDownloadProgress,!0)),"function"==typeof h.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",progressEventReducer(h.onUploadProgress)),(h.cancelToken||h.signal)&&(d=l=>{m&&(u(!l||l.type?new CanceledError(null,a,m):l),m.abort(),m=null)},h.cancelToken&&h.cancelToken.subscribe(d),h.signal&&(h.signal.aborted?d():h.signal.addEventListener("abort",d)));let v=function(a){let l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return l&&l[1]||""}(h.url);if(v&&-1===eD.protocols.indexOf(v)){u(new AxiosError("Unsupported protocol "+v+":",AxiosError.ERR_BAD_REQUEST,a));return}m.send(f||null)})},helpers_composeSignals=(a,l)=>{let u,d=new AbortController,onabort=function(a){if(!u){u=!0,unsubscribe();let l=a instanceof Error?a:this.reason;d.abort(l instanceof AxiosError?l:new CanceledError(l instanceof Error?l.message:l))}},h=l&&setTimeout(()=>{onabort(new AxiosError(`timeout ${l} of ms exceeded`,AxiosError.ETIMEDOUT))},l),unsubscribe=()=>{a&&(h&&clearTimeout(h),h=null,a.forEach(a=>{a&&(a.removeEventListener?a.removeEventListener("abort",onabort):a.unsubscribe(onabort))}),a=null)};a.forEach(a=>a&&a.addEventListener&&a.addEventListener("abort",onabort));let{signal:f}=d;return f.unsubscribe=unsubscribe,[f,()=>{h&&clearTimeout(h),h=null}]};let streamChunk=function*(a,l){let u,d=a.byteLength;if(!l||d<l){yield a;return}let h=0;for(;h<d;)u=h+l,yield a.slice(h,u),h=u},readBytes=async function*(a,l,u){for await(let d of a)yield*streamChunk(ArrayBuffer.isView(d)?d:await u(String(d)),l)},trackStream=(a,l,u,d,h)=>{let f=readBytes(a,l,h),p=0;return new ReadableStream({type:"bytes",async pull(a){let{done:l,value:h}=await f.next();if(l){a.close(),d();return}let g=h.byteLength;u&&u(p+=g),a.enqueue(new Uint8Array(h))},cancel:a=>(d(a),f.return())},{highWaterMark:2})},fetchProgressDecorator=(a,l)=>{let u=null!=a;return d=>setTimeout(()=>l({lengthComputable:u,total:a,loaded:d}))},eW="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,eV=eW&&"function"==typeof ReadableStream,eG=eW&&("function"==typeof TextEncoder?(p=new TextEncoder,a=>p.encode(a)):async a=>new Uint8Array(await new Response(a).arrayBuffer())),eJ=eV&&(()=>{let a=!1,l=new Request(eD.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!l})(),eK=eV&&!!(()=>{try{return eS.isReadableStream(new Response("").body)}catch(a){}})(),eX={stream:eK&&(a=>a.body)};eW&&(g=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(a=>{eX[a]||(eX[a]=eS.isFunction(g[a])?l=>l[a]():(l,u)=>{throw new AxiosError(`Response type '${a}' is not supported`,AxiosError.ERR_NOT_SUPPORT,u)})}));let getBodyLength=async a=>null==a?0:eS.isBlob(a)?a.size:eS.isSpecCompliantForm(a)?(await new Request(a).arrayBuffer()).byteLength:eS.isArrayBufferView(a)?a.byteLength:(eS.isURLSearchParams(a)&&(a+=""),eS.isString(a))?(await eG(a)).byteLength:void 0,resolveBodyLength=async(a,l)=>{let u=eS.toFiniteNumber(a.getContentLength());return null==u?getBodyLength(l):u};var eY=eW&&(async a=>{let l,u,d,{url:h,method:f,data:p,signal:g,cancelToken:m,timeout:v,onDownloadProgress:_,onUploadProgress:T,responseType:C,headers:R,withCredentials:B="same-origin",fetchOptions:V}=resolveConfig(a);C=C?(C+"").toLowerCase():"text";let[er,en]=g||m||v?helpers_composeSignals([g,m],v):[],onFinish=()=>{l||setTimeout(()=>{er&&er.unsubscribe()}),l=!0};try{if(T&&eJ&&"get"!==f&&"head"!==f&&0!==(d=await resolveBodyLength(R,p))){let a,l=new Request(h,{method:"POST",body:p,duplex:"half"});eS.isFormData(p)&&(a=l.headers.get("content-type"))&&R.setContentType(a),l.body&&(p=trackStream(l.body,65536,fetchProgressDecorator(d,progressEventReducer(T)),null,eG))}eS.isString(B)||(B=B?"cors":"omit"),u=new Request(h,{...V,signal:er,method:f.toUpperCase(),headers:R.normalize().toJSON(),body:p,duplex:"half",withCredentials:B});let l=await fetch(u),g=eK&&("stream"===C||"response"===C);if(eK&&(_||g)){let a={};["status","statusText","headers"].forEach(u=>{a[u]=l[u]});let u=eS.toFiniteNumber(l.headers.get("content-length"));l=new Response(trackStream(l.body,65536,_&&fetchProgressDecorator(u,progressEventReducer(_,!0)),g&&onFinish,eG),a)}C=C||"text";let m=await eX[eS.findKey(eX,C)||"text"](l,a);return g||onFinish(),en&&en(),await new Promise((d,h)=>{settle(d,h,{data:m,headers:AxiosHeaders.from(l.headers),status:l.status,statusText:l.statusText,config:a,request:u})})}catch(l){if(onFinish(),l&&"TypeError"===l.name&&/fetch/i.test(l.message))throw Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,a,u),{cause:l.cause||l});throw AxiosError.from(l,l&&l.code,a,u)}});let eZ={http:null,xhr:ez,fetch:eY};eS.forEach(eZ,(a,l)=>{if(a){try{Object.defineProperty(a,"name",{value:l})}catch(a){}Object.defineProperty(a,"adapterName",{value:l})}});let renderReason=a=>`- ${a}`,isResolvedHandle=a=>eS.isFunction(a)||null===a||!1===a;var eQ={getAdapter:a=>{let l,u;a=eS.isArray(a)?a:[a];let{length:d}=a,h={};for(let f=0;f<d;f++){let d;if(u=l=a[f],!isResolvedHandle(l)&&void 0===(u=eZ[(d=String(l)).toLowerCase()]))throw new AxiosError(`Unknown adapter '${d}'`);if(u)break;h[d||"#"+f]=u}if(!u){let a=Object.entries(h).map(([a,l])=>`adapter ${a} `+(!1===l?"is not supported by the environment":"is not available in the build")),l=d?a.length>1?"since :\n"+a.map(renderReason).join("\n"):" "+renderReason(a[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return u},adapters:eZ};function throwIfCancellationRequested(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new CanceledError(null,a)}function dispatchRequest(a){throwIfCancellationRequested(a),a.headers=AxiosHeaders.from(a.headers),a.data=transformData.call(a,a.transformRequest),-1!==["post","put","patch"].indexOf(a.method)&&a.headers.setContentType("application/x-www-form-urlencoded",!1);let l=eQ.getAdapter(a.adapter||ej.adapter);return l(a).then(function(l){return throwIfCancellationRequested(a),l.data=transformData.call(a,a.transformResponse,l),l.headers=AxiosHeaders.from(l.headers),l},function(l){return!isCancel(l)&&(throwIfCancellationRequested(a),l&&l.response&&(l.response.data=transformData.call(a,a.transformResponse,l.response),l.response.headers=AxiosHeaders.from(l.response.headers))),Promise.reject(l)})}let e0="1.7.2",e1={};["object","boolean","number","function","string","symbol"].forEach((a,l)=>{e1[a]=function(u){return typeof u===a||"a"+(l<1?"n ":" ")+a}});let e2={};e1.transitional=function(a,l,u){function formatMessage(a,l){return"[Axios v"+e0+"] Transitional option '"+a+"'"+l+(u?". "+u:"")}return(u,d,h)=>{if(!1===a)throw new AxiosError(formatMessage(d," has been removed"+(l?" in "+l:"")),AxiosError.ERR_DEPRECATED);return l&&!e2[d]&&(e2[d]=!0,console.warn(formatMessage(d," has been deprecated since v"+l+" and will be removed in the near future"))),!a||a(u,d,h)}};var e3={assertOptions:function(a,l,u){if("object"!=typeof a)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);let d=Object.keys(a),h=d.length;for(;h-- >0;){let f=d[h],p=l[f];if(p){let l=a[f],u=void 0===l||p(l,f,a);if(!0!==u)throw new AxiosError("option "+f+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(!0!==u)throw new AxiosError("Unknown option "+f,AxiosError.ERR_BAD_OPTION)}},validators:e1};let e5=e3.validators;let Axios=class Axios{constructor(a){this.defaults=a,this.interceptors={request:new eR,response:new eR}}async request(a,l){try{return await this._request(a,l)}catch(a){if(a instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=Error();let u=l.stack?l.stack.replace(/^.+\n/,""):"";try{a.stack?u&&!String(a.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(a.stack+="\n"+u):a.stack=u}catch(a){}}throw a}}_request(a,l){let u,d;"string"==typeof a?(l=l||{}).url=a:l=a||{},l=mergeConfig(this.defaults,l);let{transitional:h,paramsSerializer:f,headers:p}=l;void 0!==h&&e3.assertOptions(h,{silentJSONParsing:e5.transitional(e5.boolean),forcedJSONParsing:e5.transitional(e5.boolean),clarifyTimeoutError:e5.transitional(e5.boolean)},!1),null!=f&&(eS.isFunction(f)?l.paramsSerializer={serialize:f}:e3.assertOptions(f,{encode:e5.function,serialize:e5.function},!0)),l.method=(l.method||this.defaults.method||"get").toLowerCase();let g=p&&eS.merge(p.common,p[l.method]);p&&eS.forEach(["delete","get","head","post","put","patch","common"],a=>{delete p[a]}),l.headers=AxiosHeaders.concat(g,p);let m=[],v=!0;this.interceptors.request.forEach(function(a){("function"!=typeof a.runWhen||!1!==a.runWhen(l))&&(v=v&&a.synchronous,m.unshift(a.fulfilled,a.rejected))});let _=[];this.interceptors.response.forEach(function(a){_.push(a.fulfilled,a.rejected)});let T=0;if(!v){let a=[dispatchRequest.bind(this),void 0];for(a.unshift.apply(a,m),a.push.apply(a,_),d=a.length,u=Promise.resolve(l);T<d;)u=u.then(a[T++],a[T++]);return u}d=m.length;let C=l;for(T=0;T<d;){let a=m[T++],l=m[T++];try{C=a(C)}catch(a){l.call(this,a);break}}try{u=dispatchRequest.call(this,C)}catch(a){return Promise.reject(a)}for(T=0,d=_.length;T<d;)u=u.then(_[T++],_[T++]);return u}getUri(a){a=mergeConfig(this.defaults,a);let l=buildFullPath(a.baseURL,a.url);return buildURL(l,a.params,a.paramsSerializer)}};eS.forEach(["delete","get","head","options"],function(a){Axios.prototype[a]=function(l,u){return this.request(mergeConfig(u||{},{method:a,url:l,data:(u||{}).data}))}}),eS.forEach(["post","put","patch"],function(a){function generateHTTPMethod(l){return function(u,d,h){return this.request(mergeConfig(h||{},{method:a,headers:l?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Axios.prototype[a]=generateHTTPMethod(),Axios.prototype[a+"Form"]=generateHTTPMethod(!0)});let CancelToken=class CancelToken{constructor(a){let l;if("function"!=typeof a)throw TypeError("executor must be a function.");this.promise=new Promise(function(a){l=a});let u=this;this.promise.then(a=>{if(!u._listeners)return;let l=u._listeners.length;for(;l-- >0;)u._listeners[l](a);u._listeners=null}),this.promise.then=a=>{let l;let d=new Promise(a=>{u.subscribe(a),l=a}).then(a);return d.cancel=function(){u.unsubscribe(l)},d},a(function(a,d,h){u.reason||(u.reason=new CanceledError(a,d,h),l(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;let l=this._listeners.indexOf(a);-1!==l&&this._listeners.splice(l,1)}static source(){let a;let l=new CancelToken(function(l){a=l});return{token:l,cancel:a}}};let e6={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(e6).forEach(([a,l])=>{e6[l]=a});let e8=function createInstance(a){let l=new Axios(a),u=bind(Axios.prototype.request,l);return eS.extend(u,Axios.prototype,l,{allOwnKeys:!0}),eS.extend(u,l,null,{allOwnKeys:!0}),u.create=function(l){return createInstance(mergeConfig(a,l))},u}(ej);e8.Axios=Axios,e8.CanceledError=CanceledError,e8.CancelToken=CancelToken,e8.isCancel=isCancel,e8.VERSION=e0,e8.toFormData=helpers_toFormData,e8.AxiosError=AxiosError,e8.Cancel=e8.CanceledError,e8.all=function(a){return Promise.all(a)},e8.spread=function(a){return function(l){return a.apply(null,l)}},e8.isAxiosError=function(a){return eS.isObject(a)&&!0===a.isAxiosError},e8.mergeConfig=mergeConfig,e8.AxiosHeaders=AxiosHeaders,e8.formToJSON=a=>helpers_formDataToJSON(eS.isHTMLForm(a)?new FormData(a):a),e8.getAdapter=eQ.getAdapter,e8.HttpStatusCode=e6,e8.default=e8;var e4=e8},661335:function(a,l,u){"use strict";u.d(l,{j:function(){return cva}});let falsyToString=a=>"boolean"==typeof a?"".concat(a):0===a?"0":a,cx=function(){for(var a,l,u=0,d="";u<arguments.length;)(a=arguments[u++])&&(l=function r(a){var l,u,d="";if("string"==typeof a||"number"==typeof a)d+=a;else if("object"==typeof a){if(Array.isArray(a))for(l=0;l<a.length;l++)a[l]&&(u=r(a[l]))&&(d&&(d+=" "),d+=u);else for(l in a)a[l]&&(d&&(d+=" "),d+=l)}return d}(a))&&(d&&(d+=" "),d+=l);return d},cva=(a,l)=>u=>{var d;if((null==l?void 0:l.variants)==null)return cx(a,null==u?void 0:u.class,null==u?void 0:u.className);let{variants:h,defaultVariants:f}=l,p=Object.keys(h).map(a=>{let l=null==u?void 0:u[a],d=null==f?void 0:f[a];if(null===l)return null;let p=falsyToString(l)||falsyToString(d);return h[a][p]}),g=u&&Object.entries(u).reduce((a,l)=>{let[u,d]=l;return void 0===d||(a[u]=d),a},{}),m=null==l?void 0:null===(d=l.compoundVariants)||void 0===d?void 0:d.reduce((a,l)=>{let{class:u,className:d,...h}=l;return Object.entries(h).every(a=>{let[l,u]=a;return Array.isArray(u)?u.includes({...f,...g}[l]):({...f,...g})[l]===u})?[...a,u,d]:a},[]);return cx(a,p,m,null==u?void 0:u.class,null==u?void 0:u.className)}},840489:function(a,l,u){"use strict";function clsx(){for(var a,l,u=0,d="",h=arguments.length;u<h;u++)(a=arguments[u])&&(l=function r(a){var l,u,d="";if("string"==typeof a||"number"==typeof a)d+=a;else if("object"==typeof a){if(Array.isArray(a)){var h=a.length;for(l=0;l<h;l++)a[l]&&(u=r(a[l]))&&(d&&(d+=" "),d+=u)}else for(u in a)a[u]&&(d&&(d+=" "),d+=u)}return d}(a))&&(d&&(d+=" "),d+=l);return d}u.d(l,{W:function(){return clsx}}),l.Z=clsx},44729:function(a,l,u){"use strict";u.d(l,{$l:function(){return f},BN:function(){return internalMutate},DY:function(){return m},J$:function(){return SWRConfig},JG:function(){return eh},JN:function(){return createCacheHelper},LI:function(){return eo},PM:function(){return mergeObjects},W6:function(){return es},i_:function(){return h},kY:function(){return useSWRConfig},ko:function(){return subscribeCallback},kw:function(){return rAF},mf:function(){return isFunction},o8:function(){return isUndefined},qC:function(){return serialize},s6:function(){return withArgs},sj:function(){return eu},u3:function(){return getTimestamp},u_:function(){return ef},w6:function(){return ei},xD:function(){return withMiddleware}});var d=u(202784);let noop=()=>{},h=noop(),f=Object,isUndefined=a=>a===h,isFunction=a=>"function"==typeof a,mergeObjects=(a,l)=>({...a,...l}),isPromiseLike=a=>isFunction(a.then),p=new WeakMap,g=0,stableHash=a=>{let l,u;let d=typeof a,h=a&&a.constructor,m=h==Date;if(f(a)!==a||m||h==RegExp)l=m?a.toJSON():"symbol"==d?a.toString():"string"==d?JSON.stringify(a):""+a;else{if(l=p.get(a))return l;if(l=++g+"~",p.set(a,l),h==Array){for(u=0,l="@";u<a.length;u++)l+=stableHash(a[u])+",";p.set(a,l)}if(h==f){l="#";let d=f.keys(a).sort();for(;!isUndefined(u=d.pop());)isUndefined(a[u])||(l+=u+":"+stableHash(a[u])+",");p.set(a,l)}}return l},m=new WeakMap,v={},_={},T="undefined",C=typeof window!=T,R=typeof document!=T,hasRequestAnimationFrame=()=>C&&typeof window.requestAnimationFrame!=T,createCacheHelper=(a,l)=>{let u=m.get(a);return[()=>!isUndefined(l)&&a.get(l)||v,d=>{if(!isUndefined(l)){let h=a.get(l);l in _||(_[l]=h),u[5](l,mergeObjects(h,d),h||v)}},u[6],()=>!isUndefined(l)&&l in _?_[l]:!isUndefined(l)&&a.get(l)||v]},B=!0,[V,er]=C&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[noop,noop],en={initFocus:a=>(R&&document.addEventListener("visibilitychange",a),V("focus",a),()=>{R&&document.removeEventListener("visibilitychange",a),er("focus",a)}),initReconnect:a=>{let onOnline=()=>{B=!0,a()},onOffline=()=>{B=!1};return V("online",onOnline),V("offline",onOffline),()=>{er("online",onOnline),er("offline",onOffline)}}},ei=!d.useId,es=!C||"Deno"in window,rAF=a=>hasRequestAnimationFrame()?window.requestAnimationFrame(a):setTimeout(a,1),eo=es?d.useEffect:d.useLayoutEffect,ea="undefined"!=typeof navigator&&navigator.connection,el=!es&&ea&&(["slow-2g","2g"].includes(ea.effectiveType)||ea.saveData),serialize=a=>{if(isFunction(a))try{a=a()}catch(l){a=""}let l=a;return[a="string"==typeof a?a:(Array.isArray(a)?a.length:a)?stableHash(a):"",l]},ec=0,getTimestamp=()=>++ec;var eu={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function internalMutate(...a){let[l,u,d,f]=a,p=mergeObjects({populateCache:!0,throwOnError:!0},"boolean"==typeof f?{revalidate:f}:f||{}),g=p.populateCache,v=p.rollbackOnError,_=p.optimisticData,T=!1!==p.revalidate,rollbackOnError=a=>"function"==typeof v?v(a):!1!==v,C=p.throwOnError;if(isFunction(u)){let a=[],d=l.keys();for(let h of d)!/^\$(inf|sub)\$/.test(h)&&u(l.get(h)._k)&&a.push(h);return Promise.all(a.map(mutateByKey))}return mutateByKey(u);async function mutateByKey(u){let f;let[p]=serialize(u);if(!p)return;let[v,R]=createCacheHelper(l,p),[B,V,er,en]=m.get(l),startRevalidate=()=>{let a=B[p];return T&&(delete er[p],delete en[p],a&&a[0])?a[0](2).then(()=>v().data):v().data};if(a.length<3)return startRevalidate();let ei=d,es=getTimestamp();V[p]=[es,0];let eo=!isUndefined(_),ea=v(),el=ea.data,ec=ea._c,eu=isUndefined(ec)?el:ec;if(eo&&R({data:_=isFunction(_)?_(eu,el):_,_c:eu}),isFunction(ei))try{ei=ei(eu)}catch(a){f=a}if(ei&&isPromiseLike(ei)){if(ei=await ei.catch(a=>{f=a}),es!==V[p][0]){if(f)throw f;return ei}f&&eo&&rollbackOnError(f)&&(g=!0,R({data:eu,_c:h}))}if(g&&!f){if(isFunction(g)){let a=g(ei,eu);R({data:a,error:h,_c:h})}else R({data:ei,error:h,_c:h})}if(V[p][1]=getTimestamp(),Promise.resolve(startRevalidate()).then(()=>{R({_c:h})}),f){if(C)throw f;return}return ei}}let revalidateAllKeys=(a,l)=>{for(let u in a)a[u][0]&&a[u][0](l)},initCache=(a,l)=>{if(!m.has(a)){let u=mergeObjects(en,l),d={},f=internalMutate.bind(h,a),p=noop,g={},subscribe=(a,l)=>{let u=g[a]||[];return g[a]=u,u.push(l),()=>u.splice(u.indexOf(l),1)},setter=(l,u,d)=>{a.set(l,u);let h=g[l];if(h)for(let a of h)a(u,d)},initProvider=()=>{if(!m.has(a)&&(m.set(a,[d,{},{},{},f,setter,subscribe]),!es)){let l=u.initFocus(setTimeout.bind(h,revalidateAllKeys.bind(h,d,0))),f=u.initReconnect(setTimeout.bind(h,revalidateAllKeys.bind(h,d,1)));p=()=>{l&&l(),f&&f(),m.delete(a)}}};return initProvider(),[a,f,initProvider,p]}return[a,m.get(a)[4]]},[ed,eh]=initCache(new Map),ef=mergeObjects({onLoadingSlow:noop,onSuccess:noop,onError:noop,onErrorRetry:(a,l,u,d,h)=>{let f=u.errorRetryCount,p=h.retryCount,g=~~((Math.random()+.5)*(1<<(p<8?p:8)))*u.errorRetryInterval;(isUndefined(f)||!(p>f))&&setTimeout(d,g,h)},onDiscarded:noop,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:el?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:el?5e3:3e3,compare:(a,l)=>stableHash(a)==stableHash(l),isPaused:()=>!1,cache:ed,mutate:eh,fallback:{}},{isOnline:()=>B,isVisible:()=>{let a=R&&document.visibilityState;return isUndefined(a)||"hidden"!==a}}),mergeConfigs=(a,l)=>{let u=mergeObjects(a,l);if(l){let{use:d,fallback:h}=a,{use:f,fallback:p}=l;d&&f&&(u.use=d.concat(f)),h&&p&&(u.fallback=mergeObjects(h,p))}return u},ep=(0,d.createContext)({}),SWRConfig=a=>{let{value:l}=a,u=(0,d.useContext)(ep),f=isFunction(l),p=(0,d.useMemo)(()=>f?l(u):l,[f,u,l]),g=(0,d.useMemo)(()=>f?p:mergeConfigs(u,p),[f,u,p]),m=p&&p.provider,v=(0,d.useRef)(h);m&&!v.current&&(v.current=initCache(m(g.cache||ed),p));let _=v.current;return _&&(g.cache=_[0],g.mutate=_[1]),eo(()=>{if(_)return _[2]&&_[2](),_[3]},[]),(0,d.createElement)(ep.Provider,mergeObjects(a,{value:g}))},eg=C&&window.__SWR_DEVTOOLS_USE__,em=eg?window.__SWR_DEVTOOLS_USE__:[],normalize=a=>isFunction(a[1])?[a[0],a[1],a[2]||{}]:[a[0],null,(null===a[1]?a[2]:a[1])||{}],useSWRConfig=()=>mergeObjects(ef,(0,d.useContext)(ep)),ev=em.concat(a=>(l,u,d)=>{let h=u&&((...a)=>{let[d]=serialize(l),[,,,h]=m.get(ed);if(d.startsWith("$inf$"))return u(...a);let f=h[d];return isUndefined(f)?u(...a):(delete h[d],f)});return a(l,h,d)}),withArgs=a=>function(...l){let u=useSWRConfig(),[d,h,f]=normalize(l),p=mergeConfigs(u,f),g=a,{use:m}=p,v=(m||[]).concat(ev);for(let a=v.length;a--;)g=v[a](g);return g(d,h||p.fetcher||null,p)},subscribeCallback=(a,l,u)=>{let d=l[a]||(l[a]=[]);return d.push(u),()=>{let a=d.indexOf(u);a>=0&&(d[a]=d[d.length-1],d.pop())}},withMiddleware=(a,l)=>(...u)=>{let[d,h,f]=normalize(u),p=(f.use||[]).concat(l);return a(d,h,{...f,use:p})};eg&&(window.__SWR_DEVTOOLS_REACT__=d)},803255:function(a,l,u){"use strict";u.d(l,{J$:function(){return m},JG:function(){return f.JG},ZP:function(){return v},kY:function(){return f.kY}});var d=u(202784),h=u(743100),f=u(44729);let p=d.use||(a=>{if("pending"===a.status)throw a;if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a.status="pending",a.then(l=>{a.status="fulfilled",a.value=l},l=>{a.status="rejected",a.reason=l}),a}),g={dedupe:!0},m=f.$l.defineProperty(f.J$,"defaultValue",{value:f.u_}),v=(0,f.s6)((a,l,u)=>{let{cache:m,compare:v,suspense:_,fallbackData:T,revalidateOnMount:C,revalidateIfStale:R,refreshInterval:B,refreshWhenHidden:V,refreshWhenOffline:er,keepPreviousData:en}=u,[ei,es,eo,ea]=f.DY.get(m),[el,ec]=(0,f.qC)(a),eu=(0,d.useRef)(!1),ed=(0,d.useRef)(!1),eh=(0,d.useRef)(el),ef=(0,d.useRef)(l),ep=(0,d.useRef)(u),getConfig=()=>ep.current,isActive=()=>getConfig().isVisible()&&getConfig().isOnline(),[eg,em,ev,e_]=(0,f.JN)(m,el),ey=(0,d.useRef)({}).current,eb=(0,f.o8)(T)?u.fallback[el]:T,isEqual=(a,l)=>{for(let u in ey)if("data"===u){if(!v(a[u],l[u])&&(!(0,f.o8)(a[u])||!v(eI,l[u])))return!1}else if(l[u]!==a[u])return!1;return!0},ew=(0,d.useMemo)(()=>{let a=!!el&&!!l&&((0,f.o8)(C)?!getConfig().isPaused()&&!_&&(!!(0,f.o8)(R)||R):C),getSelectedCache=l=>{let u=(0,f.PM)(l);return(delete u._k,a)?{isValidating:!0,isLoading:!0,...u}:u},u=eg(),d=e_(),h=getSelectedCache(u),p=u===d?h:getSelectedCache(d),g=h;return[()=>{let a=getSelectedCache(eg()),l=isEqual(a,g);return l?(g.data=a.data,g.isLoading=a.isLoading,g.isValidating=a.isValidating,g.error=a.error,g):(g=a,a)},()=>p]},[m,el]),eS=(0,h.useSyncExternalStore)((0,d.useCallback)(a=>ev(el,(l,u)=>{isEqual(u,l)||a()}),[m,el]),ew[0],ew[1]),eE=!eu.current,ek=ei[el]&&ei[el].length>0,eT=eS.data,ex=(0,f.o8)(eT)?eb:eT,eC=eS.error,eR=(0,d.useRef)(ex),eI=en?(0,f.o8)(eT)?eR.current:eT:ex,eA=(!ek||!!(0,f.o8)(eC))&&(eE&&!(0,f.o8)(C)?C:!getConfig().isPaused()&&(_?!(0,f.o8)(ex)&&R:(0,f.o8)(ex)||R)),eO=!!(el&&l&&eE&&eA),eP=(0,f.o8)(eS.isValidating)?eO:eS.isValidating,eL=(0,f.o8)(eS.isLoading)?eO:eS.isLoading,eM=(0,d.useCallback)(async a=>{let l,d;let h=ef.current;if(!el||!h||ed.current||getConfig().isPaused())return!1;let p=!0,g=a||{},m=!eo[el]||!g.dedupe,callbackSafeguard=()=>f.w6?!ed.current&&el===eh.current&&eu.current:el===eh.current,_={isValidating:!1,isLoading:!1},finishRequestAndUpdateState=()=>{em(_)},cleanupState=()=>{let a=eo[el];a&&a[1]===d&&delete eo[el]},T={isValidating:!0};(0,f.o8)(eg().data)&&(T.isLoading=!0);try{if(m&&(em(T),u.loadingTimeout&&(0,f.o8)(eg().data)&&setTimeout(()=>{p&&callbackSafeguard()&&getConfig().onLoadingSlow(el,u)},u.loadingTimeout),eo[el]=[h(ec),(0,f.u3)()]),[l,d]=eo[el],l=await l,m&&setTimeout(cleanupState,u.dedupingInterval),!eo[el]||eo[el][1]!==d)return m&&callbackSafeguard()&&getConfig().onDiscarded(el),!1;_.error=f.i_;let a=es[el];if(!(0,f.o8)(a)&&(d<=a[0]||d<=a[1]||0===a[1]))return finishRequestAndUpdateState(),m&&callbackSafeguard()&&getConfig().onDiscarded(el),!1;let g=eg().data;_.data=v(g,l)?g:l,m&&callbackSafeguard()&&getConfig().onSuccess(l,el,u)}catch(u){cleanupState();let a=getConfig(),{shouldRetryOnError:l}=a;!a.isPaused()&&(_.error=u,m&&callbackSafeguard()&&(a.onError(u,el,a),(!0===l||(0,f.mf)(l)&&l(u))&&isActive()&&a.onErrorRetry(u,el,a,a=>{let l=ei[el];l&&l[0]&&l[0](f.sj.ERROR_REVALIDATE_EVENT,a)},{retryCount:(g.retryCount||0)+1,dedupe:!0})))}return p=!1,finishRequestAndUpdateState(),!0},[el,m]),eN=(0,d.useCallback)((...a)=>(0,f.BN)(m,eh.current,...a),[]);if((0,f.LI)(()=>{ef.current=l,ep.current=u,(0,f.o8)(eT)||(eR.current=eT)}),(0,f.LI)(()=>{if(!el)return;let a=eM.bind(f.i_,g),l=0,u=(0,f.ko)(el,ei,(u,d={})=>{if(u==f.sj.FOCUS_EVENT){let u=Date.now();getConfig().revalidateOnFocus&&u>l&&isActive()&&(l=u+getConfig().focusThrottleInterval,a())}else if(u==f.sj.RECONNECT_EVENT)getConfig().revalidateOnReconnect&&isActive()&&a();else if(u==f.sj.MUTATE_EVENT)return eM();else if(u==f.sj.ERROR_REVALIDATE_EVENT)return eM(d)});return ed.current=!1,eh.current=el,eu.current=!0,em({_k:ec}),eA&&((0,f.o8)(ex)||f.W6?a():(0,f.kw)(a)),()=>{ed.current=!0,u()}},[el]),(0,f.LI)(()=>{let a;function next(){let l=(0,f.mf)(B)?B(eg().data):B;l&&-1!==a&&(a=setTimeout(execute,l))}function execute(){!eg().error&&(V||getConfig().isVisible())&&(er||getConfig().isOnline())?eM(g).then(next):next()}return next(),()=>{a&&(clearTimeout(a),a=-1)}},[B,V,er,el]),(0,d.useDebugValue)(eI),_&&(0,f.o8)(ex)&&el){if(!f.w6&&f.W6)throw Error("Fallback data is required when using suspense in SSR.");ef.current=l,ep.current=u,ed.current=!1;let a=ea[el];if(!(0,f.o8)(a)){let l=eN(a);p(l)}if((0,f.o8)(eC)){let a=eM(g);(0,f.o8)(eI)||(a.status="fulfilled",a.value=!0),p(a)}else throw eC}return{mutate:eN,get data(){return ey.data=!0,eI},get error(){return ey.error=!0,eC},get isValidating(){return ey.isValidating=!0,eP},get isLoading(){return ey.isLoading=!0,eL}}})},320324:function(a,l,u){"use strict";u.d(l,{dV:function(){return twJoin},m6:function(){return V}});let d=/^\[(.+)\]$/;function getPart(a,l){let u=a;return l.split("-").forEach(a=>{u.nextPart.has(a)||u.nextPart.set(a,{nextPart:new Map,validators:[]}),u=u.nextPart.get(a)}),u}let h=/\s+/;function twJoin(){let a,l,u=0,d="";for(;u<arguments.length;)(a=arguments[u++])&&(l=function toValue(a){let l;if("string"==typeof a)return a;let u="";for(let d=0;d<a.length;d++)a[d]&&(l=toValue(a[d]))&&(u&&(u+=" "),u+=l);return u}(a))&&(d&&(d+=" "),d+=l);return d}function fromTheme(a){let themeGetter=l=>l[a]||[];return themeGetter.isThemeGetter=!0,themeGetter}let f=/^\[(?:([a-z-]+):)?(.+)\]$/i,p=/^\d+\/\d+$/,g=new Set(["px","full","screen"]),m=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function isLength(a){return isNumber(a)||g.has(a)||p.test(a)}function isArbitraryLength(a){return getIsArbitraryValue(a,"length",isLengthOnly)}function isNumber(a){return!!a&&!Number.isNaN(Number(a))}function isArbitraryNumber(a){return getIsArbitraryValue(a,"number",isNumber)}function isInteger(a){return!!a&&Number.isInteger(Number(a))}function isPercent(a){return a.endsWith("%")&&isNumber(a.slice(0,-1))}function isArbitraryValue(a){return f.test(a)}function isTshirtSize(a){return m.test(a)}let R=new Set(["length","size","percentage"]);function isArbitrarySize(a){return getIsArbitraryValue(a,R,isNever)}function isArbitraryPosition(a){return getIsArbitraryValue(a,"position",isNever)}let B=new Set(["image","url"]);function isArbitraryImage(a){return getIsArbitraryValue(a,B,isImage)}function isArbitraryShadow(a){return getIsArbitraryValue(a,"",isShadow)}function isAny(){return!0}function getIsArbitraryValue(a,l,u){let d=f.exec(a);return!!d&&(d[1]?"string"==typeof l?d[1]===l:l.has(d[1]):u(d[2]))}function isLengthOnly(a){return v.test(a)&&!_.test(a)}function isNever(){return!1}function isShadow(a){return T.test(a)}function isImage(a){return C.test(a)}let V=function(a){let l,u,f;let functionToCall=function(h){let p=[].reduce((a,l)=>l(a),a());return u=(l={cache:function(a){if(a<1)return{get:()=>void 0,set:()=>{}};let l=0,u=new Map,d=new Map;function update(h,f){u.set(h,f),++l>a&&(l=0,d=u,u=new Map)}return{get(a){let l=u.get(a);return void 0!==l?l:void 0!==(l=d.get(a))?(update(a,l),l):void 0},set(a,l){u.has(a)?u.set(a,l):update(a,l)}}}(p.cacheSize),parseClassName:function(a){let{separator:l,experimentalParseClassName:u}=a,d=1===l.length,h=l[0],f=l.length;function parseClassName(a){let u;let p=[],g=0,m=0;for(let v=0;v<a.length;v++){let _=a[v];if(0===g){if(_===h&&(d||a.slice(v,v+f)===l)){p.push(a.slice(m,v)),m=v+f;continue}if("/"===_){u=v;continue}}"["===_?g++:"]"===_&&g--}let v=0===p.length?a:a.substring(m),_=v.startsWith("!"),T=_?v.substring(1):v,C=u&&u>m?u-m:void 0;return{modifiers:p,hasImportantModifier:_,baseClassName:T,maybePostfixModifierPosition:C}}return u?function(a){return u({className:a,parseClassName})}:parseClassName}(p),...function(a){let l=function(a){var l;let{theme:u,prefix:d}=a,h={nextPart:new Map,validators:[]},f=(l=Object.entries(a.classGroups),d?l.map(([a,l])=>{let u=l.map(a=>"string"==typeof a?d+a:"object"==typeof a?Object.fromEntries(Object.entries(a).map(([a,l])=>[d+a,l])):a);return[a,u]}):l);return f.forEach(([a,l])=>{(function processClassesRecursively(a,l,u,d){a.forEach(a=>{if("string"==typeof a){let d=""===a?l:getPart(l,a);d.classGroupId=u;return}if("function"==typeof a){if(a.isThemeGetter){processClassesRecursively(a(d),l,u,d);return}l.validators.push({validator:a,classGroupId:u});return}Object.entries(a).forEach(([a,h])=>{processClassesRecursively(h,getPart(l,a),u,d)})})})(l,h,a,u)}),h}(a),{conflictingClassGroups:u,conflictingClassGroupModifiers:h}=a;return{getClassGroupId:function(a){let u=a.split("-");return""===u[0]&&1!==u.length&&u.shift(),function getGroupRecursive(a,l){if(0===a.length)return l.classGroupId;let u=a[0],d=l.nextPart.get(u),h=d?getGroupRecursive(a.slice(1),d):void 0;if(h)return h;if(0===l.validators.length)return;let f=a.join("-");return l.validators.find(({validator:a})=>a(f))?.classGroupId}(u,l)||function(a){if(d.test(a)){let l=d.exec(a)[1],u=l?.substring(0,l.indexOf(":"));if(u)return"arbitrary.."+u}}(a)},getConflictingClassGroupIds:function(a,l){let d=u[a]||[];return l&&h[a]?[...d,...h[a]]:d}}}(p)}).cache.get,f=l.cache.set,functionToCall=tailwindMerge,tailwindMerge(h)};function tailwindMerge(a){let d=u(a);if(d)return d;let p=function(a,l){let{parseClassName:u,getClassGroupId:d,getConflictingClassGroupIds:f}=l,p=new Set;return a.trim().split(h).map(a=>{let{modifiers:l,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=u(a),g=!!p,m=d(g?f.substring(0,p):f);if(!m){if(!g||!(m=d(f)))return{isTailwindClass:!1,originalClassName:a};g=!1}let v=(function(a){if(a.length<=1)return a;let l=[],u=[];return a.forEach(a=>{let d="["===a[0];d?(l.push(...u.sort(),a),u=[]):u.push(a)}),l.push(...u.sort()),l})(l).join(":");return{isTailwindClass:!0,modifierId:h?v+"!":v,classGroupId:m,originalClassName:a,hasPostfixModifier:g}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;let{modifierId:l,classGroupId:u,hasPostfixModifier:d}=a,h=l+u;return!p.has(h)&&(p.add(h),f(u,d).forEach(a=>p.add(l+a)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}(a,l);return f(a,p),p}return function(){return functionToCall(twJoin.apply(null,arguments))}}(function(){let a=fromTheme("colors"),l=fromTheme("spacing"),u=fromTheme("blur"),d=fromTheme("brightness"),h=fromTheme("borderColor"),f=fromTheme("borderRadius"),p=fromTheme("borderSpacing"),g=fromTheme("borderWidth"),m=fromTheme("contrast"),v=fromTheme("grayscale"),_=fromTheme("hueRotate"),T=fromTheme("invert"),C=fromTheme("gap"),R=fromTheme("gradientColorStops"),B=fromTheme("gradientColorStopPositions"),V=fromTheme("inset"),er=fromTheme("margin"),en=fromTheme("opacity"),ei=fromTheme("padding"),es=fromTheme("saturate"),eo=fromTheme("scale"),ea=fromTheme("sepia"),el=fromTheme("skew"),ec=fromTheme("space"),eu=fromTheme("translate"),getOverscroll=()=>["auto","contain","none"],getOverflow=()=>["auto","hidden","clip","visible","scroll"],getSpacingWithAutoAndArbitrary=()=>["auto",isArbitraryValue,l],getSpacingWithArbitrary=()=>[isArbitraryValue,l],getLengthWithEmptyAndArbitrary=()=>["",isLength,isArbitraryLength],getNumberWithAutoAndArbitrary=()=>["auto",isNumber,isArbitraryValue],getPositions=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],getLineStyles=()=>["solid","dashed","dotted","double","none"],getBlendModes=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],getAlign=()=>["start","end","center","between","around","evenly","stretch"],getZeroAndEmpty=()=>["","0",isArbitraryValue],getBreaks=()=>["auto","avoid","all","avoid-page","page","left","right","column"],getNumber=()=>[isNumber,isArbitraryNumber],getNumberAndArbitrary=()=>[isNumber,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:getNumber(),borderColor:[a],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:getSpacingWithArbitrary(),borderWidth:getLengthWithEmptyAndArbitrary(),contrast:getNumber(),grayscale:getZeroAndEmpty(),hueRotate:getNumberAndArbitrary(),invert:getZeroAndEmpty(),gap:getSpacingWithArbitrary(),gradientColorStops:[a],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:getSpacingWithAutoAndArbitrary(),margin:getSpacingWithAutoAndArbitrary(),opacity:getNumber(),padding:getSpacingWithArbitrary(),saturate:getNumber(),scale:getNumber(),sepia:getZeroAndEmpty(),skew:getNumberAndArbitrary(),space:getSpacingWithArbitrary(),translate:getSpacingWithArbitrary()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":getBreaks()}],"break-before":[{"break-before":getBreaks()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...getPositions(),isArbitraryValue]}],overflow:[{overflow:getOverflow()}],"overflow-x":[{"overflow-x":getOverflow()}],"overflow-y":[{"overflow-y":getOverflow()}],overscroll:[{overscroll:getOverscroll()}],"overscroll-x":[{"overscroll-x":getOverscroll()}],"overscroll-y":[{"overscroll-y":getOverscroll()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[V]}],"inset-x":[{"inset-x":[V]}],"inset-y":[{"inset-y":[V]}],start:[{start:[V]}],end:[{end:[V]}],top:[{top:[V]}],right:[{right:[V]}],bottom:[{bottom:[V]}],left:[{left:[V]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:getSpacingWithAutoAndArbitrary()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:getZeroAndEmpty()}],shrink:[{shrink:getZeroAndEmpty()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":getNumberWithAutoAndArbitrary()}],"col-end":[{"col-end":getNumberWithAutoAndArbitrary()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":getNumberWithAutoAndArbitrary()}],"row-end":[{"row-end":getNumberWithAutoAndArbitrary()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...getAlign()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...getAlign(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...getAlign(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[ei]}],px:[{px:[ei]}],py:[{py:[ei]}],ps:[{ps:[ei]}],pe:[{pe:[ei]}],pt:[{pt:[ei]}],pr:[{pr:[ei]}],pb:[{pb:[ei]}],pl:[{pl:[ei]}],m:[{m:[er]}],mx:[{mx:[er]}],my:[{my:[er]}],ms:[{ms:[er]}],me:[{me:[er]}],mt:[{mt:[er]}],mr:[{mr:[er]}],mb:[{mb:[er]}],ml:[{ml:[er]}],"space-x":[{"space-x":[ec]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ec]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,l]}],"min-w":[{"min-w":[isArbitraryValue,l,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,l,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,l,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[a]}],"placeholder-opacity":[{"placeholder-opacity":[en]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[a]}],"text-opacity":[{"text-opacity":[en]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...getLineStyles(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[a]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:getSpacingWithArbitrary()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[en]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...getPositions(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[a]}],"gradient-from-pos":[{from:[B]}],"gradient-via-pos":[{via:[B]}],"gradient-to-pos":[{to:[B]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[g]}],"border-w-x":[{"border-x":[g]}],"border-w-y":[{"border-y":[g]}],"border-w-s":[{"border-s":[g]}],"border-w-e":[{"border-e":[g]}],"border-w-t":[{"border-t":[g]}],"border-w-r":[{"border-r":[g]}],"border-w-b":[{"border-b":[g]}],"border-w-l":[{"border-l":[g]}],"border-opacity":[{"border-opacity":[en]}],"border-style":[{border:[...getLineStyles(),"hidden"]}],"divide-x":[{"divide-x":[g]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[g]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[en]}],"divide-style":[{divide:getLineStyles()}],"border-color":[{border:[h]}],"border-color-x":[{"border-x":[h]}],"border-color-y":[{"border-y":[h]}],"border-color-t":[{"border-t":[h]}],"border-color-r":[{"border-r":[h]}],"border-color-b":[{"border-b":[h]}],"border-color-l":[{"border-l":[h]}],"divide-color":[{divide:[h]}],"outline-style":[{outline:["",...getLineStyles()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[a]}],"ring-w":[{ring:getLengthWithEmptyAndArbitrary()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[a]}],"ring-opacity":[{"ring-opacity":[en]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[a]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[en]}],"mix-blend":[{"mix-blend":[...getBlendModes(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":getBlendModes()}],filter:[{filter:["","none"]}],blur:[{blur:[u]}],brightness:[{brightness:[d]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[_]}],invert:[{invert:[T]}],saturate:[{saturate:[es]}],sepia:[{sepia:[ea]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[u]}],"backdrop-brightness":[{"backdrop-brightness":[d]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_]}],"backdrop-invert":[{"backdrop-invert":[T]}],"backdrop-opacity":[{"backdrop-opacity":[en]}],"backdrop-saturate":[{"backdrop-saturate":[es]}],"backdrop-sepia":[{"backdrop-sepia":[ea]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:getNumberAndArbitrary()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:getNumberAndArbitrary()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[eo]}],"scale-x":[{"scale-x":[eo]}],"scale-y":[{"scale-y":[eo]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[eu]}],"translate-y":[{"translate-y":[eu]}],"skew-x":[{"skew-x":[el]}],"skew-y":[{"skew-y":[el]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",a]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[a]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":getSpacingWithArbitrary()}],"scroll-mx":[{"scroll-mx":getSpacingWithArbitrary()}],"scroll-my":[{"scroll-my":getSpacingWithArbitrary()}],"scroll-ms":[{"scroll-ms":getSpacingWithArbitrary()}],"scroll-me":[{"scroll-me":getSpacingWithArbitrary()}],"scroll-mt":[{"scroll-mt":getSpacingWithArbitrary()}],"scroll-mr":[{"scroll-mr":getSpacingWithArbitrary()}],"scroll-mb":[{"scroll-mb":getSpacingWithArbitrary()}],"scroll-ml":[{"scroll-ml":getSpacingWithArbitrary()}],"scroll-p":[{"scroll-p":getSpacingWithArbitrary()}],"scroll-px":[{"scroll-px":getSpacingWithArbitrary()}],"scroll-py":[{"scroll-py":getSpacingWithArbitrary()}],"scroll-ps":[{"scroll-ps":getSpacingWithArbitrary()}],"scroll-pe":[{"scroll-pe":getSpacingWithArbitrary()}],"scroll-pt":[{"scroll-pt":getSpacingWithArbitrary()}],"scroll-pr":[{"scroll-pr":getSpacingWithArbitrary()}],"scroll-pb":[{"scroll-pb":getSpacingWithArbitrary()}],"scroll-pl":[{"scroll-pl":getSpacingWithArbitrary()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[a,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[a,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}})}},function(a){var __webpack_exec__=function(l){return a(a.s=l)};a.O(0,[49774,40179],function(){return __webpack_exec__(429670),__webpack_exec__(86570),__webpack_exec__(665123)}),_N_E=a.O()}]);