@syntrologie/runtime-sdk 2.8.0-canary.75 → 2.8.0-canary.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-UGLDB3MI.js → chunk-WZKMWY32.js} +2 -2
- package/dist/{chunk-UGLDB3MI.js.map → chunk-WZKMWY32.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/dist/smart-canvas.esm.js +4 -4
- package/dist/smart-canvas.esm.js.map +1 -1
- package/dist/smart-canvas.js +2 -2
- package/dist/smart-canvas.js.map +1 -1
- package/dist/smart-canvas.min.js +4 -4
- package/dist/smart-canvas.min.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/smart-canvas.min.js
CHANGED
|
@@ -6,7 +6,7 @@ var SyntrologieSDK=(()=>{var u2=Object.create;var Ll=Object.defineProperty;var c
|
|
|
6
6
|
`+l[r].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=r&&0<=n);break}}}finally{Jm=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Io(a):""}function z2(t,e){switch(t.tag){case 26:case 27:case 5:return Io(t.type);case 16:return Io("Lazy");case 13:return t.child!==e&&e!==null?Io("Suspense Fallback"):Io("Suspense");case 19:return Io("SuspenseList");case 0:case 15:return eg(t.type,!1);case 11:return eg(t.type.render,!1);case 1:return eg(t.type,!0);case 31:return Io("Activity");default:return""}}function M_(t){try{var e="",a=null;do e+=z2(t,a),a=t,t=t.return;while(t);return e}catch(r){return`
|
|
7
7
|
Error generating stack: `+r.message+`
|
|
8
8
|
`+r.stack}}var Fg=Object.prototype.hasOwnProperty,Av=mt.unstable_scheduleCallback,tg=mt.unstable_cancelCallback,q2=mt.unstable_shouldYield,V2=mt.unstable_requestPaint,ha=mt.unstable_now,$2=mt.unstable_getCurrentPriorityLevel,sw=mt.unstable_ImmediatePriority,lw=mt.unstable_UserBlockingPriority,Wd=mt.unstable_NormalPriority,j2=mt.unstable_LowPriority,uw=mt.unstable_IdlePriority,G2=mt.log,W2=mt.unstable_setDisableYieldValue,vu=null,ma=null;function Dn(t){if(typeof G2=="function"&&W2(t),ma&&typeof ma.setStrictMode=="function")try{ma.setStrictMode(vu,t)}catch{}}var ga=Math.clz32?Math.clz32:K2,Z2=Math.log,X2=Math.LN2;function K2(t){return t>>>=0,t===0?32:31-(Z2(t)/X2|0)|0}var fd=256,pd=262144,hd=4194304;function Ao(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function bf(t,e,a){var r=t.pendingLanes;if(r===0)return 0;var n=0,o=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var s=r&134217727;return s!==0?(r=s&~o,r!==0?n=Ao(r):(i&=s,i!==0?n=Ao(i):a||(a=s&~t,a!==0&&(n=Ao(a))))):(s=r&~o,s!==0?n=Ao(s):i!==0?n=Ao(i):a||(a=r&~t,a!==0&&(n=Ao(a)))),n===0?0:e!==0&&e!==n&&(e&o)===0&&(o=n&-n,a=e&-e,o>=a||o===32&&(a&4194048)!==0)?e:n}function yu(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Y2(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cw(){var t=hd;return hd<<=1,(hd&62914560)===0&&(hd=4194304),t}function ag(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function xu(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Q2(t,e,a,r,n,o){var i=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var s=t.entanglements,l=t.expirationTimes,u=t.hiddenUpdates;for(a=i&~a;0<a;){var c=31-ga(a),d=1<<c;s[c]=0,l[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}a&=~d}r!==0&&dw(t,r,0),o!==0&&n===0&&t.tag!==0&&(t.suspendedLanes|=o&~(i&~e))}function dw(t,e,a){t.pendingLanes|=e,t.suspendedLanes&=~e;var r=31-ga(e);t.entangledLanes|=e,t.entanglements[r]=t.entanglements[r]|1073741824|a&261930}function fw(t,e){var a=t.entangledLanes|=e;for(t=t.entanglements;a;){var r=31-ga(a),n=1<<r;n&e|t[r]&e&&(t[r]|=e),a&=~n}}function pw(t,e){var a=e&-e;return a=(a&42)!==0?1:Ev(a),(a&(t.suspendedLanes|e))!==0?0:a}function Ev(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Tv(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function hw(){var t=_e.p;return t!==0?t:(t=window.event,t===void 0?32:Nk(t.type))}function O_(t,e){var a=_e.p;try{return _e.p=t,e()}finally{_e.p=a}}var Qn=Math.random().toString(36).slice(2),kt="__reactFiber$"+Qn,ta="__reactProps$"+Qn,hs="__reactContainer$"+Qn,Hg="__reactEvents$"+Qn,J2="__reactListeners$"+Qn,eM="__reactHandles$"+Qn,D_="__reactResources$"+Qn,bu="__reactMarker$"+Qn;function Rv(t){delete t[kt],delete t[ta],delete t[Hg],delete t[J2],delete t[eM]}function Ui(t){var e=t[kt];if(e)return e;for(var a=t.parentNode;a;){if(e=a[hs]||a[kt]){if(a=e.alternate,e.child!==null||a!==null&&a.child!==null)for(t=qC(t);t!==null;){if(a=t[kt])return a;t=qC(t)}return e}t=a,a=t.parentNode}return null}function ms(t){if(t=t[kt]||t[hs]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ul(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(D(33))}function Ki(t){var e=t[D_];return e||(e=t[D_]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function bt(t){t[bu]=!0}var mw=new Set,gw={};function zo(t,e){ns(t,e),ns(t+"Capture",e)}function ns(t,e){for(gw[t]=e,t=0;t<e.length;t++)mw.add(e[t])}var tM=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),B_={},P_={};function aM(t){return Fg.call(P_,t)?!0:Fg.call(B_,t)?!1:tM.test(t)?P_[t]=!0:(B_[t]=!0,!1)}function Ed(t,e,a){if(aM(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var r=e.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function md(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function Mr(t,e,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+r)}}function Ta(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function vw(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function rM(t,e,a){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){a=""+i,o.call(this,i)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ug(t){if(!t._valueTracker){var e=vw(t)?"checked":"value";t._valueTracker=rM(t,e,""+t[e])}}function yw(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),r="";return t&&(r=vw(t)?t.checked?"true":"false":t.value),t=r,t!==a?(e.setValue(t),!0):!1}function Zd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var nM=/[\n"\\]/g;function Oa(t){return t.replace(nM,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function zg(t,e,a,r,n,o,i,s){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ta(e)):t.value!==""+Ta(e)&&(t.value=""+Ta(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?qg(t,i,Ta(e)):a!=null?qg(t,i,Ta(a)):r!=null&&t.removeAttribute("value"),n==null&&o!=null&&(t.defaultChecked=!!o),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.name=""+Ta(s):t.removeAttribute("name")}function xw(t,e,a,r,n,o,i,s){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.type=o),e!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||e!=null)){Ug(t);return}a=a!=null?""+Ta(a):"",e=e!=null?""+Ta(e):a,s||e===t.value||(t.value=e),t.defaultValue=e}r=r??n,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=s?t.checked:!!r,t.defaultChecked=!!r,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ug(t)}function qg(t,e,a){e==="number"&&Zd(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Yi(t,e,a,r){if(t=t.options,e){e={};for(var n=0;n<a.length;n++)e["$"+a[n]]=!0;for(a=0;a<t.length;a++)n=e.hasOwnProperty("$"+t[a].value),t[a].selected!==n&&(t[a].selected=n),n&&r&&(t[a].defaultSelected=!0)}else{for(a=""+Ta(a),e=null,n=0;n<t.length;n++){if(t[n].value===a){t[n].selected=!0,r&&(t[n].defaultSelected=!0);return}e!==null||t[n].disabled||(e=t[n])}e!==null&&(e.selected=!0)}}function bw(t,e,a){if(e!=null&&(e=""+Ta(e),e!==t.value&&(t.value=e),a==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=a!=null?""+Ta(a):""}function Sw(t,e,a,r){if(e==null){if(r!=null){if(a!=null)throw Error(D(92));if(Hl(r)){if(1<r.length)throw Error(D(93));r=r[0]}a=r}a==null&&(a=""),e=a}a=Ta(e),t.defaultValue=a,r=t.textContent,r===a&&r!==""&&r!==null&&(t.value=r),Ug(t)}function os(t,e){if(e){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=e;return}}t.textContent=e}var oM=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function N_(t,e,a){var r=e.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":r?t.setProperty(e,a):typeof a!="number"||a===0||oM.has(e)?e==="float"?t.cssFloat=a:t[e]=(""+a).trim():t[e]=a+"px"}function _w(t,e,a){if(e!=null&&typeof e!="object")throw Error(D(62));if(t=t.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||e!=null&&e.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var n in e)r=e[n],e.hasOwnProperty(n)&&a[n]!==r&&N_(t,n,r)}else for(var o in e)e.hasOwnProperty(o)&&N_(t,o,e[o])}function Mv(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var iM=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),sM=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Td(t){return sM.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ur(){}var Vg=null;function Ov(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var zi=null,Qi=null;function F_(t){var e=ms(t);if(e&&(t=e.stateNode)){var a=t[ta]||null;e:switch(t=e.stateNode,e.type){case"input":if(zg(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),e=a.name,a.type==="radio"&&e!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Oa(""+e)+'"][type="radio"]'),e=0;e<a.length;e++){var r=a[e];if(r!==t&&r.form===t.form){var n=r[ta]||null;if(!n)throw Error(D(90));zg(r,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<a.length;e++)r=a[e],r.form===t.form&&yw(r)}break e;case"textarea":bw(t,a.value,a.defaultValue);break e;case"select":e=a.value,e!=null&&Yi(t,!!a.multiple,e,!1)}}}var rg=!1;function Cw(t,e,a){if(rg)return t(e,a);rg=!0;try{var r=t(e);return r}finally{if(rg=!1,(zi!==null||Qi!==null)&&(Mf(),zi&&(e=zi,t=Qi,Qi=zi=null,F_(e),t)))for(e=0;e<t.length;e++)F_(t[e])}}function ru(t,e){var a=t.stateNode;if(a===null)return null;var r=a[ta]||null;if(r===null)return null;a=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(D(231,e,typeof a));return a}var jr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$g=!1;if(jr)try{Oi={},Object.defineProperty(Oi,"passive",{get:function(){$g=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{$g=!1}var Oi,Bn=null,Dv=null,Rd=null;function ww(){if(Rd)return Rd;var t,e=Dv,a=e.length,r,n="value"in Bn?Bn.value:Bn.textContent,o=n.length;for(t=0;t<a&&e[t]===n[t];t++);var i=a-t;for(r=1;r<=i&&e[a-r]===n[o-r];r++);return Rd=n.slice(t,1<r?1-r:void 0)}function Md(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function gd(){return!0}function H_(){return!1}function aa(t){function e(a,r,n,o,i){this._reactName=a,this._targetInst=n,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(a=t[s],this[s]=a?a(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?gd:H_,this.isPropagationStopped=H_,this}return Ue(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=gd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=gd)},persist:function(){},isPersistent:gd}),e}var qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sf=aa(qo),Su=Ue({},qo,{view:0,detail:0}),lM=aa(Su),ng,og,Ml,_f=Ue({},Su,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bv,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ml&&(Ml&&t.type==="mousemove"?(ng=t.screenX-Ml.screenX,og=t.screenY-Ml.screenY):og=ng=0,Ml=t),ng)},movementY:function(t){return"movementY"in t?t.movementY:og}}),U_=aa(_f),uM=Ue({},_f,{dataTransfer:0}),cM=aa(uM),dM=Ue({},Su,{relatedTarget:0}),ig=aa(dM),fM=Ue({},qo,{animationName:0,elapsedTime:0,pseudoElement:0}),pM=aa(fM),hM=Ue({},qo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mM=aa(hM),gM=Ue({},qo,{data:0}),z_=aa(gM),vM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bM(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=xM[t])?!!e[t]:!1}function Bv(){return bM}var SM=Ue({},Su,{key:function(t){if(t.key){var e=vM[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Md(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?yM[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bv,charCode:function(t){return t.type==="keypress"?Md(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Md(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_M=aa(SM),CM=Ue({},_f,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q_=aa(CM),wM=Ue({},Su,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bv}),LM=aa(wM),kM=Ue({},qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),IM=aa(kM),AM=Ue({},_f,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),EM=aa(AM),TM=Ue({},qo,{newState:0,oldState:0}),RM=aa(TM),MM=[9,13,27,32],Pv=jr&&"CompositionEvent"in window,Vl=null;jr&&"documentMode"in document&&(Vl=document.documentMode);var OM=jr&&"TextEvent"in window&&!Vl,Lw=jr&&(!Pv||Vl&&8<Vl&&11>=Vl),V_=" ",$_=!1;function kw(t,e){switch(t){case"keyup":return MM.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var qi=!1;function DM(t,e){switch(t){case"compositionend":return Iw(e);case"keypress":return e.which!==32?null:($_=!0,V_);case"textInput":return t=e.data,t===V_&&$_?null:t;default:return null}}function BM(t,e){if(qi)return t==="compositionend"||!Pv&&kw(t,e)?(t=ww(),Rd=Dv=Bn=null,qi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Lw&&e.locale!=="ko"?null:e.data;default:return null}}var PM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function j_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!PM[t.type]:e==="textarea"}function Aw(t,e,a,r){zi?Qi?Qi.push(r):Qi=[r]:zi=r,e=pf(e,"onChange"),0<e.length&&(a=new Sf("onChange","change",null,a,r),t.push({event:a,listeners:e}))}var $l=null,nu=null;function NM(t){Ck(t,0)}function Cf(t){var e=Ul(t);if(yw(e))return t}function G_(t,e){if(t==="change")return e}var Ew=!1;jr&&(jr?(yd="oninput"in document,yd||(sg=document.createElement("div"),sg.setAttribute("oninput","return;"),yd=typeof sg.oninput=="function"),vd=yd):vd=!1,Ew=vd&&(!document.documentMode||9<document.documentMode));var vd,yd,sg;function W_(){$l&&($l.detachEvent("onpropertychange",Tw),nu=$l=null)}function Tw(t){if(t.propertyName==="value"&&Cf(nu)){var e=[];Aw(e,nu,t,Ov(t)),Cw(NM,e)}}function FM(t,e,a){t==="focusin"?(W_(),$l=e,nu=a,$l.attachEvent("onpropertychange",Tw)):t==="focusout"&&W_()}function HM(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Cf(nu)}function UM(t,e){if(t==="click")return Cf(e)}function zM(t,e){if(t==="input"||t==="change")return Cf(e)}function qM(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ya=typeof Object.is=="function"?Object.is:qM;function ou(t,e){if(ya(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var a=Object.keys(t),r=Object.keys(e);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var n=a[r];if(!Fg.call(e,n)||!ya(t[n],e[n]))return!1}return!0}function Z_(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function X_(t,e){var a=Z_(t);t=0;for(var r;a;){if(a.nodeType===3){if(r=t+a.textContent.length,t<=e&&r>=e)return{node:a,offset:e-t};t=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Z_(a)}}function Rw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Rw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Mw(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Zd(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=Zd(t.document)}return e}function Nv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var VM=jr&&"documentMode"in document&&11>=document.documentMode,Vi=null,jg=null,jl=null,Gg=!1;function K_(t,e,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gg||Vi==null||Vi!==Zd(r)||(r=Vi,"selectionStart"in r&&Nv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jl&&ou(jl,r)||(jl=r,r=pf(jg,"onSelect"),0<r.length&&(e=new Sf("onSelect","select",null,e,a),t.push({event:e,listeners:r}),e.target=Vi)))}function ko(t,e){var a={};return a[t.toLowerCase()]=e.toLowerCase(),a["Webkit"+t]="webkit"+e,a["Moz"+t]="moz"+e,a}var $i={animationend:ko("Animation","AnimationEnd"),animationiteration:ko("Animation","AnimationIteration"),animationstart:ko("Animation","AnimationStart"),transitionrun:ko("Transition","TransitionRun"),transitionstart:ko("Transition","TransitionStart"),transitioncancel:ko("Transition","TransitionCancel"),transitionend:ko("Transition","TransitionEnd")},lg={},Ow={};jr&&(Ow=document.createElement("div").style,"AnimationEvent"in window||(delete $i.animationend.animation,delete $i.animationiteration.animation,delete $i.animationstart.animation),"TransitionEvent"in window||delete $i.transitionend.transition);function Vo(t){if(lg[t])return lg[t];if(!$i[t])return t;var e=$i[t],a;for(a in e)if(e.hasOwnProperty(a)&&a in Ow)return lg[t]=e[a];return t}var Dw=Vo("animationend"),Bw=Vo("animationiteration"),Pw=Vo("animationstart"),$M=Vo("transitionrun"),jM=Vo("transitionstart"),GM=Vo("transitioncancel"),Nw=Vo("transitionend"),Fw=new Map,Wg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Wg.push("scrollEnd");function Ka(t,e){Fw.set(t,e),zo(e,[t])}var Xd=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ea=[],ji=0,Fv=0;function wf(){for(var t=ji,e=Fv=ji=0;e<t;){var a=Ea[e];Ea[e++]=null;var r=Ea[e];Ea[e++]=null;var n=Ea[e];Ea[e++]=null;var o=Ea[e];if(Ea[e++]=null,r!==null&&n!==null){var i=r.pending;i===null?n.next=n:(n.next=i.next,i.next=n),r.pending=n}o!==0&&Hw(a,n,o)}}function Lf(t,e,a,r){Ea[ji++]=t,Ea[ji++]=e,Ea[ji++]=a,Ea[ji++]=r,Fv|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Hv(t,e,a,r){return Lf(t,e,a,r),Kd(t)}function $o(t,e){return Lf(t,null,null,e),Kd(t)}function Hw(t,e,a){t.lanes|=a;var r=t.alternate;r!==null&&(r.lanes|=a);for(var n=!1,o=t.return;o!==null;)o.childLanes|=a,r=o.alternate,r!==null&&(r.childLanes|=a),o.tag===22&&(t=o.stateNode,t===null||t._visibility&1||(n=!0)),t=o,o=o.return;return t.tag===3?(o=t.stateNode,n&&e!==null&&(n=31-ga(a),t=o.hiddenUpdates,r=t[n],r===null?t[n]=[e]:r.push(e),e.lane=a|536870912),o):null}function Kd(t){if(50<eu)throw eu=0,hv=null,Error(D(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Gi={};function WM(t,e,a,r){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fa(t,e,a,r){return new WM(t,e,a,r)}function Uv(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qr(t,e){var a=t.alternate;return a===null?(a=fa(t.tag,e,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=e,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,e=t.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Uw(t,e){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,e=a.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Od(t,e,a,r,n,o){var i=0;if(r=t,typeof t=="function")Uv(t)&&(i=1);else if(typeof t=="string")i=KO(t,a,yr.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Dg:return t=fa(31,a,e,n),t.elementType=Dg,t.lanes=o,t;case Fi:return Mo(a.children,n,o,e);case ow:i=8,n|=24;break;case Rg:return t=fa(12,a,e,n|2),t.elementType=Rg,t.lanes=o,t;case Mg:return t=fa(13,a,e,n),t.elementType=Mg,t.lanes=o,t;case Og:return t=fa(19,a,e,n),t.elementType=Og,t.lanes=o,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Hr:i=10;break e;case iw:i=9;break e;case kv:i=11;break e;case Iv:i=14;break e;case An:i=16,r=null;break e}i=29,a=Error(D(130,t===null?"null":typeof t,"")),r=null}return e=fa(i,a,e,n),e.elementType=t,e.type=r,e.lanes=o,e}function Mo(t,e,a,r){return t=fa(7,t,r,e),t.lanes=a,t}function ug(t,e,a){return t=fa(6,t,null,e),t.lanes=a,t}function zw(t){var e=fa(18,null,null,0);return e.stateNode=t,e}function cg(t,e,a){return e=fa(4,t.children!==null?t.children:[],t.key,e),e.lanes=a,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Y_=new WeakMap;function Da(t,e){if(typeof t=="object"&&t!==null){var a=Y_.get(t);return a!==void 0?a:(e={value:t,source:e,stack:M_(e)},Y_.set(t,e),e)}return{value:t,source:e,stack:M_(e)}}var Wi=[],Zi=0,Yd=null,iu=0,Ra=[],Ma=0,Zn=null,mr=1,gr="";function Nr(t,e){Wi[Zi++]=iu,Wi[Zi++]=Yd,Yd=t,iu=e}function qw(t,e,a){Ra[Ma++]=mr,Ra[Ma++]=gr,Ra[Ma++]=Zn,Zn=t;var r=mr;t=gr;var n=32-ga(r)-1;r&=~(1<<n),a+=1;var o=32-ga(e)+n;if(30<o){var i=n-n%5;o=(r&(1<<i)-1).toString(32),r>>=i,n-=i,mr=1<<32-ga(e)+n|a<<n|r,gr=o+t}else mr=1<<o|a<<n|r,gr=t}function zv(t){t.return!==null&&(Nr(t,1),qw(t,1,0))}function qv(t){for(;t===Yd;)Yd=Wi[--Zi],Wi[Zi]=null,iu=Wi[--Zi],Wi[Zi]=null;for(;t===Zn;)Zn=Ra[--Ma],Ra[Ma]=null,gr=Ra[--Ma],Ra[Ma]=null,mr=Ra[--Ma],Ra[Ma]=null}function Vw(t,e){Ra[Ma++]=mr,Ra[Ma++]=gr,Ra[Ma++]=Zn,mr=e.id,gr=e.overflow,Zn=t}var It=null,He=null,ve=!1,Un=null,Ba=!1,Zg=Error(D(519));function Xn(t){var e=Error(D(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw su(Da(e,t)),Zg}function Q_(t){var e=t.stateNode,a=t.type,r=t.memoizedProps;switch(e[kt]=t,e[ta]=r,a){case"dialog":de("cancel",e),de("close",e);break;case"iframe":case"object":case"embed":de("load",e);break;case"video":case"audio":for(a=0;a<du.length;a++)de(du[a],e);break;case"source":de("error",e);break;case"img":case"image":case"link":de("error",e),de("load",e);break;case"details":de("toggle",e);break;case"input":de("invalid",e),xw(e,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":de("invalid",e);break;case"textarea":de("invalid",e),Sw(e,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||e.textContent===""+a||r.suppressHydrationWarning===!0||Lk(e.textContent,a)?(r.popover!=null&&(de("beforetoggle",e),de("toggle",e)),r.onScroll!=null&&de("scroll",e),r.onScrollEnd!=null&&de("scrollend",e),r.onClick!=null&&(e.onclick=Ur),e=!0):e=!1,e||Xn(t,!0)}function J_(t){for(It=t.return;It;)switch(It.tag){case 5:case 31:case 13:Ba=!1;return;case 27:case 3:Ba=!0;return;default:It=It.return}}function Di(t){if(t!==It)return!1;if(!ve)return J_(t),ve=!0,!1;var e=t.tag,a;if((a=e!==3&&e!==27)&&((a=e===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||xv(t.type,t.memoizedProps)),a=!a),a&&He&&Xn(t),J_(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(D(317));He=zC(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(D(317));He=zC(t)}else e===27?(e=He,Jn(t.type)?(t=Cv,Cv=null,He=t):He=e):He=It?Na(t.stateNode.nextSibling):null;return!0}function Po(){He=It=null,ve=!1}function dg(){var t=Un;return t!==null&&(Jt===null?Jt=t:Jt.push.apply(Jt,t),Un=null),t}function su(t){Un===null?Un=[t]:Un.push(t)}var Xg=xr(null),jo=null,zr=null;function Tn(t,e,a){De(Xg,e._currentValue),e._currentValue=a}function Vr(t){t._currentValue=Xg.current,St(Xg)}function Kg(t,e,a){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===a)break;t=t.return}}function Yg(t,e,a,r){var n=t.child;for(n!==null&&(n.return=t);n!==null;){var o=n.dependencies;if(o!==null){var i=n.child;o=o.firstContext;e:for(;o!==null;){var s=o;o=n;for(var l=0;l<e.length;l++)if(s.context===e[l]){o.lanes|=a,s=o.alternate,s!==null&&(s.lanes|=a),Kg(o.return,a,t),r||(i=null);break e}o=s.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(D(341));i.lanes|=a,o=i.alternate,o!==null&&(o.lanes|=a),Kg(i,a,t),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===t){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function gs(t,e,a,r){t=null;for(var n=e,o=!1;n!==null;){if(!o){if((n.flags&524288)!==0)o=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(D(387));if(i=i.memoizedProps,i!==null){var s=n.type;ya(n.pendingProps.value,i.value)||(t!==null?t.push(s):t=[s])}}else if(n===$d.current){if(i=n.alternate,i===null)throw Error(D(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(t!==null?t.push(pu):t=[pu])}n=n.return}t!==null&&Yg(e,t,a,r),e.flags|=262144}function Qd(t){for(t=t.firstContext;t!==null;){if(!ya(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function No(t){jo=t,zr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function At(t){return $w(jo,t)}function xd(t,e){return jo===null&&No(t),$w(t,e)}function $w(t,e){var a=e._currentValue;if(e={context:e,memoizedValue:a,next:null},zr===null){if(t===null)throw Error(D(308));zr=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else zr=zr.next=e;return a}var ZM=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,r){t.push(r)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},XM=mt.unstable_scheduleCallback,KM=mt.unstable_NormalPriority,ut={$$typeof:Hr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vv(){return{controller:new ZM,data:new Map,refCount:0}}function _u(t){t.refCount--,t.refCount===0&&XM(KM,function(){t.controller.abort()})}var Gl=null,Qg=0,is=0,Ji=null;function YM(t,e){if(Gl===null){var a=Gl=[];Qg=0,is=hy(),Ji={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Qg++,e.then(eC,eC),e}function eC(){if(--Qg===0&&Gl!==null){Ji!==null&&(Ji.status="fulfilled");var t=Gl;Gl=null,is=0,Ji=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function QM(t,e){var a=[],r={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return t.then(function(){r.status="fulfilled",r.value=e;for(var n=0;n<a.length;n++)(0,a[n])(e)},function(n){for(r.status="rejected",r.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),r}var tC=ae.S;ae.S=function(t,e){nk=ha(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&YM(t,e),tC!==null&&tC(t,e)};var Oo=xr(null);function $v(){var t=Oo.current;return t!==null?t:Te.pooledCache}function Dd(t,e){e===null?De(Oo,Oo.current):De(Oo,e.pool)}function jw(){var t=$v();return t===null?null:{parent:ut._currentValue,pool:t}}var vs=Error(D(460)),jv=Error(D(474)),kf=Error(D(542)),Jd={then:function(){}};function aC(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Gw(t,e,a){switch(a=t[a],a===void 0?t.push(e):a!==e&&(e.then(Ur,Ur),e=a),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,nC(t),t;default:if(typeof e.status=="string")e.then(Ur,Ur);else{if(t=Te,t!==null&&100<t.shellSuspendCounter)throw Error(D(482));t=e,t.status="pending",t.then(function(r){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=r}},function(r){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=r}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,nC(t),t}throw Do=e,vs}}function Eo(t){try{var e=t._init;return e(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Do=a,vs):a}}var Do=null;function rC(){if(Do===null)throw Error(D(459));var t=Do;return Do=null,t}function nC(t){if(t===vs||t===kf)throw Error(D(483))}var es=null,lu=0;function bd(t){var e=lu;return lu+=1,es===null&&(es=[]),Gw(es,t,e)}function Ol(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Sd(t,e){throw e.$$typeof===F2?Error(D(525)):(t=Object.prototype.toString.call(e),Error(D(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Ww(t){function e(g,m){if(t){var y=g.deletions;y===null?(g.deletions=[m],g.flags|=16):y.push(m)}}function a(g,m){if(!t)return null;for(;m!==null;)e(g,m),m=m.sibling;return null}function r(g){for(var m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function n(g,m){return g=qr(g,m),g.index=0,g.sibling=null,g}function o(g,m,y){return g.index=y,t?(y=g.alternate,y!==null?(y=y.index,y<m?(g.flags|=67108866,m):y):(g.flags|=67108866,m)):(g.flags|=1048576,m)}function i(g){return t&&g.alternate===null&&(g.flags|=67108866),g}function s(g,m,y,v){return m===null||m.tag!==6?(m=ug(y,g.mode,v),m.return=g,m):(m=n(m,y),m.return=g,m)}function l(g,m,y,v){var C=y.type;return C===Fi?c(g,m,y.props.children,v,y.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===An&&Eo(C)===m.type)?(m=n(m,y.props),Ol(m,y),m.return=g,m):(m=Od(y.type,y.key,y.props,null,g.mode,v),Ol(m,y),m.return=g,m)}function u(g,m,y,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==y.containerInfo||m.stateNode.implementation!==y.implementation?(m=cg(y,g.mode,v),m.return=g,m):(m=n(m,y.children||[]),m.return=g,m)}function c(g,m,y,v,C){return m===null||m.tag!==7?(m=Mo(y,g.mode,v,C),m.return=g,m):(m=n(m,y),m.return=g,m)}function d(g,m,y){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=ug(""+m,g.mode,y),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case dd:return y=Od(m.type,m.key,m.props,null,g.mode,y),Ol(y,m),y.return=g,y;case Fl:return m=cg(m,g.mode,y),m.return=g,m;case An:return m=Eo(m),d(g,m,y)}if(Hl(m)||Rl(m))return m=Mo(m,g.mode,y,null),m.return=g,m;if(typeof m.then=="function")return d(g,bd(m),y);if(m.$$typeof===Hr)return d(g,xd(g,m),y);Sd(g,m)}return null}function f(g,m,y,v){var C=m!==null?m.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return C!==null?null:s(g,m,""+y,v);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case dd:return y.key===C?l(g,m,y,v):null;case Fl:return y.key===C?u(g,m,y,v):null;case An:return y=Eo(y),f(g,m,y,v)}if(Hl(y)||Rl(y))return C!==null?null:c(g,m,y,v,null);if(typeof y.then=="function")return f(g,m,bd(y),v);if(y.$$typeof===Hr)return f(g,m,xd(g,y),v);Sd(g,y)}return null}function h(g,m,y,v,C){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return g=g.get(y)||null,s(m,g,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case dd:return g=g.get(v.key===null?y:v.key)||null,l(m,g,v,C);case Fl:return g=g.get(v.key===null?y:v.key)||null,u(m,g,v,C);case An:return v=Eo(v),h(g,m,y,v,C)}if(Hl(v)||Rl(v))return g=g.get(y)||null,c(m,g,v,C,null);if(typeof v.then=="function")return h(g,m,y,bd(v),C);if(v.$$typeof===Hr)return h(g,m,y,xd(m,v),C);Sd(m,v)}return null}function S(g,m,y,v){for(var C=null,w=null,_=m,L=m=0,A=null;_!==null&&L<y.length;L++){_.index>L?(A=_,_=null):A=_.sibling;var I=f(g,_,y[L],v);if(I===null){_===null&&(_=A);break}t&&_&&I.alternate===null&&e(g,_),m=o(I,m,L),w===null?C=I:w.sibling=I,w=I,_=A}if(L===y.length)return a(g,_),ve&&Nr(g,L),C;if(_===null){for(;L<y.length;L++)_=d(g,y[L],v),_!==null&&(m=o(_,m,L),w===null?C=_:w.sibling=_,w=_);return ve&&Nr(g,L),C}for(_=r(_);L<y.length;L++)A=h(_,g,L,y[L],v),A!==null&&(t&&A.alternate!==null&&_.delete(A.key===null?L:A.key),m=o(A,m,L),w===null?C=A:w.sibling=A,w=A);return t&&_.forEach(function(O){return e(g,O)}),ve&&Nr(g,L),C}function x(g,m,y,v){if(y==null)throw Error(D(151));for(var C=null,w=null,_=m,L=m=0,A=null,I=y.next();_!==null&&!I.done;L++,I=y.next()){_.index>L?(A=_,_=null):A=_.sibling;var O=f(g,_,I.value,v);if(O===null){_===null&&(_=A);break}t&&_&&O.alternate===null&&e(g,_),m=o(O,m,L),w===null?C=O:w.sibling=O,w=O,_=A}if(I.done)return a(g,_),ve&&Nr(g,L),C;if(_===null){for(;!I.done;L++,I=y.next())I=d(g,I.value,v),I!==null&&(m=o(I,m,L),w===null?C=I:w.sibling=I,w=I);return ve&&Nr(g,L),C}for(_=r(_);!I.done;L++,I=y.next())I=h(_,g,L,I.value,v),I!==null&&(t&&I.alternate!==null&&_.delete(I.key===null?L:I.key),m=o(I,m,L),w===null?C=I:w.sibling=I,w=I);return t&&_.forEach(function(H){return e(g,H)}),ve&&Nr(g,L),C}function b(g,m,y,v){if(typeof y=="object"&&y!==null&&y.type===Fi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case dd:e:{for(var C=y.key;m!==null;){if(m.key===C){if(C=y.type,C===Fi){if(m.tag===7){a(g,m.sibling),v=n(m,y.props.children),v.return=g,g=v;break e}}else if(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===An&&Eo(C)===m.type){a(g,m.sibling),v=n(m,y.props),Ol(v,y),v.return=g,g=v;break e}a(g,m);break}else e(g,m);m=m.sibling}y.type===Fi?(v=Mo(y.props.children,g.mode,v,y.key),v.return=g,g=v):(v=Od(y.type,y.key,y.props,null,g.mode,v),Ol(v,y),v.return=g,g=v)}return i(g);case Fl:e:{for(C=y.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){a(g,m.sibling),v=n(m,y.children||[]),v.return=g,g=v;break e}else{a(g,m);break}else e(g,m);m=m.sibling}v=cg(y,g.mode,v),v.return=g,g=v}return i(g);case An:return y=Eo(y),b(g,m,y,v)}if(Hl(y))return S(g,m,y,v);if(Rl(y)){if(C=Rl(y),typeof C!="function")throw Error(D(150));return y=C.call(y),x(g,m,y,v)}if(typeof y.then=="function")return b(g,m,bd(y),v);if(y.$$typeof===Hr)return b(g,m,xd(g,y),v);Sd(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,m!==null&&m.tag===6?(a(g,m.sibling),v=n(m,y),v.return=g,g=v):(a(g,m),v=ug(y,g.mode,v),v.return=g,g=v),i(g)):a(g,m)}return function(g,m,y,v){try{lu=0;var C=b(g,m,y,v);return es=null,C}catch(_){if(_===vs||_===kf)throw _;var w=fa(29,_,null,g.mode);return w.lanes=v,w.return=g,w}}}var Fo=Ww(!0),Zw=Ww(!1),En=!1;function Gv(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jg(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function zn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function qn(t,e,a){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Se&2)!==0){var n=r.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),r.pending=e,e=Kd(t),Hw(t,null,a),e}return Lf(t,r,e,a),Kd(t)}function Wl(t,e,a){if(e=e.updateQueue,e!==null&&(e=e.shared,(a&4194048)!==0)){var r=e.lanes;r&=t.pendingLanes,a|=r,e.lanes=a,fw(t,a)}}function fg(t,e){var a=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var n=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var i={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?n=o=i:o=o.next=i,a=a.next}while(a!==null);o===null?n=o=e:o=o.next=e}else n=o=e;a={baseState:r.baseState,firstBaseUpdate:n,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=e:t.next=e,a.lastBaseUpdate=e}var ev=!1;function Zl(){if(ev){var t=Ji;if(t!==null)throw t}}function Xl(t,e,a,r){ev=!1;var n=t.updateQueue;En=!1;var o=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=n.baseState;i=0,c=u=l=null,s=o;do{var f=s.lane&-536870913,h=f!==s.lane;if(h?(me&f)===f:(r&f)===f){f!==0&&f===is&&(ev=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var S=t,x=s;f=e;var b=a;switch(x.tag){case 1:if(S=x.payload,typeof S=="function"){d=S.call(b,d,f);break e}d=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=x.payload,f=typeof S=="function"?S.call(b,d,f):S,f==null)break e;d=Ue({},d,f);break e;case 2:En=!0}}f=s.callback,f!==null&&(t.flags|=64,h&&(t.flags|=8192),h=n.callbacks,h===null?n.callbacks=[f]:h.push(f))}else h={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;h=s,s=h.next,h.next=null,n.lastBaseUpdate=h,n.shared.pending=null}}while(!0);c===null&&(l=d),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,o===null&&(n.shared.lanes=0),Yn|=i,t.lanes=i,t.memoizedState=d}}function Xw(t,e){if(typeof t!="function")throw Error(D(191,t));t.call(e)}function Kw(t,e){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Xw(a[t],e)}var ss=xr(null),ef=xr(0);function oC(t,e){t=Xr,De(ef,t),De(ss,e),Xr=t|e.baseLanes}function tv(){De(ef,Xr),De(ss,ss.current)}function Wv(){Xr=ef.current,St(ss),St(ef)}var xa=xr(null),Pa=null;function Rn(t){var e=t.alternate;De(at,at.current&1),De(xa,t),Pa===null&&(e===null||ss.current!==null||e.memoizedState!==null)&&(Pa=t)}function av(t){De(at,at.current),De(xa,t),Pa===null&&(Pa=t)}function Yw(t){t.tag===22?(De(at,at.current),De(xa,t),Pa===null&&(Pa=t)):Mn(t)}function Mn(){De(at,at.current),De(xa,xa.current)}function da(t){St(xa),Pa===t&&(Pa=null),St(at)}var at=xr(0);function tf(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Sv(a)||_v(a)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Gr=0,ie=null,Ie=null,st=null,af=!1,ts=!1,Ho=!1,rf=0,uu=0,as=null,JM=0;function Qe(){throw Error(D(321))}function Zv(t,e){if(e===null)return!1;for(var a=0;a<e.length&&a<t.length;a++)if(!ya(t[a],e[a]))return!1;return!0}function Xv(t,e,a,r,n,o){return Gr=o,ie=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ae.H=t===null||t.memoizedState===null?AL:iy,Ho=!1,o=a(r,n),Ho=!1,ts&&(o=Jw(e,a,r,n)),Qw(t),o}function Qw(t){ae.H=cu;var e=Ie!==null&&Ie.next!==null;if(Gr=0,st=Ie=ie=null,af=!1,uu=0,as=null,e)throw Error(D(300));t===null||ct||(t=t.dependencies,t!==null&&Qd(t)&&(ct=!0))}function Jw(t,e,a,r){ie=t;var n=0;do{if(ts&&(as=null),uu=0,ts=!1,25<=n)throw Error(D(301));if(n+=1,st=Ie=null,t.updateQueue!=null){var o=t.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ae.H=EL,o=e(a,r)}while(ts);return o}function eO(){var t=ae.H,e=t.useState()[0];return e=typeof e.then=="function"?Cu(e):e,t=t.useState()[0],(Ie!==null?Ie.memoizedState:null)!==t&&(ie.flags|=1024),e}function Kv(){var t=rf!==0;return rf=0,t}function Yv(t,e,a){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~a}function Qv(t){if(af){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}af=!1}Gr=0,st=Ie=ie=null,ts=!1,uu=rf=0,as=null}function qt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ie.memoizedState=st=t:st=st.next=t,st}function rt(){if(Ie===null){var t=ie.alternate;t=t!==null?t.memoizedState:null}else t=Ie.next;var e=st===null?ie.memoizedState:st.next;if(e!==null)st=e,Ie=t;else{if(t===null)throw ie.alternate===null?Error(D(467)):Error(D(310));Ie=t,t={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},st===null?ie.memoizedState=st=t:st=st.next=t}return st}function If(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cu(t){var e=uu;return uu+=1,as===null&&(as=[]),t=Gw(as,t,e),e=ie,(st===null?e.memoizedState:st.next)===null&&(e=e.alternate,ae.H=e===null||e.memoizedState===null?AL:iy),t}function Af(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Cu(t);if(t.$$typeof===Hr)return At(t)}throw Error(D(438,String(t)))}function Jv(t){var e=null,a=ie.updateQueue;if(a!==null&&(e=a.memoCache),e==null){var r=ie.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(e={data:r.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),a===null&&(a=If(),ie.updateQueue=a),a.memoCache=e,a=e.data[e.index],a===void 0)for(a=e.data[e.index]=Array(t),r=0;r<t;r++)a[r]=H2;return e.index++,a}function Wr(t,e){return typeof e=="function"?e(t):e}function Bd(t){var e=rt();return ey(e,Ie,t)}function ey(t,e,a){var r=t.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=a;var n=t.baseQueue,o=r.pending;if(o!==null){if(n!==null){var i=n.next;n.next=o.next,o.next=i}e.baseQueue=n=o,r.pending=null}if(o=t.baseState,n===null)t.memoizedState=o;else{e=n.next;var s=i=null,l=null,u=e,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(me&d)===d:(Gr&d)===d){var f=u.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===is&&(c=!0);else if((Gr&f)===f){u=u.next,f===is&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,i=o):l=l.next=d,ie.lanes|=f,Yn|=f;d=u.action,Ho&&a(o,d),o=u.hasEagerState?u.eagerState:a(o,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=f,i=o):l=l.next=f,ie.lanes|=d,Yn|=d;u=u.next}while(u!==null&&u!==e);if(l===null?i=o:l.next=s,!ya(o,t.memoizedState)&&(ct=!0,c&&(a=Ji,a!==null)))throw a;t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}return n===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function pg(t){var e=rt(),a=e.queue;if(a===null)throw Error(D(311));a.lastRenderedReducer=t;var r=a.dispatch,n=a.pending,o=e.memoizedState;if(n!==null){a.pending=null;var i=n=n.next;do o=t(o,i.action),i=i.next;while(i!==n);ya(o,e.memoizedState)||(ct=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),a.lastRenderedState=o}return[o,r]}function eL(t,e,a){var r=ie,n=rt(),o=ve;if(o){if(a===void 0)throw Error(D(407));a=a()}else a=e();var i=!ya((Ie||n).memoizedState,a);if(i&&(n.memoizedState=a,ct=!0),n=n.queue,ty(rL.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||st!==null&&st.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},aL.bind(null,r,n,a,e),null),Te===null)throw Error(D(349));o||(Gr&127)!==0||tL(r,e,a)}return a}function tL(t,e,a){t.flags|=16384,t={getSnapshot:e,value:a},e=ie.updateQueue,e===null?(e=If(),ie.updateQueue=e,e.stores=[t]):(a=e.stores,a===null?e.stores=[t]:a.push(t))}function aL(t,e,a,r){e.value=a,e.getSnapshot=r,nL(e)&&oL(t)}function rL(t,e,a){return a(function(){nL(e)&&oL(t)})}function nL(t){var e=t.getSnapshot;t=t.value;try{var a=e();return!ya(t,a)}catch{return!0}}function oL(t){var e=$o(t,2);e!==null&&ea(e,t,2)}function rv(t){var e=qt();if(typeof t=="function"){var a=t;if(t=a(),Ho){Dn(!0);try{a()}finally{Dn(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:t},e}function iL(t,e,a,r){return t.baseState=a,ey(t,Ie,typeof r=="function"?r:Wr)}function tO(t,e,a,r,n){if(Tf(t))throw Error(D(485));if(t=e.action,t!==null){var o={payload:n,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){o.listeners.push(i)}};ae.T!==null?a(!0):o.isTransition=!1,r(o),a=e.pending,a===null?(o.next=e.pending=o,sL(e,o)):(o.next=a.next,e.pending=a.next=o)}}function sL(t,e){var a=e.action,r=e.payload,n=t.state;if(e.isTransition){var o=ae.T,i={};ae.T=i;try{var s=a(n,r),l=ae.S;l!==null&&l(i,s),iC(t,e,s)}catch(u){nv(t,e,u)}finally{o!==null&&i.types!==null&&(o.types=i.types),ae.T=o}}else try{o=a(n,r),iC(t,e,o)}catch(u){nv(t,e,u)}}function iC(t,e,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){sC(t,e,r)},function(r){return nv(t,e,r)}):sC(t,e,a)}function sC(t,e,a){e.status="fulfilled",e.value=a,lL(e),t.state=a,e=t.pending,e!==null&&(a=e.next,a===e?t.pending=null:(a=a.next,e.next=a,sL(t,a)))}function nv(t,e,a){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do e.status="rejected",e.reason=a,lL(e),e=e.next;while(e!==r)}t.action=null}function lL(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function uL(t,e){return e}function lC(t,e){if(ve){var a=Te.formState;if(a!==null){e:{var r=ie;if(ve){if(He){t:{for(var n=He,o=Ba;n.nodeType!==8;){if(!o){n=null;break t}if(n=Na(n.nextSibling),n===null){n=null;break t}}o=n.data,n=o==="F!"||o==="F"?n:null}if(n){He=Na(n.nextSibling),r=n.data==="F!";break e}}Xn(r)}r=!1}r&&(e=a[0])}}return a=qt(),a.memoizedState=a.baseState=e,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uL,lastRenderedState:e},a.queue=r,a=LL.bind(null,ie,r),r.dispatch=a,r=rv(!1),o=oy.bind(null,ie,!1,r.queue),r=qt(),n={state:e,dispatch:null,action:t,pending:null},r.queue=n,a=tO.bind(null,ie,n,o,a),n.dispatch=a,r.memoizedState=t,[e,a,!1]}function uC(t){var e=rt();return cL(e,Ie,t)}function cL(t,e,a){if(e=ey(t,e,uL)[0],t=Bd(Wr)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var r=Cu(e)}catch(i){throw i===vs?kf:i}else r=e;e=rt();var n=e.queue,o=n.dispatch;return a!==e.memoizedState&&(ie.flags|=2048,ls(9,{destroy:void 0},aO.bind(null,n,a),null)),[r,o,t]}function aO(t,e){t.action=e}function cC(t){var e=rt(),a=Ie;if(a!==null)return cL(e,a,t);rt(),e=e.memoizedState,a=rt();var r=a.queue.dispatch;return a.memoizedState=t,[e,r,!1]}function ls(t,e,a,r){return t={tag:t,create:a,deps:r,inst:e,next:null},e=ie.updateQueue,e===null&&(e=If(),ie.updateQueue=e),a=e.lastEffect,a===null?e.lastEffect=t.next=t:(r=a.next,a.next=t,t.next=r,e.lastEffect=t),t}function dL(){return rt().memoizedState}function Pd(t,e,a,r){var n=qt();ie.flags|=t,n.memoizedState=ls(1|e,{destroy:void 0},a,r===void 0?null:r)}function Ef(t,e,a,r){var n=rt();r=r===void 0?null:r;var o=n.memoizedState.inst;Ie!==null&&r!==null&&Zv(r,Ie.memoizedState.deps)?n.memoizedState=ls(e,o,a,r):(ie.flags|=t,n.memoizedState=ls(1|e,o,a,r))}function dC(t,e){Pd(8390656,8,t,e)}function ty(t,e){Ef(2048,8,t,e)}function rO(t){ie.flags|=4;var e=ie.updateQueue;if(e===null)e=If(),ie.updateQueue=e,e.events=[t];else{var a=e.events;a===null?e.events=[t]:a.push(t)}}function fL(t){var e=rt().memoizedState;return rO({ref:e,nextImpl:t}),function(){if((Se&2)!==0)throw Error(D(440));return e.impl.apply(void 0,arguments)}}function pL(t,e){return Ef(4,2,t,e)}function hL(t,e){return Ef(4,4,t,e)}function mL(t,e){if(typeof e=="function"){t=t();var a=e(t);return function(){typeof a=="function"?a():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function gL(t,e,a){a=a!=null?a.concat([t]):null,Ef(4,4,mL.bind(null,e,t),a)}function ay(){}function vL(t,e){var a=rt();e=e===void 0?null:e;var r=a.memoizedState;return e!==null&&Zv(e,r[1])?r[0]:(a.memoizedState=[t,e],t)}function yL(t,e){var a=rt();e=e===void 0?null:e;var r=a.memoizedState;if(e!==null&&Zv(e,r[1]))return r[0];if(r=t(),Ho){Dn(!0);try{t()}finally{Dn(!1)}}return a.memoizedState=[r,e],r}function ry(t,e,a){return a===void 0||(Gr&1073741824)!==0&&(me&261930)===0?t.memoizedState=e:(t.memoizedState=a,t=ik(),ie.lanes|=t,Yn|=t,a)}function xL(t,e,a,r){return ya(a,e)?a:ss.current!==null?(t=ry(t,a,r),ya(t,e)||(ct=!0),t):(Gr&42)===0||(Gr&1073741824)!==0&&(me&261930)===0?(ct=!0,t.memoizedState=a):(t=ik(),ie.lanes|=t,Yn|=t,e)}function bL(t,e,a,r,n){var o=_e.p;_e.p=o!==0&&8>o?o:8;var i=ae.T,s={};ae.T=s,oy(t,!1,e,a);try{var l=n(),u=ae.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=QM(l,r);Kl(t,e,c,va(t))}else Kl(t,e,r,va(t))}catch(d){Kl(t,e,{then:function(){},status:"rejected",reason:d},va())}finally{_e.p=o,i!==null&&s.types!==null&&(i.types=s.types),ae.T=i}}function nO(){}function ov(t,e,a,r){if(t.tag!==5)throw Error(D(476));var n=SL(t).queue;bL(t,n,e,Ro,a===null?nO:function(){return _L(t),a(r)})}function SL(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Ro,baseState:Ro,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:Ro},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function _L(t){var e=SL(t);e.next===null&&(e=t.alternate.memoizedState),Kl(t,e.next.queue,{},va())}function ny(){return At(pu)}function CL(){return rt().memoizedState}function wL(){return rt().memoizedState}function oO(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=va();t=zn(a);var r=qn(e,t,a);r!==null&&(ea(r,e,a),Wl(r,e,a)),e={cache:Vv()},t.payload=e;return}e=e.return}}function iO(t,e,a){var r=va();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Tf(t)?kL(e,a):(a=Hv(t,e,a,r),a!==null&&(ea(a,t,r),IL(a,e,r)))}function LL(t,e,a){var r=va();Kl(t,e,a,r)}function Kl(t,e,a,r){var n={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Tf(t))kL(e,n);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var i=e.lastRenderedState,s=o(i,a);if(n.hasEagerState=!0,n.eagerState=s,ya(s,i))return Lf(t,e,n,0),Te===null&&wf(),!1}catch{}if(a=Hv(t,e,n,r),a!==null)return ea(a,t,r),IL(a,e,r),!0}return!1}function oy(t,e,a,r){if(r={lane:2,revertLane:hy(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Tf(t)){if(e)throw Error(D(479))}else e=Hv(t,a,r,2),e!==null&&ea(e,t,2)}function Tf(t){var e=t.alternate;return t===ie||e!==null&&e===ie}function kL(t,e){ts=af=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function IL(t,e,a){if((a&4194048)!==0){var r=e.lanes;r&=t.pendingLanes,a|=r,e.lanes=a,fw(t,a)}}var cu={readContext:At,use:Af,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe};cu.useEffectEvent=Qe;var AL={readContext:At,use:Af,useCallback:function(t,e){return qt().memoizedState=[t,e===void 0?null:e],t},useContext:At,useEffect:dC,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,Pd(4194308,4,mL.bind(null,e,t),a)},useLayoutEffect:function(t,e){return Pd(4194308,4,t,e)},useInsertionEffect:function(t,e){Pd(4,2,t,e)},useMemo:function(t,e){var a=qt();e=e===void 0?null:e;var r=t();if(Ho){Dn(!0);try{t()}finally{Dn(!1)}}return a.memoizedState=[r,e],r},useReducer:function(t,e,a){var r=qt();if(a!==void 0){var n=a(e);if(Ho){Dn(!0);try{a(e)}finally{Dn(!1)}}}else n=e;return r.memoizedState=r.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},r.queue=t,t=t.dispatch=iO.bind(null,ie,t),[r.memoizedState,t]},useRef:function(t){var e=qt();return t={current:t},e.memoizedState=t},useState:function(t){t=rv(t);var e=t.queue,a=LL.bind(null,ie,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:ay,useDeferredValue:function(t,e){var a=qt();return ry(a,t,e)},useTransition:function(){var t=rv(!1);return t=bL.bind(null,ie,t.queue,!0,!1),qt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var r=ie,n=qt();if(ve){if(a===void 0)throw Error(D(407));a=a()}else{if(a=e(),Te===null)throw Error(D(349));(me&127)!==0||tL(r,e,a)}n.memoizedState=a;var o={value:a,getSnapshot:e};return n.queue=o,dC(rL.bind(null,r,o,t),[t]),r.flags|=2048,ls(9,{destroy:void 0},aL.bind(null,r,o,a,e),null),a},useId:function(){var t=qt(),e=Te.identifierPrefix;if(ve){var a=gr,r=mr;a=(r&~(1<<32-ga(r)-1)).toString(32)+a,e="_"+e+"R_"+a,a=rf++,0<a&&(e+="H"+a.toString(32)),e+="_"}else a=JM++,e="_"+e+"r_"+a.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:ny,useFormState:lC,useActionState:lC,useOptimistic:function(t){var e=qt();e.memoizedState=e.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=a,e=oy.bind(null,ie,!0,a),a.dispatch=e,[t,e]},useMemoCache:Jv,useCacheRefresh:function(){return qt().memoizedState=oO.bind(null,ie)},useEffectEvent:function(t){var e=qt(),a={impl:t};return e.memoizedState=a,function(){if((Se&2)!==0)throw Error(D(440));return a.impl.apply(void 0,arguments)}}},iy={readContext:At,use:Af,useCallback:vL,useContext:At,useEffect:ty,useImperativeHandle:gL,useInsertionEffect:pL,useLayoutEffect:hL,useMemo:yL,useReducer:Bd,useRef:dL,useState:function(){return Bd(Wr)},useDebugValue:ay,useDeferredValue:function(t,e){var a=rt();return xL(a,Ie.memoizedState,t,e)},useTransition:function(){var t=Bd(Wr)[0],e=rt().memoizedState;return[typeof t=="boolean"?t:Cu(t),e]},useSyncExternalStore:eL,useId:CL,useHostTransitionStatus:ny,useFormState:uC,useActionState:uC,useOptimistic:function(t,e){var a=rt();return iL(a,Ie,t,e)},useMemoCache:Jv,useCacheRefresh:wL};iy.useEffectEvent=fL;var EL={readContext:At,use:Af,useCallback:vL,useContext:At,useEffect:ty,useImperativeHandle:gL,useInsertionEffect:pL,useLayoutEffect:hL,useMemo:yL,useReducer:pg,useRef:dL,useState:function(){return pg(Wr)},useDebugValue:ay,useDeferredValue:function(t,e){var a=rt();return Ie===null?ry(a,t,e):xL(a,Ie.memoizedState,t,e)},useTransition:function(){var t=pg(Wr)[0],e=rt().memoizedState;return[typeof t=="boolean"?t:Cu(t),e]},useSyncExternalStore:eL,useId:CL,useHostTransitionStatus:ny,useFormState:cC,useActionState:cC,useOptimistic:function(t,e){var a=rt();return Ie!==null?iL(a,Ie,t,e):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Jv,useCacheRefresh:wL};EL.useEffectEvent=fL;function hg(t,e,a,r){e=t.memoizedState,a=a(r,e),a=a==null?e:Ue({},e,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var iv={enqueueSetState:function(t,e,a){t=t._reactInternals;var r=va(),n=zn(r);n.payload=e,a!=null&&(n.callback=a),e=qn(t,n,r),e!==null&&(ea(e,t,r),Wl(e,t,r))},enqueueReplaceState:function(t,e,a){t=t._reactInternals;var r=va(),n=zn(r);n.tag=1,n.payload=e,a!=null&&(n.callback=a),e=qn(t,n,r),e!==null&&(ea(e,t,r),Wl(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var a=va(),r=zn(a);r.tag=2,e!=null&&(r.callback=e),e=qn(t,r,a),e!==null&&(ea(e,t,a),Wl(e,t,a))}};function fC(t,e,a,r,n,o,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,i):e.prototype&&e.prototype.isPureReactComponent?!ou(a,r)||!ou(n,o):!0}function pC(t,e,a,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(a,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(a,r),e.state!==t&&iv.enqueueReplaceState(e,e.state,null)}function Uo(t,e){var a=e;if("ref"in e){a={};for(var r in e)r!=="ref"&&(a[r]=e[r])}if(t=t.defaultProps){a===e&&(a=Ue({},a));for(var n in t)a[n]===void 0&&(a[n]=t[n])}return a}function TL(t){Xd(t)}function RL(t){console.error(t)}function ML(t){Xd(t)}function nf(t,e){try{var a=t.onUncaughtError;a(e.value,{componentStack:e.stack})}catch(r){setTimeout(function(){throw r})}}function hC(t,e,a){try{var r=t.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function sv(t,e,a){return a=zn(a),a.tag=3,a.payload={element:null},a.callback=function(){nf(t,e)},a}function OL(t){return t=zn(t),t.tag=3,t}function DL(t,e,a,r){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var o=r.value;t.payload=function(){return n(o)},t.callback=function(){hC(e,a,r)}}var i=a.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(t.callback=function(){hC(e,a,r),typeof n!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function sO(t,e,a,r,n){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(e=a.alternate,e!==null&&gs(e,a,n,!0),a=xa.current,a!==null){switch(a.tag){case 31:case 13:return Pa===null?cf():a.alternate===null&&Je===0&&(Je=3),a.flags&=-257,a.flags|=65536,a.lanes=n,r===Jd?a.flags|=16384:(e=a.updateQueue,e===null?a.updateQueue=new Set([r]):e.add(r),Lg(t,r,n)),!1;case 22:return a.flags|=65536,r===Jd?a.flags|=16384:(e=a.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=e):(a=e.retryQueue,a===null?e.retryQueue=new Set([r]):a.add(r)),Lg(t,r,n)),!1}throw Error(D(435,a.tag))}return Lg(t,r,n),cf(),!1}if(ve)return e=xa.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,r!==Zg&&(t=Error(D(422),{cause:r}),su(Da(t,a)))):(r!==Zg&&(e=Error(D(423),{cause:r}),su(Da(e,a))),t=t.current.alternate,t.flags|=65536,n&=-n,t.lanes|=n,r=Da(r,a),n=sv(t.stateNode,r,n),fg(t,n),Je!==4&&(Je=2)),!1;var o=Error(D(520),{cause:r});if(o=Da(o,a),Jl===null?Jl=[o]:Jl.push(o),Je!==4&&(Je=2),e===null)return!0;r=Da(r,a),a=e;do{switch(a.tag){case 3:return a.flags|=65536,t=n&-n,a.lanes|=t,t=sv(a.stateNode,r,t),fg(a,t),!1;case 1:if(e=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Vn===null||!Vn.has(o))))return a.flags|=65536,n&=-n,a.lanes|=n,n=OL(n),DL(n,t,a,r),fg(a,n),!1}a=a.return}while(a!==null);return!1}var sy=Error(D(461)),ct=!1;function Lt(t,e,a,r){e.child=t===null?Zw(e,null,a,r):Fo(e,t.child,a,r)}function mC(t,e,a,r,n){a=a.render;var o=e.ref;if("ref"in r){var i={};for(var s in r)s!=="ref"&&(i[s]=r[s])}else i=r;return No(e),r=Xv(t,e,a,i,o,n),s=Kv(),t!==null&&!ct?(Yv(t,e,n),Zr(t,e,n)):(ve&&s&&zv(e),e.flags|=1,Lt(t,e,r,n),e.child)}function gC(t,e,a,r,n){if(t===null){var o=a.type;return typeof o=="function"&&!Uv(o)&&o.defaultProps===void 0&&a.compare===null?(e.tag=15,e.type=o,BL(t,e,o,r,n)):(t=Od(a.type,null,r,e,e.mode,n),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!ly(t,n)){var i=o.memoizedProps;if(a=a.compare,a=a!==null?a:ou,a(i,r)&&t.ref===e.ref)return Zr(t,e,n)}return e.flags|=1,t=qr(o,r),t.ref=e.ref,t.return=e,e.child=t}function BL(t,e,a,r,n){if(t!==null){var o=t.memoizedProps;if(ou(o,r)&&t.ref===e.ref)if(ct=!1,e.pendingProps=r=o,ly(t,n))(t.flags&131072)!==0&&(ct=!0);else return e.lanes=t.lanes,Zr(t,e,n)}return lv(t,e,a,r,n)}function PL(t,e,a,r){var n=r.children,o=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((e.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,t!==null){for(r=e.child=t.child,n=0;r!==null;)n=n|r.lanes|r.childLanes,r=r.sibling;r=n&~o}else r=0,e.child=null;return vC(t,e,o,a,r)}if((a&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Dd(e,o!==null?o.cachePool:null),o!==null?oC(e,o):tv(),Yw(e);else return r=e.lanes=536870912,vC(t,e,o!==null?o.baseLanes|a:a,a,r)}else o!==null?(Dd(e,o.cachePool),oC(e,o),Mn(e),e.memoizedState=null):(t!==null&&Dd(e,null),tv(),Mn(e));return Lt(t,e,n,a),e.child}function zl(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function vC(t,e,a,r,n){var o=$v();return o=o===null?null:{parent:ut._currentValue,pool:o},e.memoizedState={baseLanes:a,cachePool:o},t!==null&&Dd(e,null),tv(),Yw(e),t!==null&&gs(t,e,r,!0),e.childLanes=n,null}function Nd(t,e){return e=of({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function yC(t,e,a){return Fo(e,t.child,null,a),t=Nd(e,e.pendingProps),t.flags|=2,da(e),e.memoizedState=null,t}function lO(t,e,a){var r=e.pendingProps,n=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ve){if(r.mode==="hidden")return t=Nd(e,r),e.lanes=536870912,zl(null,t);if(av(e),(t=He)?(t=Ak(t,Ba),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Zn!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},a=zw(t),a.return=e,e.child=a,It=e,He=null)):t=null,t===null)throw Xn(e);return e.lanes=536870912,null}return Nd(e,r)}var o=t.memoizedState;if(o!==null){var i=o.dehydrated;if(av(e),n)if(e.flags&256)e.flags&=-257,e=yC(t,e,a);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(D(558));else if(ct||gs(t,e,a,!1),n=(a&t.childLanes)!==0,ct||n){if(r=Te,r!==null&&(i=pw(r,a),i!==0&&i!==o.retryLane))throw o.retryLane=i,$o(t,i),ea(r,t,i),sy;cf(),e=yC(t,e,a)}else t=o.treeContext,He=Na(i.nextSibling),It=e,ve=!0,Un=null,Ba=!1,t!==null&&Vw(e,t),e=Nd(e,r),e.flags|=4096;return e}return t=qr(t.child,{mode:r.mode,children:r.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(t,e){var a=e.ref;if(a===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(D(284));(t===null||t.ref!==a)&&(e.flags|=4194816)}}function lv(t,e,a,r,n){return No(e),a=Xv(t,e,a,r,void 0,n),r=Kv(),t!==null&&!ct?(Yv(t,e,n),Zr(t,e,n)):(ve&&r&&zv(e),e.flags|=1,Lt(t,e,a,n),e.child)}function xC(t,e,a,r,n,o){return No(e),e.updateQueue=null,a=Jw(e,r,a,n),Qw(t),r=Kv(),t!==null&&!ct?(Yv(t,e,o),Zr(t,e,o)):(ve&&r&&zv(e),e.flags|=1,Lt(t,e,a,o),e.child)}function bC(t,e,a,r,n){if(No(e),e.stateNode===null){var o=Gi,i=a.contextType;typeof i=="object"&&i!==null&&(o=At(i)),o=new a(r,o),e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=iv,e.stateNode=o,o._reactInternals=e,o=e.stateNode,o.props=r,o.state=e.memoizedState,o.refs={},Gv(e),i=a.contextType,o.context=typeof i=="object"&&i!==null?At(i):Gi,o.state=e.memoizedState,i=a.getDerivedStateFromProps,typeof i=="function"&&(hg(e,a,i,r),o.state=e.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(i=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),i!==o.state&&iv.enqueueReplaceState(o,o.state,null),Xl(e,r,o,n),Zl(),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!0}else if(t===null){o=e.stateNode;var s=e.memoizedProps,l=Uo(a,s);o.props=l;var u=o.context,c=a.contextType;i=Gi,typeof c=="object"&&c!==null&&(i=At(c));var d=a.getDerivedStateFromProps;c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function",s=e.pendingProps!==s,c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s||u!==i)&&pC(e,o,r,i),En=!1;var f=e.memoizedState;o.state=f,Xl(e,r,o,n),Zl(),u=e.memoizedState,s||f!==u||En?(typeof d=="function"&&(hg(e,a,d,r),u=e.memoizedState),(l=En||fC(e,a,l,r,f,u,i))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),o.props=r,o.state=u,o.context=i,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Jg(t,e),i=e.memoizedProps,c=Uo(a,i),o.props=c,d=e.pendingProps,f=o.context,u=a.contextType,l=Gi,typeof u=="object"&&u!==null&&(l=At(u)),s=a.getDerivedStateFromProps,(u=typeof s=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(i!==d||f!==l)&&pC(e,o,r,l),En=!1,f=e.memoizedState,o.state=f,Xl(e,r,o,n),Zl();var h=e.memoizedState;i!==d||f!==h||En||t!==null&&t.dependencies!==null&&Qd(t.dependencies)?(typeof s=="function"&&(hg(e,a,s,r),h=e.memoizedState),(c=En||fC(e,a,c,r,f,h,l)||t!==null&&t.dependencies!==null&&Qd(t.dependencies))?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return o=r,Fd(t,e),r=(e.flags&128)!==0,o||r?(o=e.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:o.render(),e.flags|=1,t!==null&&r?(e.child=Fo(e,t.child,null,n),e.child=Fo(e,null,a,n)):Lt(t,e,a,n),e.memoizedState=o.state,t=e.child):t=Zr(t,e,n),t}function SC(t,e,a,r){return Po(),e.flags|=256,Lt(t,e,a,r),e.child}var mg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gg(t){return{baseLanes:t,cachePool:jw()}}function vg(t,e,a){return t=t!==null?t.childLanes&~a:0,e&&(t|=pa),t}function NL(t,e,a){var r=e.pendingProps,n=!1,o=(e.flags&128)!==0,i;if((i=o)||(i=t!==null&&t.memoizedState===null?!1:(at.current&2)!==0),i&&(n=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,t===null){if(ve){if(n?Rn(e):Mn(e),(t=He)?(t=Ak(t,Ba),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Zn!==null?{id:mr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},a=zw(t),a.return=e,e.child=a,It=e,He=null)):t=null,t===null)throw Xn(e);return _v(t)?e.lanes=32:e.lanes=536870912,null}var s=r.children;return r=r.fallback,n?(Mn(e),n=e.mode,s=of({mode:"hidden",children:s},n),r=Mo(r,n,a,null),s.return=e,r.return=e,s.sibling=r,e.child=s,r=e.child,r.memoizedState=gg(a),r.childLanes=vg(t,i,a),e.memoizedState=mg,zl(null,r)):(Rn(e),uv(e,s))}var l=t.memoizedState;if(l!==null&&(s=l.dehydrated,s!==null)){if(o)e.flags&256?(Rn(e),e.flags&=-257,e=yg(t,e,a)):e.memoizedState!==null?(Mn(e),e.child=t.child,e.flags|=128,e=null):(Mn(e),s=r.fallback,n=e.mode,r=of({mode:"visible",children:r.children},n),s=Mo(s,n,a,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,Fo(e,t.child,null,a),r=e.child,r.memoizedState=gg(a),r.childLanes=vg(t,i,a),e.memoizedState=mg,e=zl(null,r));else if(Rn(e),_v(s)){if(i=s.nextSibling&&s.nextSibling.dataset,i)var u=i.dgst;i=u,r=Error(D(419)),r.stack="",r.digest=i,su({value:r,source:null,stack:null}),e=yg(t,e,a)}else if(ct||gs(t,e,a,!1),i=(a&t.childLanes)!==0,ct||i){if(i=Te,i!==null&&(r=pw(i,a),r!==0&&r!==l.retryLane))throw l.retryLane=r,$o(t,r),ea(i,t,r),sy;Sv(s)||cf(),e=yg(t,e,a)}else Sv(s)?(e.flags|=192,e.child=t.child,e=null):(t=l.treeContext,He=Na(s.nextSibling),It=e,ve=!0,Un=null,Ba=!1,t!==null&&Vw(e,t),e=uv(e,r.children),e.flags|=4096);return e}return n?(Mn(e),s=r.fallback,n=e.mode,l=t.child,u=l.sibling,r=qr(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u!==null?s=qr(u,s):(s=Mo(s,n,a,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,zl(null,r),r=e.child,s=t.child.memoizedState,s===null?s=gg(a):(n=s.cachePool,n!==null?(l=ut._currentValue,n=n.parent!==l?{parent:l,pool:l}:n):n=jw(),s={baseLanes:s.baseLanes|a,cachePool:n}),r.memoizedState=s,r.childLanes=vg(t,i,a),e.memoizedState=mg,zl(t.child,r)):(Rn(e),a=t.child,t=a.sibling,a=qr(a,{mode:"visible",children:r.children}),a.return=e,a.sibling=null,t!==null&&(i=e.deletions,i===null?(e.deletions=[t],e.flags|=16):i.push(t)),e.child=a,e.memoizedState=null,a)}function uv(t,e){return e=of({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function of(t,e){return t=fa(22,t,null,e),t.lanes=0,t}function yg(t,e,a){return Fo(e,t.child,null,a),t=uv(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _C(t,e,a){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Kg(t.return,e,a)}function xg(t,e,a,r,n,o){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:n,treeForkCount:o}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=a,i.tailMode=n,i.treeForkCount=o)}function FL(t,e,a){var r=e.pendingProps,n=r.revealOrder,o=r.tail;r=r.children;var i=at.current,s=(i&2)!==0;if(s?(i=i&1|2,e.flags|=128):i&=1,De(at,i),Lt(t,e,r,a),r=ve?iu:0,!s&&t!==null&&(t.flags&128)!==0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&_C(t,a,e);else if(t.tag===19)_C(t,a,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(n){case"forwards":for(a=e.child,n=null;a!==null;)t=a.alternate,t!==null&&tf(t)===null&&(n=a),a=a.sibling;a=n,a===null?(n=e.child,e.child=null):(n=a.sibling,a.sibling=null),xg(e,!1,n,a,o,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=e.child,e.child=null;n!==null;){if(t=n.alternate,t!==null&&tf(t)===null){e.child=n;break}t=n.sibling,n.sibling=a,a=n,n=t}xg(e,!0,a,null,o,r);break;case"together":xg(e,!1,null,null,void 0,r);break;default:e.memoizedState=null}return e.child}function Zr(t,e,a){if(t!==null&&(e.dependencies=t.dependencies),Yn|=e.lanes,(a&e.childLanes)===0)if(t!==null){if(gs(t,e,a,!1),(a&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(D(153));if(e.child!==null){for(t=e.child,a=qr(t,t.pendingProps),e.child=a,a.return=e;t.sibling!==null;)t=t.sibling,a=a.sibling=qr(t,t.pendingProps),a.return=e;a.sibling=null}return e.child}function ly(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Qd(t)))}function uO(t,e,a){switch(e.tag){case 3:jd(e,e.stateNode.containerInfo),Tn(e,ut,t.memoizedState.cache),Po();break;case 27:case 5:Ng(e);break;case 4:jd(e,e.stateNode.containerInfo);break;case 10:Tn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,av(e),null;break;case 13:var r=e.memoizedState;if(r!==null)return r.dehydrated!==null?(Rn(e),e.flags|=128,null):(a&e.child.childLanes)!==0?NL(t,e,a):(Rn(e),t=Zr(t,e,a),t!==null?t.sibling:null);Rn(e);break;case 19:var n=(t.flags&128)!==0;if(r=(a&e.childLanes)!==0,r||(gs(t,e,a,!1),r=(a&e.childLanes)!==0),n){if(r)return FL(t,e,a);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),De(at,at.current),r)break;return null;case 22:return e.lanes=0,PL(t,e,a,e.pendingProps);case 24:Tn(e,ut,t.memoizedState.cache)}return Zr(t,e,a)}function HL(t,e,a){if(t!==null)if(t.memoizedProps!==e.pendingProps)ct=!0;else{if(!ly(t,a)&&(e.flags&128)===0)return ct=!1,uO(t,e,a);ct=(t.flags&131072)!==0}else ct=!1,ve&&(e.flags&1048576)!==0&&qw(e,iu,e.index);switch(e.lanes=0,e.tag){case 16:e:{var r=e.pendingProps;if(t=Eo(e.elementType),e.type=t,typeof t=="function")Uv(t)?(r=Uo(t,r),e.tag=1,e=bC(null,e,t,r,a)):(e.tag=0,e=lv(null,e,t,r,a));else{if(t!=null){var n=t.$$typeof;if(n===kv){e.tag=11,e=mC(null,e,t,r,a);break e}else if(n===Iv){e.tag=14,e=gC(null,e,t,r,a);break e}}throw e=Bg(t)||t,Error(D(306,e,""))}}return e;case 0:return lv(t,e,e.type,e.pendingProps,a);case 1:return r=e.type,n=Uo(r,e.pendingProps),bC(t,e,r,n,a);case 3:e:{if(jd(e,e.stateNode.containerInfo),t===null)throw Error(D(387));r=e.pendingProps;var o=e.memoizedState;n=o.element,Jg(t,e),Xl(e,r,null,a);var i=e.memoizedState;if(r=i.cache,Tn(e,ut,r),r!==o.cache&&Yg(e,[ut],a,!0),Zl(),r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){e=SC(t,e,r,a);break e}else if(r!==n){n=Da(Error(D(424)),e),su(n),e=SC(t,e,r,a);break e}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,He=Na(t.firstChild),It=e,ve=!0,Un=null,Ba=!0,a=Zw(e,null,r,a),e.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Po(),r===n){e=Zr(t,e,a);break e}Lt(t,e,r,a)}e=e.child}return e;case 26:return Fd(t,e),t===null?(a=$C(e.type,null,e.pendingProps,null))?e.memoizedState=a:ve||(a=e.type,t=e.pendingProps,r=hf(Hn.current).createElement(a),r[kt]=e,r[ta]=t,Et(r,a,t),bt(r),e.stateNode=r):e.memoizedState=$C(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ng(e),t===null&&ve&&(r=e.stateNode=Ek(e.type,e.pendingProps,Hn.current),It=e,Ba=!0,n=He,Jn(e.type)?(Cv=n,He=Na(r.firstChild)):He=n),Lt(t,e,e.pendingProps.children,a),Fd(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ve&&((n=r=He)&&(r=NO(r,e.type,e.pendingProps,Ba),r!==null?(e.stateNode=r,It=e,He=Na(r.firstChild),Ba=!1,n=!0):n=!1),n||Xn(e)),Ng(e),n=e.type,o=e.pendingProps,i=t!==null?t.memoizedProps:null,r=o.children,xv(n,o)?r=null:i!==null&&xv(n,i)&&(e.flags|=32),e.memoizedState!==null&&(n=Xv(t,e,eO,null,null,a),pu._currentValue=n),Fd(t,e),Lt(t,e,r,a),e.child;case 6:return t===null&&ve&&((t=a=He)&&(a=FO(a,e.pendingProps,Ba),a!==null?(e.stateNode=a,It=e,He=null,t=!0):t=!1),t||Xn(e)),null;case 13:return NL(t,e,a);case 4:return jd(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Fo(e,null,r,a):Lt(t,e,r,a),e.child;case 11:return mC(t,e,e.type,e.pendingProps,a);case 7:return Lt(t,e,e.pendingProps,a),e.child;case 8:return Lt(t,e,e.pendingProps.children,a),e.child;case 12:return Lt(t,e,e.pendingProps.children,a),e.child;case 10:return r=e.pendingProps,Tn(e,e.type,r.value),Lt(t,e,r.children,a),e.child;case 9:return n=e.type._context,r=e.pendingProps.children,No(e),n=At(n),r=r(n),e.flags|=1,Lt(t,e,r,a),e.child;case 14:return gC(t,e,e.type,e.pendingProps,a);case 15:return BL(t,e,e.type,e.pendingProps,a);case 19:return FL(t,e,a);case 31:return lO(t,e,a);case 22:return PL(t,e,a,e.pendingProps);case 24:return No(e),r=At(ut),t===null?(n=$v(),n===null&&(n=Te,o=Vv(),n.pooledCache=o,o.refCount++,o!==null&&(n.pooledCacheLanes|=a),n=o),e.memoizedState={parent:r,cache:n},Gv(e),Tn(e,ut,n)):((t.lanes&a)!==0&&(Jg(t,e),Xl(e,null,null,a),Zl()),n=t.memoizedState,o=e.memoizedState,n.parent!==r?(n={parent:r,cache:r},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),Tn(e,ut,r)):(r=o.cache,Tn(e,ut,r),r!==n.cache&&Yg(e,[ut],a,!0))),Lt(t,e,e.pendingProps.children,a),e.child;case 29:throw e.pendingProps}throw Error(D(156,e.tag))}function Or(t){t.flags|=4}function bg(t,e,a,r,n){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(n&335544128)===n)if(t.stateNode.complete)t.flags|=8192;else if(uk())t.flags|=8192;else throw Do=Jd,jv}else t.flags&=-16777217}function CC(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Mk(e))if(uk())t.flags|=8192;else throw Do=Jd,jv}function _d(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?cw():536870912,t.lanes|=e,us|=e)}function Dl(t,e){if(!ve)switch(t.tailMode){case"hidden":e=t.tail;for(var a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Fe(t){var e=t.alternate!==null&&t.alternate.child===t.child,a=0,r=0;if(e)for(var n=t.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags&65011712,r|=n.flags&65011712,n.return=t,n=n.sibling;else for(n=t.child;n!==null;)a|=n.lanes|n.childLanes,r|=n.subtreeFlags,r|=n.flags,n.return=t,n=n.sibling;return t.subtreeFlags|=r,t.childLanes=a,e}function cO(t,e,a){var r=e.pendingProps;switch(qv(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(e),null;case 1:return Fe(e),null;case 3:return a=e.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),e.memoizedState.cache!==r&&(e.flags|=2048),Vr(ut),rs(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Di(e)?Or(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,dg())),Fe(e),null;case 26:var n=e.type,o=e.memoizedState;return t===null?(Or(e),o!==null?(Fe(e),CC(e,o)):(Fe(e),bg(e,n,null,r,a))):o?o!==t.memoizedState?(Or(e),Fe(e),CC(e,o)):(Fe(e),e.flags&=-16777217):(t=t.memoizedProps,t!==r&&Or(e),Fe(e),bg(e,n,t,r,a)),null;case 27:if(Gd(e),a=Hn.current,n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Or(e);else{if(!r){if(e.stateNode===null)throw Error(D(166));return Fe(e),null}t=yr.current,Di(e)?Q_(e,t):(t=Ek(n,r,a),e.stateNode=t,Or(e))}return Fe(e),null;case 5:if(Gd(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Or(e);else{if(!r){if(e.stateNode===null)throw Error(D(166));return Fe(e),null}if(o=yr.current,Di(e))Q_(e,o);else{var i=hf(Hn.current);switch(o){case 1:o=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:o=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":o=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":o=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":o=i.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof r.is=="string"?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is=="string"?i.createElement(n,{is:r.is}):i.createElement(n)}}o[kt]=e,o[ta]=r;e:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)o.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=o;e:switch(Et(o,n,r),n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Or(e)}}return Fe(e),bg(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,a),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==r&&Or(e);else{if(typeof r!="string"&&e.stateNode===null)throw Error(D(166));if(t=Hn.current,Di(e)){if(t=e.stateNode,a=e.memoizedProps,r=null,n=It,n!==null)switch(n.tag){case 27:case 5:r=n.memoizedProps}t[kt]=e,t=!!(t.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Lk(t.nodeValue,a)),t||Xn(e,!0)}else t=hf(t).createTextNode(r),t[kt]=e,e.stateNode=t}return Fe(e),null;case 31:if(a=e.memoizedState,t===null||t.memoizedState!==null){if(r=Di(e),a!==null){if(t===null){if(!r)throw Error(D(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(D(557));t[kt]=e}else Po(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Fe(e),t=!1}else a=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return e.flags&256?(da(e),e):(da(e),null);if((e.flags&128)!==0)throw Error(D(558))}return Fe(e),null;case 13:if(r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=Di(e),r!==null&&r.dehydrated!==null){if(t===null){if(!n)throw Error(D(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(D(317));n[kt]=e}else Po(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Fe(e),n=!1}else n=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(da(e),e):(da(e),null)}return da(e),(e.flags&128)!==0?(e.lanes=a,e):(a=r!==null,t=t!==null&&t.memoizedState!==null,a&&(r=e.child,n=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(n=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==n&&(r.flags|=2048)),a!==t&&a&&(e.child.flags|=8192),_d(e,e.updateQueue),Fe(e),null);case 4:return rs(),t===null&&my(e.stateNode.containerInfo),Fe(e),null;case 10:return Vr(e.type),Fe(e),null;case 19:if(St(at),r=e.memoizedState,r===null)return Fe(e),null;if(n=(e.flags&128)!==0,o=r.rendering,o===null)if(n)Dl(r,!1);else{if(Je!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(o=tf(t),o!==null){for(e.flags|=128,Dl(r,!1),t=o.updateQueue,e.updateQueue=t,_d(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)Uw(a,t),a=a.sibling;return De(at,at.current&1|2),ve&&Nr(e,r.treeForkCount),e.child}t=t.sibling}r.tail!==null&&ha()>lf&&(e.flags|=128,n=!0,Dl(r,!1),e.lanes=4194304)}else{if(!n)if(t=tf(o),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,_d(e,t),Dl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!ve)return Fe(e),null}else 2*ha()-r.renderingStartTime>lf&&a!==536870912&&(e.flags|=128,n=!0,Dl(r,!1),e.lanes=4194304);r.isBackwards?(o.sibling=e.child,e.child=o):(t=r.last,t!==null?t.sibling=o:e.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=ha(),t.sibling=null,a=at.current,De(at,n?a&1|2:a&1),ve&&Nr(e,r.treeForkCount),t):(Fe(e),null);case 22:case 23:return da(e),Wv(),r=e.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(e.flags|=8192):r&&(e.flags|=8192),r?(a&536870912)!==0&&(e.flags&128)===0&&(Fe(e),e.subtreeFlags&6&&(e.flags|=8192)):Fe(e),a=e.updateQueue,a!==null&&_d(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),r=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),r!==a&&(e.flags|=2048),t!==null&&St(Oo),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Vr(ut),Fe(e),null;case 25:return null;case 30:return null}throw Error(D(156,e.tag))}function dO(t,e){switch(qv(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vr(ut),rs(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Gd(e),null;case 31:if(e.memoizedState!==null){if(da(e),e.alternate===null)throw Error(D(340));Po()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(da(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(D(340));Po()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return St(at),null;case 4:return rs(),null;case 10:return Vr(e.type),null;case 22:case 23:return da(e),Wv(),t!==null&&St(Oo),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Vr(ut),null;case 25:return null;default:return null}}function UL(t,e){switch(qv(e),e.tag){case 3:Vr(ut),rs();break;case 26:case 27:case 5:Gd(e);break;case 4:rs();break;case 31:e.memoizedState!==null&&da(e);break;case 13:da(e);break;case 19:St(at);break;case 10:Vr(e.type);break;case 22:case 23:da(e),Wv(),t!==null&&St(Oo);break;case 24:Vr(ut)}}function wu(t,e){try{var a=e.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var n=r.next;a=n;do{if((a.tag&t)===t){r=void 0;var o=a.create,i=a.inst;r=o(),i.destroy=r}a=a.next}while(a!==n)}}catch(s){Le(e,e.return,s)}}function Kn(t,e,a){try{var r=e.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var o=n.next;r=o;do{if((r.tag&t)===t){var i=r.inst,s=i.destroy;if(s!==void 0){i.destroy=void 0,n=e;var l=a,u=s;try{u()}catch(c){Le(n,l,c)}}}r=r.next}while(r!==o)}}catch(c){Le(e,e.return,c)}}function zL(t){var e=t.updateQueue;if(e!==null){var a=t.stateNode;try{Kw(e,a)}catch(r){Le(t,t.return,r)}}}function qL(t,e,a){a.props=Uo(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(r){Le(t,e,r)}}function Yl(t,e){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof a=="function"?t.refCleanup=a(r):a.current=r}}catch(n){Le(t,e,n)}}function vr(t,e){var a=t.ref,r=t.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(n){Le(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Le(t,e,n)}else a.current=null}function VL(t){var e=t.type,a=t.memoizedProps,r=t.stateNode;try{e:switch(e){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(n){Le(t,t.return,n)}}function Sg(t,e,a){try{var r=t.stateNode;RO(r,t.type,a,e),r[ta]=e}catch(n){Le(t,t.return,n)}}function $L(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Jn(t.type)||t.tag===4}function _g(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||$L(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Jn(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cv(t,e,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,e):(e=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,e.appendChild(t),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=Ur));else if(r!==4&&(r===27&&Jn(t.type)&&(a=t.stateNode,e=null),t=t.child,t!==null))for(cv(t,e,a),t=t.sibling;t!==null;)cv(t,e,a),t=t.sibling}function sf(t,e,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?a.insertBefore(t,e):a.appendChild(t);else if(r!==4&&(r===27&&Jn(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(sf(t,e,a),t=t.sibling;t!==null;)sf(t,e,a),t=t.sibling}function jL(t){var e=t.stateNode,a=t.memoizedProps;try{for(var r=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Et(e,r,a),e[kt]=t,e[ta]=a}catch(o){Le(t,t.return,o)}}var Fr=!1,lt=!1,Cg=!1,wC=typeof WeakSet=="function"?WeakSet:Set,xt=null;function fO(t,e){if(t=t.containerInfo,vv=yf,t=Mw(t),Nv(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var n=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==a||n!==0&&d.nodeType!==3||(s=i+n),d!==o||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===a&&++u===n&&(s=i),f===o&&++c===r&&(l=i),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}a=s===-1||l===-1?null:{start:s,end:l}}else a=null}a=a||{start:0,end:0}}else a=null;for(yv={focusedElem:t,selectionRange:a},yf=!1,xt=e;xt!==null;)if(e=xt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,xt=t;else for(;xt!==null;){switch(e=xt,o=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)n=t[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&o!==null){t=void 0,a=e,n=o.memoizedProps,o=o.memoizedState,r=a.stateNode;try{var S=Uo(a.type,n);t=r.getSnapshotBeforeUpdate(S,o),r.__reactInternalSnapshotBeforeUpdate=t}catch(x){Le(a,a.return,x)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,a=t.nodeType,a===9)bv(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":bv(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(D(163))}if(t=e.sibling,t!==null){t.return=e.return,xt=t;break}xt=e.return}}function GL(t,e,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Br(t,a),r&4&&wu(5,a);break;case 1:if(Br(t,a),r&4)if(t=a.stateNode,e===null)try{t.componentDidMount()}catch(i){Le(a,a.return,i)}else{var n=Uo(a.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(n,e,t.__reactInternalSnapshotBeforeUpdate)}catch(i){Le(a,a.return,i)}}r&64&&zL(a),r&512&&Yl(a,a.return);break;case 3:if(Br(t,a),r&64&&(t=a.updateQueue,t!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{Kw(t,e)}catch(i){Le(a,a.return,i)}}break;case 27:e===null&&r&4&&jL(a);case 26:case 5:Br(t,a),e===null&&r&4&&VL(a),r&512&&Yl(a,a.return);break;case 12:Br(t,a);break;case 31:Br(t,a),r&4&&XL(t,a);break;case 13:Br(t,a),r&4&&KL(t,a),r&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=SO.bind(null,a),HO(t,a))));break;case 22:if(r=a.memoizedState!==null||Fr,!r){e=e!==null&&e.memoizedState!==null||lt,n=Fr;var o=lt;Fr=r,(lt=e)&&!o?Pr(t,a,(a.subtreeFlags&8772)!==0):Br(t,a),Fr=n,lt=o}break;case 30:break;default:Br(t,a)}}function WL(t){var e=t.alternate;e!==null&&(t.alternate=null,WL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Rv(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var je=null,Qt=!1;function Dr(t,e,a){for(a=a.child;a!==null;)ZL(t,e,a),a=a.sibling}function ZL(t,e,a){if(ma&&typeof ma.onCommitFiberUnmount=="function")try{ma.onCommitFiberUnmount(vu,a)}catch{}switch(a.tag){case 26:lt||vr(a,e),Dr(t,e,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:lt||vr(a,e);var r=je,n=Qt;Jn(a.type)&&(je=a.stateNode,Qt=!1),Dr(t,e,a),tu(a.stateNode),je=r,Qt=n;break;case 5:lt||vr(a,e);case 6:if(r=je,n=Qt,je=null,Dr(t,e,a),je=r,Qt=n,je!==null)if(Qt)try{(je.nodeType===9?je.body:je.nodeName==="HTML"?je.ownerDocument.body:je).removeChild(a.stateNode)}catch(o){Le(a,e,o)}else try{je.removeChild(a.stateNode)}catch(o){Le(a,e,o)}break;case 18:je!==null&&(Qt?(t=je,HC(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),ps(t)):HC(je,a.stateNode));break;case 4:r=je,n=Qt,je=a.stateNode.containerInfo,Qt=!0,Dr(t,e,a),je=r,Qt=n;break;case 0:case 11:case 14:case 15:Kn(2,a,e),lt||Kn(4,a,e),Dr(t,e,a);break;case 1:lt||(vr(a,e),r=a.stateNode,typeof r.componentWillUnmount=="function"&&qL(a,e,r)),Dr(t,e,a);break;case 21:Dr(t,e,a);break;case 22:lt=(r=lt)||a.memoizedState!==null,Dr(t,e,a),lt=r;break;default:Dr(t,e,a)}}function XL(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ps(t)}catch(a){Le(e,e.return,a)}}}function KL(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ps(t)}catch(a){Le(e,e.return,a)}}function pO(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new wC),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new wC),e;default:throw Error(D(435,t.tag))}}function Cd(t,e){var a=pO(t);e.forEach(function(r){if(!a.has(r)){a.add(r);var n=_O.bind(null,t,r);r.then(n,n)}})}function Kt(t,e){var a=e.deletions;if(a!==null)for(var r=0;r<a.length;r++){var n=a[r],o=t,i=e,s=i;e:for(;s!==null;){switch(s.tag){case 27:if(Jn(s.type)){je=s.stateNode,Qt=!1;break e}break;case 5:je=s.stateNode,Qt=!1;break e;case 3:case 4:je=s.stateNode.containerInfo,Qt=!0;break e}s=s.return}if(je===null)throw Error(D(160));ZL(o,i,n),je=null,Qt=!1,o=n.alternate,o!==null&&(o.return=null),n.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)YL(e,t),e=e.sibling}var Xa=null;function YL(t,e){var a=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Kt(e,t),Yt(t),r&4&&(Kn(3,t,t.return),wu(3,t),Kn(5,t,t.return));break;case 1:Kt(e,t),Yt(t),r&512&&(lt||a===null||vr(a,a.return)),r&64&&Fr&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var n=Xa;if(Kt(e,t),Yt(t),r&512&&(lt||a===null||vr(a,a.return)),r&4){var o=a!==null?a.memoizedState:null;if(r=t.memoizedState,a===null)if(r===null)if(t.stateNode===null){e:{r=t.type,a=t.memoizedProps,n=n.ownerDocument||n;t:switch(r){case"title":o=n.getElementsByTagName("title")[0],(!o||o[bu]||o[kt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=n.createElement(r),n.head.insertBefore(o,n.querySelector("head > title"))),Et(o,r,a),o[kt]=t,bt(o),r=o;break e;case"link":var i=GC("link","href",n).get(r+(a.href||""));if(i){for(var s=0;s<i.length;s++)if(o=i[s],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){i.splice(s,1);break t}}o=n.createElement(r),Et(o,r,a),n.head.appendChild(o);break;case"meta":if(i=GC("meta","content",n).get(r+(a.content||""))){for(s=0;s<i.length;s++)if(o=i[s],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){i.splice(s,1);break t}}o=n.createElement(r),Et(o,r,a),n.head.appendChild(o);break;default:throw Error(D(468,r))}o[kt]=t,bt(o),r=o}t.stateNode=r}else WC(n,t.type,t.stateNode);else t.stateNode=jC(n,r,t.memoizedProps);else o!==r?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,r===null?WC(n,t.type,t.stateNode):jC(n,r,t.memoizedProps)):r===null&&t.stateNode!==null&&Sg(t,t.memoizedProps,a.memoizedProps)}break;case 27:Kt(e,t),Yt(t),r&512&&(lt||a===null||vr(a,a.return)),a!==null&&r&4&&Sg(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Kt(e,t),Yt(t),r&512&&(lt||a===null||vr(a,a.return)),t.flags&32){n=t.stateNode;try{os(n,"")}catch(S){Le(t,t.return,S)}}r&4&&t.stateNode!=null&&(n=t.memoizedProps,Sg(t,n,a!==null?a.memoizedProps:n)),r&1024&&(Cg=!0);break;case 6:if(Kt(e,t),Yt(t),r&4){if(t.stateNode===null)throw Error(D(162));r=t.memoizedProps,a=t.stateNode;try{a.nodeValue=r}catch(S){Le(t,t.return,S)}}break;case 3:if(zd=null,n=Xa,Xa=mf(e.containerInfo),Kt(e,t),Xa=n,Yt(t),r&4&&a!==null&&a.memoizedState.isDehydrated)try{ps(e.containerInfo)}catch(S){Le(t,t.return,S)}Cg&&(Cg=!1,QL(t));break;case 4:r=Xa,Xa=mf(t.stateNode.containerInfo),Kt(e,t),Yt(t),Xa=r;break;case 12:Kt(e,t),Yt(t);break;case 31:Kt(e,t),Yt(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Cd(t,r)));break;case 13:Kt(e,t),Yt(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Rf=ha()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Cd(t,r)));break;case 22:n=t.memoizedState!==null;var l=a!==null&&a.memoizedState!==null,u=Fr,c=lt;if(Fr=u||n,lt=c||l,Kt(e,t),lt=c,Fr=u,Yt(t),r&8192)e:for(e=t.stateNode,e._visibility=n?e._visibility&-2:e._visibility|1,n&&(a===null||l||Fr||lt||To(t)),a=null,e=t;;){if(e.tag===5||e.tag===26){if(a===null){l=a=e;try{if(o=l.stateNode,n)i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{s=l.stateNode;var d=l.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;s.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(S){Le(l,l.return,S)}}}else if(e.tag===6){if(a===null){l=e;try{l.stateNode.nodeValue=n?"":l.memoizedProps}catch(S){Le(l,l.return,S)}}}else if(e.tag===18){if(a===null){l=e;try{var h=l.stateNode;n?UC(h,!0):UC(l.stateNode,!1)}catch(S){Le(l,l.return,S)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;a===e&&(a=null),e=e.return}a===e&&(a=null),e.sibling.return=e.return,e=e.sibling}r&4&&(r=t.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Cd(t,a))));break;case 19:Kt(e,t),Yt(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Cd(t,r)));break;case 30:break;case 21:break;default:Kt(e,t),Yt(t)}}function Yt(t){var e=t.flags;if(e&2){try{for(var a,r=t.return;r!==null;){if($L(r)){a=r;break}r=r.return}if(a==null)throw Error(D(160));switch(a.tag){case 27:var n=a.stateNode,o=_g(t);sf(t,o,n);break;case 5:var i=a.stateNode;a.flags&32&&(os(i,""),a.flags&=-33);var s=_g(t);sf(t,s,i);break;case 3:case 4:var l=a.stateNode.containerInfo,u=_g(t);cv(t,u,l);break;default:throw Error(D(161))}}catch(c){Le(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function QL(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;QL(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Br(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)GL(t,e.alternate,e),e=e.sibling}function To(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Kn(4,e,e.return),To(e);break;case 1:vr(e,e.return);var a=e.stateNode;typeof a.componentWillUnmount=="function"&&qL(e,e.return,a),To(e);break;case 27:tu(e.stateNode);case 26:case 5:vr(e,e.return),To(e);break;case 22:e.memoizedState===null&&To(e);break;case 30:To(e);break;default:To(e)}t=t.sibling}}function Pr(t,e,a){for(a=a&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var r=e.alternate,n=t,o=e,i=o.flags;switch(o.tag){case 0:case 11:case 15:Pr(n,o,a),wu(4,o);break;case 1:if(Pr(n,o,a),r=o,n=r.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(u){Le(r,r.return,u)}if(r=o,n=r.updateQueue,n!==null){var s=r.stateNode;try{var l=n.shared.hiddenCallbacks;if(l!==null)for(n.shared.hiddenCallbacks=null,n=0;n<l.length;n++)Xw(l[n],s)}catch(u){Le(r,r.return,u)}}a&&i&64&&zL(o),Yl(o,o.return);break;case 27:jL(o);case 26:case 5:Pr(n,o,a),a&&r===null&&i&4&&VL(o),Yl(o,o.return);break;case 12:Pr(n,o,a);break;case 31:Pr(n,o,a),a&&i&4&&XL(n,o);break;case 13:Pr(n,o,a),a&&i&4&&KL(n,o);break;case 22:o.memoizedState===null&&Pr(n,o,a),Yl(o,o.return);break;case 30:break;default:Pr(n,o,a)}e=e.sibling}}function uy(t,e){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&_u(a))}function cy(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_u(t))}function Za(t,e,a,r){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)JL(t,e,a,r),e=e.sibling}function JL(t,e,a,r){var n=e.flags;switch(e.tag){case 0:case 11:case 15:Za(t,e,a,r),n&2048&&wu(9,e);break;case 1:Za(t,e,a,r);break;case 3:Za(t,e,a,r),n&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_u(t)));break;case 12:if(n&2048){Za(t,e,a,r),t=e.stateNode;try{var o=e.memoizedProps,i=o.id,s=o.onPostCommit;typeof s=="function"&&s(i,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(l){Le(e,e.return,l)}}else Za(t,e,a,r);break;case 31:Za(t,e,a,r);break;case 13:Za(t,e,a,r);break;case 23:break;case 22:o=e.stateNode,i=e.alternate,e.memoizedState!==null?o._visibility&2?Za(t,e,a,r):Ql(t,e):o._visibility&2?Za(t,e,a,r):(o._visibility|=2,Pi(t,e,a,r,(e.subtreeFlags&10256)!==0||!1)),n&2048&&uy(i,e);break;case 24:Za(t,e,a,r),n&2048&&cy(e.alternate,e);break;default:Za(t,e,a,r)}}function Pi(t,e,a,r,n){for(n=n&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var o=t,i=e,s=a,l=r,u=i.flags;switch(i.tag){case 0:case 11:case 15:Pi(o,i,s,l,n),wu(8,i);break;case 23:break;case 22:var c=i.stateNode;i.memoizedState!==null?c._visibility&2?Pi(o,i,s,l,n):Ql(o,i):(c._visibility|=2,Pi(o,i,s,l,n)),n&&u&2048&&uy(i.alternate,i);break;case 24:Pi(o,i,s,l,n),n&&u&2048&&cy(i.alternate,i);break;default:Pi(o,i,s,l,n)}e=e.sibling}}function Ql(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var a=t,r=e,n=r.flags;switch(r.tag){case 22:Ql(a,r),n&2048&&uy(r.alternate,r);break;case 24:Ql(a,r),n&2048&&cy(r.alternate,r);break;default:Ql(a,r)}e=e.sibling}}var ql=8192;function Bi(t,e,a){if(t.subtreeFlags&ql)for(t=t.child;t!==null;)ek(t,e,a),t=t.sibling}function ek(t,e,a){switch(t.tag){case 26:Bi(t,e,a),t.flags&ql&&t.memoizedState!==null&&YO(a,Xa,t.memoizedState,t.memoizedProps);break;case 5:Bi(t,e,a);break;case 3:case 4:var r=Xa;Xa=mf(t.stateNode.containerInfo),Bi(t,e,a),Xa=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ql,ql=16777216,Bi(t,e,a),ql=r):Bi(t,e,a));break;default:Bi(t,e,a)}}function tk(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Bl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var r=e[a];xt=r,rk(r,t)}tk(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ak(t),t=t.sibling}function ak(t){switch(t.tag){case 0:case 11:case 15:Bl(t),t.flags&2048&&Kn(9,t,t.return);break;case 3:Bl(t);break;case 12:Bl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Hd(t)):Bl(t);break;default:Bl(t)}}function Hd(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var r=e[a];xt=r,rk(r,t)}tk(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Kn(8,e,e.return),Hd(e);break;case 22:a=e.stateNode,a._visibility&2&&(a._visibility&=-3,Hd(e));break;default:Hd(e)}t=t.sibling}}function rk(t,e){for(;xt!==null;){var a=xt;switch(a.tag){case 0:case 11:case 15:Kn(8,a,e);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:_u(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,xt=r;else e:for(a=t;xt!==null;){r=xt;var n=r.sibling,o=r.return;if(WL(r),r===a){xt=null;break e}if(n!==null){n.return=o,xt=n;break e}xt=o}}}var hO={getCacheForType:function(t){var e=At(ut),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a},cacheSignal:function(){return At(ut).controller.signal}},mO=typeof WeakMap=="function"?WeakMap:Map,Se=0,Te=null,fe=null,me=0,we=0,ca=null,Pn=!1,ys=!1,dy=!1,Xr=0,Je=0,Yn=0,Bo=0,fy=0,pa=0,us=0,Jl=null,Jt=null,dv=!1,Rf=0,nk=0,lf=1/0,uf=null,Vn=null,ht=0,$n=null,cs=null,$r=0,fv=0,pv=null,ok=null,eu=0,hv=null;function va(){return(Se&2)!==0&&me!==0?me&-me:ae.T!==null?hy():hw()}function ik(){if(pa===0)if((me&536870912)===0||ve){var t=pd;pd<<=1,(pd&3932160)===0&&(pd=262144),pa=t}else pa=536870912;return t=xa.current,t!==null&&(t.flags|=32),pa}function ea(t,e,a){(t===Te&&(we===2||we===9)||t.cancelPendingCommit!==null)&&(ds(t,0),Nn(t,me,pa,!1)),xu(t,a),((Se&2)===0||t!==Te)&&(t===Te&&((Se&2)===0&&(Bo|=a),Je===4&&Nn(t,me,pa,!1)),br(t))}function sk(t,e,a){if((Se&6)!==0)throw Error(D(327));var r=!a&&(e&127)===0&&(e&t.expiredLanes)===0||yu(t,e),n=r?yO(t,e):wg(t,e,!0),o=r;do{if(n===0){ys&&!r&&Nn(t,e,0,!1);break}else{if(a=t.current.alternate,o&&!gO(a)){n=wg(t,e,!1),o=!1;continue}if(n===2){if(o=e,t.errorRecoveryDisabledLanes&o)var i=0;else i=t.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){e=i;e:{var s=t;n=Jl;var l=s.current.memoizedState.isDehydrated;if(l&&(ds(s,i).flags|=256),i=wg(s,i,!1),i!==2){if(dy&&!l){s.errorRecoveryDisabledLanes|=o,Bo|=o,n=4;break e}o=Jt,Jt=n,o!==null&&(Jt===null?Jt=o:Jt.push.apply(Jt,o))}n=i}if(o=!1,n!==2)continue}}if(n===1){ds(t,0),Nn(t,e,0,!0);break}e:{switch(r=t,o=n,o){case 0:case 1:throw Error(D(345));case 4:if((e&4194048)!==e)break;case 6:Nn(r,e,pa,!Pn);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(D(329))}if((e&62914560)===e&&(n=Rf+300-ha(),10<n)){if(Nn(r,e,pa,!Pn),bf(r,0,!0)!==0)break e;$r=e,r.timeoutHandle=Ik(LC.bind(null,r,a,Jt,uf,dv,e,pa,Bo,us,Pn,o,"Throttled",-0,0),n);break e}LC(r,a,Jt,uf,dv,e,pa,Bo,us,Pn,o,null,-0,0)}}break}while(!0);br(t)}function LC(t,e,a,r,n,o,i,s,l,u,c,d,f,h){if(t.timeoutHandle=-1,d=e.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ur},ek(e,o,d);var S=(o&62914560)===o?Rf-ha():(o&4194048)===o?nk-ha():0;if(S=QO(d,S),S!==null){$r=o,t.cancelPendingCommit=S(IC.bind(null,t,e,o,a,r,n,i,s,l,c,d,null,f,h)),Nn(t,o,i,!u);return}}IC(t,e,o,a,r,n,i,s,l)}function gO(t){for(var e=t;;){var a=e.tag;if((a===0||a===11||a===15)&&e.flags&16384&&(a=e.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var n=a[r],o=n.getSnapshot;n=n.value;try{if(!ya(o(),n))return!1}catch{return!1}}if(a=e.child,e.subtreeFlags&16384&&a!==null)a.return=e,e=a;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nn(t,e,a,r){e&=~fy,e&=~Bo,t.suspendedLanes|=e,t.pingedLanes&=~e,r&&(t.warmLanes|=e),r=t.expirationTimes;for(var n=e;0<n;){var o=31-ga(n),i=1<<o;r[o]=-1,n&=~i}a!==0&&dw(t,a,e)}function Mf(){return(Se&6)===0?(Lu(0,!1),!1):!0}function py(){if(fe!==null){if(we===0)var t=fe.return;else t=fe,zr=jo=null,Qv(t),es=null,lu=0,t=fe;for(;t!==null;)UL(t.alternate,t),t=t.return;fe=null}}function ds(t,e){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,DO(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),$r=0,py(),Te=t,fe=a=qr(t.current,null),me=e,we=0,ca=null,Pn=!1,ys=yu(t,e),dy=!1,us=pa=fy=Bo=Yn=Je=0,Jt=Jl=null,dv=!1,(e&8)!==0&&(e|=e&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=e;0<r;){var n=31-ga(r),o=1<<n;e|=t[n],r&=~o}return Xr=e,wf(),a}function lk(t,e){ie=null,ae.H=cu,e===vs||e===kf?(e=rC(),we=3):e===jv?(e=rC(),we=4):we=e===sy?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,ca=e,fe===null&&(Je=1,nf(t,Da(e,t.current)))}function uk(){var t=xa.current;return t===null?!0:(me&4194048)===me?Pa===null:(me&62914560)===me||(me&536870912)!==0?t===Pa:!1}function ck(){var t=ae.H;return ae.H=cu,t===null?cu:t}function dk(){var t=ae.A;return ae.A=hO,t}function cf(){Je=4,Pn||(me&4194048)!==me&&xa.current!==null||(ys=!0),(Yn&134217727)===0&&(Bo&134217727)===0||Te===null||Nn(Te,me,pa,!1)}function wg(t,e,a){var r=Se;Se|=2;var n=ck(),o=dk();(Te!==t||me!==e)&&(uf=null,ds(t,e)),e=!1;var i=Je;e:do try{if(we!==0&&fe!==null){var s=fe,l=ca;switch(we){case 8:py(),i=6;break e;case 3:case 2:case 9:case 6:xa.current===null&&(e=!0);var u=we;if(we=0,ca=null,Xi(t,s,l,u),a&&ys){i=0;break e}break;default:u=we,we=0,ca=null,Xi(t,s,l,u)}}vO(),i=Je;break}catch(c){lk(t,c)}while(!0);return e&&t.shellSuspendCounter++,zr=jo=null,Se=r,ae.H=n,ae.A=o,fe===null&&(Te=null,me=0,wf()),i}function vO(){for(;fe!==null;)fk(fe)}function yO(t,e){var a=Se;Se|=2;var r=ck(),n=dk();Te!==t||me!==e?(uf=null,lf=ha()+500,ds(t,e)):ys=yu(t,e);e:do try{if(we!==0&&fe!==null){e=fe;var o=ca;t:switch(we){case 1:we=0,ca=null,Xi(t,e,o,1);break;case 2:case 9:if(aC(o)){we=0,ca=null,kC(e);break}e=function(){we!==2&&we!==9||Te!==t||(we=7),br(t)},o.then(e,e);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:aC(o)?(we=0,ca=null,kC(e)):(we=0,ca=null,Xi(t,e,o,7));break;case 5:var i=null;switch(fe.tag){case 26:i=fe.memoizedState;case 5:case 27:var s=fe;if(i?Mk(i):s.stateNode.complete){we=0,ca=null;var l=s.sibling;if(l!==null)fe=l;else{var u=s.return;u!==null?(fe=u,Of(u)):fe=null}break t}}we=0,ca=null,Xi(t,e,o,5);break;case 6:we=0,ca=null,Xi(t,e,o,6);break;case 8:py(),Je=6;break e;default:throw Error(D(462))}}xO();break}catch(c){lk(t,c)}while(!0);return zr=jo=null,ae.H=r,ae.A=n,Se=a,fe!==null?0:(Te=null,me=0,wf(),Je)}function xO(){for(;fe!==null&&!q2();)fk(fe)}function fk(t){var e=HL(t.alternate,t,Xr);t.memoizedProps=t.pendingProps,e===null?Of(t):fe=e}function kC(t){var e=t,a=e.alternate;switch(e.tag){case 15:case 0:e=xC(a,e,e.pendingProps,e.type,void 0,me);break;case 11:e=xC(a,e,e.pendingProps,e.type.render,e.ref,me);break;case 5:Qv(e);default:UL(a,e),e=fe=Uw(e,Xr),e=HL(a,e,Xr)}t.memoizedProps=t.pendingProps,e===null?Of(t):fe=e}function Xi(t,e,a,r){zr=jo=null,Qv(e),es=null,lu=0;var n=e.return;try{if(sO(t,n,e,a,me)){Je=1,nf(t,Da(a,t.current)),fe=null;return}}catch(o){if(n!==null)throw fe=n,o;Je=1,nf(t,Da(a,t.current)),fe=null;return}e.flags&32768?(ve||r===1?t=!0:ys||(me&536870912)!==0?t=!1:(Pn=t=!0,(r===2||r===9||r===3||r===6)&&(r=xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),pk(e,t)):Of(e)}function Of(t){var e=t;do{if((e.flags&32768)!==0){pk(e,Pn);return}t=e.return;var a=cO(e.alternate,e,Xr);if(a!==null){fe=a;return}if(e=e.sibling,e!==null){fe=e;return}fe=e=t}while(e!==null);Je===0&&(Je=5)}function pk(t,e){do{var a=dO(t.alternate,t);if(a!==null){a.flags&=32767,fe=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!e&&(t=t.sibling,t!==null)){fe=t;return}fe=t=a}while(t!==null);Je=6,fe=null}function IC(t,e,a,r,n,o,i,s,l){t.cancelPendingCommit=null;do Df();while(ht!==0);if((Se&6)!==0)throw Error(D(327));if(e!==null){if(e===t.current)throw Error(D(177));if(o=e.lanes|e.childLanes,o|=Fv,Q2(t,a,o,i,s,l),t===Te&&(fe=Te=null,me=0),cs=e,$n=t,$r=a,fv=o,pv=n,ok=r,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,CO(Wd,function(){return yk(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||r){r=ae.T,ae.T=null,n=_e.p,_e.p=2,i=Se,Se|=4;try{fO(t,e,a)}finally{Se=i,_e.p=n,ae.T=r}}ht=1,hk(),mk(),gk()}}function hk(){if(ht===1){ht=0;var t=$n,e=cs,a=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||a){a=ae.T,ae.T=null;var r=_e.p;_e.p=2;var n=Se;Se|=4;try{YL(e,t);var o=yv,i=Mw(t.containerInfo),s=o.focusedElem,l=o.selectionRange;if(i!==s&&s&&s.ownerDocument&&Rw(s.ownerDocument.documentElement,s)){if(l!==null&&Nv(s)){var u=l.start,c=l.end;if(c===void 0&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),S=s.textContent.length,x=Math.min(l.start,S),b=l.end===void 0?x:Math.min(l.end,S);!h.extend&&x>b&&(i=b,b=x,x=i);var g=X_(s,x),m=X_(s,b);if(g&&m&&(h.rangeCount!==1||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==m.node||h.focusOffset!==m.offset)){var y=d.createRange();y.setStart(g.node,g.offset),h.removeAllRanges(),x>b?(h.addRange(y),h.extend(m.node,m.offset)):(y.setEnd(m.node,m.offset),h.addRange(y))}}}}for(d=[],h=s;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var v=d[s];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}yf=!!vv,yv=vv=null}finally{Se=n,_e.p=r,ae.T=a}}t.current=e,ht=2}}function mk(){if(ht===2){ht=0;var t=$n,e=cs,a=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||a){a=ae.T,ae.T=null;var r=_e.p;_e.p=2;var n=Se;Se|=4;try{GL(t,e.alternate,e)}finally{Se=n,_e.p=r,ae.T=a}}ht=3}}function gk(){if(ht===4||ht===3){ht=0,V2();var t=$n,e=cs,a=$r,r=ok;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ht=5:(ht=0,cs=$n=null,vk(t,t.pendingLanes));var n=t.pendingLanes;if(n===0&&(Vn=null),Tv(a),e=e.stateNode,ma&&typeof ma.onCommitFiberRoot=="function")try{ma.onCommitFiberRoot(vu,e,void 0,(e.current.flags&128)===128)}catch{}if(r!==null){e=ae.T,n=_e.p,_e.p=2,ae.T=null;try{for(var o=t.onRecoverableError,i=0;i<r.length;i++){var s=r[i];o(s.value,{componentStack:s.stack})}}finally{ae.T=e,_e.p=n}}($r&3)!==0&&Df(),br(t),n=t.pendingLanes,(a&261930)!==0&&(n&42)!==0?t===hv?eu++:(eu=0,hv=t):eu=0,Lu(0,!1)}}function vk(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,_u(e)))}function Df(){return hk(),mk(),gk(),yk()}function yk(){if(ht!==5)return!1;var t=$n,e=fv;fv=0;var a=Tv($r),r=ae.T,n=_e.p;try{_e.p=32>a?32:a,ae.T=null,a=pv,pv=null;var o=$n,i=$r;if(ht=0,cs=$n=null,$r=0,(Se&6)!==0)throw Error(D(331));var s=Se;if(Se|=4,ak(o.current),JL(o,o.current,i,a),Se=s,Lu(0,!1),ma&&typeof ma.onPostCommitFiberRoot=="function")try{ma.onPostCommitFiberRoot(vu,o)}catch{}return!0}finally{_e.p=n,ae.T=r,vk(t,e)}}function AC(t,e,a){e=Da(a,e),e=sv(t.stateNode,e,2),t=qn(t,e,2),t!==null&&(xu(t,2),br(t))}function Le(t,e,a){if(t.tag===3)AC(t,t,a);else for(;e!==null;){if(e.tag===3){AC(e,t,a);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vn===null||!Vn.has(r))){t=Da(a,t),a=OL(2),r=qn(e,a,2),r!==null&&(DL(a,r,e,t),xu(r,2),br(r));break}}e=e.return}}function Lg(t,e,a){var r=t.pingCache;if(r===null){r=t.pingCache=new mO;var n=new Set;r.set(e,n)}else n=r.get(e),n===void 0&&(n=new Set,r.set(e,n));n.has(a)||(dy=!0,n.add(a),t=bO.bind(null,t,e,a),e.then(t,t))}function bO(t,e,a){var r=t.pingCache;r!==null&&r.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Te===t&&(me&a)===a&&(Je===4||Je===3&&(me&62914560)===me&&300>ha()-Rf?(Se&2)===0&&ds(t,0):fy|=a,us===me&&(us=0)),br(t)}function xk(t,e){e===0&&(e=cw()),t=$o(t,e),t!==null&&(xu(t,e),br(t))}function SO(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),xk(t,a)}function _O(t,e){var a=0;switch(t.tag){case 31:case 13:var r=t.stateNode,n=t.memoizedState;n!==null&&(a=n.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(D(314))}r!==null&&r.delete(e),xk(t,a)}function CO(t,e){return Av(t,e)}var df=null,Ni=null,mv=!1,ff=!1,kg=!1,Fn=0;function br(t){t!==Ni&&t.next===null&&(Ni===null?df=Ni=t:Ni=Ni.next=t),ff=!0,mv||(mv=!0,LO())}function Lu(t,e){if(!kg&&ff){kg=!0;do for(var a=!1,r=df;r!==null;){if(!e)if(t!==0){var n=r.pendingLanes;if(n===0)var o=0;else{var i=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-ga(42|t)+1)-1,o&=n&~(i&~s),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,EC(r,o))}else o=me,o=bf(r,r===Te?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(o&3)===0||yu(r,o)||(a=!0,EC(r,o));r=r.next}while(a);kg=!1}}function wO(){bk()}function bk(){ff=mv=!1;var t=0;Fn!==0&&OO()&&(t=Fn);for(var e=ha(),a=null,r=df;r!==null;){var n=r.next,o=Sk(r,e);o===0?(r.next=null,a===null?df=n:a.next=n,n===null&&(Ni=a)):(a=r,(t!==0||(o&3)!==0)&&(ff=!0)),r=n}ht!==0&&ht!==5||Lu(t,!1),Fn!==0&&(Fn=0)}function Sk(t,e){for(var a=t.suspendedLanes,r=t.pingedLanes,n=t.expirationTimes,o=t.pendingLanes&-62914561;0<o;){var i=31-ga(o),s=1<<i,l=n[i];l===-1?((s&a)===0||(s&r)!==0)&&(n[i]=Y2(s,e)):l<=e&&(t.expiredLanes|=s),o&=~s}if(e=Te,a=me,a=bf(t,t===e?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,a===0||t===e&&(we===2||we===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&tg(r),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||yu(t,a)){if(e=a&-a,e===t.callbackPriority)return e;switch(r!==null&&tg(r),Tv(a)){case 2:case 8:a=lw;break;case 32:a=Wd;break;case 268435456:a=uw;break;default:a=Wd}return r=_k.bind(null,t),a=Av(a,r),t.callbackPriority=e,t.callbackNode=a,e}return r!==null&&r!==null&&tg(r),t.callbackPriority=2,t.callbackNode=null,2}function _k(t,e){if(ht!==0&&ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Df()&&t.callbackNode!==a)return null;var r=me;return r=bf(t,t===Te?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(sk(t,r,e),Sk(t,ha()),t.callbackNode!=null&&t.callbackNode===a?_k.bind(null,t):null)}function EC(t,e){if(Df())return null;sk(t,e,!0)}function LO(){BO(function(){(Se&6)!==0?Av(sw,wO):bk()})}function hy(){if(Fn===0){var t=is;t===0&&(t=fd,fd<<=1,(fd&261888)===0&&(fd=256)),Fn=t}return Fn}function TC(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Td(""+t)}function RC(t,e){var a=e.ownerDocument.createElement("input");return a.name=e.name,a.value=e.value,t.id&&a.setAttribute("form",t.id),e.parentNode.insertBefore(a,e),t=new FormData(t),a.parentNode.removeChild(a),t}function kO(t,e,a,r,n){if(e==="submit"&&a&&a.stateNode===n){var o=TC((n[ta]||null).action),i=r.submitter;i&&(e=(e=i[ta]||null)?TC(e.formAction):i.getAttribute("formAction"),e!==null&&(o=e,i=null));var s=new Sf("action","action",null,r,n);t.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Fn!==0){var l=i?RC(n,i):new FormData(n);ov(a,{pending:!0,data:l,method:n.method,action:o},null,l)}}else typeof o=="function"&&(s.preventDefault(),l=i?RC(n,i):new FormData(n),ov(a,{pending:!0,data:l,method:n.method,action:o},o,l))},currentTarget:n}]})}}for(wd=0;wd<Wg.length;wd++)Ld=Wg[wd],MC=Ld.toLowerCase(),OC=Ld[0].toUpperCase()+Ld.slice(1),Ka(MC,"on"+OC);var Ld,MC,OC,wd;Ka(Dw,"onAnimationEnd");Ka(Bw,"onAnimationIteration");Ka(Pw,"onAnimationStart");Ka("dblclick","onDoubleClick");Ka("focusin","onFocus");Ka("focusout","onBlur");Ka($M,"onTransitionRun");Ka(jM,"onTransitionStart");Ka(GM,"onTransitionCancel");Ka(Nw,"onTransitionEnd");ns("onMouseEnter",["mouseout","mouseover"]);ns("onMouseLeave",["mouseout","mouseover"]);ns("onPointerEnter",["pointerout","pointerover"]);ns("onPointerLeave",["pointerout","pointerover"]);zo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zo("onBeforeInput",["compositionend","keypress","textInput","paste"]);zo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var du="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(du));function Ck(t,e){e=(e&4)!==0;for(var a=0;a<t.length;a++){var r=t[a],n=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&n.isPropagationStopped())break e;o=s,n.currentTarget=u;try{o(n)}catch(c){Xd(c)}n.currentTarget=null,o=l}else for(i=0;i<r.length;i++){if(s=r[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&n.isPropagationStopped())break e;o=s,n.currentTarget=u;try{o(n)}catch(c){Xd(c)}n.currentTarget=null,o=l}}}}function de(t,e){var a=e[Hg];a===void 0&&(a=e[Hg]=new Set);var r=t+"__bubble";a.has(r)||(wk(e,t,2,!1),a.add(r))}function Ig(t,e,a){var r=0;e&&(r|=4),wk(a,t,r,e)}var kd="_reactListening"+Math.random().toString(36).slice(2);function my(t){if(!t[kd]){t[kd]=!0,mw.forEach(function(a){a!=="selectionchange"&&(IO.has(a)||Ig(a,!1,t),Ig(a,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[kd]||(e[kd]=!0,Ig("selectionchange",!1,e))}}function wk(t,e,a,r){switch(Nk(e)){case 2:var n=tD;break;case 8:n=aD;break;default:n=xy}a=n.bind(null,e,a,t),n=void 0,!$g||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),r?n!==void 0?t.addEventListener(e,a,{capture:!0,passive:n}):t.addEventListener(e,a,!0):n!==void 0?t.addEventListener(e,a,{passive:n}):t.addEventListener(e,a,!1)}function Ag(t,e,a,r,n){var o=r;if((e&1)===0&&(e&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===n)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;s!==null;){if(i=Ui(s),i===null)return;if(l=i.tag,l===5||l===6||l===26||l===27){r=o=i;continue e}s=s.parentNode}}r=r.return}Cw(function(){var u=o,c=Ov(a),d=[];e:{var f=Fw.get(t);if(f!==void 0){var h=Sf,S=t;switch(t){case"keypress":if(Md(a)===0)break e;case"keydown":case"keyup":h=_M;break;case"focusin":S="focus",h=ig;break;case"focusout":S="blur",h=ig;break;case"beforeblur":case"afterblur":h=ig;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=U_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=cM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=LM;break;case Dw:case Bw:case Pw:h=pM;break;case Nw:h=IM;break;case"scroll":case"scrollend":h=lM;break;case"wheel":h=EM;break;case"copy":case"cut":case"paste":h=mM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=q_;break;case"toggle":case"beforetoggle":h=RM}var x=(e&4)!==0,b=!x&&(t==="scroll"||t==="scrollend"),g=x?f!==null?f+"Capture":null:f;x=[];for(var m=u,y;m!==null;){var v=m;if(y=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||y===null||g===null||(v=ru(m,g),v!=null&&x.push(fu(m,v,y))),b)break;m=m.return}0<x.length&&(f=new h(f,S,null,a,c),d.push({event:f,listeners:x}))}}if((e&7)===0){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&a!==Vg&&(S=a.relatedTarget||a.fromElement)&&(Ui(S)||S[hs]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(S=a.relatedTarget||a.toElement,h=u,S=S?Ui(S):null,S!==null&&(b=gu(S),x=S.tag,S!==b||x!==5&&x!==27&&x!==6)&&(S=null)):(h=null,S=u),h!==S)){if(x=U_,v="onMouseLeave",g="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(x=q_,v="onPointerLeave",g="onPointerEnter",m="pointer"),b=h==null?f:Ul(h),y=S==null?f:Ul(S),f=new x(v,m+"leave",h,a,c),f.target=b,f.relatedTarget=y,v=null,Ui(c)===u&&(x=new x(g,m+"enter",S,a,c),x.target=y,x.relatedTarget=b,v=x),b=v,h&&S)t:{for(x=AO,g=h,m=S,y=0,v=g;v;v=x(v))y++;v=0;for(var C=m;C;C=x(C))v++;for(;0<y-v;)g=x(g),y--;for(;0<v-y;)m=x(m),v--;for(;y--;){if(g===m||m!==null&&g===m.alternate){x=g;break t}g=x(g),m=x(m)}x=null}else x=null;h!==null&&DC(d,f,h,x,!1),S!==null&&b!==null&&DC(d,b,S,x,!0)}}e:{if(f=u?Ul(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var w=G_;else if(j_(f))if(Ew)w=zM;else{w=HM;var _=FM}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Mv(u.elementType)&&(w=G_):w=UM;if(w&&(w=w(t,u))){Aw(d,w,a,c);break e}_&&_(t,f,u),t==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&qg(f,"number",f.value)}switch(_=u?Ul(u):window,t){case"focusin":(j_(_)||_.contentEditable==="true")&&(Vi=_,jg=u,jl=null);break;case"focusout":jl=jg=Vi=null;break;case"mousedown":Gg=!0;break;case"contextmenu":case"mouseup":case"dragend":Gg=!1,K_(d,a,c);break;case"selectionchange":if(VM)break;case"keydown":case"keyup":K_(d,a,c)}var L;if(Pv)e:{switch(t){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else qi?kw(t,a)&&(A="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(A="onCompositionStart");A&&(Lw&&a.locale!=="ko"&&(qi||A!=="onCompositionStart"?A==="onCompositionEnd"&&qi&&(L=ww()):(Bn=c,Dv="value"in Bn?Bn.value:Bn.textContent,qi=!0)),_=pf(u,A),0<_.length&&(A=new z_(A,t,null,a,c),d.push({event:A,listeners:_}),L?A.data=L:(L=Iw(a),L!==null&&(A.data=L)))),(L=OM?DM(t,a):BM(t,a))&&(A=pf(u,"onBeforeInput"),0<A.length&&(_=new z_("onBeforeInput","beforeinput",null,a,c),d.push({event:_,listeners:A}),_.data=L)),kO(d,t,u,a,c)}Ck(d,e)})}function fu(t,e,a){return{instance:t,listener:e,currentTarget:a}}function pf(t,e){for(var a=e+"Capture",r=[];t!==null;){var n=t,o=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||o===null||(n=ru(t,a),n!=null&&r.unshift(fu(t,n,o)),n=ru(t,e),n!=null&&r.push(fu(t,n,o))),t.tag===3)return r;t=t.return}return[]}function AO(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function DC(t,e,a,r,n){for(var o=e._reactName,i=[];a!==null&&a!==r;){var s=a,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||u===null||(l=u,n?(u=ru(a,o),u!=null&&i.unshift(fu(a,u,l))):n||(u=ru(a,o),u!=null&&i.push(fu(a,u,l)))),a=a.return}i.length!==0&&t.push({event:e,listeners:i})}var EO=/\r\n?/g,TO=/\u0000|\uFFFD/g;function BC(t){return(typeof t=="string"?t:""+t).replace(EO,`
|
|
9
|
-
`).replace(TO,"")}function Lk(t,e){return e=BC(e),BC(t)===e}function ke(t,e,a,r,n,o){switch(a){case"children":typeof r=="string"?e==="body"||e==="textarea"&&r===""||os(t,r):(typeof r=="number"||typeof r=="bigint")&&e!=="body"&&os(t,""+r);break;case"className":md(t,"class",r);break;case"tabIndex":md(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":md(t,a,r);break;case"style":_w(t,r,o);break;case"data":if(e!=="object"){md(t,"data",r);break}case"src":case"href":if(r===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Td(""+r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(e!=="input"&&ke(t,e,"name",n.name,n,null),ke(t,e,"formEncType",n.formEncType,n,null),ke(t,e,"formMethod",n.formMethod,n,null),ke(t,e,"formTarget",n.formTarget,n,null)):(ke(t,e,"encType",n.encType,n,null),ke(t,e,"method",n.method,n,null),ke(t,e,"target",n.target,n,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Td(""+r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=Ur);break;case"onScroll":r!=null&&de("scroll",t);break;case"onScrollEnd":r!=null&&de("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(D(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(D(60));t.innerHTML=a}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=Td(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""+r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":de("beforetoggle",t),de("toggle",t),Ed(t,"popover",r);break;case"xlinkActuate":Mr(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Mr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Mr(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Mr(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Mr(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Mr(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ed(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=iM.get(a)||a,Ed(t,a,r))}}function gv(t,e,a,r,n,o){switch(a){case"style":_w(t,r,o);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(D(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(D(60));t.innerHTML=a}}break;case"children":typeof r=="string"?os(t,r):(typeof r=="number"||typeof r=="bigint")&&os(t,""+r);break;case"onScroll":r!=null&&de("scroll",t);break;case"onScrollEnd":r!=null&&de("scrollend",t);break;case"onClick":r!=null&&(t.onclick=Ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gw.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),e=a.slice(2,n?a.length-7:void 0),o=t[ta]||null,o=o!=null?o[a]:null,typeof o=="function"&&t.removeEventListener(e,o,n),typeof r=="function")){typeof o!="function"&&o!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(e,r,n);break e}a in t?t[a]=r:r===!0?t.setAttribute(a,""):Ed(t,a,r)}}}function Et(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":de("error",t),de("load",t);var r=!1,n=!1,o;for(o in a)if(a.hasOwnProperty(o)){var i=a[o];if(i!=null)switch(o){case"src":r=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(D(137,e));default:ke(t,e,o,i,a,null)}}n&&ke(t,e,"srcSet",a.srcSet,a,null),r&&ke(t,e,"src",a.src,a,null);return;case"input":de("invalid",t);var s=o=i=n=null,l=null,u=null;for(r in a)if(a.hasOwnProperty(r)){var c=a[r];if(c!=null)switch(r){case"name":n=c;break;case"type":i=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":o=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(D(137,e));break;default:ke(t,e,r,c,a,null)}}xw(t,o,s,l,u,i,n,!1);return;case"select":de("invalid",t),r=i=o=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":o=s;break;case"defaultValue":i=s;break;case"multiple":r=s;default:ke(t,e,n,s,a,null)}e=o,a=i,t.multiple=!!r,e!=null?Yi(t,!!r,e,!1):a!=null&&Yi(t,!!r,a,!0);return;case"textarea":de("invalid",t),o=n=r=null;for(i in a)if(a.hasOwnProperty(i)&&(s=a[i],s!=null))switch(i){case"value":r=s;break;case"defaultValue":n=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(D(91));break;default:ke(t,e,i,s,a,null)}Sw(t,r,n,o);return;case"option":for(l in a)a.hasOwnProperty(l)&&(r=a[l],r!=null)&&(l==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":ke(t,e,l,r,a,null));return;case"dialog":de("beforetoggle",t),de("toggle",t),de("cancel",t),de("close",t);break;case"iframe":case"object":de("load",t);break;case"video":case"audio":for(r=0;r<du.length;r++)de(du[r],t);break;case"image":de("error",t),de("load",t);break;case"details":de("toggle",t);break;case"embed":case"source":case"link":de("error",t),de("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(r=a[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(D(137,e));default:ke(t,e,u,r,a,null)}return;default:if(Mv(e)){for(c in a)a.hasOwnProperty(c)&&(r=a[c],r!==void 0&&gv(t,e,c,r,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(r=a[s],r!=null&&ke(t,e,s,r,a,null))}function RO(t,e,a,r){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,o=null,i=null,s=null,l=null,u=null,c=null;for(h in a){var d=a[h];if(a.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(h)||ke(t,e,h,null,r,d)}}for(var f in r){var h=r[f];if(d=a[f],r.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":o=h;break;case"name":n=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":i=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(D(137,e));break;default:h!==d&&ke(t,e,f,h,r,d)}}zg(t,i,s,l,u,c,o,n);return;case"select":h=i=s=f=null;for(o in a)if(l=a[o],a.hasOwnProperty(o)&&l!=null)switch(o){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(o)||ke(t,e,o,null,r,l)}for(n in r)if(o=r[n],l=a[n],r.hasOwnProperty(n)&&(o!=null||l!=null))switch(n){case"value":f=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:o!==l&&ke(t,e,n,o,r,l)}e=s,a=i,r=h,f!=null?Yi(t,!!a,f,!1):!!r!=!!a&&(e!=null?Yi(t,!!a,e,!0):Yi(t,!!a,a?[]:"",!1));return;case"textarea":h=f=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ke(t,e,s,null,r,n)}for(i in r)if(n=r[i],o=a[i],r.hasOwnProperty(i)&&(n!=null||o!=null))switch(i){case"value":f=n;break;case"defaultValue":h=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(D(91));break;default:n!==o&&ke(t,e,i,n,r,o)}bw(t,f,h);return;case"option":for(var S in a)f=a[S],a.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S)&&(S==="selected"?t.selected=!1:ke(t,e,S,null,r,f));for(l in r)f=r[l],h=a[l],r.hasOwnProperty(l)&&f!==h&&(f!=null||h!=null)&&(l==="selected"?t.selected=f&&typeof f!="function"&&typeof f!="symbol":ke(t,e,l,f,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in a)f=a[x],a.hasOwnProperty(x)&&f!=null&&!r.hasOwnProperty(x)&&ke(t,e,x,null,r,f);for(u in r)if(f=r[u],h=a[u],r.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(D(137,e));break;default:ke(t,e,u,f,r,h)}return;default:if(Mv(e)){for(var b in a)f=a[b],a.hasOwnProperty(b)&&f!==void 0&&!r.hasOwnProperty(b)&&gv(t,e,b,void 0,r,f);for(c in r)f=r[c],h=a[c],!r.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||gv(t,e,c,f,r,h);return}}for(var g in a)f=a[g],a.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g)&&ke(t,e,g,null,r,f);for(d in r)f=r[d],h=a[d],!r.hasOwnProperty(d)||f===h||f==null&&h==null||ke(t,e,d,f,r,h)}function PC(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MO(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var n=a[r],o=n.transferSize,i=n.initiatorType,s=n.duration;if(o&&s&&PC(i)){for(i=0,s=n.responseEnd,r+=1;r<a.length;r++){var l=a[r],u=l.startTime;if(u>s)break;var c=l.transferSize,d=l.initiatorType;c&&PC(d)&&(l=l.responseEnd,i+=c*(l<s?1:(s-u)/(l-u)))}if(--r,e+=8*(o+i)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var vv=null,yv=null;function hf(t){return t.nodeType===9?t:t.ownerDocument}function NC(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kk(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function xv(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Eg=null;function OO(){var t=window.event;return t&&t.type==="popstate"?t===Eg?!1:(Eg=t,!0):(Eg=null,!1)}var Ik=typeof setTimeout=="function"?setTimeout:void 0,DO=typeof clearTimeout=="function"?clearTimeout:void 0,FC=typeof Promise=="function"?Promise:void 0,BO=typeof queueMicrotask=="function"?queueMicrotask:typeof FC<"u"?function(t){return FC.resolve(null).then(t).catch(PO)}:Ik;function PO(t){setTimeout(function(){throw t})}function Jn(t){return t==="head"}function HC(t,e){var a=e,r=0;do{var n=a.nextSibling;if(t.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(n),ps(e);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")tu(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,tu(a);for(var o=a.firstChild;o;){var i=o.nextSibling,s=o.nodeName;o[bu]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=i}}else a==="body"&&tu(t.ownerDocument.body);a=n}while(a);ps(e)}function UC(t,e){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function bv(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":bv(a),Rv(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function NO(t,e,a,r){for(;t.nodeType===1;){var n=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[bu])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(o=t.getAttribute("rel"),o==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(o!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(o=t.getAttribute("src"),(o!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&o&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var o=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===o)return t}else return t;if(t=Na(t.nextSibling),t===null)break}return null}function FO(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Na(t.nextSibling),t===null))return null;return t}function Ak(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Na(t.nextSibling),t===null))return null;return t}function Sv(t){return t.data==="$?"||t.data==="$~"}function _v(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function HO(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var r=function(){e(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Na(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Cv=null;function zC(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return Na(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function qC(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function Ek(t,e,a){switch(e=hf(a),t){case"html":if(t=e.documentElement,!t)throw Error(D(452));return t;case"head":if(t=e.head,!t)throw Error(D(453));return t;case"body":if(t=e.body,!t)throw Error(D(454));return t;default:throw Error(D(451))}}function tu(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Rv(t)}var Fa=new Map,VC=new Set;function mf(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Kr=_e.d;_e.d={f:UO,r:zO,D:qO,C:VO,L:$O,m:jO,X:WO,S:GO,M:ZO};function UO(){var t=Kr.f(),e=Mf();return t||e}function zO(t){var e=ms(t);e!==null&&e.tag===5&&e.type==="form"?_L(e):Kr.r(t)}var xs=typeof document>"u"?null:document;function Tk(t,e,a){var r=xs;if(r&&typeof e=="string"&&e){var n=Oa(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),VC.has(n)||(VC.add(n),t={rel:t,crossOrigin:a,href:e},r.querySelector(n)===null&&(e=r.createElement("link"),Et(e,"link",t),bt(e),r.head.appendChild(e)))}}function qO(t){Kr.D(t),Tk("dns-prefetch",t,null)}function VO(t,e){Kr.C(t,e),Tk("preconnect",t,e)}function $O(t,e,a){Kr.L(t,e,a);var r=xs;if(r&&t&&e){var n='link[rel="preload"][as="'+Oa(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Oa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Oa(a.imageSizes)+'"]')):n+='[href="'+Oa(t)+'"]';var o=n;switch(e){case"style":o=fs(t);break;case"script":o=bs(t)}Fa.has(o)||(t=Ue({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Fa.set(o,t),r.querySelector(n)!==null||e==="style"&&r.querySelector(ku(o))||e==="script"&&r.querySelector(Iu(o))||(e=r.createElement("link"),Et(e,"link",t),bt(e),r.head.appendChild(e)))}}function jO(t,e){Kr.m(t,e);var a=xs;if(a&&t){var r=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Oa(r)+'"][href="'+Oa(t)+'"]',o=n;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=bs(t)}if(!Fa.has(o)&&(t=Ue({rel:"modulepreload",href:t},e),Fa.set(o,t),a.querySelector(n)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Iu(o)))return}r=a.createElement("link"),Et(r,"link",t),bt(r),a.head.appendChild(r)}}}function GO(t,e,a){Kr.S(t,e,a);var r=xs;if(r&&t){var n=Ki(r).hoistableStyles,o=fs(t);e=e||"default";var i=n.get(o);if(!i){var s={loading:0,preload:null};if(i=r.querySelector(ku(o)))s.loading=5;else{t=Ue({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Fa.get(o))&&gy(t,a);var l=i=r.createElement("link");bt(l),Et(l,"link",t),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ud(i,e,r)}i={type:"stylesheet",instance:i,count:1,state:s},n.set(o,i)}}}function WO(t,e){Kr.X(t,e);var a=xs;if(a&&t){var r=Ki(a).hoistableScripts,n=bs(t),o=r.get(n);o||(o=a.querySelector(Iu(n)),o||(t=Ue({src:t,async:!0},e),(e=Fa.get(n))&&vy(t,e),o=a.createElement("script"),bt(o),Et(o,"link",t),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(n,o))}}function ZO(t,e){Kr.M(t,e);var a=xs;if(a&&t){var r=Ki(a).hoistableScripts,n=bs(t),o=r.get(n);o||(o=a.querySelector(Iu(n)),o||(t=Ue({src:t,async:!0,type:"module"},e),(e=Fa.get(n))&&vy(t,e),o=a.createElement("script"),bt(o),Et(o,"link",t),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(n,o))}}function $C(t,e,a,r){var n=(n=Hn.current)?mf(n):null;if(!n)throw Error(D(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=fs(a.href),a=Ki(n).hoistableStyles,r=a.get(e),r||(r={type:"style",instance:null,count:0,state:null},a.set(e,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=fs(a.href);var o=Ki(n).hoistableStyles,i=o.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(t,i),(o=n.querySelector(ku(t)))&&!o._p&&(i.instance=o,i.state.loading=5),Fa.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Fa.set(t,a),o||XO(n,t,a,i.state))),e&&r===null)throw Error(D(528,""));return i}if(e&&r!==null)throw Error(D(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=bs(a),a=Ki(n).hoistableScripts,r=a.get(e),r||(r={type:"script",instance:null,count:0,state:null},a.set(e,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(D(444,t))}}function fs(t){return'href="'+Oa(t)+'"'}function ku(t){return'link[rel="stylesheet"]['+t+"]"}function Rk(t){return Ue({},t,{"data-precedence":t.precedence,precedence:null})}function XO(t,e,a,r){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?r.loading=1:(e=t.createElement("link"),r.preload=e,e.addEventListener("load",function(){return r.loading|=1}),e.addEventListener("error",function(){return r.loading|=2}),Et(e,"link",a),bt(e),t.head.appendChild(e))}function bs(t){return'[src="'+Oa(t)+'"]'}function Iu(t){return"script[async]"+t}function jC(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var r=t.querySelector('style[data-href~="'+Oa(a.href)+'"]');if(r)return e.instance=r,bt(r),r;var n=Ue({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),bt(r),Et(r,"style",n),Ud(r,a.precedence,t),e.instance=r;case"stylesheet":n=fs(a.href);var o=t.querySelector(ku(n));if(o)return e.state.loading|=4,e.instance=o,bt(o),o;r=Rk(a),(n=Fa.get(n))&&gy(r,n),o=(t.ownerDocument||t).createElement("link"),bt(o);var i=o;return i._p=new Promise(function(s,l){i.onload=s,i.onerror=l}),Et(o,"link",r),e.state.loading|=4,Ud(o,a.precedence,t),e.instance=o;case"script":return o=bs(a.src),(n=t.querySelector(Iu(o)))?(e.instance=n,bt(n),n):(r=a,(n=Fa.get(o))&&(r=Ue({},a),vy(r,n)),t=t.ownerDocument||t,n=t.createElement("script"),bt(n),Et(n,"link",r),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(D(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(r=e.instance,e.state.loading|=4,Ud(r,a.precedence,t));return e.instance}function Ud(t,e,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=r.length?r[r.length-1]:null,o=n,i=0;i<r.length;i++){var s=r[i];if(s.dataset.precedence===e)o=s;else if(o!==n)break}o?o.parentNode.insertBefore(t,o.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function gy(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function vy(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var zd=null;function GC(t,e,a){if(zd===null){var r=new Map,n=zd=new Map;n.set(a,r)}else n=zd,r=n.get(a),r||(r=new Map,n.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),n=0;n<a.length;n++){var o=a[n];if(!(o[bu]||o[kt]||t==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var i=o.getAttribute(e)||"";i=t+i;var s=r.get(i);s?s.push(o):r.set(i,[o])}}return r}function WC(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function KO(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Mk(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function YO(t,e,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=fs(r.href),o=e.querySelector(ku(n));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=gf.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=o,bt(o);return}o=e.ownerDocument||e,r=Rk(r),(n=Fa.get(n))&&gy(r,n),o=o.createElement("link"),bt(o);var i=o;i._p=new Promise(function(s,l){i.onload=s,i.onerror=l}),Et(o,"link",r),a.instance=o}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=gf.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Tg=0;function QO(t,e){return t.stylesheets&&t.count===0&&qd(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&qd(t,t.stylesheets),t.unsuspend){var o=t.unsuspend;t.unsuspend=null,o()}},6e4+e);0<t.imgBytes&&Tg===0&&(Tg=62500*MO());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&qd(t,t.stylesheets),t.unsuspend)){var o=t.unsuspend;t.unsuspend=null,o()}},(t.imgBytes>Tg?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(n)}}:null}function gf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var vf=null;function qd(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,vf=new Map,e.forEach(JO,t),vf=null,gf.call(t))}function JO(t,e){if(!(e.state.loading&4)){var a=vf.get(t);if(a)var r=a.get(null);else{a=new Map,vf.set(t,a);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<n.length;o++){var i=n[o];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(a.set(i.dataset.precedence,i),r=i)}r&&a.set(null,r)}n=e.instance,i=n.getAttribute("data-precedence"),o=a.get(i)||r,o===r&&a.set(null,n),a.set(i,n),this.count++,r=gf.bind(this),n.addEventListener("load",r),n.addEventListener("error",r),o?o.parentNode.insertBefore(n,o.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var pu={$$typeof:Hr,Provider:null,Consumer:null,_currentValue:Ro,_currentValue2:Ro,_threadCount:0};function eD(t,e,a,r,n,o,i,s,l){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ag(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ag(0),this.hiddenUpdates=ag(null),this.identifierPrefix=r,this.onUncaughtError=n,this.onCaughtError=o,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Ok(t,e,a,r,n,o,i,s,l,u,c,d){return t=new eD(t,e,a,i,l,u,c,d,s),e=1,o===!0&&(e|=24),o=fa(3,null,null,e),t.current=o,o.stateNode=t,e=Vv(),e.refCount++,t.pooledCache=e,e.refCount++,o.memoizedState={element:r,isDehydrated:a,cache:e},Gv(o),t}function Dk(t){return t?(t=Gi,t):Gi}function Bk(t,e,a,r,n,o){n=Dk(n),r.context===null?r.context=n:r.pendingContext=n,r=zn(e),r.payload={element:a},o=o===void 0?null:o,o!==null&&(r.callback=o),a=qn(t,r,e),a!==null&&(ea(a,t,e),Wl(a,t,e))}function ZC(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function yy(t,e){ZC(t,e),(t=t.alternate)&&ZC(t,e)}function Pk(t){if(t.tag===13||t.tag===31){var e=$o(t,67108864);e!==null&&ea(e,t,67108864),yy(t,67108864)}}function XC(t){if(t.tag===13||t.tag===31){var e=va();e=Ev(e);var a=$o(t,e);a!==null&&ea(a,t,e),yy(t,e)}}var yf=!0;function tD(t,e,a,r){var n=ae.T;ae.T=null;var o=_e.p;try{_e.p=2,xy(t,e,a,r)}finally{_e.p=o,ae.T=n}}function aD(t,e,a,r){var n=ae.T;ae.T=null;var o=_e.p;try{_e.p=8,xy(t,e,a,r)}finally{_e.p=o,ae.T=n}}function xy(t,e,a,r){if(yf){var n=wv(r);if(n===null)Ag(t,e,r,xf,a),KC(t,r);else if(nD(n,t,e,a,r))r.stopPropagation();else if(KC(t,r),e&4&&-1<rD.indexOf(t)){for(;n!==null;){var o=ms(n);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var i=Ao(o.pendingLanes);if(i!==0){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;i;){var l=1<<31-ga(i);s.entanglements[1]|=l,i&=~l}br(o),(Se&6)===0&&(lf=ha()+500,Lu(0,!1))}}break;case 31:case 13:s=$o(o,2),s!==null&&ea(s,o,2),Mf(),yy(o,2)}if(o=wv(r),o===null&&Ag(t,e,r,xf,a),o===n)break;n=o}n!==null&&r.stopPropagation()}else Ag(t,e,r,null,a)}}function wv(t){return t=Ov(t),by(t)}var xf=null;function by(t){if(xf=null,t=Ui(t),t!==null){var e=gu(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=aw(e),t!==null)return t;t=null}else if(a===31){if(t=rw(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return xf=t,null}function Nk(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($2()){case sw:return 2;case lw:return 8;case Wd:case j2:return 32;case uw:return 268435456;default:return 32}default:return 32}}var Lv=!1,jn=null,Gn=null,Wn=null,hu=new Map,mu=new Map,On=[],rD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function KC(t,e){switch(t){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Wn=null;break;case"pointerover":case"pointerout":hu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(e.pointerId)}}function Pl(t,e,a,r,n,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:a,eventSystemFlags:r,nativeEvent:o,targetContainers:[n]},e!==null&&(e=ms(e),e!==null&&Pk(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function nD(t,e,a,r,n){switch(e){case"focusin":return jn=Pl(jn,t,e,a,r,n),!0;case"dragenter":return Gn=Pl(Gn,t,e,a,r,n),!0;case"mouseover":return Wn=Pl(Wn,t,e,a,r,n),!0;case"pointerover":var o=n.pointerId;return hu.set(o,Pl(hu.get(o)||null,t,e,a,r,n)),!0;case"gotpointercapture":return o=n.pointerId,mu.set(o,Pl(mu.get(o)||null,t,e,a,r,n)),!0}return!1}function Fk(t){var e=Ui(t.target);if(e!==null){var a=gu(e);if(a!==null){if(e=a.tag,e===13){if(e=aw(a),e!==null){t.blockedOn=e,O_(t.priority,function(){XC(a)});return}}else if(e===31){if(e=rw(a),e!==null){t.blockedOn=e,O_(t.priority,function(){XC(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Vd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=wv(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);Vg=r,a.target.dispatchEvent(r),Vg=null}else return e=ms(a),e!==null&&Pk(e),t.blockedOn=a,!1;e.shift()}return!0}function YC(t,e,a){Vd(t)&&a.delete(e)}function oD(){Lv=!1,jn!==null&&Vd(jn)&&(jn=null),Gn!==null&&Vd(Gn)&&(Gn=null),Wn!==null&&Vd(Wn)&&(Wn=null),hu.forEach(YC),mu.forEach(YC)}function Id(t,e){t.blockedOn===e&&(t.blockedOn=null,Lv||(Lv=!0,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,oD)))}var Ad=null;function QC(t){Ad!==t&&(Ad=t,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,function(){Ad===t&&(Ad=null);for(var e=0;e<t.length;e+=3){var a=t[e],r=t[e+1],n=t[e+2];if(typeof r!="function"){if(by(r||a)===null)continue;break}var o=ms(a);o!==null&&(t.splice(e,3),e-=3,ov(o,{pending:!0,data:n,method:a.method,action:r},r,n))}}))}function ps(t){function e(l){return Id(l,t)}jn!==null&&Id(jn,t),Gn!==null&&Id(Gn,t),Wn!==null&&Id(Wn,t),hu.forEach(e),mu.forEach(e);for(var a=0;a<On.length;a++){var r=On[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<On.length&&(a=On[0],a.blockedOn===null);)Fk(a),a.blockedOn===null&&On.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var n=a[r],o=a[r+1],i=n[ta]||null;if(typeof o=="function")i||QC(a);else if(i){var s=null;if(o&&o.hasAttribute("formAction")){if(n=o,i=o[ta]||null)s=i.formAction;else if(by(n)!==null)continue}else s=i.action;typeof s=="function"?a[r+1]=s:(a.splice(r,3),r-=3),QC(a)}}}function Hk(){function t(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Sy(t){this._internalRoot=t}Bf.prototype.render=Sy.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(D(409));var a=e.current,r=va();Bk(a,r,t,e,null,null)};Bf.prototype.unmount=Sy.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Bk(t.current,2,null,t,null,null),Mf(),e[hs]=null}};function Bf(t){this._internalRoot=t}Bf.prototype.unstable_scheduleHydration=function(t){if(t){var e=hw();t={blockedOn:null,target:t,priority:e};for(var a=0;a<On.length&&e!==0&&e<On[a].priority;a++);On.splice(a,0,t),a===0&&Fk(t)}};var JC=ew.version;if(JC!=="19.2.1")throw Error(D(527,JC,"19.2.1"));_e.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(D(188)):(t=Object.keys(t).join(","),Error(D(268,t)));return t=N2(e),t=t!==null?nw(t):null,t=t===null?null:t.stateNode,t};var iD={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Nl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Nl.isDisabled&&Nl.supportsFiber))try{vu=Nl.inject(iD),ma=Nl}catch{}var Nl;Pf.createRoot=function(t,e){if(!tw(t))throw Error(D(299));var a=!1,r="",n=TL,o=RL,i=ML;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(o=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Ok(t,1,!1,null,null,a,r,null,n,o,i,Hk),t[hs]=e.current,my(t),new Sy(e)};Pf.hydrateRoot=function(t,e,a){if(!tw(t))throw Error(D(299));var r=!1,n="",o=TL,i=RL,s=ML,l=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(i=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(l=a.formState)),e=Ok(t,1,!0,e,a??null,r,n,l,o,i,s,Hk),e.context=Dk(null),a=e.current,r=va(),r=Ev(r),n=zn(r),n.callback=null,qn(a,n,r),a=r,e.current.lanes=a,xu(e,a),br(e),t[hs]=e.current,my(t),new Bf(e)};Pf.version="19.2.1"});var Go=fr((TU,qk)=>{"use strict";function zk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zk)}catch(t){console.error(t)}}zk(),qk.exports=Uk()});var F1=fr(tp=>{"use strict";var tB=Symbol.for("react.transitional.element"),aB=Symbol.for("react.fragment");function N1(t,e,a){var r=null;if(a!==void 0&&(r=""+a),e.key!==void 0&&(r=""+e.key),"key"in e){a={};for(var n in e)n!=="key"&&(a[n]=e[n])}else a=e;return e=a.ref,{$$typeof:tB,type:t,key:r,ref:e!==void 0?e:null,props:a}}tp.Fragment=aB;tp.jsx=N1;tp.jsxs=N1});var Ae=fr((W5,H1)=>{"use strict";H1.exports=F1()});var SU={};QS(SU,{ANIMATION_KEYFRAMES:()=>Cl,ActivationConfigZ:()=>Kc,AddClassZ:()=>fS,AnchorIdZ:()=>Ia,AnchorStateZ:()=>TR,AnchorVisibleConditionZ:()=>am,AppRegistry:()=>Pu,AugmentationZ:()=>RR,BadgePositionZ:()=>tS,BadgeZ:()=>yS,BoundingBoxZ:()=>ER,CanvasEvents:()=>Ts,CanvasRecipeZ:()=>hh,ConditionZ:()=>_n,ContextManager:()=>Yc,CooldownActiveConditionZ:()=>lm,CounterDefZ:()=>fl,CtaButtonZ:()=>fm,DEFAULT_COOLDOWN:()=>Bp,DEFAULT_TTL:()=>Dp,DecisionStrategyZ:()=>yl,DismissedConditionZ:()=>sm,EVENT_SCHEMA_VERSION:()=>et,EventBus:()=>ed,EventCountConditionZ:()=>cm,EventFilterZ:()=>NR,EventHistory:()=>bl,EventOccurredConditionZ:()=>rm,EventSourceZ:()=>OS,ExecutorRegistry:()=>Wc,ExternalStrategyZ:()=>vl,FrequencyEntryZ:()=>jR,FrequencyLimitConditionZ:()=>um,HighlightStepZ:()=>hE,HighlightStyleZ:()=>eS,HighlightZ:()=>gS,InsertHtmlZ:()=>mS,InsertPositionZ:()=>oS,InterventionTracker:()=>cl,MAX_VISIBLE_TOASTS:()=>Op,MatchOpZ:()=>dl,ModalContentZ:()=>nS,ModalZ:()=>bS,ModelStrategyZ:()=>gl,MountWidgetZ:()=>CS,NavigateZ:()=>_S,NavigationMonitor:()=>Sl,NormalizedEventZ:()=>PR,NotificationToastStack:()=>Mp,PageContextZ:()=>LR,PageHistoryEntryZ:()=>kR,PageUrlConditionZ:()=>em,ParallelZ:()=>kS,PlacementZ:()=>aS,PulseZ:()=>vS,RUNTIME_SDK_BUILD:()=>GS,RUNTIME_VERSION:()=>HS,RemoveClassZ:()=>pS,RouteConditionZ:()=>tm,RouteFilterZ:()=>Q0,RuleStrategyZ:()=>hl,RuleZ:()=>pl,RuntimeContextZ:()=>MR,RuntimeProvider:()=>Up,SDK_SCHEMA_VERSION:()=>tn,SDK_VERSION:()=>vp,STATIC_SLOT_STYLES:()=>NS,ScoreStrategyZ:()=>ml,ScrollBehaviorZ:()=>uS,ScrollLogicalPositionZ:()=>dm,ScrollToZ:()=>SS,SelectorZ:()=>jx,SequenceZ:()=>LS,SessionContextZ:()=>IR,SessionMetricConditionZ:()=>im,SessionMetricTracker:()=>hc,SetAttrZ:()=>dS,SetStyleZ:()=>hS,SetTextZ:()=>cS,ShadowCanvasOverlay:()=>xx,ShadowRootProvider:()=>nx,SmartCanvasApp:()=>Sx,SmartCanvasController:()=>Sp,SmartCanvasElement:()=>qp,SmartCanvasPortal:()=>n3,StandardEvents:()=>Ct,StateEqualsConditionZ:()=>nm,StateStore:()=>rd,StoredValueZ:()=>$R,Syntro:()=>jS,TileCard:()=>Ms,TileWheel:()=>UN,TooltipContentZ:()=>rS,TooltipStepZ:()=>pE,TooltipTriggerZ:()=>iS,TooltipZ:()=>xS,TourStepForSchemaZ:()=>lS,TourZ:()=>IS,TriggerWhenZ:()=>Xc,ViewportConditionZ:()=>om,ViewportContextZ:()=>AR,WaitZ:()=>wS,WidgetConfigZ:()=>sS,WidgetRegistry:()=>od,appRegistry:()=>Ls,applyStaticSlotStyles:()=>Sm,cleanupAppContext:()=>np,contentRuntime:()=>Nf,coreActionStepSchemas:()=>CR,createActionEngine:()=>Jh,createAnchorResolver:()=>pm,createAppContext:()=>rp,createAppLoader:()=>ip,createCanvasConfigFetcher:()=>ni,createContextManager:()=>hm,createDecisionEngine:()=>mm,createEventAccumulator:()=>gm,createEventBus:()=>xl,createGrowthBookClient:()=>sh,createNoopClient:()=>gh,createOverlayRecipeFetcher:()=>r3,createPostHogClient:()=>Xh,createPostHogNormalizer:()=>ix,createSessionMetricTracker:()=>lh,createSmartCanvas:()=>Vp,createSmartCanvasController:()=>rx,createSmartCanvasRuntime:()=>Tm,createStateStore:()=>bm,createSurfaceContainer:()=>km,createSurfaces:()=>Am,decisionSchemas:()=>V4,decodeToken:()=>wl,encodeToken:()=>Rm,evaluate:()=>RS,evaluateCondition:()=>ES,evaluateRule:()=>TS,evaluateRuleStrategy:()=>Qc,evaluateScoreStrategy:()=>Jc,evaluateSync:()=>MS,executorRegistry:()=>Tr,getAntiFlickerSnippet:()=>RI,getAppIdFromActionKind:()=>Py,getAppIdFromWidgetId:()=>op,getExecutor:()=>yR,getSlotAnchorId:()=>nd,getSlotType:()=>_l,getSlotZIndex:()=>Im,hasExecutor:()=>Kh,interpolateTemplate:()=>ic,isCoreActionKind:()=>By,matchEvent:()=>Pp,needsMigration:()=>$N,normalizePostHogEvent:()=>As,overlaysRuntime:()=>ap,parseVersion:()=>Ds,playEnterAnimation:()=>wm,playExitAnimation:()=>Lm,registerConfigPredicates:()=>$u,registerSmartCanvasElement:()=>Cx,resolveConfigUri:()=>yp,setupAdjacentPositioning:()=>_m,setupInlinePositioning:()=>Cm,shouldNormalizeEvent:()=>Es,useDecision:()=>nA,useNotifications:()=>Np,useNotifyWatcher:()=>Hp,usePageContext:()=>zp,useRuntime:()=>Cr,useRuntimeContext:()=>sc,useRuntimeEvents:()=>aA,useRuntimeState:()=>rA,useSessionContext:()=>eA,useShadowCanvasConfig:()=>bx,useShadowRoot:()=>oi,useViewportContext:()=>tA,validateAction:()=>dr,validateActions:()=>Zc,validateActivationConfig:()=>q4,validateCondition:()=>U4,validateConfig:()=>zN,validateEventFilter:()=>iU,validateEventName:()=>vm,validateFrequencyEntry:()=>dU,validateNormalizedEvent:()=>oU,validateProps:()=>ym,validateRecipe:()=>a3,validateRuntimeContext:()=>tU,validateStoredValue:()=>cU,validateStrategy:()=>z4,widgetRegistry:()=>Em});var s2=Y(Ye(),1),Mm=Y(Il(),1),bU=Y(Go(),1);function Vk(t,e,a,r){let n=r?.maxRetries??3,o=r?.debounceMs??50,i=t.parentElement??e.parentElement;if(!i)return()=>{};let s=0,l=null,u=!1,c=new MutationObserver(d=>{if(!u){for(let f of d)for(let h of f.removedNodes)if(h===t){if(s>=n){c.disconnect(),u=!0;return}l&&clearTimeout(l),l=setTimeout(()=>{if(!u){if(!e.isConnected){c.disconnect(),u=!0;return}s++;try{a()}catch{c.disconnect(),u=!0}}},o);return}}});return c.observe(i,{childList:!0,subtree:!0}),()=>{u=!0,c.disconnect(),l&&clearTimeout(l)}}var sD=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button","svg","path","circle","line","polyline","polygon","rect","g"]);function _y(t){if(typeof window.Sanitizer=="function")try{let l=new window.Sanitizer({}).sanitizeToFragment(t),u=document.createElement("div");return u.append(l),u.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=[];for(;n.nextNode();){let s=n.currentNode,l=s.tagName.toLowerCase();if(!sD.has(l)){o.push(s);continue}for(let u of Array.from(s.attributes)){let c=u.name.toLowerCase(),d=u.value.trim().toLowerCase(),f=c.startsWith("on"),S=(c==="href"||c==="src"||c==="formaction")&&(d.startsWith("javascript:")||d.startsWith("vbscript:")||d.startsWith("data:text/html"));(f||S)&&s.removeAttribute(u.name)}}let i=Array.from(r.querySelectorAll("svg"));for(let s of i)o.some(l=>s.contains(l)&&l.tagName.toLowerCase()==="script")&&o.push(s);for(let s of o){for(;s.firstChild;)s.parentNode?.insertBefore(s.firstChild,s);s.remove()}return a.innerHTML}var $k=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=_y(t.html),n="data-syntro-insert-label",o=t.label;if(o){let d=CSS.escape(o),h=(a.parentElement??a).querySelector(`[${n}="${d}"]`);h&&h.remove()}let i=document.createElement("div");i.setAttribute("data-syntro-action-id",e.generateId()),o&&i.setAttribute(n,o),i.innerHTML=r;let s=null;switch(t.position){case"before":a.insertAdjacentElement("beforebegin",i);break;case"after":a.insertAdjacentElement("afterend",i);break;case"prepend":a.insertBefore(i,a.firstChild);break;case"append":a.appendChild(i);break;case"replace":s=a.innerHTML,a.replaceWith(i);break}let l=null;if(t.deepLink){let{tileId:d,itemId:f}=t.deepLink;l=()=>{let h=window.SynOS?.handle;h&&(h.open(),h.runtime?.events?.publish("notification.deep_link",{tileId:d,itemId:f}))},i.style.cursor="pointer",i.addEventListener("click",l)}e.publishEvent("action.applied",{id:e.generateId(),kind:"content:insertHtml",anchorId:t.anchorId,position:t.position});let c=Vk(i,a,()=>{switch(t.position){case"before":a.insertAdjacentElement("beforebegin",i);break;case"after":a.insertAdjacentElement("afterend",i);break;case"prepend":a.insertBefore(i,a.firstChild);break;case"append":a.appendChild(i);break;case"replace":break}});return{cleanup:()=>{if(l&&i.removeEventListener("click",l),c(),!!i.isConnected)try{if(t.position==="replace"&&s!==null){let d=document.createElement(a.tagName);d.innerHTML=s,Array.from(a.attributes).forEach(f=>{d.setAttribute(f.name,f.value)}),i.replaceWith(d)}else i.remove()}catch{}},updateFn:d=>{"html"in d&&typeof d.html=="string"&&(i.innerHTML=_y(d.html))}}},jk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.textContent??"";return a.textContent=t.text,e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setText",anchorId:t.anchorId}),{cleanup:()=>{a.isConnected&&(a.textContent=r)},updateFn:n=>{"text"in n&&typeof n.text=="string"&&(a.textContent=n.text)}}},Gk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=t.attr.toLowerCase();if(r.startsWith("on"))throw new Error(`Dangerous attribute not allowed: ${t.attr}`);if(r==="href"||r==="src"||r==="formaction"){let s=t.value.trim().toLowerCase();if(s.startsWith("javascript:")||s.startsWith("vbscript:")||s.startsWith("data:text/html"))throw new Error(`Dangerous URL not allowed in ${t.attr}: ${t.value}`)}let o=a.getAttribute(t.attr),i=a.hasAttribute(t.attr);return a.setAttribute(t.attr,t.value),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setAttr",anchorId:t.anchorId,attr:t.attr}),{cleanup:()=>{a.isConnected&&(i&&o!==null?a.setAttribute(t.attr,o):a.removeAttribute(t.attr))},updateFn:s=>{"value"in s&&typeof s.value=="string"&&a.setAttribute(t.attr,s.value)}}},Wk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.classList.contains(t.className);return a.classList.add(t.className),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:addClass",anchorId:t.anchorId,className:t.className}),{cleanup:()=>{a.isConnected&&(r||a.classList.remove(t.className))}}},Zk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.classList.contains(t.className);return a.classList.remove(t.className),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:removeClass",anchorId:t.anchorId,className:t.className}),{cleanup:()=>{a.isConnected&&r&&a.classList.add(t.className)}}},Xk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=new Map;for(let n of Object.keys(t.styles)){let o=a.style.getPropertyValue(n);r.set(n,o)}for(let[n,o]of Object.entries(t.styles))a.style.setProperty(n,o);return e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setStyle",anchorId:t.anchorId,styles:Object.keys(t.styles)}),{cleanup:()=>{if(a.isConnected)for(let[n,o]of r)o?a.style.setProperty(n,o):a.style.removeProperty(n)},updateFn:n=>{if("styles"in n&&typeof n.styles=="object"&&n.styles)for(let[o,i]of Object.entries(n.styles))a.style.setProperty(o,i)}}},Cy=[{kind:"content:insertHtml",executor:$k},{kind:"content:setText",executor:jk},{kind:"content:setAttr",executor:Gk},{kind:"content:addClass",executor:Wk},{kind:"content:removeClass",executor:Zk},{kind:"content:setStyle",executor:Xk}],Nf={id:"adaptive-content",version:"1.0.0",name:"Content",description:"DOM manipulation for text, attributes, and styles",executors:Cy};var lD={light:50,medium:100,heavy:200},uD=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff"],Kk={init(t,e,a){let r=lD[a.intensity],n=a.colors.length>0?a.colors:uD,o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*-e*.3,vx:(Math.random()-.5)*4,vy:Math.random()*2+1,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.2,size:Math.random()*6+4,color:n[Math.floor(Math.random()*n.length)],opacity:1,shape:Math.random()>.5?"rect":"circle"});return o},update(t,e,a){let r=!1;for(let n of t)n.vy+=.15,n.vx*=.99,n.x+=n.vx,n.y+=n.vy,n.rotation+=n.rotationSpeed,n.y>0&&n.opacity>0&&n.y>500&&(n.opacity-=.02,n.opacity<0&&(n.opacity=0)),n.opacity>.01&&(r=!0);return r},render(t,e){for(let a of e)a.opacity<.01||(t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.translate(a.x,a.y),t.rotate(a.rotation),a.shape==="circle"?(t.beginPath(),t.arc(0,0,a.size/2,0,Math.PI*2),t.fill()):t.fillRect(-a.size/2,-a.size/2,a.size,a.size*.6),t.restore())}};var cD={light:20,medium:40,heavy:80},dD="\u{1F389}",Yk={init(t,e,a){let r=cD[a.intensity],n=typeof a.props?.emoji=="string"?a.props.emoji:dD,o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*-200,vx:0,vy:Math.random()*1.5+1,rotation:0,rotationSpeed:0,size:Math.random()*12+16,color:"#000000",opacity:1,shape:"emoji",emoji:n,data:{wobblePhase:Math.random()*Math.PI*2,wobbleAmp:Math.random()*1.5+.5,originX:0}});for(let i of o)i.data&&(i.data.originX=i.x);return o},update(t,e,a){let r=!1;for(let n of t){n.y+=n.vy;let o=n.data?.wobblePhase??0,i=n.data?.wobbleAmp??1,s=n.data?.originX??n.x;n.x=s+Math.sin(a*.003+o)*i*20,n.y>600&&(n.opacity-=.02,n.opacity<0&&(n.opacity=0)),n.opacity>.01&&(r=!0)}return r},render(t,e){for(let a of e)a.opacity<.01||!a.emoji||(t.save(),t.globalAlpha=a.opacity,t.font=`${a.size}px serif`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.emoji,a.x,a.y),t.restore())}};var fD={light:20,medium:40,heavy:80},pD={light:3,medium:4,heavy:5},Qk={init(t,e,a){let r=fD[a.intensity],n=pD[a.intensity],o=a.colors.length>0?a.colors:["#ff4444","#44ff44","#4444ff"],i=[];for(let s=0;s<n;s++){let l=Math.random()*t*.8+t*.1,u=Math.random()*e*.6,c=o[Math.floor(Math.random()*o.length)];for(let d=0;d<r;d++){let f=Math.PI*2*d/r+(Math.random()-.5)*.3,h=Math.random()*3+2;i.push({x:l,y:u,vx:Math.cos(f)*h,vy:Math.sin(f)*h,rotation:0,rotationSpeed:0,size:Math.random()*3+2,color:c,opacity:1,shape:"circle",data:{centerX:l,centerY:u}})}}return i},update(t,e,a){let r=!1;for(let n of t)n.vx*=.97,n.vy*=.97,n.vy+=.03,n.x+=n.vx,n.y+=n.vy,n.opacity-=.008,n.opacity<0&&(n.opacity=0),n.opacity>.01&&(r=!0);return r},render(t,e){for(let a of e)a.opacity<.01||(t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.shadowBlur=12,t.shadowColor=a.color,t.beginPath(),t.arc(a.x,a.y,a.size,0,Math.PI*2),t.fill(),t.restore())}};var hD={light:30,medium:60,heavy:120},Jk={init(t,e,a){let r=hD[a.intensity],n=a.colors.length>0?a.colors:["#ffd700","#ffffff","#fffacd"],o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*e,vx:(Math.random()-.5)*.3,vy:-(Math.random()*.5+.2),rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.1,size:Math.random()*4+2,color:n[Math.floor(Math.random()*n.length)],opacity:Math.random()*.5+.5,shape:"circle",data:{phase:Math.random()*Math.PI*2,baseOpacity:Math.random()*.5+.5}});return o},update(t,e,a){let r=!1;for(let n of t){n.x+=n.vx,n.y+=n.vy,n.rotation+=n.rotationSpeed,n.data&&(n.data.baseOpacity=(n.data.baseOpacity??1)-.001,n.data.baseOpacity<0&&(n.data.baseOpacity=0));let o=n.data?.phase??0,i=n.data?.baseOpacity??1;if(i<=.01)n.opacity=0;else{let s=Math.sin(a*.005+o)*.4+.6;n.opacity=i*s}n.opacity>.01&&(r=!0)}return r},render(t,e){for(let a of e){if(a.opacity<.01)continue;t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.translate(a.x,a.y),t.rotate(a.rotation);let r=a.size;t.beginPath(),t.moveTo(0,-r),t.lineTo(r*.3,-r*.3),t.lineTo(r,0),t.lineTo(r*.3,r*.3),t.lineTo(0,r),t.lineTo(-r*.3,r*.3),t.lineTo(-r,0),t.lineTo(-r*.3,-r*.3),t.closePath(),t.fill(),t.restore()}}};var Ff=class{constructor(){this.canvas=null,this.ctx=null,this.rafId=null,this.particles=[],this.startTime=0,this.lastFrame=0,this.duration=0,this.effect=null,this.container=null}start(e,a,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;this.container=e,this.effect=a,this.duration=r.duration;let o=document.createElement("canvas");o.setAttribute("data-syntro-celebrate",""),Object.assign(o.style,{position:"fixed",inset:"0",pointerEvents:"none",zIndex:"2147483646"});let i=window.devicePixelRatio||1,s=window.innerWidth,l=window.innerHeight;o.width=s*i,o.height=l*i,o.style.width=`${s}px`,o.style.height=`${l}px`;let u=o.getContext("2d");u&&(u.scale(i,i),this.canvas=o,this.ctx=u,e.appendChild(o),this.particles=a.init(s,l,r),this.startTime=performance.now(),this.lastFrame=this.startTime,this.tick=this.tick.bind(this),this.rafId=requestAnimationFrame(this.tick))}stop(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.canvas&&this.container&&(this.canvas.remove(),this.canvas=null),this.ctx=null,this.effect=null,this.container=null,this.particles=[]}tick(e){if(!this.ctx||!this.canvas||!this.effect)return;let a=e-this.startTime,r=e-this.lastFrame;if(this.lastFrame=e,a>=this.duration){this.stop();return}let n=this.canvas.width/(window.devicePixelRatio||1),o=this.canvas.height/(window.devicePixelRatio||1);if(this.ctx.clearRect(0,0,n,o),!this.effect.update(this.particles,r,a)){this.stop();return}this.effect.render(this.ctx,this.particles),this.rafId=requestAnimationFrame(this.tick)}};var mD=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff"];function gD(t,e){return[t,e,`${t}cc`,`${e}cc`,"#ffffff",`${t}80`]}function vD(t){try{let e=getComputedStyle(t),a=e.getPropertyValue("--sc-color-primary")?.trim(),r=e.getPropertyValue("--sc-color-primary-hover")?.trim();if(a?.startsWith("#")&&a.length>=7)return gD(a,r||a)}catch{}return null}var e1=new Map([["confetti",Kk],["fireworks",Qk],["sparkles",Jk],["emoji-rain",Yk]]),t1=async(t,e)=>{let a=e1.get(t.effect);if(!a)return console.warn(`[adaptive-overlays] Unknown celebration effect: "${t.effect}". Available: ${[...e1.keys()].join(", ")}`),{cleanup:()=>{}};let r=t.colors??vD(e.overlayRoot)??mD,n={duration:t.duration??3e3,intensity:t.intensity??"medium",colors:r,props:t.props},o=new Ff;return o.start(e.overlayRoot,a,n),e.publishEvent("action.applied",{id:e.generateId(),kind:"overlays:celebrate",effect:t.effect}),{cleanup:()=>{o.stop()}}};var Ly="syntro_active_tour",Hf=new Map;function yD(t){try{let e=localStorage.getItem(Ly);if(!e)return null;let a=JSON.parse(e);return a.tourId!==t?null:a}catch{return null}}function wy(t){try{localStorage.setItem(Ly,JSON.stringify(t))}catch{}}function xD(){try{localStorage.removeItem(Ly)}catch{}}function Au(){return window.location.pathname}function bD(t){if(!t.route)return!0;let e=Au();return t.route.includes("*")?new RegExp(`^${t.route.replace(/\*/g,".*")}$`).test(e):e===t.route}var ky=async(t,e)=>{let{tourId:a,steps:r,startStep:n,autoStart:o=!0}=t;if(r.length===0)throw new Error(`Tour "${a}" has no steps`);if(Hf.has(a))return{cleanup:async()=>{let y=Hf.get(a);y&&await y.cleanup()}};if(!e.applyAction)throw new Error("Tour executor requires applyAction in context");let i=yD(a),s=!!i;if(!s&&!o)return{cleanup:()=>{}};i||(i={tourId:a,currentStepId:n||r[0].id,startedAt:Date.now()},wy(i));let l=r.findIndex(y=>y.id===i.currentStepId);if(l===-1){let y=n||r[0].id;l=r.findIndex(v=>v.id===y),l===-1&&(l=0),i.currentStepId=r[l].id,wy(i)}let u=r[l];if(!bD(u))return e.publishEvent("tour.waiting_for_route",{tourId:a,stepId:u.id,expectedRoute:u.route,currentRoute:Au()}),{cleanup:()=>{}};let c=!1,d=null,f=null,h=null,S=async()=>{f&&(f(),f=null),d?.isApplied()&&(await d.revert(),d=null)},x=async y=>{if(c)return;if(await S(),y==="end"){xD(),e.publishEvent("tour.completed",{tourId:a,totalSteps:r.length}),c=!0;return}let v=r.find(C=>C.id===y);if(!v){console.error(`[Tour] Step "${y}" not found`);return}if(i.currentStepId=y,wy(i),e.publishEvent("tour.step_changed",{tourId:a,previousStepId:u.id,nextStepId:y}),v.route&&v.route!==Au()){e.publishEvent("tour.awaiting_navigation",{tourId:a,stepId:y,targetRoute:v.route});return}await b(v)},b=async y=>{if(!c){e.publishEvent("tour.step_started",{tourId:a,stepId:y.id,stepIndex:r.findIndex(v=>v.id===y.id),totalSteps:r.length});try{d=await e.applyAction(y.action)}catch(v){console.error(`[Tour] Failed to execute step "${y.id}":`,v),e.publishEvent("tour.step_failed",{tourId:a,stepId:y.id,error:String(v)});return}if(y.onAction&&e.subscribeEvent){f=e.subscribeEvent("action.modal_cta_clicked",w=>{let _=w?.actionId;if(_&&y.onAction){let L=y.onAction[_];L&&x(L)}});let v=e.subscribeEvent("action.tooltip_cta_clicked",w=>{let _=w?.actionId;if(_&&y.onAction){let L=y.onAction[_];L&&x(L)}}),C=f;f=()=>{C(),v()}}}};h=(()=>{let y=Au(),v=()=>{let _=Au();_!==y&&(y=_,e.publishEvent("tour.route_changed",{tourId:a,newRoute:_}))};if(e.subscribeNavigation)return e.subscribeNavigation(()=>v());window.addEventListener("popstate",v);let C=history.pushState.bind(history),w=history.replaceState.bind(history);return history.pushState=(..._)=>{C(..._),queueMicrotask(v)},history.replaceState=(..._)=>{w(..._),queueMicrotask(v)},()=>{window.removeEventListener("popstate",v),history.pushState=C,history.replaceState=w}})(),s?e.publishEvent("tour.resumed",{tourId:a,stepId:i.currentStepId}):e.publishEvent("tour.started",{tourId:a,totalSteps:r.length,startStepId:i.currentStepId}),await b(u);let m=async()=>{c=!0,Hf.delete(a),await S(),h&&h(),e.publishEvent("tour.paused",{tourId:a,stepId:i.currentStepId})};return Hf.set(a,{cleanup:m}),{cleanup:m}};var Ya={white:"#ffffff",black:"#000000"},ne={0:"#2c0b0a",1:"#5b1715",2:"#89221f",3:"#b72e2a",4:"#d44844",5:"#dd6d69",6:"#e5918f",7:"#eeb6b4",8:"#f6dada",9:"#faebea"},k={0:"#07080a",1:"#0f1318",2:"#0e1114",3:"#1c222a",4:"#2b333f",5:"#394454",6:"#475569",7:"#677384",8:"#87919f",9:"#a8afba",10:"#cbd0d7",11:"#e8eaee",12:"#f6f7f9"},Re={0:"#07230a",1:"#0e4514",2:"#16681e",3:"#1d8a28",4:"#24ad32",5:"#4fbd5a",6:"#7acd82",7:"#a5deab",8:"#d0eed3",9:"#e5f6e7"},Tt={0:"#301f09",1:"#5f3e12",2:"#8f5e1b",3:"#be7d24",4:"#ee9c2d",5:"#f1b057",6:"#f5c481",7:"#f8d7ab",8:"#fcebd5",9:"#fdf5ea"},Ge={0:"#330707",1:"#660f0e",2:"#991616",3:"#cc1e1d",4:"#ff2524",5:"#ff5150",6:"#ff7c7c",7:"#ffa8a7",8:"#ffd3d3",9:"#ffe9e9"},ba={0:"#051533",1:"#0a2a66",2:"#0f3f98",3:"#1454cb",4:"#1969fe",5:"#4787fe",6:"#75a5fe",7:"#a3c3ff",8:"#d1e1ff",9:"#e8f0ff"},Eu={0:"#662500",1:"#993d00",2:"#cc5800",3:"#ff7700",4:"#fea85d",5:"#fec58f",6:"#ffd6ae",7:"#fee6cd",8:"#fff1e1",9:"#fff8f0"},_t={0:"#151229",1:"#2a2452",2:"#40357c",3:"#5547a5",4:"#6a59ce",5:"#887ad8",6:"#a69be2",7:"#c3bdeb",8:"#e1def5",9:"#f0eefa"},Tu={0:"#37091f",1:"#69123c",2:"#9b1c58",3:"#cd2575",4:"#ff2e92",5:"#ff58a8",6:"#ff82be",7:"#ffabd3",8:"#ffd5e9",9:"#ffeaf4"};var Sa={primary:k[10],secondary:k[9],tertiary:k[8]},ZU={primary:k[2],secondary:k[0]},Iy={primary:k[4],secondary:k[3]},Uf={primary:{text:Ya.white,icon:Ya.white,border:ne[3],backgroundDefault:ne[3],backgroundHover:ne[2]},neutral:{text:k[10],textHover:Ya.white,icon:k[10],iconHover:Ya.white,border:k[4],background:k[2]},link:{text:Ya.white,icon:Ya.white,hover:ne[5]},error:{text:Ge[5],hover:Ge[6]},success:{text:Re[5],hover:Re[6]}},XU={slateGrey:{content:k[10],pillOutline:k[10],borderPrimary:k[5],borderSecondary:k[5],background:k[3]},brand:{content:ne[9],pillOutline:ne[9],borderPrimary:ne[6],borderSecondary:ne[6],background:ne[0]},red:{content:Ge[8],pillOutline:Ge[4],borderPrimary:Ge[2],borderSecondary:Ge[2],background:Ge[0]},yellow:{content:Tt[8],pillOutline:Tt[4],borderPrimary:Tt[2],borderSecondary:Tt[2],background:Tt[0]},green:{content:Re[8],pillOutline:Re[4],borderPrimary:Re[2],borderSecondary:Re[2],background:Re[0]},purple:{content:_t[8],pillOutline:_t[4],borderPrimary:_t[2],borderSecondary:_t[2],background:_t[0]},blue:{content:ba[8],pillOutline:ba[4],borderPrimary:ba[2],borderSecondary:ba[2],background:ba[0]},orange:{content:Eu[8],pillOutline:Eu[4],borderPrimary:Eu[2],borderSecondary:Eu[2],background:Eu[0]},pink:{content:Tu[8],pillOutline:Tu[4],borderPrimary:Tu[2],borderSecondary:Tu[2],background:Tu[0]}},KU={green:{content:Re[8],border:Re[2],background:Re[0]},yellow:{content:Tt[8],border:Tt[2],background:Tt[0]},red:{content:Ge[8],border:Ge[2],background:Ge[0]}},YU={green:{content:Re[1],background:Re[9]},yellow:{content:Tt[1],background:Tt[9]},red:{content:Ge[1],background:Ge[9]}},QU={content:k[10],border:k[4],background:k[3]},JU={backgroundDefault:k[2],backgroundHover:k[1],selected:k[3]},e5={background:k[2],icon:k[10],borderDefault:k[4],borderSelected:ne[3],textLabel:k[9],textPlaceholder:k[8],textHint:k[8]},t5={backgroundDefault:k[2],backgroundDisabled:k[0],textLabel:k[9],textPlaceholder:k[8],textHint:k[8],textError:Ge[5],iconDefault:k[9],iconPlaceholder:k[10],iconError:Ge[5],borderDefault:k[4],borderSelected:ne[3],borderError:Ge[5]},a5={handleDefault:Ya.white,handleDisabled:k[10],off:{backgroundDefault:k[4],backgroundHover:k[5],backgroundDisabled:k[4]},on:{backgroundDefault:Re[3],backgroundHover:Re[2],backgroundDisabled:k[4]}},r5={off:{backgroundDefault:"#00000000",backgroundHover:k[5],backgroundDisabled:k[2],border:k[6]},on:{backgroundDefault:Re[0],backgroundHover:Re[1],backgroundDisabled:k[2],border:Re[3]}},n5={content:k[10],background:k[4]},o5={background:k[4],active:Re[3]},i5={background:k[1],content:k[9],border:k[4]},s5={backgroundDefault:k[1],backgroundHover:k[3],backgroundActive:k[4],border:k[4],contentPrimary:k[10],contentSecondary:k[9],contentTertiary:k[8]},l5={background:k[1],content:k[9],border:k[4]},u5={activeBackground:k[3],activeContent:ne[5],inactiveContent:k[9],border:k[4]},c5={header:{textDefault:k[9],textHover:k[8],backgroundDefault:k[1]},border:k[4],cell:{textPrimary:k[10],textSecondary:k[9],backgroundDefault:k[2],backgroundHover:k[1]}},d5={textPrimaryDefault:k[10],textPrimaryHover:k[10],textSecondaryDefault:k[8],textSecondaryHover:k[9],iconPrimary:k[10],iconSecondary:k[8]},f5={background:Re[1],active:Re[5]},p5={textDefault:k[10],textSelected:Ya.white,textDisabled:k[7],backgroundDefault:k[2],backgroundMiddle:k[3],backgroundSelected:ne[3],border:k[4]},h5=k[9];var a1=typeof CSS<"u"&&CSS.supports?.("clip-path","path('M0 0 H1 V1 Z')");function r1(t,e,a){let r=a?.paddingPx??12,n=a?.radiusPx??12,o=Math.min(Math.max(a?.scrimOpacity??.55,0),1),i=a?.ringColor??`var(--syntro-ring, ${ba[5]})`,s=a?.blocking??!1,l=a?.onClickOutside??!0,u=a?.onEsc??!0,c=getComputedStyle(document.documentElement),d=c.getPropertyValue("--syntro-spotlight-backdrop").trim(),f=c.getPropertyValue("--syntro-ring").trim(),h=document.createElement("div");h.className="syntro-spotlight-scrim";let S=s||l;Object.assign(h.style,{position:"fixed",inset:"0",zIndex:"2147483646",pointerEvents:S?"auto":"none",background:d||`rgba(2, 6, 23, ${o})`,transition:"opacity 220ms ease",opacity:"0"}),e.appendChild(h),requestAnimationFrame(()=>h.style.opacity="1");let x=document.createElement("div");x.className="syntro-spotlight-ring",Object.assign(x.style,{position:"fixed",pointerEvents:"none",borderRadius:`${n}px`,border:`2px solid ${i||f||ba[5]}`,boxShadow:"0 0 0 4px rgba(255,255,255,0.35)",zIndex:"2147483647",transition:"all 220ms cubic-bezier(0.16,1,0.3,1)"}),e.appendChild(x);let b=[];if(!a1)for(let A=0;A<4;A++){let I=document.createElement("div");I.style.position="fixed",I.style.background="inherit",b.push(I),h.appendChild(I)}let g=A=>{h.style.clipPath=A,h.style.webkitClipPath=A},m=()=>{if(!t.isConnected){L.destroy();return}let A=t.getBoundingClientRect(),I=A.left-r,O=A.top-r,H=A.width+r*2,E=A.height+r*2;if(Object.assign(x.style,{left:`${I}px`,top:`${O}px`,width:`${H}px`,height:`${E}px`}),a1){let R=window.innerWidth,M=window.innerHeight,F=Math.min(n,H/2,E/2),Z=`M 0 0 L ${R} 0 L ${R} ${M} L 0 ${M} Z`,U=`M ${I+F} ${O} A ${F} ${F} 0 0 0 ${I} ${O+F} L ${I} ${O+E-F} A ${F} ${F} 0 0 0 ${I+F} ${O+E} L ${I+H-F} ${O+E} A ${F} ${F} 0 0 0 ${I+H} ${O+E-F} L ${I+H} ${O+F} A ${F} ${F} 0 0 0 ${I+H-F} ${O} L ${I+F} ${O} Z`;g(`path('${Z} ${U}')`)}else{let[R,M,F,Z]=b;Object.assign(R.style,{left:"0px",top:"0px",width:"100vw",height:`${O}px`}),Object.assign(F.style,{left:"0px",top:`${O+E}px`,width:"100vw",height:`${Math.max(0,window.innerHeight-(O+E))}px`}),Object.assign(Z.style,{left:"0px",top:`${O}px`,width:`${I}px`,height:`${E}px`}),Object.assign(M.style,{left:`${I+H}px`,top:`${O}px`,width:`${Math.max(0,window.innerWidth-(I+H))}px`,height:`${E}px`})}},y=new ResizeObserver(()=>requestAnimationFrame(m));y.observe(t);let v=()=>requestAnimationFrame(m),C=()=>requestAnimationFrame(m);window.addEventListener("scroll",v,!0),window.addEventListener("resize",C);let w=A=>{A.key==="Escape"&&u&&(a?.onDismiss?.(),L.destroy())};u&&window.addEventListener("keydown",w);let _=A=>{s?(A.preventDefault(),A.stopPropagation()):l&&(a?.onDismiss?.(),L.destroy())};h.addEventListener("click",_);let L={destroy(){y.disconnect(),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",C),u&&window.removeEventListener("keydown",w),h.removeEventListener("click",_),h.style.pointerEvents="none",h.style.opacity="0",setTimeout(()=>{try{h.remove()}catch{}try{x.remove()}catch{}},220)}};return m(),L}var SD=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button","svg","path","circle","line","polyline","polygon","rect","g"]);function _a(t){if(typeof window.Sanitizer=="function")try{let s=new window.Sanitizer({}).sanitizeToFragment(t),l=document.createElement("div");return l.append(s),l.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=[];for(;n.nextNode();){let i=n.currentNode,s=i.tagName.toLowerCase();if(!SD.has(s)){o.push(i);continue}for(let l of Array.from(i.attributes)){let u=l.name.toLowerCase(),c=l.value.trim().toLowerCase(),d=u.startsWith("on"),f=(u==="href"||u==="src")&&c.startsWith("javascript:");(d||f)&&i.removeAttribute(l.name)}}for(let i of o){for(;i.firstChild;)i.parentNode?.insertBefore(i.firstChild,i);i.remove()}return a.innerHTML}var Wo={bg:"var(--sc-overlay-background, #ffffff)",title:"var(--sc-overlay-title-color, var(--sc-overlay-text-color, #111827))",text:"var(--sc-overlay-text-color, #4b5563)",accent:"var(--sc-color-primary, #4f46e5)",radius:"var(--sc-border-radius, 12px)"},Ay=async(t,e)=>{let{content:a,size:r="md",blocking:n=!1,scrim:o,dismiss:i,ctaButtons:s}=t,l=document.createElement("div");l.className="syntro-modal-scrim",l.style.cssText=`
|
|
9
|
+
`).replace(TO,"")}function Lk(t,e){return e=BC(e),BC(t)===e}function ke(t,e,a,r,n,o){switch(a){case"children":typeof r=="string"?e==="body"||e==="textarea"&&r===""||os(t,r):(typeof r=="number"||typeof r=="bigint")&&e!=="body"&&os(t,""+r);break;case"className":md(t,"class",r);break;case"tabIndex":md(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":md(t,a,r);break;case"style":_w(t,r,o);break;case"data":if(e!=="object"){md(t,"data",r);break}case"src":case"href":if(r===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Td(""+r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(e!=="input"&&ke(t,e,"name",n.name,n,null),ke(t,e,"formEncType",n.formEncType,n,null),ke(t,e,"formMethod",n.formMethod,n,null),ke(t,e,"formTarget",n.formTarget,n,null)):(ke(t,e,"encType",n.encType,n,null),ke(t,e,"method",n.method,n,null),ke(t,e,"target",n.target,n,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Td(""+r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=Ur);break;case"onScroll":r!=null&&de("scroll",t);break;case"onScrollEnd":r!=null&&de("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(D(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(D(60));t.innerHTML=a}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=Td(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""+r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":de("beforetoggle",t),de("toggle",t),Ed(t,"popover",r);break;case"xlinkActuate":Mr(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Mr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Mr(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Mr(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Mr(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Mr(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Mr(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ed(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=iM.get(a)||a,Ed(t,a,r))}}function gv(t,e,a,r,n,o){switch(a){case"style":_w(t,r,o);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(D(61));if(a=r.__html,a!=null){if(n.children!=null)throw Error(D(60));t.innerHTML=a}}break;case"children":typeof r=="string"?os(t,r):(typeof r=="number"||typeof r=="bigint")&&os(t,""+r);break;case"onScroll":r!=null&&de("scroll",t);break;case"onScrollEnd":r!=null&&de("scrollend",t);break;case"onClick":r!=null&&(t.onclick=Ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gw.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),e=a.slice(2,n?a.length-7:void 0),o=t[ta]||null,o=o!=null?o[a]:null,typeof o=="function"&&t.removeEventListener(e,o,n),typeof r=="function")){typeof o!="function"&&o!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(e,r,n);break e}a in t?t[a]=r:r===!0?t.setAttribute(a,""):Ed(t,a,r)}}}function Et(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":de("error",t),de("load",t);var r=!1,n=!1,o;for(o in a)if(a.hasOwnProperty(o)){var i=a[o];if(i!=null)switch(o){case"src":r=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(D(137,e));default:ke(t,e,o,i,a,null)}}n&&ke(t,e,"srcSet",a.srcSet,a,null),r&&ke(t,e,"src",a.src,a,null);return;case"input":de("invalid",t);var s=o=i=n=null,l=null,u=null;for(r in a)if(a.hasOwnProperty(r)){var c=a[r];if(c!=null)switch(r){case"name":n=c;break;case"type":i=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":o=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(D(137,e));break;default:ke(t,e,r,c,a,null)}}xw(t,o,s,l,u,i,n,!1);return;case"select":de("invalid",t),r=i=o=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":o=s;break;case"defaultValue":i=s;break;case"multiple":r=s;default:ke(t,e,n,s,a,null)}e=o,a=i,t.multiple=!!r,e!=null?Yi(t,!!r,e,!1):a!=null&&Yi(t,!!r,a,!0);return;case"textarea":de("invalid",t),o=n=r=null;for(i in a)if(a.hasOwnProperty(i)&&(s=a[i],s!=null))switch(i){case"value":r=s;break;case"defaultValue":n=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(D(91));break;default:ke(t,e,i,s,a,null)}Sw(t,r,n,o);return;case"option":for(l in a)a.hasOwnProperty(l)&&(r=a[l],r!=null)&&(l==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":ke(t,e,l,r,a,null));return;case"dialog":de("beforetoggle",t),de("toggle",t),de("cancel",t),de("close",t);break;case"iframe":case"object":de("load",t);break;case"video":case"audio":for(r=0;r<du.length;r++)de(du[r],t);break;case"image":de("error",t),de("load",t);break;case"details":de("toggle",t);break;case"embed":case"source":case"link":de("error",t),de("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(r=a[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(D(137,e));default:ke(t,e,u,r,a,null)}return;default:if(Mv(e)){for(c in a)a.hasOwnProperty(c)&&(r=a[c],r!==void 0&&gv(t,e,c,r,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(r=a[s],r!=null&&ke(t,e,s,r,a,null))}function RO(t,e,a,r){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,o=null,i=null,s=null,l=null,u=null,c=null;for(h in a){var d=a[h];if(a.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(h)||ke(t,e,h,null,r,d)}}for(var f in r){var h=r[f];if(d=a[f],r.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":o=h;break;case"name":n=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":i=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(D(137,e));break;default:h!==d&&ke(t,e,f,h,r,d)}}zg(t,i,s,l,u,c,o,n);return;case"select":h=i=s=f=null;for(o in a)if(l=a[o],a.hasOwnProperty(o)&&l!=null)switch(o){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(o)||ke(t,e,o,null,r,l)}for(n in r)if(o=r[n],l=a[n],r.hasOwnProperty(n)&&(o!=null||l!=null))switch(n){case"value":f=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:o!==l&&ke(t,e,n,o,r,l)}e=s,a=i,r=h,f!=null?Yi(t,!!a,f,!1):!!r!=!!a&&(e!=null?Yi(t,!!a,e,!0):Yi(t,!!a,a?[]:"",!1));return;case"textarea":h=f=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ke(t,e,s,null,r,n)}for(i in r)if(n=r[i],o=a[i],r.hasOwnProperty(i)&&(n!=null||o!=null))switch(i){case"value":f=n;break;case"defaultValue":h=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(D(91));break;default:n!==o&&ke(t,e,i,n,r,o)}bw(t,f,h);return;case"option":for(var S in a)f=a[S],a.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S)&&(S==="selected"?t.selected=!1:ke(t,e,S,null,r,f));for(l in r)f=r[l],h=a[l],r.hasOwnProperty(l)&&f!==h&&(f!=null||h!=null)&&(l==="selected"?t.selected=f&&typeof f!="function"&&typeof f!="symbol":ke(t,e,l,f,r,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in a)f=a[x],a.hasOwnProperty(x)&&f!=null&&!r.hasOwnProperty(x)&&ke(t,e,x,null,r,f);for(u in r)if(f=r[u],h=a[u],r.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(D(137,e));break;default:ke(t,e,u,f,r,h)}return;default:if(Mv(e)){for(var b in a)f=a[b],a.hasOwnProperty(b)&&f!==void 0&&!r.hasOwnProperty(b)&&gv(t,e,b,void 0,r,f);for(c in r)f=r[c],h=a[c],!r.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||gv(t,e,c,f,r,h);return}}for(var g in a)f=a[g],a.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g)&&ke(t,e,g,null,r,f);for(d in r)f=r[d],h=a[d],!r.hasOwnProperty(d)||f===h||f==null&&h==null||ke(t,e,d,f,r,h)}function PC(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MO(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var n=a[r],o=n.transferSize,i=n.initiatorType,s=n.duration;if(o&&s&&PC(i)){for(i=0,s=n.responseEnd,r+=1;r<a.length;r++){var l=a[r],u=l.startTime;if(u>s)break;var c=l.transferSize,d=l.initiatorType;c&&PC(d)&&(l=l.responseEnd,i+=c*(l<s?1:(s-u)/(l-u)))}if(--r,e+=8*(o+i)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var vv=null,yv=null;function hf(t){return t.nodeType===9?t:t.ownerDocument}function NC(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kk(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function xv(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Eg=null;function OO(){var t=window.event;return t&&t.type==="popstate"?t===Eg?!1:(Eg=t,!0):(Eg=null,!1)}var Ik=typeof setTimeout=="function"?setTimeout:void 0,DO=typeof clearTimeout=="function"?clearTimeout:void 0,FC=typeof Promise=="function"?Promise:void 0,BO=typeof queueMicrotask=="function"?queueMicrotask:typeof FC<"u"?function(t){return FC.resolve(null).then(t).catch(PO)}:Ik;function PO(t){setTimeout(function(){throw t})}function Jn(t){return t==="head"}function HC(t,e){var a=e,r=0;do{var n=a.nextSibling;if(t.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(n),ps(e);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")tu(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,tu(a);for(var o=a.firstChild;o;){var i=o.nextSibling,s=o.nodeName;o[bu]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=i}}else a==="body"&&tu(t.ownerDocument.body);a=n}while(a);ps(e)}function UC(t,e){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function bv(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":bv(a),Rv(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function NO(t,e,a,r){for(;t.nodeType===1;){var n=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[bu])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(o=t.getAttribute("rel"),o==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(o!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(o=t.getAttribute("src"),(o!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&o&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var o=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===o)return t}else return t;if(t=Na(t.nextSibling),t===null)break}return null}function FO(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Na(t.nextSibling),t===null))return null;return t}function Ak(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Na(t.nextSibling),t===null))return null;return t}function Sv(t){return t.data==="$?"||t.data==="$~"}function _v(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function HO(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var r=function(){e(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Na(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Cv=null;function zC(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return Na(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function qC(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function Ek(t,e,a){switch(e=hf(a),t){case"html":if(t=e.documentElement,!t)throw Error(D(452));return t;case"head":if(t=e.head,!t)throw Error(D(453));return t;case"body":if(t=e.body,!t)throw Error(D(454));return t;default:throw Error(D(451))}}function tu(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Rv(t)}var Fa=new Map,VC=new Set;function mf(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Kr=_e.d;_e.d={f:UO,r:zO,D:qO,C:VO,L:$O,m:jO,X:WO,S:GO,M:ZO};function UO(){var t=Kr.f(),e=Mf();return t||e}function zO(t){var e=ms(t);e!==null&&e.tag===5&&e.type==="form"?_L(e):Kr.r(t)}var xs=typeof document>"u"?null:document;function Tk(t,e,a){var r=xs;if(r&&typeof e=="string"&&e){var n=Oa(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),VC.has(n)||(VC.add(n),t={rel:t,crossOrigin:a,href:e},r.querySelector(n)===null&&(e=r.createElement("link"),Et(e,"link",t),bt(e),r.head.appendChild(e)))}}function qO(t){Kr.D(t),Tk("dns-prefetch",t,null)}function VO(t,e){Kr.C(t,e),Tk("preconnect",t,e)}function $O(t,e,a){Kr.L(t,e,a);var r=xs;if(r&&t&&e){var n='link[rel="preload"][as="'+Oa(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Oa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Oa(a.imageSizes)+'"]')):n+='[href="'+Oa(t)+'"]';var o=n;switch(e){case"style":o=fs(t);break;case"script":o=bs(t)}Fa.has(o)||(t=Ue({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Fa.set(o,t),r.querySelector(n)!==null||e==="style"&&r.querySelector(ku(o))||e==="script"&&r.querySelector(Iu(o))||(e=r.createElement("link"),Et(e,"link",t),bt(e),r.head.appendChild(e)))}}function jO(t,e){Kr.m(t,e);var a=xs;if(a&&t){var r=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Oa(r)+'"][href="'+Oa(t)+'"]',o=n;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=bs(t)}if(!Fa.has(o)&&(t=Ue({rel:"modulepreload",href:t},e),Fa.set(o,t),a.querySelector(n)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Iu(o)))return}r=a.createElement("link"),Et(r,"link",t),bt(r),a.head.appendChild(r)}}}function GO(t,e,a){Kr.S(t,e,a);var r=xs;if(r&&t){var n=Ki(r).hoistableStyles,o=fs(t);e=e||"default";var i=n.get(o);if(!i){var s={loading:0,preload:null};if(i=r.querySelector(ku(o)))s.loading=5;else{t=Ue({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Fa.get(o))&&gy(t,a);var l=i=r.createElement("link");bt(l),Et(l,"link",t),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ud(i,e,r)}i={type:"stylesheet",instance:i,count:1,state:s},n.set(o,i)}}}function WO(t,e){Kr.X(t,e);var a=xs;if(a&&t){var r=Ki(a).hoistableScripts,n=bs(t),o=r.get(n);o||(o=a.querySelector(Iu(n)),o||(t=Ue({src:t,async:!0},e),(e=Fa.get(n))&&vy(t,e),o=a.createElement("script"),bt(o),Et(o,"link",t),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(n,o))}}function ZO(t,e){Kr.M(t,e);var a=xs;if(a&&t){var r=Ki(a).hoistableScripts,n=bs(t),o=r.get(n);o||(o=a.querySelector(Iu(n)),o||(t=Ue({src:t,async:!0,type:"module"},e),(e=Fa.get(n))&&vy(t,e),o=a.createElement("script"),bt(o),Et(o,"link",t),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(n,o))}}function $C(t,e,a,r){var n=(n=Hn.current)?mf(n):null;if(!n)throw Error(D(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=fs(a.href),a=Ki(n).hoistableStyles,r=a.get(e),r||(r={type:"style",instance:null,count:0,state:null},a.set(e,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=fs(a.href);var o=Ki(n).hoistableStyles,i=o.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(t,i),(o=n.querySelector(ku(t)))&&!o._p&&(i.instance=o,i.state.loading=5),Fa.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Fa.set(t,a),o||XO(n,t,a,i.state))),e&&r===null)throw Error(D(528,""));return i}if(e&&r!==null)throw Error(D(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=bs(a),a=Ki(n).hoistableScripts,r=a.get(e),r||(r={type:"script",instance:null,count:0,state:null},a.set(e,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(D(444,t))}}function fs(t){return'href="'+Oa(t)+'"'}function ku(t){return'link[rel="stylesheet"]['+t+"]"}function Rk(t){return Ue({},t,{"data-precedence":t.precedence,precedence:null})}function XO(t,e,a,r){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?r.loading=1:(e=t.createElement("link"),r.preload=e,e.addEventListener("load",function(){return r.loading|=1}),e.addEventListener("error",function(){return r.loading|=2}),Et(e,"link",a),bt(e),t.head.appendChild(e))}function bs(t){return'[src="'+Oa(t)+'"]'}function Iu(t){return"script[async]"+t}function jC(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var r=t.querySelector('style[data-href~="'+Oa(a.href)+'"]');if(r)return e.instance=r,bt(r),r;var n=Ue({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),bt(r),Et(r,"style",n),Ud(r,a.precedence,t),e.instance=r;case"stylesheet":n=fs(a.href);var o=t.querySelector(ku(n));if(o)return e.state.loading|=4,e.instance=o,bt(o),o;r=Rk(a),(n=Fa.get(n))&&gy(r,n),o=(t.ownerDocument||t).createElement("link"),bt(o);var i=o;return i._p=new Promise(function(s,l){i.onload=s,i.onerror=l}),Et(o,"link",r),e.state.loading|=4,Ud(o,a.precedence,t),e.instance=o;case"script":return o=bs(a.src),(n=t.querySelector(Iu(o)))?(e.instance=n,bt(n),n):(r=a,(n=Fa.get(o))&&(r=Ue({},a),vy(r,n)),t=t.ownerDocument||t,n=t.createElement("script"),bt(n),Et(n,"link",r),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(D(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(r=e.instance,e.state.loading|=4,Ud(r,a.precedence,t));return e.instance}function Ud(t,e,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=r.length?r[r.length-1]:null,o=n,i=0;i<r.length;i++){var s=r[i];if(s.dataset.precedence===e)o=s;else if(o!==n)break}o?o.parentNode.insertBefore(t,o.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function gy(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function vy(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var zd=null;function GC(t,e,a){if(zd===null){var r=new Map,n=zd=new Map;n.set(a,r)}else n=zd,r=n.get(a),r||(r=new Map,n.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),n=0;n<a.length;n++){var o=a[n];if(!(o[bu]||o[kt]||t==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var i=o.getAttribute(e)||"";i=t+i;var s=r.get(i);s?s.push(o):r.set(i,[o])}}return r}function WC(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function KO(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Mk(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function YO(t,e,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=fs(r.href),o=e.querySelector(ku(n));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=gf.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=o,bt(o);return}o=e.ownerDocument||e,r=Rk(r),(n=Fa.get(n))&&gy(r,n),o=o.createElement("link"),bt(o);var i=o;i._p=new Promise(function(s,l){i.onload=s,i.onerror=l}),Et(o,"link",r),a.instance=o}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=gf.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Tg=0;function QO(t,e){return t.stylesheets&&t.count===0&&qd(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&qd(t,t.stylesheets),t.unsuspend){var o=t.unsuspend;t.unsuspend=null,o()}},6e4+e);0<t.imgBytes&&Tg===0&&(Tg=62500*MO());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&qd(t,t.stylesheets),t.unsuspend)){var o=t.unsuspend;t.unsuspend=null,o()}},(t.imgBytes>Tg?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(n)}}:null}function gf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var vf=null;function qd(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,vf=new Map,e.forEach(JO,t),vf=null,gf.call(t))}function JO(t,e){if(!(e.state.loading&4)){var a=vf.get(t);if(a)var r=a.get(null);else{a=new Map,vf.set(t,a);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<n.length;o++){var i=n[o];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(a.set(i.dataset.precedence,i),r=i)}r&&a.set(null,r)}n=e.instance,i=n.getAttribute("data-precedence"),o=a.get(i)||r,o===r&&a.set(null,n),a.set(i,n),this.count++,r=gf.bind(this),n.addEventListener("load",r),n.addEventListener("error",r),o?o.parentNode.insertBefore(n,o.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var pu={$$typeof:Hr,Provider:null,Consumer:null,_currentValue:Ro,_currentValue2:Ro,_threadCount:0};function eD(t,e,a,r,n,o,i,s,l){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ag(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ag(0),this.hiddenUpdates=ag(null),this.identifierPrefix=r,this.onUncaughtError=n,this.onCaughtError=o,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Ok(t,e,a,r,n,o,i,s,l,u,c,d){return t=new eD(t,e,a,i,l,u,c,d,s),e=1,o===!0&&(e|=24),o=fa(3,null,null,e),t.current=o,o.stateNode=t,e=Vv(),e.refCount++,t.pooledCache=e,e.refCount++,o.memoizedState={element:r,isDehydrated:a,cache:e},Gv(o),t}function Dk(t){return t?(t=Gi,t):Gi}function Bk(t,e,a,r,n,o){n=Dk(n),r.context===null?r.context=n:r.pendingContext=n,r=zn(e),r.payload={element:a},o=o===void 0?null:o,o!==null&&(r.callback=o),a=qn(t,r,e),a!==null&&(ea(a,t,e),Wl(a,t,e))}function ZC(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function yy(t,e){ZC(t,e),(t=t.alternate)&&ZC(t,e)}function Pk(t){if(t.tag===13||t.tag===31){var e=$o(t,67108864);e!==null&&ea(e,t,67108864),yy(t,67108864)}}function XC(t){if(t.tag===13||t.tag===31){var e=va();e=Ev(e);var a=$o(t,e);a!==null&&ea(a,t,e),yy(t,e)}}var yf=!0;function tD(t,e,a,r){var n=ae.T;ae.T=null;var o=_e.p;try{_e.p=2,xy(t,e,a,r)}finally{_e.p=o,ae.T=n}}function aD(t,e,a,r){var n=ae.T;ae.T=null;var o=_e.p;try{_e.p=8,xy(t,e,a,r)}finally{_e.p=o,ae.T=n}}function xy(t,e,a,r){if(yf){var n=wv(r);if(n===null)Ag(t,e,r,xf,a),KC(t,r);else if(nD(n,t,e,a,r))r.stopPropagation();else if(KC(t,r),e&4&&-1<rD.indexOf(t)){for(;n!==null;){var o=ms(n);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var i=Ao(o.pendingLanes);if(i!==0){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;i;){var l=1<<31-ga(i);s.entanglements[1]|=l,i&=~l}br(o),(Se&6)===0&&(lf=ha()+500,Lu(0,!1))}}break;case 31:case 13:s=$o(o,2),s!==null&&ea(s,o,2),Mf(),yy(o,2)}if(o=wv(r),o===null&&Ag(t,e,r,xf,a),o===n)break;n=o}n!==null&&r.stopPropagation()}else Ag(t,e,r,null,a)}}function wv(t){return t=Ov(t),by(t)}var xf=null;function by(t){if(xf=null,t=Ui(t),t!==null){var e=gu(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=aw(e),t!==null)return t;t=null}else if(a===31){if(t=rw(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return xf=t,null}function Nk(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($2()){case sw:return 2;case lw:return 8;case Wd:case j2:return 32;case uw:return 268435456;default:return 32}default:return 32}}var Lv=!1,jn=null,Gn=null,Wn=null,hu=new Map,mu=new Map,On=[],rD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function KC(t,e){switch(t){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Wn=null;break;case"pointerover":case"pointerout":hu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(e.pointerId)}}function Pl(t,e,a,r,n,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:a,eventSystemFlags:r,nativeEvent:o,targetContainers:[n]},e!==null&&(e=ms(e),e!==null&&Pk(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function nD(t,e,a,r,n){switch(e){case"focusin":return jn=Pl(jn,t,e,a,r,n),!0;case"dragenter":return Gn=Pl(Gn,t,e,a,r,n),!0;case"mouseover":return Wn=Pl(Wn,t,e,a,r,n),!0;case"pointerover":var o=n.pointerId;return hu.set(o,Pl(hu.get(o)||null,t,e,a,r,n)),!0;case"gotpointercapture":return o=n.pointerId,mu.set(o,Pl(mu.get(o)||null,t,e,a,r,n)),!0}return!1}function Fk(t){var e=Ui(t.target);if(e!==null){var a=gu(e);if(a!==null){if(e=a.tag,e===13){if(e=aw(a),e!==null){t.blockedOn=e,O_(t.priority,function(){XC(a)});return}}else if(e===31){if(e=rw(a),e!==null){t.blockedOn=e,O_(t.priority,function(){XC(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Vd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=wv(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);Vg=r,a.target.dispatchEvent(r),Vg=null}else return e=ms(a),e!==null&&Pk(e),t.blockedOn=a,!1;e.shift()}return!0}function YC(t,e,a){Vd(t)&&a.delete(e)}function oD(){Lv=!1,jn!==null&&Vd(jn)&&(jn=null),Gn!==null&&Vd(Gn)&&(Gn=null),Wn!==null&&Vd(Wn)&&(Wn=null),hu.forEach(YC),mu.forEach(YC)}function Id(t,e){t.blockedOn===e&&(t.blockedOn=null,Lv||(Lv=!0,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,oD)))}var Ad=null;function QC(t){Ad!==t&&(Ad=t,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,function(){Ad===t&&(Ad=null);for(var e=0;e<t.length;e+=3){var a=t[e],r=t[e+1],n=t[e+2];if(typeof r!="function"){if(by(r||a)===null)continue;break}var o=ms(a);o!==null&&(t.splice(e,3),e-=3,ov(o,{pending:!0,data:n,method:a.method,action:r},r,n))}}))}function ps(t){function e(l){return Id(l,t)}jn!==null&&Id(jn,t),Gn!==null&&Id(Gn,t),Wn!==null&&Id(Wn,t),hu.forEach(e),mu.forEach(e);for(var a=0;a<On.length;a++){var r=On[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<On.length&&(a=On[0],a.blockedOn===null);)Fk(a),a.blockedOn===null&&On.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var n=a[r],o=a[r+1],i=n[ta]||null;if(typeof o=="function")i||QC(a);else if(i){var s=null;if(o&&o.hasAttribute("formAction")){if(n=o,i=o[ta]||null)s=i.formAction;else if(by(n)!==null)continue}else s=i.action;typeof s=="function"?a[r+1]=s:(a.splice(r,3),r-=3),QC(a)}}}function Hk(){function t(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Sy(t){this._internalRoot=t}Bf.prototype.render=Sy.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(D(409));var a=e.current,r=va();Bk(a,r,t,e,null,null)};Bf.prototype.unmount=Sy.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Bk(t.current,2,null,t,null,null),Mf(),e[hs]=null}};function Bf(t){this._internalRoot=t}Bf.prototype.unstable_scheduleHydration=function(t){if(t){var e=hw();t={blockedOn:null,target:t,priority:e};for(var a=0;a<On.length&&e!==0&&e<On[a].priority;a++);On.splice(a,0,t),a===0&&Fk(t)}};var JC=ew.version;if(JC!=="19.2.1")throw Error(D(527,JC,"19.2.1"));_e.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(D(188)):(t=Object.keys(t).join(","),Error(D(268,t)));return t=N2(e),t=t!==null?nw(t):null,t=t===null?null:t.stateNode,t};var iD={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Nl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Nl.isDisabled&&Nl.supportsFiber))try{vu=Nl.inject(iD),ma=Nl}catch{}var Nl;Pf.createRoot=function(t,e){if(!tw(t))throw Error(D(299));var a=!1,r="",n=TL,o=RL,i=ML;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(o=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Ok(t,1,!1,null,null,a,r,null,n,o,i,Hk),t[hs]=e.current,my(t),new Sy(e)};Pf.hydrateRoot=function(t,e,a){if(!tw(t))throw Error(D(299));var r=!1,n="",o=TL,i=RL,s=ML,l=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(i=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(l=a.formState)),e=Ok(t,1,!0,e,a??null,r,n,l,o,i,s,Hk),e.context=Dk(null),a=e.current,r=va(),r=Ev(r),n=zn(r),n.callback=null,qn(a,n,r),a=r,e.current.lanes=a,xu(e,a),br(e),t[hs]=e.current,my(t),new Bf(e)};Pf.version="19.2.1"});var Go=fr((TU,qk)=>{"use strict";function zk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zk)}catch(t){console.error(t)}}zk(),qk.exports=Uk()});var F1=fr(tp=>{"use strict";var tB=Symbol.for("react.transitional.element"),aB=Symbol.for("react.fragment");function N1(t,e,a){var r=null;if(a!==void 0&&(r=""+a),e.key!==void 0&&(r=""+e.key),"key"in e){a={};for(var n in e)n!=="key"&&(a[n]=e[n])}else a=e;return e=a.ref,{$$typeof:tB,type:t,key:r,ref:e!==void 0?e:null,props:a}}tp.Fragment=aB;tp.jsx=N1;tp.jsxs=N1});var Ae=fr((Wz,H1)=>{"use strict";H1.exports=F1()});var SU={};QS(SU,{ANIMATION_KEYFRAMES:()=>Cl,ActivationConfigZ:()=>Kc,AddClassZ:()=>fS,AnchorIdZ:()=>Ia,AnchorStateZ:()=>TR,AnchorVisibleConditionZ:()=>am,AppRegistry:()=>Pu,AugmentationZ:()=>RR,BadgePositionZ:()=>tS,BadgeZ:()=>yS,BoundingBoxZ:()=>ER,CanvasEvents:()=>Ts,CanvasRecipeZ:()=>hh,ConditionZ:()=>_n,ContextManager:()=>Yc,CooldownActiveConditionZ:()=>lm,CounterDefZ:()=>fl,CtaButtonZ:()=>fm,DEFAULT_COOLDOWN:()=>Bp,DEFAULT_TTL:()=>Dp,DecisionStrategyZ:()=>yl,DismissedConditionZ:()=>sm,EVENT_SCHEMA_VERSION:()=>et,EventBus:()=>ed,EventCountConditionZ:()=>cm,EventFilterZ:()=>NR,EventHistory:()=>bl,EventOccurredConditionZ:()=>rm,EventSourceZ:()=>OS,ExecutorRegistry:()=>Wc,ExternalStrategyZ:()=>vl,FrequencyEntryZ:()=>jR,FrequencyLimitConditionZ:()=>um,HighlightStepZ:()=>hE,HighlightStyleZ:()=>eS,HighlightZ:()=>gS,InsertHtmlZ:()=>mS,InsertPositionZ:()=>oS,InterventionTracker:()=>cl,MAX_VISIBLE_TOASTS:()=>Op,MatchOpZ:()=>dl,ModalContentZ:()=>nS,ModalZ:()=>bS,ModelStrategyZ:()=>gl,MountWidgetZ:()=>CS,NavigateZ:()=>_S,NavigationMonitor:()=>Sl,NormalizedEventZ:()=>PR,NotificationToastStack:()=>Mp,PageContextZ:()=>LR,PageHistoryEntryZ:()=>kR,PageUrlConditionZ:()=>em,ParallelZ:()=>kS,PlacementZ:()=>aS,PulseZ:()=>vS,RUNTIME_SDK_BUILD:()=>GS,RUNTIME_VERSION:()=>HS,RemoveClassZ:()=>pS,RouteConditionZ:()=>tm,RouteFilterZ:()=>Q0,RuleStrategyZ:()=>hl,RuleZ:()=>pl,RuntimeContextZ:()=>MR,RuntimeProvider:()=>Up,SDK_SCHEMA_VERSION:()=>tn,SDK_VERSION:()=>vp,STATIC_SLOT_STYLES:()=>NS,ScoreStrategyZ:()=>ml,ScrollBehaviorZ:()=>uS,ScrollLogicalPositionZ:()=>dm,ScrollToZ:()=>SS,SelectorZ:()=>jx,SequenceZ:()=>LS,SessionContextZ:()=>IR,SessionMetricConditionZ:()=>im,SessionMetricTracker:()=>hc,SetAttrZ:()=>dS,SetStyleZ:()=>hS,SetTextZ:()=>cS,ShadowCanvasOverlay:()=>xx,ShadowRootProvider:()=>nx,SmartCanvasApp:()=>Sx,SmartCanvasController:()=>Sp,SmartCanvasElement:()=>qp,SmartCanvasPortal:()=>n3,StandardEvents:()=>Ct,StateEqualsConditionZ:()=>nm,StateStore:()=>rd,StoredValueZ:()=>$R,Syntro:()=>jS,TileCard:()=>Ms,TileWheel:()=>UN,TooltipContentZ:()=>rS,TooltipStepZ:()=>pE,TooltipTriggerZ:()=>iS,TooltipZ:()=>xS,TourStepForSchemaZ:()=>lS,TourZ:()=>IS,TriggerWhenZ:()=>Xc,ViewportConditionZ:()=>om,ViewportContextZ:()=>AR,WaitZ:()=>wS,WidgetConfigZ:()=>sS,WidgetRegistry:()=>od,appRegistry:()=>Ls,applyStaticSlotStyles:()=>Sm,cleanupAppContext:()=>np,contentRuntime:()=>Nf,coreActionStepSchemas:()=>CR,createActionEngine:()=>Jh,createAnchorResolver:()=>pm,createAppContext:()=>rp,createAppLoader:()=>ip,createCanvasConfigFetcher:()=>ni,createContextManager:()=>hm,createDecisionEngine:()=>mm,createEventAccumulator:()=>gm,createEventBus:()=>xl,createGrowthBookClient:()=>sh,createNoopClient:()=>gh,createOverlayRecipeFetcher:()=>r3,createPostHogClient:()=>Xh,createPostHogNormalizer:()=>ix,createSessionMetricTracker:()=>lh,createSmartCanvas:()=>Vp,createSmartCanvasController:()=>rx,createSmartCanvasRuntime:()=>Tm,createStateStore:()=>bm,createSurfaceContainer:()=>km,createSurfaces:()=>Am,decisionSchemas:()=>V4,decodeToken:()=>wl,encodeToken:()=>Rm,evaluate:()=>RS,evaluateCondition:()=>ES,evaluateRule:()=>TS,evaluateRuleStrategy:()=>Qc,evaluateScoreStrategy:()=>Jc,evaluateSync:()=>MS,executorRegistry:()=>Tr,getAntiFlickerSnippet:()=>RI,getAppIdFromActionKind:()=>Py,getAppIdFromWidgetId:()=>op,getExecutor:()=>yR,getSlotAnchorId:()=>nd,getSlotType:()=>_l,getSlotZIndex:()=>Im,hasExecutor:()=>Kh,interpolateTemplate:()=>ic,isCoreActionKind:()=>By,matchEvent:()=>Pp,needsMigration:()=>$N,normalizePostHogEvent:()=>As,overlaysRuntime:()=>ap,parseVersion:()=>Ds,playEnterAnimation:()=>wm,playExitAnimation:()=>Lm,registerConfigPredicates:()=>$u,registerSmartCanvasElement:()=>Cx,resolveConfigUri:()=>yp,setupAdjacentPositioning:()=>_m,setupInlinePositioning:()=>Cm,shouldNormalizeEvent:()=>Es,useDecision:()=>nA,useNotifications:()=>Np,useNotifyWatcher:()=>Hp,usePageContext:()=>zp,useRuntime:()=>Cr,useRuntimeContext:()=>sc,useRuntimeEvents:()=>aA,useRuntimeState:()=>rA,useSessionContext:()=>eA,useShadowCanvasConfig:()=>bx,useShadowRoot:()=>oi,useViewportContext:()=>tA,validateAction:()=>dr,validateActions:()=>Zc,validateActivationConfig:()=>q4,validateCondition:()=>U4,validateConfig:()=>zN,validateEventFilter:()=>iU,validateEventName:()=>vm,validateFrequencyEntry:()=>dU,validateNormalizedEvent:()=>oU,validateProps:()=>ym,validateRecipe:()=>a3,validateRuntimeContext:()=>tU,validateStoredValue:()=>cU,validateStrategy:()=>z4,widgetRegistry:()=>Em});var s2=Y(Ye(),1),Mm=Y(Il(),1),bU=Y(Go(),1);function Vk(t,e,a,r){let n=r?.maxRetries??3,o=r?.debounceMs??50,i=t.parentElement??e.parentElement;if(!i)return()=>{};let s=0,l=null,u=!1,c=new MutationObserver(d=>{if(!u){for(let f of d)for(let h of f.removedNodes)if(h===t){if(s>=n){c.disconnect(),u=!0;return}l&&clearTimeout(l),l=setTimeout(()=>{if(!u){if(!e.isConnected){c.disconnect(),u=!0;return}s++;try{a()}catch{c.disconnect(),u=!0}}},o);return}}});return c.observe(i,{childList:!0,subtree:!0}),()=>{u=!0,c.disconnect(),l&&clearTimeout(l)}}var sD=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button","svg","path","circle","line","polyline","polygon","rect","g"]);function _y(t){if(typeof window.Sanitizer=="function")try{let l=new window.Sanitizer({}).sanitizeToFragment(t),u=document.createElement("div");return u.append(l),u.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=[];for(;n.nextNode();){let s=n.currentNode,l=s.tagName.toLowerCase();if(!sD.has(l)){o.push(s);continue}for(let u of Array.from(s.attributes)){let c=u.name.toLowerCase(),d=u.value.trim().toLowerCase(),f=c.startsWith("on"),S=(c==="href"||c==="src"||c==="formaction")&&(d.startsWith("javascript:")||d.startsWith("vbscript:")||d.startsWith("data:text/html"));(f||S)&&s.removeAttribute(u.name)}}let i=Array.from(r.querySelectorAll("svg"));for(let s of i)o.some(l=>s.contains(l)&&l.tagName.toLowerCase()==="script")&&o.push(s);for(let s of o){for(;s.firstChild;)s.parentNode?.insertBefore(s.firstChild,s);s.remove()}return a.innerHTML}var $k=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=_y(t.html),n="data-syntro-insert-label",o=t.label;if(o){let d=CSS.escape(o),h=(a.parentElement??a).querySelector(`[${n}="${d}"]`);h&&h.remove()}let i=document.createElement("div");i.setAttribute("data-syntro-action-id",e.generateId()),o&&i.setAttribute(n,o),i.innerHTML=r;let s=null;switch(t.position){case"before":a.insertAdjacentElement("beforebegin",i);break;case"after":a.insertAdjacentElement("afterend",i);break;case"prepend":a.insertBefore(i,a.firstChild);break;case"append":a.appendChild(i);break;case"replace":s=a.innerHTML,a.replaceWith(i);break}let l=null;if(t.deepLink){let{tileId:d,itemId:f}=t.deepLink;l=()=>{let h=window.SynOS?.handle;h&&(h.open(),h.runtime?.events?.publish("notification.deep_link",{tileId:d,itemId:f}))},i.style.cursor="pointer",i.addEventListener("click",l)}e.publishEvent("action.applied",{id:e.generateId(),kind:"content:insertHtml",anchorId:t.anchorId,position:t.position});let c=Vk(i,a,()=>{switch(t.position){case"before":a.insertAdjacentElement("beforebegin",i);break;case"after":a.insertAdjacentElement("afterend",i);break;case"prepend":a.insertBefore(i,a.firstChild);break;case"append":a.appendChild(i);break;case"replace":break}});return{cleanup:()=>{if(l&&i.removeEventListener("click",l),c(),!!i.isConnected)try{if(t.position==="replace"&&s!==null){let d=document.createElement(a.tagName);d.innerHTML=s,Array.from(a.attributes).forEach(f=>{d.setAttribute(f.name,f.value)}),i.replaceWith(d)}else i.remove()}catch{}},updateFn:d=>{"html"in d&&typeof d.html=="string"&&(i.innerHTML=_y(d.html))}}},jk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.textContent??"";return a.textContent=t.text,e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setText",anchorId:t.anchorId}),{cleanup:()=>{a.isConnected&&(a.textContent=r)},updateFn:n=>{"text"in n&&typeof n.text=="string"&&(a.textContent=n.text)}}},Gk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=t.attr.toLowerCase();if(r.startsWith("on"))throw new Error(`Dangerous attribute not allowed: ${t.attr}`);if(r==="href"||r==="src"||r==="formaction"){let s=t.value.trim().toLowerCase();if(s.startsWith("javascript:")||s.startsWith("vbscript:")||s.startsWith("data:text/html"))throw new Error(`Dangerous URL not allowed in ${t.attr}: ${t.value}`)}let o=a.getAttribute(t.attr),i=a.hasAttribute(t.attr);return a.setAttribute(t.attr,t.value),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setAttr",anchorId:t.anchorId,attr:t.attr}),{cleanup:()=>{a.isConnected&&(i&&o!==null?a.setAttribute(t.attr,o):a.removeAttribute(t.attr))},updateFn:s=>{"value"in s&&typeof s.value=="string"&&a.setAttribute(t.attr,s.value)}}},Wk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.classList.contains(t.className);return a.classList.add(t.className),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:addClass",anchorId:t.anchorId,className:t.className}),{cleanup:()=>{a.isConnected&&(r||a.classList.remove(t.className))}}},Zk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=a.classList.contains(t.className);return a.classList.remove(t.className),e.publishEvent("action.applied",{id:e.generateId(),kind:"content:removeClass",anchorId:t.anchorId,className:t.className}),{cleanup:()=>{a.isConnected&&r&&a.classList.add(t.className)}}},Xk=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);if(!a&&e.waitForAnchor&&(a=await e.waitForAnchor(t.anchorId,3e3)),!a)return console.warn(`[adaptive-content] Anchor not found after waiting: ${t.anchorId.selector}`),{cleanup:()=>{}};let r=new Map;for(let n of Object.keys(t.styles)){let o=a.style.getPropertyValue(n);r.set(n,o)}for(let[n,o]of Object.entries(t.styles))a.style.setProperty(n,o);return e.publishEvent("action.applied",{id:e.generateId(),kind:"content:setStyle",anchorId:t.anchorId,styles:Object.keys(t.styles)}),{cleanup:()=>{if(a.isConnected)for(let[n,o]of r)o?a.style.setProperty(n,o):a.style.removeProperty(n)},updateFn:n=>{if("styles"in n&&typeof n.styles=="object"&&n.styles)for(let[o,i]of Object.entries(n.styles))a.style.setProperty(o,i)}}},Cy=[{kind:"content:insertHtml",executor:$k},{kind:"content:setText",executor:jk},{kind:"content:setAttr",executor:Gk},{kind:"content:addClass",executor:Wk},{kind:"content:removeClass",executor:Zk},{kind:"content:setStyle",executor:Xk}],Nf={id:"adaptive-content",version:"1.0.0",name:"Content",description:"DOM manipulation for text, attributes, and styles",executors:Cy};var lD={light:50,medium:100,heavy:200},uD=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff"],Kk={init(t,e,a){let r=lD[a.intensity],n=a.colors.length>0?a.colors:uD,o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*-e*.3,vx:(Math.random()-.5)*4,vy:Math.random()*2+1,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.2,size:Math.random()*6+4,color:n[Math.floor(Math.random()*n.length)],opacity:1,shape:Math.random()>.5?"rect":"circle"});return o},update(t,e,a){let r=!1;for(let n of t)n.vy+=.15,n.vx*=.99,n.x+=n.vx,n.y+=n.vy,n.rotation+=n.rotationSpeed,n.y>0&&n.opacity>0&&n.y>500&&(n.opacity-=.02,n.opacity<0&&(n.opacity=0)),n.opacity>.01&&(r=!0);return r},render(t,e){for(let a of e)a.opacity<.01||(t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.translate(a.x,a.y),t.rotate(a.rotation),a.shape==="circle"?(t.beginPath(),t.arc(0,0,a.size/2,0,Math.PI*2),t.fill()):t.fillRect(-a.size/2,-a.size/2,a.size,a.size*.6),t.restore())}};var cD={light:20,medium:40,heavy:80},dD="\u{1F389}",Yk={init(t,e,a){let r=cD[a.intensity],n=typeof a.props?.emoji=="string"?a.props.emoji:dD,o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*-200,vx:0,vy:Math.random()*1.5+1,rotation:0,rotationSpeed:0,size:Math.random()*12+16,color:"#000000",opacity:1,shape:"emoji",emoji:n,data:{wobblePhase:Math.random()*Math.PI*2,wobbleAmp:Math.random()*1.5+.5,originX:0}});for(let i of o)i.data&&(i.data.originX=i.x);return o},update(t,e,a){let r=!1;for(let n of t){n.y+=n.vy;let o=n.data?.wobblePhase??0,i=n.data?.wobbleAmp??1,s=n.data?.originX??n.x;n.x=s+Math.sin(a*.003+o)*i*20,n.y>600&&(n.opacity-=.02,n.opacity<0&&(n.opacity=0)),n.opacity>.01&&(r=!0)}return r},render(t,e){for(let a of e)a.opacity<.01||!a.emoji||(t.save(),t.globalAlpha=a.opacity,t.font=`${a.size}px serif`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.emoji,a.x,a.y),t.restore())}};var fD={light:20,medium:40,heavy:80},pD={light:3,medium:4,heavy:5},Qk={init(t,e,a){let r=fD[a.intensity],n=pD[a.intensity],o=a.colors.length>0?a.colors:["#ff4444","#44ff44","#4444ff"],i=[];for(let s=0;s<n;s++){let l=Math.random()*t*.8+t*.1,u=Math.random()*e*.6,c=o[Math.floor(Math.random()*o.length)];for(let d=0;d<r;d++){let f=Math.PI*2*d/r+(Math.random()-.5)*.3,h=Math.random()*3+2;i.push({x:l,y:u,vx:Math.cos(f)*h,vy:Math.sin(f)*h,rotation:0,rotationSpeed:0,size:Math.random()*3+2,color:c,opacity:1,shape:"circle",data:{centerX:l,centerY:u}})}}return i},update(t,e,a){let r=!1;for(let n of t)n.vx*=.97,n.vy*=.97,n.vy+=.03,n.x+=n.vx,n.y+=n.vy,n.opacity-=.008,n.opacity<0&&(n.opacity=0),n.opacity>.01&&(r=!0);return r},render(t,e){for(let a of e)a.opacity<.01||(t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.shadowBlur=12,t.shadowColor=a.color,t.beginPath(),t.arc(a.x,a.y,a.size,0,Math.PI*2),t.fill(),t.restore())}};var hD={light:30,medium:60,heavy:120},Jk={init(t,e,a){let r=hD[a.intensity],n=a.colors.length>0?a.colors:["#ffd700","#ffffff","#fffacd"],o=[];for(let i=0;i<r;i++)o.push({x:Math.random()*t,y:Math.random()*e,vx:(Math.random()-.5)*.3,vy:-(Math.random()*.5+.2),rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.1,size:Math.random()*4+2,color:n[Math.floor(Math.random()*n.length)],opacity:Math.random()*.5+.5,shape:"circle",data:{phase:Math.random()*Math.PI*2,baseOpacity:Math.random()*.5+.5}});return o},update(t,e,a){let r=!1;for(let n of t){n.x+=n.vx,n.y+=n.vy,n.rotation+=n.rotationSpeed,n.data&&(n.data.baseOpacity=(n.data.baseOpacity??1)-.001,n.data.baseOpacity<0&&(n.data.baseOpacity=0));let o=n.data?.phase??0,i=n.data?.baseOpacity??1;if(i<=.01)n.opacity=0;else{let s=Math.sin(a*.005+o)*.4+.6;n.opacity=i*s}n.opacity>.01&&(r=!0)}return r},render(t,e){for(let a of e){if(a.opacity<.01)continue;t.save(),t.globalAlpha=a.opacity,t.fillStyle=a.color,t.translate(a.x,a.y),t.rotate(a.rotation);let r=a.size;t.beginPath(),t.moveTo(0,-r),t.lineTo(r*.3,-r*.3),t.lineTo(r,0),t.lineTo(r*.3,r*.3),t.lineTo(0,r),t.lineTo(-r*.3,r*.3),t.lineTo(-r,0),t.lineTo(-r*.3,-r*.3),t.closePath(),t.fill(),t.restore()}}};var Ff=class{constructor(){this.canvas=null,this.ctx=null,this.rafId=null,this.particles=[],this.startTime=0,this.lastFrame=0,this.duration=0,this.effect=null,this.container=null}start(e,a,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;this.container=e,this.effect=a,this.duration=r.duration;let o=document.createElement("canvas");o.setAttribute("data-syntro-celebrate",""),Object.assign(o.style,{position:"fixed",inset:"0",pointerEvents:"none",zIndex:"2147483646"});let i=window.devicePixelRatio||1,s=window.innerWidth,l=window.innerHeight;o.width=s*i,o.height=l*i,o.style.width=`${s}px`,o.style.height=`${l}px`;let u=o.getContext("2d");u&&(u.scale(i,i),this.canvas=o,this.ctx=u,e.appendChild(o),this.particles=a.init(s,l,r),this.startTime=performance.now(),this.lastFrame=this.startTime,this.tick=this.tick.bind(this),this.rafId=requestAnimationFrame(this.tick))}stop(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.canvas&&this.container&&(this.canvas.remove(),this.canvas=null),this.ctx=null,this.effect=null,this.container=null,this.particles=[]}tick(e){if(!this.ctx||!this.canvas||!this.effect)return;let a=e-this.startTime,r=e-this.lastFrame;if(this.lastFrame=e,a>=this.duration){this.stop();return}let n=this.canvas.width/(window.devicePixelRatio||1),o=this.canvas.height/(window.devicePixelRatio||1);if(this.ctx.clearRect(0,0,n,o),!this.effect.update(this.particles,r,a)){this.stop();return}this.effect.render(this.ctx,this.particles),this.rafId=requestAnimationFrame(this.tick)}};var mD=["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff"];function gD(t,e){return[t,e,`${t}cc`,`${e}cc`,"#ffffff",`${t}80`]}function vD(t){try{let e=getComputedStyle(t),a=e.getPropertyValue("--sc-color-primary")?.trim(),r=e.getPropertyValue("--sc-color-primary-hover")?.trim();if(a?.startsWith("#")&&a.length>=7)return gD(a,r||a)}catch{}return null}var e1=new Map([["confetti",Kk],["fireworks",Qk],["sparkles",Jk],["emoji-rain",Yk]]),t1=async(t,e)=>{let a=e1.get(t.effect);if(!a)return console.warn(`[adaptive-overlays] Unknown celebration effect: "${t.effect}". Available: ${[...e1.keys()].join(", ")}`),{cleanup:()=>{}};let r=t.colors??vD(e.overlayRoot)??mD,n={duration:t.duration??3e3,intensity:t.intensity??"medium",colors:r,props:t.props},o=new Ff;return o.start(e.overlayRoot,a,n),e.publishEvent("action.applied",{id:e.generateId(),kind:"overlays:celebrate",effect:t.effect}),{cleanup:()=>{o.stop()}}};var Ly="syntro_active_tour",Hf=new Map;function yD(t){try{let e=localStorage.getItem(Ly);if(!e)return null;let a=JSON.parse(e);return a.tourId!==t?null:a}catch{return null}}function wy(t){try{localStorage.setItem(Ly,JSON.stringify(t))}catch{}}function xD(){try{localStorage.removeItem(Ly)}catch{}}function Au(){return window.location.pathname}function bD(t){if(!t.route)return!0;let e=Au();return t.route.includes("*")?new RegExp(`^${t.route.replace(/\*/g,".*")}$`).test(e):e===t.route}var ky=async(t,e)=>{let{tourId:a,steps:r,startStep:n,autoStart:o=!0}=t;if(r.length===0)throw new Error(`Tour "${a}" has no steps`);if(Hf.has(a))return{cleanup:async()=>{let y=Hf.get(a);y&&await y.cleanup()}};if(!e.applyAction)throw new Error("Tour executor requires applyAction in context");let i=yD(a),s=!!i;if(!s&&!o)return{cleanup:()=>{}};i||(i={tourId:a,currentStepId:n||r[0].id,startedAt:Date.now()},wy(i));let l=r.findIndex(y=>y.id===i.currentStepId);if(l===-1){let y=n||r[0].id;l=r.findIndex(v=>v.id===y),l===-1&&(l=0),i.currentStepId=r[l].id,wy(i)}let u=r[l];if(!bD(u))return e.publishEvent("tour.waiting_for_route",{tourId:a,stepId:u.id,expectedRoute:u.route,currentRoute:Au()}),{cleanup:()=>{}};let c=!1,d=null,f=null,h=null,S=async()=>{f&&(f(),f=null),d?.isApplied()&&(await d.revert(),d=null)},x=async y=>{if(c)return;if(await S(),y==="end"){xD(),e.publishEvent("tour.completed",{tourId:a,totalSteps:r.length}),c=!0;return}let v=r.find(C=>C.id===y);if(!v){console.error(`[Tour] Step "${y}" not found`);return}if(i.currentStepId=y,wy(i),e.publishEvent("tour.step_changed",{tourId:a,previousStepId:u.id,nextStepId:y}),v.route&&v.route!==Au()){e.publishEvent("tour.awaiting_navigation",{tourId:a,stepId:y,targetRoute:v.route});return}await b(v)},b=async y=>{if(!c){e.publishEvent("tour.step_started",{tourId:a,stepId:y.id,stepIndex:r.findIndex(v=>v.id===y.id),totalSteps:r.length});try{d=await e.applyAction(y.action)}catch(v){console.error(`[Tour] Failed to execute step "${y.id}":`,v),e.publishEvent("tour.step_failed",{tourId:a,stepId:y.id,error:String(v)});return}if(y.onAction&&e.subscribeEvent){f=e.subscribeEvent("action.modal_cta_clicked",w=>{let _=w?.actionId;if(_&&y.onAction){let L=y.onAction[_];L&&x(L)}});let v=e.subscribeEvent("action.tooltip_cta_clicked",w=>{let _=w?.actionId;if(_&&y.onAction){let L=y.onAction[_];L&&x(L)}}),C=f;f=()=>{C(),v()}}}};h=(()=>{let y=Au(),v=()=>{let _=Au();_!==y&&(y=_,e.publishEvent("tour.route_changed",{tourId:a,newRoute:_}))};if(e.subscribeNavigation)return e.subscribeNavigation(()=>v());window.addEventListener("popstate",v);let C=history.pushState.bind(history),w=history.replaceState.bind(history);return history.pushState=(..._)=>{C(..._),queueMicrotask(v)},history.replaceState=(..._)=>{w(..._),queueMicrotask(v)},()=>{window.removeEventListener("popstate",v),history.pushState=C,history.replaceState=w}})(),s?e.publishEvent("tour.resumed",{tourId:a,stepId:i.currentStepId}):e.publishEvent("tour.started",{tourId:a,totalSteps:r.length,startStepId:i.currentStepId}),await b(u);let m=async()=>{c=!0,Hf.delete(a),await S(),h&&h(),e.publishEvent("tour.paused",{tourId:a,stepId:i.currentStepId})};return Hf.set(a,{cleanup:m}),{cleanup:m}};var Ya={white:"#ffffff",black:"#000000"},ne={0:"#2c0b0a",1:"#5b1715",2:"#89221f",3:"#b72e2a",4:"#d44844",5:"#dd6d69",6:"#e5918f",7:"#eeb6b4",8:"#f6dada",9:"#faebea"},k={0:"#07080a",1:"#0f1318",2:"#0e1114",3:"#1c222a",4:"#2b333f",5:"#394454",6:"#475569",7:"#677384",8:"#87919f",9:"#a8afba",10:"#cbd0d7",11:"#e8eaee",12:"#f6f7f9"},Re={0:"#07230a",1:"#0e4514",2:"#16681e",3:"#1d8a28",4:"#24ad32",5:"#4fbd5a",6:"#7acd82",7:"#a5deab",8:"#d0eed3",9:"#e5f6e7"},Tt={0:"#301f09",1:"#5f3e12",2:"#8f5e1b",3:"#be7d24",4:"#ee9c2d",5:"#f1b057",6:"#f5c481",7:"#f8d7ab",8:"#fcebd5",9:"#fdf5ea"},Ge={0:"#330707",1:"#660f0e",2:"#991616",3:"#cc1e1d",4:"#ff2524",5:"#ff5150",6:"#ff7c7c",7:"#ffa8a7",8:"#ffd3d3",9:"#ffe9e9"},ba={0:"#051533",1:"#0a2a66",2:"#0f3f98",3:"#1454cb",4:"#1969fe",5:"#4787fe",6:"#75a5fe",7:"#a3c3ff",8:"#d1e1ff",9:"#e8f0ff"},Eu={0:"#662500",1:"#993d00",2:"#cc5800",3:"#ff7700",4:"#fea85d",5:"#fec58f",6:"#ffd6ae",7:"#fee6cd",8:"#fff1e1",9:"#fff8f0"},_t={0:"#151229",1:"#2a2452",2:"#40357c",3:"#5547a5",4:"#6a59ce",5:"#887ad8",6:"#a69be2",7:"#c3bdeb",8:"#e1def5",9:"#f0eefa"},Tu={0:"#37091f",1:"#69123c",2:"#9b1c58",3:"#cd2575",4:"#ff2e92",5:"#ff58a8",6:"#ff82be",7:"#ffabd3",8:"#ffd5e9",9:"#ffeaf4"};var Sa={primary:k[10],secondary:k[9],tertiary:k[8]},ZU={primary:k[2],secondary:k[0]},Iy={primary:k[4],secondary:k[3]},Uf={primary:{text:Ya.white,icon:Ya.white,border:ne[3],backgroundDefault:ne[3],backgroundHover:ne[2]},neutral:{text:k[10],textHover:Ya.white,icon:k[10],iconHover:Ya.white,border:k[4],background:k[2]},link:{text:Ya.white,icon:Ya.white,hover:ne[5]},error:{text:Ge[5],hover:Ge[6]},success:{text:Re[5],hover:Re[6]}},XU={slateGrey:{content:k[10],pillOutline:k[10],borderPrimary:k[5],borderSecondary:k[5],background:k[3]},brand:{content:ne[9],pillOutline:ne[9],borderPrimary:ne[6],borderSecondary:ne[6],background:ne[0]},red:{content:Ge[8],pillOutline:Ge[4],borderPrimary:Ge[2],borderSecondary:Ge[2],background:Ge[0]},yellow:{content:Tt[8],pillOutline:Tt[4],borderPrimary:Tt[2],borderSecondary:Tt[2],background:Tt[0]},green:{content:Re[8],pillOutline:Re[4],borderPrimary:Re[2],borderSecondary:Re[2],background:Re[0]},purple:{content:_t[8],pillOutline:_t[4],borderPrimary:_t[2],borderSecondary:_t[2],background:_t[0]},blue:{content:ba[8],pillOutline:ba[4],borderPrimary:ba[2],borderSecondary:ba[2],background:ba[0]},orange:{content:Eu[8],pillOutline:Eu[4],borderPrimary:Eu[2],borderSecondary:Eu[2],background:Eu[0]},pink:{content:Tu[8],pillOutline:Tu[4],borderPrimary:Tu[2],borderSecondary:Tu[2],background:Tu[0]}},KU={green:{content:Re[8],border:Re[2],background:Re[0]},yellow:{content:Tt[8],border:Tt[2],background:Tt[0]},red:{content:Ge[8],border:Ge[2],background:Ge[0]}},YU={green:{content:Re[1],background:Re[9]},yellow:{content:Tt[1],background:Tt[9]},red:{content:Ge[1],background:Ge[9]}},QU={content:k[10],border:k[4],background:k[3]},JU={backgroundDefault:k[2],backgroundHover:k[1],selected:k[3]},ez={background:k[2],icon:k[10],borderDefault:k[4],borderSelected:ne[3],textLabel:k[9],textPlaceholder:k[8],textHint:k[8]},tz={backgroundDefault:k[2],backgroundDisabled:k[0],textLabel:k[9],textPlaceholder:k[8],textHint:k[8],textError:Ge[5],iconDefault:k[9],iconPlaceholder:k[10],iconError:Ge[5],borderDefault:k[4],borderSelected:ne[3],borderError:Ge[5]},az={handleDefault:Ya.white,handleDisabled:k[10],off:{backgroundDefault:k[4],backgroundHover:k[5],backgroundDisabled:k[4]},on:{backgroundDefault:Re[3],backgroundHover:Re[2],backgroundDisabled:k[4]}},rz={off:{backgroundDefault:"#00000000",backgroundHover:k[5],backgroundDisabled:k[2],border:k[6]},on:{backgroundDefault:Re[0],backgroundHover:Re[1],backgroundDisabled:k[2],border:Re[3]}},nz={content:k[10],background:k[4]},oz={background:k[4],active:Re[3]},iz={background:k[1],content:k[9],border:k[4]},sz={backgroundDefault:k[1],backgroundHover:k[3],backgroundActive:k[4],border:k[4],contentPrimary:k[10],contentSecondary:k[9],contentTertiary:k[8]},lz={background:k[1],content:k[9],border:k[4]},uz={activeBackground:k[3],activeContent:ne[5],inactiveContent:k[9],border:k[4]},cz={header:{textDefault:k[9],textHover:k[8],backgroundDefault:k[1]},border:k[4],cell:{textPrimary:k[10],textSecondary:k[9],backgroundDefault:k[2],backgroundHover:k[1]}},dz={textPrimaryDefault:k[10],textPrimaryHover:k[10],textSecondaryDefault:k[8],textSecondaryHover:k[9],iconPrimary:k[10],iconSecondary:k[8]},fz={background:Re[1],active:Re[5]},pz={textDefault:k[10],textSelected:Ya.white,textDisabled:k[7],backgroundDefault:k[2],backgroundMiddle:k[3],backgroundSelected:ne[3],border:k[4]},hz=k[9];var a1=typeof CSS<"u"&&CSS.supports?.("clip-path","path('M0 0 H1 V1 Z')");function r1(t,e,a){let r=a?.paddingPx??12,n=a?.radiusPx??12,o=Math.min(Math.max(a?.scrimOpacity??.55,0),1),i=a?.ringColor??`var(--syntro-ring, ${ba[5]})`,s=a?.blocking??!1,l=a?.onClickOutside??!0,u=a?.onEsc??!0,c=getComputedStyle(document.documentElement),d=c.getPropertyValue("--syntro-spotlight-backdrop").trim(),f=c.getPropertyValue("--syntro-ring").trim(),h=document.createElement("div");h.className="syntro-spotlight-scrim";let S=s||l;Object.assign(h.style,{position:"fixed",inset:"0",zIndex:"2147483646",pointerEvents:S?"auto":"none",background:d||`rgba(2, 6, 23, ${o})`,transition:"opacity 220ms ease",opacity:"0"}),e.appendChild(h),requestAnimationFrame(()=>h.style.opacity="1");let x=document.createElement("div");x.className="syntro-spotlight-ring",Object.assign(x.style,{position:"fixed",pointerEvents:"none",borderRadius:`${n}px`,border:`2px solid ${i||f||ba[5]}`,boxShadow:"0 0 0 4px rgba(255,255,255,0.35)",zIndex:"2147483647",transition:"all 220ms cubic-bezier(0.16,1,0.3,1)"}),e.appendChild(x);let b=[];if(!a1)for(let A=0;A<4;A++){let I=document.createElement("div");I.style.position="fixed",I.style.background="inherit",b.push(I),h.appendChild(I)}let g=A=>{h.style.clipPath=A,h.style.webkitClipPath=A},m=()=>{if(!t.isConnected){L.destroy();return}let A=t.getBoundingClientRect(),I=A.left-r,O=A.top-r,H=A.width+r*2,E=A.height+r*2;if(Object.assign(x.style,{left:`${I}px`,top:`${O}px`,width:`${H}px`,height:`${E}px`}),a1){let R=window.innerWidth,M=window.innerHeight,F=Math.min(n,H/2,E/2),Z=`M 0 0 L ${R} 0 L ${R} ${M} L 0 ${M} Z`,U=`M ${I+F} ${O} A ${F} ${F} 0 0 0 ${I} ${O+F} L ${I} ${O+E-F} A ${F} ${F} 0 0 0 ${I+F} ${O+E} L ${I+H-F} ${O+E} A ${F} ${F} 0 0 0 ${I+H} ${O+E-F} L ${I+H} ${O+F} A ${F} ${F} 0 0 0 ${I+H-F} ${O} L ${I+F} ${O} Z`;g(`path('${Z} ${U}')`)}else{let[R,M,F,Z]=b;Object.assign(R.style,{left:"0px",top:"0px",width:"100vw",height:`${O}px`}),Object.assign(F.style,{left:"0px",top:`${O+E}px`,width:"100vw",height:`${Math.max(0,window.innerHeight-(O+E))}px`}),Object.assign(Z.style,{left:"0px",top:`${O}px`,width:`${I}px`,height:`${E}px`}),Object.assign(M.style,{left:`${I+H}px`,top:`${O}px`,width:`${Math.max(0,window.innerWidth-(I+H))}px`,height:`${E}px`})}},y=new ResizeObserver(()=>requestAnimationFrame(m));y.observe(t);let v=()=>requestAnimationFrame(m),C=()=>requestAnimationFrame(m);window.addEventListener("scroll",v,!0),window.addEventListener("resize",C);let w=A=>{A.key==="Escape"&&u&&(a?.onDismiss?.(),L.destroy())};u&&window.addEventListener("keydown",w);let _=A=>{s?(A.preventDefault(),A.stopPropagation()):l&&(a?.onDismiss?.(),L.destroy())};h.addEventListener("click",_);let L={destroy(){y.disconnect(),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",C),u&&window.removeEventListener("keydown",w),h.removeEventListener("click",_),h.style.pointerEvents="none",h.style.opacity="0",setTimeout(()=>{try{h.remove()}catch{}try{x.remove()}catch{}},220)}};return m(),L}var SD=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button","svg","path","circle","line","polyline","polygon","rect","g"]);function _a(t){if(typeof window.Sanitizer=="function")try{let s=new window.Sanitizer({}).sanitizeToFragment(t),l=document.createElement("div");return l.append(s),l.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=[];for(;n.nextNode();){let i=n.currentNode,s=i.tagName.toLowerCase();if(!SD.has(s)){o.push(i);continue}for(let l of Array.from(i.attributes)){let u=l.name.toLowerCase(),c=l.value.trim().toLowerCase(),d=u.startsWith("on"),f=(u==="href"||u==="src")&&c.startsWith("javascript:");(d||f)&&i.removeAttribute(l.name)}}for(let i of o){for(;i.firstChild;)i.parentNode?.insertBefore(i.firstChild,i);i.remove()}return a.innerHTML}var Wo={bg:"var(--sc-overlay-background, #ffffff)",title:"var(--sc-overlay-title-color, var(--sc-overlay-text-color, #111827))",text:"var(--sc-overlay-text-color, #4b5563)",accent:"var(--sc-color-primary, #4f46e5)",radius:"var(--sc-border-radius, 12px)"},Ay=async(t,e)=>{let{content:a,size:r="md",blocking:n=!1,scrim:o,dismiss:i,ctaButtons:s}=t,l=document.createElement("div");l.className="syntro-modal-scrim",l.style.cssText=`
|
|
10
10
|
position: fixed;
|
|
11
11
|
inset: 0;
|
|
12
12
|
background: rgba(0, 0, 0, ${o?.opacity??.6});
|
|
@@ -159,13 +159,13 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
159
159
|
${t}</tr>
|
|
160
160
|
`}tablecell(t){let e=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+e+`</${a}>
|
|
161
161
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Sr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:a}){let r=this.parser.parseInline(a),n=iI(t);if(n===null)return r;t=n;let o='<a href="'+t+'"';return e&&(o+=' title="'+Sr(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:a,tokens:r}){r&&(a=this.parser.parseInline(r,this.parser.textRenderer));let n=iI(t);if(n===null)return Sr(a);t=n;let o=`<img src="${t}" alt="${Sr(a)}"`;return e&&(o+=` title="${Sr(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Sr(t.text)}},Ky=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},nr=class zy{constructor(e){B(this,"options");B(this,"renderer");B(this,"textRenderer");this.options=e||ai,this.options.renderer=this.options.renderer||new dp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ky}static parse(e,a){return new zy(a).parse(e)}static parseInline(e,a){return new zy(a).parseInline(e)}parse(e){let a="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let i=n,s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){a+=s||"";continue}}let o=n;switch(o.type){case"space":{a+=this.renderer.space(o);break}case"hr":{a+=this.renderer.hr(o);break}case"heading":{a+=this.renderer.heading(o);break}case"code":{a+=this.renderer.code(o);break}case"table":{a+=this.renderer.table(o);break}case"blockquote":{a+=this.renderer.blockquote(o);break}case"list":{a+=this.renderer.list(o);break}case"checkbox":{a+=this.renderer.checkbox(o);break}case"html":{a+=this.renderer.html(o);break}case"def":{a+=this.renderer.def(o);break}case"paragraph":{a+=this.renderer.paragraph(o);break}case"text":{a+=this.renderer.text(o);break}default:{let i='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return a}parseInline(e,a=this.renderer){let r="";for(let n=0;n<e.length;n++){let o=e[n];if(this.options.extensions?.renderers?.[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=s||"";continue}}let i=o;switch(i.type){case"escape":{r+=a.text(i);break}case"html":{r+=a.html(i);break}case"link":{r+=a.link(i);break}case"image":{r+=a.image(i);break}case"checkbox":{r+=a.checkbox(i);break}case"strong":{r+=a.strong(i);break}case"em":{r+=a.em(i);break}case"codespan":{r+=a.codespan(i);break}case"br":{r+=a.br(i);break}case"del":{r+=a.del(i);break}case"text":{r+=a.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}},lp,Uu=(lp=class{constructor(t){B(this,"options");B(this,"block");this.options=t||ai}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?rr.lex:rr.lexInline}provideParser(){return this.block?nr.parse:nr.parseInline}},B(lp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),B(lp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),lp),Yy=class{constructor(...t){B(this,"defaults",qy());B(this,"options",this.setOptions);B(this,"parse",this.parseMarkdown(!0));B(this,"parseInline",this.parseMarkdown(!1));B(this,"Parser",nr);B(this,"Renderer",dp);B(this,"TextRenderer",Ky);B(this,"Lexer",rr);B(this,"Tokenizer",cp);B(this,"Hooks",Uu);this.use(...t)}walkTokens(t,e){let a=[];for(let r of t)switch(a=a.concat(e.call(this,r)),r.type){case"table":{let n=r;for(let o of n.header)a=a.concat(this.walkTokens(o.tokens,e));for(let o of n.rows)for(let i of o)a=a.concat(this.walkTokens(i.tokens,e));break}case"list":{let n=r;a=a.concat(this.walkTokens(n.items,e));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(o=>{let i=n[o].flat(1/0);a=a.concat(this.walkTokens(i,e))}):n.tokens&&(a=a.concat(this.walkTokens(n.tokens,e)))}}return a}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let r={...a};if(r.async=this.defaults.async||r.async||!1,a.extensions&&(a.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let o=e.renderers[n.name];o?e.renderers[n.name]=function(...i){let s=n.renderer.apply(this,i);return s===!1&&(s=o.apply(this,i)),s}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[n.level];o?o.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),r.extensions=e),a.renderer){let n=this.defaults.renderer||new dp(this.defaults);for(let o in a.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let i=o,s=a.renderer[i],l=n[i];n[i]=(...u)=>{let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c||""}}r.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new cp(this.defaults);for(let o in a.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let i=o,s=a.tokenizer[i],l=n[i];n[i]=(...u)=>{let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}r.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new Uu;for(let o in a.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let i=o,s=a.hooks[i],l=n[i];Uu.passThroughHooks.has(o)?n[i]=u=>{if(this.defaults.async&&Uu.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await s.call(n,u);return l.call(n,d)})();let c=s.call(n,u);return l.call(n,c)}:n[i]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await s.apply(n,u);return d===!1&&(d=await l.apply(n,u)),d})();let c=s.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}r.hooks=n}if(a.walkTokens){let n=this.defaults.walkTokens,o=a.walkTokens;r.walkTokens=function(i){let s=[];return s.push(o.call(this,i)),n&&(s=s.concat(n.call(this,i))),s}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return rr.lex(t,e??this.defaults)}parser(t,e){return nr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,a)=>{let r={...a},n={...this.defaults,...r},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let i=n.hooks?await n.hooks.preprocess(e):e,s=await(n.hooks?await n.hooks.provideLexer():t?rr.lex:rr.lexInline)(i,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser():t?nr.parse:nr.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(o);try{n.hooks&&(e=n.hooks.preprocess(e));let i=(n.hooks?n.hooks.provideLexer():t?rr.lex:rr.lexInline)(e,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let s=(n.hooks?n.hooks.provideParser():t?nr.parse:nr.parseInline)(i,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(i){return o(i)}}}onError(t,e){return a=>{if(a.message+=`
|
|
162
|
-
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Sr(a.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(a);throw a}}},ti=new Yy;function Ee(t,e){return ti.parse(t,e)}Ee.options=Ee.setOptions=function(t){return ti.setOptions(t),Ee.defaults=ti.defaults,uI(Ee.defaults),Ee};Ee.getDefaults=qy;Ee.defaults=ai;Ee.use=function(...t){return ti.use(...t),Ee.defaults=ti.defaults,uI(Ee.defaults),Ee};Ee.walkTokens=function(t,e){return ti.walkTokens(t,e)};Ee.parseInline=ti.parseInline;Ee.Parser=nr;Ee.parser=nr.parse;Ee.Renderer=dp;Ee.TextRenderer=Ky;Ee.Lexer=rr;Ee.lexer=rr.lex;Ee.Tokenizer=cp;Ee.Hooks=Uu;Ee.parse=Ee;var Iz=Ee.options,Az=Ee.setOptions,Ez=Ee.use,Tz=Ee.walkTokens,Rz=Ee.parseInline;var Mz=nr.parse,Oz=rr.lex;var Me=Y(Ye(),1),Qy=Y(Go(),1);var Rt={container:{fontFamily:"var(--sc-font-family, system-ui, -apple-system, sans-serif)",maxWidth:"800px",margin:"0 auto"},searchWrapper:{marginBottom:"8px"},searchInput:{width:"100%",padding:"12px 16px",borderRadius:"8px",fontSize:"14px",outline:"none",transition:"border-color 0.15s ease",backgroundColor:"var(--sc-content-search-background)",color:"var(--sc-content-search-color)"},accordion:{display:"flex",flexDirection:"column",gap:"var(--sc-content-item-gap, 6px)"},item:{borderRadius:"var(--sc-content-border-radius, 8px)",overflow:"hidden",transition:"box-shadow 0.15s ease"},question:{width:"100%",padding:"var(--sc-content-item-padding, 12px 16px)",display:"flex",alignItems:"center",justifyContent:"space-between",border:"none",cursor:"pointer",fontSize:"var(--sc-content-item-font-size, 15px)",fontWeight:500,textAlign:"left",transition:"background-color 0.15s ease"},chevron:{fontSize:"20px",transition:"transform 0.2s ease",color:"var(--sc-content-chevron-color, currentColor)"},answer:{padding:"var(--sc-content-body-padding, 0 16px 12px 16px)",fontSize:"var(--sc-content-body-font-size, 14px)",lineHeight:1.6,overflow:"hidden",transition:"max-height 0.2s ease, padding 0.2s ease"},category:{display:"inline-block",fontSize:"11px",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"4px 8px",borderRadius:"4px",marginBottom:"8px"},categoryHeader:{fontSize:"var(--sc-content-category-font-size, 12px)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",padding:"var(--sc-content-category-padding, 8px 4px 4px 4px)",marginTop:"var(--sc-content-category-gap, 4px)"},feedback:{display:"flex",alignItems:"center",gap:"8px",marginTop:"12px",paddingTop:"10px",borderTop:"1px solid rgba(0, 0, 0, 0.08)",fontSize:"13px"},feedbackButton:{background:"none",border:"1px solid transparent",cursor:"pointer",fontSize:"16px",padding:"4px 8px",borderRadius:"4px",transition:"background-color 0.15s ease, border-color 0.15s ease"},feedbackButtonSelected:{borderColor:"rgba(0, 0, 0, 0.2)",backgroundColor:"rgba(0, 0, 0, 0.04)"},emptyState:{textAlign:"center",padding:"48px 24px",fontSize:"14px"},noResults:{textAlign:"center",padding:"32px 16px",fontSize:"14px"}},ri={light:{container:{backgroundColor:"transparent",color:"inherit"},searchInput:{border:`1px solid ${k[11]}`},item:{backgroundColor:"var(--sc-content-background)",borderTop:"var(--sc-content-border)",borderRight:"var(--sc-content-border)",borderBottom:"var(--sc-content-border)",borderLeft:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)"},question:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},questionHover:{backgroundColor:"var(--sc-content-background-hover)"},answer:{color:"var(--sc-content-text-secondary-color)"},category:{backgroundColor:_t[8],color:_t[2]},categoryHeader:{color:k[7]},emptyState:{color:k[8]},feedbackPrompt:{color:k[7]}},dark:{container:{backgroundColor:"transparent",color:"inherit"},searchInput:{border:`1px solid ${k[5]}`},item:{backgroundColor:"var(--sc-content-background)",borderTop:"var(--sc-content-border)",borderRight:"var(--sc-content-border)",borderBottom:"var(--sc-content-border)",borderLeft:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},question:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},questionHover:{backgroundColor:"var(--sc-content-background-hover)"},answer:{color:"var(--sc-content-text-secondary-color)"},category:{backgroundColor:_t[0],color:_t[6]},categoryHeader:{color:k[8]},emptyState:{color:k[7]},feedbackPrompt:{color:k[8]}}};var SI=new Yy({async:!1,gfm:!0,breaks:!0});function iP(t){return typeof t=="string"?t:t.type==="rich"?t.html:t.content}function sP(t){if(typeof t=="string"){let a=SI.parse(t);return(0,ze.jsx)("div",{style:{margin:0},"data-faq-markdown":"",dangerouslySetInnerHTML:{__html:a}})}if(t.type==="rich")return(0,ze.jsx)("div",{style:{margin:0},dangerouslySetInnerHTML:{__html:t.html}});let e=SI.parse(t.content);return(0,ze.jsx)("div",{style:{margin:0},"data-faq-markdown":"",dangerouslySetInnerHTML:{__html:e}})}function lP(t){return t?t===!0?{style:"thumbs"}:t:null}function uP(t){return t.prompt||"Was this helpful?"}function cP({item:t,isExpanded:e,isHighlighted:a,isLast:r,onToggle:n,theme:o,feedbackConfig:i,feedbackValue:s,onFeedback:l}){let[u,c]=(0,Me.useState)(!1),d=ri[o],{question:f,answer:h}=t.config,S={...Rt.item,...d.item,...e?d.itemExpanded:{},...a?{boxShadow:`0 0 0 2px ${_t[4]}, 0 0 12px rgba(106, 89, 206, 0.4)`,transition:"box-shadow 0.3s ease"}:{},...r?{}:{borderBottom:"var(--sc-content-item-divider, none)"}},x={...Rt.question,...d.question,...u?d.questionHover:{}},b={...Rt.chevron,transform:e?"rotate(90deg)":"rotate(0deg)"},g={...Rt.answer,...d.answer,maxHeight:e?"500px":"0",paddingBottom:e?"16px":"0"},m={...Rt.feedback,...d.feedbackPrompt};return(0,ze.jsxs)("div",{style:S,"data-faq-item-id":t.config.id,children:[(0,ze.jsxs)("button",{type:"button",style:x,onClick:n,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),"aria-expanded":e,children:[(0,ze.jsx)("span",{children:f}),(0,ze.jsx)("span",{style:b,children:"\u203A"})]}),(0,ze.jsxs)("div",{style:g,"aria-hidden":!e,children:[sP(h),e&&i&&(0,ze.jsxs)("div",{style:m,children:[(0,ze.jsx)("span",{children:uP(i)}),(0,ze.jsx)("button",{type:"button",style:{...Rt.feedbackButton,...s==="up"?Rt.feedbackButtonSelected:{}},"aria-label":"Thumbs up",onClick:()=>l(t.config.id,f,"up"),children:"\u{1F44D}"}),(0,ze.jsx)("button",{type:"button",style:{...Rt.feedbackButton,...s==="down"?Rt.feedbackButtonSelected:{}},"aria-label":"Thumbs down",onClick:()=>l(t.config.id,f,"down"),children:"\u{1F44E}"})]})]})]})}function dP({config:t,runtime:e,instanceId:a}){let[r,n]=(0,Me.useReducer)(O=>O+1,0),[o,i]=(0,Me.useState)(new Set),[s,l]=(0,Me.useState)(null),[u,c]=(0,Me.useState)(""),[d,f]=(0,Me.useState)(new Map),h=(0,Me.useMemo)(()=>lP(t.feedback),[t.feedback]);(0,Me.useEffect)(()=>e.context.subscribe(()=>{n()}),[e.context]),(0,Me.useEffect)(()=>{if(e.accumulator?.subscribe)return e.accumulator.subscribe(()=>{n()})},[e.accumulator]),(0,Me.useEffect)(()=>{if(!e.events.subscribe)return;if(e.events.getRecent){let E=e.events.getRecent({patterns:["^action\\.tooltip_cta_clicked$","^action\\.modal_cta_clicked$"]},10).filter(R=>{let M=R.props?.actionId;return typeof M=="string"&&M.startsWith("faq:open:")}).pop();if(E&&Date.now()-E.ts<1e4){let R=E.props.actionId.replace("faq:open:","");i(new Set([R])),requestAnimationFrame(()=>{let M=document.querySelector(`[data-faq-item-id="${R}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"center"})})}}return e.events.subscribe({patterns:["^action\\.tooltip_cta_clicked$","^action\\.modal_cta_clicked$"]},H=>{let E=H.props?.actionId;if(typeof E!="string"||!E.startsWith("faq:open:"))return;let R=E.replace("faq:open:","");i(new Set([R])),requestAnimationFrame(()=>{let M=document.querySelector(`[data-faq-item-id="${R}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"center"})}),e.events.publish("canvas.requestOpen")})},[e]),(0,Me.useEffect)(()=>{if(!e.events.subscribe)return;let O=E=>{let R=E.props?.tileId,M=E.props?.itemId;R===a&&M&&(i(new Set([M])),l(M),setTimeout(()=>l(null),1500),requestAnimationFrame(()=>{let F=document.querySelector(`[data-faq-item-id="${M}"]`);F&&F.scrollIntoView({behavior:"smooth",block:"center"})}))};if(e.events.getRecent){let R=e.events.getRecent({names:["notification.deep_link"]},5).filter(M=>M.props?.tileId===a&&M.props?.itemId).pop();R&&Date.now()-R.ts<1e4&&O(R)}return e.events.subscribe({names:["notification.deep_link"]},O)},[e,a]);let S=(0,Me.useMemo)(()=>(t.actions??[]).filter(O=>O.triggerWhen?e.evaluateSync(O.triggerWhen).value:!0),[t.actions,e,r]),x=(0,Me.useMemo)(()=>t.ordering==="priority"?[...S].sort((O,H)=>(H.config.priority??0)-(O.config.priority??0)):S,[S,t.ordering]),b=(0,Me.useMemo)(()=>{if(!t.searchable||!u.trim())return x;let O=u.toLowerCase();return x.filter(H=>H.config.question.toLowerCase().includes(O)||iP(H.config.answer).toLowerCase().includes(O)||H.config.category?.toLowerCase().includes(O))},[x,u,t.searchable]),g=(0,Me.useMemo)(()=>{let O=new Map;for(let H of b){let E=H.config.category;O.has(E)||O.set(E,[]),O.get(E).push(H)}return O},[b]),m=(0,Me.useMemo)(()=>b.some(O=>O.config.category),[b]),y=(0,Me.useMemo)(()=>t.theme&&t.theme!=="auto"?t.theme:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",[t.theme]),v=(0,Me.useCallback)(O=>{i(H=>{let E=new Set(H);return t.expandBehavior==="single"?H.has(O)?new Set:new Set([O]):(H.has(O)?E.delete(O):E.add(O),E)}),e.events.publish("faq:toggled",{instanceId:a,questionId:O,expanded:!o.has(O),timestamp:Date.now()})},[t.expandBehavior,e.events,a,o]),C=(0,Me.useCallback)((O,H,E)=>{f(R=>{let M=new Map(R);return M.set(O,E),M}),e.events.publish("faq:feedback",{itemId:O,question:H,value:E})},[e.events]),w={...Rt.container,...ri[y].container},_={...Rt.searchInput,...ri[y].searchInput},L={...Rt.emptyState,...ri[y].emptyState},A={...Rt.categoryHeader,...ri[y].categoryHeader},I=O=>O.map((H,E)=>(0,ze.jsx)(cP,{item:H,isExpanded:o.has(H.config.id),isHighlighted:s===H.config.id,isLast:E===O.length-1,onToggle:()=>v(H.config.id),theme:y,feedbackConfig:h,feedbackValue:d.get(H.config.id),onFeedback:C},H.config.id));return S.length===0?(0,ze.jsx)("div",{style:w,"data-adaptive-id":a,"data-adaptive-type":"adaptive-faq",children:(0,ze.jsx)("div",{style:L,children:"You're all set for now! We'll surface answers here when they're relevant to what you're doing."})}):(0,ze.jsxs)("div",{style:w,"data-adaptive-id":a,"data-adaptive-type":"adaptive-faq",children:[t.searchable&&(0,ze.jsxs)("div",{style:Rt.searchWrapper,children:[(0,ze.jsx)("style",{children:`[data-adaptive-id="${a}"] input::placeholder { color: var(--sc-content-search-color, inherit); opacity: 0.7; }`}),(0,ze.jsx)("input",{type:"text",placeholder:"Search questions...",value:u,onChange:O=>c(O.target.value),style:_})]}),(0,ze.jsx)("div",{style:Rt.accordion,children:m?Array.from(g.entries()).map(([O,H])=>(0,ze.jsxs)(Me.default.Fragment,{children:[O&&(0,ze.jsx)("div",{style:A,"data-category-header":O,children:O}),I(H)]},O??"__ungrouped")):I(b)}),t.searchable&&b.length===0&&u&&(0,ze.jsxs)("div",{style:{...Rt.noResults,...ri[y].emptyState},children:['No questions found matching "',u,'"']})]})}var _I={mount(t,e){let{runtime:a,instanceId:r="faq-widget",...n}=e||{expandBehavior:"single",searchable:!1,theme:"auto",actions:[]};if(a&&typeof Qy.createRoot=="function"){let o=(0,Qy.createRoot)(t);return o.render(Me.default.createElement(dP,{config:n,runtime:a,instanceId:r})),()=>{o.unmount()}}}};var CI={id:"adaptive-faq",version:"2.0.0",name:"FAQ Accordion",description:"Collapsible Q&A accordion with actions, rich content, feedback, and personalization",executors:aI,widgets:[{id:"adaptive-faq:accordion",component:_I,metadata:{name:"FAQ Accordion",description:"Collapsible Q&A accordion with search, categories, and feedback",icon:"\u2753",subtitle:"Curated just for you."}}],notifyWatchers(t){return(t.actions??[]).filter(a=>a.notify&&a.triggerWhen).map(a=>({id:`faq:${a.config.id}`,strategy:a.triggerWhen,eventName:"faq:question_revealed",eventProps:{questionId:a.config.id,question:a.config.question,title:a.notify.title,body:a.notify.body,icon:a.notify.icon}}))}};var fP=async(t,e)=>{let{badgeId:a}=t;return e.publishEvent("gamification.badge_awarded",{badgeId:a,awardedAt:Date.now()}),{cleanup:()=>{}}},pP=async(t,e)=>{let{points:a,reason:r}=t;return e.publishEvent("gamification.points_added",{points:a,reason:r,timestamp:Date.now()}),{cleanup:()=>{}}},hP={names:["page_view","button_click"],handler:(t,e)=>{console.log("[Gamification] Event received for badge trigger check")}},mP=[{kind:"gamification:awardBadge",executor:fP},{kind:"gamification:addPoints",executor:pP}],gP=[hP],wI={id:"adaptive-gamification",version:"1.0.0",name:"Gamification",description:"Badges, rewards, points, and engagement mechanics",executors:mP,eventHandlers:gP};var Mt=Y(Ae(),1);var dt=Y(Ye(),1),Jy=Y(Go(),1);var vP={"\u{1F4B5}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',"\u{1F3DB}\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" x2="21" y1="22" y2="22"/><line x1="6" x2="6" y1="18" y2="11"/><line x1="10" x2="10" y1="18" y2="11"/><line x1="14" x2="14" y1="18" y2="11"/><line x1="18" x2="18" y1="18" y2="11"/><polygon points="12 2 20 7 4 7"/></svg>',"\u23ED\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 4 15 12 5 20 5 4"/><line x1="19" x2="19" y1="5" y2="19"/></svg>',"\u27A1\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>',"\u{1F4A1}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>',"\u{1F4B0}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',"\u{1F4CB}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg>',"\u2705":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/></svg>',"\u26A0\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'};function yP(t){return vP[t]??xP(t)}function xP(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var or={container:{fontFamily:"var(--sc-font-family, system-ui, -apple-system, sans-serif)",maxWidth:"100%",overflow:"hidden"},accordion:{display:"flex",flexDirection:"column",gap:"var(--sc-content-item-gap, 6px)"},item:{borderRadius:"var(--sc-content-border-radius, 8px)",overflow:"hidden",transition:"box-shadow 0.2s ease"},header:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"var(--sc-content-item-padding, 12px 16px)",border:"none",cursor:"pointer",fontSize:"var(--sc-content-item-font-size, 15px)",fontWeight:500,fontFamily:"inherit",textAlign:"left",transition:"background-color 0.15s ease"},chevron:{fontSize:"20px",transition:"transform 0.2s ease",marginLeft:"auto",flexShrink:0,color:"var(--sc-content-chevron-color, currentColor)"},icon:{fontSize:"16px",flexShrink:0},body:{overflow:"hidden",transition:"max-height 0.25s ease, padding-bottom 0.25s ease",padding:"var(--sc-content-body-padding, 0 16px 12px 16px)"},description:{fontSize:"var(--sc-content-body-font-size, 14px)",lineHeight:"1.5",margin:0},linkButton:{display:"inline-flex",alignItems:"center",gap:"4px",marginTop:"10px",padding:"6px 12px",borderRadius:"6px",textDecoration:"none",fontSize:"13px",fontWeight:500,cursor:"pointer",border:"none",transition:"background-color 0.15s ease"},categoryHeader:{fontSize:"var(--sc-content-category-font-size, 12px)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"var(--sc-content-category-padding, 8px 4px 4px 4px)"},emptyState:{fontSize:"13px",padding:"16px",textAlign:"center"}},hp={light:{container:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:"var(--sc-content-background)",border:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)"},header:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},headerHover:{backgroundColor:"var(--sc-content-background-hover)"},body:{color:"var(--sc-content-text-secondary-color)"},linkButton:{backgroundColor:`var(--sc-color-primary, ${_t[4]})`,color:"#ffffff"},categoryHeader:{color:k[7]},emptyState:{color:k[8]}},dark:{container:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:"var(--sc-content-background)",border:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},header:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},headerHover:{backgroundColor:"var(--sc-content-background-hover)"},body:{color:"var(--sc-content-text-secondary-color)"},linkButton:{backgroundColor:`var(--sc-color-primary, ${_t[4]})`,color:"#ffffff"},categoryHeader:{color:k[8]},emptyState:{color:k[7]}}};function LI(t){if(typeof window>"u")return!1;let e=window.location.pathname;return t.some(a=>{let r=a.split("?")[0].split("#")[0];return r.endsWith("/**")?e.startsWith(r.slice(0,-3)):e===r})}function bP(t){let e=[{boxShadow:"0 0 0 0 rgba(13, 148, 136, 0.5)"},{boxShadow:"0 0 0 8px rgba(13, 148, 136, 0)"}];t.animate(e,{duration:600,iterations:3,easing:"ease-out"})}function SP({item:t,isExpanded:e,isLast:a,onToggle:r,onNavigate:n,onFocusAnchor:o,theme:i}){let[s,l]=(0,dt.useState)(!1),u=hp[i],{title:c,description:d,href:f,icon:h,external:S,anchor:x}=t.config,b={...or.item,...u.item,...e?u.itemExpanded:{},...a?{}:{borderBottom:"var(--sc-content-item-divider, none)"}},g={...or.header,...u.header,...s?u.headerHover:{}},m={...or.chevron,transform:e?"rotate(90deg)":"rotate(0deg)"},y={...or.body,...u.body,maxHeight:e?"500px":"0",paddingBottom:e?"16px":"0"},v=x?Array.isArray(x.route)?x.route[0]:x.route:f,C=x?LI(Array.isArray(x.route)?x.route:[x.route]):v?LI([v]):!1,w=x?.selector&&x.selector!=="*",_=C&&w,L=!!v||_,A=O=>{O.preventDefault(),O.stopPropagation(),_&&x?o(x):v&&n(v,S??!1)},I=_?"Focus \u2192":S?"Go \u2197":"Go \u2192";return(0,Mt.jsxs)("div",{style:b,"data-nav-tip-id":t.config.id,children:[(0,Mt.jsxs)("button",{type:"button",style:g,onClick:r,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),"aria-expanded":e,children:[h&&(0,Mt.jsx)("span",{style:or.icon,dangerouslySetInnerHTML:{__html:yP(h)}}),(0,Mt.jsx)("span",{children:c}),(0,Mt.jsx)("span",{style:m,children:"\u203A"})]}),(0,Mt.jsxs)("div",{style:y,"aria-hidden":!e,children:[(0,Mt.jsx)("p",{style:or.description,children:d}),L&&(0,Mt.jsx)("a",{href:v||"#",onClick:A,style:{...or.linkButton,...u.linkButton},target:S?"_blank":void 0,rel:S?"noopener noreferrer":void 0,children:I})]})]})}function _P({config:t,runtime:e,instanceId:a}){let[r,n]=(0,dt.useReducer)(m=>m+1,0),[o,i]=(0,dt.useState)(new Set);(0,dt.useEffect)(()=>e.context.subscribe(()=>{n()}),[e.context]),(0,dt.useEffect)(()=>{if(e.accumulator?.subscribe)return e.accumulator.subscribe(()=>{n()})},[e.accumulator]);let s=(0,dt.useMemo)(()=>t.actions.filter(m=>{if(!m.triggerWhen)return!0;try{return e.evaluateSync(m.triggerWhen).value}catch{return!1}}),[t.actions,e,r]),l=(0,dt.useMemo)(()=>{let m=new Map;for(let y of s){let v=y.config.category;m.has(v)||m.set(v,[]),m.get(v).push(y)}return m},[s]),u=(0,dt.useMemo)(()=>s.some(m=>m.config.category),[s]),c=(0,dt.useMemo)(()=>t.theme&&t.theme!=="auto"?t.theme:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",[t.theme]),d=(0,dt.useCallback)(m=>{i(y=>{let v=y.has(m),C;if(t.expandBehavior==="single"){for(let w of y)w!==m&&e.events.publish("nav:toggled",{instanceId:a,tipId:w,expanded:!1,timestamp:Date.now()});C=v?new Set:new Set([m])}else C=new Set(y),v?C.delete(m):C.add(m);return e.events.publish("nav:toggled",{instanceId:a,tipId:m,expanded:!v,timestamp:Date.now()}),C})},[t.expandBehavior,e.events,a]),f=(0,dt.useCallback)((m,y)=>{let v=m.trim().toLowerCase();if(!(v.startsWith("javascript:")||v.startsWith("data:")))if(e.events.publish("nav:tip_clicked",{instanceId:a,href:m,external:y,timestamp:Date.now()}),y)window.open(m,"_blank","noopener,noreferrer");else{let C=new URL(m,window.location.origin);C.search=window.location.search,ex(C.toString())||(window.history.pushState(null,"",C.toString()),window.dispatchEvent(new PopStateEvent("popstate")))}},[e.events,a]),h=(0,dt.useCallback)(m=>{let y=document.querySelector(m.selector);y instanceof HTMLElement&&(e.events.publish("nav:tip_focused",{instanceId:a,selector:m.selector,route:m.route,timestamp:Date.now()}),y.scrollIntoView({behavior:"smooth",block:"center"}),bP(y),setTimeout(()=>y.focus(),400))},[e.events,a]),S={...or.container,...hp[c].container},x={...or.categoryHeader,...hp[c].categoryHeader},b={...or.emptyState,...hp[c].emptyState},g=m=>m.map((y,v)=>(0,Mt.jsx)(SP,{item:y,isExpanded:o.has(y.config.id),isLast:v===m.length-1,onToggle:()=>d(y.config.id),onNavigate:f,onFocusAnchor:h,theme:c},y.config.id));return s.length===0?(0,Mt.jsx)("div",{style:S,"data-adaptive-id":a,"data-adaptive-type":"adaptive-nav",children:(0,Mt.jsx)("div",{style:b,children:"You're all set for now! We'll share helpful tips here when they're relevant to what you're doing."})}):(0,Mt.jsx)("div",{style:S,"data-adaptive-id":a,"data-adaptive-type":"adaptive-nav",children:(0,Mt.jsx)("div",{style:or.accordion,children:u?Array.from(l.entries()).map(([m,y])=>(0,Mt.jsxs)(dt.default.Fragment,{children:[m&&(0,Mt.jsx)("div",{style:x,"data-category-header":m,children:m}),g(y)]},m??"__ungrouped")):g(s)})})}var kI={mount(t,e){let{runtime:a,instanceId:r="nav-widget",...n}=e||{expandBehavior:"single",theme:"auto",actions:[]};if(a&&typeof Jy.createRoot=="function"){let o=(0,Jy.createRoot)(t);return o.render(dt.default.createElement(_P,{config:n,runtime:a,instanceId:r})),()=>{o.unmount()}}}};var CP=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);return a?(a.scrollIntoView({behavior:t.behavior??"smooth",block:t.block??"center",inline:t.inline??"nearest"}),e.publishEvent("action.applied",{id:e.generateId(),kind:"navigation:scrollTo",anchorId:t.anchorId,behavior:t.behavior??"smooth"}),{cleanup:()=>{}}):(console.error(`[adaptive-nav] Anchor not found for scrollTo, skipping: ${t.anchorId.selector}`),{cleanup:()=>{}})};function ex(t){if(typeof window>"u")return!1;let e=window;try{let a=e.next?.router;if(a?.push)return a.push(t),!0}catch{}try{if(e.$nuxt?.$router?.push)return e.$nuxt.$router.push(t),!0}catch{}return e.ng||e.getAllAngularRootElements||document.querySelector("[ng-version]")||e.__SVELTEKIT_DATA__||document.body?.hasAttribute("data-sveltekit")||document.querySelector("[data-astro-transition-fallback]")?(window.location.href=t,!0):!1}function wP(t){try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}}var LP=async(t,e)=>{let a=t.url.trim();if(a.toLowerCase().startsWith("javascript:"))throw new Error("javascript: URLs are not allowed");let r=t.target??"_self";return e.publishEvent("action.applied",{id:e.generateId(),kind:"navigation:navigate",url:t.url,target:r}),r==="_blank"?window.open(a,"_blank","noopener,noreferrer"):!t.forceFullNavigation&&wP(a)?ex(a)||(window.history.pushState(null,"",a),window.dispatchEvent(new PopStateEvent("popstate"))):window.location.href=a,{cleanup:()=>{}}},kP=[{kind:"navigation:scrollTo",executor:CP},{kind:"navigation:navigate",executor:LP}],II={id:"adaptive-nav",version:"2.0.0",name:"Navigation Tips",description:"Navigation actions and accordion-based tips with per-item conditional visibility",executors:kP,widgets:[{id:"adaptive-nav:tips",component:kI,metadata:{name:"Navigation Tips",description:"Accordion of contextual navigation tips with per-item visibility",icon:"\u{1F9ED}"}}],notifyWatchers(t){return(t.actions??[]).filter(a=>a.notify&&a.triggerWhen).map(a=>({id:`nav:${a.config.id}`,strategy:a.triggerWhen,eventName:"nav:tip_revealed",eventProps:{tipId:a.config.id,title:a.notify.title,body:a.notify.body,icon:a.notify.icon}}))}};var IP=[eI,Nf,CI,wI,II,ap],AP=IP.map(t=>({id:t.id,version:t.version,name:t.name,description:t.description,runtime:{actions:(t.executors||[]).map(({kind:e,executor:a})=>({kind:e,executor:a})),widgets:t.widgets,notifyWatchers:t.notifyWatchers,events:t.eventHandlers},editor:void 0,metadata:{isBuiltIn:!0}}));function AI(t){let e=0;for(let a of AP)t.has(a.id)||(t.register(a),e++);console.log("[Syntro Runtime] Registered",e,"built-in runtime modules")}var EI={timeout:300,className:"sc-anti-flicker",style:"opacity: 0 !important",hostLoadingSelector:"",waitForHostReady:""};function TI(t={}){let{timeout:e,className:a,style:r,hostLoadingSelector:n,waitForHostReady:o}={...EI,...t};if(n&&document.querySelector(n))return()=>{};let i=document.createElement("style");i.textContent=`.${a} { ${r} }`,document.head.appendChild(i),document.documentElement.classList.add(a);let s=!1,l=()=>{s||(s=!0,clearTimeout(c),document.documentElement.classList.remove(a),i.remove(),o&&u&&document.removeEventListener(o,u))},u;o&&(u=()=>l(),document.addEventListener(o,u));let c=setTimeout(()=>{l()},e);return()=>{l()}}function RI(t={}){let{className:e,style:a}={...EI,...t};return`
|
|
162
|
+
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Sr(a.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(a);throw a}}},ti=new Yy;function Ee(t,e){return ti.parse(t,e)}Ee.options=Ee.setOptions=function(t){return ti.setOptions(t),Ee.defaults=ti.defaults,uI(Ee.defaults),Ee};Ee.getDefaults=qy;Ee.defaults=ai;Ee.use=function(...t){return ti.use(...t),Ee.defaults=ti.defaults,uI(Ee.defaults),Ee};Ee.walkTokens=function(t,e){return ti.walkTokens(t,e)};Ee.parseInline=ti.parseInline;Ee.Parser=nr;Ee.parser=nr.parse;Ee.Renderer=dp;Ee.TextRenderer=Ky;Ee.Lexer=rr;Ee.lexer=rr.lex;Ee.Tokenizer=cp;Ee.Hooks=Uu;Ee.parse=Ee;var I5=Ee.options,A5=Ee.setOptions,E5=Ee.use,T5=Ee.walkTokens,R5=Ee.parseInline;var M5=nr.parse,O5=rr.lex;var Me=Y(Ye(),1),Qy=Y(Go(),1);var Rt={container:{fontFamily:"var(--sc-font-family, system-ui, -apple-system, sans-serif)",maxWidth:"800px",margin:"0 auto"},searchWrapper:{marginBottom:"8px"},searchInput:{width:"100%",padding:"12px 16px",borderRadius:"8px",fontSize:"14px",outline:"none",transition:"border-color 0.15s ease",backgroundColor:"var(--sc-content-search-background)",color:"var(--sc-content-search-color)"},accordion:{display:"flex",flexDirection:"column",gap:"var(--sc-content-item-gap, 6px)"},item:{borderRadius:"var(--sc-content-border-radius, 8px)",overflow:"hidden",transition:"box-shadow 0.15s ease"},question:{width:"100%",padding:"var(--sc-content-item-padding, 12px 16px)",display:"flex",alignItems:"center",justifyContent:"space-between",border:"none",cursor:"pointer",fontSize:"var(--sc-content-item-font-size, 15px)",fontWeight:500,textAlign:"left",transition:"background-color 0.15s ease"},chevron:{fontSize:"20px",transition:"transform 0.2s ease",color:"var(--sc-content-chevron-color, currentColor)"},answer:{padding:"var(--sc-content-body-padding, 0 16px 12px 16px)",fontSize:"var(--sc-content-body-font-size, 14px)",lineHeight:1.6,overflow:"hidden",transition:"max-height 0.2s ease, padding 0.2s ease"},category:{display:"inline-block",fontSize:"11px",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"4px 8px",borderRadius:"4px",marginBottom:"8px"},categoryHeader:{fontSize:"var(--sc-content-category-font-size, 12px)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",padding:"var(--sc-content-category-padding, 8px 4px 4px 4px)",marginTop:"var(--sc-content-category-gap, 4px)"},feedback:{display:"flex",alignItems:"center",gap:"8px",marginTop:"12px",paddingTop:"10px",borderTop:"1px solid rgba(0, 0, 0, 0.08)",fontSize:"13px"},feedbackButton:{background:"none",border:"1px solid transparent",cursor:"pointer",fontSize:"16px",padding:"4px 8px",borderRadius:"4px",transition:"background-color 0.15s ease, border-color 0.15s ease"},feedbackButtonSelected:{borderColor:"rgba(0, 0, 0, 0.2)",backgroundColor:"rgba(0, 0, 0, 0.04)"},emptyState:{textAlign:"center",padding:"48px 24px",fontSize:"14px"},noResults:{textAlign:"center",padding:"32px 16px",fontSize:"14px"}},ri={light:{container:{backgroundColor:"transparent",color:"inherit"},searchInput:{border:`1px solid ${k[11]}`},item:{backgroundColor:"var(--sc-content-background)",borderTop:"var(--sc-content-border)",borderRight:"var(--sc-content-border)",borderBottom:"var(--sc-content-border)",borderLeft:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)"},question:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},questionHover:{backgroundColor:"var(--sc-content-background-hover)"},answer:{color:"var(--sc-content-text-secondary-color)"},category:{backgroundColor:_t[8],color:_t[2]},categoryHeader:{color:k[7]},emptyState:{color:k[8]},feedbackPrompt:{color:k[7]}},dark:{container:{backgroundColor:"transparent",color:"inherit"},searchInput:{border:`1px solid ${k[5]}`},item:{backgroundColor:"var(--sc-content-background)",borderTop:"var(--sc-content-border)",borderRight:"var(--sc-content-border)",borderBottom:"var(--sc-content-border)",borderLeft:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},question:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},questionHover:{backgroundColor:"var(--sc-content-background-hover)"},answer:{color:"var(--sc-content-text-secondary-color)"},category:{backgroundColor:_t[0],color:_t[6]},categoryHeader:{color:k[8]},emptyState:{color:k[7]},feedbackPrompt:{color:k[8]}}};var SI=new Yy({async:!1,gfm:!0,breaks:!0});function iP(t){return typeof t=="string"?t:t.type==="rich"?t.html:t.content}function sP(t){if(typeof t=="string"){let a=SI.parse(t);return(0,ze.jsx)("div",{style:{margin:0},"data-faq-markdown":"",dangerouslySetInnerHTML:{__html:a}})}if(t.type==="rich")return(0,ze.jsx)("div",{style:{margin:0},dangerouslySetInnerHTML:{__html:t.html}});let e=SI.parse(t.content);return(0,ze.jsx)("div",{style:{margin:0},"data-faq-markdown":"",dangerouslySetInnerHTML:{__html:e}})}function lP(t){return t?t===!0?{style:"thumbs"}:t:null}function uP(t){return t.prompt||"Was this helpful?"}function cP({item:t,isExpanded:e,isHighlighted:a,isLast:r,onToggle:n,theme:o,feedbackConfig:i,feedbackValue:s,onFeedback:l}){let[u,c]=(0,Me.useState)(!1),d=ri[o],{question:f,answer:h}=t.config,S={...Rt.item,...d.item,...e?d.itemExpanded:{},...a?{boxShadow:`0 0 0 2px ${_t[4]}, 0 0 12px rgba(106, 89, 206, 0.4)`,transition:"box-shadow 0.3s ease"}:{},...r?{}:{borderBottom:"var(--sc-content-item-divider, none)"}},x={...Rt.question,...d.question,...u?d.questionHover:{}},b={...Rt.chevron,transform:e?"rotate(90deg)":"rotate(0deg)"},g={...Rt.answer,...d.answer,maxHeight:e?"500px":"0",paddingBottom:e?"16px":"0"},m={...Rt.feedback,...d.feedbackPrompt};return(0,ze.jsxs)("div",{style:S,"data-faq-item-id":t.config.id,children:[(0,ze.jsxs)("button",{type:"button",style:x,onClick:n,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),"aria-expanded":e,children:[(0,ze.jsx)("span",{children:f}),(0,ze.jsx)("span",{style:b,children:"\u203A"})]}),(0,ze.jsxs)("div",{style:g,"aria-hidden":!e,children:[sP(h),e&&i&&(0,ze.jsxs)("div",{style:m,children:[(0,ze.jsx)("span",{children:uP(i)}),(0,ze.jsx)("button",{type:"button",style:{...Rt.feedbackButton,...s==="up"?Rt.feedbackButtonSelected:{}},"aria-label":"Thumbs up",onClick:()=>l(t.config.id,f,"up"),children:"\u{1F44D}"}),(0,ze.jsx)("button",{type:"button",style:{...Rt.feedbackButton,...s==="down"?Rt.feedbackButtonSelected:{}},"aria-label":"Thumbs down",onClick:()=>l(t.config.id,f,"down"),children:"\u{1F44E}"})]})]})]})}function dP({config:t,runtime:e,instanceId:a}){let[r,n]=(0,Me.useReducer)(O=>O+1,0),[o,i]=(0,Me.useState)(new Set),[s,l]=(0,Me.useState)(null),[u,c]=(0,Me.useState)(""),[d,f]=(0,Me.useState)(new Map),h=(0,Me.useMemo)(()=>lP(t.feedback),[t.feedback]);(0,Me.useEffect)(()=>e.context.subscribe(()=>{n()}),[e.context]),(0,Me.useEffect)(()=>{if(e.accumulator?.subscribe)return e.accumulator.subscribe(()=>{n()})},[e.accumulator]),(0,Me.useEffect)(()=>{if(!e.events.subscribe)return;if(e.events.getRecent){let E=e.events.getRecent({patterns:["^action\\.tooltip_cta_clicked$","^action\\.modal_cta_clicked$"]},10).filter(R=>{let M=R.props?.actionId;return typeof M=="string"&&M.startsWith("faq:open:")}).pop();if(E&&Date.now()-E.ts<1e4){let R=E.props.actionId.replace("faq:open:","");i(new Set([R])),requestAnimationFrame(()=>{let M=document.querySelector(`[data-faq-item-id="${R}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"center"})})}}return e.events.subscribe({patterns:["^action\\.tooltip_cta_clicked$","^action\\.modal_cta_clicked$"]},H=>{let E=H.props?.actionId;if(typeof E!="string"||!E.startsWith("faq:open:"))return;let R=E.replace("faq:open:","");i(new Set([R])),requestAnimationFrame(()=>{let M=document.querySelector(`[data-faq-item-id="${R}"]`);M&&M.scrollIntoView({behavior:"smooth",block:"center"})}),e.events.publish("canvas.requestOpen")})},[e]),(0,Me.useEffect)(()=>{if(!e.events.subscribe)return;let O=E=>{let R=E.props?.tileId,M=E.props?.itemId;R===a&&M&&(i(new Set([M])),l(M),setTimeout(()=>l(null),1500),requestAnimationFrame(()=>{let F=document.querySelector(`[data-faq-item-id="${M}"]`);F&&F.scrollIntoView({behavior:"smooth",block:"center"})}))};if(e.events.getRecent){let R=e.events.getRecent({names:["notification.deep_link"]},5).filter(M=>M.props?.tileId===a&&M.props?.itemId).pop();R&&Date.now()-R.ts<1e4&&O(R)}return e.events.subscribe({names:["notification.deep_link"]},O)},[e,a]);let S=(0,Me.useMemo)(()=>(t.actions??[]).filter(O=>O.triggerWhen?e.evaluateSync(O.triggerWhen).value:!0),[t.actions,e,r]),x=(0,Me.useMemo)(()=>t.ordering==="priority"?[...S].sort((O,H)=>(H.config.priority??0)-(O.config.priority??0)):S,[S,t.ordering]),b=(0,Me.useMemo)(()=>{if(!t.searchable||!u.trim())return x;let O=u.toLowerCase();return x.filter(H=>H.config.question.toLowerCase().includes(O)||iP(H.config.answer).toLowerCase().includes(O)||H.config.category?.toLowerCase().includes(O))},[x,u,t.searchable]),g=(0,Me.useMemo)(()=>{let O=new Map;for(let H of b){let E=H.config.category;O.has(E)||O.set(E,[]),O.get(E).push(H)}return O},[b]),m=(0,Me.useMemo)(()=>b.some(O=>O.config.category),[b]),y=(0,Me.useMemo)(()=>t.theme&&t.theme!=="auto"?t.theme:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",[t.theme]),v=(0,Me.useCallback)(O=>{i(H=>{let E=new Set(H);return t.expandBehavior==="single"?H.has(O)?new Set:new Set([O]):(H.has(O)?E.delete(O):E.add(O),E)}),e.events.publish("faq:toggled",{instanceId:a,questionId:O,expanded:!o.has(O),timestamp:Date.now()})},[t.expandBehavior,e.events,a,o]),C=(0,Me.useCallback)((O,H,E)=>{f(R=>{let M=new Map(R);return M.set(O,E),M}),e.events.publish("faq:feedback",{itemId:O,question:H,value:E})},[e.events]),w={...Rt.container,...ri[y].container},_={...Rt.searchInput,...ri[y].searchInput},L={...Rt.emptyState,...ri[y].emptyState},A={...Rt.categoryHeader,...ri[y].categoryHeader},I=O=>O.map((H,E)=>(0,ze.jsx)(cP,{item:H,isExpanded:o.has(H.config.id),isHighlighted:s===H.config.id,isLast:E===O.length-1,onToggle:()=>v(H.config.id),theme:y,feedbackConfig:h,feedbackValue:d.get(H.config.id),onFeedback:C},H.config.id));return S.length===0?(0,ze.jsx)("div",{style:w,"data-adaptive-id":a,"data-adaptive-type":"adaptive-faq",children:(0,ze.jsx)("div",{style:L,children:"You're all set for now! We'll surface answers here when they're relevant to what you're doing."})}):(0,ze.jsxs)("div",{style:w,"data-adaptive-id":a,"data-adaptive-type":"adaptive-faq",children:[t.searchable&&(0,ze.jsxs)("div",{style:Rt.searchWrapper,children:[(0,ze.jsx)("style",{children:`[data-adaptive-id="${a}"] input::placeholder { color: var(--sc-content-search-color, inherit); opacity: 0.7; }`}),(0,ze.jsx)("input",{type:"text",placeholder:"Search questions...",value:u,onChange:O=>c(O.target.value),style:_})]}),(0,ze.jsx)("div",{style:Rt.accordion,children:m?Array.from(g.entries()).map(([O,H])=>(0,ze.jsxs)(Me.default.Fragment,{children:[O&&(0,ze.jsx)("div",{style:A,"data-category-header":O,children:O}),I(H)]},O??"__ungrouped")):I(b)}),t.searchable&&b.length===0&&u&&(0,ze.jsxs)("div",{style:{...Rt.noResults,...ri[y].emptyState},children:['No questions found matching "',u,'"']})]})}var _I={mount(t,e){let{runtime:a,instanceId:r="faq-widget",...n}=e||{expandBehavior:"single",searchable:!1,theme:"auto",actions:[]};if(a&&typeof Qy.createRoot=="function"){let o=(0,Qy.createRoot)(t);return o.render(Me.default.createElement(dP,{config:n,runtime:a,instanceId:r})),()=>{o.unmount()}}}};var CI={id:"adaptive-faq",version:"2.0.0",name:"FAQ Accordion",description:"Collapsible Q&A accordion with actions, rich content, feedback, and personalization",executors:aI,widgets:[{id:"adaptive-faq:accordion",component:_I,metadata:{name:"FAQ Accordion",description:"Collapsible Q&A accordion with search, categories, and feedback",icon:"\u2753",subtitle:"Curated just for you."}}],notifyWatchers(t){return(t.actions??[]).filter(a=>a.notify&&a.triggerWhen).map(a=>({id:`faq:${a.config.id}`,strategy:a.triggerWhen,eventName:"faq:question_revealed",eventProps:{questionId:a.config.id,question:a.config.question,title:a.notify.title,body:a.notify.body,icon:a.notify.icon}}))}};var fP=async(t,e)=>{let{badgeId:a}=t;return e.publishEvent("gamification.badge_awarded",{badgeId:a,awardedAt:Date.now()}),{cleanup:()=>{}}},pP=async(t,e)=>{let{points:a,reason:r}=t;return e.publishEvent("gamification.points_added",{points:a,reason:r,timestamp:Date.now()}),{cleanup:()=>{}}},hP={names:["page_view","button_click"],handler:(t,e)=>{console.log("[Gamification] Event received for badge trigger check")}},mP=[{kind:"gamification:awardBadge",executor:fP},{kind:"gamification:addPoints",executor:pP}],gP=[hP],wI={id:"adaptive-gamification",version:"1.0.0",name:"Gamification",description:"Badges, rewards, points, and engagement mechanics",executors:mP,eventHandlers:gP};var Mt=Y(Ae(),1);var dt=Y(Ye(),1),Jy=Y(Go(),1);var vP={"\u{1F4B5}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',"\u{1F3DB}\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" x2="21" y1="22" y2="22"/><line x1="6" x2="6" y1="18" y2="11"/><line x1="10" x2="10" y1="18" y2="11"/><line x1="14" x2="14" y1="18" y2="11"/><line x1="18" x2="18" y1="18" y2="11"/><polygon points="12 2 20 7 4 7"/></svg>',"\u23ED\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 4 15 12 5 20 5 4"/><line x1="19" x2="19" y1="5" y2="19"/></svg>',"\u27A1\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>',"\u{1F4A1}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/></svg>',"\u{1F4B0}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="12" x="2" y="6" rx="2"/><circle cx="12" cy="12" r="2"/><path d="M6 12h.01M18 12h.01"/></svg>',"\u{1F4CB}":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg>',"\u2705":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/></svg>',"\u26A0\uFE0F":'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'};function yP(t){return vP[t]??xP(t)}function xP(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var or={container:{fontFamily:"var(--sc-font-family, system-ui, -apple-system, sans-serif)",maxWidth:"100%",overflow:"hidden"},accordion:{display:"flex",flexDirection:"column",gap:"var(--sc-content-item-gap, 6px)"},item:{borderRadius:"var(--sc-content-border-radius, 8px)",overflow:"hidden",transition:"box-shadow 0.2s ease"},header:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"var(--sc-content-item-padding, 12px 16px)",border:"none",cursor:"pointer",fontSize:"var(--sc-content-item-font-size, 15px)",fontWeight:500,fontFamily:"inherit",textAlign:"left",transition:"background-color 0.15s ease"},chevron:{fontSize:"20px",transition:"transform 0.2s ease",marginLeft:"auto",flexShrink:0,color:"var(--sc-content-chevron-color, currentColor)"},icon:{fontSize:"16px",flexShrink:0},body:{overflow:"hidden",transition:"max-height 0.25s ease, padding-bottom 0.25s ease",padding:"var(--sc-content-body-padding, 0 16px 12px 16px)"},description:{fontSize:"var(--sc-content-body-font-size, 14px)",lineHeight:"1.5",margin:0},linkButton:{display:"inline-flex",alignItems:"center",gap:"4px",marginTop:"10px",padding:"6px 12px",borderRadius:"6px",textDecoration:"none",fontSize:"13px",fontWeight:500,cursor:"pointer",border:"none",transition:"background-color 0.15s ease"},categoryHeader:{fontSize:"var(--sc-content-category-font-size, 12px)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"var(--sc-content-category-padding, 8px 4px 4px 4px)"},emptyState:{fontSize:"13px",padding:"16px",textAlign:"center"}},hp={light:{container:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:"var(--sc-content-background)",border:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)"},header:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},headerHover:{backgroundColor:"var(--sc-content-background-hover)"},body:{color:"var(--sc-content-text-secondary-color)"},linkButton:{backgroundColor:`var(--sc-color-primary, ${_t[4]})`,color:"#ffffff"},categoryHeader:{color:k[7]},emptyState:{color:k[8]}},dark:{container:{backgroundColor:"transparent",color:"inherit"},item:{backgroundColor:"var(--sc-content-background)",border:"var(--sc-content-border)"},itemExpanded:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},header:{backgroundColor:"transparent",color:"var(--sc-content-text-color)"},headerHover:{backgroundColor:"var(--sc-content-background-hover)"},body:{color:"var(--sc-content-text-secondary-color)"},linkButton:{backgroundColor:`var(--sc-color-primary, ${_t[4]})`,color:"#ffffff"},categoryHeader:{color:k[8]},emptyState:{color:k[7]}}};function LI(t){if(typeof window>"u")return!1;let e=window.location.pathname;return t.some(a=>{let r=a.split("?")[0].split("#")[0];return r.endsWith("/**")?e.startsWith(r.slice(0,-3)):e===r})}function bP(t){let e=[{boxShadow:"0 0 0 0 rgba(13, 148, 136, 0.5)"},{boxShadow:"0 0 0 8px rgba(13, 148, 136, 0)"}];t.animate(e,{duration:600,iterations:3,easing:"ease-out"})}function SP({item:t,isExpanded:e,isLast:a,onToggle:r,onNavigate:n,onFocusAnchor:o,theme:i}){let[s,l]=(0,dt.useState)(!1),u=hp[i],{title:c,description:d,href:f,icon:h,external:S,anchor:x}=t.config,b={...or.item,...u.item,...e?u.itemExpanded:{},...a?{}:{borderBottom:"var(--sc-content-item-divider, none)"}},g={...or.header,...u.header,...s?u.headerHover:{}},m={...or.chevron,transform:e?"rotate(90deg)":"rotate(0deg)"},y={...or.body,...u.body,maxHeight:e?"500px":"0",paddingBottom:e?"16px":"0"},v=x?Array.isArray(x.route)?x.route[0]:x.route:f,C=x?LI(Array.isArray(x.route)?x.route:[x.route]):v?LI([v]):!1,w=x?.selector&&x.selector!=="*",_=C&&w,L=!!v||_,A=O=>{O.preventDefault(),O.stopPropagation(),_&&x?o(x):v&&n(v,S??!1)},I=_?"Focus \u2192":S?"Go \u2197":"Go \u2192";return(0,Mt.jsxs)("div",{style:b,"data-nav-tip-id":t.config.id,children:[(0,Mt.jsxs)("button",{type:"button",style:g,onClick:r,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),"aria-expanded":e,children:[h&&(0,Mt.jsx)("span",{style:or.icon,dangerouslySetInnerHTML:{__html:yP(h)}}),(0,Mt.jsx)("span",{children:c}),(0,Mt.jsx)("span",{style:m,children:"\u203A"})]}),(0,Mt.jsxs)("div",{style:y,"aria-hidden":!e,children:[(0,Mt.jsx)("p",{style:or.description,children:d}),L&&(0,Mt.jsx)("a",{href:v||"#",onClick:A,style:{...or.linkButton,...u.linkButton},target:S?"_blank":void 0,rel:S?"noopener noreferrer":void 0,children:I})]})]})}function _P({config:t,runtime:e,instanceId:a}){let[r,n]=(0,dt.useReducer)(m=>m+1,0),[o,i]=(0,dt.useState)(new Set);(0,dt.useEffect)(()=>e.context.subscribe(()=>{n()}),[e.context]),(0,dt.useEffect)(()=>{if(e.accumulator?.subscribe)return e.accumulator.subscribe(()=>{n()})},[e.accumulator]);let s=(0,dt.useMemo)(()=>t.actions.filter(m=>{if(!m.triggerWhen)return!0;try{return e.evaluateSync(m.triggerWhen).value}catch{return!1}}),[t.actions,e,r]),l=(0,dt.useMemo)(()=>{let m=new Map;for(let y of s){let v=y.config.category;m.has(v)||m.set(v,[]),m.get(v).push(y)}return m},[s]),u=(0,dt.useMemo)(()=>s.some(m=>m.config.category),[s]),c=(0,dt.useMemo)(()=>t.theme&&t.theme!=="auto"?t.theme:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",[t.theme]),d=(0,dt.useCallback)(m=>{i(y=>{let v=y.has(m),C;if(t.expandBehavior==="single"){for(let w of y)w!==m&&e.events.publish("nav:toggled",{instanceId:a,tipId:w,expanded:!1,timestamp:Date.now()});C=v?new Set:new Set([m])}else C=new Set(y),v?C.delete(m):C.add(m);return e.events.publish("nav:toggled",{instanceId:a,tipId:m,expanded:!v,timestamp:Date.now()}),C})},[t.expandBehavior,e.events,a]),f=(0,dt.useCallback)((m,y)=>{let v=m.trim().toLowerCase();if(!(v.startsWith("javascript:")||v.startsWith("data:")))if(e.events.publish("nav:tip_clicked",{instanceId:a,href:m,external:y,timestamp:Date.now()}),y)window.open(m,"_blank","noopener,noreferrer");else{let C=new URL(m,window.location.origin);C.search=window.location.search,ex(C.toString())||(window.history.pushState(null,"",C.toString()),window.dispatchEvent(new PopStateEvent("popstate")))}},[e.events,a]),h=(0,dt.useCallback)(m=>{let y=document.querySelector(m.selector);y instanceof HTMLElement&&(e.events.publish("nav:tip_focused",{instanceId:a,selector:m.selector,route:m.route,timestamp:Date.now()}),y.scrollIntoView({behavior:"smooth",block:"center"}),bP(y),setTimeout(()=>y.focus(),400))},[e.events,a]),S={...or.container,...hp[c].container},x={...or.categoryHeader,...hp[c].categoryHeader},b={...or.emptyState,...hp[c].emptyState},g=m=>m.map((y,v)=>(0,Mt.jsx)(SP,{item:y,isExpanded:o.has(y.config.id),isLast:v===m.length-1,onToggle:()=>d(y.config.id),onNavigate:f,onFocusAnchor:h,theme:c},y.config.id));return s.length===0?(0,Mt.jsx)("div",{style:S,"data-adaptive-id":a,"data-adaptive-type":"adaptive-nav",children:(0,Mt.jsx)("div",{style:b,children:"You're all set for now! We'll share helpful tips here when they're relevant to what you're doing."})}):(0,Mt.jsx)("div",{style:S,"data-adaptive-id":a,"data-adaptive-type":"adaptive-nav",children:(0,Mt.jsx)("div",{style:or.accordion,children:u?Array.from(l.entries()).map(([m,y])=>(0,Mt.jsxs)(dt.default.Fragment,{children:[m&&(0,Mt.jsx)("div",{style:x,"data-category-header":m,children:m}),g(y)]},m??"__ungrouped")):g(s)})})}var kI={mount(t,e){let{runtime:a,instanceId:r="nav-widget",...n}=e||{expandBehavior:"single",theme:"auto",actions:[]};if(a&&typeof Jy.createRoot=="function"){let o=(0,Jy.createRoot)(t);return o.render(dt.default.createElement(_P,{config:n,runtime:a,instanceId:r})),()=>{o.unmount()}}}};var CP=async(t,e)=>{let a=e.resolveAnchor(t.anchorId);return a?(a.scrollIntoView({behavior:t.behavior??"smooth",block:t.block??"center",inline:t.inline??"nearest"}),e.publishEvent("action.applied",{id:e.generateId(),kind:"navigation:scrollTo",anchorId:t.anchorId,behavior:t.behavior??"smooth"}),{cleanup:()=>{}}):(console.error(`[adaptive-nav] Anchor not found for scrollTo, skipping: ${t.anchorId.selector}`),{cleanup:()=>{}})};function ex(t){if(typeof window>"u")return!1;let e=window;try{let a=e.next?.router;if(a?.push)return a.push(t),!0}catch{}try{if(e.$nuxt?.$router?.push)return e.$nuxt.$router.push(t),!0}catch{}return e.ng||e.getAllAngularRootElements||document.querySelector("[ng-version]")||e.__SVELTEKIT_DATA__||document.body?.hasAttribute("data-sveltekit")||document.querySelector("[data-astro-transition-fallback]")?(window.location.href=t,!0):!1}function wP(t){try{return new URL(t,window.location.origin).origin===window.location.origin}catch{return!1}}var LP=async(t,e)=>{let a=t.url.trim();if(a.toLowerCase().startsWith("javascript:"))throw new Error("javascript: URLs are not allowed");let r=t.target??"_self";return e.publishEvent("action.applied",{id:e.generateId(),kind:"navigation:navigate",url:t.url,target:r}),r==="_blank"?window.open(a,"_blank","noopener,noreferrer"):!t.forceFullNavigation&&wP(a)?ex(a)||(window.history.pushState(null,"",a),window.dispatchEvent(new PopStateEvent("popstate"))):window.location.href=a,{cleanup:()=>{}}},kP=[{kind:"navigation:scrollTo",executor:CP},{kind:"navigation:navigate",executor:LP}],II={id:"adaptive-nav",version:"2.0.0",name:"Navigation Tips",description:"Navigation actions and accordion-based tips with per-item conditional visibility",executors:kP,widgets:[{id:"adaptive-nav:tips",component:kI,metadata:{name:"Navigation Tips",description:"Accordion of contextual navigation tips with per-item visibility",icon:"\u{1F9ED}"}}],notifyWatchers(t){return(t.actions??[]).filter(a=>a.notify&&a.triggerWhen).map(a=>({id:`nav:${a.config.id}`,strategy:a.triggerWhen,eventName:"nav:tip_revealed",eventProps:{tipId:a.config.id,title:a.notify.title,body:a.notify.body,icon:a.notify.icon}}))}};var IP=[eI,Nf,CI,wI,II,ap],AP=IP.map(t=>({id:t.id,version:t.version,name:t.name,description:t.description,runtime:{actions:(t.executors||[]).map(({kind:e,executor:a})=>({kind:e,executor:a})),widgets:t.widgets,notifyWatchers:t.notifyWatchers,events:t.eventHandlers},editor:void 0,metadata:{isBuiltIn:!0}}));function AI(t){let e=0;for(let a of AP)t.has(a.id)||(t.register(a),e++);console.log("[Syntro Runtime] Registered",e,"built-in runtime modules")}var EI={timeout:300,className:"sc-anti-flicker",style:"opacity: 0 !important",hostLoadingSelector:"",waitForHostReady:""};function TI(t={}){let{timeout:e,className:a,style:r,hostLoadingSelector:n,waitForHostReady:o}={...EI,...t};if(n&&document.querySelector(n))return()=>{};let i=document.createElement("style");i.textContent=`.${a} { ${r} }`,document.head.appendChild(i),document.documentElement.classList.add(a);let s=!1,l=()=>{s||(s=!0,clearTimeout(c),document.documentElement.classList.remove(a),i.remove(),o&&u&&document.removeEventListener(o,u))},u;o&&(u=()=>l(),document.addEventListener(o,u));let c=setTimeout(()=>{l()},e);return()=>{l()}}function RI(t={}){let{className:e,style:a}={...EI,...t};return`
|
|
163
163
|
(function() {
|
|
164
164
|
var s = document.createElement('style');
|
|
165
165
|
s.textContent = '.${e} { ${a} }';
|
|
166
166
|
document.head.appendChild(s);
|
|
167
167
|
document.documentElement.className += ' ${e}';
|
|
168
|
-
})();`}function mp(t,e,a="merge"){return a==="first-match"?EP(t,e):TP(t,e)}function EP(t,e){for(let a of e){let r=t.getFeatureValue?.(a,null);if(!r||typeof r!="object")continue;let n=r,o=n.tiles&&n.tiles.length>0,i=n.actions&&n.actions.length>0;if(o||i)return MI([n])}return null}function TP(t,e){let a=[];for(let r of e){let n=t.getFeatureValue?.(r,null);if(!n||typeof n!="object")continue;let o=n,i=o.tiles&&o.tiles.length>0,s=o.actions&&o.actions.length>0;(i||s)&&a.push(o)}return a.length===0?null:MI(a)}function MI(t){let e=[],a=[],r,n,o,i,s,l,u;for(let c of t)c.tiles&&e.push(...c.tiles),c.actions&&a.push(...c.actions),r??(r=c.fetchedAt),n??(n=c.schemaVersion),o??(o=c.configVersion),i??(i=c.canvasTitle),s??(s=c.theme),l??(l=c.launcher),u??(u=c.meta);return{tiles:e,actions:a,fetchedAt:r??new Date().toISOString(),...n&&{schemaVersion:n},...o&&{configVersion:o},...i&&{canvasTitle:i},...s&&{theme:s},...l&&{launcher:l},...u&&{meta:u}}}var tx=!1;function OI(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get("syntro_debug")==="true"}catch{return!1}}function ax(t){if(OI()){tx=!0;return}tx=t??!1}function RP(){return OI()?!0:tx}function K(t,e,a){RP()&&(a!==void 0?console.log(`[${t}]`,e,a):console.log(`[${t}]`,e))}function na(t,e,a){a!==void 0?console.warn(`[${t}]`,e,a):console.warn(`[${t}]`,e)}function gp(t,e,a){a!==void 0?console.error(`[${t}]`,e,a):console.error(`[${t}]`,e)}var vp="2.8.0-canary.
|
|
168
|
+
})();`}function mp(t,e,a="merge"){return a==="first-match"?EP(t,e):TP(t,e)}function EP(t,e){for(let a of e){let r=t.getFeatureValue?.(a,null);if(!r||typeof r!="object")continue;let n=r,o=n.tiles&&n.tiles.length>0,i=n.actions&&n.actions.length>0;if(o||i)return MI([n])}return null}function TP(t,e){let a=[];for(let r of e){let n=t.getFeatureValue?.(r,null);if(!n||typeof n!="object")continue;let o=n,i=o.tiles&&o.tiles.length>0,s=o.actions&&o.actions.length>0;(i||s)&&a.push(o)}return a.length===0?null:MI(a)}function MI(t){let e=[],a=[],r,n,o,i,s,l,u;for(let c of t)c.tiles&&e.push(...c.tiles),c.actions&&a.push(...c.actions),r??(r=c.fetchedAt),n??(n=c.schemaVersion),o??(o=c.configVersion),i??(i=c.canvasTitle),s??(s=c.theme),l??(l=c.launcher),u??(u=c.meta);return{tiles:e,actions:a,fetchedAt:r??new Date().toISOString(),...n&&{schemaVersion:n},...o&&{configVersion:o},...i&&{canvasTitle:i},...s&&{theme:s},...l&&{launcher:l},...u&&{meta:u}}}var tx=!1;function OI(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get("syntro_debug")==="true"}catch{return!1}}function ax(t){if(OI()){tx=!0;return}tx=t??!1}function RP(){return OI()?!0:tx}function K(t,e,a){RP()&&(a!==void 0?console.log(`[${t}]`,e,a):console.log(`[${t}]`,e))}function na(t,e,a){a!==void 0?console.warn(`[${t}]`,e,a):console.warn(`[${t}]`,e)}function gp(t,e,a){a!==void 0?console.error(`[${t}]`,e,a):console.error(`[${t}]`,e)}var vp="2.8.0-canary.76";var tn="2.0";var MP=["api.syntrologie.com","cdn.syntrologie.com","localhost","127.0.0.1"];function OP(t){try{let e=new URL(t),a=/^(localhost|127\.0\.0\.1)$/.test(e.hostname);return e.protocol!=="https:"&&!a?(console.warn("[SmartCanvas] Config URI must use HTTPS:",t),!1):MP.some(n=>e.hostname===n)?!0:(console.warn("[SmartCanvas] Config URI host not in allowlist:",e.hostname),!1)}catch{return console.warn("[SmartCanvas] Invalid config URI:",t),!1}}function DP(t){if(typeof window>"u")return!1;try{return new URL(t).origin===window.location.origin}catch{return!1}}var DI="syntro_config_cache",BP=1440*60*1e3;function BI(){try{return typeof localStorage<"u"&&localStorage!==null}catch{return!1}}function PP(t,e){if(BI())try{let a={config:t,timestamp:Date.now(),sdkVersion:e};localStorage.setItem(DI,JSON.stringify(a))}catch{}}function NP(t){if(!BI())return null;try{let e=localStorage.getItem(DI);if(!e)return null;let a=JSON.parse(e);return!a.config||typeof a.timestamp!="number"||!a.sdkVersion||a.sdkVersion!==t||Date.now()-a.timestamp>BP?null:a.config}catch{return null}}var yp=({configUri:t,experiments:e,featureKey:a})=>{if(t)return t;if(e&&a){let r=e.getFeatureValue?.(a,null);if(r)return r}};function FP(t,e,a){if(e){let r=t.getFeatureValue?.(e,null);if(r&&typeof r=="object"){let n=r.variant_flags;if(n&&n.length>0)return n}}if(t.getAllFeatures){let r=t.getAllFeatures();return a?Object.keys(r).filter(n=>n.startsWith(a)):Object.keys(r)}return[]}var ni=({configUri:t,experiments:e,featureKey:a,credentials:r,configFeatureKey:n,manifestKey:o,variantFlagPrefix:i,sdkVersion:s})=>async()=>{if(e&&n){let c=e.getFeatureValue?.(n,null);if(c&&typeof c=="object")return K("SmartCanvas Config","Resolved config directly from feature flag",c),c}if(e&&(o||i||e.getAllFeatures)){let c=FP(e,o,i);if(c.length>0){let d=mp(e,c);if(d)return K("SmartCanvas Config","Resolved config from variant flags",d),d}}let l=yp({configUri:t,experiments:e,featureKey:a});if(!l)return K("SmartCanvas Config","No config available \u2014 returning empty config"),{tiles:[],actions:[],fetchedAt:new Date().toISOString()};if(!OP(l))throw new Error(`SmartCanvas: config URI not allowed: ${l}`);let u=r??(DP(l)?"include":"omit");try{let c=await fetch(l,{credentials:u,headers:{"X-SDK-Version":vp,"X-SDK-Schema-Version":tn}});if(!c.ok)throw new Error(`SmartCanvas: failed to fetch config (${c.status})`);let d=await c.json();return K("SmartCanvas Config","Fetched config from URI",d),s&&PP(d,s),d}catch(c){if(s){let d=NP(s);if(d)return K("SmartCanvas Config","Serving config from offline cache"),d}throw c}};var HP=["cdn.syntrologie.com","api.syntrologie.com","dev-api.syntrologie.com","localhost","127.0.0.1",".syntrologie.com"];function PI(t){if(typeof window>"u")return null;let a=new URLSearchParams(window.location.search).get(t);if(!a)return null;try{let r=a.replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(r))}catch(r){return na("Syntro Runtime",`Failed to decode ${t}:`,r),null}}var ks,Is;function Vu(){if(ks==null){let t=typeof window<"u"?window.__SYNTRO_EDITOR_PARAMS__:null;if(t?.token)ks={token:t.token,api_base:t.apiBase||""},console.log(`[DIAG] getEditorSource: from __SYNTRO_EDITOR_PARAMS__ (token=${ks.token.slice(0,15)}...)`);else{let e=PI("editor_source");e&&(ks=e),console.log(`[DIAG] getEditorSource: from URL param \u2192 ${e?`token=${e.token?.slice(0,15)}...`:"NULL"}`),!e&&typeof window<"u"&&console.log(`[DIAG] getEditorSource: URL search = ${window.location.search.slice(0,200)}`)}}return ks??null}function xp(){if(Is==null){let t=typeof window<"u"?window.__SYNTRO_EDITOR_PARAMS__:null;if(t?.mode)Is={mode:t.mode,audit_session_id:t.auditSessionId,syntro_token:t.syntroToken,workspace_id:t.workspaceId},console.log(`[DIAG] getEditorConf: from __SYNTRO_EDITOR_PARAMS__ (mode=${Is.mode})`);else{let e=PI("editor_conf");e&&(Is=e),console.log(`[DIAG] getEditorConf: from URL param \u2192 ${e?`mode=${e.mode}`:"NULL"}`)}}return Is??null}function UP(t){K("Syntro Runtime","Validating editor URL:",t);try{if(t.startsWith("/"))return K("Syntro Runtime","\u2713 Relative URL allowed (same-origin):",t),!0;let e=new URL(t),a=/^(localhost|127\.0\.0\.1)$/.test(e.hostname);return e.protocol!=="https:"&&!a?(na("Syntro Runtime","\u274C Editor URL must use HTTPS:",t),!1):HP.some(n=>n.startsWith(".")?e.hostname.endsWith(n)||e.hostname===n.slice(1):e.hostname===n)?(K("Syntro Runtime","\u2713 Editor URL validated"),!0):(na("Syntro Runtime","\u274C Editor URL host not in allowlist:",e.hostname),!1)}catch(e){return na("Syntro Runtime",`\u274C Invalid editor URL: ${t}`,e),!1}}var bp=()=>{let t=xp();return!Vu()?.token||!t?.mode?null:t.mode};function zP(){return Vu()?.token??null}function qP(){return Vu()?.api_base??null}var qu=null,NI=async t=>{if(K("Syntro Runtime","====== LOAD EDITOR SDK ======"),typeof window>"u"){K("Syntro Runtime","Not in browser - skipping editor SDK load");return}if(window.SyntroEditor){K("Syntro Runtime","Editor SDK already loaded (window.SyntroEditor exists)");return}if(qu)return K("Syntro Runtime","Editor SDK load already in progress, waiting..."),qu;let e=typeof t=="string"?{editorUrl:t}:t??{};if(e.editorUrl==="skip"){K("Syntro Runtime",'editorUrl="skip" \u2014 deferring to caller'),K("Syntro Runtime","================================");return}let a=qP(),n=(a?`${a}/api/editor/sdk/editor-sdk.js`:null)||e.editorUrl;if(!n){na("Syntro Runtime","\u274C No editor SDK URL available (no api_base, no editorUrl option)"),K("Syntro Runtime","================================");return}let o=zP();if(!o){na("Syntro Runtime","\u274C No token found in editor_source."),K("Syntro Runtime","================================");return}let i=`${n}?token=${encodeURIComponent(o)}`;if(K("Syntro Runtime","Editor URL:",i),K("Syntro Runtime","Options:",{hasIntegrity:!!e.integrity,hasEditorUrl:!!n,hasApiBase:!!a,tokenPrefix:`${o.slice(0,10)}...`}),!UP(n)){console.error("[Syntro Runtime] \u274C BLOCKED: Editor from untrusted URL:",n),K("Syntro Runtime","================================");return}return K("Syntro Runtime","\u2713 URL validated, injecting script tag..."),qu=new Promise((s,l)=>{let u=document.createElement("script");u.src=i,u.async=!0,e.integrity&&(u.integrity=e.integrity,u.crossOrigin="anonymous",K("Syntro Runtime","SRI integrity check enabled")),u.onload=()=>{K("Syntro Runtime","\u2713 Editor SDK script loaded successfully"),K("Syntro Runtime","================================"),s()},u.onerror=c=>{console.error("[Syntro Runtime] \u274C Failed to load Editor SDK:",c),console.error("[Syntro Runtime] URL attempted:",i),K("Syntro Runtime","================================"),qu=null,l(c)},document.head.appendChild(u),K("Syntro Runtime","Script tag appended to <head>")}),qu};var VP=new Set(["tag_name","$el_text"]);function $P(t){return VP.has(t)||t.startsWith("attr__")}function FI(t,e){return t.equals!==void 0?e===t.equals:t.contains!==void 0?typeof e=="string"&&e.includes(t.contains):!1}function jP(t){let{events:e,match:a}=t;return r=>{if(!e.includes(r.name))return!1;if(a){for(let[n,o]of Object.entries(a))if($P(n)){let i=r.props?.elements;if(!i||!i.some(l=>FI(o,l[n])))return!1}else if(!FI(o,r.props?.[n]))return!1}return!0}}function HI(t,e){for(let a of t.rules)for(let r of a.conditions)if(r.type==="event_count"&&r.key){let n=r.counter,o=n?jP(n):()=>!0,i=typeof r.withinMs=="number";e.register(r.key,o,i)}}function $u(t,e,a){for(let r of t){let n=r.props;if(!n)continue;let o=n.actions;if(o)for(let i of o)i.triggerWhen?.type==="rules"&&HI(i.triggerWhen,e)}if(a)for(let r of a){let n=r;n.triggerWhen?.type==="rules"&&HI(n.triggerWhen,e)}}var _r=null;function zI(t){_r&&_r!==t?t.appendChild(_r):_r=t;let e=t.getRootNode();e instanceof ShadowRoot&&GP(e)}function qI(){return _r||(_r=document.createElement("div"),_r.id="syntro-overlays",Object.assign(_r.style,{position:"fixed",inset:"0",zIndex:"2147483645",pointerEvents:"none"}),document.body.appendChild(_r)),_r}var UI=!1;function GP(t){if(UI)return;let e=`
|
|
169
169
|
:host {
|
|
170
170
|
--syntro-surface: var(--sc-overlay-background, #0f1318);
|
|
171
171
|
--syntro-fg: var(--sc-overlay-text-color, #cbd0d7);
|
|
@@ -500,7 +500,7 @@ ${l}
|
|
|
500
500
|
`).replace(/\r/g,`
|
|
501
501
|
`)).length,n=0;n<r;n++){var i=t.charCodeAt(n),s=null;i<128?a++:s=i>127&&i<2048?String.fromCharCode(i>>6|192,63&i|128):String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128),cr(s)||(a>e&&(o+=t.substring(e,a)),o+=s,e=a=n+1)}return a>e&&(o+=t.substring(e,t.length)),o},C4=!!db||!!cb,QE="text/plain",Uh=function(t,e,a){var r;a===void 0&&(a=!0);var[n,o]=t.split("?"),i=j({},e),s=(r=o?.split("&").map((u=>{var c,[d,f]=u.split("="),h=a&&(c=i[d])!==null&&c!==void 0?c:f;return delete i[d],d+"="+h})))!==null&&r!==void 0?r:[],l=K3(i);return l&&s.push(l),n+"?"+s.join("&")},Mc=(t,e)=>JSON.stringify(t,((a,r)=>typeof r=="bigint"?r.toString():r),e),rb=t=>{var{data:e,compression:a}=t;if(e){if(a===vn.GZipJS){var r=S4((function(l,u){var c=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var d=new Ga(l.length+(l.length>>>1)),f=0,h=function(g){d[f++]=g},S=0;S<c;++S){if(f+5>d.length){var x=new Ga(f+8+(c-S<<1));x.set(d),d=x}var b=l.charCodeAt(S);b<128||u?h(b):b<2048?(h(192|b>>>6),h(128|63&b)):b>55295&&b<57344?(h(240|(b=65536+(1047552&b)|1023&l.charCodeAt(++S))>>>18),h(128|b>>>12&63),h(128|b>>>6&63),h(128|63&b)):(h(224|b>>>12),h(128|b>>>6&63),h(128|63&b))}return dR(d,0,f)})(Mc(e)),{mtime:0}),n=new Blob([r],{type:QE});return{contentType:QE,body:n,estimatedSize:n.size}}if(a===vn.Base64){var o=(function(l){var u,c,d,f,h,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x=0,b=0,g="",m=[];if(!l)return l;l=_4(l);do u=(h=l.charCodeAt(x++)<<16|l.charCodeAt(x++)<<8|l.charCodeAt(x++))>>18&63,c=h>>12&63,d=h>>6&63,f=63&h,m[b++]=S.charAt(u)+S.charAt(c)+S.charAt(d)+S.charAt(f);while(x<l.length);switch(g=m.join(""),l.length%3){case 1:g=g.slice(0,-2)+"==";break;case 2:g=g.slice(0,-1)+"="}return g})(Mc(e)),i=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Mc(l)))(o);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var s=Mc(e);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},Ch=[];cb&&Ch.push({transport:"fetch",method:t=>{var e,a,{contentType:r,body:n,estimatedSize:o}=(e=rb(t))!==null&&e!==void 0?e:{},i=new Headers;Be(t.headers,(function(c,d){i.append(d,c)})),r&&i.append("Content-Type",r);var s=t.url,l=null;if(yE){var u=new yE;l={signal:u.signal,timeout:setTimeout((()=>u.abort()),t.timeout)}}cb(s,j({method:t?.method||"GET",headers:i,keepalive:t.method==="POST"&&(o||0)<52428.8,body:n,signal:(a=l)==null?void 0:a.signal},t.fetchOptions)).then((c=>c.text().then((d=>{var f={statusCode:c.status,text:d};if(c.status===200)try{f.json=JSON.parse(d)}catch(h){$.error(h)}t.callback==null||t.callback(f)})))).catch((c=>{$.error(c),t.callback==null||t.callback({statusCode:0,text:c})})).finally((()=>l?clearTimeout(l.timeout):null))}}),db&&Ch.push({transport:"XHR",method:t=>{var e,a=new db;a.open(t.method||"GET",t.url,!0);var{contentType:r,body:n}=(e=rb(t))!==null&&e!==void 0?e:{};Be(t.headers,(function(o,i){a.setRequestHeader(i,o)})),r&&a.setRequestHeader("Content-Type",r),t.timeout&&(a.timeout=t.timeout),t.disableXHRCredentials||(a.withCredentials=!0),a.onreadystatechange=()=>{if(a.readyState===4){var o={statusCode:a.status,text:a.responseText};if(a.status===200)try{o.json=JSON.parse(a.responseText)}catch{}t.callback==null||t.callback(o)}},a.send(n)}}),ka!=null&&ka.sendBeacon&&Ch.push({transport:"sendBeacon",method:t=>{var e=Uh(t.url,{beacon:"1"});try{var a,{contentType:r,body:n}=(a=rb(t))!==null&&a!==void 0?a:{},o=typeof n=="string"?new Blob([n],{type:r}):n;ka.sendBeacon(e,o)}catch{}}});var zh=function(t,e){if(!(function(a){try{new RegExp(a)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function JE(t,e,a){return Mc({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:a})}var fR={exact:(t,e)=>e.some((a=>t.some((r=>a===r)))),is_not:(t,e)=>e.every((a=>t.every((r=>a!==r)))),regex:(t,e)=>e.some((a=>t.some((r=>zh(a,r))))),not_regex:(t,e)=>e.every((a=>t.every((r=>!zh(a,r))))),icontains:(t,e)=>e.map(Sh).some((a=>t.map(Sh).some((r=>a.includes(r))))),not_icontains:(t,e)=>e.map(Sh).every((a=>t.map(Sh).every((r=>!a.includes(r))))),gt:(t,e)=>e.some((a=>{var r=parseFloat(a);return!isNaN(r)&&t.some((n=>r>parseFloat(n)))})),lt:(t,e)=>e.some((a=>{var r=parseFloat(a);return!isNaN(r)&&t.some((n=>r<parseFloat(n)))}))},Sh=t=>t.toLowerCase();function pR(t,e){return!t||Object.entries(t).every((a=>{var[r,n]=a,o=e?.[r];if(V(o)||cr(o))return!1;var i=[String(o)],s=fR[n.operator];return!!s&&s(n.values,i)}))}var nb=tt("[Error tracking]"),e0=class{constructor(e){var a,r;this.Zt=[],this.ti=new xb([new Sb,new Ab,new Cb,new _b,new kb,new Lb,new wb,new Ib],M3()),this._instance=e,this.Zt=(a=(r=this._instance.persistence)==null?void 0:r.get_property(Tb))!==null&&a!==void 0?a:[]}onRemoteConfig(e){var a,r,n,o=(a=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&a!==void 0?a:[],i=(n=e.errorTracking)==null?void 0:n.captureExtensionExceptions;this.Zt=o,this._instance.persistence&&this._instance.persistence.register({[Tb]:this.Zt,[RE]:i})}get ii(){var e,a=!!this._instance.get_property(RE),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??a)!==null&&e!==void 0&&e}buildProperties(e,a){return this.ti.buildFromUnknown(e,{syntheticException:a?.syntheticException,mechanism:{handled:a?.handled}})}sendExceptionEvent(e){var a=e.$exception_list;if(this.ei(a)){if(this.ri(a))return void nb.info("Skipping exception capture because a suppression rule matched");if(!this.ii&&this.si(a))return void nb.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ni(a))return void nb.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}ri(e){if(e.length===0)return!1;var a=e.reduce(((r,n)=>{var{type:o,value:i}=n;return vt(o)&&o.length>0&&r.$exception_types.push(o),vt(i)&&i.length>0&&r.$exception_values.push(i),r}),{$exception_types:[],$exception_values:[]});return this.Zt.some((r=>{var n=r.values.map((o=>{var i,s=fR[o.operator],l=Ce(o.value)?o.value:[o.value],u=(i=a[o.key])!==null&&i!==void 0?i:[];return l.length>0&&s(l,u)}));return r.type==="OR"?n.some(Boolean):n.every(Boolean)}))}si(e){return e.flatMap((a=>{var r,n;return(r=(n=a.stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[]})).some((a=>a.filename&&a.filename.startsWith("chrome-extension://")))}ni(e){if(e.length>0){var a,r,n,o,i=(a=(r=e[0].stacktrace)==null?void 0:r.frames)!==null&&a!==void 0?a:[],s=i[i.length-1];return(n=s==null||(o=s.filename)==null?void 0:o.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}ei(e){return!ge(e)&&Ce(e)}},La=tt("[FeatureFlags]"),Cc=tt("[FeatureFlags]",{debugEnabled:!0}),ob="$active_feature_flags",Ks="$override_feature_flags",eT="$feature_flag_payloads",wc="$override_feature_flag_payloads",tT="$feature_flag_request_id",aT="$feature_flag_evaluated_at",rT=t=>{var e={};for(var[a,r]of _h(t||{}))r&&(e[a]=r);return e},w4=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map((a=>{var r;return[a,(r=e[a].variant)!==null&&r!==void 0?r:e[a].enabled]}))),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter((a=>e[a].enabled)).filter((a=>{var r;return(r=e[a].metadata)==null?void 0:r.payload})).map((a=>{var r;return[a,(r=e[a].metadata)==null?void 0:r.payload]})))):La.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},L4=(function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t})({}),t0=class{constructor(e){this.oi=!1,this.ai=!1,this.li=!1,this.ui=!1,this.hi=!1,this.di=!1,this.vi=!1,this.ci=!1,this._instance=e,this.featureFlagEventHandlers=[]}fi(){var e,a=(e=this._instance.config.evaluation_contexts)!==null&&e!==void 0?e:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.ci||(La.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ci=!0),a!=null&&a.length?a.filter((r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||La.error("Invalid evaluation context found:",r,"Expected non-empty string"),n})):[]}pi(){return this.fi().length>0}flags(){if(this._instance.config.__preview_remote_config)this.di=!0;else{var e=!this.gi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.mi({disableFlags:e})}}get hasLoadedFlags(){return this.ai}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(Rb),a=this._instance.get_property(Ks),r=this._instance.get_property(wc);if(!r&&!a)return e||{};var n=ot({},e||{}),o=[...new Set([...Object.keys(r||{}),...Object.keys(a||{})])];for(var i of o){var s,l,u=n[i],c=a?.[i],d=V(c)?(s=u?.enabled)!==null&&s!==void 0&&s:!!c,f=V(c)?u.variant:typeof c=="string"?c:void 0,h=r?.[i],S=j({},u,{enabled:d,variant:d?f??u?.variant:void 0});d!==u?.enabled&&(S.original_enabled=u?.enabled),f!==u?.variant&&(S.original_variant=u?.variant),h&&(S.metadata=j({},u?.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),n[i]=S}return this.oi||(La.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:n}),this.oi=!0),n}getFlagVariants(){var e=this._instance.get_property(al),a=this._instance.get_property(Ks);if(!a)return e||{};for(var r=ot({},e),n=Object.keys(a),o=0;o<n.length;o++)r[n[o]]=a[n[o]];return this.oi||(La.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:a,finalFlags:r}),this.oi=!0),r}getFlagPayloads(){var e=this._instance.get_property(eT),a=this._instance.get_property(wc);if(!a)return e||{};for(var r=ot({},e||{}),n=Object.keys(a),o=0;o<n.length;o++)r[n[o]]=a[n[o]];return this.oi||(La.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:a,finalPayloads:r}),this.oi=!0),r}reloadFeatureFlags(){this.ui||this._instance.config.advanced_disable_feature_flags||this.gi||(this.gi=setTimeout((()=>{this.mi()}),5))}bi(){clearTimeout(this.gi),this.gi=void 0}ensureFlagsLoaded(){this.ai||this.li||this.gi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ui=e}mi(e){var a;if(this.bi(),!this._instance.M())if(this.li)this.hi=!0;else{var r=this._instance.config.token,n=this._instance.get_property("$device_id"),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:j({},((a=this._instance.persistence)==null?void 0:a.get_initial_props())||{},this._instance.get_property(Rc)||{}),group_properties:this._instance.get_property(ki)};cr(n)||V(n)||(o.$device_id=n),(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(o.disable_flags=!0),this.pi()&&(o.evaluation_contexts=this.fi());var i=this._instance.config.__preview_remote_config,s=i?"/flags/?v=2":"/flags/?v=2&config=true",l=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",u=this._instance.requestRouter.endpointFor("flags",s+l);i&&(o.timezone=sR()),this.li=!0,this._instance._send_request({method:"POST",url:u,data:o,compression:this._instance.config.disable_compression?void 0:vn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:c=>{var d,f,h=!0;if(c.statusCode===200&&(this.hi||(this.$anon_distinct_id=void 0),h=!1),this.li=!1,this.di||(this.di=!0,this._instance.yi((f=c.json)!==null&&f!==void 0?f:{})),!o.disable_flags||this.hi)if(this.vi=!h,c.json&&(d=c.json.quotaLimited)!=null&&d.includes(L4.FeatureFlags))La.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var S;o.disable_flags||this.receivedFeatureFlags((S=c.json)!==null&&S!==void 0?S:{},h),this.hi&&(this.hi=!1,this.mi())}}})}}getFeatureFlag(e,a){var r;if(a===void 0&&(a={}),this.ai||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlagResult(e,a);return(r=n?.variant)!==null&&r!==void 0?r:n?.enabled}La.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var a=this.getFeatureFlagResult(e,{send_event:!1});return a?.payload}getFeatureFlagResult(e,a){if(a===void 0&&(a={}),this.ai||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants(),n=e in r,o=r[e],i=this.getFlagPayloads()[e],s=String(o),l=this._instance.get_property(tT)||void 0,u=this._instance.get_property(aT)||void 0,c=this._instance.get_property(Ah)||{};if((a.send_event||!("send_event"in a))&&(!(e in c)||!c[e].includes(s))){var d,f,h,S,x,b,g,m,y;Ce(c[e])?c[e].push(s):c[e]=[s],(d=this._instance.persistence)==null||d.register({[Ah]:c});var v=this.getFeatureFlagDetails(e),C={$feature_flag:e,$feature_flag_response:o,$feature_flag_payload:i||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((f=this._instance.config.bootstrap)==null||(f=f.featureFlags)==null?void 0:f[e])||null,$feature_flag_bootstrapped_payload:((h=this._instance.config.bootstrap)==null||(h=h.featureFlagPayloads)==null?void 0:h[e])||null,$used_bootstrap_value:!this.vi};V(v==null||(S=v.metadata)==null?void 0:S.version)||(C.$feature_flag_version=v.metadata.version);var w,_=(x=v==null||(b=v.reason)==null?void 0:b.description)!==null&&x!==void 0?x:v==null||(g=v.reason)==null?void 0:g.code;_&&(C.$feature_flag_reason=_),v!=null&&(m=v.metadata)!=null&&m.id&&(C.$feature_flag_id=v.metadata.id),V(v?.original_variant)&&V(v?.original_enabled)||(C.$feature_flag_original_response=V(v.original_variant)?v.original_enabled:v.original_variant),v!=null&&(y=v.metadata)!=null&&y.original_payload&&(C.$feature_flag_original_payload=v==null||(w=v.metadata)==null?void 0:w.original_payload),this._instance.capture("$feature_flag_called",C)}if(n){var L=i;if(!V(i))try{L=JSON.parse(i)}catch{}return{key:e,enabled:!!o,variant:typeof o=="string"?o:void 0,payload:L}}}else La.warn('getFeatureFlagResult for key "'+e+`" failed. Feature flags didn't load in time.`)}getRemoteConfigPayload(e,a){var r=this._instance.config.token,n={distinct_id:this._instance.get_distinct_id(),token:r};this.pi()&&(n.evaluation_contexts=this.fi()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:n,compression:this._instance.config.disable_compression?void 0:vn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:o=>{var i,s=(i=o.json)==null?void 0:i.featureFlagPayloads;a(s?.[e]||void 0)}})}isFeatureEnabled(e,a){if(a===void 0&&(a={}),this.ai||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,a);return V(r)?void 0:!!r}La.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((a=>a!==e))}receivedFeatureFlags(e,a){if(this._instance.persistence){this.ai=!0;var r=this.getFlagVariants(),n=this.getFlagPayloads(),o=this.getFlagsWithDetails();(function(i,s,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var d=w4(i),f=d.flags,h=d.featureFlags,S=d.featureFlagPayloads;if(h){var x=i.requestId,b=i.evaluatedAt;if(Ce(h)){La.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var g={};if(h)for(var m=0;m<h.length;m++)g[h[m]]=!0;s&&s.register({[ob]:h,[al]:g})}else{var y=h,v=S,C=f;if(i.errorsWhileComputingFlags)if(f){var w=new Set(Object.keys(f).filter((_=>{var L;return!((L=f[_])!=null&&L.failed)})));y=j({},l,Object.fromEntries(Object.entries(y).filter((_=>{var[L]=_;return w.has(L)})))),v=j({},u,Object.fromEntries(Object.entries(v||{}).filter((_=>{var[L]=_;return w.has(L)})))),C=j({},c,Object.fromEntries(Object.entries(C||{}).filter((_=>{var[L]=_;return w.has(L)}))))}else y=j({},l,y),v=j({},u,v),C=j({},c,C);s&&s.register(j({[ob]:Object.keys(rT(y)),[al]:y||{},[eT]:v||{},[Rb]:C||{}},x?{[tT]:x}:{},b?{[aT]:b}:{}))}}})(e,this._instance.persistence,r,n,o),this.wi(a)}}override(e,a){a===void 0&&(a=!1),La.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:a})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return La.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(Ks),this._instance.persistence.unregister(wc),this.wi(),Cc.info("All overrides cleared");if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var a,r=e;if(this.oi=!!((a=r.suppressWarning)!==null&&a!==void 0&&a),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(Ks),Cc.info("Flag overrides cleared");else if(r.flags){if(Ce(r.flags)){for(var n={},o=0;o<r.flags.length;o++)n[r.flags[o]]=!0;this._instance.persistence.register({[Ks]:n})}else this._instance.persistence.register({[Ks]:r.flags});Cc.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(wc),Cc.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[wc]:r.payloads}),Cc.info("Payload overrides set",{payloads:r.payloads}))),void this.wi()}this.wi()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ai){var{flags:a,flagVariants:r}=this.xi();e(a,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,a,r){var n,o=(this._instance.get_property(Tc)||[]).find((u=>u.flagKey===e)),i={["$feature_enrollment/"+e]:a},s={$feature_flag:e,$feature_enrollment:a,$set:i};o&&(s.$early_access_feature_name=o.name),r&&(s.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",s),this.setPersonPropertiesForFlags(i,!1);var l=j({},this.getFlagVariants(),{[e]:a});(n=this._instance.persistence)==null||n.register({[ob]:Object.keys(rT(l)),[al]:l}),this.wi()}getEarlyAccessFeatures(e,a,r){a===void 0&&(a=!1);var n=this._instance.get_property(Tc),o=r?"&"+r.map((i=>"stage="+i)).join("&"):"";if(n&&!a)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:i=>{var s,l;if(i.json){var u=i.json.earlyAccessFeatures;return(s=this._instance.persistence)==null||s.unregister(Tc),(l=this._instance.persistence)==null||l.register({[Tc]:u}),e(u)}}})}xi(){var e=this.getFlags(),a=this.getFlagVariants();return{flags:e.filter((r=>a[r])),flagVariants:Object.keys(a).filter((r=>a[r])).reduce(((r,n)=>(r[n]=a[n],r)),{})}}wi(e){var{flags:a,flagVariants:r}=this.xi();this.featureFlagEventHandlers.forEach((n=>n(a,r,{errorsLoading:e})))}setPersonPropertiesForFlags(e,a){a===void 0&&(a=!0);var r=this._instance.get_property(Rc)||{};this._instance.register({[Rc]:j({},r,e)}),a&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Rc)}setGroupPropertiesForFlags(e,a){a===void 0&&(a=!0);var r=this._instance.get_property(ki)||{};Object.keys(r).length!==0&&Object.keys(r).forEach((n=>{r[n]=j({},r[n],e[n]),delete e[n]})),this._instance.register({[ki]:j({},r,e)}),a&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var a=this._instance.get_property(ki)||{};this._instance.register({[ki]:j({},a,{[e]:{}})})}else this._instance.unregister(ki)}reset(){this.ai=!1,this.li=!1,this.ui=!1,this.hi=!1,this.di=!1,this.vi=!1,this.$anon_distinct_id=void 0,this.bi(),this.oi=!1}},k4=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Pc=class{constructor(e,a){this.R=e,this.props={},this.Ei=!1,this.$i=(r=>{var n="";return r.token&&(n=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+n+"_posthog"})(e),this.Y=this.Si(e),this.load(),e.debug&&$.info("Persistence loaded",e.persistence,j({},this.props)),this.update_config(e,e,a),this.save()}isDisabled(){return!!this.ki}Si(e){k4.indexOf(e.persistence.toLowerCase())===-1&&($.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var a=(function(n){n===void 0&&(n=[]);var o=[...r4,...n];return j({},Ke,{W:function(i){try{var s={};try{s=Ar.W(i)||{}}catch{}var l=ot(s,JSON.parse(Ke.q(i)||"{}"));return Ke.G(i,l),l}catch{}return null},G:function(i,s,l,u,c,d){try{Ke.G(i,s,void 0,void 0,d);var f={};o.forEach((h=>{s[h]&&(f[h]=s[h])})),Object.keys(f).length&&Ar.G(i,f,l,u,c,d)}catch(h){Ke.B(h)}},V:function(i,s){try{T?.localStorage.removeItem(i),Ar.V(i,s)}catch(l){Ke.B(l)}}})})(e.cookie_persisted_properties||[]),r=e.persistence.toLowerCase();return r==="localstorage"&&Ke.H()?Ke:r==="localstorage+cookie"&&a.H()?a:r==="sessionstorage"&&Dt.H()?Dt:r==="memory"?n4:r==="cookie"?Ar:a.H()?a:Ar}properties(){var e={};return Be(this.props,(function(a,r){if(r===al&>(a))for(var n=Object.keys(a),o=0;o<n.length;o++)e["$feature/"+n[o]]=a[n[o]];else s=r,l=!1,(cr(i=U3)?l:vE&&i.indexOf===vE?i.indexOf(s)!=-1:(Be(i,(function(u){if(l||(l=u===s))return kh})),l))||(e[r]=a);var i,s,l})),e}load(){if(!this.ki){var e=this.Y.W(this.$i);e&&(this.props=ot({},e))}}save(){this.ki||this.Y.G(this.$i,this.props,this.Pi,this.Ti,this.Ii,this.R.debug)}remove(){this.Y.V(this.$i,!1),this.Y.V(this.$i,!0)}clear(){this.remove(),this.props={}}register_once(e,a,r){if(gt(e)){V(a)&&(a="None"),this.Pi=V(r)?this.Ci:r;var n=!1;if(Be(e,((o,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==a||(this.props[i]=o,n=!0)})),n)return this.save(),!0}return!1}register(e,a){if(gt(e)){this.Pi=V(a)?this.Ci:a;var r=!1;if(Be(e,((n,o)=>{e.hasOwnProperty(o)&&this.props[o]!==n&&(this.props[o]=n,r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Ei){var e=tR(this.R.custom_campaign_params,this.R.mask_personal_data_properties,this.R.custom_personal_data_properties);tl(I0(e))||this.register(e),this.Ei=!0}}update_search_keyword(){var e;this.register((e=q?.referrer)?rR(e):{})}update_referrer_info(){var e;this.register_once({$referrer:nR(),$referring_domain:q!=null&&q.referrer&&((e=Oh(q.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Bb]||this.props[Pb]||this.register_once({[Eh]:oR(this.R.mask_personal_data_properties,this.R.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};Be([Pb,Bb],(i=>{var s=this.props[i];s&&Be(s,(function(l,u){e["$initial_"+fb(u)]=l}))}));var a,r,n=this.props[Eh];if(n){var o=(a=iR(n),r={},Be(a,(function(i,s){r["$initial_"+fb(s)]=i})),r);ot(e,o)}return e}safe_merge(e){return Be(this.props,(function(a,r){r in e||(e[r]=a)})),e}update_config(e,a,r){if(this.Ci=this.Pi=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==a.persistence||!((i,s)=>{if(i.length!==s.length)return!1;var l=[...i].sort(),u=[...s].sort();return l.every(((c,d)=>c===u[d]))})(e.cookie_persisted_properties||[],a.cookie_persisted_properties||[])){var n=this.Si(e),o=this.props;this.clear(),this.Y=n,this.props=o,this.save()}}set_disabled(e){this.ki=e,this.ki?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ti&&(this.Ti=e,this.remove(),this.save())}set_secure(e){e!==this.Ii&&(this.Ii=e,this.remove(),this.save())}set_event_timer(e,a){var r=this.props[Ec]||{};r[e]=a,this.props[Ec]=r,this.save()}remove_event_timer(e){var a=(this.props[Ec]||{})[e];return V(a)||(delete this.props[Ec][e],this.save()),a}get_property(e){return this.props[e]}set_property(e,a){this.props[e]=a,this.save()}},nT=tt("[Product Tours]"),ib="ph_product_tours",a0=class{constructor(e){this.Ri=null,this.Fi=null,this._instance=e}onRemoteConfig(e){this._instance.persistence&&this._instance.persistence.register({[OE]:!(e==null||!e.productTours)}),this.loadIfEnabled()}loadIfEnabled(){var e,a;this.Ri||(e=this._instance).config.disable_product_tours||(a=e.persistence)==null||!a.get_property(OE)||this.it((()=>this.Oi()))}it(e){var a,r;(a=Q.__PosthogExtensions__)!=null&&a.generateProductTours?e():(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"product-tours",(n=>{n?nT.error("Could not load product tours script",n):e()}))}Oi(){var e;!this.Ri&&(e=Q.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ri=Q.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,a){if(a===void 0&&(a=!1),!Ce(this.Fi)||a){var r=this._instance.persistence;if(r){var n=r.props[ib];if(Ce(n)&&!a)return this.Fi=n,void e(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:o=>{var i=o.statusCode;if(i!==200||!o.json){var s="Product Tours API could not be loaded, status: "+i;return nT.error(s),void e([],{isLoaded:!1,error:s})}var l=Ce(o.json.product_tours)?o.json.product_tours:[];this.Fi=l,r&&r.register({[ib]:l}),e(l,{isLoaded:!0})}})}else e(this.Fi,{isLoaded:!0})}getActiveProductTours(e){ge(this.Ri)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ri.getActiveProductTours(e)}showProductTour(e){var a;(a=this.Ri)==null||a.showTourById(e)}previewTour(e){this.Ri?this.Ri.previewTour(e):this.it((()=>{var a;this.Oi(),(a=this.Ri)==null||a.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ri)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ri)==null||e.nextStep()}previousStep(){var e;(e=this.Ri)==null||e.previousStep()}clearCache(){var e;this.Fi=null,(e=this._instance.persistence)==null||e.unregister(ib)}resetTour(e){var a;(a=this.Ri)==null||a.resetTour(e)}resetAllTours(){var e;(e=this.Ri)==null||e.resetAllTours()}cancelPendingTour(e){var a;(a=this.Ri)==null||a.cancelPendingTour(e)}},Lc=(function(t){return t.Activation="events",t.Cancellation="cancelEvents",t})({}),U8=(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({}),z8=(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({}),q8=(function(t){return t.Top="top",t.Left="left",t.Right="right",t.Bottom="bottom",t})({}),sb=(function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t})({}),V8=(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({}),$8=(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({}),j8=(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({}),Oc=(function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t.ABANDONED="survey abandoned",t})({}),lb=(function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t.PRODUCT_TOUR_ID="$product_tour_id",t.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",t})({}),r0=(function(t){return t.Popover="popover",t.Inline="inline",t})({}),Oe=tt("[Surveys]"),hR="seenSurvey_",I4=(t,e)=>{var a="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(a="$survey_"+e+"/"+t.id+"/"+t.current_iteration),a},oT=t=>((e,a)=>{var r=""+e+a.id;return a.current_iteration&&a.current_iteration>0&&(r=""+e+a.id+"_"+a.current_iteration),r})(hR,t),A4=[sb.Popover,sb.Widget,sb.API],E4={ignoreConditions:!1,ignoreDelay:!1,displayType:r0.Popover},Vc=class{constructor(){this.Mi={},this.Mi={}}on(e,a){return this.Mi[e]||(this.Mi[e]=[]),this.Mi[e].push(a),()=>{this.Mi[e]=this.Mi[e].filter((r=>r!==a))}}emit(e,a){for(var r of this.Mi[e]||[])r(a);for(var n of this.Mi["*"]||[])n(e,a)}};function Ys(t,e,a){if(ge(t))return!1;switch(a){case"exact":return t===e;case"contains":var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}var n0=class{constructor(e){this.Ai=new Vc,this.ji=(a,r)=>this.Di(a,r)&&this.Li(a,r)&&this.Ni(a,r)&&this.Ui(a,r),this.Di=(a,r)=>r==null||!r.event||a?.event===r?.event,this._instance=e,this.zi=new Set,this.Hi=new Set}init(){var e;if(!V((e=this._instance)==null?void 0:e._addCaptureHook)){var a;(a=this._instance)==null||a._addCaptureHook(((r,n)=>{this.on(r,n)}))}}register(e){var a,r;if(!V((a=this._instance)==null?void 0:a._addCaptureHook)&&(e.forEach((i=>{var s,l;(s=this.Hi)==null||s.add(i),(l=i.steps)==null||l.forEach((u=>{var c;(c=this.zi)==null||c.add(u?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var n,o=new Set;e.forEach((i=>{var s;(s=i.steps)==null||s.forEach((l=>{l!=null&&l.selector&&o.add(l?.selector)}))})),(n=this._instance)==null||n.autocapture.setElementSelectors(o)}}on(e,a){var r;a!=null&&e.length!=0&&(this.zi.has(e)||this.zi.has(a?.event))&&this.Hi&&((r=this.Hi)==null?void 0:r.size)>0&&this.Hi.forEach((n=>{this.Bi(a,n)&&this.Ai.emit("actionCaptured",n.name)}))}qi(e){this.onAction("actionCaptured",(a=>e(a)))}Bi(e,a){if(a?.steps==null)return!1;for(var r of a.steps)if(this.ji(e,r))return!0;return!1}onAction(e,a){return this.Ai.on(e,a)}Li(e,a){if(a!=null&&a.url){var r,n=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!n||typeof n!="string"||!Ys(n,a.url,a.url_matching||"contains"))return!1}return!0}Ni(e,a){return!!this.Wi(e,a)&&!!this.Gi(e,a)&&!!this.Vi(e,a)}Wi(e,a){var r;if(a==null||!a.href)return!0;var n=this.Ji(e);if(n.length>0)return n.some((s=>Ys(s.href,a.href,a.href_matching||"exact")));var o,i=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!i&&Ys((o=i.match(/(?::|")href="(.*?)"/))?o[1]:"",a.href,a.href_matching||"exact")}Gi(e,a){var r;if(a==null||!a.text)return!0;var n=this.Ji(e);if(n.length>0)return n.some((u=>Ys(u.text,a.text,a.text_matching||"exact")||Ys(u.$el_text,a.text,a.text_matching||"exact")));var o,i,s,l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!l&&(o=(function(u){for(var c,d=[],f=/(?::|")text="(.*?)"/g;!ge(c=f.exec(u));)d.includes(c[1])||d.push(c[1]);return d})(l),i=a.text,s=a.text_matching||"exact",o.some((u=>Ys(u,i,s))))}Vi(e,a){var r,n;if(a==null||!a.selector)return!0;var o=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(o!=null&&o.includes(a.selector))return!0;var i=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||"";if(a.selector_regex&&i)try{return new RegExp(a.selector_regex).test(i)}catch{return!1}return!1}Ji(e){var a;return(e==null||(a=e.properties)==null?void 0:a.$elements)==null?[]:e?.properties.$elements}Ui(e,a){return a==null||!a.properties||a.properties.length===0||pR(a.properties.reduce(((r,n)=>{var o=Ce(n.value)?n.value.map(String):n.value!=null?[String(n.value)]:[];return r[n.key]={values:o,operator:n.operator||"exact"},r}),{}),e?.properties)}},o0=class{constructor(e){this._instance=e,this.Ki=new Map,this.Yi=new Map,this.Xi=new Map}Qi(e,a){return!!e&&pR(e.propertyFilters,a?.properties)}Zi(e,a){var r=new Map;return e.forEach((n=>{var o;(o=n.conditions)==null||(o=o[a])==null||(o=o.values)==null||o.forEach((i=>{if(i!=null&&i.name){var s=r.get(i.name)||[];s.push(n.id),r.set(i.name,s)}}))})),r}te(e,a,r){var n=(r===Lc.Activation?this.Ki:this.Yi).get(e),o=[];return this.ie((i=>{o=i.filter((s=>n?.includes(s.id)))})),o.filter((i=>{var s,l=(s=i.conditions)==null||(s=s[r])==null||(s=s.values)==null?void 0:s.find((u=>u.name===e));return this.Qi(l,a)}))}register(e){var a;V((a=this._instance)==null?void 0:a._addCaptureHook)||(this.ee(e),this.re(e))}re(e){var a=e.filter((r=>{var n,o;return((n=r.conditions)==null?void 0:n.actions)&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0}));a.length!==0&&(this.se==null&&(this.se=new n0(this._instance),this.se.init(),this.se.qi((r=>{this.onAction(r)}))),a.forEach((r=>{var n,o,i,s,l;r.conditions&&(n=r.conditions)!=null&&n.actions&&(o=r.conditions)!=null&&(o=o.actions)!=null&&o.values&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0&&((s=this.se)==null||s.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((u=>{if(u&&u.name){var c=this.Xi.get(u.name);c&&c.push(r.id),this.Xi.set(u.name,c||[r.id])}})))})))}ee(e){var a,r=e.filter((o=>{var i,s;return((i=o.conditions)==null?void 0:i.events)&&((s=o.conditions)==null||(s=s.events)==null||(s=s.values)==null?void 0:s.length)>0})),n=e.filter((o=>{var i,s;return((i=o.conditions)==null?void 0:i.cancelEvents)&&((s=o.conditions)==null||(s=s.cancelEvents)==null||(s=s.values)==null?void 0:s.length)>0}));(r.length!==0||n.length!==0)&&((a=this._instance)==null||a._addCaptureHook(((o,i)=>{this.onEvent(o,i)})),this.Ki=this.Zi(e,Lc.Activation),this.Yi=this.Zi(e,Lc.Cancellation))}onEvent(e,a){var r,n=this.ne(),o=this.oe(),i=this.ae(),s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[o])||[];if(i===e&&a&&s.length>0){var l,u;n.info("event matched, removing item from activated items",{event:e,eventPayload:a,existingActivatedItems:s});var c=(a==null||(l=a.properties)==null?void 0:l.$survey_id)||(a==null||(u=a.properties)==null?void 0:u.$product_tour_id);if(c){var d=s.indexOf(c);d>=0&&(s.splice(d,1),this.le(s))}}else{if(this.Yi.has(e)){var f=this.te(e,a,Lc.Cancellation);f.length>0&&(n.info("cancel event matched, cancelling items",{event:e,itemsToCancel:f.map((S=>S.id))}),f.forEach((S=>{var x=s.indexOf(S.id);x>=0&&s.splice(x,1),this.ue(S.id)})),this.le(s))}if(this.Ki.has(e)){n.info("event name matched",{event:e,eventPayload:a,items:this.Ki.get(e)});var h=this.te(e,a,Lc.Activation);this.le(s.concat(h.map((S=>S.id))||[]))}}}onAction(e){var a,r=this.oe(),n=((a=this._instance)==null||(a=a.persistence)==null?void 0:a.props[r])||[];this.Xi.has(e)&&this.le(n.concat(this.Xi.get(e)||[]))}le(e){var a,r=this.ne(),n=this.oe(),o=[...new Set(e)].filter((i=>!this.he(i)));r.info("updating activated items",{activatedItems:o}),(a=this._instance)==null||(a=a.persistence)==null||a.register({[n]:o})}getActivatedIds(){var e,a=this.oe(),r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[a];return r||[]}getEventToItemsMap(){return this.Ki}de(){return this.se}},i0=class extends o0{constructor(e){super(e)}oe(){return"$surveys_activated"}ae(){return Oc.SHOWN}ie(e){var a;(a=this._instance)==null||a.getSurveys(e)}ue(e){var a;(a=this._instance)==null||a.cancelPendingSurvey(e)}ne(){return Oe}he(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},s0=class{constructor(e){this.ve=void 0,this._surveyManager=null,this.ce=!1,this.fe=[],this.pe=null,this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var a=e.surveys;if(ge(a))return Oe.warn("Flags not loaded yet. Not loading surveys.");var r=Ce(a);this.ve=r?a.length>0:a,Oe.info("flags response received, isSurveysEnabled: "+this.ve),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],a=0;a<localStorage.length;a++){var r=localStorage.key(a);(r!=null&&r.startsWith(hR)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((n=>localStorage.removeItem(n)))}loadIfEnabled(){if(!this._surveyManager)if(this.ce)Oe.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Oe.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Oe.info("Not loading surveys in cookieless mode without consent.");else{var e=Q?.__PosthogExtensions__;if(e){if(!V(this.ve)||this._instance.config.advanced_enable_surveys){var a=this.ve||this._instance.config.advanced_enable_surveys;this.ce=!0;try{var r=e.generateSurveys;if(r)return void this.ge(r,a);var n=e.loadExternalDependency;if(!n)return void this._e("PostHog loadExternalDependency extension not found.");n(this._instance,"surveys",(o=>{o||!e.generateSurveys?this._e("Could not load surveys script",o):this.ge(e.generateSurveys,a)}))}catch(o){throw this._e("Error initializing surveys",o),o}finally{this.ce=!1}}}else Oe.error("PostHog Extensions not found.")}}ge(e,a){this._surveyManager=e(this._instance,a),this._surveyEventReceiver=new i0(this._instance),Oe.info("Surveys loaded successfully"),this.me({isLoaded:!0})}_e(e,a){Oe.error(e,a),this.me({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.fe.push(e),this._surveyManager&&this.me({isLoaded:!0}),()=>{this.fe=this.fe.filter((a=>a!==e))}}getSurveys(e,a){if(a===void 0&&(a=!1),this._instance.config.disable_surveys)return Oe.info("Disabled. Not loading surveys."),e([]);var r,n=this._instance.get_property(Mb);if(n&&!a)return e(n,{isLoaded:!0});typeof Promise<"u"&&this.pe?this.pe.then((o=>{var{surveys:i,context:s}=o;return e(i,s)})):(typeof Promise<"u"&&(this.pe=new Promise((o=>{r=o}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:o=>{var i;this.pe=null;var s=o.statusCode;if(s!==200||!o.json){var l="Surveys API could not be loaded, status: "+s;Oe.error(l);var u={isLoaded:!1,error:l};return e([],u),void(r==null||r({surveys:[],context:u}))}var c,d=o.json.surveys||[],f=d.filter((S=>(function(x){return!(!x.start_date||x.end_date)})(S)&&((function(x){var b;return!((b=x.conditions)==null||(b=b.events)==null||(b=b.values)==null||!b.length)})(S)||(function(x){var b;return!((b=x.conditions)==null||(b=b.actions)==null||(b=b.values)==null||!b.length)})(S))));f.length>0&&((c=this._surveyEventReceiver)==null||c.register(f)),(i=this._instance.persistence)==null||i.register({[Mb]:d});var h={isLoaded:!0};e(d,h),r?.({surveys:d,context:h})}}))}me(e){for(var a of this.fe)try{if(!e.isLoaded)return a([],e);this.getSurveys(a)}catch(r){Oe.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,a){if(a===void 0&&(a=!1),!ge(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,a);Oe.warn("init was not called")}be(e){var a=null;return this.getSurveys((r=>{var n;a=(n=r.find((o=>o.id===e)))!==null&&n!==void 0?n:null})),a}ye(e){if(ge(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var a=typeof e=="string"?this.be(e):e;return a?this._surveyManager.checkSurveyEligibility(a):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(ge(this._surveyManager))return Oe.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var a=this.ye(e);return{visible:a.eligible,disabledReason:a.reason}}canRenderSurveyAsync(e,a){return ge(this._surveyManager)?(Oe.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((r=>{this.getSurveys((n=>{var o,i=(o=n.find((l=>l.id===e)))!==null&&o!==void 0?o:null;if(i){var s=this.ye(i);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),a)}))}renderSurvey(e,a,r){var n;if(ge(this._surveyManager))Oe.warn("init was not called");else{var o=typeof e=="string"?this.be(e):e;if(o!=null&&o.id)if(A4.includes(o.type)){var i=q?.querySelector(a);if(i)return(n=o.appearance)!=null&&n.surveyPopupDelaySeconds?(Oe.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var s,l;Oe.info("Rendering survey "+o.id+" with delay of "+((s=o.appearance)==null?void 0:s.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(o,i,r),Oe.info("Survey "+o.id+" rendered")}),1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,i,r);Oe.warn("Survey element not found")}else Oe.warn("Surveys of type "+o.type+" cannot be rendered in the app");else Oe.warn("Survey not found")}}displaySurvey(e,a){var r;if(ge(this._surveyManager))Oe.warn("init was not called");else{var n=this.be(e);if(n){var o=n;if((r=n.appearance)!=null&&r.surveyPopupDelaySeconds&&a.ignoreDelay&&(o=j({},n,{appearance:j({},n.appearance,{surveyPopupDelaySeconds:0})})),a.displayType!==r0.Popover&&a.initialResponses&&Oe.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),a.ignoreConditions===!1){var i=this.canRenderSurvey(n);if(!i.visible)return void Oe.warn("Survey is not eligible to be displayed: ",i.disabledReason)}a.displayType!==r0.Inline?this._surveyManager.handlePopoverSurvey(o,a):this.renderSurvey(o,a.selector,a.properties)}else Oe.warn("Survey not found")}}cancelPendingSurvey(e){ge(this._surveyManager)?Oe.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}},pn=tt("[Conversations]"),l0=class{constructor(e){this.we=void 0,this._conversationsManager=null,this.xe=!1,this.Ee=null,this._instance=e}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var a=e.conversations;ge(a)||(xn(a)?this.we=a:(this.we=a.enabled,this.Ee=a),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.we=void 0,this.Ee=null}loadIfEnabled(){if(!this._conversationsManager&&!this.xe&&!(this._instance.config.disable_conversations||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Q?.__PosthogExtensions__;if(e&&!V(this.we)&&this.we)if(this.Ee&&this.Ee.token){this.xe=!0;try{var a=e.initConversations;if(a)return this.$e(a),void(this.xe=!1);var r=e.loadExternalDependency;if(!r)return void this.Se("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",(n=>{n||!e.initConversations?this.Se("Could not load conversations script",n):this.$e(e.initConversations),this.xe=!1}))}catch(n){this.Se("Error initializing conversations",n),this.xe=!1}}else pn.error("Conversations enabled but missing token in remote config.")}}$e(e){if(this.Ee)try{this._conversationsManager=e(this.Ee,this._instance),pn.info("Conversations loaded successfully")}catch(a){this.Se("Error completing conversations initialization",a)}else pn.error("Cannot complete initialization: remote config is null")}Se(e,a){pn.error(e,a),this._conversationsManager=null,this.xe=!1}show(){this._conversationsManager?this._conversationsManager.show():pn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.we===!0&&!cr(this._conversationsManager)}isVisible(){var e,a;return(e=(a=this._conversationsManager)==null?void 0:a.isVisible())!==null&&e!==void 0&&e}sendMessage(e,a,r){var n=this;return el((function*(){return n._conversationsManager?n._conversationsManager.sendMessage(e,a,r):(pn.warn("Conversations not available yet."),null)}))()}getMessages(e,a){var r=this;return el((function*(){return r._conversationsManager?r._conversationsManager.getMessages(e,a):(pn.warn("Conversations not available yet."),null)}))()}markAsRead(e){var a=this;return el((function*(){return a._conversationsManager?a._conversationsManager.markAsRead(e):(pn.warn("Conversations not available yet."),null)}))()}getTickets(e){var a=this;return el((function*(){return a._conversationsManager?a._conversationsManager.getTickets(e):(pn.warn("Conversations not available yet."),null)}))()}getCurrentTicketId(){var e,a;return(e=(a=this._conversationsManager)==null?void 0:a.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,a;return(e=(a=this._conversationsManager)==null?void 0:a.getWidgetSessionId())!==null&&e!==void 0?e:null}},u0=class{constructor(e){var a;this.ke=!1,this.Pe=!1,this._instance=e,this._instance&&(a=this._instance.config.logs)!=null&&a.captureConsoleLogs&&(this.ke=!0)}onRemoteConfig(e){var a,r=(a=e.logs)==null?void 0:a.captureConsoleLogs;!ge(r)&&r&&(this.ke=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.ke&&!this.Pe){var e=tt("[logs]"),a=Q?.__PosthogExtensions__;if(a){var r=a.loadExternalDependency;r?r(this._instance,"logs",(n=>{var o;n||(o=a.logs)==null||!o.initializeLogs?e.error("Could not load logs script",n):(a.logs.initializeLogs(this._instance),this.Pe=!0)})):e.error("PostHog loadExternalDependency extension not found.")}else e.error("PostHog Extensions not found.")}}},iT=tt("[RateLimiter]"),c0=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=a=>{var r=a.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((n=>{iT.info((n||"events")+" is quota limited."),this.serverLimits[n]=new Date().getTime()+6e4}))}catch(n){return void iT.warn('could not rate limit - continuing. Error: "'+n?.message+'"',{text:r})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var a,r,n;e===void 0&&(e=!1);var{captureEventsBurstLimit:o,captureEventsPerSecond:i}=this,s=new Date().getTime(),l=(a=(r=this.instance.persistence)==null?void 0:r.get_property(Db))!==null&&a!==void 0?a:{tokens:o,last:s};l.tokens+=(s-l.last)/1e3*i,l.last=s,l.tokens>o&&(l.tokens=o);var u=l.tokens<1;return u||e||(l.tokens=Math.max(0,l.tokens-1)),!u||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+i+" events per second and "+o+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,(n=this.instance.persistence)==null||n.set_property(Db,l),{isRateLimited:u,remainingTokens:l.tokens}}isServerRateLimited(e){var a=this.serverLimits[e||"events"]||!1;return a!==!1&&new Date().getTime()<a}},Li=tt("[RemoteConfig]"),d0=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Q._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Te(e){var a,r;(a=Q.__PosthogExtensions__)!=null&&a.loadExternalDependency?(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):(Li.error("PostHog Extensions not found. Cannot load remote config."),e())}Ie(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:a=>{e(a.json)}})}load(){try{if(this.remoteConfig)return Li.info("Using preloaded remote config",this.remoteConfig),void this.yi(this.remoteConfig);if(this._instance.M())return void Li.warn("Remote config is disabled. Falling back to local config.");this.Te((e=>{if(!e)return Li.info("No config found after loading remote JS config. Falling back to JSON."),void this.Ie((a=>{this.yi(a)}));this.yi(e)}))}catch(e){Li.error("Error loading remote config",e)}}yi(e){e?this._instance.config.__preview_remote_config?(this._instance.yi(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):Li.info("__preview_remote_config is disabled. Logging config instead",e):Li.error("Failed to fetch remote config from PostHog.")}},f0=3e3,p0=class{constructor(e,a){this.Ce=!0,this.Re=[],this.Fe=Er(a?.flush_interval_ms||f0,250,5e3,$.createLogger("flush interval"),f0),this.Oe=e}enqueue(e){this.Re.push(e),this.Me||this.Ae()}unload(){this.je();var e=this.Re.length>0?this.De():{},a=Object.values(e);[...a.filter((r=>r.url.indexOf("/e")===0)),...a.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Oe(j({},r,{transport:"sendBeacon"}))}))}enable(){this.Ce=!1,this.Ae()}Ae(){var e=this;this.Ce||(this.Me=setTimeout((()=>{if(this.je(),this.Re.length>0){var a=this.De(),r=function(){var o=a[n],i=new Date().getTime();o.data&&Ce(o.data)&&Be(o.data,(s=>{s.offset=Math.abs(s.timestamp-i),delete s.timestamp})),e.Oe(o)};for(var n in a)r()}}),this.Fe))}je(){clearTimeout(this.Me),this.Me=void 0}De(){var e={};return Be(this.Re,(a=>{var r,n=a,o=(n?n.batchKey:null)||n.url;V(e[o])&&(e[o]=j({},n,{data:[]})),(r=e[o].data)==null||r.push(n.data)})),this.Re=[],e}},T4=["retriesPerformedSoFar"],h0=class{constructor(e){this.Le=!1,this.Ne=3e3,this.Re=[],this._instance=e,this.Re=[],this.Ue=!0,!V(T)&&"onLine"in T.navigator&&(this.Ue=T.navigator.onLine,this.ze=()=>{this.Ue=!0,this.Lt()},this.He=()=>{this.Ue=!1},ft(T,"online",this.ze),ft(T,"offline",this.He))}get length(){return this.Re.length}retriableRequest(e){var{retriesPerformedSoFar:a}=e,r=fT(e,T4);Qs(a)&&(r.url=Uh(r.url,{retry_count:a})),this._instance._send_request(j({},r,{callback:n=>{n.statusCode!==200&&(n.statusCode<400||n.statusCode>=500)&&(a??0)<10?this.Be(j({retriesPerformedSoFar:a},r)):r.callback==null||r.callback(n)}}))}Be(e){var a=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=a+1;var r=(function(i){var s=3e3*Math.pow(2,i),l=s/2,u=Math.min(18e5,s),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)})(a),n=Date.now()+r;this.Re.push({retryAt:n,requestOptions:e});var o="Enqueued failed request for retry in "+r;navigator.onLine||(o+=" (Browser is offline)"),$.warn(o),this.Le||(this.Le=!0,this.qe())}qe(){if(this.We&&clearTimeout(this.We),this.Re.length===0)return this.Le=!1,void(this.We=void 0);this.We=setTimeout((()=>{this.Ue&&this.Re.length>0&&this.Lt(),this.qe()}),this.Ne)}Lt(){var e=Date.now(),a=[],r=this.Re.filter((o=>o.retryAt<e||(a.push(o),!1)));if(this.Re=a,r.length>0)for(var{requestOptions:n}of r)this.retriableRequest(n)}unload(){for(var{requestOptions:e}of(this.We&&(clearTimeout(this.We),this.We=void 0),this.Le=!1,V(T)||(this.ze&&(T.removeEventListener("online",this.ze),this.ze=void 0),this.He&&(T.removeEventListener("offline",this.He),this.He=void 0)),this.Re))try{this._instance._send_request(j({},e,{transport:"sendBeacon"}))}catch(a){$.error(a)}this.Re=[]}},m0=class{constructor(e){this.Ge=()=>{var a,r,n,o;this.Ve||(this.Ve={});var i=this.scrollElement(),s=this.scrollY(),l=i?Math.max(0,i.scrollHeight-i.clientHeight):0,u=s+(i?.clientHeight||0),c=i?.scrollHeight||0;this.Ve.lastScrollY=Math.ceil(s),this.Ve.maxScrollY=Math.max(s,(a=this.Ve.maxScrollY)!==null&&a!==void 0?a:0),this.Ve.maxScrollHeight=Math.max(l,(r=this.Ve.maxScrollHeight)!==null&&r!==void 0?r:0),this.Ve.lastContentY=u,this.Ve.maxContentY=Math.max(u,(n=this.Ve.maxContentY)!==null&&n!==void 0?n:0),this.Ve.maxContentHeight=Math.max(c,(o=this.Ve.maxContentHeight)!==null&&o!==void 0?o:0)},this._instance=e}getContext(){return this.Ve}resetContext(){var e=this.Ve;return setTimeout(this.Ge,0),e}startMeasuringScrollPosition(){ft(T,"scroll",this.Ge,{capture:!0}),ft(T,"scrollend",this.Ge,{capture:!0}),ft(T,"resize",this.Ge)}scrollElement(){if(!this._instance.config.scroll_root_selector)return T?.document.documentElement;var e=Ce(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var a of e){var r=T?.document.querySelector(a);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return T&&(T.scrollY||T.pageYOffset||T.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return T&&(T.scrollX||T.pageXOffset||T.document.documentElement.scrollLeft)||0}},R4=t=>oR(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties),qh=class{constructor(e,a,r,n){this.Je=o=>{var i=this.Ke();if(!i||i.sessionId!==o){var s={sessionId:o,props:this.Ye(this._instance)};this.Xe.register({[Ob]:s})}},this._instance=e,this.Qe=a,this.Xe=r,this.Ye=n||R4,this.Qe.onSessionId(this.Je)}Ke(){return this.Xe.props[Ob]}getSetOnceProps(){var e,a=(e=this.Ke())==null?void 0:e.props;return a?"r"in a?iR(a):{$referring_domain:a.referringDomain,$pathname:a.initialPathName,utm_source:a.utm_source,utm_campaign:a.utm_campaign,utm_medium:a.utm_medium,utm_content:a.utm_content,utm_term:a.utm_term}:{}}getSessionProps(){var e={};return Be(I0(this.getSetOnceProps()),((a,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+fb(r)]=a})),e}},ub=tt("[SessionId]"),Vh=class{on(e,a){return this.Ze.on(e,a)}constructor(e,a,r){var n;if(this.tr=[],this.ir=void 0,this.Ze=new Vc,this.er=(c,d)=>!(!Qs(c)||!Qs(d))&&Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.R=e.config,this.Xe=e.persistence,this.rr=void 0,this.sr=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.nr=a||_o,this.ar=r||_o;var o=this.R.persistence_name||this.R.token,i=this.R.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*Er(i,60,36e3,ub.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.lr(),this.ur="ph_"+o+"_window_id",this.hr="ph_"+o+"_primary_window_exists",this.dr()){var s=Dt.W(this.ur),l=Dt.W(this.hr);s&&!l?this.rr=s:Dt.V(this.ur),Dt.G(this.hr,!0)}if((n=this.R.bootstrap)!=null&&n.sessionID)try{var u=(c=>{var d=c.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.R.bootstrap.sessionID);this.vr(this.R.bootstrap.sessionID,new Date().getTime(),u)}catch(c){ub.error("Invalid sessionID in bootstrap",c)}this.cr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return V(this.tr)&&(this.tr=[]),this.tr.push(e),this.sr&&e(this.sr,this.rr),()=>{this.tr=this.tr.filter((a=>a!==e))}}dr(){return this.R.persistence!=="memory"&&!this.Xe.ki&&Dt.H()}pr(e){e!==this.rr&&(this.rr=e,this.dr()&&Dt.G(this.ur,e))}gr(){return this.rr?this.rr:this.dr()?Dt.W(this.ur):null}vr(e,a,r){e===this.sr&&a===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=a,this.sr=e,this.Xe.register({[Ih]:[a,e,r]}))}_r(){var e=this.Xe.props[Ih];return Ce(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.vr(null,null,null)}destroy(){clearTimeout(this.mr),this.mr=void 0,this.ir&&T&&(T.removeEventListener("beforeunload",this.ir,{capture:!1}),this.ir=void 0),this.tr=[]}cr(){this.ir=()=>{this.dr()&&Dt.V(this.hr)},ft(T,"beforeunload",this.ir,{capture:!1})}checkAndGetSessionAndWindowId(e,a){if(e===void 0&&(e=!1),a===void 0&&(a=null),this.R.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=a||new Date().getTime(),[n,o,i]=this._r(),s=this.gr(),l=Qs(i)&&Math.abs(r-i)>864e5,u=!1,c=!o,d=!c&&!e&&this.er(r,n);c||d||l?(o=this.nr(),s=this.ar(),ub.info("new session ID generated",{sessionId:o,windowId:s,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}}),i=r,u=!0):s||(s=this.ar(),u=!0);var f=Qs(n)&&e&&!l?n:r,h=Qs(i)?i:new Date().getTime();return this.pr(s),this.vr(o,f,h),e||this.lr(),u&&this.tr.forEach((S=>S(o,s,u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0))),{sessionId:o,windowId:s,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:n}}lr(){clearTimeout(this.mr),this.mr=setTimeout((()=>{var[e]=this._r();if(this.er(new Date().getTime(),e)){var a=this.sr;this.resetSessionId(),this.Ze.emit("forcedIdleReset",{idleSessionId:a})}}),1.1*this.sessionTimeoutMs)}},M4=["$set_once","$set"],bo=tt("[SiteApps]"),g0=class{constructor(e){this._instance=e,this.br=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}yr(e,a){if(a){var r=this.globalsForEvent(a);this.br.push(r),this.br.length>1e3&&(this.br=this.br.slice(10))}}get siteAppLoaders(){var e;return(e=Q._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.yr.bind(this));this.wr=()=>{e(),this.br=[],this.wr=void 0}}}globalsForEvent(e){var a,r,n,o,i,s,l;if(!e)throw new Error("Event payload is required");var u={},c=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,h]of Object.entries(d))u[f]={id:c[f],type:f,properties:h};var{$set_once:S,$set:x}=e;return{event:j({},fT(e,M4),{properties:j({},e.properties,x?{$set:j({},(a=(r=e.properties)==null?void 0:r.$set)!==null&&a!==void 0?a:{},x)}:{},S?{$set_once:j({},(n=(o=e.properties)==null?void 0:o.$set_once)!==null&&n!==void 0?n:{},S)}:{}),elements_chain:(i=(s=e.properties)==null?void 0:s.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var a=this.apps[e.id],r=()=>{var s;!a.errored&&this.br.length&&(bo.info("Processing "+this.br.length+" events for site app with id "+e.id),this.br.forEach((l=>a.processEvent==null?void 0:a.processEvent(l))),a.processedBuffer=!0),Object.values(this.apps).every((l=>l.processedBuffer||l.errored))&&((s=this.wr)==null||s.call(this))},n=!1,o=s=>{a.errored=!s,a.loaded=!0,bo.info("Site app with id "+e.id+" "+(s?"loaded":"errored")),n&&r()};try{var{processEvent:i}=e.init({posthog:this._instance,callback:s=>{o(s)}});i&&(a.processEvent=i),n=!0}catch(s){bo.error("Error while initializing PostHog app with config id "+e.id,s),o(!1)}if(n&&a.loaded)try{r()}catch(s){bo.error("Error while processing buffered events PostHog app with config id "+e.id,s),a.errored=!0}}Er(){var e=this.siteAppLoaders||[];for(var a of e)this.apps[a.id]={id:a.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}$r(e){if(Object.keys(this.apps).length!==0){var a=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(a)}catch(n){bo.error("Error while processing event "+e.event+" for site app "+r.id,n)}}}onRemoteConfig(e){var a,r,n,o=this;if((a=this.siteAppLoaders)!=null&&a.length)return this.isEnabled?(this.Er(),void this._instance.on("eventCaptured",(u=>this.$r(u)))):void bo.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.wr)==null||r.call(this),(n=e.siteApps)!=null&&n.length)if(this.isEnabled){var i=function(u){var c;Q["__$$ph_site_app_"+u]=o._instance,(c=Q.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(o._instance,l,(d=>{if(d)return bo.error("Error while initializing PostHog app with config id "+u,d)}))};for(var{id:s,url:l}of e.siteApps)i(s)}else bo.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}},mR=function(t,e){if(!t)return!1;var a=t.userAgent;if(a&&bE(a,e))return!0;try{var r=t?.userAgentData;if(r!=null&&r.brands&&r.brands.some((n=>bE(n?.brand,e))))return!0}catch{}return!!t.webdriver},Dc=(function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t})({}),sT="i.posthog.com",v0=class{constructor(e){this.Sr={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,a=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return a||(a=this.apiHost.replace("."+sT,".posthog.com")),a==="https://app.posthog.com"?"https://us.posthog.com":a}get region(){return this.Sr[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Sr[this.apiHost]=Dc.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Sr[this.apiHost]=Dc.EU:this.Sr[this.apiHost]=Dc.CUSTOM),this.Sr[this.apiHost]}endpointFor(e,a){if(a===void 0&&(a=""),a&&(a=a[0]==="/"?a:"/"+a),e==="ui")return this.uiHost+a;if(e==="flags")return this.flagsApiHost+a;if(this.region===Dc.CUSTOM)return this.apiHost+a;var r=sT+a;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}},O4={icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!T&&zh(e.href,t),not_regex:(t,e)=>!!T&&!zh(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t},y0=class t{constructor(e){var a=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),a.getWebExperiments((n=>{t.kr("retrieved web experiments from the server"),a.Pr=new Map,n.forEach((o=>{if(o.feature_flag_key){var i;a.Pr&&(t.kr("setting flag key ",o.feature_flag_key," to web experiment ",o),(i=a.Pr)==null||i.set(o.feature_flag_key,o));var s=a._instance.getFeatureFlag(o.feature_flag_key);vt(s)&&o.variants[s]&&a.Tr(o.name,s,o.variants[s].transforms)}else if(o.variants)for(var l in o.variants){var u=o.variants[l];t.Ir(u)&&a.Tr(o.name,l,u.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}onFeatureFlags(e){if(this._is_bot())t.kr("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(ge(this.Pr))return this.Pr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();t.kr("applying feature flags",e),e.forEach((a=>{var r;if(this.Pr&&(r=this.Pr)!=null&&r.has(a)){var n,o=this._instance.getFeatureFlag(a),i=(n=this.Pr)==null?void 0:n.get(a);o&&i!=null&&i.variants[o]&&this.Tr(i.name,o,i.variants[o].transforms)}}))}}previewWebExperiment(){var e=t.getWindowLocation();if(e!=null&&e.search){var a=Dh(e?.search,"__experiment_id"),r=Dh(e?.search,"__experiment_variant");a&&r&&(t.kr("previewing web experiments "+a+" && "+r),this.getWebExperiments((n=>{this.Cr(parseInt(a),r,n)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,a,r){if(this._instance.config.disable_web_experiments&&!r)return e([]);var n=this._instance.get_property("$web_experiments");if(n&&!a)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:o=>{if(o.statusCode!==200||!o.json)return e([]);var i=o.json.experiments||[];return e(i)}})}Cr(e,a,r){var n=r.filter((o=>o.id===e));n&&n.length>0&&(t.kr("Previewing web experiment ["+n[0].name+"] with variant ["+a+"]"),this.Tr(n[0].name,a,n[0].variants[a].transforms))}static Ir(e){return!ge(e.conditions)&&t.Rr(e)&&t.Fr(e)}static Rr(e){var a;if(ge(e.conditions)||ge((a=e.conditions)==null?void 0:a.url))return!0;var r,n,o,i=t.getWindowLocation();return!!i&&((r=e.conditions)==null||!r.url||O4[(n=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&n!==void 0?n:"icontains"](e.conditions.url,i))}static getWindowLocation(){return T?.location}static Fr(e){var a;if(ge(e.conditions)||ge((a=e.conditions)==null?void 0:a.utm))return!0;var r=tR();if(r.utm_source){var n,o,i,s,l,u,c,d,f=(n=e.conditions)==null||(n=n.utm)==null||!n.utm_campaign||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_campaign)==r.utm_campaign,h=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_source||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_source)==r.utm_source,S=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,x=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return f&&S&&x&&h}return!1}static kr(e){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];$.info("[WebExperiments] "+e,r)}Tr(e,a,r){this._is_bot()?t.kr("Refusing to render web experiment since the viewer is a likely bot"):a!=="control"?r.forEach((n=>{if(n.selector){var o;t.kr("applying transform of variant "+a+" for experiment "+e+" ",n);var i=(o=document)==null?void 0:o.querySelectorAll(n.selector);i?.forEach((s=>{var l=s;n.html&&(l.innerHTML=n.html),n.css&&l.setAttribute("style",n.css)}))}})):t.kr("Control variants leave the page unmodified.")}_is_bot(){return ka&&this._instance?mR(ka,this._instance.config.custom_blocked_useragents):void 0}},D4=tt("[PostHog ExternalIntegrations]"),B4={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},x0=class{constructor(e){this._instance=e}it(e,a){var r;(r=Q.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(n=>{if(n)return D4.error("failed to load script",n);a()}))}startIfEnabledOrStop(){var e=this,a=function(i){var s,l,u;!n||(s=Q.__PosthogExtensions__)!=null&&(s=s.integrations)!=null&&s[i]||e.it(B4[i],(()=>{var c;(c=Q.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[i])==null||c.start(e._instance)})),!n&&(l=Q.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[i]&&((u=Q.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[i])==null||u.stop())};for(var[r,n]of Object.entries((o=this._instance.config.integrations)!==null&&o!==void 0?o:{})){var o;a(r)}}},b0="[SessionRecording]",kc=tt(b0),$h=class{get started(){var e;return!((e=this.Or)==null||!e.isStarted)}get status(){return this.Or?this.Or.status:this.Mr&&!this.Ar?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Mr=!1,this.jr=void 0,this._instance=e,!this._instance.sessionManager)throw kc.error("started without valid sessionManager"),new Error(b0+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(b0+' cannot be used with cookieless_mode="always"')}get Ar(){var e,a=!((e=this._instance.get_property(Kx))==null||!e.enabled),r=!this._instance.config.disable_session_recording,n=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return T&&a&&r&&!n}startIfEnabledOrStop(e){var a;if(!this.Ar||(a=this.Or)==null||!a.isStarted){var r=!V(Object.assign)&&!V(Array.from);this.Ar&&r?(this.Dr(e),kc.info("starting")):this.stopRecording()}}Dr(e){var a,r,n;this.Ar&&(Q!=null&&(a=Q.__PosthogExtensions__)!=null&&(a=a.rrweb)!=null&&a.record&&(r=Q.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Lr(e):(n=Q.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Nr,(o=>{if(o)return kc.error("could not load recorder",o);this.Lr(e)})))}stopRecording(){var e,a;(e=this.jr)==null||e.call(this),this.jr=void 0,(a=this.Or)==null||a.stop()}Ur(){var e;(e=this._instance.persistence)==null||e.unregister(FT)}zr(e){if(this._instance.persistence){var a,r,n=this._instance.persistence,o=()=>{var i=e.sessionRecording===!1?void 0:e.sessionRecording,s=i?.sampleRate,l=ge(s)?null:parseFloat(s);ge(l)&&this.Ur();var u=i?.minimumDurationMilliseconds;n.register({[Kx]:j({enabled:!!i},i,{networkPayloadCapture:j({capturePerformance:e.capturePerformance},i?.networkPayloadCapture),canvasRecording:{enabled:i?.recordCanvas,fps:i?.canvasFps,quality:i?.canvasQuality},sampleRate:l,minimumDurationMilliseconds:V(u)?null:u,endpoint:i?.endpoint,triggerMatchType:i?.triggerMatchType,masking:i?.masking,urlTriggers:i?.urlTriggers})})};o(),(a=this.jr)==null||a.call(this),this.jr=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(o)}}onRemoteConfig(e){"sessionRecording"in e?e.sessionRecording!==!1?(this.zr(e),this.Mr=!0,this.startIfEnabledOrStop()):this.Mr=!0:kc.info("skipping remote config with no sessionRecording",e)}log(e,a){var r;a===void 0&&(a="log"),(r=this.Or)!=null&&r.log?this.Or.log(e,a):kc.warn("log called before recorder was ready")}get Nr(){var e,a,r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Kx);return(r==null||(a=r.scriptConfig)==null?void 0:a.script)||"lazy-recorder"}Lr(e){var a,r;if((a=Q.__PosthogExtensions__)==null||!a.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Or||(this.Or=(r=Q.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.Or._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Or.start(e)}onRRwebEmit(e){var a;(a=this.Or)==null||a.onRRwebEmit==null||a.onRRwebEmit(e)}overrideLinkedFlag(){var e,a;this.Or||(a=this._instance.persistence)==null||a.register({$replay_override_linked_flag:!0}),(e=this.Or)==null||e.overrideLinkedFlag()}overrideSampling(){var e,a;this.Or||(a=this._instance.persistence)==null||a.register({$replay_override_sampling:!0}),(e=this.Or)==null||e.overrideSampling()}overrideTrigger(e){var a,r;this.Or||(r=this._instance.persistence)==null||r.register({[e==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(a=this.Or)==null||a.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.Or)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,a){var r;return!((r=this.Or)==null||!r.tryAddCustomEvent(e,a))}},Nc={},S0=()=>{},Js="posthog",gR=!C4&&ua?.indexOf("MSIE")===-1&&ua?.indexOf("Mozilla")===-1,lT=t=>{var e;return j({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:H3(q?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:S0,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,debug:Bt&&vt(Bt?.search)&&Bt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!0,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(T==null||(e=T.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:a=>{var r="Bad HTTP status: "+a.statusCode+" "+a.text;$.error(r)},get_device_id:a=>a,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:f0},error_tracking:{},_onCapture:S0,__preview_eager_load_replay:!1},(a=>({rageclick:!(a&&a>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(a&&a>="2025-05-24")||"history_change",session_recording:a&&a>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:a&&a>="2026-01-30"?"head":"body",internal_or_test_user_hostname:a&&a>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(t))},uT=t=>{var e={};V(t.process_person)||(e.person_profiles=t.process_person),V(t.xhr_headers)||(e.request_headers=t.xhr_headers),V(t.cookie_name)||(e.persistence_name=t.cookie_name),V(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),V(t.store_google)||(e.save_campaign_params=t.store_google),V(t.verbose)||(e.debug=t.verbose);var a=ot({},e,t);return Ce(t.property_blacklist)&&(V(t.property_denylist)?a.property_denylist=t.property_blacklist:Ce(t.property_denylist)?a.property_denylist=[...t.property_blacklist,...t.property_denylist]:$.error("Invalid value for property_denylist config: "+t.property_denylist)),a},_0=class{constructor(){this.__forceAllowLocalhost=!1}get Hr(){return this.__forceAllowLocalhost}set Hr(e){$.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},jh=class t{get decideEndpointWasHit(){var e,a;return(e=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,a;return(e=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new _0,this.Br=!1,this.version=hn.LIB_VERSION,this.qr=new Vc,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=lT(),this.SentryIntegration=jb,this.sentryIntegration=e=>(function(a,r){var n=eR(a,r);return{name:JT,processEvent:o=>n(o)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Wr=!1,this.Gr=null,this.Vr=null,this.Jr=null,this.featureFlags=new t0(this),this.toolbar=new Gb(this),this.scrollManager=new m0(this),this.pageViewManager=new Nh(this),this.surveys=new s0(this),this.conversations=new l0(this),this.logs=new u0(this),this.experiments=new y0(this),this.exceptions=new e0(this),this.rateLimiter=new c0(this),this.requestRouter=new v0(this),this.consent=new qb(this),this.externalIntegrations=new x0(this),this.people={set:(e,a,r)=>{var n=vt(e)?{[e]:a}:e;this.setPersonProperties(n),r?.({})},set_once:(e,a,r)=>{var n=vt(e)?{[e]:a}:e;this.setPersonProperties(void 0,n),r?.({})}},this.on("eventCaptured",(e=>$.info('send "'+e?.event+'"',e)))}init(e,a,r){if(r&&r!==Js){var n,o=(n=Nc[r])!==null&&n!==void 0?n:new t;return o._init(e,a,r),Nc[r]=o,Nc[Js][r]=o,o}return this._init(e,a,r)}_init(e,a,r){var n;if(a===void 0&&(a={}),V(e)||pb(e))return $.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 console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},a.debug=this.Kr(a.debug),this.Yr=a,this.Xr=[],a.person_profiles&&(this.Vr=a.person_profiles),this.set_config(ot({},lT(a.defaults),uT(a),{name:r,token:e})),this.config.on_xhr_error&&$.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=a.disable_compression?void 0:vn.GZipJS;var o=this.Qr();this.persistence=new Pc(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Pc(j({},this.config,{persistence:"sessionStorage"}),o);var i=j({},this.persistence.props),s=j({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zr=new p0((m=>this.ts(m)),this.config.request_queue_config),this.es=new h0(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new Vh(this),this.sessionPropsManager=new qh(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?($.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.rs(l)}),0)):($.info("Initializing extensions synchronously"),this.rs(l)),hn.DEBUG=hn.DEBUG||this.config.debug,hn.DEBUG&&$.info("Starting in debug mode",{this:this,config:a,thisC:j({},this.config),p:i,s}),((n=a.bootstrap)==null?void 0:n.distinctID)!==void 0){var u,c,d=this.config.get_device_id(_o()),f=(u=a.bootstrap)!=null&&u.isIdentifiedID?d:a.bootstrap.distinctID;this.persistence.set_property(mn,(c=a.bootstrap)!=null&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:a.bootstrap.distinctID,$device_id:f})}if(this.ss()){var h,S,x=Object.keys(((h=a.bootstrap)==null?void 0:h.featureFlags)||{}).filter((m=>{var y;return!((y=a.bootstrap)==null||(y=y.featureFlags)==null||!y[m])})).reduce(((m,y)=>{var v;return m[y]=((v=a.bootstrap)==null||(v=v.featureFlags)==null?void 0:v[y])||!1,m}),{}),b=Object.keys(((S=a.bootstrap)==null?void 0:S.featureFlagPayloads)||{}).filter((m=>x[m])).reduce(((m,y)=>{var v,C;return(v=a.bootstrap)!=null&&(v=v.featureFlagPayloads)!=null&&v[y]&&(m[y]=(C=a.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[y]),m}),{});this.featureFlags.receivedFeatureFlags({featureFlags:x,featureFlagPayloads:b})}if(l)this.register_once({distinct_id:yc,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(_o());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(mn,"anonymous")}return ft(T,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),a.segment?s4(this,(()=>this.ns())):this.ns(),Co(this.config._onCapture)&&this.config._onCapture!==S0&&($.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(m=>this.config._onCapture(m.event,m)))),this.config.ip&&$.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}rs(e){var a=performance.now();this.historyAutocapture=new $b(this),this.historyAutocapture.startIfEnabled();var r=[];r.push((()=>{new Wb(this).startIfEnabledOrStop()})),r.push((()=>{var n;this.siteApps=new g0(this),(n=this.siteApps)==null||n.init()})),e||r.push((()=>{this.sessionRecording=new $h(this),this.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||r.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),r.push((()=>{this.autocapture=new Fb(this),this.autocapture.startIfEnabled()})),r.push((()=>{this.surveys.loadIfEnabled()})),r.push((()=>{this.logs.loadIfEnabled()})),r.push((()=>{this.conversations.loadIfEnabled()})),r.push((()=>{this.productTours=new a0(this),this.productTours.loadIfEnabled()})),r.push((()=>{this.heatmaps=new Xb(this),this.heatmaps.startIfEnabled()})),r.push((()=>{this.webVitalsAutocapture=new Zb(this)})),r.push((()=>{this.exceptionObserver=new Vb(this),this.exceptionObserver.startIfEnabledOrStop()})),r.push((()=>{this.deadClicksAutocapture=new Ph(this,i4),this.deadClicksAutocapture.startIfEnabled()})),r.push((()=>{if(this.os){var n=this.os;this.os=void 0,this.yi(n)}})),this.ls(r,a)}ls(e,a){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-a>=30&&e.length>0)return void setTimeout((()=>{this.ls(e,a)}),0);var r=e.shift();if(r)try{r()}catch(o){$.error("Error initializing extension:",o)}}var n=Math.round(performance.now()-a);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:n}),this.config.__preview_deferred_init_extensions&&$.info("PostHog extensions initialized ("+n+"ms)")}yi(e){var a,r,n,o,i,s,l,u,c;if(!q||!q.body)return $.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.yi(e)}),500);this.config.__preview_deferred_init_extensions&&(this.os=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=he(e.supportedCompression,vn.GZipJS)?vn.GZipJS:he(e.supportedCompression,vn.Base64)?vn.Base64:void 0),(a=e.analytics)!=null&&a.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Vr?this.Vr:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(e),(n=this.sessionRecording)==null||n.onRemoteConfig(e),(o=this.autocapture)==null||o.onRemoteConfig(e),(i=this.heatmaps)==null||i.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.logs.onRemoteConfig(e),this.conversations.onRemoteConfig(e),(s=this.productTours)==null||s.onRemoteConfig(e),(l=this.webVitalsAutocapture)==null||l.onRemoteConfig(e),(u=this.exceptionObserver)==null||u.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(e)}ns(){try{this.config.loaded(this)}catch(r){$.critical("`loaded` function failed",r)}if(this.us(),this.config.internal_or_test_user_hostname&&Bt!=null&&Bt.hostname){var e=Bt.hostname,a=this.config.internal_or_test_user_hostname;(typeof a=="string"?e===a:a.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.hs()}),1),new d0(this).load(),this.featureFlags.flags()}us(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Zr)==null||e.enable())}_dom_loaded(){this.is_capturing()&&wo(this.__request_queue,(e=>this.ts(e))),this.__request_queue=[],this.us()}_handle_unload(){var e,a;this.surveys.handlePageUnload(),this.config.request_batching?(this.ds()&&this.capture("$pageleave"),(e=this.Zr)==null||e.unload(),(a=this.es)==null||a.unload()):this.ds()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(gR?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Uh(e.url,{ip:this.config.ip?1:0}),e.headers=j({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(a=>{var r,n,o,i=j({},a);i.timeout=i.timeout||6e4,i.url=Uh(i.url,{_:new Date().getTime().toString(),ver:hn.LIB_VERSION,compression:i.compression});var s=(r=i.transport)!==null&&r!==void 0?r:"fetch",l=Ch.filter((c=>!i.disableTransport||!c.transport||!i.disableTransport.includes(c.transport))),u=(n=(o=BT(l,(c=>c.transport===s)))==null?void 0:o.method)!==null&&n!==void 0?n:l[0].method;if(!u)throw new Error("No available transport method");u(i)})(j({},e,{callback:a=>{var r,n;this.rateLimiter.checkForLimiting(a),a.statusCode>=400&&((r=(n=this.config).on_request_error)==null||r.call(n,a)),e.callback==null||e.callback(a)}}))))}ts(e){this.es?this.es.retriableRequest(e):this._send_request(e)}_execute_array(e){var a,r=[],n=[],o=[];wo(e,(s=>{s&&(a=s[0],Ce(a)?o.push(s):Co(s)?s.call(this):Ce(s)&&a==="alias"?r.push(s):Ce(s)&&a.indexOf("capture")!==-1&&Co(this[a])?o.push(s):n.push(s))}));var i=function(s,l){wo(s,(function(u){if(Ce(u[0])){var c=l;Be(u,(function(d){c=c[d[0]].apply(c,d.slice(1))}))}else this[u[0]].apply(this,u.slice(1))}),l)};i(r,this),i(n,this),i(o,this)}ss(){var e,a;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((a=this.config.bootstrap)==null?void 0:a.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,a,r){var n;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zr){if(this.is_capturing())if(!V(e)&&vt(e)){var o=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(o&&!this.config.__preview_capture_bot_pageviews)){var i=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(i==null||!i.isRateLimited){a!=null&&a.$current_url&&!vt(a?.$current_url)&&($.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),a==null||delete a.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var s=new Date,l=r?.timestamp||s,u=_o(),c={uuid:u,event:e,properties:this.calculateEventProperties(e,a||{},l,u)};e==="$pageview"&&this.config.__preview_capture_bot_pageviews&&o&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),i&&(c.properties.$lib_rate_limit_remaining_tokens=i.remainingTokens),r?.$set&&(c.$set=r?.$set);var d,f=e!=="$groupidentify",h=this.vs(r?.$set_once,f);if(h&&(c.$set_once=h),(c=N3(c,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,V(r?.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=s),e===Oc.DISMISSED||e===Oc.SENT){var S=a?.[lb.SURVEY_ID],x=a?.[lb.SURVEY_ITERATION];d={id:S,current_iteration:x},localStorage.getItem(oT(d))||localStorage.setItem(oT(d),"true"),c.$set=j({},c.$set,{[I4({id:S,current_iteration:x},e===Oc.SENT?"responded":"dismissed")]:!0})}else e===Oc.SHOWN&&(c.$set=j({},c.$set,{[lb.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));var b=j({},c.properties.$set,c.$set);if(tl(b)||this.setPersonPropertiesForFlags(b),!ge(this.config.before_send)){var g=this.cs(c);if(!g)return;c=g}this.qr.emit("eventCaptured",c);var m={method:"POST",url:(n=r?._url)!==null&&n!==void 0?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.ts(m):this.Zr.enqueue(m),c}$.critical("This capture call is ignored due to client rate limiting.")}}else $.error("No event name provided to posthog.capture")}else $.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(a=>e(a.event,a)))}calculateEventProperties(e,a,r,n,o){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return a;var i=o?void 0:this.persistence.remove_event_timer(e),s=j({},a);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(s.$cookieless_mode=!0),e==="$snapshot"){var l=j({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=l.distinct_id,(!vt(s.distinct_id)&&!bn(s.distinct_id)||pb(s.distinct_id))&&$.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,c=p4(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(o,r.getTime());s.$session_id=d,s.$window_id=f}this.sessionPropsManager&&ot(s,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&ot(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=(h=this.es)==null?void 0:h.length}catch(g){s.$sdk_debug_error_capturing_properties=String(g)}if(this.requestRouter.region===Dc.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),u=e!=="$pageview"||o?e!=="$pageleave"||o?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,n),s=ot(s,u),e==="$pageview"&&q&&(s.title=q.title),!V(i)){var S=r.getTime()-i;s.$duration=parseFloat((S/1e3).toFixed(3))}ua&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=ot({},c,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),Ce(this.config.property_denylist)?Be(this.config.property_denylist,(function(g){delete s[g]})):$.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&($.error("sanitize_properties is deprecated. Use before_send instead"),s=x(s,e));var b=this.fs();return s.$process_person_profile=b,b&&!o&&this.ps("_calculate_event_properties"),s}vs(e,a){var r;if(a===void 0&&(a=!0),!this.persistence||!this.fs()||this.Br)return e;var n=this.persistence.get_initial_props(),o=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),i=ot({},n,o||{},e||{}),s=this.config.sanitize_properties;return s&&($.error("sanitize_properties is deprecated. Use before_send instead"),i=s(i,"$set_once")),a&&(this.Br=!0),tl(i)?void 0:i}register(e,a){var r;(r=this.persistence)==null||r.register(e,a)}register_once(e,a,r){var n;(n=this.persistence)==null||n.register_once(e,a,r)}register_for_session(e){var a;(a=this.sessionPersistence)==null||a.register(e)}unregister(e){var a;(a=this.persistence)==null||a.unregister(e)}unregister_for_session(e){var a;(a=this.sessionPersistence)==null||a.unregister(e)}gs(e,a){this.register({[e]:a})}getFeatureFlag(e,a){return this.featureFlags.getFeatureFlag(e,a)}getFeatureFlagPayload(e){return this.featureFlags.getFeatureFlagPayload(e)}getFeatureFlagResult(e,a){return this.featureFlags.getFeatureFlagResult(e,a)}isFeatureEnabled(e,a){return this.featureFlags.isFeatureEnabled(e,a)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateFlags(e,a,r){var n=r!=null&&r.merge?this.featureFlags.getFlagVariants():{},o=r!=null&&r.merge?this.featureFlags.getFlagPayloads():{},i=j({},n,e),s=j({},o,a),l={};for(var[u,c]of Object.entries(i)){var d=typeof c=="string";l[u]={key:u,enabled:!!d||!!c,variant:d?c:void 0,reason:void 0,metadata:V(s?.[u])?void 0:{id:0,version:void 0,description:void 0,payload:s[u]}}}this.featureFlags.receivedFeatureFlags({flags:l})}updateEarlyAccessFeatureEnrollment(e,a,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,a,r)}getEarlyAccessFeatures(e,a,r){return a===void 0&&(a=!1),this.featureFlags.getEarlyAccessFeatures(e,a,r)}on(e,a){return this.qr.on(e,a)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var a,r;return(a=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&a!==void 0?a:()=>{}}getSurveys(e,a){a===void 0&&(a=!1),this.surveys.getSurveys(e,a)}getActiveMatchingSurveys(e,a){a===void 0&&(a=!1),this.surveys.getActiveMatchingSurveys(e,a)}renderSurvey(e,a){this.surveys.renderSurvey(e,a)}displaySurvey(e,a){a===void 0&&(a=E4),this.surveys.displaySurvey(e,a)}cancelPendingSurvey(e){this.surveys.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,a){return a===void 0&&(a=!1),this.surveys.canRenderSurveyAsync(e,a)}identify(e,a,r){if(!this.__loaded||!this.persistence)return $.uninitializedWarning("posthog.identify");if(bn(e)&&(e=e.toString(),$.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))$.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==yc){if(this.ps("posthog.identify")){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var o=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==n&&e!==this.get_property(Ac)&&(this.unregister(Ac),this.register({distinct_id:e}));var i=(this.persistence.get_property(mn)||"anonymous")==="anonymous";e!==n&&i?(this.persistence.set_property(mn,"identified"),this.setPersonPropertiesForFlags(j({},r||{},a||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:a||{},$set_once:r||{}}),this.Jr=JE(e,a,r),this.featureFlags.setAnonymousDistinctId(n)):(a||r)&&this.setPersonProperties(a,r),e!==n&&(this.reloadFeatureFlags(),this.unregister(Ah))}}else $.critical('The string "'+yc+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else $.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,a){if((e||a)&&this.ps("posthog.setPersonProperties")){var r=JE(this.get_distinct_id(),e,a);this.Jr!==r?(this.setPersonPropertiesForFlags(j({},a||{},e||{})),this.capture("$set",{$set:e||{},$set_once:a||{}}),this.Jr=r):$.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,a,r){if(e&&a){var n=this.getGroups();n[e]!==a&&this.resetGroupPropertiesForFlags(e),this.register({$groups:j({},n,{[e]:a})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:a,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),n[e]===a||r||this.reloadFeatureFlags()}else $.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,a){a===void 0&&(a=!0),this.featureFlags.setPersonPropertiesForFlags(e,a)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,a){a===void 0&&(a=!0),this.ps("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,a)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var a,r,n,o;if($.info("reset"),!this.__loaded)return $.uninitializedWarning("posthog.reset");var i=this.get_property("$device_id");if(this.consent.reset(),(a=this.persistence)==null||a.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(n=this.persistence)==null||n.set_property(mn,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Jr=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:yc,$device_id:null},"");else{var s=this.config.get_device_id(_o());this.register_once({distinct_id:s,$device_id:e?s:i},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,a;return(e=(a=this.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:a,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+a);if(e!=null&&e.withTimestamp&&r){var o,i=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!r)return n;n+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-i,0)}return n}alias(e,a){return e===this.get_property(PT)?($.critical("Attempting to create alias for existing People user - aborting."),-2):this.ps("posthog.alias")?(V(a)&&(a=this.get_distinct_id()),e!==a?(this.gs(Ac,e),this.capture("$create_alias",{alias:e,distinct_id:a})):($.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var a=j({},this.config);if(gt(e)){var r,n,o,i,s,l,u;ot(this.config,uT(e));var c=this.Qr();(r=this.persistence)==null||r.update_config(this.config,a,c),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Pc(j({},this.config,{persistence:"sessionStorage"}),c);var d=this.Kr(this.config.debug);xn(d)&&(this.config.debug=d),xn(this.config.debug)&&(this.config.debug?(hn.DEBUG=!0,Ke.H()&&Ke.G("ph_debug","true"),$.info("set_config",{config:e,oldConfig:a,newConfig:j({},this.config)})):(hn.DEBUG=!1,Ke.H()&&Ke.V("ph_debug"))),(n=this.exceptionObserver)==null||n.onConfigChange(),(o=this.sessionRecording)==null||o.startIfEnabledOrStop(),(i=this.autocapture)==null||i.startIfEnabled(),(s=this.heatmaps)==null||s.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this._s(),(u=this.externalIntegrations)==null||u.startIfEnabledOrStop()}}startSessionRecording(e){var a=e===!0,r={sampling:a||!(e==null||!e.sampling),linked_flag:a||!(e==null||!e.linked_flag),url_trigger:a||!(e==null||!e.url_trigger),event_trigger:a||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var n,o,i,s,l;(n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),r.sampling&&((o=this.sessionRecording)==null||o.overrideSampling()),r.linked_flag&&((i=this.sessionRecording)==null||i.overrideLinkedFlag()),r.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,a){var r=new Error("PostHog syntheticException"),n=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(j({},n,a))}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var a;return(a=this.persistence)==null?void 0:a.props[e]}getSessionProperty(e){var a;return(a=this.sessionPersistence)==null?void 0:a.props[e]}toString(){var e,a=(e=this.config.name)!==null&&e!==void 0?e:Js;return a!==Js&&(a=Js+"."+a),a}_isIdentified(){var e,a;return((e=this.persistence)==null?void 0:e.get_property(mn))==="identified"||((a=this.sessionPersistence)==null?void 0:a.get_property(mn))==="identified"}fs(){var e,a;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&tl(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Ac])&&((a=this.persistence)==null||(a=a.props)==null||!a[Th]))}ds(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.fs()||this.ps("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.ps("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}ps(e){return this.config.person_profiles==="never"?($.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.gs(Th,!0),!0)}Qr(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),a=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!a}_s(){var e,a,r,n,o=this.Qr();return((e=this.persistence)==null?void 0:e.ki)!==o&&((r=this.persistence)==null||r.set_disabled(o)),((a=this.sessionPersistence)==null?void 0:a.ki)!==o&&((n=this.sessionPersistence)==null||n.set_disabled(o)),o}opt_in_capturing(e){var a;if(this.config.cookieless_mode!=="always"){var r,n,o;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=new Vh(this),this.pageViewManager=new Nh(this),this.persistence&&(this.sessionPropsManager=new qh(this,this.sessionManager,this.persistence)),this.sessionRecording=new $h(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this._s(),this.us(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(V(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((o=e?.captureEventName)!==null&&o!==void 0?o:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.hs()}else $.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,a,r;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._s(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:yc,$device_id:null}),(e=this.sessionManager)==null||e.destroy(),(a=this.pageViewManager)==null||a.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.hs())):$.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===gn.GRANTED?"granted":e===gn.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this._s()}_is_bot(){return ka?mR(ka,this.config.custom_blocked_useragents):void 0}hs(){q&&(q.visibilityState==="visible"?this.Wr||(this.Wr=!0,this.capture("$pageview",{title:q.title},{send_instantly:!0}),this.Gr&&(q.removeEventListener("visibilitychange",this.Gr),this.Gr=null)):this.Gr||(this.Gr=this.hs.bind(this),ft(q,"visibilitychange",this.Gr)))}debug(e){e===!1?(T?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(T?.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)`."),this.set_config({debug:!0}))}M(){var e,a,r,n,o,i,s,l=this.Yr||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?($.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",n=!1,o=$,i=(a="advanced_disable_flags")in(e=l)&&!ge(e[a]),s=r in e&&!ge(e[r]),i?e[a]:s?(o&&o.warn("Config field '"+r+"' is deprecated. Please use '"+a+"' instead. The old field will be removed in a future major version."),e[r]):n)}cs(e){if(ge(this.config.before_send))return e;var a=Ce(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var n of a){if(r=n(r),ge(r)){var o="Event '"+e.event+"' was rejected in beforeSend function";return c3(e.event)?$.warn(o+". This can cause unexpected behavior."):$.info(o),null}r.properties&&!tl(r.properties)||$.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return(e=this.pageViewManager.Kt)==null?void 0:e.pageViewId}captureTraceFeedback(e,a){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:a})}captureTraceMetric(e,a,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:a,$ai_metric_value:String(r)})}Kr(e){var a=xn(e)&&!e,r=Ke.H()&&Ke.q("ph_debug")==="true";return!a&&(!!r||e)}};(function(t,e){for(var a=0;a<e.length;a++)t.prototype[e[a]]=P3(t.prototype[e[a]])})(jh,["identify"]);var cT;var vR=(cT=Nc[Js]=new jh,(function(){function t(){t.done||(t.done=!0,gR=!1,Be(Nc,(function(e){e._dom_loaded()})))}q!=null&&q.addEventListener?q.readyState==="complete"?t():ft(q,"DOMContentLoaded",t,{capture:!1}):T&&$.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),cT);var O0=class{constructor(e={}){this.options=e;B(this,"client");B(this,"featureFlagsCallback");B(this,"captureCallback");B(this,"rrwebCallback");if(this.client=e.client,this.featureFlagsCallback=e.onFeatureFlagsLoaded,this.captureCallback=e.onCapture,this.rrwebCallback=e.onRRWebEvent,!this.client&&e.consent&&e.requireExplicitConsent&&typeof window<"u"&&e.apiKey){let a=e.consent;a.getStatus()==="granted"&&this.initPostHog(),a.subscribe(n=>{n==="granted"?this.client?this.client.opt_in_capturing():this.initPostHog():n==="denied"&&this.client&&this.client.opt_out_capturing()});return}!this.client&&typeof window<"u"&&e.apiKey&&this.initPostHog()}initPostHog(){let e=this.options;if(!e.apiKey)return;let a=e.enableFeatureFlags??!0,r=`syntro_${e.apiKey.slice(-6)||"sdk"}`,n={api_host:e.apiHost??"https://telemetry.syntrologie.com",advanced_disable_feature_flags:!a,advanced_disable_feature_flags_on_first_load:!a,autocapture:e.autocapture??!0,capture_pageview:e.capturePageview??"history_change",capture_pageleave:e.capturePageleave??!0,disable_session_recording:!(e.sessionRecording??!0),opt_out_useragent_filter:!0,session_recording:{recordCrossDomainIFrames:!0},capture_performance:!0,enable_recording_console_log:!0},o=vR.init(e.apiKey,n,r);if(o&&(this.client=o),this.captureCallback&&this.client&&this.client.on("eventCaptured",(...i)=>{let s=i[0],l=typeof s=="string"?s:s?.event,u=typeof s=="string"?void 0:s?.properties;typeof l=="string"&&this.captureCallback?.(l,u)}),a&&this.featureFlagsCallback&&this.client){this.client.onFeatureFlags(()=>{let s=this.getAllFeatureFlags();s&&this.featureFlagsCallback&&this.featureFlagsCallback(s)});let i=this.getAllFeatureFlags();i&&Object.keys(i).length>0&&this.featureFlagsCallback(i)}this.rrwebCallback&&this.client&&this.setupRRWebIntercept()}setupRRWebIntercept(e=30){let a=this.client?.sessionRecording;if(!a){e>0&&setTimeout(()=>this.setupRRWebIntercept(e-1),500);return}let r=null,n=a;for(let i of Object.getOwnPropertyNames(n)){let s=n[i];if(s&&typeof s=="object"&&typeof s.onRRwebEmit=="function"&&typeof s.start=="function"&&s!==a){r=s;break}}if(!r){e>0&&setTimeout(()=>this.setupRRWebIntercept(e-1),500);return}let o=r.onRRwebEmit.bind(r);r.onRRwebEmit=i=>{this.rrwebCallback?.({kind:"rrweb",...i}),o(i)},typeof window<"u"&&(window.__RRWEB_INTERCEPT_READY__=!0)}getAllFeatureFlags(){return this.client?.featureFlags?.getFlagVariants()}getSegmentFlags(){let e=this.getAllFeatureFlags();if(!e)return{};let a={};for(let[r,n]of Object.entries(e))r.startsWith("in_segment_")&&(a[r]=n===!0);return a}identify(e,a){this.client?.identify(e,a)}alias(e,a){this.client?.alias(e,a)}track(e,a){this.client?.capture(e,a)}trackCanvasOpened(e){this.track("shadow_canvas_opened",{surface:e})}trackCanvasClosed(e){this.track("shadow_canvas_closed",{surface:e})}trackRectangleViewed(e,a){this.track("shadow_canvas_rectangle_viewed",{rectangleId:e,surface:a})}trackAction(e,a,r){this.track("shadow_canvas_action",{action:e,rectangleId:a,surface:r})}register(e){this.client?.register?.(e)}getSessionId(){return this.client?.get_session_id?.()}startSessionRecording(){this.client?.startSessionRecording?.()}trackExperiment(e,a,r){let n=`$experiment_${e}`;this.register({[n]:r??`variation_${a}`,[`${n}_id`]:a}),this.track("$experiment_started",{$experiment_key:e,$experiment_variation_id:a,$experiment_variation_name:r??`variation_${a}`})}setPersonProperties(e){this.client?.capture("$set",{$set:e})}setPersonPropertiesOnce(e){this.client?.capture("$set",{$set_once:e})}getDistinctId(){return this.client?.get_distinct_id?.()}};function Xh(t={}){return new O0(t)}var cl=class{constructor(e,a){B(this,"telemetry");B(this,"variantId");B(this,"seenSet",new Set);B(this,"triggeredSet",new Set);this.telemetry=e,this.variantId=a}trackServed(e,a){this.telemetry.track?.("syntro_config_served",{variant_id:this.variantId,tiles:e,actions:a})}trackSeen(e,a){this.seenSet.has(e)||(this.seenSet.add(e),this.telemetry.track?.("syntro_intervention_seen",{variant_id:this.variantId,intervention_id:e,intervention_kind:a}))}trackTriggered(e,a){this.triggeredSet.has(e)||(this.triggeredSet.add(e),this.telemetry.track?.("syntro_intervention_triggered",{variant_id:this.variantId,intervention_id:e,intervention_kind:a}))}trackInteracted(e,a,r){this.telemetry.track?.("syntro_intervention_interacted",{variant_id:this.variantId,intervention_id:e,intervention_kind:a,interaction_type:r})}resetPage(){this.seenSet.clear(),this.triggeredSet.clear()}};var D0=async(t,e)=>{let a=[];if(e.applyAction)for(let r of t.actions){let n=await e.applyAction(r);a.push(n)}return{cleanup:async()=>{for(let r=a.length-1;r>=0;r--)try{await a[r].revert()}catch{}}}},B0=async(t,e)=>{let a=[];if(e.applyAction){let r=t.actions.map(n=>e.applyAction(n));if(t.waitFor==="any"){let n=await Promise.race(r);a.push(n);let o=await Promise.allSettled(r);for(let i of o)i.status==="fulfilled"&&i.value!==n&&a.push(i.value)}else{let n=await Promise.all(r);a.push(...n)}}return{cleanup:async()=>{for(let r of a)try{await r.revert()}catch{}}}},P0=async(t,e)=>{let a,r,n=!1,o={cleanup:()=>{n=!0,r&&clearTimeout(r),a&&a()}};return t.event&&e.subscribeEvent?await new Promise(i=>{a=e.subscribeEvent(t.event,()=>{n||i()}),t.durationMs!==void 0&&(r=setTimeout(()=>{n||i()},t.durationMs))}):t.durationMs!==void 0&&await new Promise(i=>{r=setTimeout(()=>{n||i()},t.durationMs)}),o};var Wc=class{constructor(){B(this,"executors",new Map);for(let{kind:e,executor:a}of Cy)this.registerCore(e,a);for(let{kind:e,executor:a}of Dy)this.registerCore(e,a);this.registerCore("core:mountWidget",async()=>{throw new Error("core:mountWidget must be handled by ActionEngine")}),this.registerCore("core:sequence",D0),this.registerCore("core:parallel",B0),this.registerCore("core:wait",P0)}registerCore(e,a,r){this.executors.set(e,{kind:e,executor:a,schema:r,source:"core",isBuiltIn:!0})}register(e,a,r,n="custom",o=!1){if(this.executors.has(e)){if(this.executors.get(e).isBuiltIn)return;console.warn(`[ExecutorRegistry] Overriding executor for kind: ${e} (source: ${n})`)}console.log(`[ExecutorRegistry] Registered executor: ${e} (source: ${n})`),this.executors.set(e,{kind:e,executor:a,schema:r,source:n,isBuiltIn:o})}unregister(e){let a=this.executors.get(e);return a?a.isBuiltIn?(console.warn(`[ExecutorRegistry] Cannot unregister built-in executor: ${e}`),!1):(this.executors.delete(e),!0):!1}unregisterBySource(e){for(let[a,r]of this.executors.entries())r.source===e&&this.executors.delete(a)}get(e){return this.executors.get(e)?.executor}getRegistration(e){return this.executors.get(e)}has(e){return this.executors.has(e)}validate(e){let a=[];if(!e||typeof e!="object")return a.push({code:"INVALID_ACTION",message:"Action must be an object"}),{valid:!1,errors:a,warnings:[]};let{kind:r}=e;if(!r||typeof r!="string")return a.push({code:"MISSING_KIND",message:"Action must have a 'kind' property"}),{valid:!1,errors:a,warnings:[]};let n=this.executors.get(r);if(!n)return a.push({code:"UNKNOWN_KIND",message:`Unknown action kind: ${r}`,field:"kind"}),{valid:!1,errors:a,warnings:[]};if(n.schema){let o=n.schema.safeParse(e);if(!o.success){for(let i of o.error.issues)a.push({code:"SCHEMA_VALIDATION_ERROR",message:i.message,field:i.path.join(".")});return{valid:!1,errors:a,warnings:[]}}}return{valid:!0,errors:[],warnings:[]}}list(){return Array.from(this.executors.keys())}listRegistrations(){return Array.from(this.executors.values())}getBuiltInKinds(){return Array.from(this.executors.entries()).filter(([,e])=>e.isBuiltIn).map(([e])=>e)}getCustomKinds(){return Array.from(this.executors.entries()).filter(([,e])=>!e.isBuiltIn).map(([e])=>e)}},Tr=new Wc;function yR(t){return Tr.get(t)}function Kh(t){return Tr.has(t)}function N0(t,e,a){!t.content||typeof t.content!="string"?e.push({code:"MISSING_CONTENT",message:"Badge action requires 'content' property",field:"content"}):t.content.length>100&&a.push({code:"LONG_BADGE_CONTENT",message:"Badge content is quite long",suggestion:"Keep badge content short (under 100 characters)"})}function F0(t,e,a){if(!t.content||typeof t.content!="object"){e.push({code:"MISSING_CONTENT",message:"Tooltip action requires 'content' object",field:"content"});return}(!t.content.body||typeof t.content.body!="string")&&e.push({code:"MISSING_BODY",message:"Tooltip content requires 'body' property",field:"content.body"})}function H0(t,e,a){!t.html||typeof t.html!="string"?e.push({code:"MISSING_HTML",message:"insertHtml action requires 'html' property",field:"html"}):t.html.length>Yh&&e.push({code:"HTML_TOO_LONG",message:`HTML content exceeds maximum length of ${Yh}`,field:"html"});let r=["before","after","prepend","append","replace"];(!t.position||!r.includes(t.position))&&e.push({code:"INVALID_POSITION",message:`Position must be one of: ${r.join(", ")}`,field:"position"})}function U0(t,e,a){(t.text===void 0||t.text===null)&&e.push({code:"MISSING_TEXT",message:"setText action requires 'text' property",field:"text"})}function z0(t,e,a){!t.attr||typeof t.attr!="string"?e.push({code:"MISSING_ATTR",message:"setAttr action requires 'attr' property",field:"attr"}):(Y0.has(t.attr.toLowerCase())||t.attr.toLowerCase().startsWith("on"))&&e.push({code:"DANGEROUS_ATTR",message:`Event handler attributes are not allowed: ${t.attr}`,field:"attr"}),(t.value===void 0||t.value===null)&&e.push({code:"MISSING_VALUE",message:"setAttr action requires 'value' property",field:"value"})}function q0(t,e,a){!t.className||typeof t.className!="string"?e.push({code:"MISSING_CLASS_NAME",message:"Class action requires 'className' property",field:"className"}):/^[a-zA-Z_-][a-zA-Z0-9_-]*$/.test(t.className)||a.push({code:"INVALID_CLASS_NAME",message:"Class name contains unusual characters",suggestion:"Use alphanumeric characters, hyphens, and underscores"})}function V0(t,e,a){if(!t.styles||typeof t.styles!="object")e.push({code:"MISSING_STYLES",message:"setStyle action requires 'styles' object",field:"styles"});else{let r=Object.keys(t.styles).length;r>Qh&&e.push({code:"TOO_MANY_STYLES",message:`Too many styles (${r}). Maximum is ${Qh}`,field:"styles"});for(let[n,o]of Object.entries(t.styles))typeof o=="string"&&o.includes("expression(")&&e.push({code:"DANGEROUS_STYLE",message:`Style expressions are not allowed: ${n}`,field:`styles.${n}`})}}function $0(t,e,a){(!t.slot||typeof t.slot!="string")&&e.push({code:"MISSING_SLOT",message:"mountWidget action requires 'slot' property",field:"slot"}),!t.widget||typeof t.widget!="object"?e.push({code:"MISSING_WIDGET",message:"mountWidget action requires 'widget' object",field:"widget"}):(!t.widget.widgetId||typeof t.widget.widgetId!="string")&&e.push({code:"MISSING_WIDGET_ID",message:"Widget must have a 'widgetId' property",field:"widget.widgetId"})}function j0(t,e,a){t.durationMs===void 0&&!t.event&&e.push({code:"MISSING_WAIT_CONFIG",message:"wait action requires either 'durationMs' or 'event' property"}),t.durationMs!==void 0&&t.durationMs<0&&e.push({code:"INVALID_DURATION",message:"durationMs must be a positive number",field:"durationMs"}),t.event!==void 0&&typeof t.event!="string"&&e.push({code:"INVALID_EVENT",message:"event must be a string",field:"event"})}function G0(t,e,a){if(!t.actions||!Array.isArray(t.actions)){e.push({code:"MISSING_ACTIONS",message:"sequence action requires 'actions' array",field:"actions"});return}t.actions.length===0&&a.push({code:"EMPTY_SEQUENCE",message:"sequence has no actions",suggestion:"Add at least one action to the sequence"});for(let r=0;r<t.actions.length;r++){let n=dr(t.actions[r]);for(let o of n.errors)e.push({...o,field:`actions[${r}]${o.field?`.${o.field}`:""}`});for(let o of n.warnings)a.push(o)}}function W0(t,e,a){if(!t.actions||!Array.isArray(t.actions)){e.push({code:"MISSING_ACTIONS",message:"parallel action requires 'actions' array",field:"actions"});return}t.actions.length===0&&a.push({code:"EMPTY_PARALLEL",message:"parallel has no actions",suggestion:"Add at least one action to the parallel group"}),t.waitFor&&!["all","any"].includes(t.waitFor)&&e.push({code:"INVALID_WAIT_FOR",message:"waitFor must be 'all' or 'any'",field:"waitFor"});for(let r=0;r<t.actions.length;r++){let n=dr(t.actions[r]);for(let o of n.errors)e.push({...o,field:`actions[${r}]${o.field?`.${o.field}`:""}`});for(let o of n.warnings)a.push(o)}}function Z0(t,e,a){if(!t.url||typeof t.url!="string")e.push({code:"MISSING_URL",message:"navigate action requires 'url' property",field:"url"});else{let r=t.url.trim().toLowerCase();r.startsWith("javascript:")&&e.push({code:"DANGEROUS_URL",message:"javascript: URLs are not allowed",field:"url"}),r.startsWith("data:")&&a.push({code:"DATA_URL",message:"data: URLs may have limited support",suggestion:"Consider using a regular URL instead"})}}function X0(t,e,a){if(!t.content||typeof t.content!="object"){e.push({code:"MISSING_CONTENT",message:"Modal action requires 'content' object",field:"content"});return}if((!t.content.body||typeof t.content.body!="string")&&e.push({code:"MISSING_BODY",message:"Modal content requires 'body' property",field:"content.body"}),t.size&&!["sm","md","lg"].includes(t.size)&&e.push({code:"INVALID_SIZE",message:"Modal size must be 'sm', 'md', or 'lg'",field:"size"}),t.ctaButtons)if(!Array.isArray(t.ctaButtons))e.push({code:"INVALID_CTA_BUTTONS",message:"ctaButtons must be an array",field:"ctaButtons"});else for(let r=0;r<t.ctaButtons.length;r++){let n=t.ctaButtons[r];(!n.label||typeof n.label!="string")&&e.push({code:"MISSING_BUTTON_LABEL",message:`CTA button at index ${r} requires 'label' property`,field:`ctaButtons[${r}].label`}),(!n.actionId||typeof n.actionId!="string")&&e.push({code:"MISSING_BUTTON_ACTION_ID",message:`CTA button at index ${r} requires 'actionId' property`,field:`ctaButtons[${r}].actionId`})}}function K0(t,e,a){if((!t.tourId||typeof t.tourId!="string")&&e.push({code:"MISSING_TOUR_ID",message:"Tour action requires 'tourId' property",field:"tourId"}),!t.steps||!Array.isArray(t.steps)){e.push({code:"MISSING_STEPS",message:"Tour action requires 'steps' array",field:"steps"});return}t.steps.length===0&&e.push({code:"EMPTY_STEPS",message:"Tour must have at least one step",field:"steps"});let r=new Set;for(let n=0;n<t.steps.length;n++){let o=t.steps[n];if(!o.id||typeof o.id!="string"?e.push({code:"MISSING_STEP_ID",message:`Step at index ${n} requires 'id' property`,field:`steps[${n}].id`}):(r.has(o.id)&&e.push({code:"DUPLICATE_STEP_ID",message:`Duplicate step ID: ${o.id}`,field:`steps[${n}].id`}),r.add(o.id)),!o.action)e.push({code:"MISSING_STEP_ACTION",message:`Step at index ${n} requires 'action' property`,field:`steps[${n}].action`});else{let i=dr(o.action);for(let s of i.errors)e.push({...s,field:`steps[${n}].action${s.field?`.${s.field}`:""}`});for(let s of i.warnings)a.push(s)}if(o.onAction)for(let[i,s]of Object.entries(o.onAction))s!=="end"&&!t.steps.some(l=>l.id===s)&&a.push({code:"UNKNOWN_TARGET_STEP",message:`Step "${o.id}" references unknown target step: ${s}`,suggestion:`Make sure step "${s}" exists in the tour`})}}var Y0=new Set(["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit","onkeydown","onkeyup","onkeypress"]),Yh=5e4,Qh=50;function dr(t){let e=[],a=[];if(!t||typeof t!="object")return e.push({code:"INVALID_ACTION",message:"Action must be an object"}),{valid:!1,errors:e,warnings:a};let{kind:r}=t;if(!r||typeof r!="string")return e.push({code:"MISSING_KIND",message:"Action must have a 'kind' property"}),{valid:!1,errors:e,warnings:a};if(!Kh(r)&&r!=="core:mountWidget"){let n=Tr.list();return console.error(`[ActionValidation] Unknown action kind: "${r}". Registered kinds (${n.length}): [${n.join(", ")}]. This usually means the app that provides "${r}" hasn't been activated yet, or the executor was never registered in ExecutorRegistry.`),e.push({code:"UNKNOWN_KIND",message:`Unknown action kind: ${r}`,field:"kind"}),{valid:!1,errors:e,warnings:a}}switch(r){case"overlays:highlight":case"overlays:pulse":case"navigation:scrollTo":Sn(t,e,a);break;case"overlays:badge":Sn(t,e,a),N0(t,e,a);break;case"overlays:tooltip":Sn(t,e,a),F0(t,e,a);break;case"overlays:modal":X0(t,e,a);break;case"content:insertHtml":Sn(t,e,a),H0(t,e,a);break;case"content:setText":Sn(t,e,a),U0(t,e,a);break;case"content:setAttr":Sn(t,e,a),z0(t,e,a);break;case"content:addClass":case"content:removeClass":Sn(t,e,a),q0(t,e,a);break;case"content:setStyle":Sn(t,e,a),V0(t,e,a);break;case"core:mountWidget":$0(t,e,a);break;case"core:wait":j0(t,e,a);break;case"core:sequence":G0(t,e,a);break;case"core:parallel":W0(t,e,a);break;case"overlays:tour":K0(t,e,a);break;case"navigation:navigate":Z0(t,e,a);break}return{valid:e.length===0,errors:e,warnings:a}}function Sn(t,e,a){let r=t.anchorId;if(!r||typeof r!="object"){e.push({code:"MISSING_ANCHOR_ID",message:"Action requires an 'anchorId' object with a 'selector' string",field:"anchorId"});return}if(!r.selector||typeof r.selector!="string"?e.push({code:"MISSING_ANCHOR_SELECTOR",message:"anchorId requires a 'selector' string",field:"anchorId.selector"}):r.selector.length>200&&a.push({code:"LONG_ANCHOR_ID",message:"Anchor selector is unusually long",suggestion:"Consider using a shorter, more descriptive selector"}),r.route===void 0||r.route===null)e.push({code:"MISSING_ANCHOR_ROUTE",message:`anchorId requires a 'route' (string or array of strings). Use "**" for all routes.`,field:"anchorId.route"});else{let n=Array.isArray(r.route)?r.route:[r.route];for(let o of n)if(typeof o!="string"){e.push({code:"INVALID_ANCHOR_ROUTE",message:"anchorId.route must be a string or array of strings",field:"anchorId.route"});break}}}function Zc(t){let e=[],a=[];if(!Array.isArray(t))return console.error("[ActionValidation] validateActions called with non-array:",typeof t),e.push({code:"INVALID_ACTIONS",message:"Actions must be an array"}),{valid:!1,errors:e,warnings:a};for(let r=0;r<t.length;r++){let n=dr(t[r]);if(!n.valid){let o=t[r];console.error(`[ActionValidation] Action [${r}] failed validation:`,`kind="${o?.kind??"undefined"}"`,n.errors.map(i=>`${i.code}: ${i.message}`).join("; "),o)}for(let o of n.errors)e.push({...o,field:o.field?`[${r}].${o.field}`:`[${r}]`});for(let o of n.warnings)a.push({...o,suggestion:o.suggestion?`Action ${r}: ${o.suggestion}`:void 0})}return e.length>0&&console.error(`[ActionValidation] Batch validation failed: ${e.length} error(s) in ${t.length} action(s).`,e.map(r=>`${r.field??"?"}: ${r.message}`).join(" | ")),{valid:e.length===0,errors:e,warnings:a}}var P4=0;function Jh(t){let{overlayRoot:e,eventBus:a,surfaces:r,anchorResolver:n,waitForAnchor:o,adaptiveId:i,executorRegistry:s=Tr,subscribeNavigation:l,runtime:u}=t,c=new Map,d=new Map;function f(){return`action-${++P4}`}function h(_,L){a&&a.publish(_,L)}function S(){return{overlayRoot:e,resolveAnchor:n,waitForAnchor:o,generateId:f,publishEvent:h,adaptiveId:i,applyAction:m,subscribeEvent:a?(_,L)=>a.subscribe({names:[_]},A=>L(A.props)):void 0,subscribeNavigation:l}}async function x(_,L){if(!r)throw new Error("Surfaces provider required for core:mountWidget actions");let A=r.mount(_.slot,{type:"widget",widgetId:_.widget.widgetId,config:_.widget.props},{priority:_.widget.priority});return L.publishEvent("action.applied",{id:L.generateId(),kind:"core:mountWidget",slot:_.slot,widgetId:_.widget.widgetId}),{cleanup:()=>{A.unmount()},updateFn:I=>{if("widget"in I&&I.widget){let O=I.widget;O.props&&A.update({type:"widget",widgetId:_.widget.widgetId,config:O.props})}}}}async function b(_,L){if(_.kind==="core:mountWidget")return x(_,L);let A=s.get(_.kind);if(!A){let I="list"in s?s.list():"(list unavailable)";throw console.error(`[ActionEngine] No executor for kind="${_.kind}".`,`Registered: [${I}]`),new Error(`No executor for action kind: ${_.kind}`)}return A(_,L)}function g(_,L,A,I){if(!u)return;let O=[],H=async()=>{let E=c.get(_);if(!E)return;let M=u.evaluateSync(A).value;if(E.state==="applied"&&!M){try{await E.cleanup()}catch(F){console.error(`[ActionEngine] Error reverting conditional action ${_}:`,F)}E.state="deferred",E.cleanup=()=>{},E.updateFn=void 0,h("action.deferred",{id:_,kind:L.kind})}else if(E.state==="deferred"&&M)try{let F=S(),Z=await b(L,F);E.state="applied",E.cleanup=Z.cleanup,E.updateFn=Z.updateFn,E.appliedTs=Date.now(),h("action.applied",{id:_,kind:L.kind,anchorId:"anchorId"in L?L.anchorId:void 0})}catch(F){console.error(`[ActionEngine] Error applying deferred action ${_}:`,F),E.state="failed"}};u.context&&O.push(u.context.subscribe(H)),u.accumulator&&O.push(u.accumulator.subscribe(H)),d.set(_,O)}async function m(_){let L=dr(_);if(!L.valid){let M=L.errors.map(F=>F.message).join("; ");throw console.error(`[ActionEngine] Validation failed for action kind="${_?.kind}":`,M,_),new Error(`Action validation failed: ${M}`)}let A=f(),I=_.triggerWhen;if(I&&u&&!u.evaluateSync(I).value){let F={id:A,action:_,adaptiveId:i,appliedTs:Date.now(),state:"deferred",cleanup:()=>{}};c.set(A,F);let Z={id:A,action:_,async revert(){let U=c.get(A);if(!U)return;let W=d.get(A);if(W){for(let ce of W)ce();d.delete(A)}U.state="reverted",c.delete(A)},isApplied(){return c.get(A)?.state==="applied"},async update(U){let W=c.get(A);if(!W||W.state!=="applied")throw new Error("Cannot update action that is not applied");if(W.updateFn)await W.updateFn(U);else throw new Error(`Action kind ${_.kind} does not support updates`)},getState(){return c.get(A)?.state??"reverted"}};return g(A,_,I,Z),Z}let O=S(),H=await b(_,O),E={id:A,action:_,adaptiveId:i,appliedTs:Date.now(),state:"applied",cleanup:H.cleanup,updateFn:H.updateFn};c.set(A,E),h("action.applied",{id:A,kind:_.kind,anchorId:"anchorId"in _?_.anchorId:void 0});let R={id:A,action:_,async revert(){let M=c.get(A);if(!M||M.state!=="applied")return;let F=d.get(A);if(F){for(let Z of F)Z();d.delete(A)}try{await M.cleanup(),M.state="reverted",h("action.reverted",{id:A,kind:_.kind})}catch(Z){console.warn(`[ActionEngine] Cleanup error for ${_.kind} (${A}), ignoring:`,Z),M.state="reverted",h("action.reverted",{id:A,kind:_.kind})}finally{c.delete(A)}},isApplied(){return c.get(A)?.state==="applied"},async update(M){let F=c.get(A);if(!F||F.state!=="applied")throw new Error("Cannot update action that is not applied");if(F.updateFn)await F.updateFn(M);else throw new Error(`Action kind ${_.kind} does not support updates`)},getState(){return c.get(A)?.state??"reverted"}};return I&&u&&g(A,_,I,R),R}async function y(_){console.log(`[ActionEngine] applyBatch: ${_.length} action(s)`,_.map(E=>E.kind).join(", "));let L=Zc(_);if(!L.valid){let E=L.errors.map(R=>R.message).join("; ");throw console.error(`[ActionEngine] Batch validation FAILED for ${_.length} action(s):`,E,`
|
|
502
502
|
Actions:`,_.map((R,M)=>` [${M}] ${R.kind} ${R.anchorId?`anchor="${R.anchorId.selector}"`:""} ${R.label?`label="${R.label}"`:""}`).join(`
|
|
503
|
-
`)),new Error(`Batch validation failed: ${E}`)}let A=f(),I=[],O=[];try{let E=await Promise.allSettled(_.map(M=>m(M))),R=[];for(let M of E)M.status==="fulfilled"?(I.push(M.value),O.push(M.value)):R.push(M.reason instanceof Error?M.reason:new Error(String(M.reason)));if(R.length>0&&O.length===0)throw R[0];R.length>0&&console.warn(`[ActionEngine] ${R.length}/${_.length} action(s) failed in batch:`,R.map(M=>M.message).join("; "))}catch(E){console.error(`[ActionEngine] Batch apply FAILED. Successfully applied: ${O.length}. Rolling back...`,E);for(let R of O)try{await R.revert()}catch{}throw E}return{id:A,handles:I,async revertAll(){for(let E=I.length-1;E>=0;E--)try{await I[E].revert()}catch(R){console.error(`[ActionEngine] Error reverting action ${I[E].id}:`,R)}},isApplied(){return I.every(E=>E.isApplied())}}}function v(_){return dr(_)}function C(){return Array.from(c.values()).map(_=>({id:_.id,action:_.action,adaptiveId:_.adaptiveId,appliedTs:_.appliedTs,state:_.state}))}function w(){for(let _ of d.values())for(let L of _)try{L()}catch{}d.clear();for(let _ of c.values())if(_.state==="applied")try{_.cleanup()}catch(L){console.error("[ActionEngine] Error during cleanup:",L)}c.clear()}return{apply:m,applyBatch:y,validate:v,getActive:C,destroy:w}}var N4=p.object({selector:p.string(),route:p.union([p.string(),p.array(p.string())])}).strict(),xR=["ui.click","ui.scroll","ui.input","ui.change","ui.submit","ui.hover","ui.idle","ui.scroll_thrash","ui.focus_bounce","nav.page_view","nav.page_leave","behavior.rage_click","behavior.hesitation","behavior.confusion"],bR=p.enum(xR).describe("Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals."),SR=["time_on_page","page_views","scroll_depth"],_R=p.enum(SR).describe("Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.");var em=p.object({type:p.literal("page_url"),url:p.string().describe('URL path to match (e.g. "/pricing", "/dashboard")')}).describe('Fires when the current page URL matches. Use for page-specific actions. Example: {"type": "page_url", "url": "/pricing"}'),tm=p.object({type:p.literal("route"),routeId:p.string().describe("Named route ID from the route filter")}).describe("Fires when the current route matches a named route ID."),am=p.object({type:p.literal("anchor_visible"),anchorId:p.string().describe("CSS selector of the anchor element"),state:p.enum(["visible","present","absent"]).describe('"visible" = in viewport, "present" = in DOM, "absent" = not in DOM')}).describe(`Fires based on a DOM element's visibility state. Example: {"type": "anchor_visible", "anchorId": "#cta-button", "state": "visible"}`),rm=p.object({type:p.literal("event_occurred"),eventName:p.string().describe('Event name (e.g. "ui.click", "$pageview")'),withinMs:p.number().optional().describe("Time window in ms. Omit = any time this session.")}).describe('Fires when a specific event has occurred during this session. Example: {"type": "event_occurred", "eventName": "ui.click", "withinMs": 5000}'),nm=p.object({type:p.literal("state_equals"),key:p.string().describe("Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set()."),value:p.unknown().describe("Expected value to match against")}).describe("Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type."),om=p.object({type:p.literal("viewport"),minWidth:p.number().optional().describe("Minimum viewport width in pixels"),maxWidth:p.number().optional().describe("Maximum viewport width in pixels"),minHeight:p.number().optional().describe("Minimum viewport height in pixels"),maxHeight:p.number().optional().describe("Maximum viewport height in pixels")}).describe('Fires based on viewport (screen) size. Use for responsive behavior. Example: {"type": "viewport", "minWidth": 768} \u2014 fires on tablet and larger.'),im=p.object({type:p.literal("session_metric"),key:_R,operator:p.enum(["gte","lte","eq","gt","lt"]),threshold:p.number().describe("Numeric threshold to compare against")}).describe('Fires when a session metric crosses a threshold. Valid keys: "time_on_page" (seconds), "page_views" (count), "scroll_depth" (0-100). Example: {"type": "session_metric", "key": "time_on_page", "operator": "gte", "threshold": 30}'),sm=p.object({type:p.literal("dismissed"),key:p.string().describe("Dismissal key (usually a tile or action ID)"),inverted:p.boolean().optional().describe("When true, fires if NOT dismissed (default behavior)")}).describe("Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed."),lm=p.object({type:p.literal("cooldown_active"),key:p.string().describe("Cooldown key"),inverted:p.boolean().optional().describe("When true, fires if cooldown is NOT active")}).describe("Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently."),um=p.object({type:p.literal("frequency_limit"),key:p.string().describe("Frequency counter key"),limit:p.number().describe("Maximum allowed count"),inverted:p.boolean().optional().describe("When true, fires if limit NOT reached")}).describe("Checks if a frequency limit has been reached. Use to cap how many times an action fires per session."),dl=p.object({equals:p.union([p.string(),p.number(),p.boolean()]).optional(),contains:p.string().optional()}).describe("Match operator for counter filters. Exactly one of equals or contains must be specified."),fl=p.object({events:p.array(bR).min(1).describe("Event names to count. Use values from the countable events enum."),match:p.record(p.string(),dl).optional().describe("Property filters. Keys are event prop names or element-chain fields (tag_name, $el_text, attr__*). All entries AND together.")}).describe("Defines what events to count. Registered as an accumulator predicate at config-load time."),cm=p.object({type:p.literal("event_count"),key:p.string().describe("Unique key for this counter (used for accumulator registration)"),operator:p.enum(["gte","lte","eq","gt","lt"]),count:p.number().int().min(0).describe("Target count threshold"),withinMs:p.number().positive().optional().describe("Time window in ms. Omit = count across entire session."),counter:fl.optional().describe("Inline counter definition. Defines what events to count.")}).describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. Example: {"type": "event_count", "key": "pricing-clicks", "operator": "gte", "count": 3, "counter": {"events": ["ui.click"], "match": {"attr__data-cta": {"contains": "pricing"}}}}'),_n=p.discriminatedUnion("type",[em,tm,am,rm,nm,om,im,sm,lm,um,cm]),pl=p.object({conditions:p.array(_n).describe("Array of conditions \u2014 ALL must match (AND logic) for this rule to fire."),value:p.unknown().describe("Value returned when all conditions match. For triggerWhen: true = fire the action.")}).describe("A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated top-to-bottom \u2014 first rule where all conditions match wins and returns its value."),hl=p.object({type:p.literal("rules"),rules:p.array(pl).describe("Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins."),default:p.unknown().describe("Fallback value when no rule matches. For triggerWhen: false = do not fire by default.")}).describe("Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match returns its value. If no rule matches, returns default. For triggerWhen: set value=true on matching rules, default=false."),ml=p.object({type:p.literal("score"),field:p.string(),threshold:p.number(),above:p.unknown(),below:p.unknown()}).describe("Score-based strategy. Compares a field value against a threshold."),gl=p.object({type:p.literal("model"),modelId:p.string(),inputs:p.array(p.string()),outputMapping:p.record(p.string(),p.unknown()),default:p.unknown()}).describe("ML model strategy. Sends inputs to a model and maps outputs."),vl=p.object({type:p.literal("external"),endpoint:p.string(),method:p.enum(["GET","POST"]).optional(),default:p.unknown(),timeoutMs:p.number().optional()}).describe("External API strategy. Calls an endpoint to determine the value."),yl=p.discriminatedUnion("type",[hl,ml,gl,vl]),Xc=yl.nullable().optional();var F4=p.object({events:p.array(p.string()),urlContains:p.string().optional(),props:p.record(p.union([p.string(),p.number(),p.boolean()])).optional()}),H4=p.object({title:p.string().optional(),body:p.string().optional(),icon:p.string().optional()}).nullable().optional();var Q0=p.object({include:p.array(p.string()).optional().describe("URL patterns where this tile appears. Supports *, **, :param wildcards. Use sparingly \u2014 mostly to isolate to specific webapp functionality. Omit to appear on all routes."),exclude:p.array(p.string()).optional().describe("URL patterns where this tile should NOT appear. Evaluated before include.")}),Kc=p.object({routes:Q0,onlyIfPopulated:p.boolean().optional().describe("When true, tile is hidden if none of its props.actions[] have an active triggerWhen. Useful for tiles with all-deferred FAQ questions or nav tips. Default: false.")});function U4(t){return _n.safeParse(t)}function z4(t){return yl.safeParse(t)}function q4(t){return Kc.safeParse(t)}var V4=[{defName:"matchOp",schema:dl},{defName:"counterDef",schema:fl},{defName:"activationConfig",schema:Kc},{defName:"routeFilter",schema:Q0},{defName:"ruleStrategy",schema:hl},{defName:"scoreStrategy",schema:ml},{defName:"modelStrategy",schema:gl},{defName:"externalStrategy",schema:vl},{defName:"rule",schema:pl},{defName:"condition",schema:_n}];var J0=p.object({tileId:p.string(),itemId:p.string().optional()}).strict(),$4=p.object({on:p.string(),title:p.string(),body:p.string().optional(),icon:p.string().optional(),ttl:p.number().optional(),cooldown:p.number().optional(),deepLink:J0.optional()}).strict(),j4=p.object({id:p.string(),title:p.string().optional(),subtitle:p.string().optional(),icon:p.string().optional(),priority:p.number().optional(),widget:p.string(),props:p.record(p.unknown()).optional(),activation:Kc.optional(),notifications:p.array($4).optional()}).strict(),G4=p.object({position:p.enum(["left","right"]).optional(),layout:p.enum(["overlay","push"]).optional(),background:p.string().optional(),blur:p.string().optional(),border:p.string().optional(),width:p.string().optional(),transitionDuration:p.string().optional(),transitionEasing:p.string().optional(),transitionFade:p.string().optional()}),W4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),color:p.string().optional(),size:p.string().optional(),shadow:p.string().optional(),borderRadius:p.string().optional(),icon:p.string().optional()}),Z4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),shadow:p.string().optional(),titleColor:p.string().optional(),textColor:p.string().optional(),iconBackground:p.string().optional(),iconShadow:p.string().optional(),headerPadding:p.string().optional(),bodyPadding:p.string().optional(),gap:p.string().optional()}),X4=p.object({background:p.string().optional(),textColor:p.string().optional(),titleColor:p.string().optional(),arrowColor:p.string().optional(),arrowSize:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),scrimOpacity:p.string().optional(),highlightRing:p.string().optional()}),K4=p.object({background:p.string().optional(),textColor:p.string().optional(),textSecondaryColor:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),successColor:p.string().optional(),warningColor:p.string().optional(),errorColor:p.string().optional(),iconBackground:p.string().optional(),progressGradient:p.string().optional()}),Y4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),textColor:p.string().optional(),textSecondaryColor:p.string().optional(),itemDivider:p.string().optional(),itemGap:p.string().optional(),itemPadding:p.string().optional(),itemFontSize:p.string().optional(),bodyPadding:p.string().optional(),bodyFontSize:p.string().optional(),categoryPadding:p.string().optional(),categoryGap:p.string().optional(),categoryFontSize:p.string().optional(),searchBackground:p.string().optional(),searchColor:p.string().optional(),chevronColor:p.string().optional()}),Q4=p.object({mode:p.enum(["dark","light"]).optional(),fontFamily:p.string().optional(),colorPrimary:p.string().optional(),colorPrimaryHover:p.string().optional(),borderRadius:p.string().optional(),canvas:G4.optional(),launcher:W4.optional(),tile:Z4.optional(),overlay:X4.optional(),notification:K4.optional(),content:Y4.optional()}).strict(),J4=p.object({enabled:p.boolean().optional(),label:p.string().optional(),position:p.string().optional(),animate:p.boolean().optional(),animationStyle:p.enum(["pulse","bounce","glow"]).optional(),notificationCount:p.number().optional()}).strict(),B9=p.object({schemaVersion:p.string().optional(),fetchedAt:p.string().datetime(),configVersion:p.string().optional(),canvasTitle:p.string().optional(),tiles:p.array(j4),actions:p.array(p.any()),theme:Q4.optional(),launcher:J4.optional(),meta:p.object({verificationSteps:p.array(p.union([p.string(),p.object({text:p.string(),check:_n.optional()})])).optional()}).passthrough().optional()}).strict();var wt={triggerWhen:Xc},Ia=p.object({selector:p.string(),route:p.union([p.string(),p.array(p.string())])}).strict(),eS=p.object({color:p.string().optional(),scrimOpacity:p.number().min(0).max(1).optional(),paddingPx:p.number().optional(),radiusPx:p.number().optional()}).strict(),tS=p.enum(["top-left","top-right","bottom-left","bottom-right"]),aS=p.enum(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"]),fm=p.object({label:p.string(),actionId:p.string(),primary:p.boolean().optional()}).strict(),rS=p.object({title:p.string().optional(),body:p.string(),ctaButtons:p.array(fm).optional()}).strict(),nS=p.object({title:p.string().optional(),body:p.string()}).strict(),oS=p.enum(["before","after","prepend","append","replace"]),iS=p.enum(["immediate","hover","click"]),sS=p.object({widgetId:p.string(),props:p.record(p.unknown()).optional(),priority:p.number().optional()}).strict(),lS=p.object({id:p.string(),action:p.any(),route:p.string().optional(),onAction:p.record(p.string()).optional()}).passthrough(),uS=p.enum(["auto","smooth","instant"]),dm=p.enum(["start","center","end","nearest"]),cS=p.object({kind:p.literal("content:setText"),anchorId:Ia,text:p.string(),label:p.string().optional()}).extend(wt).strict(),dS=p.object({kind:p.literal("content:setAttr"),anchorId:Ia,attr:p.string(),value:p.string(),label:p.string().optional()}).extend(wt).strict(),fS=p.object({kind:p.literal("content:addClass"),anchorId:Ia,className:p.string(),label:p.string().optional()}).extend(wt).strict(),pS=p.object({kind:p.literal("content:removeClass"),anchorId:Ia,className:p.string(),label:p.string().optional()}).extend(wt).strict(),hS=p.object({kind:p.literal("content:setStyle"),anchorId:Ia,styles:p.record(p.string()),label:p.string().optional()}).extend(wt).strict(),mS=p.object({kind:p.literal("content:insertHtml"),anchorId:Ia,html:p.string(),position:oS,deepLink:J0.optional(),label:p.string().optional()}).extend(wt).strict(),gS=p.object({kind:p.literal("overlays:highlight"),anchorId:Ia,style:eS.optional(),duration:p.number().optional(),label:p.string().optional()}).extend(wt).strict(),vS=p.object({kind:p.literal("overlays:pulse"),anchorId:Ia,duration:p.number().optional(),label:p.string().optional()}).extend(wt).strict(),yS=p.object({kind:p.literal("overlays:badge"),anchorId:Ia,content:p.string(),position:tS.optional(),label:p.string().optional()}).extend(wt).strict(),xS=p.object({kind:p.literal("overlays:tooltip"),anchorId:Ia,content:rS,trigger:iS.optional(),placement:aS.optional(),waitFor:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),bS=p.object({kind:p.literal("overlays:modal"),content:nS,size:p.enum(["sm","md","lg"]).optional(),blocking:p.boolean().optional(),scrim:p.object({opacity:p.number().min(0).max(1).optional()}).strict().optional(),dismiss:p.object({onEsc:p.boolean().optional(),closeButton:p.boolean().optional(),timeoutMs:p.number().min(0).optional()}).strict().optional(),ctaButtons:p.array(fm).optional(),waitFor:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),SS=p.object({kind:p.literal("navigation:scrollTo"),anchorId:Ia,behavior:uS.optional(),block:dm.optional(),inline:dm.optional(),label:p.string().optional()}).extend(wt).strict(),_S=p.object({kind:p.literal("navigation:navigate"),url:p.string(),target:p.enum(["_self","_blank"]).optional(),label:p.string().optional()}).extend(wt).strict(),CS=p.object({kind:p.literal("core:mountWidget"),slot:p.string(),widget:sS,label:p.string().optional()}).extend(wt).strict(),wS=p.object({kind:p.literal("core:wait"),durationMs:p.number().min(0).optional(),event:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),LS=p.object({kind:p.literal("core:sequence"),actions:p.array(p.any()),label:p.string().optional()}).extend(wt).strict(),kS=p.object({kind:p.literal("core:parallel"),actions:p.array(p.any()),waitFor:p.enum(["all","any"]).optional(),label:p.string().optional()}).extend(wt).strict(),IS=p.object({kind:p.literal("overlays:tour"),tourId:p.string(),steps:p.array(lS).min(1),startStep:p.string().optional(),autoStart:p.boolean().optional(),label:p.string().optional()}).extend(wt).passthrough(),CR=[{defName:"setText",schema:cS},{defName:"setAttr",schema:dS},{defName:"addClass",schema:fS},{defName:"removeClass",schema:pS},{defName:"setStyle",schema:hS},{defName:"insertHtml",schema:mS},{defName:"highlight",schema:gS},{defName:"pulse",schema:vS},{defName:"badge",schema:yS},{defName:"tooltip",schema:xS},{defName:"modal",schema:bS},{defName:"scrollTo",schema:SS},{defName:"navigate",schema:_S},{defName:"mountWidget",schema:CS},{defName:"wait",schema:wS},{defName:"sequence",schema:LS},{defName:"parallel",schema:kS},{defName:"tour",schema:IS}];function pm(t){let e=t?.root??(typeof document<"u"?document.body:null),a=t?.defaultTimeoutMs??5e3,r=new Map,n=new Map,o=null,i=!1;function s(b){if(!e)return null;try{return e.matches(b)?e:e.querySelector(b)}catch{return null}}function l(){for(let[b,g]of r){let m=s(b);if(m){for(let y of g)clearTimeout(y.timer),y.resolve(m);r.delete(b)}}for(let[b,g]of n){let m=s(b);if(m){for(let y of g)y.cancelled||y.cb(m);n.delete(b)}}r.size===0&&n.size===0&&c()}function u(){o||i||typeof MutationObserver>"u"||!e||(o=new MutationObserver(()=>{l()}),o.observe(e,{childList:!0,subtree:!0}))}function c(){o&&(o.disconnect(),o=null)}function d(b,g){let m=r.get(b);m&&(m.delete(g),m.size===0&&r.delete(b)),r.size===0&&n.size===0&&c()}function f(b,g){if(i)return Promise.reject(new Error("AnchorResolver destroyed"));let m=s(b);if(m)return Promise.resolve(m);let y=g??a;return new Promise((v,C)=>{let w={resolve:v,reject:C,timer:setTimeout(()=>{d(b,w),C(new Error(`waitFor("${b}") timed out after ${y}ms`))},y)},_=r.get(b);_||(_=new Set,r.set(b,_)),_.add(w),u()})}function h(b,g){if(i)return()=>{};let m=s(b);if(m)return g(m),()=>{};let y={cb:g,cancelled:!1},v=n.get(b);return v||(v=new Set,n.set(b,v)),v.add(y),u(),()=>{y.cancelled=!0;let C=n.get(b);C&&(C.delete(y),C.size===0&&n.delete(b)),r.size===0&&n.size===0&&c()}}function S(){let b=0;for(let g of r.values())b+=g.size;return b}function x(){i=!0,c();let b=new Error("AnchorResolver destroyed");for(let g of r.values())for(let m of g)clearTimeout(m.timer),m.reject(b);r.clear(),n.clear()}return{resolve:s,waitFor:f,onAppear:h,pendingCount:S,destroy:x}}function eU(){let t=Date.now();return{page:{url:typeof window<"u"?window.location.href:"",title:typeof document<"u"?document.title:void 0},session:{sessionId:"",startTs:t,pageHistory:[]},viewport:{width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0}}}function AS(t,e){if(!e)return;let a;try{a=new URL(t).pathname}catch{a=t}if(e.exclude){for(let r of e.exclude)if(wR(a,r))return}if(e.include){for(let r of e.include)if(wR(a,r))return r;return}return a}function wR(t,e){let a=t.replace(/\/$/,"")||"/",r=e.replace(/\/$/,"")||"/";if(a===r)return!0;let n=r.replace(/:[^/]+/g,"[^/]+").replace(/\*/g,".*");return new RegExp(`^${n}$`).test(a)}var Yc=class{constructor(e){B(this,"context");B(this,"previousContext");B(this,"listeners",new Set);B(this,"telemetry");B(this,"routes");B(this,"navigation");B(this,"cleanupFns",[]);if(this.telemetry=e.telemetry,this.routes=e.routes,this.navigation=e.navigation,this.context=eU(),this.previousContext={...this.context},e.telemetry?.getSessionId){let a=e.telemetry.getSessionId();a&&(this.context.session.sessionId=a)}e.initialPageHistory&&(this.context.session.pageHistory=e.initialPageHistory),this.context.page.routeId=AS(this.context.page.url,this.routes),this.addPageToHistory(this.context.page.url),typeof window<"u"&&this.setupBrowserListeners()}get(){return{...this.context}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setRoutes(e){this.routes=e;let a=AS(this.context.page.url,this.routes);a!==this.context.page.routeId&&this.updateContext({page:{...this.context.page,routeId:a}})}setAnchors(e){this.updateContext({anchors:e})}setSessionId(e){e!==this.context.session.sessionId&&this.updateContext({session:{...this.context.session,sessionId:e}})}destroy(){for(let e of this.cleanupFns)e();this.cleanupFns=[],this.listeners.clear()}setupBrowserListeners(){let e,a=()=>{clearTimeout(e),e=setTimeout(()=>{this.updateViewport()},100)};window.addEventListener("resize",a),this.cleanupFns.push(()=>window.removeEventListener("resize",a));let r=this.navigation.subscribe(()=>this.updatePage());this.cleanupFns.push(r)}updateViewport(){let e={width:window.innerWidth,height:window.innerHeight};(e.width!==this.context.viewport.width||e.height!==this.context.viewport.height)&&this.updateContext({viewport:e})}updatePage(){let e=window.location.href,{title:a}=document,r=AS(e,this.routes),n={url:e,title:a,routeId:r};(n.url!==this.context.page.url||n.title!==this.context.page.title||n.routeId!==this.context.page.routeId)&&(n.url!==this.context.page.url&&this.addPageToHistory(n.url),this.updateContext({page:n}))}addPageToHistory(e){let a={url:e,ts:Date.now()},r=[...this.context.session.pageHistory||[],a];r.length>50&&r.shift(),this.context.session.pageHistory=r}updateContext(e){this.previousContext={...this.context},this.context={...this.context,...e},this.notifyListeners()}notifyListeners(){for(let e of this.listeners)try{e(this.context,this.previousContext)}catch(a){console.error("[ContextManager] Listener error:",a)}}};function hm(t){return new Yc(t)}var LR=p.object({url:p.string(),routeId:p.string().optional(),title:p.string().optional(),locale:p.string().optional()}),kR=p.object({url:p.string(),ts:p.number()}),IR=p.object({sessionId:p.string(),startTs:p.number(),pageHistory:p.array(kR).optional()}),AR=p.object({width:p.number(),height:p.number()}),ER=p.object({x:p.number(),y:p.number(),w:p.number(),h:p.number()}),TR=p.object({anchorId:p.string(),present:p.boolean(),visible:p.boolean().optional(),boundingBox:ER.optional()}),RR=p.record(p.string(),p.union([p.number(),p.string(),p.boolean(),p.undefined()])),MR=p.object({page:LR,session:IR,viewport:AR,anchors:p.array(TR).optional(),augmented:RR.optional()});function tU(t){return MR.safeParse(t)}function ES(t,e){let{context:a,state:r,events:n}=e;switch(t.type){case"page_url":{let{url:o}=t,i=a.page.url.split("?")[0].split("#")[0],s=o.replace(/\*\*/g,"\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\0GLOBSTAR\0/g,".*");return new RegExp(`^${s}$`).test(i)}case"route":return a.page.routeId===t.routeId;case"anchor_visible":{let o=a.anchors?.find(i=>i.anchorId===t.anchorId);switch(t.state){case"visible":return o?.visible===!0;case"present":return o?.present===!0;case"absent":return!o?.present;default:return!1}}case"event_occurred":{if(!n)return!1;let o=t.withinMs??6e4;return n.hasRecentEvent(t.eventName,o)}case"state_equals":return r?.getValue?r.getValue(t.key)===t.value:!1;case"viewport":{let{width:o,height:i}=a.viewport;return!(t.minWidth!==void 0&&o<t.minWidth||t.maxWidth!==void 0&&o>t.maxWidth||t.minHeight!==void 0&&i<t.minHeight||t.maxHeight!==void 0&&i>t.maxHeight)}case"session_metric":{if(!r)return!1;let o=r.getSessionMetric(t.key),{operator:i,threshold:s}=t;switch(i){case"gte":return o>=s;case"lte":return o<=s;case"eq":return o===s;case"gt":return o>s;case"lt":return o<s;default:return!1}}case"dismissed":{if(!r)return t.inverted??!1;let o=r.isDismissed(t.key);return t.inverted?!o:o}case"cooldown_active":{if(!r)return t.inverted??!1;let o=r.isCooldownActive(t.key);return t.inverted?!o:o}case"frequency_limit":{if(!r)return t.inverted??!1;let i=r.getFrequencyCount(t.key)>=t.limit;return t.inverted?!i:i}case"event_count":{if(!e.accumulator)return!1;let o=t,i=e.accumulator.getCount(o.key,o.withinMs);switch(o.operator){case"gte":return i>=o.count;case"lte":return i<=o.count;case"eq":return i===o.count;case"gt":return i>o.count;case"lt":return i<o.count;default:return!1}}default:return console.warn("[RuleStrategy] Unknown condition type:",t.type),!1}}function TS(t,e){let a=[];for(let r of t.conditions){let n=ES(r,e);if(a.push({condition:r,result:n}),!n)return{matched:!1,conditionResults:a}}return{matched:!0,conditionResults:a}}function Qc(t,e){for(let a=0;a<t.rules.length;a++){let r=t.rules[a],{matched:n,conditionResults:o}=TS(r,e);if(n)return{value:r.value,isFallback:!1,matchInfo:{strategyType:"rules",matchedRuleIndex:a,evaluatedConditions:o}}}return{value:t.default,isFallback:!0,matchInfo:{strategyType:"rules"}}}function Jc(t,e){let{context:a}=e,r=a.augmented?.[t.field];return r===void 0||typeof r!="number"?{value:t.below,isFallback:!0,matchInfo:{strategyType:"score"}}:{value:r>=t.threshold?t.above:t.below,isFallback:!1,matchInfo:{strategyType:"score"}}}function OR(t,e){let{state:a,events:r,sessionMetrics:n,accumulator:o}=e;return{context:t,state:a?{isDismissed:i=>a.dismissals.isDismissed(i),isCooldownActive:i=>a.cooldowns.isActive(i),getFrequencyCount:i=>a.frequency.count(i),getSessionMetric:i=>n?.get(i)??0,getValue:i=>a.session.get(i)??a.user.get(i)}:void 0,events:r?{hasRecentEvent:(i,s)=>r.hasRecentEvent(i,s)}:void 0,accumulator:o?{getCount:(i,s)=>o.getCount(i,s)}:void 0}}async function RS(t,e,a={}){let r=OR(e,a);switch(t.type){case"rules":return Qc(t,r);case"score":return Jc(t,r);case"model":return{value:t.default,isFallback:!0,matchInfo:{strategyType:"model"}};case"external":return{value:t.default,isFallback:!0,matchInfo:{strategyType:"external"}};default:return console.warn("[DecisionEngine] Unknown strategy type:",t.type),{value:void 0,isFallback:!0,matchInfo:{strategyType:t.type}}}}function MS(t,e,a={}){let r=OR(e,a);switch(t.type){case"rules":return Qc(t,r);case"score":return Jc(t,r);case"model":case"external":return{value:t.default,isFallback:!0,matchInfo:{strategyType:t.type}};default:return{value:void 0,isFallback:!0,matchInfo:{strategyType:t.type}}}}function mm(t){return{evaluate:(e,a)=>RS(e,a,t),evaluateSync:(e,a)=>MS(e,a,t)}}function gm(t){let{eventBus:e,stateStore:a}=t,r=new Map,n=new Set,o=null,i=a.ns("accumulator");function s(u){let c=!1;for(let d of r.values()){if(!d.predicate(u))continue;let f=i.get(d.stateKey)||{count:0};f.count++,d.needsTimestamps&&(f.timestamps||(f.timestamps=[]),f.timestamps.push(u.ts),f.timestamps.length>200&&(f.timestamps=f.timestamps.slice(-200))),i.set(d.stateKey,f),c=!0}if(c)for(let d of n)try{d()}catch(f){console.error("[EventAccumulator] Subscriber error:",f)}}function l(){o||r.size===0||(o=e.subscribe(s))}return{register(u,c,d=!1){let f=`ev:${u}`,h=r.get(f);if(h){d&&!h.needsTimestamps&&(h.needsTimestamps=!0);return}r.set(f,{stateKey:f,needsTimestamps:d,predicate:c}),l()},getCount(u,c){let d=`ev:${u}`,f=i.get(d);if(!f)return 0;if(c===void 0||!f.timestamps)return f.count;let h=Date.now()-c;return f.timestamps.filter(S=>S>=h).length},subscribe(u){return n.add(u),()=>{n.delete(u)}},destroy(){o&&(o(),o=null),r.clear(),n.clear()}}}var DR="app:",aU="syntro:",rU=/^[a-z][a-z0-9_]*$/;function vm(t){if(!t)return{valid:!1,reason:"Event name cannot be empty"};if(t.startsWith(aU))return{valid:!1,reason:'"syntro:" prefix is reserved for internal SDK events'};if(!t.startsWith(DR))return{valid:!1,reason:`Custom events must start with "app:" prefix. Got: "${t}"`};let e=t.slice(DR.length).split(":");if(e.length<2)return{valid:!1,reason:`Event name must have at least 2 segments after "app:" (app:{category}:{action}). Got: "${t}"`};for(let a of e)if(!rU.test(a))return{valid:!1,reason:`Segment "${a}" must be lowercase alphanumeric + underscores. Got: "${t}"`};return{valid:!0}}function nU(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===null}function BR(t,e,a=0){if(a>=e)return!1;for(let r of Object.values(t))if(r!==null&&typeof r=="object"&&!Array.isArray(r)&&!BR(r,e,a+1))return!1;return!0}function ym(t){if(t===void 0)return{valid:!0};if(t===null||typeof t!="object"||Array.isArray(t))return{valid:!1,reason:"Props must be a plain object"};if(!BR(t,2))return{valid:!1,reason:"Props nesting depth exceeds 2 levels"};let e=[];for(let[a,r]of Object.entries(t))r!==null&&typeof r=="object"||nU(r)||e.push(a);return e.length>0?{valid:!0,stripped:e}:{valid:!0}}function xm(t,e){return e?!(e.names&&e.names.length>0&&!e.names.includes(t.name)||e.patterns&&e.patterns.length>0&&!e.patterns.some(r=>{try{return new RegExp(r).test(t.name)}catch{return!1}})||e.sources&&e.sources.length>0&&!e.sources.includes(t.source)):!0}var ed=class{constructor(e={}){B(this,"subscriptions",new Set);B(this,"history",[]);B(this,"maxHistorySize");B(this,"debug");B(this,"emitHistory");B(this,"posthogCapture");B(this,"testMode");this.maxHistorySize=e.maxHistorySize??100,this.debug=e.debug??!1,this.emitHistory=e.history??null,this.posthogCapture=e.posthogCapture??null,this.testMode=e.testMode??!1}subscribe(e,a){let r,n;typeof e=="function"?(r=void 0,n=e):(r=e,n=a);let o={filter:r,callback:n};return this.subscriptions.add(o),()=>{this.subscriptions.delete(o)}}publish(e,a,r="canvas"){let n={ts:Date.now(),name:e,source:r,props:a,schemaVersion:et};this.publishEvent(n)}publishEvent(e){this.history.push(e),this.history.length>this.maxHistorySize&&this.history.shift();for(let a of this.subscriptions)if(xm(e,a.filter))try{a.callback(e)}catch(r){console.error("[EventBus] Subscriber error:",r)}}emit(e,a){let r=vm(e);if(!r.valid)return console.warn(`[EventBus] emit() rejected: ${r.reason}`),this.debug?{delivered:!1,matchedRules:[],posthogCaptured:!1,listenersNotified:0}:void 0;let n=ym(a);if(!n.valid)return console.warn(`[EventBus] emit() rejected props: ${n.reason}`),this.debug?{delivered:!1,matchedRules:[],posthogCaptured:!1,listenersNotified:0}:void 0;let o={ts:Date.now(),name:e,source:"custom",props:a,schemaVersion:et};this.history.push(o),this.history.length>this.maxHistorySize&&this.history.shift();let i=0;for(let l of this.subscriptions)if(xm(o,l.filter))try{l.callback(o),i++}catch(u){console.error("[EventBus] Subscriber error:",u),i++}let s=!1;if(this.posthogCapture&&!this.testMode)try{this.posthogCapture(e,a),s=!0}catch(l){console.error("[EventBus] PostHog capture error:",l)}if(this.emitHistory&&this.emitHistory.record({name:e,props:a,source:"custom",timestamp:o.ts,matchedRules:[]}),this.debug)return console.debug("[EventBus] emit()",{name:e,props:a,listenersNotified:i,posthogCaptured:s}),{delivered:!0,matchedRules:[],posthogCaptured:s,listenersNotified:i}}setPosthogCapture(e){this.posthogCapture=e}getRecent(e,a){let r=this.history;return e&&(r=r.filter(n=>xm(n,e))),a&&a>0&&(r=r.slice(-a)),r}hasRecentEvent(e,a,r){let n=Date.now()-a;return this.history.some(o=>o.name===e&&o.ts>=n&&(r===void 0||o.source===r))}countRecentEvents(e,a){let r=this.history.filter(n=>xm(n,e));if(a!==void 0){let n=Date.now()-a;r=r.filter(o=>o.ts>=n)}return r.length}clearHistory(){this.history=[]}getSubscriberCount(){return this.subscriptions.size}};function xl(t={}){return new ed(t)}var bl=class{constructor(e=100){B(this,"entries",[]);B(this,"maxSize");this.maxSize=e}record(e){this.entries.push(e),this.maxSize>0&&this.entries.length>this.maxSize&&this.entries.shift()}getAll(){return[...this.entries]}clear(){this.entries=[]}};var OS=p.enum(["posthog","canvas","derived"]),PR=p.object({ts:p.number(),name:p.string(),source:OS,props:p.record(p.string(),p.unknown()).optional(),schemaVersion:p.string()}),NR=p.object({names:p.array(p.string()).optional(),patterns:p.array(p.string()).optional(),sources:p.array(OS).optional()});function oU(t){return PR.safeParse(t)}function iU(t){return NR.safeParse(t)}var Sl=class{constructor(){B(this,"listeners",new Set);B(this,"capturedPushState");B(this,"capturedReplaceState");B(this,"wasNative");B(this,"destroyed",!1);B(this,"onPopState",()=>{this.notify(window.location.href,"popstate")});this.wasNative=this.isNativeFunction(history.pushState),this.capturedPushState=history.pushState,this.capturedReplaceState=history.replaceState,history.pushState=(...e)=>{this.capturedPushState.call(history,...e),queueMicrotask(()=>this.notify(window.location.href,"pushState"))},history.replaceState=(...e)=>{this.capturedReplaceState.call(history,...e),queueMicrotask(()=>this.notify(window.location.href,"replaceState"))},window.addEventListener("popstate",this.onPopState)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}diagnose(){return{isNative:this.wasNative,subscriberCount:this.listeners.size}}destroy(){this.destroyed||(this.destroyed=!0,history.pushState=this.capturedPushState,history.replaceState=this.capturedReplaceState,window.removeEventListener("popstate",this.onPopState),this.listeners.clear())}notify(e,a){if(!this.destroyed)for(let r of this.listeners)try{r(e,a)}catch{}}isNativeFunction(e){try{return Function.prototype.toString.call(e).includes("[native code]")}catch{return!1}}};var DS="cooldown:";function FR(t){return{set(e,a){let r=DS+e,n=Date.now()+a;t.set(r,n)},isActive(e){return this.remaining(e)>0},remaining(e){let a=DS+e,r=t.get(a);if(r===void 0)return 0;let n=r-Date.now();return n<=0?(t.remove(a),0):n},clear(e){let a=DS+e;t.remove(a)}}}var td="dismissed:";function HR(t,e){return{mark(a,r=!1){let n=td+a;(r?e:t).set(n,!0)},isDismissed(a){let r=td+a;return t.has(r)||e.has(r)},clear(a){let r=td+a;t.remove(r),e.remove(r)},clearAll(){for(let a of t.keys())a.startsWith(td)&&t.remove(a);for(let a of e.keys())a.startsWith(td)&&e.remove(a)}}}var BS="freq:";function UR(t){function e(a){let r=BS+a,n=t.get(r);if(n){if(n.resetAt&&Date.now()>=n.resetAt){t.remove(r);return}return n}}return{increment(a,r){let n=BS+a,o=e(a),i=(o?.count??0)+1,s={count:i,resetAt:o?.resetAt??(r?Date.now()+r:void 0)};return t.set(n,s),i},count(a){return e(a)?.count??0},reset(a){let r=BS+a;t.remove(r)},hasReachedLimit(a,r){return this.count(a)>=r}}}var sU="syntro";function PS(t,e){let a=`${e}:`;return{get(r){if(t)try{let n=t.getItem(a+r);if(!n)return;let o=JSON.parse(n);if(o.expiresAt&&Date.now()>=o.expiresAt){t.removeItem(a+r);return}return o.value}catch{return}},set(r,n,o){if(t)try{let i={value:n,expiresAt:o?Date.now()+o:void 0};t.setItem(a+r,JSON.stringify(i))}catch(i){console.warn("[StateStore] Failed to save:",i)}},remove(r){t&&t.removeItem(a+r)},has(r){return t?this.get(r)!==void 0:!1},keys(){if(!t)return[];let r=[];for(let n=0;n<t.length;n++){let o=t.key(n);o?.startsWith(a)&&r.push(o.slice(a.length))}return r},clear(){if(!t)return;let r=this.keys();for(let n of r)t.removeItem(a+n)}}}function ad(t){let e=new Map,a=`${t}:`;return{get(r){let n=e.get(a+r);if(n){if(n.expiresAt&&Date.now()>=n.expiresAt){e.delete(a+r);return}return n.value}},set(r,n,o){e.set(a+r,{value:n,expiresAt:o?Date.now()+o:void 0})},remove(r){e.delete(a+r)},has(r){return this.get(r)!==void 0},keys(){let r=[];for(let n of e.keys())n.startsWith(a)&&r.push(n.slice(a.length));return r},clear(){for(let r of e.keys())r.startsWith(a)&&e.delete(r)}}}var rd=class{constructor(e={}){B(this,"session");B(this,"user");B(this,"dismissals");B(this,"cooldowns");B(this,"frequency");B(this,"namespace");B(this,"namespacedStorages",new Map);this.namespace=e.namespace??sU;let a=r=>typeof r=="object"&&r!==null&&typeof r.setItem=="function";typeof window<"u"?(this.session=a(window.sessionStorage)?PS(window.sessionStorage,this.namespace):ad(this.namespace),this.user=a(window.localStorage)?PS(window.localStorage,this.namespace):ad(this.namespace)):(this.session=ad(this.namespace),this.user=ad(this.namespace)),this.dismissals=HR(this.session,this.user),this.cooldowns=FR(this.user),this.frequency=UR(this.session)}ns(e){let a=`${this.namespace}:${e}`;if(!this.namespacedStorages.has(a)){let r=typeof window<"u"&&typeof sessionStorage<"u"?PS(sessionStorage,a):ad(a);this.namespacedStorages.set(a,r)}return this.namespacedStorages.get(a)}};function bm(t={}){return new rd(t)}function _l(t){return t.startsWith("inline:")?"inline":t.startsWith("adjacent:")?"adjacent":"static"}function nd(t){return t.startsWith("inline:")?t.slice(7):t.startsWith("adjacent:")?t.slice(9):null}var NS={drawer_right:{position:"fixed",top:"0",right:"0",bottom:"0",width:"360px",maxWidth:"90vw"},drawer_left:{position:"fixed",top:"0",left:"0",bottom:"0",width:"360px",maxWidth:"90vw"},drawer_bottom:{position:"fixed",left:"0",right:"0",bottom:"0",maxHeight:"50vh"},overlay_center:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxWidth:"90vw",maxHeight:"90vh"},overlay_corner_br:{position:"fixed",bottom:"16px",right:"16px",maxWidth:"400px",maxHeight:"80vh"},overlay_corner_bl:{position:"fixed",bottom:"16px",left:"16px",maxWidth:"400px",maxHeight:"80vh"},toast_top:{position:"fixed",top:"16px",left:"50%",transform:"translateX(-50%)",maxWidth:"90vw"},toast_bottom:{position:"fixed",bottom:"16px",left:"50%",transform:"translateX(-50%)",maxWidth:"90vw"}},Cl={fade:[{opacity:0},{opacity:1}],slide:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],scale:[{opacity:0,transform:"scale(0.95)"},{opacity:1,transform:"scale(1)"}],none:[]},zR={duration:200,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"};function Sm(t,e,a){let r=NS[e];Object.assign(t.style,r),a&&(a.maxWidth&&(t.style.maxWidth=a.maxWidth),a.maxHeight&&(t.style.maxHeight=a.maxHeight),a.minWidth&&(t.style.minWidth=a.minWidth),a.minHeight&&(t.style.minHeight=a.minHeight))}function _m(t,e,a){let r=a.placement==="auto"?"bottom":a.placement,n=[Yf(a.offset?{mainAxis:a.offset.y,crossAxis:a.offset.x}:8)];return a.flip!==!1&&n.push(Jf()),a.shift!==!1&&n.push(Qf({padding:8})),t.style.position="absolute",t.style.zIndex="2147483646",Kf(e,t,async()=>{let{x:i,y:s,strategy:l}=await ep(e,t,{placement:r,middleware:n});Object.assign(t.style,{position:l,left:`${i}px`,top:`${s}px`})})}function Cm(t,e,a="append"){return t.style.position="relative",t.style.display="inline-block",a==="prepend"?e.insertBefore(t,e.firstChild):e.appendChild(t),()=>{t.remove()}}function wm(t,e){return e==="none"||Cl[e].length===0?null:t.animate(Cl[e],zR)}function Lm(t,e){if(e==="none"||Cl[e].length===0)return Promise.resolve();let a=[...Cl[e]].reverse(),r=t.animate(a,zR);return new Promise(n=>{r.onfinish=()=>n(),r.oncancel=()=>n()})}function km(t,e){let a=document.createElement("div");return a.setAttribute("data-syntro-surface",t),a.setAttribute("data-syntro-mount-id",e),a.className="syntro-surface",Object.assign(a.style,{pointerEvents:"auto",boxSizing:"border-box",overflow:"auto"}),a}function Im(t){switch(_l(t)){case"static":return t.startsWith("drawer")?2147483640:t.startsWith("overlay")?2147483642:t.startsWith("toast")?2147483644:2147483640;case"inline":return 1;case"adjacent":return 2147483638;default:return 2147483640}}function qR(t){if(typeof window.Sanitizer=="function")try{let l=new window.Sanitizer({}).sanitizeToFragment(t),u=document.createElement("div");return u.append(l),u.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button"]),i=[];for(;n.nextNode();){let s=n.currentNode,l=s.tagName.toLowerCase();if(!o.has(l)){i.push(s);continue}for(let u of Array.from(s.attributes)){let c=u.name.toLowerCase(),d=u.value.trim().toLowerCase(),f=c.startsWith("on"),h=(c==="href"||c==="src")&&d.startsWith("javascript:");(f||h)&&s.removeAttribute(u.name)}}for(let s of i){for(;s.firstChild;)s.parentNode?.insertBefore(s.firstChild,s);s.remove()}return a.innerHTML=(r.firstChild,a.innerHTML)}var lU=0;function Am(t){let{overlayRoot:e,eventBus:a,anchorResolver:r,defaultAnimation:n="fade",widgetRegistry:o}=t,i=new Map,s=new Map,l=new Map;function u(){return`mount-${++lU}`}function c(v,C){a&&a.publish(v,C)}function d(v){let C=l.get(v);if(C){let w=b(v);for(let _ of C)try{_(w)}catch(L){console.error("[Surfaces] State callback error:",L)}}}let f=new Map;function h(v,C,w){switch(C.type){case"html":v.innerHTML=qR(C.content);return;case"widget":{if(o?.has(C.widgetId)){let _=o.mount(C.widgetId,v,C.config);return w&&f.set(w,_),()=>{_.unmount(),w&&f.delete(w)}}console.warn(`[Surfaces] Widget not found: ${C.widgetId}`),v.innerHTML=`<div data-widget-id="${C.widgetId}" data-widget-missing="true">Widget: ${C.widgetId}</div>`;return}case"custom":return C.mount(v);case"react":v.innerHTML="<div data-react-component>React Component</div>";return;default:console.warn("[Surfaces] Unknown content type");return}}function S(v,C,w){let _=u(),L=_l(v),A=w?.priority??0,I=w?.animation??n,O=w?.exclusive??!0,H=i.get(v);if(H&&O){if(H.options.priority>A)throw new Error(`Slot ${v} is occupied by higher priority content (${H.options.priority} > ${A})`);x(H)}let E=km(v,_);E.style.zIndex=String(Im(v));let R;if(L==="static")Sm(E,v,w?.constraints),e.appendChild(E);else if(L==="inline"){let U=nd(v);if(!U)throw new Error(`Invalid inline slot: ${v}`);if(!r)throw new Error("Anchor resolver required for inline slots");let W=r({selector:U,route:"**"});if(!W)throw new Error(`Anchor not found for inline slot: ${U}`);R=Cm(E,W)}else if(L==="adjacent"){let U=nd(v);if(!U)throw new Error(`Invalid adjacent slot: ${v}`);if(!r)throw new Error("Anchor resolver required for adjacent slots");let W=r({selector:U,route:"**"});if(!W)throw new Error(`Anchor not found for adjacent slot: ${U}`);e.appendChild(E),R=_m(E,W,w?.position??{placement:"bottom"})}let M=h(E,C,_);wm(E,I);let F={id:_,slot:v,content:C,options:{priority:A,exclusive:O,animation:I,position:w?.position??{placement:"auto"},constraints:w?.constraints??{},adaptiveId:w?.adaptiveId,autoUnmountOnRouteChange:w?.autoUnmountOnRouteChange??!0},container:E,cleanup:()=>{R?.(),M?.()},mountedAt:Date.now()};return i.set(v,F),s.set(v,(s.get(v)??0)+1),c("surface.mounted",{slot:v,id:_,adaptiveId:w?.adaptiveId}),d(v),{id:_,update(U){let W=i.get(v);if(!W||W.id!==_)throw new Error("Mount no longer active");let ce=f.get(_);if(ce){if(U.type==="widget"){ce.update(U.config),W.content=U;return}ce.unmount(),f.delete(_)}W.container.innerHTML="";let Xt=h(W.container,U,_);if(W.content=U,Xt){let it=W.cleanup;W.cleanup=()=>{it?.(),Xt()}}},setOptions(U){let W=i.get(v);if(!W||W.id!==_)throw new Error("Mount no longer active");U.priority!==void 0&&(W.options.priority=U.priority),U.animation!==void 0&&(W.options.animation=U.animation),U.constraints&&L==="static"&&(U.constraints.maxWidth&&(W.container.style.maxWidth=U.constraints.maxWidth),U.constraints.maxHeight&&(W.container.style.maxHeight=U.constraints.maxHeight),U.constraints.minWidth&&(W.container.style.minWidth=U.constraints.minWidth),U.constraints.minHeight&&(W.container.style.minHeight=U.constraints.minHeight)),d(v)},async unmount(){let U=i.get(v);!U||U.id!==_||await x(U)},isMounted(){return i.get(v)?.id===_},getContainer(){let U=i.get(v);return U?.id===_?U.container:null}}}async function x(v){v.container.isConnected&&await Lm(v.container,v.options.animation);try{v.cleanup?.()}catch(C){console.warn("[Surfaces] Cleanup error during unmount, ignoring:",C)}try{v.container.remove()}catch{}i.delete(v.slot),c("surface.unmounted",{slot:v.slot,id:v.id}),d(v.slot)}function b(v){let C=i.get(v);return{slot:v,occupied:!!C,currentPriority:C?.options.priority,currentAdaptiveId:C?.options.adaptiveId,mountCount:s.get(v)??0,currentMountId:C?.id}}function g(v,C){let w=l.get(v);return w||(w=new Set,l.set(v,w)),w.add(C),()=>{w?.delete(C),w?.size===0&&l.delete(v)}}function m(v,C){let w=i.get(v);return w?C!==void 0?C>=w.options.priority:!1:!0}function y(){for(let v of i.values())try{v.cleanup?.(),v.container.remove()}catch(C){console.error("[Surfaces] Error during cleanup:",C)}i.clear(),l.clear()}return{mount:S,getState:b,onStateChange:g,canMount:m,destroy:y}}var od=class{constructor(){B(this,"widgets",new Map);B(this,"mountedWidgets",new Map);B(this,"mountIdCounter",0);B(this,"runtimeRef");B(this,"listeners",new Set)}bindRuntime(e){this.runtimeRef=e}register(e,a,r="custom",n){if(this.widgets.has(e)){if(this.widgets.get(e).source==="built-in")throw new Error(`Cannot override built-in widget: ${e}`);console.warn(`[WidgetRegistry] Overriding widget: ${e}`)}this.widgets.set(e,{id:e,widget:a,source:r,metadata:n}),this.notify({type:"registered",widgetId:e})}unregister(e){let a=this.widgets.get(e);return a?a.source==="built-in"?(console.warn(`[WidgetRegistry] Cannot unregister built-in widget: ${e}`),!1):(this.widgets.delete(e),this.notify({type:"unregistered",widgetId:e}),!0):!1}unregisterBySource(e){for(let[a,r]of this.widgets.entries())r.source===e&&this.widgets.delete(a)}get(e){return this.widgets.get(e)?.widget}getRegistration(e){return this.widgets.get(e)}has(e){return this.widgets.has(e)}mount(e,a,r){let n=this.widgets.get(e);if(!n)throw new Error(`Widget not found: ${e}`);let o=`widget-mount-${++this.mountIdCounter}`;a.setAttribute("data-widget-mount-id",o),a.setAttribute("data-widget-id",e);let i={...r,runtime:this.runtimeRef},s=n.widget.mount(a,i);return this.mountedWidgets.set(o,{cleanup:s??void 0,container:a}),{widgetId:e,container:a,unmount:()=>{let u=this.mountedWidgets.get(o);u&&(a.isConnected&&u.cleanup?.(),this.mountedWidgets.delete(o),a.removeAttribute("data-widget-mount-id"),a.removeAttribute("data-widget-id"),a.innerHTML="")},update:u=>{if(n.widget.update)n.widget.update(a,u);else{let c=this.mountedWidgets.get(o);if(c){c.cleanup?.(),a.innerHTML="";let d={...u,runtime:this.runtimeRef},f=n.widget.mount(a,d);c.cleanup=f??void 0}}}}}list(){return Array.from(this.widgets.keys())}listRegistrations(){return Array.from(this.widgets.values())}getBySource(e){return Array.from(this.widgets.values()).filter(a=>a.source===e)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(e){for(let a of this.listeners)try{a(e)}catch(r){console.error("[WidgetRegistry] Listener error:",r)}}destroy(){for(let[e,a]of this.mountedWidgets.entries())a.cleanup?.(),a.container.innerHTML="";this.mountedWidgets.clear()}},Em=new od;var HS="2.0.0";function uU(t,e){if(!e)return!0;let a;try{a=new URL(t).pathname}catch{a=t}let r=a.replace(/\/$/,"")||"/";if(e.exclude){for(let n of e.exclude)if(FS(r,n))return!1}if(e.include&&e.include.length>0){for(let n of e.include)if(FS(r,n))return!0;return!1}return!0}function FS(t,e){let a=e.replace(/\/$/,"")||"/";if(t===a)return!0;let r=a.replace(/\*\*/g,"\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\0GLOBSTAR\0/g,".*").replace(/:[^/]+/g,"[^/]+");return new RegExp(`^${r}$`).test(t)}function VR(t){let a=(typeof window<"u"?window.location.pathname:"/").replace(/\/$/,"")||"/";return(Array.isArray(t.route)?t.route:[t.route]).some(n=>{let o=n;if(/^https?:\/\//.test(o))try{o=new URL(o).pathname}catch{}return FS(a,o)})}function Tm(t={}){let{telemetry:e,sessionMetrics:a,routes:r,mode:n="production",namespace:o}=t,i=t.widgets??Em,s=t.executors??Tr,l=t.apps??Ls,u=new Sl,c=hm({telemetry:e,routes:r,navigation:u}),d=t.events??xl(),f=bm({namespace:o}),h=gm({eventBus:d,stateStore:f}),S=mm({state:f,events:d,sessionMetrics:a,accumulator:h}),x=qI(),b=pm(),g=_=>VR(_)?b.resolve(_.selector):null,m=async(_,L)=>{if(!VR(_))return null;try{return await b.waitFor(_.selector,L)}catch{return null}},y=Am({overlayRoot:x,eventBus:d,anchorResolver:g,widgetRegistry:i}),v=Jh({overlayRoot:x,eventBus:d,surfaces:y,anchorResolver:g,waitForAnchor:m,executorRegistry:s,subscribeNavigation:_=>u.subscribe(_),runtime:{evaluateSync:_=>S.evaluateSync(_,c.get()),context:c,accumulator:h}}),C;if(a){a.increment("page_views");let _=typeof window<"u"?window.location.pathname:"/";C=u.subscribe((L,A)=>{if(A!=="replaceState")try{let I=new URL(L).pathname;I!==_&&(_=I,a.increment("page_views"))}catch{}})}let w={telemetry:e,context:c,events:d,state:f,sessionMetrics:a,actions:v,surfaces:y,widgets:i,executors:s,apps:l,accumulator:h,anchorResolver:b,navigation:u,version:HS,mode:n,async evaluate(_){return S.evaluate(_,c.get())},evaluateSync(_){return S.evaluateSync(_,c.get())},async filterTiles(_){let L=c.get().page.url,A=[];for(let I of _){let O=I.activation;if(!O){A.push(I);continue}if(uU(L,O.routes)){if(O.onlyIfPopulated){let H=I.props?.actions??[];if(H.length>0&&!H.some(R=>R.triggerWhen?S.evaluateSync(R.triggerWhen,c.get()).value:!0))continue}A.push(I)}}return A},setRoutes(_){c.setRoutes(_)},destroy(){l.unbind().catch(_=>{console.error("[Runtime] Error unbinding apps registry:",_)}),C?.(),b.destroy(),h.destroy(),u.destroy(),c.destroy(),v.destroy(),y.destroy()}};return l.bind(w),i.bindRuntime(w),w}var $R=p.object({value:p.unknown(),expiresAt:p.number().optional()}),jR=p.object({count:p.number(),resetAt:p.number().optional()});function cU(t){return $R.safeParse(t)}function dU(t){return jR.safeParse(t)}var US="syn_";function wl(t){if(!t.startsWith(US))throw new Error("Invalid Syntro token: must start with 'syn_'");let a=t.slice(US.length).replace(/-/g,"+").replace(/_/g,"/"),r=atob(a),n=JSON.parse(r);if(n.v!==1)throw new Error(`Unsupported token version: ${n.v}`);return n}function Rm(t){let e=JSON.stringify(t),a=btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return US+a}function Wa(t){if(typeof process<"u"&&process.env)return process.env[t];try{let e=(0,eval)("import.meta");if(e?.env)return e.env[t]}catch{}}var WR="syntro_segment_attributes";function ZR(){if(typeof window>"u")return{};try{let t=localStorage.getItem(WR);if(t){let e=JSON.parse(t);return K("Syntro Bootstrap","Loaded cached segment attributes:",e),e}}catch(t){na("Syntro Bootstrap","Failed to load cached segment attributes:",t)}return{}}function XR(t){if(!(typeof window>"u"))try{localStorage.setItem(WR,JSON.stringify(t)),K("Syntro Bootstrap","Cached segment attributes:",t)}catch(e){na("Syntro Bootstrap","Failed to cache segment attributes:",e)}}function KR(t){if(!t)return{};let e={};for(let[a,r]of Object.entries(t))a.startsWith("in_segment_")&&(e[a]=r===!0);return e}function zS(){if(typeof window>"u")return{};let t={};try{let e=new URLSearchParams(window.location.search);for(let a of["utm_source","utm_medium","utm_campaign","utm_content","utm_term"]){let r=e.get(a);r&&(t[a]=r)}}catch{}try{navigator.language&&(t.browser_language=navigator.language),navigator.languages?.length&&(t.browser_languages=[...navigator.languages])}catch{}try{let e=window.innerWidth;t.device_type=e<768?"mobile":e<1024?"tablet":"desktop"}catch{}try{if(document.referrer){t.referrer=document.referrer;try{t.referrer_hostname=new URL(document.referrer).hostname}catch{}}}catch{}try{let e=navigator.userAgent;e.includes("Edg/")?t.browser="Edge":e.includes("OPR/")||e.includes("Opera")?t.browser="Opera":e.includes("Chrome/")&&!e.includes("Chromium")?t.browser="Chrome":e.includes("Safari/")&&!e.includes("Chrome")?t.browser="Safari":e.includes("Firefox/")&&(t.browser="Firefox"),e.includes("Windows")?t.os="Windows":e.includes("iPhone")||e.includes("iPad")?t.os="iOS":e.includes("Mac OS X")||e.includes("Macintosh")?t.os="macOS":e.includes("Android")?t.os="Android":e.includes("Linux")&&(t.os="Linux")}catch{}try{t.page_url=window.location.href,t.page_path=window.location.pathname,t.page_host=window.location.hostname,window.location.search&&(t.page_query=window.location.search)}catch{}return t}var GR="syntro_geo",YR="https://geo.syntrologie.com";async function qS(t){if(typeof window>"u")return{};try{let e=localStorage.getItem(GR);if(e){let a=JSON.parse(e);return K("Syntro Bootstrap","Geo: using cached data:",a),a}}catch{}try{let e=await fetch(t,{signal:AbortSignal.timeout(2e3)});if(e.ok){let a=await e.json(),r={};for(let[n,o]of Object.entries(a))typeof o=="string"&&o&&(r[n]=o);try{localStorage.setItem(GR,JSON.stringify(r))}catch{}return K("Syntro Bootstrap","Geo: fetched from worker:",r),r}}catch{}return{}}var QR={growthbook:t=>sh({...t,autoInit:!0})};function JR(t,e){let a=QR[t];if(!a)throw new Error(`Unknown experiment provider: ${t}. Supported: ${Object.keys(QR).join(", ")}`);return a(e)}var fU=["cdn.syntrologie.com","localhost","127.0.0.1"];function pU(t){try{let e=new URL(t),a=/^(localhost|127\.0\.0\.1)$/.test(e.hostname);return e.protocol!=="https:"&&!a?(console.warn("[SmartCanvas] CDN URL must use HTTPS:",t),!1):fU.some(n=>e.hostname===n)?!0:(console.warn("[SmartCanvas] CDN host not in allowlist:",e.hostname),!1)}catch{return console.warn("[SmartCanvas] Invalid CDN URL:",t),!1}}var VS=class{constructor(e){B(this,"name","cdn");B(this,"url");B(this,"integrity");if(this.url=`${e.baseUrl}/${e.configId}.json`,this.integrity=e.integrity,!pU(this.url))throw new Error(`[SmartCanvas] CDN URL not allowed: ${this.url}`)}async fetch(){let e=performance.now(),a=await fetch(this.url,{credentials:"omit",cache:"default"});if(!a.ok)throw new Error(`[SmartCanvas] Failed to fetch config from CDN (${a.status})`);let r=await a.text();if(this.integrity){let l=await hU(r),u=this.integrity.replace("sha384-","");if(l!==u)throw new Error(`[SmartCanvas] Config integrity check failed. Expected ${u}, got ${l}`)}let n=JSON.parse(r),o=performance.now()-e,i=a.headers.get("cache-control"),s=a.headers.get("age");return{config:n,meta:{source:"cdn",fetchTimeMs:o,cached:i?.includes("public")??!1,cacheAge:s?parseInt(s,10):void 0}}}};async function hU(t){let a=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-384",a),n=new Uint8Array(r);return btoa(String.fromCharCode(...n))}function e2(t){return new VS(t)}var mU="syntro_exp",gU="syntro_var",$S=class{constructor(e){B(this,"name","experiments");B(this,"client");B(this,"featureKey");B(this,"manifestKey");B(this,"variantFlagPrefix");this.client=e.client,this.featureKey=e.featureKey,this.manifestKey=e.manifestKey,this.variantFlagPrefix=e.variantFlagPrefix}async fetch(){let e=performance.now();if(typeof window<"u"){let n=new URLSearchParams(window.location.search),o=n.get(mU),i=n.get(gU);if(o&&i!==null&&this.client.setForcedVariations){let s=parseInt(i,10);Number.isNaN(s)||(console.log(`[SmartCanvas] Preview mode: forcing "${o}" to variation ${s}`),this.client.setForcedVariations({[o]:s}))}}if(this.manifestKey||this.variantFlagPrefix||this.client.getAllFeatures){let n=this.fetchMultiFlag();if(n){let o=performance.now()-e;return{config:n,meta:{source:"experiments",fetchTimeMs:o,cached:!0}}}}if(!this.featureKey)throw new Error("[SmartCanvas] No featureKey configured and no variant flags found. Ensure at least one config feature flag exists in your experiment platform.");let a=this.client.getFeatureValue?.(this.featureKey,null);if(!a||typeof a!="object")throw new Error(`[SmartCanvas] Feature "${this.featureKey}" not found or invalid. Ensure the feature is configured in your experiment platform.`);let r=performance.now()-e;return{config:a,meta:{source:"experiments",fetchTimeMs:r,cached:!0}}}fetchMultiFlag(){let e=this.getVariantFlagKeys();return!e||e.length===0?null:mp(this.client,e)}getVariantFlagKeys(){if(this.manifestKey){let e=this.client.getFeatureValue?.(this.manifestKey,null);if(e&&typeof e=="object"){let a=e.variant_flags;if(a&&a.length>0)return a}}if(this.client.getAllFeatures){let e=this.client.getAllFeatures();return this.variantFlagPrefix?Object.keys(e).filter(a=>a.startsWith(this.variantFlagPrefix)):Object.keys(e)}return[]}};function t2(t){return new $S(t)}var vU="https://cdn.syntrologie.com/configs",a2={cdn:t=>{if(!t.configId)throw new Error("CDN fetcher requires 'configId' option");return e2({baseUrl:t.baseUrl??vU,configId:t.configId,integrity:t.integrity})},experiments:t=>{if(!t.featureKey)throw new Error("Experiments fetcher requires 'featureKey' option");return t2({featureKey:t.featureKey})}};function r2(t,e={}){let a=a2[t];if(!a)throw new Error(`Unknown config fetcher type: ${t}. Supported: ${Object.keys(a2).join(", ")}`);return a(e)}var n2={posthog:t=>Xh(t),noop:()=>gh()};function o2(t,e){let a=n2[t];if(!a)throw new Error(`Unknown telemetry provider: ${t}. Supported: ${Object.keys(n2).join(", ")}`);return a(e)}async function i2(t){ax(),K("Syntro Bootstrap","====== INIT ======"),K("Syntro Bootstrap","Options:",{hasToken:!!t.token,tokenPrefix:`${t.token?.slice(0,15)}...`,hasCanvasOptions:!!t.canvas});let e=bp();if(console.log(`[DIAG] Mode detection: sdkMode=${e}`),console.log("[DIAG] editorSource:",Vu()),console.log("[DIAG] editorConf:",xp()),K("Syntro Bootstrap","SDK mode:",e??"normal"),!e&&typeof window<"u"){let E=!!window.__SYNTRO_EDITOR_PARAMS__,R=!!window.__SYNTRO_AUDIT_LEGEND__,M=!!window.__SYNTRO_REVIEW_DATA__;if(E||R||M){let F=[E&&"__SYNTRO_EDITOR_PARAMS__",R&&"__SYNTRO_AUDIT_LEGEND__",M&&"__SYNTRO_REVIEW_DATA__"].filter(Boolean);console.warn(`[Syntro Bootstrap] \u26A0 Mode detection returned null but mode-specific globals found: ${F.join(", ")}. This suggests URL params were lost (redirect?) but the service worker injected mode data. Check if replaceState failed or if page JS changed the URL before init().`)}}console.log(`[DIAG] Token resolution: options.token=${t.token?t.token.slice(0,15)+"...":"null"}`);let a=t.token;if(!a&&e){let R=xp()?.syntro_token;R?.startsWith("syn_")&&(a=R,K("Syntro Bootstrap",`\u2713 Using syntro_token from editor_conf (${e} mode)`))}let r;if(a)if(a.startsWith("syn_"))K("Syntro Bootstrap","Token starts with syn_, decoding..."),r=wl(a),ax(r.d);else if(e)K("Syntro Bootstrap",`\u2713 Non-syn_ token allowed (${e} mode)`);else throw gp("Syntro Bootstrap","\u274C Token does not start with syn_ and NOT in editor/audit/review mode!"),gp("Syntro Bootstrap","Token received:",a),new Error("Invalid Syntro token: must start with 'syn_'");else if(e)K("Syntro Bootstrap",`\u2713 No token, but ${e} mode - proceeding`);else throw gp("Syntro Bootstrap","\u274C No token provided and NOT in editor/audit/review mode!"),new Error("Syntro token is required (unless in editor, audit, or review mode)");let n=Wa("NEXT_PUBLIC_SYNTRO_EXPERIMENT_HOST")||Wa("VITE_SYNTRO_EXPERIMENT_HOST")||r?.eh,o=Wa("NEXT_PUBLIC_SYNTRO_TELEMETRY_HOST")||Wa("VITE_SYNTRO_TELEMETRY_HOST")||r?.th,i=Wa("NEXT_PUBLIC_SYNTRO_EDITOR_URL")||Wa("VITE_SYNTRO_EDITOR_URL")||t.canvas?.editorUrl,s=r?.g||Wa("NEXT_PUBLIC_SYNTRO_GEO_HOST")||Wa("VITE_SYNTRO_GEO_HOST")||YR,l=ZR(),u=zS(),c={...u,...l};K("Syntro Bootstrap","Phase 1: Browser metadata:",u),K("Syntro Bootstrap","Phase 1: Cached segment attributes:",l);let d=qS(s),f,h=t.debug||t.testMode,S=xl({debug:t.debug,history:h?new bl(t.testMode?0:100):void 0,testMode:t.testMode});console.log("[Syntro Bootstrap] EventBus created");let x=sx({elementResolver:typeof window<"u"?(E,R)=>{let M=document.elementFromPoint(E,R);if(!M)return null;let F={tag_name:M.tagName.toLowerCase()};M.id&&(F.attr__id=M.id),M.className&&typeof M.className=="string"&&(F.classes=M.className.split(" ").filter(Boolean));for(let Z of M.attributes)Z.name.startsWith("data-")&&(F[`attr__${Z.name}`]=Z.value);return F}:void 0});x.onEvent(E=>S.publishEvent(E)),typeof window<"u"&&(setInterval(()=>x.tick(Date.now()),1e3),document.addEventListener("click",E=>{let R=[],M=E.target;for(;M&&M!==document.body;){let F={tag_name:M.tagName.toLowerCase()};for(let Z of M.attributes)(Z.name.startsWith("data-")||Z.name==="id"||Z.name==="class"||Z.name==="aria-label")&&(F[`attr__${Z.name}`]=Z.value);R.push(F),M=M.parentElement}x.enrichClickAttributes(Date.now(),R)},!0));let b=E=>{K("Syntro Bootstrap","Phase 2: PostHog feature flags loaded");let R=KR(E);if(K("Syntro Bootstrap","Segment flags from PostHog:",R),XR(R),f){let M=m?.getAll?.()??{},F={...u,...M,...R};K("Syntro Bootstrap","Updating GrowthBook with attributes:",F),f.setAttributes?.(F)}},g;if(r?.t){let E=r.t==="noop"?"noop":"posthog";g=o2(E,{apiKey:r.t,apiHost:o,enableFeatureFlags:!0,sessionRecording:!r.d,onFeatureFlagsLoaded:b,onCapture:(M,F)=>{x.ingest({kind:"posthog",event:M,properties:F,timestamp:Date.now()})},onRRWebEvent:M=>{x.ingest(M)}}),console.log(`[Syntro Bootstrap] Telemetry client created (${E}) with EventBus wiring`);let R=g;S.setPosthogCapture((M,F)=>{R.track?.(M,F)})}let m;r?.e&&(f=JR("growthbook",{clientKey:r.e,apiHost:n,attributes:c,onExperimentViewed:g?.trackExperiment?(E,R,M)=>{g.trackExperiment(E,R,M)}:void 0})),m=lh({experiments:f,onMetricChange:(E,R)=>{K("Syntro Bootstrap",`Session metric changed: ${E} = ${R}`)}}),K("Syntro Bootstrap","SessionMetricTracker created");let y="production";e==="editor"?y="editor":e==="audit"?y="audit":Wa("NODE_ENV")==="development"&&(y="development");let v=Tm({telemetry:g,sessionMetrics:m,mode:y,events:S});K("Syntro Bootstrap","Runtime created:",{version:v.version,mode:v.mode,hasContext:!!v.context,hasEvents:!!v.events,hasState:!!v.state}),K("Syntro Bootstrap","Core app executors already registered");let C=t.cdnBase||Wa("NEXT_PUBLIC_SYNTRO_CDN_BASE")||Wa("VITE_SYNTRO_CDN_BASE")||"https://cdn.syntrologie.com",w=ip({cdnBase:C,registry:v.apps,onLoadStart:E=>{K("Syntro Bootstrap",`Loading app from CDN: ${E}`)},onLoadEnd:(E,R,M)=>{R?K("Syntro Bootstrap",`App loaded successfully: ${E}`):na("Syntro Bootstrap",`Failed to load app: ${E}`,M)}});typeof window<"u"&&(window.SynOS={...window.SynOS,appRegistry:v.apps,runtime:v,version:v.version},K("Syntro Bootstrap","Global SynOS object exposed"));let _=v.apps.list?.()??[];console.log(`[DIAG] Activation loop: ${_.length} apps in registry:`,_.map(E=>`${E.manifest.id}(${E.state})`).join(", "));for(let E of _)if(E.state==="registered")try{await v.apps.activate(E.manifest.id),console.log(`[DIAG] Activated: ${E.manifest.id} \u2192 widgets: [${v.widgets.list().join(", ")}]`)}catch(R){console.error(`[DIAG] FAILED to activate: ${E.manifest.id}`,R),na("Syntro Bootstrap",`Failed to auto-activate built-in app: ${E.manifest.id}`,R)}if(console.log(`[DIAG] Activation complete. Total widgets: [${v.widgets.list().join(", ")}]`),f?.refreshFeatures)try{await f.refreshFeatures(),K("Syntro Bootstrap","GrowthBook features loaded")}catch(E){na("Syntro Bootstrap","Failed to load GrowthBook features:",E)}let L=await d;if(f&&Object.keys(L).length>0){let E={...u,...L};K("Syntro Bootstrap","Merging geo data into GrowthBook attributes:",L),f.setAttributes?.(E)}let A;if(t.fetcher)A=t.fetcher;else if(r?.f){let E=r2(r.f,r.o??{});A=async()=>{let R=await E.fetch();return{...R.config,tiles:R.config.tiles??[]}}}else f&&(A=ni({experiments:f}));let I=new Set,O=A?async()=>{let E=await A(),R=E.tiles?.length??0,M=E.actions?.length??0,F=E.meta?.variant_id;if((R>0||M>0)&&(F||console.warn("[Syntro] Config has content but no meta.variant_id \u2014 intervention tracking disabled")),g&&F){let W=new cl(g,F);W.trackServed(R,M),typeof window<"u"&&(window.SynOS.interventionTracker=W),v.navigation.subscribe(()=>{W.resetPage()})}console.log("[Syntro Bootstrap] Config fetched:",`tiles=${E.tiles?.length??0},`,`actions=${E.actions?.length??0},`,`theme=${E.theme?.name??"none"}`),E.actions?.length>0&&console.log("[Syntro Bootstrap] Actions in config:",E.actions.map((W,ce)=>`[${ce}] ${W.kind}${W.anchorId?` anchor="${W.anchorId.selector}"`:""}${W.label?` "${W.label}"`:""}`).join(", "));let Z=E,U=w.getRequiredApps(Z);return U.length>0?console.log("[Syntro Bootstrap] Required external apps:",U.join(", ")):K("Syntro Bootstrap","No external apps required (all executors are built-in)"),U.length>0&&await w.loadAppsForConfig(Z).then(async ce=>{let Xt=ce.filter(N=>N.success),it=ce.filter(N=>!N.success);Xt.length>0&&console.log(`[Syntro Bootstrap] Apps loaded from CDN: ${Xt.map(N=>N.appId).join(", ")}`);let yt=it.filter(N=>!I.has(N.appId));yt.length>0&&(console.error("[Syntro Bootstrap] Apps FAILED to load from CDN:",yt.map(N=>`${N.appId} (${N.error})`).join(", ")),yt.forEach(N=>I.add(N.appId)));for(let N of U)if(v.apps.has(N))try{await v.apps.activate(N),console.log(`[Syntro Bootstrap] App activated: ${N}`)}catch(te){console.error(`[Syntro Bootstrap] Failed to activate app: ${N}`,te)}else console.error(`[Syntro Bootstrap] App "${N}" required by config but NOT registered.`,`Available apps: [${Array.from(v.apps.list?.()??[]).join(", ")}]`)}),E}:void 0;return{canvas:await Vp({...t.canvas,fetcher:O,integrations:{experiments:f,telemetry:g},editorUrl:i,runtime:v}),runtime:v,experiments:f,telemetry:g,sessionMetrics:m,appLoader:w}}async function yU(t){try{return await i2(t)}catch(e){let a=e instanceof Error?e.message:String(e);console.warn("[Syntrologie] SDK initialization failed:",a),typeof document<"u"&&document.getElementById("syntrologie-anti-flicker")?.remove();return}}function xU(t,e={}){if(typeof window>"u")return;let a=window.SynOS?.runtime;a?.events?.publish&&a.events.publish({name:t,source:"custom",props:e})}var jS={init:yU,encodeToken:Rm,decodeToken:wl,events:{emit:xU}};typeof window<"u"&&(window.Syntro=jS);var GS="2026-04-14T23:47:41.312Z (8e8c3008462)";if(typeof window<"u"){console.log(`[Syntro Runtime] Build: ${GS}`);let t=window.SynOS,e=t?.appRegistry||Ls;window.SynOS={...t,appRegistry:e,_runtimeBuild:GS,React:s2.default,ReactDOM:{...bU,createPortal:Mm.createPortal,flushSync:Mm.flushSync}},AI(e)}return m2(SU);})();
|
|
503
|
+
`)),new Error(`Batch validation failed: ${E}`)}let A=f(),I=[],O=[];try{let E=await Promise.allSettled(_.map(M=>m(M))),R=[];for(let M of E)M.status==="fulfilled"?(I.push(M.value),O.push(M.value)):R.push(M.reason instanceof Error?M.reason:new Error(String(M.reason)));if(R.length>0&&O.length===0)throw R[0];R.length>0&&console.warn(`[ActionEngine] ${R.length}/${_.length} action(s) failed in batch:`,R.map(M=>M.message).join("; "))}catch(E){console.error(`[ActionEngine] Batch apply FAILED. Successfully applied: ${O.length}. Rolling back...`,E);for(let R of O)try{await R.revert()}catch{}throw E}return{id:A,handles:I,async revertAll(){for(let E=I.length-1;E>=0;E--)try{await I[E].revert()}catch(R){console.error(`[ActionEngine] Error reverting action ${I[E].id}:`,R)}},isApplied(){return I.every(E=>E.isApplied())}}}function v(_){return dr(_)}function C(){return Array.from(c.values()).map(_=>({id:_.id,action:_.action,adaptiveId:_.adaptiveId,appliedTs:_.appliedTs,state:_.state}))}function w(){for(let _ of d.values())for(let L of _)try{L()}catch{}d.clear();for(let _ of c.values())if(_.state==="applied")try{_.cleanup()}catch(L){console.error("[ActionEngine] Error during cleanup:",L)}c.clear()}return{apply:m,applyBatch:y,validate:v,getActive:C,destroy:w}}var N4=p.object({selector:p.string(),route:p.union([p.string(),p.array(p.string())])}).strict(),xR=["ui.click","ui.scroll","ui.input","ui.change","ui.submit","ui.hover","ui.idle","ui.scroll_thrash","ui.focus_bounce","nav.page_view","nav.page_leave","behavior.rage_click","behavior.hesitation","behavior.confusion"],bR=p.enum(xR).describe("Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals."),SR=["time_on_page","page_views","scroll_depth"],_R=p.enum(SR).describe("Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.");var em=p.object({type:p.literal("page_url"),url:p.string().describe('URL path to match (e.g. "/pricing", "/dashboard")')}).describe('Fires when the current page URL matches. Use for page-specific actions. Example: {"type": "page_url", "url": "/pricing"}'),tm=p.object({type:p.literal("route"),routeId:p.string().describe("Named route ID from the route filter")}).describe("Fires when the current route matches a named route ID."),am=p.object({type:p.literal("anchor_visible"),anchorId:p.string().describe("CSS selector of the anchor element"),state:p.enum(["visible","present","absent"]).describe('"visible" = in viewport, "present" = in DOM, "absent" = not in DOM')}).describe(`Fires based on a DOM element's visibility state. Example: {"type": "anchor_visible", "anchorId": "#cta-button", "state": "visible"}`),rm=p.object({type:p.literal("event_occurred"),eventName:p.string().describe('Event name (e.g. "ui.click", "$pageview")'),withinMs:p.number().optional().describe("Time window in ms. Omit = any time this session.")}).describe('Fires when a specific event has occurred during this session. Example: {"type": "event_occurred", "eventName": "ui.click", "withinMs": 5000}'),nm=p.object({type:p.literal("state_equals"),key:p.string().describe("Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set()."),value:p.unknown().describe("Expected value to match against")}).describe("Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type."),om=p.object({type:p.literal("viewport"),minWidth:p.number().optional().describe("Minimum viewport width in pixels"),maxWidth:p.number().optional().describe("Maximum viewport width in pixels"),minHeight:p.number().optional().describe("Minimum viewport height in pixels"),maxHeight:p.number().optional().describe("Maximum viewport height in pixels")}).describe('Fires based on viewport (screen) size. Use for responsive behavior. Example: {"type": "viewport", "minWidth": 768} \u2014 fires on tablet and larger.'),im=p.object({type:p.literal("session_metric"),key:_R,operator:p.enum(["gte","lte","eq","gt","lt"]),threshold:p.number().describe("Numeric threshold to compare against")}).describe('Fires when a session metric crosses a threshold. Valid keys: "time_on_page" (seconds), "page_views" (count), "scroll_depth" (0-100). Example: {"type": "session_metric", "key": "time_on_page", "operator": "gte", "threshold": 30}'),sm=p.object({type:p.literal("dismissed"),key:p.string().describe("Dismissal key (usually a tile or action ID)"),inverted:p.boolean().optional().describe("When true, fires if NOT dismissed (default behavior)")}).describe("Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed."),lm=p.object({type:p.literal("cooldown_active"),key:p.string().describe("Cooldown key"),inverted:p.boolean().optional().describe("When true, fires if cooldown is NOT active")}).describe("Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently."),um=p.object({type:p.literal("frequency_limit"),key:p.string().describe("Frequency counter key"),limit:p.number().describe("Maximum allowed count"),inverted:p.boolean().optional().describe("When true, fires if limit NOT reached")}).describe("Checks if a frequency limit has been reached. Use to cap how many times an action fires per session."),dl=p.object({equals:p.union([p.string(),p.number(),p.boolean()]).optional(),contains:p.string().optional()}).describe("Match operator for counter filters. Exactly one of equals or contains must be specified."),fl=p.object({events:p.array(bR).min(1).describe("Event names to count. Use values from the countable events enum."),match:p.record(p.string(),dl).optional().describe("Property filters. Keys are event prop names or element-chain fields (tag_name, $el_text, attr__*). All entries AND together.")}).describe("Defines what events to count. Registered as an accumulator predicate at config-load time."),cm=p.object({type:p.literal("event_count"),key:p.string().describe("Unique key for this counter (used for accumulator registration)"),operator:p.enum(["gte","lte","eq","gt","lt"]),count:p.number().int().min(0).describe("Target count threshold"),withinMs:p.number().positive().optional().describe("Time window in ms. Omit = count across entire session."),counter:fl.optional().describe("Inline counter definition. Defines what events to count.")}).describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. Example: {"type": "event_count", "key": "pricing-clicks", "operator": "gte", "count": 3, "counter": {"events": ["ui.click"], "match": {"attr__data-cta": {"contains": "pricing"}}}}'),_n=p.discriminatedUnion("type",[em,tm,am,rm,nm,om,im,sm,lm,um,cm]),pl=p.object({conditions:p.array(_n).describe("Array of conditions \u2014 ALL must match (AND logic) for this rule to fire."),value:p.unknown().describe("Value returned when all conditions match. For triggerWhen: true = fire the action.")}).describe("A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated top-to-bottom \u2014 first rule where all conditions match wins and returns its value."),hl=p.object({type:p.literal("rules"),rules:p.array(pl).describe("Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins."),default:p.unknown().describe("Fallback value when no rule matches. For triggerWhen: false = do not fire by default.")}).describe("Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match returns its value. If no rule matches, returns default. For triggerWhen: set value=true on matching rules, default=false."),ml=p.object({type:p.literal("score"),field:p.string(),threshold:p.number(),above:p.unknown(),below:p.unknown()}).describe("Score-based strategy. Compares a field value against a threshold."),gl=p.object({type:p.literal("model"),modelId:p.string(),inputs:p.array(p.string()),outputMapping:p.record(p.string(),p.unknown()),default:p.unknown()}).describe("ML model strategy. Sends inputs to a model and maps outputs."),vl=p.object({type:p.literal("external"),endpoint:p.string(),method:p.enum(["GET","POST"]).optional(),default:p.unknown(),timeoutMs:p.number().optional()}).describe("External API strategy. Calls an endpoint to determine the value."),yl=p.discriminatedUnion("type",[hl,ml,gl,vl]),Xc=yl.nullable().optional();var F4=p.object({events:p.array(p.string()),urlContains:p.string().optional(),props:p.record(p.union([p.string(),p.number(),p.boolean()])).optional()}),H4=p.object({title:p.string().optional(),body:p.string().optional(),icon:p.string().optional()}).nullable().optional();var Q0=p.object({include:p.array(p.string()).optional().describe("URL patterns where this tile appears. Supports *, **, :param wildcards. Use sparingly \u2014 mostly to isolate to specific webapp functionality. Omit to appear on all routes."),exclude:p.array(p.string()).optional().describe("URL patterns where this tile should NOT appear. Evaluated before include.")}),Kc=p.object({routes:Q0,onlyIfPopulated:p.boolean().optional().describe("When true, tile is hidden if none of its props.actions[] have an active triggerWhen. Useful for tiles with all-deferred FAQ questions or nav tips. Default: false.")});function U4(t){return _n.safeParse(t)}function z4(t){return yl.safeParse(t)}function q4(t){return Kc.safeParse(t)}var V4=[{defName:"matchOp",schema:dl},{defName:"counterDef",schema:fl},{defName:"activationConfig",schema:Kc},{defName:"routeFilter",schema:Q0},{defName:"ruleStrategy",schema:hl},{defName:"scoreStrategy",schema:ml},{defName:"modelStrategy",schema:gl},{defName:"externalStrategy",schema:vl},{defName:"rule",schema:pl},{defName:"condition",schema:_n}];var J0=p.object({tileId:p.string(),itemId:p.string().optional()}).strict(),$4=p.object({on:p.string(),title:p.string(),body:p.string().optional(),icon:p.string().optional(),ttl:p.number().optional(),cooldown:p.number().optional(),deepLink:J0.optional()}).strict(),j4=p.object({id:p.string(),title:p.string().optional(),subtitle:p.string().optional(),icon:p.string().optional(),priority:p.number().optional(),widget:p.string(),props:p.record(p.unknown()).optional(),activation:Kc.optional(),notifications:p.array($4).optional()}).strict(),G4=p.object({position:p.enum(["left","right"]).optional(),layout:p.enum(["overlay","push"]).optional(),background:p.string().optional(),blur:p.string().optional(),border:p.string().optional(),width:p.string().optional(),transitionDuration:p.string().optional(),transitionEasing:p.string().optional(),transitionFade:p.string().optional()}),W4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),color:p.string().optional(),size:p.string().optional(),shadow:p.string().optional(),borderRadius:p.string().optional(),icon:p.string().optional()}),Z4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),shadow:p.string().optional(),titleColor:p.string().optional(),textColor:p.string().optional(),iconBackground:p.string().optional(),iconShadow:p.string().optional(),headerPadding:p.string().optional(),bodyPadding:p.string().optional(),gap:p.string().optional()}),X4=p.object({background:p.string().optional(),textColor:p.string().optional(),titleColor:p.string().optional(),arrowColor:p.string().optional(),arrowSize:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),scrimOpacity:p.string().optional(),highlightRing:p.string().optional()}),K4=p.object({background:p.string().optional(),textColor:p.string().optional(),textSecondaryColor:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),successColor:p.string().optional(),warningColor:p.string().optional(),errorColor:p.string().optional(),iconBackground:p.string().optional(),progressGradient:p.string().optional()}),Y4=p.object({background:p.string().optional(),backgroundHover:p.string().optional(),border:p.string().optional(),borderRadius:p.string().optional(),textColor:p.string().optional(),textSecondaryColor:p.string().optional(),itemDivider:p.string().optional(),itemGap:p.string().optional(),itemPadding:p.string().optional(),itemFontSize:p.string().optional(),bodyPadding:p.string().optional(),bodyFontSize:p.string().optional(),categoryPadding:p.string().optional(),categoryGap:p.string().optional(),categoryFontSize:p.string().optional(),searchBackground:p.string().optional(),searchColor:p.string().optional(),chevronColor:p.string().optional()}),Q4=p.object({mode:p.enum(["dark","light"]).optional(),fontFamily:p.string().optional(),colorPrimary:p.string().optional(),colorPrimaryHover:p.string().optional(),borderRadius:p.string().optional(),canvas:G4.optional(),launcher:W4.optional(),tile:Z4.optional(),overlay:X4.optional(),notification:K4.optional(),content:Y4.optional()}).strict(),J4=p.object({enabled:p.boolean().optional(),label:p.string().optional(),position:p.string().optional(),animate:p.boolean().optional(),animationStyle:p.enum(["pulse","bounce","glow"]).optional(),notificationCount:p.number().optional()}).strict(),B9=p.object({schemaVersion:p.string().optional(),fetchedAt:p.string().datetime(),configVersion:p.string().optional(),canvasTitle:p.string().optional(),tiles:p.array(j4),actions:p.array(p.any()),theme:Q4.optional(),launcher:J4.optional(),meta:p.object({verificationSteps:p.array(p.union([p.string(),p.object({text:p.string(),check:_n.optional()})])).optional()}).passthrough().optional()}).strict();var wt={triggerWhen:Xc},Ia=p.object({selector:p.string(),route:p.union([p.string(),p.array(p.string())])}).strict(),eS=p.object({color:p.string().optional(),scrimOpacity:p.number().min(0).max(1).optional(),paddingPx:p.number().optional(),radiusPx:p.number().optional()}).strict(),tS=p.enum(["top-left","top-right","bottom-left","bottom-right"]),aS=p.enum(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"]),fm=p.object({label:p.string(),actionId:p.string(),primary:p.boolean().optional()}).strict(),rS=p.object({title:p.string().optional(),body:p.string(),ctaButtons:p.array(fm).optional()}).strict(),nS=p.object({title:p.string().optional(),body:p.string()}).strict(),oS=p.enum(["before","after","prepend","append","replace"]),iS=p.enum(["immediate","hover","click"]),sS=p.object({widgetId:p.string(),props:p.record(p.unknown()).optional(),priority:p.number().optional()}).strict(),lS=p.object({id:p.string(),action:p.any(),route:p.string().optional(),onAction:p.record(p.string()).optional()}).passthrough(),uS=p.enum(["auto","smooth","instant"]),dm=p.enum(["start","center","end","nearest"]),cS=p.object({kind:p.literal("content:setText"),anchorId:Ia,text:p.string(),label:p.string().optional()}).extend(wt).strict(),dS=p.object({kind:p.literal("content:setAttr"),anchorId:Ia,attr:p.string(),value:p.string(),label:p.string().optional()}).extend(wt).strict(),fS=p.object({kind:p.literal("content:addClass"),anchorId:Ia,className:p.string(),label:p.string().optional()}).extend(wt).strict(),pS=p.object({kind:p.literal("content:removeClass"),anchorId:Ia,className:p.string(),label:p.string().optional()}).extend(wt).strict(),hS=p.object({kind:p.literal("content:setStyle"),anchorId:Ia,styles:p.record(p.string()),label:p.string().optional()}).extend(wt).strict(),mS=p.object({kind:p.literal("content:insertHtml"),anchorId:Ia,html:p.string(),position:oS,deepLink:J0.optional(),label:p.string().optional()}).extend(wt).strict(),gS=p.object({kind:p.literal("overlays:highlight"),anchorId:Ia,style:eS.optional(),duration:p.number().optional(),label:p.string().optional()}).extend(wt).strict(),vS=p.object({kind:p.literal("overlays:pulse"),anchorId:Ia,duration:p.number().optional(),label:p.string().optional()}).extend(wt).strict(),yS=p.object({kind:p.literal("overlays:badge"),anchorId:Ia,content:p.string(),position:tS.optional(),label:p.string().optional()}).extend(wt).strict(),xS=p.object({kind:p.literal("overlays:tooltip"),anchorId:Ia,content:rS,trigger:iS.optional(),placement:aS.optional(),waitFor:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),bS=p.object({kind:p.literal("overlays:modal"),content:nS,size:p.enum(["sm","md","lg"]).optional(),blocking:p.boolean().optional(),scrim:p.object({opacity:p.number().min(0).max(1).optional()}).strict().optional(),dismiss:p.object({onEsc:p.boolean().optional(),closeButton:p.boolean().optional(),timeoutMs:p.number().min(0).optional()}).strict().optional(),ctaButtons:p.array(fm).optional(),waitFor:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),SS=p.object({kind:p.literal("navigation:scrollTo"),anchorId:Ia,behavior:uS.optional(),block:dm.optional(),inline:dm.optional(),label:p.string().optional()}).extend(wt).strict(),_S=p.object({kind:p.literal("navigation:navigate"),url:p.string(),target:p.enum(["_self","_blank"]).optional(),label:p.string().optional()}).extend(wt).strict(),CS=p.object({kind:p.literal("core:mountWidget"),slot:p.string(),widget:sS,label:p.string().optional()}).extend(wt).strict(),wS=p.object({kind:p.literal("core:wait"),durationMs:p.number().min(0).optional(),event:p.string().optional(),label:p.string().optional()}).extend(wt).strict(),LS=p.object({kind:p.literal("core:sequence"),actions:p.array(p.any()),label:p.string().optional()}).extend(wt).strict(),kS=p.object({kind:p.literal("core:parallel"),actions:p.array(p.any()),waitFor:p.enum(["all","any"]).optional(),label:p.string().optional()}).extend(wt).strict(),IS=p.object({kind:p.literal("overlays:tour"),tourId:p.string(),steps:p.array(lS).min(1),startStep:p.string().optional(),autoStart:p.boolean().optional(),label:p.string().optional()}).extend(wt).passthrough(),CR=[{defName:"setText",schema:cS},{defName:"setAttr",schema:dS},{defName:"addClass",schema:fS},{defName:"removeClass",schema:pS},{defName:"setStyle",schema:hS},{defName:"insertHtml",schema:mS},{defName:"highlight",schema:gS},{defName:"pulse",schema:vS},{defName:"badge",schema:yS},{defName:"tooltip",schema:xS},{defName:"modal",schema:bS},{defName:"scrollTo",schema:SS},{defName:"navigate",schema:_S},{defName:"mountWidget",schema:CS},{defName:"wait",schema:wS},{defName:"sequence",schema:LS},{defName:"parallel",schema:kS},{defName:"tour",schema:IS}];function pm(t){let e=t?.root??(typeof document<"u"?document.body:null),a=t?.defaultTimeoutMs??5e3,r=new Map,n=new Map,o=null,i=!1;function s(b){if(!e)return null;try{return e.matches(b)?e:e.querySelector(b)}catch{return null}}function l(){for(let[b,g]of r){let m=s(b);if(m){for(let y of g)clearTimeout(y.timer),y.resolve(m);r.delete(b)}}for(let[b,g]of n){let m=s(b);if(m){for(let y of g)y.cancelled||y.cb(m);n.delete(b)}}r.size===0&&n.size===0&&c()}function u(){o||i||typeof MutationObserver>"u"||!e||(o=new MutationObserver(()=>{l()}),o.observe(e,{childList:!0,subtree:!0}))}function c(){o&&(o.disconnect(),o=null)}function d(b,g){let m=r.get(b);m&&(m.delete(g),m.size===0&&r.delete(b)),r.size===0&&n.size===0&&c()}function f(b,g){if(i)return Promise.reject(new Error("AnchorResolver destroyed"));let m=s(b);if(m)return Promise.resolve(m);let y=g??a;return new Promise((v,C)=>{let w={resolve:v,reject:C,timer:setTimeout(()=>{d(b,w),C(new Error(`waitFor("${b}") timed out after ${y}ms`))},y)},_=r.get(b);_||(_=new Set,r.set(b,_)),_.add(w),u()})}function h(b,g){if(i)return()=>{};let m=s(b);if(m)return g(m),()=>{};let y={cb:g,cancelled:!1},v=n.get(b);return v||(v=new Set,n.set(b,v)),v.add(y),u(),()=>{y.cancelled=!0;let C=n.get(b);C&&(C.delete(y),C.size===0&&n.delete(b)),r.size===0&&n.size===0&&c()}}function S(){let b=0;for(let g of r.values())b+=g.size;return b}function x(){i=!0,c();let b=new Error("AnchorResolver destroyed");for(let g of r.values())for(let m of g)clearTimeout(m.timer),m.reject(b);r.clear(),n.clear()}return{resolve:s,waitFor:f,onAppear:h,pendingCount:S,destroy:x}}function eU(){let t=Date.now();return{page:{url:typeof window<"u"?window.location.href:"",title:typeof document<"u"?document.title:void 0},session:{sessionId:"",startTs:t,pageHistory:[]},viewport:{width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0}}}function AS(t,e){if(!e)return;let a;try{a=new URL(t).pathname}catch{a=t}if(e.exclude){for(let r of e.exclude)if(wR(a,r))return}if(e.include){for(let r of e.include)if(wR(a,r))return r;return}return a}function wR(t,e){let a=t.replace(/\/$/,"")||"/",r=e.replace(/\/$/,"")||"/";if(a===r)return!0;let n=r.replace(/:[^/]+/g,"[^/]+").replace(/\*/g,".*");return new RegExp(`^${n}$`).test(a)}var Yc=class{constructor(e){B(this,"context");B(this,"previousContext");B(this,"listeners",new Set);B(this,"telemetry");B(this,"routes");B(this,"navigation");B(this,"cleanupFns",[]);if(this.telemetry=e.telemetry,this.routes=e.routes,this.navigation=e.navigation,this.context=eU(),this.previousContext={...this.context},e.telemetry?.getSessionId){let a=e.telemetry.getSessionId();a&&(this.context.session.sessionId=a)}e.initialPageHistory&&(this.context.session.pageHistory=e.initialPageHistory),this.context.page.routeId=AS(this.context.page.url,this.routes),this.addPageToHistory(this.context.page.url),typeof window<"u"&&this.setupBrowserListeners()}get(){return{...this.context}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setRoutes(e){this.routes=e;let a=AS(this.context.page.url,this.routes);a!==this.context.page.routeId&&this.updateContext({page:{...this.context.page,routeId:a}})}setAnchors(e){this.updateContext({anchors:e})}setSessionId(e){e!==this.context.session.sessionId&&this.updateContext({session:{...this.context.session,sessionId:e}})}destroy(){for(let e of this.cleanupFns)e();this.cleanupFns=[],this.listeners.clear()}setupBrowserListeners(){let e,a=()=>{clearTimeout(e),e=setTimeout(()=>{this.updateViewport()},100)};window.addEventListener("resize",a),this.cleanupFns.push(()=>window.removeEventListener("resize",a));let r=this.navigation.subscribe(()=>this.updatePage());this.cleanupFns.push(r)}updateViewport(){let e={width:window.innerWidth,height:window.innerHeight};(e.width!==this.context.viewport.width||e.height!==this.context.viewport.height)&&this.updateContext({viewport:e})}updatePage(){let e=window.location.href,{title:a}=document,r=AS(e,this.routes),n={url:e,title:a,routeId:r};(n.url!==this.context.page.url||n.title!==this.context.page.title||n.routeId!==this.context.page.routeId)&&(n.url!==this.context.page.url&&this.addPageToHistory(n.url),this.updateContext({page:n}))}addPageToHistory(e){let a={url:e,ts:Date.now()},r=[...this.context.session.pageHistory||[],a];r.length>50&&r.shift(),this.context.session.pageHistory=r}updateContext(e){this.previousContext={...this.context},this.context={...this.context,...e},this.notifyListeners()}notifyListeners(){for(let e of this.listeners)try{e(this.context,this.previousContext)}catch(a){console.error("[ContextManager] Listener error:",a)}}};function hm(t){return new Yc(t)}var LR=p.object({url:p.string(),routeId:p.string().optional(),title:p.string().optional(),locale:p.string().optional()}),kR=p.object({url:p.string(),ts:p.number()}),IR=p.object({sessionId:p.string(),startTs:p.number(),pageHistory:p.array(kR).optional()}),AR=p.object({width:p.number(),height:p.number()}),ER=p.object({x:p.number(),y:p.number(),w:p.number(),h:p.number()}),TR=p.object({anchorId:p.string(),present:p.boolean(),visible:p.boolean().optional(),boundingBox:ER.optional()}),RR=p.record(p.string(),p.union([p.number(),p.string(),p.boolean(),p.undefined()])),MR=p.object({page:LR,session:IR,viewport:AR,anchors:p.array(TR).optional(),augmented:RR.optional()});function tU(t){return MR.safeParse(t)}function ES(t,e){let{context:a,state:r,events:n}=e;switch(t.type){case"page_url":{let{url:o}=t,i=a.page.url.split("?")[0].split("#")[0],s=o.replace(/\*\*/g,"\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\0GLOBSTAR\0/g,".*");return new RegExp(`^${s}$`).test(i)}case"route":return a.page.routeId===t.routeId;case"anchor_visible":{let o=a.anchors?.find(i=>i.anchorId===t.anchorId);switch(t.state){case"visible":return o?.visible===!0;case"present":return o?.present===!0;case"absent":return!o?.present;default:return!1}}case"event_occurred":{if(!n)return!1;let o=t.withinMs??6e4;return n.hasRecentEvent(t.eventName,o)}case"state_equals":return r?.getValue?r.getValue(t.key)===t.value:!1;case"viewport":{let{width:o,height:i}=a.viewport;return!(t.minWidth!==void 0&&o<t.minWidth||t.maxWidth!==void 0&&o>t.maxWidth||t.minHeight!==void 0&&i<t.minHeight||t.maxHeight!==void 0&&i>t.maxHeight)}case"session_metric":{if(!r)return!1;let o=r.getSessionMetric(t.key),{operator:i,threshold:s}=t;switch(i){case"gte":return o>=s;case"lte":return o<=s;case"eq":return o===s;case"gt":return o>s;case"lt":return o<s;default:return!1}}case"dismissed":{if(!r)return t.inverted??!1;let o=r.isDismissed(t.key);return t.inverted?!o:o}case"cooldown_active":{if(!r)return t.inverted??!1;let o=r.isCooldownActive(t.key);return t.inverted?!o:o}case"frequency_limit":{if(!r)return t.inverted??!1;let i=r.getFrequencyCount(t.key)>=t.limit;return t.inverted?!i:i}case"event_count":{if(!e.accumulator)return!1;let o=t,i=e.accumulator.getCount(o.key,o.withinMs);switch(o.operator){case"gte":return i>=o.count;case"lte":return i<=o.count;case"eq":return i===o.count;case"gt":return i>o.count;case"lt":return i<o.count;default:return!1}}default:return console.warn("[RuleStrategy] Unknown condition type:",t.type),!1}}function TS(t,e){let a=[];for(let r of t.conditions){let n=ES(r,e);if(a.push({condition:r,result:n}),!n)return{matched:!1,conditionResults:a}}return{matched:!0,conditionResults:a}}function Qc(t,e){for(let a=0;a<t.rules.length;a++){let r=t.rules[a],{matched:n,conditionResults:o}=TS(r,e);if(n)return{value:r.value,isFallback:!1,matchInfo:{strategyType:"rules",matchedRuleIndex:a,evaluatedConditions:o}}}return{value:t.default,isFallback:!0,matchInfo:{strategyType:"rules"}}}function Jc(t,e){let{context:a}=e,r=a.augmented?.[t.field];return r===void 0||typeof r!="number"?{value:t.below,isFallback:!0,matchInfo:{strategyType:"score"}}:{value:r>=t.threshold?t.above:t.below,isFallback:!1,matchInfo:{strategyType:"score"}}}function OR(t,e){let{state:a,events:r,sessionMetrics:n,accumulator:o}=e;return{context:t,state:a?{isDismissed:i=>a.dismissals.isDismissed(i),isCooldownActive:i=>a.cooldowns.isActive(i),getFrequencyCount:i=>a.frequency.count(i),getSessionMetric:i=>n?.get(i)??0,getValue:i=>a.session.get(i)??a.user.get(i)}:void 0,events:r?{hasRecentEvent:(i,s)=>r.hasRecentEvent(i,s)}:void 0,accumulator:o?{getCount:(i,s)=>o.getCount(i,s)}:void 0}}async function RS(t,e,a={}){let r=OR(e,a);switch(t.type){case"rules":return Qc(t,r);case"score":return Jc(t,r);case"model":return{value:t.default,isFallback:!0,matchInfo:{strategyType:"model"}};case"external":return{value:t.default,isFallback:!0,matchInfo:{strategyType:"external"}};default:return console.warn("[DecisionEngine] Unknown strategy type:",t.type),{value:void 0,isFallback:!0,matchInfo:{strategyType:t.type}}}}function MS(t,e,a={}){let r=OR(e,a);switch(t.type){case"rules":return Qc(t,r);case"score":return Jc(t,r);case"model":case"external":return{value:t.default,isFallback:!0,matchInfo:{strategyType:t.type}};default:return{value:void 0,isFallback:!0,matchInfo:{strategyType:t.type}}}}function mm(t){return{evaluate:(e,a)=>RS(e,a,t),evaluateSync:(e,a)=>MS(e,a,t)}}function gm(t){let{eventBus:e,stateStore:a}=t,r=new Map,n=new Set,o=null,i=a.ns("accumulator");function s(u){let c=!1;for(let d of r.values()){if(!d.predicate(u))continue;let f=i.get(d.stateKey)||{count:0};f.count++,d.needsTimestamps&&(f.timestamps||(f.timestamps=[]),f.timestamps.push(u.ts),f.timestamps.length>200&&(f.timestamps=f.timestamps.slice(-200))),i.set(d.stateKey,f),c=!0}if(c)for(let d of n)try{d()}catch(f){console.error("[EventAccumulator] Subscriber error:",f)}}function l(){o||r.size===0||(o=e.subscribe(s))}return{register(u,c,d=!1){let f=`ev:${u}`,h=r.get(f);if(h){d&&!h.needsTimestamps&&(h.needsTimestamps=!0);return}r.set(f,{stateKey:f,needsTimestamps:d,predicate:c}),l()},getCount(u,c){let d=`ev:${u}`,f=i.get(d);if(!f)return 0;if(c===void 0||!f.timestamps)return f.count;let h=Date.now()-c;return f.timestamps.filter(S=>S>=h).length},subscribe(u){return n.add(u),()=>{n.delete(u)}},destroy(){o&&(o(),o=null),r.clear(),n.clear()}}}var DR="app:",aU="syntro:",rU=/^[a-z][a-z0-9_]*$/;function vm(t){if(!t)return{valid:!1,reason:"Event name cannot be empty"};if(t.startsWith(aU))return{valid:!1,reason:'"syntro:" prefix is reserved for internal SDK events'};if(!t.startsWith(DR))return{valid:!1,reason:`Custom events must start with "app:" prefix. Got: "${t}"`};let e=t.slice(DR.length).split(":");if(e.length<2)return{valid:!1,reason:`Event name must have at least 2 segments after "app:" (app:{category}:{action}). Got: "${t}"`};for(let a of e)if(!rU.test(a))return{valid:!1,reason:`Segment "${a}" must be lowercase alphanumeric + underscores. Got: "${t}"`};return{valid:!0}}function nU(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===null}function BR(t,e,a=0){if(a>=e)return!1;for(let r of Object.values(t))if(r!==null&&typeof r=="object"&&!Array.isArray(r)&&!BR(r,e,a+1))return!1;return!0}function ym(t){if(t===void 0)return{valid:!0};if(t===null||typeof t!="object"||Array.isArray(t))return{valid:!1,reason:"Props must be a plain object"};if(!BR(t,2))return{valid:!1,reason:"Props nesting depth exceeds 2 levels"};let e=[];for(let[a,r]of Object.entries(t))r!==null&&typeof r=="object"||nU(r)||e.push(a);return e.length>0?{valid:!0,stripped:e}:{valid:!0}}function xm(t,e){return e?!(e.names&&e.names.length>0&&!e.names.includes(t.name)||e.patterns&&e.patterns.length>0&&!e.patterns.some(r=>{try{return new RegExp(r).test(t.name)}catch{return!1}})||e.sources&&e.sources.length>0&&!e.sources.includes(t.source)):!0}var ed=class{constructor(e={}){B(this,"subscriptions",new Set);B(this,"history",[]);B(this,"maxHistorySize");B(this,"debug");B(this,"emitHistory");B(this,"posthogCapture");B(this,"testMode");this.maxHistorySize=e.maxHistorySize??100,this.debug=e.debug??!1,this.emitHistory=e.history??null,this.posthogCapture=e.posthogCapture??null,this.testMode=e.testMode??!1}subscribe(e,a){let r,n;typeof e=="function"?(r=void 0,n=e):(r=e,n=a);let o={filter:r,callback:n};return this.subscriptions.add(o),()=>{this.subscriptions.delete(o)}}publish(e,a,r="canvas"){let n={ts:Date.now(),name:e,source:r,props:a,schemaVersion:et};this.publishEvent(n)}publishEvent(e){this.history.push(e),this.history.length>this.maxHistorySize&&this.history.shift();for(let a of this.subscriptions)if(xm(e,a.filter))try{a.callback(e)}catch(r){console.error("[EventBus] Subscriber error:",r)}}emit(e,a){let r=vm(e);if(!r.valid)return console.warn(`[EventBus] emit() rejected: ${r.reason}`),this.debug?{delivered:!1,matchedRules:[],posthogCaptured:!1,listenersNotified:0}:void 0;let n=ym(a);if(!n.valid)return console.warn(`[EventBus] emit() rejected props: ${n.reason}`),this.debug?{delivered:!1,matchedRules:[],posthogCaptured:!1,listenersNotified:0}:void 0;let o={ts:Date.now(),name:e,source:"custom",props:a,schemaVersion:et};this.history.push(o),this.history.length>this.maxHistorySize&&this.history.shift();let i=0;for(let l of this.subscriptions)if(xm(o,l.filter))try{l.callback(o),i++}catch(u){console.error("[EventBus] Subscriber error:",u),i++}let s=!1;if(this.posthogCapture&&!this.testMode)try{this.posthogCapture(e,a),s=!0}catch(l){console.error("[EventBus] PostHog capture error:",l)}if(this.emitHistory&&this.emitHistory.record({name:e,props:a,source:"custom",timestamp:o.ts,matchedRules:[]}),this.debug)return console.debug("[EventBus] emit()",{name:e,props:a,listenersNotified:i,posthogCaptured:s}),{delivered:!0,matchedRules:[],posthogCaptured:s,listenersNotified:i}}setPosthogCapture(e){this.posthogCapture=e}getRecent(e,a){let r=this.history;return e&&(r=r.filter(n=>xm(n,e))),a&&a>0&&(r=r.slice(-a)),r}hasRecentEvent(e,a,r){let n=Date.now()-a;return this.history.some(o=>o.name===e&&o.ts>=n&&(r===void 0||o.source===r))}countRecentEvents(e,a){let r=this.history.filter(n=>xm(n,e));if(a!==void 0){let n=Date.now()-a;r=r.filter(o=>o.ts>=n)}return r.length}clearHistory(){this.history=[]}getSubscriberCount(){return this.subscriptions.size}};function xl(t={}){return new ed(t)}var bl=class{constructor(e=100){B(this,"entries",[]);B(this,"maxSize");this.maxSize=e}record(e){this.entries.push(e),this.maxSize>0&&this.entries.length>this.maxSize&&this.entries.shift()}getAll(){return[...this.entries]}clear(){this.entries=[]}};var OS=p.enum(["posthog","canvas","derived"]),PR=p.object({ts:p.number(),name:p.string(),source:OS,props:p.record(p.string(),p.unknown()).optional(),schemaVersion:p.string()}),NR=p.object({names:p.array(p.string()).optional(),patterns:p.array(p.string()).optional(),sources:p.array(OS).optional()});function oU(t){return PR.safeParse(t)}function iU(t){return NR.safeParse(t)}var Sl=class{constructor(){B(this,"listeners",new Set);B(this,"capturedPushState");B(this,"capturedReplaceState");B(this,"wasNative");B(this,"destroyed",!1);B(this,"onPopState",()=>{this.notify(window.location.href,"popstate")});this.wasNative=this.isNativeFunction(history.pushState),this.capturedPushState=history.pushState,this.capturedReplaceState=history.replaceState,history.pushState=(...e)=>{this.capturedPushState.call(history,...e),queueMicrotask(()=>this.notify(window.location.href,"pushState"))},history.replaceState=(...e)=>{this.capturedReplaceState.call(history,...e),queueMicrotask(()=>this.notify(window.location.href,"replaceState"))},window.addEventListener("popstate",this.onPopState)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}diagnose(){return{isNative:this.wasNative,subscriberCount:this.listeners.size}}destroy(){this.destroyed||(this.destroyed=!0,history.pushState=this.capturedPushState,history.replaceState=this.capturedReplaceState,window.removeEventListener("popstate",this.onPopState),this.listeners.clear())}notify(e,a){if(!this.destroyed)for(let r of this.listeners)try{r(e,a)}catch{}}isNativeFunction(e){try{return Function.prototype.toString.call(e).includes("[native code]")}catch{return!1}}};var DS="cooldown:";function FR(t){return{set(e,a){let r=DS+e,n=Date.now()+a;t.set(r,n)},isActive(e){return this.remaining(e)>0},remaining(e){let a=DS+e,r=t.get(a);if(r===void 0)return 0;let n=r-Date.now();return n<=0?(t.remove(a),0):n},clear(e){let a=DS+e;t.remove(a)}}}var td="dismissed:";function HR(t,e){return{mark(a,r=!1){let n=td+a;(r?e:t).set(n,!0)},isDismissed(a){let r=td+a;return t.has(r)||e.has(r)},clear(a){let r=td+a;t.remove(r),e.remove(r)},clearAll(){for(let a of t.keys())a.startsWith(td)&&t.remove(a);for(let a of e.keys())a.startsWith(td)&&e.remove(a)}}}var BS="freq:";function UR(t){function e(a){let r=BS+a,n=t.get(r);if(n){if(n.resetAt&&Date.now()>=n.resetAt){t.remove(r);return}return n}}return{increment(a,r){let n=BS+a,o=e(a),i=(o?.count??0)+1,s={count:i,resetAt:o?.resetAt??(r?Date.now()+r:void 0)};return t.set(n,s),i},count(a){return e(a)?.count??0},reset(a){let r=BS+a;t.remove(r)},hasReachedLimit(a,r){return this.count(a)>=r}}}var sU="syntro";function PS(t,e){let a=`${e}:`;return{get(r){if(t)try{let n=t.getItem(a+r);if(!n)return;let o=JSON.parse(n);if(o.expiresAt&&Date.now()>=o.expiresAt){t.removeItem(a+r);return}return o.value}catch{return}},set(r,n,o){if(t)try{let i={value:n,expiresAt:o?Date.now()+o:void 0};t.setItem(a+r,JSON.stringify(i))}catch(i){console.warn("[StateStore] Failed to save:",i)}},remove(r){t&&t.removeItem(a+r)},has(r){return t?this.get(r)!==void 0:!1},keys(){if(!t)return[];let r=[];for(let n=0;n<t.length;n++){let o=t.key(n);o?.startsWith(a)&&r.push(o.slice(a.length))}return r},clear(){if(!t)return;let r=this.keys();for(let n of r)t.removeItem(a+n)}}}function ad(t){let e=new Map,a=`${t}:`;return{get(r){let n=e.get(a+r);if(n){if(n.expiresAt&&Date.now()>=n.expiresAt){e.delete(a+r);return}return n.value}},set(r,n,o){e.set(a+r,{value:n,expiresAt:o?Date.now()+o:void 0})},remove(r){e.delete(a+r)},has(r){return this.get(r)!==void 0},keys(){let r=[];for(let n of e.keys())n.startsWith(a)&&r.push(n.slice(a.length));return r},clear(){for(let r of e.keys())r.startsWith(a)&&e.delete(r)}}}var rd=class{constructor(e={}){B(this,"session");B(this,"user");B(this,"dismissals");B(this,"cooldowns");B(this,"frequency");B(this,"namespace");B(this,"namespacedStorages",new Map);this.namespace=e.namespace??sU;let a=r=>typeof r=="object"&&r!==null&&typeof r.setItem=="function";typeof window<"u"?(this.session=a(window.sessionStorage)?PS(window.sessionStorage,this.namespace):ad(this.namespace),this.user=a(window.localStorage)?PS(window.localStorage,this.namespace):ad(this.namespace)):(this.session=ad(this.namespace),this.user=ad(this.namespace)),this.dismissals=HR(this.session,this.user),this.cooldowns=FR(this.user),this.frequency=UR(this.session)}ns(e){let a=`${this.namespace}:${e}`;if(!this.namespacedStorages.has(a)){let r=typeof window<"u"&&typeof sessionStorage<"u"?PS(sessionStorage,a):ad(a);this.namespacedStorages.set(a,r)}return this.namespacedStorages.get(a)}};function bm(t={}){return new rd(t)}function _l(t){return t.startsWith("inline:")?"inline":t.startsWith("adjacent:")?"adjacent":"static"}function nd(t){return t.startsWith("inline:")?t.slice(7):t.startsWith("adjacent:")?t.slice(9):null}var NS={drawer_right:{position:"fixed",top:"0",right:"0",bottom:"0",width:"360px",maxWidth:"90vw"},drawer_left:{position:"fixed",top:"0",left:"0",bottom:"0",width:"360px",maxWidth:"90vw"},drawer_bottom:{position:"fixed",left:"0",right:"0",bottom:"0",maxHeight:"50vh"},overlay_center:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxWidth:"90vw",maxHeight:"90vh"},overlay_corner_br:{position:"fixed",bottom:"16px",right:"16px",maxWidth:"400px",maxHeight:"80vh"},overlay_corner_bl:{position:"fixed",bottom:"16px",left:"16px",maxWidth:"400px",maxHeight:"80vh"},toast_top:{position:"fixed",top:"16px",left:"50%",transform:"translateX(-50%)",maxWidth:"90vw"},toast_bottom:{position:"fixed",bottom:"16px",left:"50%",transform:"translateX(-50%)",maxWidth:"90vw"}},Cl={fade:[{opacity:0},{opacity:1}],slide:[{opacity:0,transform:"translateY(10px)"},{opacity:1,transform:"translateY(0)"}],scale:[{opacity:0,transform:"scale(0.95)"},{opacity:1,transform:"scale(1)"}],none:[]},zR={duration:200,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"};function Sm(t,e,a){let r=NS[e];Object.assign(t.style,r),a&&(a.maxWidth&&(t.style.maxWidth=a.maxWidth),a.maxHeight&&(t.style.maxHeight=a.maxHeight),a.minWidth&&(t.style.minWidth=a.minWidth),a.minHeight&&(t.style.minHeight=a.minHeight))}function _m(t,e,a){let r=a.placement==="auto"?"bottom":a.placement,n=[Yf(a.offset?{mainAxis:a.offset.y,crossAxis:a.offset.x}:8)];return a.flip!==!1&&n.push(Jf()),a.shift!==!1&&n.push(Qf({padding:8})),t.style.position="absolute",t.style.zIndex="2147483646",Kf(e,t,async()=>{let{x:i,y:s,strategy:l}=await ep(e,t,{placement:r,middleware:n});Object.assign(t.style,{position:l,left:`${i}px`,top:`${s}px`})})}function Cm(t,e,a="append"){return t.style.position="relative",t.style.display="inline-block",a==="prepend"?e.insertBefore(t,e.firstChild):e.appendChild(t),()=>{t.remove()}}function wm(t,e){return e==="none"||Cl[e].length===0?null:t.animate(Cl[e],zR)}function Lm(t,e){if(e==="none"||Cl[e].length===0)return Promise.resolve();let a=[...Cl[e]].reverse(),r=t.animate(a,zR);return new Promise(n=>{r.onfinish=()=>n(),r.oncancel=()=>n()})}function km(t,e){let a=document.createElement("div");return a.setAttribute("data-syntro-surface",t),a.setAttribute("data-syntro-mount-id",e),a.className="syntro-surface",Object.assign(a.style,{pointerEvents:"auto",boxSizing:"border-box",overflow:"auto"}),a}function Im(t){switch(_l(t)){case"static":return t.startsWith("drawer")?2147483640:t.startsWith("overlay")?2147483642:t.startsWith("toast")?2147483644:2147483640;case"inline":return 1;case"adjacent":return 2147483638;default:return 2147483640}}function qR(t){if(typeof window.Sanitizer=="function")try{let l=new window.Sanitizer({}).sanitizeToFragment(t),u=document.createElement("div");return u.append(l),u.innerHTML}catch{}let a=document.createElement("template");a.innerHTML=t;let r=a.content,n=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,null),o=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button"]),i=[];for(;n.nextNode();){let s=n.currentNode,l=s.tagName.toLowerCase();if(!o.has(l)){i.push(s);continue}for(let u of Array.from(s.attributes)){let c=u.name.toLowerCase(),d=u.value.trim().toLowerCase(),f=c.startsWith("on"),h=(c==="href"||c==="src")&&d.startsWith("javascript:");(f||h)&&s.removeAttribute(u.name)}}for(let s of i){for(;s.firstChild;)s.parentNode?.insertBefore(s.firstChild,s);s.remove()}return a.innerHTML=(r.firstChild,a.innerHTML)}var lU=0;function Am(t){let{overlayRoot:e,eventBus:a,anchorResolver:r,defaultAnimation:n="fade",widgetRegistry:o}=t,i=new Map,s=new Map,l=new Map;function u(){return`mount-${++lU}`}function c(v,C){a&&a.publish(v,C)}function d(v){let C=l.get(v);if(C){let w=b(v);for(let _ of C)try{_(w)}catch(L){console.error("[Surfaces] State callback error:",L)}}}let f=new Map;function h(v,C,w){switch(C.type){case"html":v.innerHTML=qR(C.content);return;case"widget":{if(o?.has(C.widgetId)){let _=o.mount(C.widgetId,v,C.config);return w&&f.set(w,_),()=>{_.unmount(),w&&f.delete(w)}}console.warn(`[Surfaces] Widget not found: ${C.widgetId}`),v.innerHTML=`<div data-widget-id="${C.widgetId}" data-widget-missing="true">Widget: ${C.widgetId}</div>`;return}case"custom":return C.mount(v);case"react":v.innerHTML="<div data-react-component>React Component</div>";return;default:console.warn("[Surfaces] Unknown content type");return}}function S(v,C,w){let _=u(),L=_l(v),A=w?.priority??0,I=w?.animation??n,O=w?.exclusive??!0,H=i.get(v);if(H&&O){if(H.options.priority>A)throw new Error(`Slot ${v} is occupied by higher priority content (${H.options.priority} > ${A})`);x(H)}let E=km(v,_);E.style.zIndex=String(Im(v));let R;if(L==="static")Sm(E,v,w?.constraints),e.appendChild(E);else if(L==="inline"){let U=nd(v);if(!U)throw new Error(`Invalid inline slot: ${v}`);if(!r)throw new Error("Anchor resolver required for inline slots");let W=r({selector:U,route:"**"});if(!W)throw new Error(`Anchor not found for inline slot: ${U}`);R=Cm(E,W)}else if(L==="adjacent"){let U=nd(v);if(!U)throw new Error(`Invalid adjacent slot: ${v}`);if(!r)throw new Error("Anchor resolver required for adjacent slots");let W=r({selector:U,route:"**"});if(!W)throw new Error(`Anchor not found for adjacent slot: ${U}`);e.appendChild(E),R=_m(E,W,w?.position??{placement:"bottom"})}let M=h(E,C,_);wm(E,I);let F={id:_,slot:v,content:C,options:{priority:A,exclusive:O,animation:I,position:w?.position??{placement:"auto"},constraints:w?.constraints??{},adaptiveId:w?.adaptiveId,autoUnmountOnRouteChange:w?.autoUnmountOnRouteChange??!0},container:E,cleanup:()=>{R?.(),M?.()},mountedAt:Date.now()};return i.set(v,F),s.set(v,(s.get(v)??0)+1),c("surface.mounted",{slot:v,id:_,adaptiveId:w?.adaptiveId}),d(v),{id:_,update(U){let W=i.get(v);if(!W||W.id!==_)throw new Error("Mount no longer active");let ce=f.get(_);if(ce){if(U.type==="widget"){ce.update(U.config),W.content=U;return}ce.unmount(),f.delete(_)}W.container.innerHTML="";let Xt=h(W.container,U,_);if(W.content=U,Xt){let it=W.cleanup;W.cleanup=()=>{it?.(),Xt()}}},setOptions(U){let W=i.get(v);if(!W||W.id!==_)throw new Error("Mount no longer active");U.priority!==void 0&&(W.options.priority=U.priority),U.animation!==void 0&&(W.options.animation=U.animation),U.constraints&&L==="static"&&(U.constraints.maxWidth&&(W.container.style.maxWidth=U.constraints.maxWidth),U.constraints.maxHeight&&(W.container.style.maxHeight=U.constraints.maxHeight),U.constraints.minWidth&&(W.container.style.minWidth=U.constraints.minWidth),U.constraints.minHeight&&(W.container.style.minHeight=U.constraints.minHeight)),d(v)},async unmount(){let U=i.get(v);!U||U.id!==_||await x(U)},isMounted(){return i.get(v)?.id===_},getContainer(){let U=i.get(v);return U?.id===_?U.container:null}}}async function x(v){v.container.isConnected&&await Lm(v.container,v.options.animation);try{v.cleanup?.()}catch(C){console.warn("[Surfaces] Cleanup error during unmount, ignoring:",C)}try{v.container.remove()}catch{}i.delete(v.slot),c("surface.unmounted",{slot:v.slot,id:v.id}),d(v.slot)}function b(v){let C=i.get(v);return{slot:v,occupied:!!C,currentPriority:C?.options.priority,currentAdaptiveId:C?.options.adaptiveId,mountCount:s.get(v)??0,currentMountId:C?.id}}function g(v,C){let w=l.get(v);return w||(w=new Set,l.set(v,w)),w.add(C),()=>{w?.delete(C),w?.size===0&&l.delete(v)}}function m(v,C){let w=i.get(v);return w?C!==void 0?C>=w.options.priority:!1:!0}function y(){for(let v of i.values())try{v.cleanup?.(),v.container.remove()}catch(C){console.error("[Surfaces] Error during cleanup:",C)}i.clear(),l.clear()}return{mount:S,getState:b,onStateChange:g,canMount:m,destroy:y}}var od=class{constructor(){B(this,"widgets",new Map);B(this,"mountedWidgets",new Map);B(this,"mountIdCounter",0);B(this,"runtimeRef");B(this,"listeners",new Set)}bindRuntime(e){this.runtimeRef=e}register(e,a,r="custom",n){if(this.widgets.has(e)){if(this.widgets.get(e).source==="built-in")throw new Error(`Cannot override built-in widget: ${e}`);console.warn(`[WidgetRegistry] Overriding widget: ${e}`)}this.widgets.set(e,{id:e,widget:a,source:r,metadata:n}),this.notify({type:"registered",widgetId:e})}unregister(e){let a=this.widgets.get(e);return a?a.source==="built-in"?(console.warn(`[WidgetRegistry] Cannot unregister built-in widget: ${e}`),!1):(this.widgets.delete(e),this.notify({type:"unregistered",widgetId:e}),!0):!1}unregisterBySource(e){for(let[a,r]of this.widgets.entries())r.source===e&&this.widgets.delete(a)}get(e){return this.widgets.get(e)?.widget}getRegistration(e){return this.widgets.get(e)}has(e){return this.widgets.has(e)}mount(e,a,r){let n=this.widgets.get(e);if(!n)throw new Error(`Widget not found: ${e}`);let o=`widget-mount-${++this.mountIdCounter}`;a.setAttribute("data-widget-mount-id",o),a.setAttribute("data-widget-id",e);let i={...r,runtime:this.runtimeRef},s=n.widget.mount(a,i);return this.mountedWidgets.set(o,{cleanup:s??void 0,container:a}),{widgetId:e,container:a,unmount:()=>{let u=this.mountedWidgets.get(o);u&&(a.isConnected&&u.cleanup?.(),this.mountedWidgets.delete(o),a.removeAttribute("data-widget-mount-id"),a.removeAttribute("data-widget-id"),a.innerHTML="")},update:u=>{if(n.widget.update)n.widget.update(a,u);else{let c=this.mountedWidgets.get(o);if(c){c.cleanup?.(),a.innerHTML="";let d={...u,runtime:this.runtimeRef},f=n.widget.mount(a,d);c.cleanup=f??void 0}}}}}list(){return Array.from(this.widgets.keys())}listRegistrations(){return Array.from(this.widgets.values())}getBySource(e){return Array.from(this.widgets.values()).filter(a=>a.source===e)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(e){for(let a of this.listeners)try{a(e)}catch(r){console.error("[WidgetRegistry] Listener error:",r)}}destroy(){for(let[e,a]of this.mountedWidgets.entries())a.cleanup?.(),a.container.innerHTML="";this.mountedWidgets.clear()}},Em=new od;var HS="2.0.0";function uU(t,e){if(!e)return!0;let a;try{a=new URL(t).pathname}catch{a=t}let r=a.replace(/\/$/,"")||"/";if(e.exclude){for(let n of e.exclude)if(FS(r,n))return!1}if(e.include&&e.include.length>0){for(let n of e.include)if(FS(r,n))return!0;return!1}return!0}function FS(t,e){let a=e.replace(/\/$/,"")||"/";if(t===a)return!0;let r=a.replace(/\*\*/g,"\0GLOBSTAR\0").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\0GLOBSTAR\0/g,".*").replace(/:[^/]+/g,"[^/]+");return new RegExp(`^${r}$`).test(t)}function VR(t){let a=(typeof window<"u"?window.location.pathname:"/").replace(/\/$/,"")||"/";return(Array.isArray(t.route)?t.route:[t.route]).some(n=>{let o=n;if(/^https?:\/\//.test(o))try{o=new URL(o).pathname}catch{}return FS(a,o)})}function Tm(t={}){let{telemetry:e,sessionMetrics:a,routes:r,mode:n="production",namespace:o}=t,i=t.widgets??Em,s=t.executors??Tr,l=t.apps??Ls,u=new Sl,c=hm({telemetry:e,routes:r,navigation:u}),d=t.events??xl(),f=bm({namespace:o}),h=gm({eventBus:d,stateStore:f}),S=mm({state:f,events:d,sessionMetrics:a,accumulator:h}),x=qI(),b=pm(),g=_=>VR(_)?b.resolve(_.selector):null,m=async(_,L)=>{if(!VR(_))return null;try{return await b.waitFor(_.selector,L)}catch{return null}},y=Am({overlayRoot:x,eventBus:d,anchorResolver:g,widgetRegistry:i}),v=Jh({overlayRoot:x,eventBus:d,surfaces:y,anchorResolver:g,waitForAnchor:m,executorRegistry:s,subscribeNavigation:_=>u.subscribe(_),runtime:{evaluateSync:_=>S.evaluateSync(_,c.get()),context:c,accumulator:h}}),C;if(a){a.increment("page_views");let _=typeof window<"u"?window.location.pathname:"/";C=u.subscribe((L,A)=>{if(A!=="replaceState")try{let I=new URL(L).pathname;I!==_&&(_=I,a.increment("page_views"))}catch{}})}let w={telemetry:e,context:c,events:d,state:f,sessionMetrics:a,actions:v,surfaces:y,widgets:i,executors:s,apps:l,accumulator:h,anchorResolver:b,navigation:u,version:HS,mode:n,async evaluate(_){return S.evaluate(_,c.get())},evaluateSync(_){return S.evaluateSync(_,c.get())},async filterTiles(_){let L=c.get().page.url,A=[];for(let I of _){let O=I.activation;if(!O){A.push(I);continue}if(uU(L,O.routes)){if(O.onlyIfPopulated){let H=I.props?.actions??[];if(H.length>0&&!H.some(R=>R.triggerWhen?S.evaluateSync(R.triggerWhen,c.get()).value:!0))continue}A.push(I)}}return A},setRoutes(_){c.setRoutes(_)},destroy(){l.unbind().catch(_=>{console.error("[Runtime] Error unbinding apps registry:",_)}),C?.(),b.destroy(),h.destroy(),u.destroy(),c.destroy(),v.destroy(),y.destroy()}};return l.bind(w),i.bindRuntime(w),w}var $R=p.object({value:p.unknown(),expiresAt:p.number().optional()}),jR=p.object({count:p.number(),resetAt:p.number().optional()});function cU(t){return $R.safeParse(t)}function dU(t){return jR.safeParse(t)}var US="syn_";function wl(t){if(!t.startsWith(US))throw new Error("Invalid Syntro token: must start with 'syn_'");let a=t.slice(US.length).replace(/-/g,"+").replace(/_/g,"/"),r=atob(a),n=JSON.parse(r);if(n.v!==1)throw new Error(`Unsupported token version: ${n.v}`);return n}function Rm(t){let e=JSON.stringify(t),a=btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return US+a}function Wa(t){if(typeof process<"u"&&process.env)return process.env[t];try{let e=(0,eval)("import.meta");if(e?.env)return e.env[t]}catch{}}var WR="syntro_segment_attributes";function ZR(){if(typeof window>"u")return{};try{let t=localStorage.getItem(WR);if(t){let e=JSON.parse(t);return K("Syntro Bootstrap","Loaded cached segment attributes:",e),e}}catch(t){na("Syntro Bootstrap","Failed to load cached segment attributes:",t)}return{}}function XR(t){if(!(typeof window>"u"))try{localStorage.setItem(WR,JSON.stringify(t)),K("Syntro Bootstrap","Cached segment attributes:",t)}catch(e){na("Syntro Bootstrap","Failed to cache segment attributes:",e)}}function KR(t){if(!t)return{};let e={};for(let[a,r]of Object.entries(t))a.startsWith("in_segment_")&&(e[a]=r===!0);return e}function zS(){if(typeof window>"u")return{};let t={};try{let e=new URLSearchParams(window.location.search);for(let a of["utm_source","utm_medium","utm_campaign","utm_content","utm_term"]){let r=e.get(a);r&&(t[a]=r)}}catch{}try{navigator.language&&(t.browser_language=navigator.language),navigator.languages?.length&&(t.browser_languages=[...navigator.languages])}catch{}try{let e=window.innerWidth;t.device_type=e<768?"mobile":e<1024?"tablet":"desktop"}catch{}try{if(document.referrer){t.referrer=document.referrer;try{t.referrer_hostname=new URL(document.referrer).hostname}catch{}}}catch{}try{let e=navigator.userAgent;e.includes("Edg/")?t.browser="Edge":e.includes("OPR/")||e.includes("Opera")?t.browser="Opera":e.includes("Chrome/")&&!e.includes("Chromium")?t.browser="Chrome":e.includes("Safari/")&&!e.includes("Chrome")?t.browser="Safari":e.includes("Firefox/")&&(t.browser="Firefox"),e.includes("Windows")?t.os="Windows":e.includes("iPhone")||e.includes("iPad")?t.os="iOS":e.includes("Mac OS X")||e.includes("Macintosh")?t.os="macOS":e.includes("Android")?t.os="Android":e.includes("Linux")&&(t.os="Linux")}catch{}try{t.page_url=window.location.href,t.page_path=window.location.pathname,t.page_host=window.location.hostname,window.location.search&&(t.page_query=window.location.search)}catch{}return t}var GR="syntro_geo",YR="https://geo.syntrologie.com";async function qS(t){if(typeof window>"u")return{};try{let e=localStorage.getItem(GR);if(e){let a=JSON.parse(e);return K("Syntro Bootstrap","Geo: using cached data:",a),a}}catch{}try{let e=await fetch(t,{signal:AbortSignal.timeout(2e3)});if(e.ok){let a=await e.json(),r={};for(let[n,o]of Object.entries(a))typeof o=="string"&&o&&(r[n]=o);try{localStorage.setItem(GR,JSON.stringify(r))}catch{}return K("Syntro Bootstrap","Geo: fetched from worker:",r),r}}catch{}return{}}var QR={growthbook:t=>sh({...t,autoInit:!0})};function JR(t,e){let a=QR[t];if(!a)throw new Error(`Unknown experiment provider: ${t}. Supported: ${Object.keys(QR).join(", ")}`);return a(e)}var fU=["cdn.syntrologie.com","localhost","127.0.0.1"];function pU(t){try{let e=new URL(t),a=/^(localhost|127\.0\.0\.1)$/.test(e.hostname);return e.protocol!=="https:"&&!a?(console.warn("[SmartCanvas] CDN URL must use HTTPS:",t),!1):fU.some(n=>e.hostname===n)?!0:(console.warn("[SmartCanvas] CDN host not in allowlist:",e.hostname),!1)}catch{return console.warn("[SmartCanvas] Invalid CDN URL:",t),!1}}var VS=class{constructor(e){B(this,"name","cdn");B(this,"url");B(this,"integrity");if(this.url=`${e.baseUrl}/${e.configId}.json`,this.integrity=e.integrity,!pU(this.url))throw new Error(`[SmartCanvas] CDN URL not allowed: ${this.url}`)}async fetch(){let e=performance.now(),a=await fetch(this.url,{credentials:"omit",cache:"default"});if(!a.ok)throw new Error(`[SmartCanvas] Failed to fetch config from CDN (${a.status})`);let r=await a.text();if(this.integrity){let l=await hU(r),u=this.integrity.replace("sha384-","");if(l!==u)throw new Error(`[SmartCanvas] Config integrity check failed. Expected ${u}, got ${l}`)}let n=JSON.parse(r),o=performance.now()-e,i=a.headers.get("cache-control"),s=a.headers.get("age");return{config:n,meta:{source:"cdn",fetchTimeMs:o,cached:i?.includes("public")??!1,cacheAge:s?parseInt(s,10):void 0}}}};async function hU(t){let a=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-384",a),n=new Uint8Array(r);return btoa(String.fromCharCode(...n))}function e2(t){return new VS(t)}var mU="syntro_exp",gU="syntro_var",$S=class{constructor(e){B(this,"name","experiments");B(this,"client");B(this,"featureKey");B(this,"manifestKey");B(this,"variantFlagPrefix");this.client=e.client,this.featureKey=e.featureKey,this.manifestKey=e.manifestKey,this.variantFlagPrefix=e.variantFlagPrefix}async fetch(){let e=performance.now();if(typeof window<"u"){let n=new URLSearchParams(window.location.search),o=n.get(mU),i=n.get(gU);if(o&&i!==null&&this.client.setForcedVariations){let s=parseInt(i,10);Number.isNaN(s)||(console.log(`[SmartCanvas] Preview mode: forcing "${o}" to variation ${s}`),this.client.setForcedVariations({[o]:s}))}}if(this.manifestKey||this.variantFlagPrefix||this.client.getAllFeatures){let n=this.fetchMultiFlag();if(n){let o=performance.now()-e;return{config:n,meta:{source:"experiments",fetchTimeMs:o,cached:!0}}}}if(!this.featureKey)throw new Error("[SmartCanvas] No featureKey configured and no variant flags found. Ensure at least one config feature flag exists in your experiment platform.");let a=this.client.getFeatureValue?.(this.featureKey,null);if(!a||typeof a!="object")throw new Error(`[SmartCanvas] Feature "${this.featureKey}" not found or invalid. Ensure the feature is configured in your experiment platform.`);let r=performance.now()-e;return{config:a,meta:{source:"experiments",fetchTimeMs:r,cached:!0}}}fetchMultiFlag(){let e=this.getVariantFlagKeys();return!e||e.length===0?null:mp(this.client,e)}getVariantFlagKeys(){if(this.manifestKey){let e=this.client.getFeatureValue?.(this.manifestKey,null);if(e&&typeof e=="object"){let a=e.variant_flags;if(a&&a.length>0)return a}}if(this.client.getAllFeatures){let e=this.client.getAllFeatures();return this.variantFlagPrefix?Object.keys(e).filter(a=>a.startsWith(this.variantFlagPrefix)):Object.keys(e)}return[]}};function t2(t){return new $S(t)}var vU="https://cdn.syntrologie.com/configs",a2={cdn:t=>{if(!t.configId)throw new Error("CDN fetcher requires 'configId' option");return e2({baseUrl:t.baseUrl??vU,configId:t.configId,integrity:t.integrity})},experiments:t=>{if(!t.featureKey)throw new Error("Experiments fetcher requires 'featureKey' option");return t2({featureKey:t.featureKey})}};function r2(t,e={}){let a=a2[t];if(!a)throw new Error(`Unknown config fetcher type: ${t}. Supported: ${Object.keys(a2).join(", ")}`);return a(e)}var n2={posthog:t=>Xh(t),noop:()=>gh()};function o2(t,e){let a=n2[t];if(!a)throw new Error(`Unknown telemetry provider: ${t}. Supported: ${Object.keys(n2).join(", ")}`);return a(e)}async function i2(t){ax(),K("Syntro Bootstrap","====== INIT ======"),K("Syntro Bootstrap","Options:",{hasToken:!!t.token,tokenPrefix:`${t.token?.slice(0,15)}...`,hasCanvasOptions:!!t.canvas});let e=bp();if(console.log(`[DIAG] Mode detection: sdkMode=${e}`),console.log("[DIAG] editorSource:",Vu()),console.log("[DIAG] editorConf:",xp()),K("Syntro Bootstrap","SDK mode:",e??"normal"),!e&&typeof window<"u"){let E=!!window.__SYNTRO_EDITOR_PARAMS__,R=!!window.__SYNTRO_AUDIT_LEGEND__,M=!!window.__SYNTRO_REVIEW_DATA__;if(E||R||M){let F=[E&&"__SYNTRO_EDITOR_PARAMS__",R&&"__SYNTRO_AUDIT_LEGEND__",M&&"__SYNTRO_REVIEW_DATA__"].filter(Boolean);console.warn(`[Syntro Bootstrap] \u26A0 Mode detection returned null but mode-specific globals found: ${F.join(", ")}. This suggests URL params were lost (redirect?) but the service worker injected mode data. Check if replaceState failed or if page JS changed the URL before init().`)}}console.log(`[DIAG] Token resolution: options.token=${t.token?t.token.slice(0,15)+"...":"null"}`);let a=t.token;if(!a&&e){let R=xp()?.syntro_token;R?.startsWith("syn_")&&(a=R,K("Syntro Bootstrap",`\u2713 Using syntro_token from editor_conf (${e} mode)`))}let r;if(a)if(a.startsWith("syn_"))K("Syntro Bootstrap","Token starts with syn_, decoding..."),r=wl(a),ax(r.d);else if(e)K("Syntro Bootstrap",`\u2713 Non-syn_ token allowed (${e} mode)`);else throw gp("Syntro Bootstrap","\u274C Token does not start with syn_ and NOT in editor/audit/review mode!"),gp("Syntro Bootstrap","Token received:",a),new Error("Invalid Syntro token: must start with 'syn_'");else if(e)K("Syntro Bootstrap",`\u2713 No token, but ${e} mode - proceeding`);else throw gp("Syntro Bootstrap","\u274C No token provided and NOT in editor/audit/review mode!"),new Error("Syntro token is required (unless in editor, audit, or review mode)");let n=Wa("NEXT_PUBLIC_SYNTRO_EXPERIMENT_HOST")||Wa("VITE_SYNTRO_EXPERIMENT_HOST")||r?.eh,o=Wa("NEXT_PUBLIC_SYNTRO_TELEMETRY_HOST")||Wa("VITE_SYNTRO_TELEMETRY_HOST")||r?.th,i=Wa("NEXT_PUBLIC_SYNTRO_EDITOR_URL")||Wa("VITE_SYNTRO_EDITOR_URL")||t.canvas?.editorUrl,s=r?.g||Wa("NEXT_PUBLIC_SYNTRO_GEO_HOST")||Wa("VITE_SYNTRO_GEO_HOST")||YR,l=ZR(),u=zS(),c={...u,...l};K("Syntro Bootstrap","Phase 1: Browser metadata:",u),K("Syntro Bootstrap","Phase 1: Cached segment attributes:",l);let d=qS(s),f,h=t.debug||t.testMode,S=xl({debug:t.debug,history:h?new bl(t.testMode?0:100):void 0,testMode:t.testMode});console.log("[Syntro Bootstrap] EventBus created");let x=sx({elementResolver:typeof window<"u"?(E,R)=>{let M=document.elementFromPoint(E,R);if(!M)return null;let F={tag_name:M.tagName.toLowerCase()};M.id&&(F.attr__id=M.id),M.className&&typeof M.className=="string"&&(F.classes=M.className.split(" ").filter(Boolean));for(let Z of M.attributes)Z.name.startsWith("data-")&&(F[`attr__${Z.name}`]=Z.value);return F}:void 0});x.onEvent(E=>S.publishEvent(E)),typeof window<"u"&&(setInterval(()=>x.tick(Date.now()),1e3),document.addEventListener("click",E=>{let R=[],M=E.target;for(;M&&M!==document.body;){let F={tag_name:M.tagName.toLowerCase()};for(let Z of M.attributes)(Z.name.startsWith("data-")||Z.name==="id"||Z.name==="class"||Z.name==="aria-label")&&(F[`attr__${Z.name}`]=Z.value);R.push(F),M=M.parentElement}x.enrichClickAttributes(Date.now(),R)},!0));let b=E=>{K("Syntro Bootstrap","Phase 2: PostHog feature flags loaded");let R=KR(E);if(K("Syntro Bootstrap","Segment flags from PostHog:",R),XR(R),f){let M=m?.getAll?.()??{},F={...u,...M,...R};K("Syntro Bootstrap","Updating GrowthBook with attributes:",F),f.setAttributes?.(F)}},g;if(r?.t){let E=r.t==="noop"?"noop":"posthog";g=o2(E,{apiKey:r.t,apiHost:o,enableFeatureFlags:!0,sessionRecording:!r.d,onFeatureFlagsLoaded:b,onCapture:(M,F)=>{x.ingest({kind:"posthog",event:M,properties:F,timestamp:Date.now()})},onRRWebEvent:M=>{x.ingest(M)}}),console.log(`[Syntro Bootstrap] Telemetry client created (${E}) with EventBus wiring`);let R=g;S.setPosthogCapture((M,F)=>{R.track?.(M,F)})}let m;r?.e&&(f=JR("growthbook",{clientKey:r.e,apiHost:n,attributes:c,onExperimentViewed:g?.trackExperiment?(E,R,M)=>{g.trackExperiment(E,R,M)}:void 0})),m=lh({experiments:f,onMetricChange:(E,R)=>{K("Syntro Bootstrap",`Session metric changed: ${E} = ${R}`)}}),K("Syntro Bootstrap","SessionMetricTracker created");let y="production";e==="editor"?y="editor":e==="audit"?y="audit":Wa("NODE_ENV")==="development"&&(y="development");let v=Tm({telemetry:g,sessionMetrics:m,mode:y,events:S});K("Syntro Bootstrap","Runtime created:",{version:v.version,mode:v.mode,hasContext:!!v.context,hasEvents:!!v.events,hasState:!!v.state}),K("Syntro Bootstrap","Core app executors already registered");let C=t.cdnBase||Wa("NEXT_PUBLIC_SYNTRO_CDN_BASE")||Wa("VITE_SYNTRO_CDN_BASE")||"https://cdn.syntrologie.com",w=ip({cdnBase:C,registry:v.apps,onLoadStart:E=>{K("Syntro Bootstrap",`Loading app from CDN: ${E}`)},onLoadEnd:(E,R,M)=>{R?K("Syntro Bootstrap",`App loaded successfully: ${E}`):na("Syntro Bootstrap",`Failed to load app: ${E}`,M)}});typeof window<"u"&&(window.SynOS={...window.SynOS,appRegistry:v.apps,runtime:v,version:v.version},K("Syntro Bootstrap","Global SynOS object exposed"));let _=v.apps.list?.()??[];console.log(`[DIAG] Activation loop: ${_.length} apps in registry:`,_.map(E=>`${E.manifest.id}(${E.state})`).join(", "));for(let E of _)if(E.state==="registered")try{await v.apps.activate(E.manifest.id),console.log(`[DIAG] Activated: ${E.manifest.id} \u2192 widgets: [${v.widgets.list().join(", ")}]`)}catch(R){console.error(`[DIAG] FAILED to activate: ${E.manifest.id}`,R),na("Syntro Bootstrap",`Failed to auto-activate built-in app: ${E.manifest.id}`,R)}if(console.log(`[DIAG] Activation complete. Total widgets: [${v.widgets.list().join(", ")}]`),f?.refreshFeatures)try{await f.refreshFeatures(),K("Syntro Bootstrap","GrowthBook features loaded")}catch(E){na("Syntro Bootstrap","Failed to load GrowthBook features:",E)}let L=await d;if(f&&Object.keys(L).length>0){let E={...u,...L};K("Syntro Bootstrap","Merging geo data into GrowthBook attributes:",L),f.setAttributes?.(E)}let A;if(t.fetcher)A=t.fetcher;else if(r?.f){let E=r2(r.f,r.o??{});A=async()=>{let R=await E.fetch();return{...R.config,tiles:R.config.tiles??[]}}}else f&&(A=ni({experiments:f}));let I=new Set,O=A?async()=>{let E=await A(),R=E.tiles?.length??0,M=E.actions?.length??0,F=E.meta?.variant_id;if((R>0||M>0)&&(F||console.warn("[Syntro] Config has content but no meta.variant_id \u2014 intervention tracking disabled")),g&&F){let W=new cl(g,F);W.trackServed(R,M),typeof window<"u"&&(window.SynOS.interventionTracker=W),v.navigation.subscribe(()=>{W.resetPage()})}console.log("[Syntro Bootstrap] Config fetched:",`tiles=${E.tiles?.length??0},`,`actions=${E.actions?.length??0},`,`theme=${E.theme?.name??"none"}`),E.actions?.length>0&&console.log("[Syntro Bootstrap] Actions in config:",E.actions.map((W,ce)=>`[${ce}] ${W.kind}${W.anchorId?` anchor="${W.anchorId.selector}"`:""}${W.label?` "${W.label}"`:""}`).join(", "));let Z=E,U=w.getRequiredApps(Z);return U.length>0?console.log("[Syntro Bootstrap] Required external apps:",U.join(", ")):K("Syntro Bootstrap","No external apps required (all executors are built-in)"),U.length>0&&await w.loadAppsForConfig(Z).then(async ce=>{let Xt=ce.filter(N=>N.success),it=ce.filter(N=>!N.success);Xt.length>0&&console.log(`[Syntro Bootstrap] Apps loaded from CDN: ${Xt.map(N=>N.appId).join(", ")}`);let yt=it.filter(N=>!I.has(N.appId));yt.length>0&&(console.error("[Syntro Bootstrap] Apps FAILED to load from CDN:",yt.map(N=>`${N.appId} (${N.error})`).join(", ")),yt.forEach(N=>I.add(N.appId)));for(let N of U)if(v.apps.has(N))try{await v.apps.activate(N),console.log(`[Syntro Bootstrap] App activated: ${N}`)}catch(te){console.error(`[Syntro Bootstrap] Failed to activate app: ${N}`,te)}else console.error(`[Syntro Bootstrap] App "${N}" required by config but NOT registered.`,`Available apps: [${Array.from(v.apps.list?.()??[]).join(", ")}]`)}),E}:void 0;return{canvas:await Vp({...t.canvas,fetcher:O,integrations:{experiments:f,telemetry:g},editorUrl:i,runtime:v}),runtime:v,experiments:f,telemetry:g,sessionMetrics:m,appLoader:w}}async function yU(t){try{return await i2(t)}catch(e){let a=e instanceof Error?e.message:String(e);console.warn("[Syntrologie] SDK initialization failed:",a),typeof document<"u"&&document.getElementById("syntrologie-anti-flicker")?.remove();return}}function xU(t,e={}){if(typeof window>"u")return;let a=window.SynOS?.runtime;a?.events?.publish&&a.events.publish({name:t,source:"custom",props:e})}var jS={init:yU,encodeToken:Rm,decodeToken:wl,events:{emit:xU}};typeof window<"u"&&(window.Syntro=jS);var GS="2026-04-15T02:43:01.632Z (27f62451254)";if(typeof window<"u"){console.log(`[Syntro Runtime] Build: ${GS}`);let t=window.SynOS,e=t?.appRegistry||Ls;window.SynOS={...t,appRegistry:e,_runtimeBuild:GS,React:s2.default,ReactDOM:{...bU,createPortal:Mm.createPortal,flushSync:Mm.flushSync}},AI(e)}return m2(SU);})();
|
|
504
504
|
/*! Bundled license information:
|
|
505
505
|
|
|
506
506
|
react/cjs/react.production.js:
|