1import{watchEffect as F,toValue as E,onScopeDispose as P,ref as q,onMounted as W,readonly as G,inject as U,watch as g,defineComponent as A,useCssVars as z,useTemplateRef as w,computed as h,nextTick as D,openBlock as M,createElementBlock as N,normalizeClass as b,createElementVNode as k,renderSlot as $,unref as f,reactive as S,normalizeStyle as T,toRef as V,createBlock as K,withCtx as I,createVNode as Y}from"vue";import{bI as j,aM as X,Z as H,bO as Z,cA as J,ar as Q,O as x,cq as _,bX as ee,b as oe}from"./logger-B4OCWT-4.js";import{d as se,e as te,R as le}from"./plugin-feature-flags-D9VJsscs.js";import{u as ne}from"./use-body-scroll-lock-iwIC3Zn4.js";import{b as ae}from"./custom-html-CSF7RBTT.js";const de=(e,o)=>new e.constructor(e.type,{...e,bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed,...o}),B=globalThis.window?.CloseWatcher??class O extends EventTarget{static#t=[];#a(){return globalThis.document?.addEventListener("keydown",o=>{if(!o.isTrusted||o.key!=="Escape")return;const i=O.#t.at(-1);i&&setTimeout(()=>{o.defaultPrevented||i.requestClose()},0)}),!0}#o=!0;#n=!1;#e=null;#s=null;constructor({signal:o}={}){if(super(),this.#a(),o){if(o.aborted){this.#o=!1;return}o.addEventListener("abort",()=>{this.#l()})}O.#t.push(this)}destroy(){this.#l()}close(){!this.#o||!document.defaultView||(this.dispatchEvent(new Event("close")),this.#l())}requestClose(){if(!this.#o||this.#n)return;this.#n=!0;const o=this.dispatchEvent(new Event("cancel",{cancelable:!0}));this.#n=!1,o&&(this.#o&&document.defaultView&&this.dispatchEvent(new Event("close")),this.#l())}#l(){this.#o=!1;const o=O.#t.indexOf(this);o!==-1&&O.#t.splice(o,1)}get oncancel(){return this.#e}set oncancel(o){if(o!==this.#e||o===null){this.removeEventListener("cancel",this.#e),this.#e=null;return}this.#e=o,this.addEventListener("cancel",this.#e)}get onclose(){return this.#e}set onclose(o){if(o!==this.#s||o===null){this.removeEventListener("close",this.#s),this.#s=null;return}this.#s=o,this.addEventListener("close",this.#s)}},re=e=>{let o;const i=r=>{e.onClose?.(r)},a=r=>{const c=de(r,{cancelable:!0});e.onCancel?.(c),c.defaultPrevented&&(o?.destroy(),o=new B,d())},d=()=>{o=new B,o.addEventListener("close",i),o.addEventListener("cancel",a)};return F(()=>{E(e.enabled)!==!1?d():o?.destroy()}),P(()=>{o?.destroy()}),{destroy:()=>{o?.destroy()},requestClose:()=>{o?.requestClose()},close:()=>{o?.close()}}},R=()=>{const e=q(!1);return W(()=>{requestAnimationFrame(()=>setTimeout(()=>{e.value=!0}))}),G(e)},L=e=>{if(!X(e))return"$el"in e?e.$el:e};function ie(e){const o=j(),i=ne(E(e.modal)),a=e.defferClose?Promise.withResolvers():void 0;let d=!1;const r=U(se);r.modal.value=E(e.modal)??!1;const c=t=>{const n=L(o.value);if(d||n===void 0||t.intent==="cancel"&&e.preventDismissOnCancel)return;i.value=!1,d=!0;const m=new te(t,a?.promise);n.dispatchEvent(m)},u=t=>{const n=L(o.value);if(d||n===void 0)return;const m=new le(t);n.dispatchEvent(m)&&c(t)};return re({enabled:r.active,abusive:!0,onClose:()=>{c({intent:"cancel",source:{origin:"user",input:"hardware",description:void 0}})},onCancel:()=>{u({intent:"cancel",source:{origin:"user",input:"hardware",description:void 0}})}}),g(r.requestedDismissAction,t=>{t!==void 0&&c(t)}),g(()=>E(e.modal),(t=!1)=>{d||(r.modal.value=t,i.value=t)}),{...r,commitClosedState:()=>{a?.resolve()},requestClose:(t,n)=>{u({intent:t,source:{origin:"user",input:"ui",description:n}})},close:(t,n)=>{c({intent:t,source:{origin:"user",input:"ui",description:n}})}}}const ce=["inert"],ue=300,me=200,ve=A({__name:"desktop-modal",props:{background:{default:"var(--modal-color-bg)"},active:{type:Boolean},dismissed:{type:Boolean},preopened:{type:Boolean},detent:{},size:{},scrollable:{type:Boolean},noOverscroll:{type:Boolean,default:!1}},emits:["closed","dismiss"],setup(e,{expose:o,emit:i}){z(s=>({v547cda05:ue,v6edd6d02:me,v378956dc:s.background}));const a=e,d=i,r=w("modal"),c=w("holder"),u=R(),t=h(()=>(a.preopened||u.value)&&!a.dismissed),n=(s,v)=>{d("dismiss",s,v)},m=(...s)=>r.value?.scrollTo(...s);return g(()=>a.dismissed,async s=>{s&&(await D(),await Promise.all(c.value?.getAnimations().map(v=>v.finished)??[]),d("closed"))},{immediate:!0}),o({scrollTo:m}),(s,v)=>(M(),N("div",{class:b(s.$style.root),inert:!e.active,"data-testid":"desktop-modal"},[k("div",{class:b([s.$style.backdrop,t.value&&s.$style.open]),onClick:v[0]||(v[0]=p=>s.$emit("dismiss","cancel","backdrop"))},null,2),k("div",{ref:"holder",class:b([s.$style.holder,t.value&&s.$style.open])},[$(s.$slots,"banner"),k("div",{ref:"modal",class:b([s.$style.card,s.$style[`detent-${e.detent}`],s.$style[`size-${e.size}`],e.scrollable&&s.$style.scrollable,e.noOverscroll&&s.$style.noOverscroll])},[$(s.$slots,"default",{dismiss:n}
1)],2)],2)],10,ce))}}),pe="desktop-modal_root-CaHFb",fe="desktop-modal_backdrop-CaHFb",be="desktop-modal_open-CaHFb",he="desktop-modal_holder-CaHFb",ye="desktop-modal_card-CaHFb",Ce="desktop-modal_scrollable-CaHFb",ke="desktop-modal_noOverscroll-CaHFb",$e={root:pe,backdrop:fe,open:be,holder:he,card:ye,scrollable:Ce,noOverscroll:ke,"detent-auto":"desktop-modal_detent-auto-CaHFb","detent-expanded":"desktop-modal_detent-expanded-CaHFb","size-small":"desktop-modal_size-small-CaHFb","size-large":"desktop-modal_size-large-CaHFb"},Oe={$style:$e},Ee=H(ve,[["__cssModules",Oe]]),ge=["inert"],we=200,Ie=300,Ae="cubic-bezier(0, 0, 0.25, 1)",Me="cubic-bezier(0.3, 0, 0.4, 1)",Re=1,Se=A({__name:"mobile-modal",props:{active:{type:Boolean},dismissed:{type:Boolean},preopened:{type:Boolean},detent:{},scrollable:{type:Boolean},background:{default:"var(--modal-color-bg)"},noOverscroll:{type:Boolean},fixedWidth:{type:Boolean},narrow:{type:Boolean}},emits:["closed","dismiss"],setup(e,{expose:o,emit:i}){z(l=>({v6578d6c9:l.background,v5133b3f9:f(t)}));const a=e,d=i,r=R(),c=w("holder"),u=w("modal"),t=Z(u).height,n=h(()=>(a.preopened||r.value)&&!a.dismissed),m={"transition-duration":h(()=>`${a.dismissed?we:Ie}ms`),"transition-timing-function":h(()=>a.dismissed?Me:Ae)},s=S({...m,transform:h(()=>n.value?void 0:"translateY(100%)")}),v=S({...m,opacity:h(()=>n.value?Re:0)}),p=(l,C)=>{d("dismiss",l,C)},y=(...l)=>u.value?.scrollTo(...l);return g(()=>a.dismissed,async l=>{l&&(await D(),await Promise.all(c.value?.getAnimations().map(C=>C.finished)??[]),d("closed"))},{immediate:!0}),J(n,()=>{Q()!==x.IOS||!/OS 26/.test(navigator.userAgent)||requestAnimationFrame(()=>{document.documentElement.style.paddingTop="1px",requestAnimationFrame(()=>{document.documentElement.style.paddingTop=""})})}),o({scrollTo:y}),(l,C)=>(M(),N("div",{class:b(l.$style.root),inert:!e.active,"data-testid":"mobile-modal"},[k("div",{class:b(l.$style.backdrop),style:T(v),onClick:C[0]||(C[0]=qe=>p("cancel","backdrop"))},null,6),k("div",{ref:"holder",style:T(s),class:b([l.$style.holder,n.value&&l.$style.open])},[$(l.$slots,"banner"),k("div",{ref:"modal",class:b([l.$style.modal,l.$style[`detent-${e.detent}`],e.scrollable&&l.$style.scrollable,e.noOverscroll&&l.$style.noOverscroll])},[$(l.$slots,"default",{dismiss:p})],2)],6)],10,ge))}}),Te="mobile-modal_root-IMcp4",Be="mobile-modal_backdrop-IMcp4",Le="mobile-modal_holder-IMcp4",ze="mobile-modal_modal-IMcp4",De="mobile-modal_scrollable-IMcp4",Ne="mobile-modal_noOverscroll-IMcp4",He={root:Te,backdrop:Be,holder:Le,modal:ze,scrollable:De,noOverscroll:Ne,"detent-auto":"mobile-modal_detent-auto-IMcp4","detent-expanded":"mobile-modal_detent-expanded-IMcp4"},Fe={$style:He},Pe=H(Se,[["__cssModules",Fe]]),Ye=A({__name:"modal",props:{scrollable:{type:Boolean,default:!1},noOverscroll:{type:Boolean},detent:{default:"auto"},size:{default:"small"},testId:{},colorScheme:{},preventDismissOnCancel:{type:Boolean,default:!1},background:{}},emits:{},setup(e,{expose:o}){const i=e,{customization:a}=_(),d=V(()=>i.colorScheme??a?.value?.components?.Modal?.colorScheme??"dark"),r=ee(),c=R(),u=ae(),t=h(()=>r.value?Pe:Ee),{isDismissed:n,active:m,requestClose:s,commitClosedState:v}=ie({modal:!0,defferClose:!0,preventDismissOnCancel:i.preventDismissOnCancel});return o({dismiss:(p,y)=>{s(p,y)},scrollTo:((...p)=>u.value?.scrollTo(...p))}),(p,y)=>(M(),K(f(oe),{name:d.value,"data-testid":e.testId},{default:I(()=>[Y(f(t),{ref_key:"modalRef",ref:u,active:f(m),scrollable:e.scrollable,detent:e.detent,"no-overscroll":!0,size:e.size,background:e.background,dismissed:f(n),preopened:f(c),onClosed:y[0]||(y[0]=l=>f(v)()),onDismiss:f(s)},{default:I(({dismiss:l})=>[$(p.$slots,"default",{dismiss:l})]),banner:I(()=>[$(p.$slots,"banner")]),_:3},8,["active","scrollable","detent","size","background","dismissed","preopened","onDismiss"])]),_:3},8,["name","data-testid"]))}});export{Pe as M,Ye as _,ie as a,R as u}; 2(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".desktop-modal_root-CaHFb{justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.desktop-modal_backdrop-CaHFb{background-color:var(--color-background-base-alfa-scrim);transition-duration:calc(var(--v547cda05)*1ms);transition-property:opacity;position:fixed;inset:0}.desktop-modal_backdrop-CaHFb:not(.desktop-modal_open-CaHFb){opacity:0;transition-duration:calc(var(--v6edd6d02)*1ms)}.desktop-modal_holder-CaHFb{max-width:calc(100% - var(--modal-margin-desktop)*2);max-height:min(calc(100% - var(--modal-margin-desktop)*2), var(--size-modal-desktop-height-max));
2gap:var(--spacing-4);transition-duration:calc(var(--v547cda05)*1ms);grid-template-rows:minmax(0,1fr);grid-auto-flow:column;transition-property:opacity,transform;display:grid;position:fixed}.desktop-modal_holder-CaHFb:not(.desktop-modal_open-CaHFb){opacity:0;transition-duration:calc(var(--v6edd6d02)*1ms);transform:translateY(20px)}.desktop-modal_card-CaHFb{border-radius:var(--modal-rounding);background:var(--v378956dc);flex-direction:column;max-height:100%;display:flex}.desktop-modal_card-CaHFb>*{flex:none}.desktop-modal_card-CaHFb.desktop-modal_scrollable-CaHFb{-ms-overflow-style:none;scrollbar-width:none}.desktop-modal_card-CaHFb.desktop-modal_scrollable-CaHFb::-webkit-scrollbar{display:none}.desktop-modal_card-CaHFb.desktop-modal_scrollable-CaHFb{overscroll-behavior:contain;overflow:hidden auto}.desktop-modal_card-CaHFb.desktop-modal_noOverscroll-CaHFb{overscroll-behavior:none}.desktop-modal_card-CaHFb.desktop-modal_detent-auto-CaHFb{height:auto}.desktop-modal_card-CaHFb.desktop-modal_detent-expanded-CaHFb{height:9999px}.desktop-modal_card-CaHFb.desktop-modal_size-small-CaHFb{width:var(--size-modal-desktop-width-s)}.desktop-modal_card-CaHFb.desktop-modal_size-large-CaHFb{width:var(--size-modal-desktop-width-m)}.mobile-modal_root-IMcp4{flex-direction:column-reverse;display:flex;position:fixed}.mobile-modal_backdrop-IMcp4{z-index:-1;background-color:var(--color-background-base-alfa-scrim);will-change:opacity;transition-property:opacity;position:fixed;inset:-200px 0}.mobile-modal_holder-IMcp4{width:100%;max-height:calc(100% - max(var(--safe-area-inset-block-start), var(--modal-margin-mobile)));padding-inline:var(--safe-area-inset-inline-start) var(--safe-area-inset-inline-end);will-change:transform;flex-direction:column;grid-template-rows:auto minmax(0,100%);grid-template-columns:100%;transition-property:transform;display:grid;position:fixed}.mobile-modal_holder-IMcp4>:not(:last-child){margin-bottom:var(--spacing-4)}.mobile-modal_modal-IMcp4{border-radius:var(--modal-rounding) var(--modal-rounding) 0 0;background:var(--v6578d6c9);max-height:100%;box-shadow:0 calc(var(--v5133b3f9)*1px - var(--modal-rounding)) 0 var(--v6578d6c9);contain:layout ;flex-direction:column;grid-row:2;padding-block-end:var(--safe-area-inset-block-end);display:flex}.mobile-modal_modal-IMcp4>*{flex:none}.mobile-modal_modal-IMcp4.mobile-modal_scrollable-IMcp4{-ms-overflow-style:none;scrollbar-width:none}.mobile-modal_modal-IMcp4.mobile-modal_scrollable-IMcp4::-webkit-scrollbar{display:none}.mobile-modal_modal-IMcp4.mobile-modal_scrollable-IMcp4{overflow:hidden auto}.mobile-modal_modal-IMcp4.mobile-modal_noOverscroll-IMcp4{overscroll-behavior:none}.mobile-modal_modal-IMcp4.mobile-modal_detent-auto-IMcp4{height:auto}.mobile-modal_modal-IMcp4.mobile-modal_detent-expanded-IMcp4{height:100vh}")),document.head.appendChild(o)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
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.