PageSourceSearch

https://app.speckle.systems/_nuxt/xb6g4co1.js

js speckle.systems collected 2026-10-09 21:38:53 UTC 6,690 bytes, 8 lines download raw bytes

1import{D as Q,y as Y,a1 as G,b as X,m as Z,d0 as ee,W as te,bT as oe,o as a,h as d,i as o,du as se,bO as $,K as e,J as r,I as k,bP as ae,bl as j,c4 as re,c1 as ie,c2 as ne,bY as le,c as b,k as pe,bQ as ce,bU as me,a9 as de,aa as ue,f as u,r as f,dq as fe,dp as _e,ap as he,as as ve}from"./WEeefKdr.js";import{_ as ye}from"./CqbgGWOm.js";import{u as ke,_ as xe,c as we,d as ge}from"./ZBn8BsXU.js";import{p as be}from"./DQTxDRbH.js";import"./D1AWpgyS.js";import"./C-udOVnR.js";import"./ITofZdyC.js";import"./DAEL-3gK.js";import"./DlAUqK2U.js";import"./CjPzHyIF.js";import"./DA_d_HHx.js";import"./DARzOc30.js";import"./DVenbWt0.js";import"./BGgBgLEZ.js";import"./BIedx-DL.js";import"./CfPFbFHC.js";import"./0439j3BK.js";import"./BFl7yWS-.js";import"./cKakX57H.js";import"./D-pctMGk.js";import"./-VRxyjNm.js";import"./CBsoi7Pu.js";import"./DVWSoppF.js";import"./nqsHOz7m.js";import"./LcWGumvh.js";import"./D1ir6ElR.js";import"./DBDnvsHa.js";import"./CI7TgXTl.js";import"./eEop63ad.js";import"./R7xYavxx.js";import"./ckJ08Qxh.js";import"./BrBMWapl.js";import"./CCUJ6sce.js";import"./B9YQpjLN.js";import"./C07VkVnA.js";import"./B6q6teig.js";import"./DuXjnzXT.js";import"./D5HfGSRG.js";import"./DRMud1xY.js";import"./BczoPxKn.js";import"./zl5TIlo3.js";import"./B0ZzRs48.js";import"./BsjKNtzN.js";import"./EqQpgai6.js";import"./BYNbRO4k.js";import"./CT1GQgOo.js";import"./CemCNy07.js";import"./D2o-_PRJ.js";import"./DPHld6Nw.js";import"./B0PnDJVn.js";import"./SAlWIkn8.js";import"./BQ2QNe2N.js";import"./DTlf9xqd.js";import"./BtsXZHuJ.js";import"./BqGkuRop.js";import"./qiUIvtoZ.js";import"./DyY_W_Ad.js";import"./Rbarl8pZ.js";import"./CMoac_KE.js";import"./DMlGyuOp.js";import"./DVEPa-5G.js";import"./DYGkWF0S.js";import"./DBVGURGm.js";import"./DYlwuh86.js";import"./D8cqNEDV.js";import"./CBzLxUNv.js";import"./BqY2Jp45.js";import"./CPVb0Ox4.js";import"./CcX7xOMm.js";import"./JrNg4DwB.js";import"./Cvxr2Y5c.js";const Te={class:"flex h-dvh min-h-0 flex-col bg-default"},Se={class:"flex h-14 shrink-0 items-center justify-between gap-4 border-b border-default px-4 sm:px-6"},Ie={class:"flex min-w-0 items-center gap-3"},Pe={class:"truncate text-sm font-semibold"},Ce={class:"flex shrink-0 items-center gap-2"},qe={key:0,class:"flex flex-1 items-center justify-center p-6"},Ae={class:"space-y-4"},$e={key:1,class:"flex flex-1 items-center justify-center p-6"},je={class:"max-w-sm text-center space-y-2"},Ee={class:"text-sm text-muted"},Re={key:3,class:"@container relative flex min-h-0 flex-1"},Ve={class:"min-h-0 flex-1 overflow-y-auto simple-scrollbar"},Me={class:"mx-auto w-full max-w-6xl px-6 py-8 space-y-3"},Ne={key:0,class:"flex justify-center py-12 text-muted"},oo=Q({__name:"[token]",setup(Ue){const E=Y(`
2  query AiShareTokenInfo($token: String!) {
3    shareTokenInfo(token: $token) {
4      id
5      hasPassword
6    }
7  }
8`),i=G(),R=X(),T=Z(),_=ee(),V=u(()=>i.query.replay==="1"),p=u(()=>typeof i.params.token=="string"?i.params.token:""),h=u(()=>typeof i.query.p=="string"?i.query.p:""),M=u(()=>!p.value||!h.value),n=f(""),x=f(!1),S=f(!1),l=f(null),I=()=>({token:p.value||void 0,sharePasswordToken:he(p.value)??void 0});be(I);const N=u(()=>h.value||void 0),{messages:w,error:v,currentTitle:g,loadSharedConversation:U}=ke({projectId:N,getTokenMetadata:I,apiOrigin:T}),s=f(!0);function O(){}function z(){const{replay:c,...t}=i.query;return ve({path:i.path,query:t,hash:i.hash},{replace:!0})}function B(){_.preference=_.value==="dark"?"light":"dark"}async function P(){l.value=null,s.value=!0;try{await U({token:p.value,projectId:h.value,password:n.value||void 0})}finally{s.value=!1}if(v.value&&/password/i.test(v.value)){x.value=!0,l.value=n.value?"Incorrect password. Try again.":"This chat is password protected.";return}S.value=!0}async function C(){if(!n.value)return;const c=fe(p.value);if(!c){l.value="This share link is malformed.";return}s.value=!0,l.value=null;try{const t=await $fetch(`${T}/api/v1/shares/${c}/verify`,{method:"POST",body:{password:n.value}});if(!t?.sessionToken){l.value="Could not verify the password.";return}_e.set(c,t.sessionToken)}catch(t){const m=t.response?.status??t.statusCode;l.value=m===401||m===403?"Incorrect password. Try again.":"Could not verify the password.";return}finally{s.value=!1}await P()}return te(async()=>
8{if(!p.value||!h.value){s.value=!1;return}try{const{data:c}=await R.client.query({query:E,variables:{token:p.value},fetchPolicy:"network-only"});if(c?.shareTokenInfo?.hasPassword){x.value=!0,s.value=!1;return}}catch{}await P()}),oe({title:u(()=>g.value?`${g.value} · Shared`:"Shared AI chat")}),(c,t)=>{const m=ae,K=re,W=ie,D=ye,F=ce,q=me,H=xe,L=we,J=ge;return a(),d("div",Te,[o("header",Se,[o("div",Ie,[t[1]||(t[1]=o("img",{src:se,alt:"Speckle",class:"size-7 shrink-0"},null,-1)),o("h1",Pe,$(e(g)||"Shared AI chat"),1)]),o("div",Ce,[r(K,{to:"https://speckle.systems/intelligence",external:"",target:"_blank",rel:"noopener"},{default:k(()=>[r(m,{color:"primary",size:"xs","trailing-icon":"i-lucide-arrow-up-right"},{default:k(()=>[...t[2]||(t[2]=[j(" Powered by Speckle ",-1)])]),_:1})]),_:1}),r(m,{icon:e(_).value==="dark"?"i-lucide-sun":"i-lucide-moon",color:"neutral",variant:"ghost",size:"xs",square:"","aria-label":e(_).value==="dark"?"Switch to light mode":"Switch to dark mode",onClick:B},null,8,["icon","aria-label"])])]),e(x)&&!e(S)?(a(),d("div",qe,[r(F,{class:"w-full max-w-sm app-panel"},{default:k(()=>[o("div",Ae,[t[4]||(t[4]=o("div",{class:"space-y-1"},[o("h2",{class:"text-base font-semibold"},"Password required"),o("p",{class:"text-sm text-muted"},"This shared chat is password protected.")],-1)),r(W,{modelValue:e(n),"onUpdate:modelValue":t[0]||(t[0]=y=>le(n)?n.value=y:null),type:"password",placeholder:"Enter password",class:"w-full",autocomplete:"off",onKeydown:ne(C,["enter"])},null,8,["modelValue"]),e(l)?(a(),b(D,{key:0,color:"error",variant:"soft",description:e(l),icon:"i-lucide-alert-circle"},null,8,["description"])):pe("",!0),r(m,{color:"primary",block:"",loading:e(s),disabled:!e(n),onClick:C},{default:k(()=>[...t[3]||(t[3]=[j(" View chat ",-1)])]),_:1},8,["loading","disabled"])])]),_:1})])):e(v)||e(M)?(a(),d("div",$e,[o("div",je,[r(q,{name:"i-lucide-link-2-off",class:"size-8 text-muted mx-auto"}),o("p",Ee,$(e(v)||"This share link is malformed."),1)])])):e(V)&&!e(s)?(a(),b(H,{key:2,messages:e(w),onExit:z},null,8,["messages"])):(a(),d("div",Re,[o("section",Ve,[o("div",Me,[e(s)?(a(),d("div",Ne,[r(q,{name:"i-lucide-loader-circle",class:"size-6 animate-spin"})])):(a(!0),d(de,{key:1},ue(e(w),(y,A)=>(a(),b(L,{key:y.id,message:y,"prev-role":A>0?e(w)[A-1]?.role??null:null,"user-initials":"",onElicitationSubmit:O},null,8,["message","prev-role"]))),128))])]),r(J)]))])}}});export{oo 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.