1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b27f1e0-dafc-4d5d-99c3-e2bee296a6ce",e._sentryDebugIdIdentifier="sentry-dbid-4b27f1e0-dafc-4d5d-99c3-e2bee296a6ce")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3146],{3146:(e,t,n)=>{"use strict";n.d(t,{QT:()=>ee,iW:()=>F});var r=n(80263);function a(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function i(e,t){var n={};if("object"==typeof t)!function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={};for(var i in t){var o=t[i],l=[...r,i];"string"==typeof o||"number"==typeof o||null==o?a[i]=n(o,l):"object"!=typeof o||Array.isArray(o)?console.warn('Skipping invalid key "'.concat(l.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(o)?"Array":typeof o,'"')):a[i]=e(o,n,l)}return a}(t,(t,r)=>{null!=t&&(n[a(function(e,t){var n=e;for(var r of t){if(!(r in n))throw Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}(e,r))]=String(t))});else for(var r in e){var i=e[r];null!=i&&(n[a(r)]=i)}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(e=>"".concat(e,":").concat(this[e])).join(";")},writable:!1}),n}var o=n(53239);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){!function(e,t,n){var r;(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}var u=(e,t,n)=>{for(var r of Object.keys(e)){var a;if(e[r]!==(null!=(a=t[r])?a:n[r]))return!1}return!0},d=e=>{var t=t=>{var n=e.defaultClassName,r=s(s({},e.defaultVariants),t);for(var a in r){var i,o=null!=(i=r[a])?i:e.defaultVariants[a];if(null!=o){var l=o;"boolean"==typeof l&&(l=!0===l?"true":"false");var c=e.variantClassNames[a][l];c&&(n+=" "+c)}}for(var[d,p]of e.compoundVariants)u(d,r,e.defaultVariants)&&(n+=" "+p);return n};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return c(e.variantClassNames,e=>c(e,e=>e.split(" ")[0]))}},t},p=n(19010),v=Object.defineProperty,f=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function b(e,t,n){let r=()=>{t.forEach(t=>{e.removeEventListener(t,r)}),n()};t.forEach(t=>{e.addEventListener(t,r)})}var g=()=>{};function x(e){requestAnimationFrame(()=>{requestAnimationFrame(()=>{e()})})}function S(){let[e,t]=(0,o.useReducer)(()=>!0,!1);return(0,o.useEffect)(()=>{t()},[]),e}function k(){return(0,p.v5)()}var P={};function w({styleName:e,refs:t,effect:n,effectDeps:r}){let a=k();(0,o.useEffect)(()=>a?(P[e]||(P[e]=new Map),P[e].set(a.zIndex,{refs:t,hasEffect:!!n}),()=>{P[e].delete(a.zIndex)}):g,[null==a?void 0:a.id,t,n]),(0,o.useEffect)(()=>{if(!a||!n)return g;let t=(()=>{let t=[];for(let n=1;n<=a.zIndex;n+=1){let r=P[e].get(a.zIndex-n);if((null==r?void 0:r.refs)&&(t=[...t,...r.refs]),null==r?void 0:r.hasEffect)break}return t})(),r=n({activityTransitionState:a.transitionState,refs:t});return()=>{null==r||r()}},[null==a?void 0:a.transitionState,...null!=r?r:[]])}var E="--stackflow-swipe-back-ratio";function I(){let e=k(),t=S();var n={},r=t?{"data-stackflow-activity-id":null==e?void 0:e.id,"data-stackflow-activity-is-active":null==e?void 0:e.isActive,"data-stackflow-activity-transition-state":null==e?void 0:e.transitionState}:null;for(var a in r||(r={}))h.call(r,a)&&m(n,a,r[a]);if(f)for(var a of f(r))y.call(r,a)&&m(n,a,r[a]);return n}var A=Object.defineProperty,j=Object.defineProperties,C=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,_=(e,t,n
1)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))D.call(t,n)&&_(e,n,t[n]);if(O)for(var n of O(t))B.call(t,n)&&_(e,n,t[n]);return e},q=(e,t)=>j(e,C(t)),N=e=>(0,r.jsx)("svg",{className:e.className,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.7241 2.76052C17.105 3.16043 17.0896 3.79341 16.6897 4.17431L8.45 12.0222L16.6896 19.8689C17.0896 20.2498 17.105 20.8827 16.7242 21.2827C16.3433 21.6826 15.7103 21.6981 15.3104 21.3172L6.31037 12.7464C6.11218 12.5576 6.00001 12.2959 6 12.0222C5.99999 11.7486 6.11215 11.4868 6.31032 11.2981L15.3103 2.72608C15.7102 2.34518 16.3432 2.3606 16.7241 2.76052Z",fill:"currentColor"})}),T=e=>(0,r.jsx)("svg",{className:e.className,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M20.7071 4.70711C21.0976 4.31658 21.0976 3.68342 20.7071 3.29289C20.3166 2.90237 19.6834 2.90237 19.2929 3.29289L12 10.5858L4.70711 3.29289C4.31658 2.90237 3.68342 2.90237 3.29289 3.29289C2.90237 3.68342 2.90237 4.31658 3.29289 4.70711L10.5858 12L3.29289 19.2929C2.90237 19.6834 2.90237 20.3166 3.29289 20.7071C3.68342 21.0976 4.31658 21.0976 4.70711 20.7071L12 13.4142L19.2929 20.7071C19.6834 21.0976 20.3166 21.0976 20.7071 20.7071C21.0976 20.3166 21.0976 19.6834 20.7071 19.2929L13.4142 12L20.7071 4.70711Z",fill:"currentColor"})}),L={backgroundColor:"var(--stackflow-plugin-basic-ui-background-color)",backgroundImage:"var(--stackflow-plugin-basic-ui-background-image)",dimBackgroundColor:"var(--stackflow-plugin-basic-ui-dim-background-color)",transitionDuration:"var(--stackflow-plugin-basic-ui-transition-duration)",computedTransitionDuration:"var(--stackflow-plugin-basic-ui-computed-transition-duration)",appBar:{borderColor:"var(--stackflow-plugin-basic-ui-app-bar-border-color)",borderColorTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-border-color-transition-duration)",borderSize:"var(--stackflow-plugin-basic-ui-app-bar-border-size)",height:"var(--stackflow-plugin-basic-ui-app-bar-height)",heightTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-height-transition-duration)",minHeight:"var(--stackflow-plugin-basic-ui-app-bar-min-height)",iconColor:"var(--stackflow-plugin-basic-ui-app-bar-icon-color)",iconColorTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-icon-color-transition-duration)",textColor:"var(--stackflow-plugin-basic-ui-app-bar-text-color)",textColorTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-text-color-transition-duration)",backgroundColor:"var(--stackflow-plugin-basic-ui-app-bar-background-color)",backgroundColorTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-background-color-transition-duration)",backgroundImage:"var(--stackflow-plugin-basic-ui-app-bar-background-image)",backgroundImageTransitionDuration:"var(--stackflow-plugin-basic-ui-app-bar-background-image-transition-duration)",overflow:"var(--stackflow-plugin-basic-ui-app-bar-overflow)",minSafeAreaInsetTop:"var(--stackflow-plugin-basic-ui-app-bar-min-safe-area-inset-top)"},bottomSheet:{borderRadius:"var(--stackflow-plugin-basic-ui-bottom-sheet-border-radius)"},modal:{borderRadius:"var(--stackflow-plugin-basic-ui-modal-border-radius)",maxWidth:"var(--stackflow-plugin-basic-ui-modal-max-width)"}},z=d({defaultClassName:"_1q6dj2j2",variantClassNames:{theme:{android:"_1q6dj2j0",cupertino:"_1q6dj2j1"}},defaultVariants:{},compoundVariants:[]});function V(e){return Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{})}var M=(0,o.createContext)({theme:"android"}),$=M.Provider;function G(){return(0,o.useContext)(M)}var F=e=>()=>({key:"basic-ui",wrapStack({stack:t,initialContext:n}){var a,o,l,s,c,u,d,p,v,f;let h="function"==typeof e?e({initialContext:n}):e;return(0,r.jsx)($,{value:q(R({},h),{theme:null!=(a=null==n?void 0:n.theme)?a:h.theme}),children:(0,r.jsx)("div",{className:[z({theme:null!=(o=null==n?void 0:n.theme)?o:h.theme}),h.rootClassName].filter(e=>null!=e).join(" "),style:i(V({[L.backgroundColor]:h.backgroundColor,[L.backgroundImage]:h.backgroundImage,[L.dimBackgroun
1dColor]:h.dimBackgroundColor,[L.transitionDuration]:`${t.transitionDuration}ms`,[L.computedTransitionDuration]:"loading"===t.globalTransitionState?`${t.transitionDuration}ms`:"0ms",[L.appBar.borderColor]:null==(l=h.appBar)?void 0:l.borderColor,[L.appBar.borderSize]:null==(s=h.appBar)?void 0:s.borderSize,[L.appBar.height]:null==(c=h.appBar)?void 0:c.height,[L.appBar.iconColor]:null==(u=h.appBar)?void 0:u.iconColor,[L.appBar.textColor]:null==(d=h.appBar)?void 0:d.textColor,[L.appBar.minSafeAreaInsetTop]:null==(p=h.appBar)?void 0:p.minSafeAreaInsetTop,[L.bottomSheet.borderRadius]:null==(v=h.bottomSheet)?void 0:v.borderRadius,[L.modal.borderRadius]:null==(f=h.modal)?void 0:f.borderRadius})),children:t.render()})})}}),H=d({defaultClassName:"_1yk3a452 dhthxq4 dhthxq0 dhthxqh _1yk3a451",variantClassNames:{activityEnterStyle:{slideInLeft:"_1yk3a453"},enterStyle:{cover:"_1yk3a454"},border:{true:"_1yk3a455"},modalPresentationStyle:{fullScreen:"_1yk3a456"}},defaultVariants:{},compoundVariants:[[{activityEnterStyle:"slideInLeft",enterStyle:"cover"},"_1yk3a457"]]}),U="_1yk3a45b dhthxq9 dhthxq7 dhthxqb dhthxqf dhthxqi",W=d({defaultClassName:"dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3 dhthxqc",variantClassNames:{transitionState:{"enter-active":"_1dlf434a","enter-done":"_1dlf434b","exit-active":"_1dlf434c","exit-done":"_1dlf434d"}},defaultVariants:{},compoundVariants:[]}),Z=d({defaultClassName:"_1dlf434q dhthxq4 dhthxq2 dhthxq3 dhthxq1",variantClassNames:{hasAppBar:{true:"_1dlf434r"}},defaultVariants:{},compoundVariants:[]}),Y=d({defaultClassName:"_1dlf434k dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3 _1dlf4348 _1dlf4349",variantClassNames:{hasAppBar:{true:"_1dlf434l dhthxqg"},modalPresentationStyle:{fullScreen:"_1dlf434m"},activityEnterStyle:{slideInLeft:"_1dlf434n"}},defaultVariants:{},compoundVariants:[]}),X=d({defaultClassName:"_1dlf434o dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3",variantClassNames:{hasAppBar:{true:"_1dlf434p"}},defaultVariants:{},compoundVariants:[]}),J={transitionDuration:"var(--_1dlf4340)",zIndexes:{dim:"var(--_1dlf4341)",paper:"var(--_1dlf4342)",edge:"var(--_1dlf4343)",appBar:"var(--_1dlf4344)"},appBar:{topMargin:"var(--_1dlf4345)",center:{mainWidth:"var(--_1dlf4346)"}}},Q=(0,o.forwardRef)(({title:e,renderLeft:t,renderRight:n,backButton:a,closeButton:l,closeButtonLocation:s="left",border:c=!0,modalPresentationStyle:u,activityEnterStyle:d,iconColor:v,iconColorTransitionDuration:f,textColor:h,textColorTransitionDuration:y,borderColor:m,borderColorTransitionDuration:b,borderSize:x,height:P,heightTransitionDuration:w,overflow:E,backgroundColor:A,backgroundColorTransitionDuration:j,backgroundImage:C,backgroundImageTransitionDuration:O,onTopClick:D,enterStyle:B},_)=>{var z,M;let $=(0,p.dN)(),F=k(),W=I();S();let Z=G(),Y=null==(z=Z.appBar)?void 0:z.closeButton,X=null==(M=Z.appBar)?void 0:M.backButton,Q=(0,o.useRef)(null),{maxWidth:K}=function({outerRef:e,innerRef:t,enable:n}){let[r,a]=(0,o.useState)(void 0);return(0,o.useEffect)(()=>{var r;let i=e&&"current"in e&&e.current,o=t.current;return n&&i&&o?((r=()=>{let e=i.clientWidth,t=o.offsetLeft,n=Math.max(t,e-t-o.clientWidth);a(e-2*n)})(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}):g}),{maxWidth:r}}({outerRef:_,innerRef:Q,enable:"cupertino"===Z.theme}),ee=("cupertino"===Z.theme&&"fullScreen"!==u||"slideInLeft"===d)&&"cover"!==B,et=e=>{a&&"onClick"in a&&a.onClick&&a.onClick(e),e.defaultPrevented||$.pop()},en=e=>{var t;l&&"onClick"in l&&l.onClick&&l.onClick(e),!e.defaultPrevented&&Y&&"onClick"in Y&&(null==(t=Y.onClick)||t.call(Y,e))},er=()=>{var e;let t=!F||F.isRoot,n=e=>e&&"render"in e&&e.render||e&&"renderIcon"in e&&e.renderIcon||e&&"onClick"in e&&e.onClick;return(n(l)||n(null==(e=Z.appBar)?void 0:e.closeButton))&&t?l&&"render"in l&&l.render?l.render():Y&&"render"in Y&&Y.render?Y.render():(0,r.jsx)("button",{type:"button",className:"_1yk3a45b dhthxq9 dhthxq7 dhthxqb dhthxqf dhthxqi","aria-label":l&&"ariaLabel"in l?l.ariaLabel:Y&&"ariaLabel"in Y?Y.ariaLabel:void 0,onClick:en,children:l&&"renderIcon"in l&&l.renderIcon?l.renderIcon():Y&&"renderIcon"in Y&&Y.renderIcon?Y.renderIcon():(0,r.jsx)(T,{})}):null};return(0,r.jsxs)("div",q(R({ref:_,className:H({border:c,modalPresentationStyle:u,activityEnterStyle:d,enterStyle:B}),style:i(V({[L.appBar.iconColor]:v,[L.appBar.iconColorTransitionDuration]:f,[L.appBar.textColor]:h,[L.appBar.textColorTransitionDuration]:y,[L.appBar.borderColor]:m,[
1L.appBar.borderColorTransitionDuration]:b,[L.appBar.borderSize]:x,[L.appBar.height]:P,[L.appBar.heightTransitionDuration]:w,[L.appBar.overflow]:E,[L.appBar.backgroundColor]:null!=A?A:ee?L.backgroundColor:"transparent",[L.appBar.backgroundColorTransitionDuration]:j,[L.appBar.backgroundImage]:null!=C?C:ee?L.appBar.backgroundImage:"none",[L.appBar.backgroundImageTransitionDuration]:O,[J.appBar.center.mainWidth]:`${K}px`})),"data-part":"appBar"},W),{children:[(0,r.jsx)("div",{className:"_1yk3a458"}),(0,r.jsxs)("div",{className:"_1yk3a459 dhthxqa dhthxq7 _1yk3a451",children:[(0,r.jsxs)("div",{className:"_1yk3a45a dhthxq9 dhthxq7 dhthxq1 _1yk3a450",children:["left"===s&&er(),(()=>{var e,t;return!F||F.isRoot?null:a||X?a&&"render"in a&&a.render?null==(e=a.render)?void 0:e.call(a):X&&"render"in X&&X.render?null==(t=X.render)?void 0:t.call(X):(0,r.jsx)("button",{type:"button",className:U,"aria-label":a&&"ariaLabel"in a?a.ariaLabel:X&&"ariaLabel"in X?X.ariaLabel:void 0,onClick:et,children:a&&"renderIcon"in a&&a.renderIcon?a.renderIcon():X&&"renderIcon"in X&&X.renderIcon?X.renderIcon():"fullScreen"===u?(0,r.jsx)(T,{}):(0,r.jsx)(N,{})}):(0,r.jsx)("button",{type:"button","aria-label":"Go Back",className:U,onClick:et,children:(0,r.jsx)(N,{})})})(),null==t?void 0:t()]}),(0,r.jsx)("div",{ref:Q,className:"dhthxq9 dhthxq7 dhthxq8 _1yk3a450",children:(0,r.jsxs)("div",{className:"_1yk3a45e",children:["string"==typeof e?(0,r.jsx)("div",{className:"_1yk3a45g dhthxqc dhthxqd dhthxq0",children:e}):e,(0,r.jsx)("button",{className:"_1yk3a45f dhthxqi dhthxq4 dhthxq2 dhthxqf",type:"button",onClick:D})]})}),(0,r.jsxs)("div",{className:"_1yk3a45h dhthxq9 dhthxq7 dhthxq1 dhthxq5 _1yk3a450",children:[null==n?void 0:n(),"right"===s&&er()]})]})]}))});Q.displayName="AppBar";var K=(0,o.createContext)(null),ee=({backgroundColor:e,backgroundImage:t,dimBackgroundColor:n,appBar:a,preventSwipeBack:l,CUPERTINO_ONLY_modalPresentationStyle:s,ANDROID_ONLY_activityEnterStyle:c,children:u})=>{var d;let v,f,h,y,m=G(),P=k(),A=I();S();let{pop:j}=(0,p.dN)(),C=(0,o.useRef)(null),O=(0,o.useRef)(null),D=(0,o.useRef)(null),B=(0,o.useRef)(null),_=(0,o.useRef)(null),N="cupertino"===m.theme?s:void 0,T="android"===m.theme?c:void 0,z=l||"fullScreen"===N,M=!!a,$=function(){var e;let t=k();return(null!=(e=null==t?void 0:t.zIndex)?e:0)*5}();"cupertino"===m.theme?(v=$+2*("fullScreen"===N),f=$+(M&&"fullScreen"!==N?"cover"===a.enterStyle?2:1:3),h=$+4,y=$+7):(v=$,f=$+2*("slideInLeft"!==T||(null==a?void 0:a.enterStyle)==="cover"),h=$+4,y=$+("slideInLeft"===T?6:4));let F=null!=(d=null==P?void 0:P.transitionState)?d:"enter-done",H=function(e){let[t,n]=(0,o.useState)(void 0);return(0,o.useEffect)(()=>{x(()=>{n(e)})},[e]),t}(F);return!function({refs:e}){w({styleName:"hide",refs:e,effect:({activityTransitionState:e,refs:t})=>{let n=()=>{t.forEach(e=>{e.current&&(e.current.style.display="")})};return"enter-done"===e?(t.forEach(e=>{e.current&&(e.current.style.display="none")}),()=>{n()}):(n(),g)}})}({refs:[C]}),!function({refs:e,transitionDuration:t,offsetStyles:n,hasEffect:r=!1}){w({styleName:"offset",refs:e,effect:r?({activityTransitionState:e,refs:r})=>{let a=()=>{x(()=>{r.forEach(e=>{if(!e.current)return;let t=e.current;t.style.transform="",t.style.opacity="",b(t,["transitionend","transitioncancel"],()=>{t.style.transition=""})})})};switch(e){case"enter-active":case"enter-done":if(r.forEach(e=>{e.current&&(e.current.style.transition=t,e.current.style.transform=n.transform,e.current.style.opacity=n.opacity)}),"enter-done"===e)return()=>{a()};return g;case"exit-active":case"exit-done":return x(()=>{a()}),g;default:return g}}:void 0})}({refs:("cupertino"===m.theme||"slideInLeft"===T)&&(null==a?void 0:a.enterStyle)!=="cover"?[D]:[D,_],offsetStyles:"cupertino"===m.theme?{transform:"translate3d(-5rem, 0, 0)",opacity:"1"}:"slideInLeft"===T?{transform:"translate3d(-50%, 0, 0)",opacity:"0"}:{transform:"translate3d(0, -2rem, 0)",opacity:"1"},transitionDuration:L.computedTransitionDuration,hasEffect:"fullScreen"!==N}),!function({dimRef:e,edgeRef:t,paperRef:n,appBarRef:r,offset:a,transitionDuration:i,preventSwipeBack:o,moveAppBarTogether:l,getActivityTransitionState:s,onSwipeStart:c,onSwipeMove:u,onSwipeEnd:d,onTransitionEnd:p}){w({styleName:"swipe-back",refs:l&&r?[n,r]:[n],effect:({refs:v})=>
1{if(o||!e.current||!t.current||!n.current)return g;let f=e.current,h=t.current,y=n.current,m=null==r?void 0:r.current,x=null,S=null,k=null,P=[],w=()=>{x=null,S=null,k=null,P=[]},I=!1,A=e=>{var t;let{activeElement:n}=document;null==(t=null==n?void 0:n.blur)||t.call(n),x=k=e.touches[0].clientX,S=Date.now(),P=v.map(e=>e.current?{style:{transform:e.current.style.transform,transition:e.current.style.transition},parentElement:e.current.parentElement?{style:{display:e.current.parentElement.style.display}}:void 0}:{style:{transform:"",transition:""}}),null==c||c()},j=e=>{if(!x)return void w();let t=(k=e.touches[0].clientX)-x,n=t/y.clientWidth;!function({dx:e,ratio:t}){I||(I=!0,requestAnimationFrame(()=>{f.style.opacity=`${1-t}`,f.style.transition="0s",y.style.overflowY="hidden",y.style.transform=`translate3d(${e}px, 0, 0)`,y.style.transition="0s",l&&m&&(m.style.overflowY="hidden",m.style.transform=`translate3d(${e}px, 0, 0)`,m.style.transition="0s"),null==m||m.style.setProperty(E,String(t)),v.forEach(e=>{var n,r;e.current&&(e.current.style.transform=`translate3d(${-1*(1-t)*a}px, 0, 0)`,e.current.style.transition="0s",(null==(n=e.current.parentElement)?void 0:n.style.display)==="none"&&(e.current.parentElement.style.display="block"),null==(r=e.current.parentElement)||r.style.setProperty(E,String(t)))}),I=!1}))}({dx:t,ratio:n}),null==u||u({dx:t,ratio:n})},C=()=>{if(!x||!S||!k)return void w();let e=Date.now(),t=(k-x)/(e-S)>1||k/y.clientWidth>.4;null==d||d({swiped:t}),Promise.resolve().then(()=>(function({swiped:e}){return new Promise(t=>{requestAnimationFrame(()=>{f.style.opacity=`${+!e}`,f.style.transition=i,y.style.overflowY="hidden",y.style.transform=`translateX(${e?"100%":"0"})`,y.style.transition=i,l&&m&&(m.style.overflowY="hidden",m.style.transform=`translateX(${e?"100%":"0"}
1)`,m.style.transition=i),v.forEach(t=>{t.current&&(t.current.style.transition=i,t.current.style.transform=`translate3d(${e?"0":`-${a/16}rem`}, 0, 0)`)});let n=[...P];t(),b(y,["transitionend","transitioncancel"],()=>{let t=e||"exit-active"===s()||"exit-done"===s();f.style.opacity="",y.style.overflowY="",y.style.transform="",l&&m&&(m.style.overflowY="",m.style.transform="",m.style.removeProperty("transition")),null==m||m.style.removeProperty(E),v.forEach((e,r)=>{var a;if(!e.current)return;let i=n[r];t?(e.current.style.transition="",e.current.style.transform="",e.current.parentElement&&(e.current.parentElement.style.display="")):i&&(e.current.style.transition=i.style.transition,e.current.style.transform=i.style.transform,e.current.parentElement&&i.parentElement&&(e.current.parentElement.style.display=i.parentElement.style.display)),null==(a=e.current.parentElement)||a.style.removeProperty(E)}),null==p||p({swiped:e})})})})})({swiped:t})).then(()=>w())};return h.addEventListener("touchstart",A,{passive:!0}),h.addEventListener("touchmove",j,{passive:!0}),h.addEventListener("touchend",C,{passive:!0}),h.addEventListener("touchcancel",C,{passive:!0}),()=>{h.removeEventListener("touchstart",A),h.removeEventListener("touchmove",j),h.removeEventListener("touchend",C),h.removeEventListener("touchcancel",C)}},effectDeps:[o]})}({dimRef:O,edgeRef:B,paperRef:D,appBarRef:_,offset:80,transitionDuration:L.transitionDuration,moveAppBarTogether:(null==a?void 0:a.enterStyle)==="cover",preventSwipeBack:z||"cupertino"!==m.theme,getActivityTransitionState(){let e=D.current,t=null==e?void 0:e.parentElement;return t?t.classList.contains("_1dlf434a")?"enter-active":t.classList.contains("_1dlf434b")?"enter-done":t.classList.contains("_1dlf434c")?"exit-active":t.classList.contains("_1dlf434d")?"exit-done":null:null},onSwipeEnd({swiped:e}){e&&j()}}),function({ref:e}){let t=(0,p.OA)();(0,o.useEffect)(()=>{if(!t)return;let n=e.current;if(!n||"idle"===t.globalTransitionState)return;let r=e=>{e.preventDefault()},a=e=>{e.preventDefault()};return n.addEventListener("touchstart",r),n.addEventListener("touchend",a),()=>{n.removeEventListener("touchstart",r),n.removeEventListener("touchend",a)}},[null==t?void 0:t.globalTransitionState])}({ref:C}),(0,r.jsx)(K.Provider,{value:(0,o.useMemo)(()=>({scroll({top:e}){var t;null==(t=null==D?void 0:D.current)||t.scroll({top:e,behavior:"smooth"})},zIndices:{dim:v,paper:f,edge:h,appBar:y}}),[D,v,f,h,y]),children:(0,r.jsxs)("div",q(R({ref:C,className:W({transitionState:"enter-done"===F||"exit-done"===F?F:H}),style:i(V({[L.backgroundColor]:e,[L.backgroundImage]:t,[L.dimBackgroundColor]:n,[L.appBar.height]:null==a?void 0:a.height,[L.appBar.heightTransitionDuration]:null==a?void 0:a.heightTransitionDuration,[J.zIndexes.dim]:`${v}`,[J.zIndexes.paper]:`${f}`,[J.zIndexes.edge]:`${h}`,[J.zIndexes.appBar]:`${y}`,[J.transitionDuration]:"enter-active"===F||"exit-active"===F?L.computedTransitionDuration:"0ms"})),"data-stackflow-component-name":"AppScreen"},A),{children:["slideInLeft"!==T&&(0,r.jsx)("div",R({ref:O,className:"_1dlf434j dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3 _1dlf4347 _1dlf4349","data-part":"dim"},A)),a&&(0,r.jsx)(Q,q(R({},a),{ref:_,modalPresentationStyle:N,activityEnterStyle:T,onTopClick:e=>{var t,n;null==(t=null==a?void 0:a.onTopClick)||t.call(a,e),e.defaultPrevented||null==(n=D.current)||n.scroll({top:0,behavior:"smooth"})}})),(0,r.jsx)("div",q(R({ref:D,className:Y({hasAppBar:M,modalPresentationStyle:N,activityEnterStyle:T}),"data-part":"paper"},A),{children:(0,r.jsx)("div",{className:X({hasAppBar:M}),children:u})}),null==P?void 0:P.id),!(null==P?void 0:P.isRoot)&&"cupertino"===m.theme&&!z&&(0,r.jsx)("div",R({ref:B,className:Z({hasAppBar:M}),"data-part":"edge"},A))]}))})};d({defaultClassName:"dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3 dhthxqc",variantClassNames:{transitionState:{"enter-active":"_1ht38h04","enter-done":"_1ht38h05","exit-active":"_1ht38h06","exit-done":"_1ht38h07"}},defaultVariants:{},compoundVariants:[]}),d({defaultClassName:"dhthxq4 dhthxq0 dhthxq1 dhthxq2 dhthxq3 dhthxqc",variantClassNames:{transitionState:{"enter-active":"_5ozg8c4","enter-done":"_5ozg8c5","exit-active":"_5ozg8c6","exit-done":"_5ozg8c7"}},defaultVariants:{},compoundVariants:[]})},19010:(e,t,n)=>{"use strict";n.d(t,{fY:()=>eY,dN:()=>eL,v5:()=>v,OA:()=>y});var r,a,i,o=n(53239);function l(){return"undefined"!=typeof window}var s=n(64757);function c(e){let t=(0,o.useRef)(e),n=t.current,r=s(n,e);return(0,o.useEffect)(()=>{r||(t.current=e)},[e]),r?n:e}var u=n(80263),d=(0,o.createContext)(null),p=({children:e,value:t})=>(0,u.jsx)(d.Provider,{value:c(t),children:e});
1p.displayName="ActivityProvider";var v=()=>(0,o.useContext)(d),f=(0,o.createContext)(null),h=({children:e,value:t})=>(0,u.jsx)(f.Provider,{value:c(t),children:e});h.displayName="StackProvider";var y=()=>(0,o.useContext)(f),m=Object.defineProperty,b=Object.defineProperties,g=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,P=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))S.call(t,n)&&P(e,n,t[n]);if(x)for(var n of x(t))k.call(t,n)&&P(e,n,t[n]);return e},E=(e,t)=>b(e,g(t));function I(e,t,n){let r=n(e),a=n(t);return r<a?-1:+(r!==a)}function A(e,t){return e.map((e,n)=>t(e)?n:void 0).filter(e=>"number"==typeof e)}var j=0,C=0,O=()=>{let e=new Date().getTime();return C===e?j+=1:(C=e,j=0),(1e3*e+j)/1e3};function D(){return(1e3*O()).toString(16)}function B(e){return 0===e.length?void 0:e[e.length-1]}function _(e,t){let n=w({},e);return t.forEach(e=>{delete n[e]}),n}function R(e){return!e.exitedBy}function q(e,t){return t.enteredBy.eventDate-e.enteredBy.eventDate}function N(e){return e.filter(R).sort(q)[0]}function T(e,t){switch(t.name){case"Pushed":case"Replaced":{let n=B(A(e,e=>e.id===t.activityId));return null!=n?n:e.length}default:return -1}}function L(e,t){return{id:e.activityId,name:e.activityName,transitionState:t,params:e.activityParams,context:e.activityContext,steps:[{id:e.activityId,params:e.activityParams,enteredBy:e,zIndex:-1}],enteredBy:e,isTop:!1,isActive:!1,isRoot:!1,zIndex:-1}}function z(e){return(t,n)=>{let r=e[n.name].bind(e);if(r)return r(t,n);throw Error(`No reducer for event ${JSON.stringify(n)}`)}}function V(e){return e}function M(e){return e}function $(e){return(t,n)=>"paused"===t.globalTransitionState?E(w({},t),{pausedEvents:t.pausedEvents?[...t.pausedEvents,n]:[n]}):e(t,n)}function G(e,t){return(n,r)=>{var a;let i=function({transitionDuration:e,now:t,resumedAt:n}){return z({Pushed(r,a){let i=t-(null!=n?n:a.eventDate)>=e,o=a.skipEnterActiveState||i?"enter-done":"enter-active",l=T(r,a);return[...r.slice(0,l),L(a,o),...r.slice(l+1)]},Replaced(r,a){var i,o;let l=t-(null!=n?n:a.eventDate)>=e,s=T(r,a),c=null!=(o=null==(i=r[s])?void 0:i.transitionState)?o:a.skipEnterActiveState||l?"enter-done":"enter-active";return[...r.slice(0,s),L(a,c),...r.slice(s+1)]},Initialized:V,ActivityRegistered:V,Popped:V,StepPushed:V,StepReplaced:V,StepPopped:V,Paused:V,Resumed:V})}({transitionDuration:n.transitionDuration,now:t.now,resumedAt:t.resumedAt}),o=(a={transitionDuration:n.transitionDuration,now:t.now,resumedAt:t.resumedAt},z({Replaced:(e,t)=>E(w({},e),{exitedBy:t,transitionState:"exit-done"}),Popped:(e,t)=>{var n;let r=a.now-(null!=(n=a.resumedAt)?n:t.eventDate)>=a.transitionDuration,i=t.skipExitActiveState||r?"exit-done":"exit-active";return E(w({},e),{exitedBy:t,transitionState:i,params:"exit-done"===i?e.steps[0].params:e.params,steps:"exit-done"===i?[e.steps[0]]:e.steps})},StepPushed:(e,t)=>{var n;let r={id:t.stepId,params:t.stepParams,enteredBy:t,zIndex:e.zIndex,hasZIndex:null!=(n=t.hasZIndex)&&n};return E(w({},e),{params:t.stepParams,steps:[...e.steps,r]})},StepReplaced:(e,t)=>{var n;let r={id:t.stepId,params:t.stepParams,enteredBy:t,zIndex:e.zIndex,hasZIndex:null!=(n=t.hasZIndex)&&n};return E(w({},e),{params:t.stepParams,steps:[...e.steps.slice(0,e.steps.length-1),r]})},StepPopped:(e,t)=>{var n;e.steps.pop();let r=null==(n=B(e.steps))?void 0:n.params;return E(w({},e),{params:null!=r?r:e.params})},Initialized:M,ActivityRegistered:M,Pushed:M,Paused:M,Resumed:M})),l=i(n.activities,r);for(let e of function(e,t,n){let r=[];switch(t.name){case"Replaced":{if(void 0!==B(A(e,e=>e.id===t.activityId)))break;let r=e.slice().sort(q).filter(R),a=n.now-t.eventDate>=n.transitionDuration;if("enter-done"==(t.skipEnterActiveState||a?"enter-done":"enter-active")){let n=r.findIndex(e=>!(t.skipEnterActiveState&&"Replaced"===e.enteredBy.name&&"enter-active"===e.transitionState));return r.slice(0,n+1).map(t=>e.indexOf(t))}break}case"Popped":{let t=e.filter(R).sort(q),n=t.slice(0,t.length-1)[0];n&&r.push(e.indexOf(n));break}case"StepPushed":case"StepReplaced":{let n=N(e);
1if(n){if(t.targetActivityId&&t.targetActivityId!==n.id)break;r.push(e.indexOf(n))}break}case"StepPopped":{let n=N(e);if(n&&n.steps.length>1){if(t.targetActivityId&&t.targetActivityId!==n.id)break;r.push(e.indexOf(n))}}}return r}(n.activities,r,{transitionDuration:n.transitionDuration,now:t.now}))l[e]=o(l[e],r);let s=l.find(e=>"enter-active"===e.transitionState||"exit-active"===e.transitionState),c="paused"===n.globalTransitionState?"paused":s?"loading":"idle";return e(E(w({},n),{activities:l,globalTransitionState:c}),r)}}function F(e){return e}function H(e,t){return e.filter(e=>e.name===t)}function U(e,t){return E(w({id:D(),eventDate:O()},t),{name:e})}function W(e,t){let n=function(e,t){let n=new Map;return[...e].reverse().filter(e=>{let r=t(e);if(null===r)return!0;let a=!!n.get(r);return n.set(r,!0),!a}).reverse()}([...e].sort((e,t)=>I(e,t,e=>e.id)),e=>e.id);if(0===n.length)throw Error("events parameter is empty");if(H(n,"Initialized").length>1)throw Error("InitializedEvent can only exist once");let r=new Set(H(n,"ActivityRegistered").map(e=>e.activityName));if(H(n,"Pushed").some(e=>!r.has(e.activityName)))throw Error("the corresponding activity does not exist");let a=function e(t){return z({Initialized:$(G((e,t)=>E(w({},e),{transitionDuration:t.transitionDuration}),t)),ActivityRegistered:$(G((e,t)=>E(w({},e),{registeredActivities:[...e.registeredActivities,w({name:t.activityName},t.activityParamsSchema?{paramsSchema:t.activityParamsSchema}:null)]}),t)),Paused:$(G((e,t)=>E(w({},e),{globalTransitionState:"paused"}),t)),Resumed:G((n,r)=>{if("paused"!==n.globalTransitionState||!n.pausedEvents)return n;let a=e({now:t.now,resumedAt:r.eventDate}),{pausedEvents:i}=n,o=((e,t)=>{var n={};for(var r in e)S.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&x)for(var r of x(e))0>t.indexOf(r)&&k.call(e,r)&&(n[r]=e[r]);return n})(n,["pausedEvents"]);return i.reduce(a,E(w({},o),{globalTransitionState:"idle"}))},t),Pushed:$(G(F,t)),Replaced:$(G(F,t)),Popped:$(G(F,t)),StepPushed:$(G(F,t)),StepReplaced:$(G(F,t)),StepPopped:$(G(F,t))})}({now:t}),i=n.reduce(a,{activities:[],globalTransitionState:"idle",registeredActivities:[],transitionDuration:0}),o=i.activities.filter(e=>"enter-active"===e.transitionState||"enter-done"===e.transitionState||"exit-active"===e.transitionState),l=o.filter(e=>"enter-active"===e.transitionState||"enter-done"===e.transitionState),s=o[o.length-1],c=l[l.length-1];return E(w({},i),{activities:i.activities.map(e=>{let t=o.findIndex(({id:t})=>t===e.id);for(let e of o.slice(0,t))for(let n of e.steps)n.hasZIndex&&(t+=1);let n=e.steps.reduce((e,n)=>{var r;let a=B(e),i=null!=(r=null==a?void 0:a.zIndex)?r:t;return[...e,E(w({},n),{zIndex:i+ +!!n.hasZIndex})]},[]);return w(w({id:e.id,name:e.name,transitionState:e.transitionState,params:e.params,steps:n,enteredBy:e.enteredBy,zIndex:t,isTop:(null==s?void 0:s.id)===e.id,isActive:(null==c?void 0:c.id)===e.id,isRoot:0===t||1===t&&"enter-active"===e.transitionState&&"Replaced"===e.enteredBy.name},e.exitedBy?{exitedBy:e.exitedBy}:null),e.context?{context:e.context}:null)}).sort((e,t)=>I(e,t,e=>e.id))})}var Z={Pushed:"onBeforePush",Replaced:"onBeforeReplace",Popped:"onBeforePop",StepPushed:"onBeforeStepPush",StepReplaced:"onBeforeStepReplace",StepPopped:"onBeforeStepPop",Paused:"onBeforePause",Resumed:"onBeforeResume"};function Y(e,t,n,r){let a=!1,i=w({},t);for(let t of n){let n=t[Z[e]];n&&n({actionParams:w({},i),actions:E(w({},r),{preventDefault:()=>{a=!0},overrideActionParams:e=>{i=w(w({},i),e)}})})}return{isPrevented:a,nextActionParams:i}}var X=1e3/60;function J(e){var t,n,r,a,i;let o,l=[],c=[{key:"@stackflow/core",onChanged(){l.forEach(e=>e())}},...e.plugins.map(e=>e())],[u,d]=((e,t)=>{let n=[],r=[];return e.forEach(e=>{t(e)?n.push(e):r.push(e)}),[n,r]})(e.initialEvents,e=>"Pushed"===e.name||"StepPushed"===e.name),p=c.reduce((t,n)=>{var r,a,i;return null!=(i=null==(a=n.overrideInitialEvents)?void 0:a.call(n,{initialEvents:t,initialContext:null!=(r=e.initialContext)?r:{}}))?i:t},u);p.length>0&&u.length>0&&p!==u&&(null==(n=null==(t=e.handlers)?void 0:t.onInitialActivityIgnored)||n.call(t,p)),0===p.length&&(null==(a=null==(r=e.handlers)?void 0:r.onInitialActivityNotFound)||a.call(r));let v={value:[...d,...p]},f={value:W(v.value,new Date().getTime())},h={getStack:()=>f.value,dispatchEvent(e,t){let n=U(e,t),r=W([...v.value,n],new Date().getTime());v.value.push(n),y(r);let a=setInterval(()=>{let e=W(v.value,new Date().getTime());s(f.value,e)||y(e),"idle"===e.globalTransitionState&&clearInterval(a)},X)},push:()=>{},replace:()=>{},pop:()=>{},stepPush:()=>{},stepReplace:()=>{},stepPop:()=>{},pause:()=>{},resume:()=>{}},y=e=>{let t=function(e,t){var n,r,a,i,o,l,c,u;let d=[];s(e,t)||d.push({_TAG:"%SOMETHING_CHANGED%"});let p="paused"!==e.globalTransitionState&&"paused"===t.globalTransitionState,v="paused"===e.globalTransitionState&&"paused"!==t.globalTransitionState;p&&d.push({_TAG:"PAUSED"}),v&&d.push({_TAG:"RESUMED"});for(let a=0;a<Math.max(e.activities.length,t.activities.length);a+=1){let i=e.activities[a],o=t.activities[a],l=(null==i?void 0:i.transitionState)==="exit-done"||(null==i?void 0:i.transitionState)==="exit-active",c=(null==o?void 0:o.transitionState)==="enter-active"||(null==o?void 0:o.transitionState)==="enter-done";if(i&&o&&i.id===o.id)for(let e=0;e<Math.max((null!=(n=i.steps)?n:[]).length,(null!=(r=o.steps)?r:[]).length);e+=1){let t=i.steps[e],n=o.steps[e];!t&&n?d.push({_TAG:"STEP_PUSHED",activity:o,step:n}):t&&!n?d.push({_TAG:"STEP_POPPED",activity:o}):i.steps.length===o.steps.length&&t.id!==n.id&&d.push({_TAG:"STEP_REPLACED",activity:o,step:n})}!i&&o||l&&c?d.push({_TAG:"Pushed"===o.enteredBy.name?"PUSHED":"REPLACED",activity:o}
1):i&&o&&i.id===o.id&&!s(_(i,["isActive","isTop","isRoot","transitionState","zIndex"]),_(o,["isActive","isTop","isRoot","transitionState","zIndex"]))&&"Replaced"===o.enteredBy.name&&!s(i.enteredBy,o.enteredBy)&&d.push({_TAG:"REPLACED",activity:o})}for(let n=Math.max(e.activities.length,t.activities.length)-1;n>=0;n-=1){let r=(null==(a=e.activities[n])?void 0:a.transitionState)==="enter-done"||(null==(i=e.activities[n])?void 0:i.transitionState)==="enter-active",s=(null==(o=t.activities[n])?void 0:o.transitionState)==="exit-active"||(null==(l=t.activities[n])?void 0:l.transitionState)==="exit-done",p=(null==(c=t.activities[n+1])?void 0:c.enteredBy.name)==="Replaced"&&(null==(u=t.activities[n+1])?void 0:u.transitionState)==="enter-done";r&&s&&!p&&d.push({_TAG:"POPPED",activity:t.activities[n]})}return d}(f.value,e);f.value=e,t.forEach(e=>{c.forEach(t=>{var n,r,a,i,o,l,s,c,u;switch(e._TAG){case"PUSHED":null==(n=t.onPushed)||n.call(t,{actions:h,effect:e});break;case"REPLACED":null==(r=t.onReplaced)||r.call(t,{actions:h,effect:e});break;case"POPPED":null==(a=t.onPopped)||a.call(t,{actions:h,effect:e});break;case"STEP_PUSHED":null==(i=t.onStepPushed)||i.call(t,{actions:h,effect:e});break;case"STEP_REPLACED":null==(o=t.onStepReplaced)||o.call(t,{actions:h,effect:e});break;case"STEP_POPPED":null==(l=t.onStepPopped)||l.call(t,{actions:h,effect:e});break;case"PAUSED":null==(s=t.onPaused)||s.call(t,{actions:h,effect:e});break;case"RESUMED":null==(c=t.onResumed)||c.call(t,{actions:h,effect:e});break;case"%SOMETHING_CHANGED%":null==(u=t.onChanged)||u.call(t,{actions:h,effect:e})}})})};return Object.assign(h,function({dispatchEvent:e,pluginInstances:t,actions:n}){return{push(r){let{isPrevented:a,nextActionParams:i}=Y("Pushed",r,t,n);a||e("Pushed",i)},replace(r){let{isPrevented:a,nextActionParams:i}=Y("Replaced",r,t,n);a||e("Replaced",i)},pop(r={}){let{isPrevented:a,nextActionParams:i}=Y("Popped",r,t,n);a||e("Popped",i)},stepPush(r){let{isPrevented:a,nextActionParams:i}=Y("StepPushed",r,t,n);a||e("StepPushed",i)},stepReplace(r){let{isPrevented:a,nextActionParams:i}=Y("StepReplaced",r,t,n);a||e("StepReplaced",i)},stepPop(r={}){let{isPrevented:a,nextActionParams:i}=Y("StepPopped",r,t,n);a||e("StepPopped",i)},pause(r={}){let{isPrevented:a,nextActionParams:i}=Y("Paused",r,t,n);a||e("Paused",i)},resume(r={}){let{isPrevented:a,nextActionParams:i}=Y("Resumed",r,t,n);a||e("Resumed",i)}}}({dispatchEvent:h.dispatchEvent,pluginInstances:c,actions:h})),{actions:h,init:(i=()=>{c.forEach(e=>{var t;null==(t=e.onInit)||t.call(e,{actions:h})})},o=!1,()=>{o||(o=!0,i())}),pullEvents:()=>v.value,subscribe:e=>(l.push(e),function(){let t=l.findIndex(t=>t===e);t>-1&&l.splice(t,1)}),pluginInstances:c}}var Q=e=>t=>t.find(({id:t})=>t===e);function K(e){return!e.exitedBy}function ee(e,t){return t.enteredBy.eventDate-e.enteredBy.eventDate}function et(e){return e.filter(K).sort(ee)[0]}var en=null!=(r=o.useDeferredValue)?r:e=>e,er=null!=(a=o.useSyncExternalStore)?a:(e,t)=>{let[n,r]=(0,o.useState)(()=>t());return(0,o.useEffect)(()=>e(()=>{r(()=>t())})),n},ea=null!=(i=o.useTransition)?i:()=>[!1,e=>e()],ei=(0,o.createContext)(null),eo=(0,o.createContext)(null),el=({coreStore:e,children:t})=>{let n=en(er(e.subscribe,e.actions.getStack,e.actions.getStack));return(0,u.jsx)(eo.Provider,{value:n,children:(0,u.jsx)(ei.Provider,{value:e.actions,children:t})})};el.displayName="CoreProvider";var es=()=>(0,o.useContext)(ei),ec=()=>(0,o.useContext)(eo),eu=(0,o.createContext)(null),ed=({children:e,value:t})=>(0,u.jsx)(eu.Provider,{value:t,children:e});function ep(){return(0,o.useContext)(eu)}ed.displayName="PluginsProvider";var ev=Object.defineProperty,ef=Object.defineProperties,eh=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,em=Object.prototype.hasOwnProperty,eb=Object.prototype.propertyIsEnumerable,eg=(e,t,n)=>t in e?ev(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ex=(e,t)=>{for(var n in t||(t={}))em.call(t,n)&&eg(e,n,t[n]);if(ey)for(var n of ey(t))eb.call(t,n)&&eg(e,n,t[n]);return e},eS=(e,t)=>ef(e,eh(t)),ek=({activityComponentMap:e,plugin:t,initialContext:n})=>{let r=ec(),a=ep();return t.render({stack:eS(ex({},r),{render:t=>({activities:ex(ex({},r),t).activities.map(t=>eS(ex({},t),{key:t.id,render(r){let i=e[t.name],o=(0,u.jsx)(i,{params:t.params});
1return a.forEach(e=>{var r,a;o=null!=(a=null==(r=e.wrapActivity)?void 0:r.call(e,{activity:eS(ex({},t),{render:()=>o}),initialContext:n}))?a:o}),(0,u.jsx)(p,{value:ex(ex({},t),r),children:o},t.id)}}))})}),initialContext:n})};ek.displayName="PluginRenderer";var eP=Object.defineProperty,ew=Object.defineProperties,eE=Object.getOwnPropertyDescriptors,eI=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,ej=Object.prototype.propertyIsEnumerable,eC=(e,t,n)=>t in e?eP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eO=({activityComponentMap:e,initialContext:t})=>{let n=ec(),r=ep(),a=r.filter(e=>!!e.render);(0,o.useEffect)(()=>{0===a.length&&console.warn('Stackflow - There is no rendering plugin, so "<Stack />" doesn\'t render anything. If you want to render some UI, use "@stackflow/plugin-renderer-basic" or add another rendering plugin.')},[a]);let i=(0,u.jsx)(u.Fragment,{children:a.map(n=>(0,u.jsx)(ek,{activityComponentMap:e,plugin:n,initialContext:t},n.key))});return r.forEach(e=>{var r,a;i=null!=(a=null==(r=e.wrapStack)?void 0:r.call(e,{stack:ew(((e,t)=>{for(var n in t||(t={}))eA.call(t,n)&&eC(e,n,t[n]);if(eI)for(var n of eI(t))ej.call(t,n)&&eC(e,n,t[n]);return e})({},n),eE({render:()=>i})),initialContext:t}))?a:i}),(0,u.jsx)(h,{value:n,children:i})};eO.displayName="MainRenderer";var eD=Object.defineProperty,eB=Object.getOwnPropertySymbols,e_=Object.prototype.hasOwnProperty,eR=Object.prototype.propertyIsEnumerable,eq=(e,t,n)=>t in e?eD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eN=(e,t)=>{for(var n in t||(t={}))e_.call(t,n)&&eq(e,n,t[n]);if(eB)for(var n of eB(t))eR.call(t,n)&&eq(e,n,t[n]);return e};function eT(e){return e&&null!=e.animate?{skipActiveState:!e.animate}:{skipActiveState:!1}}function eL(){let e=es(),[t]=ea();return(0,o.useMemo)(()=>({pending:t,push(t,n,r){let a=D();return null==e||e.push({activityId:a,activityName:t,activityParams:n,skipEnterActiveState:eT(r).skipActiveState}),{activityId:a}},replace(t,n,r){var a;let i=D();return null==e||e.replace({activityId:null!=(a=null==r?void 0:r.activityId)?a:D(),activityName:t,activityParams:n,skipEnterActiveState:eT(r).skipActiveState}),{activityId:i}},pop(t,n){let r=1,a={};"object"==typeof t&&(a=eN({},t)),"number"==typeof t&&(r=t),n&&(a=eN({},n));for(let t=0;t<r;t+=1)null==e||e.pop({skipExitActiveState:0!==t||eT(a).skipActiveState})}}),[null==e?void 0:e.push,null==e?void 0:e.replace,null==e?void 0:e.pop,t])}var ez=()=>{let e=es(),[t]=ea();return(0,o.useMemo)(()=>({pending:t,stepPush(t,n){let r=null==e?void 0:e.getStack().activities,a=(null==n?void 0:n.targetActivityId)?Q(n.targetActivityId):et,i=r&&a(r);if(!i)throw Error("The target activity is not found.");let o="function"==typeof t?t(i.params):t,l=D();null==e||e.stepPush({stepId:l,stepParams:o,targetActivityId:null==n?void 0:n.targetActivityId})},stepReplace(t,n){let r=null==e?void 0:e.getStack().activities,a=(null==n?void 0:n.targetActivityId)?Q(n.targetActivityId):et,i=r&&a(r);if(!i)throw Error("The target activity is not found.");let o="function"==typeof t?t(i.params):t,l=D();null==e||e.stepReplace({stepId:l,stepParams:o,targetActivityId:null==n?void 0:n.targetActivityId})},stepPop(t){null==e||e.stepPop({targetActivityId:null==t?void 0:t.targetActivityId})}}),[null==e?void 0:e.stepPush,null==e?void 0:e.stepReplace,null==e?void 0:e.stepPop,null==e?void 0:e.getStack,t])},eV=Object.defineProperty,eM=Object.defineProperties,e$=Object.getOwnPropertyDescriptors,eG=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,eH=Object.prototype.propertyIsEnumerable,eU=(e,t,n)=>t in e?eV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eW=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&eU(e,n,t[n]);if(eG)for(var n of eG(t))eH.call(t,n)&&eU(e,n,t[n]);return e};function eZ(e){return e&&null!=e.animate?{skipActiveState:!e.animate}:{skipActiveState:!1}}function eY(e){var t;let n=(null!=(t=e.plugins)?t:[]).flat(1/0).map(e=>e),r=Object.entries(e.activities).reduce((e,[t,n])=>eM(eW({},e),e$({[t]:"component"in n?(0,o.memo)(n.component):(0,o.memo)(n)})),{}),a=()=>new Date().getTime()-2*e.transitionDuration,i=J({initialEvents:[U("Initialized",{transitionDuration:e.transitionDuration,eventDate:a()}),...Object.entries(e.activities).map(([e,t])=>U("ActivityRegistered",eW({activityName:e,eventDate:a()},"component"in t?{activityParamsSchema:t.paramsSchema}:null)))],plugins:[]}),[s,c]=function(){let e={value:null};return[function(){return e.value},function(t){e.value=t}]}(),d=(0,o.memo)(t=>{let d=(0,o.useMemo)(()=>{let r=s();if(l()&&r)return r;let o=e.initialActivity?[U("Pushed",{activityId:D(),activityName:e.initialActivity(),activityParams:{},eventDate:a(),skipEnterActiveState:!1})]:[],u=J({initialEvents:[...i.pullEvents(),...o],initialContext:t.initialContext,plugins:n,handlers:{onInitialActivityIgnored:e=>{l()&&console.warn(`Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${e[0].activityName}" in the "stackflow" is ignored.`)},onInitialActivityNotFound:()=>
1{l()&&console.warn("Stackflow - There is no initial activity. If you want to set the initial activity, add the `initialActivity` option of the `stackflow()` function or add a plugin that sets the initial activity. (e.g. `@stackflow/plugin-history-sync`)")}}});return l()&&(u.init(),c(u)),u},[]);return(0,u.jsx)(ed,{value:d.pluginInstances,children:(0,u.jsx)(el,{coreStore:d,children:(0,u.jsx)(eO,{activityComponentMap:r,initialContext:t.initialContext})})})});return d.displayName="Stack",{activities:e.activities,Stack:d,useFlow:eL,useStepFlow:ez,addActivity(e){if(s())return void console.warn("Stackflow - `addActivity()` API cannot be called after a `<Stack />` component has been rendered");r[e.name]=(0,o.memo)(e.component),i.actions.dispatchEvent("ActivityRegistered",{activityName:e.name,activityParamsSchema:e.paramsSchema,eventDate:a()})},addPlugin(e){if(s())return void console.warn("Stackflow - `addPlugin()` API cannot be called after a `<Stack />` component has been rendered");[e].flat(1/0).map(e=>e).forEach(e=>{n.push(e)})},actions:{getStack(){var e,t;return null!=(t=null==(e=s())?void 0:e.actions.getStack())?t:i.actions.getStack()},dispatchEvent(e,t){var n;return null==(n=s())?void 0:n.actions.dispatchEvent(e,t)},push(e,t,n){var r;let a=D();return null==(r=s())||r.actions.push({activityId:a,activityName:e,activityParams:t,skipEnterActiveState:eZ(n).skipActiveState}),{activityId:a}},replace(e,t,n){var r,a,i;let o=null!=(r=null==n?void 0:n.activityId)?r:D();return null==(i=s())||i.actions.replace({activityId:null!=(a=null==n?void 0:n.activityId)?a:D(),activityName:e,activityParams:t,skipEnterActiveState:eZ(n).skipActiveState}),{activityId:o}},pop(e,t){var n;let r=1,a={};"object"==typeof e&&(a=eW({},e)),"number"==typeof e&&(r=e),t&&(a=eW({},t));for(let e=0;e<r;e+=1)null==(n=s())||n.actions.pop({skipExitActiveState:0!==e||eZ(a).skipActiveState})},stepPush(e,t){var n,r;let a=null==(n=s())?void 0:n.actions.getStack().activities,i=(null==t?void 0:t.targetActivityId)?Q(t.targetActivityId):et,o=a&&i(a);if(!o)throw Error("The target activity is not found.");let l="function"==typeof e?e(o.params):e,c=D();return null==(r=s())?void 0:r.actions.stepPush({stepId:c,stepParams:l,targetActivityId:null==t?void 0:t.targetActivityId})},stepReplace(e,t){var n,r;let a=null==(n=s())?void 0:n.actions.getStack().activities,i=(null==t?void 0:t.targetActivityId)?Q(t.targetActivityId):et,o=a&&i(a);if(!o)throw Error("The target activity is not found.");let l="function"==typeof e?e(o.params):e,c=D();return null==(r=s())?void 0:r.actions.stepReplace({stepId:c,stepParams:l,targetActivityId:null==t?void 0:t.targetActivityId})},stepPop(e){var t;return null==(t=s())?void 0:t.actions.stepPop({targetActivityId:null==e?void 0:e.targetActivityId})}}}}},64757:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,o){if(i===o)return!0;if(i&&o&&"object"==typeof i&&"object"==typeof o){var l,s,c,u;if(i.constructor!==o.constructor)return!1;if(Array.isArray(i)){if((l=i.length)!=o.length)return!1;for(s=l;0!=s--;)if(!e(i[s],o[s]))return!1;return!0}if(n&&i instanceof Map&&o instanceof Map){if(i.size!==o.size)return!1;for(u=i.entries();!(s=u.next()).done;)if(!o.has(s.value[0]))return!1;for(u=i.entries();!(s=u.next()).done;)if(!e(s.value[1],o.get(s.value[0])))return!1;return!0}if(r&&i instanceof Set&&o instanceof Set){if(i.size!==o.size)return!1;for(u=i.entries();!(s=u.next()).done;)if(!o.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(o)){if((l=i.length)!=o.length)return!1;for(s=l;0!=s--;)if(i[s]!==o[s])return!1;return!0}if(i.constructor===RegExp)return i.source===o.source&&i.flags===o.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof o.valueOf)return i.valueOf()===o.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof o.toString)return i.toString()===o.toString();if((l=(c=Object.keys(i)).length)!==Object.keys(o).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(o,c[s]))return!1;if(t&&i instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!i.$$typeof)&&!e(i[c[s]],o[c[s]]))return!1;return!0}return i!=i&&o!=o}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.