PageSourceSearch

https://tmps.fyi/assets/BoxView-CZcznGq_.js

js tmps.fyi collected 2026-10-05 01:43:18 UTC 43,863 bytes, 2 lines download raw bytes

1import{o as m,c as _,a as i,d as ye,y as Pe,A as Qe,C as ht,F as ae,g as t,f as H,ab as gt,t as f,ac as Ee,p as te,ad as Ft,ae as Ht,i as We,n as L,j as I,e as de,k as u,l as V,_ as we,af as Ke,B as le,L as ge,ag as Oe,a9 as Me,ah as Nt,z as xt,ai as Ot,r as qt,m as xe,E as Wt,h as ce,a8 as qe,aj as Kt,a1 as mt,ak as yt,al as Ye,u as Yt,U as Qt,V as Xt,am as Jt,an as Gt,ao as Zt,ap as eo,q as to,aq as oo,X as no,Y as ao,K as lo,ar as io,as as so,at as ft,au as ro,av as uo,aw as co}from"./app-YcnN7_bz.js";import{u as vo}from"./useSeo-Bsuyj7Ul.js";function mo(s,b){return m(),_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.181 8.68a4.503 4.503 0 0 1 1.903 6.405m-9.768-2.782L3.56 14.06a4.5 4.5 0 0 0 6.364 6.365l3.129-3.129m5.614-5.615 1.757-1.757a4.5 4.5 0 0 0-6.364-6.365l-4.5 4.5c-.258.26-.479.541-.661.84m1.903 6.405a4.495 4.495 0 0 1-1.242-.88 4.483 4.483 0 0 1-1.062-1.683m6.587 2.345 5.907 5.907m-5.907-5.907L8.898 8.898M2.991 2.99 8.898 8.9"})])}async function pt(s){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(s);return}catch{const b=document.createElement("textarea"),r=document.activeElement;b.value=s,b.readOnly=!0,b.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none;font-size:16px;",document.body.appendChild(b);try{if(b.select(),b.setSelectionRange(0,s.length),!document.execCommand("copy"))throw new Error("Clipboard unavailable")}finally{b.remove(),r?.focus({preventScroll:!0})}}}function fo(s,b,r){const e={whatsapp:"https://wa.me/",telegram:"https://t.me/share/url",line:"https://social-plugins.line.me/lineit/share"},a=new URL(e[s]);return s==="whatsapp"?a.searchParams.set("text",`${r}
2${b}`):(a.searchParams.set("url",b),a.searchParams.set("text",r)),a.toString()}function po(s,b,r=Date.now(),e=!1){return!!s&&(e||b-r>5e3)}function bo(s,b){return{x:s.left+s.width/2-b.left-b.width/2,y:s.top+s.height/2-b.top-b.height/2}}const ho=["dir"],go=["title"],xo=["aria-label","title"],yo=["dir"],wo={class:"invite-panel"},_o={class:"flex items-start justify-between gap-4"},ko={id:"desktop-share-heading",class:"text-xl font-bold leading-7 text-gray-900"},Co=["aria-label"],So={class:"invite-targets"},Ro=["href"],To=["src"],Io=["disabled","title"],Lo={class:"invite-brand invite-brand-system"},$o={class:"invite-url-row"},Eo=["value","aria-label"],Mo={key:0,class:"mt-3 text-xs leading-4 text-gray-500"},Po={role:"status","aria-live":"polite",class:"sr-only"},Do={key:1,"aria-hidden":"true",class:"mt-3 text-center text-xs text-gray-600"},Ao=ye({__name:"DesktopInviteShare",props:{url:{},expiresAt:{},roomLifetime:{type:Boolean},refreshing:{type:Boolean},slug:{},rtl:{type:Boolean}},emits:["refresh","feedback"],setup(s,{emit:b}){const r=s,e=b,{t:a}=Pe(),h=u(null),R=u(null),c=u(""),p=u(!1),d=u(!1);let D,U,q=!1;function N(g){q=g.target===h.value}function W(g){q&&g.target===h.value&&v(),q=!1}const O=V(()=>a("box.share_meta_description",{slug:r.rtl?`⁨${r.slug}⁩`:r.slug})),x=V(()=>["whatsapp","telegram","line"].map(g=>({id:g,label:{whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE"}[g],href:fo(g,r.url,O.value)})));function A(){D?.cancel(),D=void 0}function y(){const g=h.value,w=R.value;if(!g||!w||g.open)return;c.value="";const M=w.getBoundingClientRect();g.showModal();const T=bo(M,g.getBoundingClientRect());!U?.matches&&typeof g.animate=="function"&&(D=g.animate([{transform:`translate(${T.x}px, ${T.y}px) scale(0.08)`,opacity:0},{transform:"translate(0, 0) scale(1)",opacity:1}],{duration:480,easing:"cubic-bezier(0.22, 1, 0.36, 1)"}),D.onfinish=()=>{D=void 0}),!r.roomLifetime&&r.expiresAt-Date.now()<3e4&&e("refresh")}function v(){A(),h.value?.close()}function $(){h.value?.open||(A(),R.value?.focus({preventScroll:!0}))}function k(g){return po(r.url,r.expiresAt,Date.now(),r.roomLifetime)?!0:(g?.preventDefault(),c.value=a("box.desktop_share_retry"),r.refreshing||e("refresh"),h.value?.open||e("feedback",c.value,"error"),!1)}async function F(){if(!k())return;const g=r.url;try{try{await navigator.clipboard.writeText(g)}catch{const w=document.createElement("textarea"),M=document.activeElement;w.value=g,w.readOnly=!0,w.style.cssText="position:fixed;opacity:0;pointer-events:none;",(h.value?.open?h.value:document.body).appendChild(w);try{if(w.select(),!document.execCommand("copy"))throw new Error("Clipboard unavailable")}finally{w.remove(),M?.focus({preventScroll:!0})}}c.value=a("box.alert_copied"),h.value?.open||e("feedback",c.value,"success")}catch{c.value=a("box.alert_action_fail"),h.value?.open||e("feedback",c.value,"error")}}
2async function E(){if(!(!p.value||d.value||!k())){d.value=!0;try{await navigator.share({title:a("box.share_meta_title",{slug:r.slug}),text:O.value,url:r.url})}catch(g){g instanceof DOMException&&g.name==="AbortError"||(c.value=a("box.alert_action_fail"))}finally{d.value=!1}}}return Qe(()=>{p.value=typeof navigator.share=="function",U=window.matchMedia("(prefers-reduced-motion: reduce)"),U.addEventListener("change",A),window.addEventListener("resize",A)}),ht(()=>{A(),h.value?.close(),U?.removeEventListener("change",A),window.removeEventListener("resize",A)}),(g,w)=>(m(),_(ae,null,[i("div",{class:"invite-actions",dir:s.rtl?"rtl":"ltr"},[i("button",{type:"button",class:"invite-copy",title:t(a)("box.invite_copy"),onClick:F},[H(t(gt),{class:"h-4 w-4 shrink-0","aria-hidden":"true"}),i("span",null,f(t(a)("box.desktop_copy")),1)],8,go),i("button",{ref_key:"trigger",ref:R,type:"button",class:"invite-open","aria-haspopup":"dialog","aria-label":t(a)("box.invite_share"),title:t(a)("box.invite_share"),onClick:y},[H(t(Ee),{class:"h-5 w-5","aria-hidden":"true"})],8,xo)],8,ho),(m(),te(Ft,{to:"body"},[i("dialog",{ref_key:"dialog",ref:h,class:"invite-dialog",dir:s.rtl?"rtl":"ltr","aria-labelledby":"desktop-share-heading",onCancel:de(v,["prevent"]),onClose:$,onPaste:w[3]||(w[3]=de(()=>{},["stop"])),onPointerdown:N,onClick:W},[i("section",wo,[i("header",_o,[i("h2",ko,f(t(a)("box.desktop_share_title")),1),i("button",{type:"button",autofocus:"",class:"invite-close","aria-label":t(a)("box.invite_close"),onClick:v},[H(t(Ht),{class:"h-6 w-6","aria-hidden":"true"})],8,Co)]),i("div",So,[(m(!0),_(ae,null,We(x.value,M=>(m(),_("a",{key:M.id,href:M.href,target:"_blank",rel:"noopener noreferrer",class:"invite-target",onClick:w[0]||(w[0]=T=>k(T)),onAuxclick:w[1]||(w[1]=T=>k(T))},[i("span",{class:L(["invite-brand",`invite-brand-${M.id}`])},[i("img",{src:`/images/share/${M.id}.svg`,alt:"",width:"34",height:"34"},null,8,To)],2),i("span",null,f(M.label),1)],40,Ro))),128)),i("button",{type:"button",class:"invite-target",disabled:!p.value||d.value,title:p.value?t(a)("box.desktop_system_share"):t(a)("box.desktop_share_unsupported"),onClick:E},[i("span",Lo,[H(t(Ee),{class:"h-7 w-7","aria-hidden":"true"})]),i("span",null,f(t(a)("box.desktop_system_share")),1)],8,Io)]),i("div",$o,[i("input",{value:s.url,readonly:"",dir:"ltr","aria-label":t(a)("box.invite_copy"),class:"min-w-0 flex-1 bg-transparent text-sm text-gray-700 outline-none",onFocus:w[2]||(w[2]=M=>M.target.select())},null,40,Eo),i("button",{type:"button",class:"invite-url-copy",onClick:F},f(t(a)("box.desktop_copy")),1)]),p.value?I("",!0):(m(),_("p",Mo,f(t(a)("box.desktop_share_unsupported")),1)),i("p",Po,f(c.value),1),c.value?(m(),_("p",Do,f(c.value),1)):I("",!0)])],40,yo)]))],64))}}),zo=we(Ao,[["__scopeId","data-v-d4b10edf"]]),Vo=["aria-label"],Bo=["tabindex","aria-hidden","aria-label","title","aria-expanded"],Uo=["inert","aria-hidden","role","aria-label"],jo=ye({__name:"DesktopInviteDock",props:{contentElement:{},composerElement:{},rtl:{type:Boolean},label:{},triggerLabel:{},animate:{type:Boolean}},emits:["animationend"],setup(s,{emit:b}){const r=s,e=b,a=u(null),h=u(null),R=u(null),c=u(!1),p=u(!1),d=u(!1),D=u(32),U=u(0),q=u(64),N=u(!1),W=V(()=>!c.value||p.value);function O(){const y=r.contentElement,v=r.composerElement,$=v?.querySelector(".room-composer");if(!y||!v||!$||!h.value||!a.value)return;const k=y.getBoundingClientRect(),F=$.getBoundingClientRect(),E=r.rtl?F.left-k.left:k.right-F.right,g=h.value.offsetWidth,w=g+16,M=h.value.scrollHeight,T=v.getBoundingClientRect().height,X=Math.max(0,k.height+T-112-8),oe=E+.01<w||M>X+1;q.value=oe?32:Math.min(64,Math.max(16,E-g));const _e=Math.min(32,Math.max(0,k.height-56));D.value=oe?T+_e:112,U.value=oe?Math.max(0,k.height-_e-8):X,N.value=M>U.value+1,c.value=oe,d.value=!0}Ke(()=>[r.contentElement,r.composerElement,h.value].filter(y=>!!y),O),le(()=>r.rtl,()=>ge(O)),le(c,async()=>{const y=h.value?.contains(document.activeElement);p.value=c.value&&!!document.querySelector(".invite-dialog[open]"),c.value&&!p.value&&y&&(await ge(),R.value?.focus({preventScroll:!0}))});async function x(){p.value=!0,await ge(),h.value?.querySelector("button")?.focus({preventScroll:!0})}function A(y){!p.value||!(y instanceof Node)||a.value?.contains(y)||y instanceof Element&&y.closest("dialog[open]")||(p.value=!1)}return Oe(document,"pointerdown",y=>
2A(y.target)),Oe(document,"focusin",()=>queueMicrotask(()=>A(document.activeElement))),Oe(document,"keydown",async y=>{y.key!=="Escape"||!p.value||y.defaultPrevented||document.querySelector("dialog[open]")||(y.preventDefault(),p.value=!1,await ge(),R.value?.focus({preventScroll:!0}))}),(y,v)=>(m(),_("aside",{ref_key:"dock",ref:a,class:L(["desktop-invite-dock",{compact:c.value}]),"aria-label":s.label,style:Me({bottom:`${D.value}px`,insetInlineEnd:`${q.value}px`,visibility:d.value?"visible":"hidden"})},[c.value?(m(),_("button",{key:0,ref_key:"trigger",ref:R,type:"button",class:L(["invite-ball",{covered:p.value}]),tabindex:p.value?-1:0,"aria-hidden":p.value||void 0,"aria-label":s.triggerLabel,title:s.triggerLabel,"aria-haspopup":"dialog","aria-expanded":p.value,"aria-controls":"desktop-invite-popover",onClick:x},[H(t(Ee),{"aria-hidden":"true"})],10,Bo)):I("",!0),i("div",{id:"desktop-invite-popover",ref_key:"panel",ref:h,class:L(["desktop-invite-panel",{concealed:!W.value,scrollable:N.value,"desktop-qr-enter":!c.value&&s.animate}]),style:Me({maxHeight:`${U.value}px`}),inert:!W.value,"aria-hidden":!W.value||void 0,role:c.value?"dialog":void 0,"aria-label":s.label,onAnimationend:v[0]||(v[0]=$=>e("animationend",$))},[Nt(y.$slots,"default",{},void 0,!0)],46,Uo)],14,Vo))}}),Fo=we(jo,[["__scopeId","data-v-4022bbe8"]]),Ho=["dir"],No=["aria-labelledby","aria-label"],Oo={key:0,id:"recovery-title"},qo=ye({__name:"RoomUnavailable",props:{slug:{},expired:{type:Boolean},mobile:{type:Boolean},navigate:{type:Function}},setup(s){const b=s,{t:r,locale:e}=Pe(),{langPath:a}=xt(),h=V(()=>e.value==="ur-PK"),{boxName:R,password:c,isPrivate:p,isLoading:d,slugInvalid:D,passwordInvalid:U,formError:q,activeBoxSlug:N,publicConfirmSlug:W,SLUG_MAX_LENGTH:O,bidiIsolate:x,handleEnter:A,confirmPublicSpace:y,cancelPublicSpace:v,closeActiveSpaceDialog:$,openActiveSpace:k}=Ot(b.navigate);return(F,E)=>{const g=qt("RouterLink");return m(),_("div",{class:"room-unavailable",dir:h.value?"rtl":"ltr",onPaste:E[4]||(E[4]=de(()=>{},["stop"]))},[i("header",{class:L(s.mobile?"mobile-recovery-header":"recovery-header")},[H(g,{to:t(a)("/"),class:"inline-block rounded focus-visible:outline-blue-600"},{default:xe(()=>[H(Wt,{size:s.mobile?"text-2xl":"text-[32px]"},null,8,["size"])]),_:1},8,["to"]),s.mobile?(m(),te(g,{key:0,to:t(a)("/"),class:"mobile-recovery-home"},{default:xe(()=>[ce(f(t(r)("box.back_home")),1)]),_:1},8,["to"])):I("",!0)],2),i("main",{class:L(s.mobile?"mobile-recovery-layout":"recovery-layout")},[i("section",{class:L(s.mobile?"mobile-recovery-message":"recovery-message"),"aria-labelledby":"unavailable-title"},[H(t(mo),{class:L(s.mobile?"mobile-recovery-icon":"recovery-icon"),"aria-hidden":"true"},null,8,["class"]),i("p",{class:L(s.mobile?"mobile-recovery-slug":"recovery-slug")},[i("bdi",null,f(s.slug),1)],2),i("h1",{id:"unavailable-title",class:L({"recovery-title-zh":t(e).startsWith("zh"),"recovery-title-en":t(e)==="en"})},f(t(r)("box.recovery_title")),3),i("p",{class:L(s.mobile?"mobile-recovery-description":"recovery-description")},[ce(f(t(r)(s.expired?"box.recovery_expired":"box.recovery_missing")),1),s.mobile?(m(),_(ae,{key:0},[E[5]||(E[5]=i("br",null,null,-1)),ce(f(t(r)("box.recovery_next_step")),1)],64)):I("",!0)],2),s.mobile?I("",!0):(m(),te(g,{key:0,to:t(a)("/"),class:"recovery-home"},{default:xe(()=>[ce(f(t(r)("box.back_home")),1)]),_:1},8,["to"]))],2),i("section",{class:L(s.mobile?"mobile-recovery-entry":"recovery-entry"),"aria-labelledby":s.mobile?void 0:"recovery-title","aria-label":s.mobile?t(r)("home.tool_title"):void 0},[s.mobile?I("",!0):(m(),_("h2",Oo,f(t(r)("box.recovery_entry")),1)),i("form",{onSubmit:E[3]||(E[3]=de((...w)=>t(A)&&t(A)(...w),["prevent"])),novalidate:"",class:L(s.mobile?"mobile-recovery-form":"recovery-form")},[H(Kt,{ref:"entryControlsRef","box-name":t(R),"onUpdate:boxName":E[0]||(E[0]=w=>qe(R)?R.value=w:null),password:t(c),"onUpdate:password":E[1]||(E[1]=w=>qe(c)?c.value=w:null),"is-private":t(p),"onUpdate:isPrivate":E[2]||(E[2]=w=>qe(p)?p.value=w:null),"is-rtl":h.value,"is-loading":t(d),"slug-invalid":t(D),"password-invalid":t(U),"form-error":t(q),"slug-max-length":t(O),"compact-inline":!s.mobile,"show-note":!1,"show-benefits":!1},null,8,["box-name","password","is-private","is-rtl","is-loading","slug-invalid","password-invalid","form-error","slug-max-length","compact-inline"])],34)],10,No)],2),H(mt,{open:!!t(W),"id-prefix":"home-public-space-dialog",title:t(r)("home.public_space_confirm_title"),description:t(r)("home.public_space_confirm_msg",{slug:t(x)(t(W))}),"confirm-label":t(r)("home.public_space_confirm_continue"),"cancel-label":t(r)("home.public_space_confirm_back"),"return-focus-id":"home-space-password","text-direction":h.value?"rtl":"ltr","initial-focus":"cancel",emphasis:"c
2ancel",onConfirm:t(y),onCancel:t(v)},null,8,["open","title","description","confirm-label","cancel-label","text-direction","onConfirm","onCancel"]),H(mt,{open:!!t(N),"id-prefix":"home-active-space-dialog",title:t(r)("home.limit_reach_title"),description:t(r)("home.limit_reach_msg",{slug:t(x)(t(N))}),"confirm-label":t(r)("home.btn_go_existing"),"cancel-label":t(r)("home.btn_stay"),"return-focus-id":"home-space-name","text-direction":h.value?"rtl":"ltr","initial-focus":"confirm",onConfirm:t(k),onCancel:t($)},null,8,["open","title","description","confirm-label","cancel-label","text-direction","onConfirm","onCancel"])],40,Ho)}}}),Wo=we(qo,[["__scopeId","data-v-58ce9c8c"]]),Ko=["dir"],Yo={id:"attachment-title"},Qo=["src","alt"],Xo={class:"attachment-info"},Jo={dir:"auto"},Go={class:"attachment-actions"},Zo=ye({__name:"AttachmentConfirm",props:{file:{},preview:{}},emits:["cancel","share"],setup(s,{emit:b}){const r=b,{t:e,locale:a}=Pe(),h=u(null);return Qe(()=>h.value?.showModal()),ht(()=>h.value?.close()),(R,c)=>(m(),_("dialog",{ref_key:"dialog",ref:h,class:"attachment-dialog",dir:t(a)==="ur-PK"?"rtl":"ltr","aria-labelledby":"attachment-title",onCancel:c[2]||(c[2]=de(p=>r("cancel"),["prevent"]))},[i("h2",Yo,f(t(e)("box.sharing.confirm")),1),s.preview?(m(),_("img",{key:0,src:s.preview,alt:s.file.name},null,8,Qo)):I("",!0),i("div",Xo,[s.preview?I("",!0):(m(),te(yt,{key:0,name:s.file.name},null,8,["name"])),i("div",null,[i("p",Jo,f(s.file.name),1),i("small",null,f(t(Ye)(s.file.size)),1)])]),i("div",Go,[i("button",{type:"button",autofocus:"",onClick:c[0]||(c[0]=p=>r("cancel"))},f(t(e)("box.btn_cancel")),1),i("button",{type:"button",class:"primary",onClick:c[1]||(c[1]=p=>r("share"))},f(t(e)("box.sharing.share")),1)])],40,Ko))}}),en=we(Zo,[["__scopeId","data-v-5c210fec"]]);function tn(s,b){const r=u(0),e=u(0),a=u(124),h=u(null),R=u(!1),c=V(()=>Math.max(0,e.value-a.value)),p=V(()=>h.value===null?Math.min(c.value,Math.max(0,e.value*2/3-a.value/2)):c.value*h.value);let d=null,D=!1;function U(){s.value&&(r.value=s.value.offsetTop,e.value=s.value.clientHeight,a.value=b.value?.scrollHeight||124)}Ke(s,U),Ke(b,U),le(b,()=>{d=null,R.value=!1});const q=V(()=>({top:`${r.value+p.value}px`,maxHeight:`${e.value}px`,overflowY:e.value<a.value?"auto":"visible",visibility:e.value>0?"visible":"hidden",touchAction:c.value>0?"none":"pan-y",userSelect:"none",cursor:R.value?"grabbing":"grab"}));function N(v){!v.isPrimary||v.button!==0||d||!b.value||(D=!1,!(c.value<=0)&&(d={id:v.pointerId,x:v.clientX,y:v.clientY,top:p.value,capture:b.value}))}function W(v){if(!d||d.id!==v.pointerId)return;const $=v.clientY-d.y;if(!R.value&&Math.hypot(v.clientX-d.x,$)<6)return;R.value||(R.value=!0,D=!0,d.capture.setPointerCapture(v.pointerId)),v.preventDefault();const k=Math.min(c.value,Math.max(0,d.top+$));c.value>0&&(h.value=k/c.value)}function O(v){if(!d||d.id!==v.pointerId)return;const $=d.capture;d=null,R.value=!1,$.hasPointerCapture(v.pointerId)&&$.releasePointerCapture(v.pointerId)}function x(v){D&&v.detail!==0&&(v.preventDefault(),v.stopImmediatePropagation())}function A(v){v.target===b.value&&O(v)}function y(){d?.capture.hasPointerCapture(d.id)&&d.capture.releasePointerCapture(d.id),d=null,R.value=!1,D=!1,h.value=null}return{style:q,dragging:R,down:N,move:W,end:O,lost:A,click:x,reset:y}}function bt(s,b,r){const e=s||{},a=r==="image",h=a?"allowImageUpload":"allowUpload",R=a?"maxImageSizeMB":"maxFileSizeMB",c=a?"imageWhitelist":"fileWhitelist",p=a?"imageLimitRules":"fileLimitRules",d=a?10:100,D=k=>Object.prototype.hasOwnProperty.call(e,k),U=D(c)||D(p),q=Array.isArray(e[c])?e[c]:[],N=e[h],W=U?N===!0||q.includes(b):typeof N=="boolean"?N:!1,x=(Array.isArray(e[p])?e[p]:[]).find(k=>k?.slug===b),A=k=>{if(k==null||k==="")return null;const F=Number(k);return Number.isFinite(F)&&F>=0?F:null},y=A(e[R]),v=A(x?.limit);return{allowed:W,maxMB:U?v??y??d:y??d}}const on=["dir"],nn={class:"bg-white/80 backdrop-blur-md sticky top-0 z-30 border-b border-gray-100 flex-none shadow-sm"},an={class:"max-w-2xl mx-auto px-4 h-16 flex items-center justify-between w-full"},ln={class:"flex items-center gap-2 md:gap-3 overflow-hidden min-w-0 me-2"},sn={dir:"ltr",class:"flex items-baseline shrink-0"},rn={class:"font-mono font-bold text-lg tracking-tight text-gray-900 truncate max-w-[80px] sm:max-w-[150px]"},un=["dir"],cn={class:"flex items-center gap-1 px-2 py-0.5 rounded-full bg-gray-50 border border-gray-100 shrink-0"},dn={class:"relative flex h-2 w-2"},vn={class:"text-[10px] font-mono font-bold text-yellow-700 min-w-[24px] text-center select-none"},mn={class:"flex items-center gap-2 shrink-0"},fn={key:0,role:"alert",class:"mx-auto mt-3 w-[calc(100%-2rem)] max-w-2xl rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm font-medium text-amber-900"}
2,pn={key:0,class:"conversation-empty"},bn={key:0,class:"conversation-date"},hn={key:1,class:"upload-message",role:"status"},gn={class:"min-w-0 flex-1"},xn={dir:"auto",class:"break-words text-sm text-gray-900"},yn=["value","max","aria-label"],wn={class:"flex w-full flex-col items-center rounded-2xl border border-gray-200 bg-white p-3.5 shadow-[0_16px_40px_-14px_rgba(15,23,42,0.28)]"},_n={class:"mb-2 max-w-full whitespace-nowrap text-center text-[13px] font-medium leading-5 text-gray-500"},kn=["aria-busy"],Cn={key:0,role:"status",class:"flex items-center justify-center"},Sn={class:"sr-only"},Rn=["dir"],Tn=["aria-label","disabled","aria-busy","onClick"],In={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},Ln={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},$n={class:"min-w-0 break-words text-xs font-bold"},En={key:5,class:"fixed inset-0 z-50 flex items-center justify-center bg-white/90 backdrop-blur-xl p-4"},Mn={class:"bg-white rounded-2xl shadow-2xl ring-1 ring-gray-900/5 max-w-sm w-full p-8 text-center animate-fade-in-up"},Pn={class:"text-2xl font-bold text-gray-900 tracking-tight"},Dn={key:0,role:"alert",class:"mt-4 rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm font-medium text-red-700"},An=["placeholder"],zn={type:"submit",class:"w-full h-12 bg-blue-600 text-white font-bold rounded-xl shadow-lg"},Vn=ye({__name:"BoxView",setup(s){const b=Yt(),r=Qt(),e=Xt(),{t:a,locale:h}=Pe(),{updateSeo:R}=vo(),{langPath:c}=xt(),p=V(()=>lo(h.value)==="ur-PK"),d=u(!1),D=()=>{const o=navigator.userAgent,n=/Macintosh/i.test(o)&&navigator.maxTouchPoints>1;d.value=/Android|iPhone|iPad|iPod|Mobile/i.test(o)||n},{request:U,release:q,isSupported:N,isActive:W}=io(),O=async()=>{if(!(!N.value||W.value||document.visibilityState!=="visible"))try{await U("screen")}catch(o){console.warn("Screen wake lock request failed:",o)}},x=V(()=>b.params.slug);async function A(o){const n=c(`/box/${o}`);await r.push(n),b.path===n&&(rt(),y.value="",Se.value=e.pendingPassword,e.consumeCreatedRoom(o),e.joinRoom(o))}const y=u(""),v=u(null);let $=null;const k=u(!1),F=u(null),E=u(!1),g=u(""),w=u(0),M=u(!1),T=u(!1),X=u(!1),oe=u(!1),_e=o=>{o.animationName==="desktopQrRise"&&(oe.value=!0)},ke=u(!1),De=u(!1);let ve=null,ie=0,Ce=!0,J=null;const G=u(null),Xe=u(null),Je=u(null),K=tn(G,Je),wt=K.style,Se=u(""),Re=u({});let se=null;const Ge=()=>{const o=window.visualViewport;if(!o||o.scale>1.01){Re.value={};return}const n=Math.max(0,o.offsetTop,o.pageTop-window.scrollY),l=Math.max(0,o.offsetLeft,o.pageLeft-window.scrollX);if(n<.5&&l<.5&&(!d.value||window.innerHeight-o.height<80)){Re.value={};return}Re.value={width:`${o.width}px`,height:`${o.height}px`,transform:`translate3d(${l}px, ${n}px, 0)`}},Te=()=>{se!==null&&cancelAnimationFrame(se),se=requestAnimationFrame(()=>{se=null,Ge()})},Z=u(!1),ne=u(!1),me=u(""),Y=u(null),P=u(null);let re=null;const Ae=V(()=>so(e.snippets)),Ie=u(!0),_t=()=>{const o=G.value;o&&(Ie.value=o.scrollHeight-o.scrollTop-o.clientHeight<80)},ze=()=>ge(()=>{Ie.value&&G.value&&(G.value.scrollTop=G.value.scrollHeight)});le(()=>e.snippets.map(o=>o.id).join(","),()=>{ze()},{flush:"post"});const Ve=o=>{const n=new Date(o);return Number.isNaN(n.getTime())?"":n.toLocaleDateString(h.value)},fe=u(new Set),ee=u({show:!1,msg:"",type:"success"}),z=(o,n="success",l=3e3)=>{ee.value={show:!0,msg:o,type:n};const C=ee.value;setTimeout(()=>{ee.value===C&&(ee.value.show=!1)},l)},Ze=V(()=>e.pendingPassword||y.value||Se.value),Be=V(()=>e.isConnected&&!!e.accessToken),pe=()=>Be.value?!0:(e.ensureConnected(),z(a("box.status.connecting"),"error"),!1),Ue=V(()=>bt(e.systemConfig,x.value,"image")),je=V(()=>bt(e.systemConfig,x.value,"file")),et=V(()=>Ue.value.allowed),kt=V(()=>je.value.allowed),tt=o=>o.uploaderIp===e.actorId,Ct=V(()=>e.snippets.filter(tt).length),Le=V(()=>e.isConnected?e.onlineUsers<=0?{text:a("box.status.fetching"),color:"bg-green-500",labelColor:"text-green-600"}:{text:a("box.status.users",{n:e.onlineUsers}),color:"bg-green-500",labelColor:"text-gray-500"}:{text:a("box.status.connecting"),color:"bg-red-500",labelColor:"text-red-400"}),ot=V(()=>
2e.connectionIssue==="creator_conflict"?a("box.connection_creator_conflict"):e.connectionIssue==="connection_limit"?a("box.connection_limit"):e.connectionIssue==="repeated_failure"?a("box.connection_repeated_failure"):e.connectionIssue==="local_failure"?a("box.connection_local_failure"):""),nt=V(()=>e.lastError==="AUTH_FAILED"?a("home.alert_pwd_wrong"):e.lastError==="INVITE_INVALID"?a("box.alert_link_expired"):e.lastError==="RATE_LIMITED"?a("box.alert_too_many_attempts"):"");le([x,()=>h.value],()=>{const o=p.value?`⁨${x.value}⁩`:x.value;R(x.value,0,{title:a("box.share_meta_title",{slug:o}),description:a("box.share_meta_description",{slug:o})},"https://tmps.fyi/room-share.png")},{immediate:!0});const Fe=()=>{Ie.value=!0,K.reset(),ze()},St=o=>{pe()&&(k.value||Z.value||ne.value||Y.value||v.value&&(v.value.accept=o==="image"?"image/*":"*",v.value.setAttribute("data-type",o),$=e.roomSessionVersion,v.value.click()))},Rt=o=>{const n=o.target;if(n!==v.value||$===null||!e.isCurrentRoomSession($)){n.value="";return}if($=null,(n.files?.length||0)>1){z(a("box.sharing.one_file"),"error"),n.value="";return}const l=n.files?.[0],C=n.getAttribute("data-type");l&&C&&He(l,ft(l,C)),n.value=""},at=o=>o==="image"?Ue.value.maxMB:je.value.maxMB,lt=(o,n)=>(n==="image"?Ue.value:je.value).allowed?n==="image"&&!o.type.startsWith("image/")?(z(a("box.alert_img_only"),"error"),!1):o.size>at(n)*1024*1024?(z(a("box.alert_file_too_large",{n:at(n)}),"error"),!1):!0:(z(a("box.sharing.disabled"),"error"),!1),He=async(o,n)=>{if(!pe()||k.value||Z.value||!lt(o,n))return!1;const l=e.roomSessionVersion,C=x.value,S=new AbortController;re=S,k.value=!0,P.value={name:o.name,size:o.size,loaded:0,phase:"preparing"},Fe();try{const B=await fetch("/api/upload/presign",{method:"POST",signal:S.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:o.name,fileType:o.type||"application/octet-stream",slug:C,type:n,fileSize:o.size,clientId:e.clientId,accessToken:e.accessToken})});if(!B.ok)throw new Error("upload_rejected");const{uploadUrl:j,publicUrl:Q}=await B.json();if(!e.isCurrentRoomSession(l)||S.signal.aborted)return!1;P.value.phase="uploading";const Ut=await ro(j,o,S.signal,jt=>{e.isCurrentRoomSession(l)&&P.value&&(P.value.loaded=jt)});if(!e.isCurrentRoomSession(l)||S.signal.aborted)return!1;if(!Be.value)throw new Error("upload_network");P.value={name:o.name,size:o.size,loaded:o.size,phase:"publishing"};const dt=await fetch("/api/snippet/create",{method:"POST",signal:S.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:C,type:n,content:Q,metadata:{name:o.name,size:o.size},clientId:e.clientId,accessToken:e.accessToken,uploadReceipt:Ut})});if(!dt.ok)throw new Error("upload_rejected");const{snippet:vt}=await dt.json();return!e.isCurrentRoomSession(l)||S.signal.aborted?!1:(vt&&e.addSnippet(vt),Fe(),!0)}catch(B){if(!e.isCurrentRoomSession(l)||S.signal.aborted)return!1;const j=B instanceof Error?B.message:"";return z(a(j==="upload_rejected"||j.startsWith("upload_http_")?"box.sharing.rejected":"box.sharing.network"),"error"),!1}finally{re===S&&(re=null,k.value=!1,P.value=null)}},Tt=async()=>{if(!pe()||k.value||Z.value||ne.value||Y.value||!et.value)return;const o=e.roomSessionVersion;ne.value=!0;let n,l,C;try{if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){alert(a("box.alert_capture_unsupported"));return}if(n=await navigator.mediaDevices.getDisplayMedia({video:{frameRate:{ideal:30}},audio:!1}),!e.isCurrentRoomSession(o)||(l=document.createElement("video"),l.srcObject=n,l.muted=!0,await new Promise((B,j)=>{l.onloadedmetadata=()=>{l.play().then(B,j)},l.onerror=j}),await new Promise(B=>setTimeout(B,300)),!e.isCurrentRoomSession(o)))return;C=document.createElement("canvas"),C.width=l.videoWidth,C.height=l.videoHeight;const S=C.getContext("2d");if(S){S.drawImage(l,0,0,C.width,C.height),n.getTracks().forEach(j=>j.stop());const B=await new Promise(j=>C.toBlob(j,"image/png"));if(B&&e.isCurrentRoomSession(o)){const j=`screenshot-${uo(new Date,"YYYYMMDD-HHmmss").value}.png`,Q=new File([B],j,{type:"image/png"});await He(Q,"image")}}window.focus()}catch(S){console.debug("Capture cancelled",S)}
2finally{n?.getTracks().forEach(S=>S.stop()),l?.remove(),C?.remove(),e.isCurrentRoomSession(o)&&(ne.value=!1)}},It=async()=>{if(Z.value||k.value||ne.value||Y.value||!pe())return;const o=me.value.trim();if(!o)return;const n=e.roomSessionVersion;Z.value=!0;try{if(await e.sendText(x.value,o),!e.isCurrentRoomSession(n))return;me.value="",Fe()}catch{e.isCurrentRoomSession(n)&&z(a("box.alert_action_fail"),"error")}finally{e.isCurrentRoomSession(n)&&(Z.value=!1)}},$e=()=>{Y.value?.preview&&URL.revokeObjectURL(Y.value.preview),Y.value=null},Lt=o=>{if(o.length!==1){z(a("box.sharing.one_file"),"error");return}if(k.value||Z.value||ne.value||Y.value||!pe())return;const n=o[0],l=ft(n);lt(n,l)&&(Y.value={file:n,type:l,session:e.roomSessionVersion,preview:l==="image"?URL.createObjectURL(n):""})},$t=()=>{const o=Y.value;o&&($e(),e.isCurrentRoomSession(o.session)&&He(o.file,o.type))};le([()=>e.roomSessionVersion,()=>e.boxStatus],([o,n],[l])=>{o===l&&n!=="not_found"&&n!=="expired"||(re?.abort(),re=null,P.value=null,$e(),me.value="",k.value=!1,Z.value=!1,ne.value=!1,F.value=null,$=null,fe.value=new Set,ee.value.show=!1,Ie.value=!0)},{flush:"sync"});const Et=async o=>{const n=e.roomSessionVersion;if(confirm(a("box.confirm_delete"))){if(!e.isCurrentRoomSession(n))return;try{await e.deleteSnippet(x.value,o)}catch{e.isCurrentRoomSession(n)&&z(a("box.alert_action_fail"),"error")}}},Mt=async(o,n)=>{const l=e.roomSessionVersion;try{if(await navigator.clipboard.writeText(o),!e.isCurrentRoomSession(l))return;F.value=n,setTimeout(()=>{e.isCurrentRoomSession(l)&&F.value===n&&(F.value=null)},2e3)}catch{e.isCurrentRoomSession(l)&&z(a("box.alert_action_fail"),"error")}},Pt=async(o,n,l)=>{if(fe.value.has(l))return;const C=e.roomSessionVersion;fe.value.add(l),z(a("box.toast_download_start"),"success");try{const S=await fetch(o,{mode:"cors",cache:"no-store"});if(!S.ok)throw new Error("Network error");const B=await S.blob();if(!e.isCurrentRoomSession(C))return;const j=URL.createObjectURL(B),Q=document.createElement("a");Q.href=j,Q.download=n||"download",Q.style.display="none",document.body.appendChild(Q),Q.click(),setTimeout(()=>{document.body.removeChild(Q),URL.revokeObjectURL(j)},200)}catch(S){if(!e.isCurrentRoomSession(C))return;console.warn("CORS/Cache 限制,回退到普通打开:",S),z(a("box.toast_download_fallback"),"error"),window.open(o,"_blank","noopener,noreferrer")}finally{e.isCurrentRoomSession(C)&&fe.value.delete(l)}},Dt=()=>{y.value&&(e.joinRoom(x.value,y.value),Se.value=y.value,O())},At=()=>{const o=e.roomSessionVersion;setTimeout(async()=>{if(e.isCurrentRoomSession(o)&&confirm(a("box.confirm_clear"))){if(!e.isCurrentRoomSession(o))return;try{await e.clearMySnippets(x.value)}catch{e.isCurrentRoomSession(o)&&z(a("box.alert_action_fail"),"error")}}},50)},be=()=>{ve!==null&&(clearTimeout(ve),ve=null)},Ne=()=>Ce||!g.value||!M.value&&w.value-Date.now()<3e4,it=()=>{if(be(),M.value||document.visibilityState!=="visible"||!e.isConnected||!w.value)return;const o=Math.max(1e3,w.value-Date.now()-15e3);ve=setTimeout(()=>{ve=null,document.visibilityState==="visible"&&e.isConnected&&ue()},o)},ue=async()=>{if(document.visibilityState!=="visible"||!e.isConnected||!e.accessToken||T.value)return null;const o=ie,n=x.value,l=e.accessToken;T.value=!0,X.value=!1;try{const C=await fetch("/api/box/invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:n,accessToken:l,inviteVersion:2})});if(!C.ok)throw new Error("Unable to create invite");const{inviteToken:S,expiresAt:B,mode:j}=await C.json();if(o!==ie||!e.isConnected||n!==x.value||l!==e.accessToken)return null;const Q=new URL(window.location.origin+window.location.pathname);return Q.searchParams.set("token",S),g.value=Q.toString(),M.value=j==="room"&&B===null&&S.startsWith("public."),w.value=M.value?0:B||Date.now()+5*6e4,Ce=!1,X.value=document.visibilityState==="visible",it(),g.value}catch(C){return o!==ie||(console.error("Token generation failed",C),z(a("home.alert_net_err"),"error")),null}finally{o===ie&&(T.value=!1)}},st=()=>{document.visibilityState!=="visible"||!e.isConnected||!e.accessToken||(Ne()?ue():(X.value=!T.value,it()))},he=u(!1),zt=async()=>
2{if(he.value||T.value||!e.isConnected)return;const o=e.roomSessionVersion,n=x.value,l=e.accessToken,C=()=>e.isCurrentRoomSession(o)&&x.value===n&&e.accessToken===l&&e.isConnected;he.value=!0;try{const S=Ne()?await ue():g.value;if(!S||!C())return;await pt(S),C()&&z(a("box.invite_copied"),"success",2e3)}catch{C()&&z(a("box.invite_copy_failed"),"error",2e3)}finally{he.value=!1}},Vt=async()=>{if(T.value||!e.isConnected)return;const o=e.roomSessionVersion,n=Ne()?await ue():g.value;if(!(!n||!e.isCurrentRoomSession(o))){if(typeof navigator.share=="function")try{const l=p.value?`⁨${x.value}⁩`:x.value;await navigator.share({title:a("box.share_meta_title",{slug:l}),text:a("box.share_meta_description",{slug:l}),url:n});return}catch(l){if(!e.isCurrentRoomSession(o)||l instanceof DOMException&&l.name==="AbortError")return;console.warn("System share failed; copying invite link instead.",l)}try{await pt(n),e.isCurrentRoomSession(o)&&z(a("box.invite_copied"),"success",2e3)}catch{e.isCurrentRoomSession(o)&&z(a("box.invite_copy_failed"),"error",2e3)}}},Bt=()=>{De.value||!d.value||(De.value=!0,ke.value=!0,J!==null&&clearTimeout(J),J=setTimeout(()=>{ke.value=!1,J=null},3e3))};function rt(){ie+=1,X.value=!1,Ce=!0,T.value=!1,be(),oe.value=!1,De.value=!1,ke.value=!1,J!==null&&(clearTimeout(J),J=null),g.value="",M.value=!1,w.value=0}le(x,rt),le([()=>e.isConnected,()=>e.accessToken],([o,n],[l])=>{ie+=1,T.value=!1,be(),(!o||!l)&&(Ce=!0,X.value=!1),o&&n&&(Bt(),st())},{flush:"post"});const ut=()=>{if(document.visibilityState!=="visible"){X.value=!1,be();return}document.visibilityState==="visible"&&(e.ensureConnected(),st(),O())},ct=()=>e.ensureConnected();return Qe(()=>{co("box_mounted"),D(),"scrollRestoration"in history&&(history.scrollRestoration="manual"),G.value&&(G.value.scrollTop=0),Ge(),window.visualViewport?.addEventListener("resize",Te),window.visualViewport?.addEventListener("scroll",Te);const o=b.query.token;let n=!1;e.consumeCreatedRoom(x.value),o&&(e.joinRoom(x.value,void 0,o),n=!0,r.replace({query:{}})),n||(e.pendingPassword&&(Se.value=e.pendingPassword),e.joinRoom(x.value)),document.addEventListener("visibilitychange",ut),window.addEventListener("online",ct),O()}),Jt(()=>{ie+=1,re?.abort(),$e(),e.disconnect(),document.removeEventListener("visibilitychange",ut),window.removeEventListener("online",ct),window.visualViewport?.removeEventListener("resize",Te),window.visualViewport?.removeEventListener("scroll",Te),se!==null&&cancelAnimationFrame(se),be(),J!==null&&clearTimeout(J),q()}),(o,n)=>(m(),_("div",{dir:p.value?"rtl":"ltr",class:L([{"font-urdu":p.value,"desktop-room":!d.value},"h-[100dvh] w-full bg-[#f8fafc] flex flex-col font-sans overflow-hidden fixed left-0 top-0"]),style:Me(Re.value)},[t(e).boxStatus==="not_found"||t(e).boxStatus==="expired"?(m(),te(Wo,{key:0,mobile:d.value,slug:x.value,expired:t(e).boxStatus==="expired",navigate:A},null,8,["mobile","slug","expired"])):(m(),_(ae,{key:1},[i("header",nn,[i("div",an,[i("div",ln,[i("div",sn,[n[12]||(n[12]=i("span",{class:"font-mono font-extrabold text-lg text-blue-600 tracking-tighter"},"tmps",-1)),n[13]||(n[13]=i("span",{class:"font-mono text-gray-300 mx-1 text-lg"},"/",-1)),i("span",rn,f(x.value),1),t(e).isOwner?(m(),_("span",{key:0,dir:p.value?"rtl":"ltr",class:"ms-2 text-[10px] bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded font-bold uppercase tracking-wider transform translate-y-[1px]"},f(t(a)("box.role_owner")),9,un)):I("",!0)]),i("div",cn,[i("span",dn,[i("span",{class:L([Le.value.color,"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75"])},null,2),i("span",{class:L([Le.value.color,"relative inline-flex rounded-full h-2 w-2"])},null,2)]),i("span",{class:L(["text-[10px] font-bold",Le.value.labelColor])},f(Le.value.text),3)]),Ze.value?(m(),_("div",{key:0,class:"flex items-center gap-1 bg-yellow-50 px-2 py-0.5 rounded-full border border-yellow-100 shrink-0 cursor-pointer hover:bg-yellow-100 transition-colors",onClick:n[0]||(n[0]=l=>E.value=!E.value)},[n[14]||(n[14]=i("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-3 w-3 text-yellow-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})],-1)),i("span",vn,f(E.value?Ze.value:"••••"),1)])):I("",!0)]),i("div",mn,[i("button",{onClick:n[1]||(n[1]=l=>t(r).push(t(c)("/"))),class:"text-xs font-bold text-gray-700 bg-gray-100 hover:bg-gray-200 px-3 py-2 rounded-lg transition-colors border border-gray-200 whitespace-nowrap"},f(t(a)("box.exit_btn")),1)])])]),ot.value?(m(),_("div",fn,f(ot.value),1)):I("",!0),i("main",{ref_key:"mainContentRef",ref:G,class:"conversation-scroll flex-1 min-h-0 overflow-y-auto overscroll-contain",onScroll:_t},[i("div",{class:L(["conversation-content",{"mobile-conversation":d.value}])},[!Ae.value.length&&!P.value?(m(),_("div",pn,f(t(a)("box.empty_tip")),1)):I("",!0),(m(!0),_(ae,null,We(Ae.value,(l,C)=>(m(),_(ae,{key:l.id},[C===0||Ve(l.createdAt)!==Ve(Ae.value[C-1].createdAt)?(m(),_("div",bn,[i("span",null,f(Ve(l.createdAt)),1)])):I("",!0),H(Gt,{item:l,mobile:d.value,mine:tt(l),copied:F.value===l.id,downloading:fe.value.has(l.id),onCopy:S=>Mt(l.content,l.id),onDownload:(S,B)=>Pt(S,B,l.id),onDelete:S=>Et(l.id),onLoaded:ze},null,8,["item","mobile","mine","copied","downloading","onCopy","onDownload","onDelete"])],64))),128)),P.value?(m(),_("div",hn,[H(yt,{name:P.value.name},null,8,["name"]),i("div",gn,[i("p",xn,f(P.value.name),1),i("progress",{value:P.value.loaded,max:P.value.size||1,"aria-label":t(a)("box.status_uploading")},null,8,yn),i("small",null,[ce(f(t(a)(P.value.phase==="uploading"?"box.status_uploading":"box.sharing."+P.value.phase))+" ",1),P.value.phase==="uploading"?(m(),_(ae,{key:0},[ce(f(t(Ye)(P.value.loaded))+" / "+f(t(Ye)(P.value.size))+" · "+f(P.value.size?Math.floor(P.value.loaded/P.value.size*100):0)+"%",1)],64)):I("",!0)])])])):I("",!0)],2)],544),!d.value&&t(e).isConnected?(m(),te(Fo,{key:1,"content-element":G.value,"composer-element":Xe.value,rtl:p.value,animate:X.value&&!oe.value,onAnimationend:_e,label:t(a)("box.invite_title"),"trigger-label":t(a)("box.invite_share")},{default:xe(()=>[i("div",wn,[i("p",_n,f(t(a)("box.invite_title")),1),X.value?(m(),te(Zt,{key:0,value:g.value,size:124,level:"H","render-as":"svg",margin:1,foreground:"#111827",background:"#ffffff","image-settings":{src:"/logo.svg",width:26,height:26,excavate:!0,borderRadius:5},"aria-label":t(a)("box.invite_qr_label",{slug:x.value})},null,8,["value","aria-label"])):(m(),_("div",{key:1,class:"flex h-[124px] w-[124px] items-center justify-center","aria-busy":T.value},[T.value?(m(),_("span",Cn,[n[15]||(n[15]=i("span",{"aria-hidden":"true",class:"h-6 w-6 animate-spin rounded-full border-2 border-blue-100 border-t-blue-600 motion-reduce:animate-none"},null,-1)),i("span",Sn,f(t(a)("box.invite_loading")),1)])):(m(),_("button",{key:1,type:"button",class:"max-w-full rounded-lg px-3 py-2 text-center text-sm font-medium text-blue-600 hover:bg-blue-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600 break-words",onClick:ue},f(t(a)("box.invite_retry")),1))],8,kn))]),H(zo,{url:X.value?g.value:"","expires-at":w.value,"room-lifetime":M.value,refreshing:T.value,slug:x.value,rtl:p.value,onRefresh:ue,onFeedback:z},null,8,["url","expires-at","room-lifetime","refreshing","slug","rtl"])]),_:1},8,["content-element","composer-element","rtl","animate","label","trigger-label"])):I("",!0),d.value&&t(e).isConnected?(m(),_("div",{key:2,ref_key:"mobileInviteDockRef",ref:Je,dir:"ltr",style:Me(t(wt)),class:"mobile-invite-actions absolute right-4 z-[35] flex flex-col gap-3",onPointerdown:n[2]||(n[2]=(...l)=>t(K).down&&t(K).down(...l)),onPointermove:n[3]||(n[3]=(...l)=>t(K).move&&t(K).move(...l)),onPointerup:n[4]||(n[4]=(...l)=>t(K).end&&t(K).end(...l)),onPointercancel:n[5]||(n[5]=(...l)=>t(K).end&&t(K).end(...l)),onLostpointercapture:n[6]||(n[6]=(...l)=>t(K).lost&&t(K).lost(...l)),onClickCapture:n[7]||(n[7]=(...l)=>t(K).click&&t(K).click(...l))},[(m(),_(ae,null,We(["copy","share"],l=>i("div",{key:l,class:"relative h-14 w-14 shrink-0"},[H(eo,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-x-2 opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"translate-x-0 opacity-100","leave-to-class":"translate-x-2 opacity-0"},{default:xe(()=>[ke.value?(m(),_("span",{key:0,dir:p.value?"rtl":"ltr",class:"absolute right-[calc(100%+0.5rem)] top-1/2 w-max max-w-[calc(100vw-6rem)] -translate-y-1/2 whitespace-normal break-words rounded-2xl border border-blue-100 bg-white px-3.5 py-2 text-[13px] leading-[18px] font-bold text-gray-800 shadow-[0_8px_24px_-10px_rgba(15,23,42,0.35)]"},f(t(a)(l==="copy"?"box.invite_copy":"box.invite_share")),9,Rn)):I("",!0)]),_:2},1024),i("button",{type:"button",class:L(["box-border flex h-14 w-14 shrink-0 items-center justify-center rounded-full border-[1.5px] border-blue-600 transition-transform active:scale-95 disabled:cursor-wait disabled:opacity-60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-600",l==="copy"?"bg-white text-blue-600 shadow-[0_8px_20px_-8px_rgba(15,23,42,0.25)]":"bg-blue-600 text-white shadow-[0_12px_28px_-8px_rgba(37,99,235,0.65)]"]),"aria-label":t(a)(l==="copy"?"box.invite_copy":"box.invite_share"),disabled:T.value||l==="copy"&&he.value,"aria-busy":T.value||l==="copy"&&he.value,onClick:C=>l==="copy"?zt():Vt()},[(m(),te(to(l==="copy"?t(gt):t(Ee)),{class:"h-6 w-6","aria-hidden":"true"}))],10,Tn)])),64))],36)):I("",!0),i("div",{ref_key:"composerDockRef",ref:Xe,class:L(["composer-dock",{"mobile-dock":d.value}])},[H(oo,{modelValue:me.value,"onUpdate:modelValue":n[8]||(n[8]=l=>me.value=l),mobile:d.value,busy:k.value||Z.value||ne.value||!!Y.value,connected:Be.value,images:et.value,files:kt.value,"has-mine":Ct.value>0,onShare:It,onPick:St,onCapture:Tt,onClear:At,onAttachment:Lt,onInvalid:n[9]||(n[9]=l=>z(t(a)("box.sharing.one_file"),"error"))},null,8,["modelValue","mobile","busy","connected","images","files","has-mine"]),i("input",{ref_key:"fileInput",ref:v,type:"file",class:"hidden",onChange:Rt},null,544)],2),ee.value.show?(m(),_("div",{key:3,role:"status","aria-live":"polite","aria-atomic":"true",class:L(["fixed top-20 left-1/2 -translate-x-1/2 z-[100] pointer-events-none",d.value?"w-max max-w-[calc(100vw-2rem)]":""])},[i("div",{class:L(["animate-fade-in-up px-4 py-2 rounded-full shadow-lg border flex items-center gap-2 bg-white",ee.value.type==="success"?d.value?"border-blue-100 text-blue-600":"border-green-100 text-green-700":"border-red-100 text-red-700"])},[ee.value.type==="success"?(m(),_("svg",In,[...n[16]||(n[16]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(m(),_("svg",Ln,[...n[17]||(n[17]=[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1)])])),i("span",$n,f(ee.value.msg),1)],2)],2)):I("",!0),Y.value?(m(),te(en,{key:4,file:Y.value.file,preview:Y.value.preview,onCancel:$e,onShare:$t},null,8,["file","preview"])):I("",!0),t(e).isLocked?(m(),_("div",En,[i("div",Mn,[n[18]||(n[18]=i("div",{class:"w-16 h-16 bg-blue-50 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-6"},[i("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})])],-1)),i("h2",Pn,f(t(a)("box.modal_title")),1),nt.value?(m(),_("p",Dn,f(nt.value),1)):I("",!0),i("form",{onSubmit:de(Dt,["prevent"]),class:"space-y-4 mt
2-6"},[no(i("input",{"onUpdate:modelValue":n[10]||(n[10]=l=>y.value=l),type:"password",dir:"ltr",placeholder:t(a)("box.modal_placeholder"),class:"w-full h-12 px-4 bg-gray-50 border border-gray-200 rounded-xl text-center text-lg outline-none focus:border-blue-500",autofocus:""},null,8,An),[[ao,y.value]]),i("button",zn,f(t(a)("box.modal_unlock")),1),i("button",{type:"button",onClick:n[11]||(n[11]=l=>t(r).push(t(c)("/"))),class:"block w-full text-gray-400 text-sm mt-2"},f(t(a)("box.modal_back")),1)],32)])])):I("",!0)],64))],14,on))}}),jn=we(Vn,[["__scopeId","data-v-b8a90c57"]]);export{jn as default};

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.