@nexlylab/widget 1.33.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/INSTALL.txt +1 -1
  2. package/dist/runtime/{1.33.0/chunks/ClickToLoadEmbed-DdH19Upf-CnpjmfE1.js → 1.34.0/chunks/ClickToLoadEmbed-BNWVfZ1y-DuTZcv6f.js} +2 -2
  3. package/dist/runtime/{1.33.0/chunks/PanelInfoVideo-XFcVoL2c-qpxDXdLm.js → 1.34.0/chunks/PanelInfoVideo-Di7qwhV_-qpxDXdLm.js} +1 -1
  4. package/dist/runtime/{1.33.0/chunks/assistant-link-components-gMuMhmaU-rHpeX4O6.js → 1.34.0/chunks/assistant-link-components-DtT0biCl-jR32KHTm.js} +2 -2
  5. package/dist/runtime/{1.33.0/chunks/assistant-link-policy-DlGAtyk7-By6jpR50.js → 1.34.0/chunks/assistant-link-policy-B77YPf4E-By6jpR50.js} +1 -1
  6. package/dist/runtime/{1.33.0/chunks/block-rating-CAVRRYuG-CQMNokIy.js → 1.34.0/chunks/block-rating-uD_0LK-1-CQMNokIy.js} +1 -1
  7. package/dist/runtime/{1.33.0/chunks/external-url-JbUnX7Da-rLiy7c9v.js → 1.34.0/chunks/external-url-Bx_GTDOx-rLiy7c9v.js} +1 -1
  8. package/dist/runtime/{1.33.0/chunks/index-CPGSyaZ4-BoVmvEOm.js → 1.34.0/chunks/index--7VB9nyF-BoVmvEOm.js} +1 -1
  9. package/dist/runtime/{1.33.0/chunks/index-Cfy6Ocqe-CzwqZYRk.js → 1.34.0/chunks/index-66kR66X--CzwqZYRk.js} +1 -1
  10. package/dist/runtime/{1.33.0/chunks/index-BzVJMW3i-Bhh8_8Oh.js → 1.34.0/chunks/index-67cmm3Si-Bhh8_8Oh.js} +1 -1
  11. package/dist/runtime/{1.33.0/chunks/index-DTa1aDGz-Deg8QEW2.js → 1.34.0/chunks/index-7wlPUbYV-Deg8QEW2.js} +1 -1
  12. package/dist/runtime/{1.33.0/chunks/index-CDlumsdH-BgpZz7kC.js → 1.34.0/chunks/index-B80p2HRD-BHvEiO2X.js} +2 -2
  13. package/dist/runtime/{1.33.0/chunks/index-HIu_g6Cr-CEIHlemy.js → 1.34.0/chunks/index-BHphkqVW-CEIHlemy.js} +1 -1
  14. package/dist/runtime/{1.33.0/chunks/index-7yhyghzH-BlFXtfQb.js → 1.34.0/chunks/index-BIeasoH0-BlFXtfQb.js} +1 -1
  15. package/dist/runtime/{1.33.0/chunks/index-BP1Q45X4-f3F4IxQ5.js → 1.34.0/chunks/index-BPwttNii-f3F4IxQ5.js} +1 -1
  16. package/dist/runtime/{1.33.0/chunks/index-CmM1q2bg-D6H0juMn.js → 1.34.0/chunks/index-BTgHOj2W-D6H0juMn.js} +1 -1
  17. package/dist/runtime/{1.33.0/chunks/index-DOJHU9qy-Bil-vDLm.js → 1.34.0/chunks/index-BfGmnBJ0-BOltxOU-.js} +2 -2
  18. package/dist/runtime/{1.33.0/chunks/index-CH-C6uk_-B-pT4hKt.js → 1.34.0/chunks/index-BjNWgAJk-B-pT4hKt.js} +1 -1
  19. package/dist/runtime/{1.33.0/chunks/index-xQDKGkvA-pCzSL4DD.js → 1.34.0/chunks/index-BlY9hgA--pCzSL4DD.js} +1 -1
  20. package/dist/runtime/{1.33.0/chunks/index-uYSCRIpT-qsVnaLmo.js → 1.34.0/chunks/index-BmajLlTC-qsVnaLmo.js} +1 -1
  21. package/dist/runtime/{1.33.0/chunks/index-s0zHGN1t-DWm0RYZF.js → 1.34.0/chunks/index-BtBJMXR--DWm0RYZF.js} +1 -1
  22. package/dist/runtime/{1.33.0/chunks/index-BCxeWwto-B9PuY2Gx.js → 1.34.0/chunks/index-Bz-3E3Sa-B9PuY2Gx.js} +1 -1
  23. package/dist/runtime/{1.33.0/chunks/index-D9fi5TQ9-k8zxZkfU.js → 1.34.0/chunks/index-CM2ok1Hp-k8zxZkfU.js} +1 -1
  24. package/dist/runtime/{1.33.0/chunks/index-BblCrrAW-bh6F7tw3.js → 1.34.0/chunks/index-CMdx7oFx-bh6F7tw3.js} +1 -1
  25. package/dist/runtime/{1.33.0/chunks/index-SV2KdT0_-BZw4n83V.js → 1.34.0/chunks/index-COobDdoM-BZw4n83V.js} +1 -1
  26. package/dist/runtime/{1.33.0/chunks/index-BPfUysTZ-CV5ZiVsD.js → 1.34.0/chunks/index-CQCPJl3S-CV5ZiVsD.js} +1 -1
  27. package/dist/runtime/{1.33.0/chunks/index-BO0vI80C-qK4w7DnX.js → 1.34.0/chunks/index-CSsAPgvv-qK4w7DnX.js} +1 -1
  28. package/dist/runtime/{1.33.0/chunks/index-DZNxd978-BmIQ-NmU.js → 1.34.0/chunks/index-CXm6d9l1-BmIQ-NmU.js} +1 -1
  29. package/dist/runtime/{1.33.0/chunks/index-BjHXOMPQ-Bt7j8evJ.js → 1.34.0/chunks/index-CZcU6ylZ-Bt7j8evJ.js} +1 -1
  30. package/dist/runtime/{1.33.0/chunks/index-BwnCq3yC-LScXPMbE.js → 1.34.0/chunks/index-Ce73FsEJ-Ce0fEutJ.js} +2 -2
  31. package/dist/runtime/{1.33.0/chunks/index-S2W2KqpV-PMvqlUvO.js → 1.34.0/chunks/index-Cf3qMIwZ-PMvqlUvO.js} +1 -1
  32. package/dist/runtime/{1.33.0/chunks/index-CnknkPUN-Yl3jEGAx.js → 1.34.0/chunks/index-CqSCG8MM-Yl3jEGAx.js} +1 -1
  33. package/dist/runtime/{1.33.0/chunks/index-CZCcZigQ-qH_mrcVT.js → 1.34.0/chunks/index-CzfX3ctc-qH_mrcVT.js} +1 -1
  34. package/dist/runtime/{1.33.0/chunks/index-DsyaMk1k-DpMzyqHN.js → 1.34.0/chunks/index-DBhWCUM5-DpMzyqHN.js} +1 -1
  35. package/dist/runtime/{1.33.0/chunks/index-CYP-tLa5-DLVDVk-F.js → 1.34.0/chunks/index-DT9H1y9L-DladDuuj.js} +2 -2
  36. package/dist/runtime/{1.33.0/chunks/index-CNbQ508J-BPOHZMXu.js → 1.34.0/chunks/index-DbY1AG4s-C-OyGFef.js} +2 -2
  37. package/dist/runtime/{1.33.0/chunks/index-qzvjftnO-CDVtcfdt.js → 1.34.0/chunks/index-Ddxqdy4M-CDVtcfdt.js} +1 -1
  38. package/dist/runtime/{1.33.0/chunks/index-CVtuVQCx-Dtq7n928.js → 1.34.0/chunks/index-DmV2pHdJ-Dtq7n928.js} +1 -1
  39. package/dist/runtime/{1.33.0/chunks/index-CZSW9eXg-BwcGrX1b.js → 1.34.0/chunks/index-DnWzIgAa-DlTfKZaL.js} +2 -2
  40. package/dist/runtime/{1.33.0/chunks/index-Bd_8PmPr-CgO1smBF.js → 1.34.0/chunks/index-Dnqtxtmw-CgO1smBF.js} +1 -1
  41. package/dist/runtime/{1.33.0/chunks/index-BWY1nqf0-DX50C5MZ.js → 1.34.0/chunks/index-Dw35VwDs-DX50C5MZ.js} +1 -1
  42. package/dist/runtime/{1.33.0/chunks/index--H6hRpBJ-F9_TzvkO.js → 1.34.0/chunks/index-Dydy8_XR-F9_TzvkO.js} +1 -1
  43. package/dist/runtime/{1.33.0/chunks/index-NPLN6oCC-VW9D8cgC.js → 1.34.0/chunks/index-FHHrEvNZ-VW9D8cgC.js} +1 -1
  44. package/dist/runtime/{1.33.0/chunks/index-v9CNsbwM-CavFmRiD.js → 1.34.0/chunks/index-RyI_7m1j-CavFmRiD.js} +1 -1
  45. package/dist/runtime/{1.33.0/chunks/index-DG6McKPZ-CqZ9_vG_.js → 1.34.0/chunks/index-TJEJpVI7-CqZ9_vG_.js} +1 -1
  46. package/dist/runtime/{1.33.0/chunks/index-Ci7P37Ya-W5nof5Mx.js → 1.34.0/chunks/index-Va_2P_Gg-Kzu4aFqn.js} +2 -2
  47. package/dist/runtime/{1.33.0/chunks/index--pcCOJWb-BzpgdoE8.js → 1.34.0/chunks/index-_wovirve-BzpgdoE8.js} +1 -1
  48. package/dist/runtime/{1.33.0/chunks/index-CNP-4dFm-BlRhWcs1.js → 1.34.0/chunks/index-kmVVSAKR-BlRhWcs1.js} +1 -1
  49. package/dist/runtime/{1.33.0/chunks/index-DUV1wU5j-ErDxRmJu.js → 1.34.0/chunks/index-xV27oZEe-ErDxRmJu.js} +1 -1
  50. package/dist/runtime/1.34.0/nexly.js +61 -0
  51. package/dist/v1.js +4 -4
  52. package/package.json +1 -1
  53. package/dist/runtime/1.33.0/nexly.js +0 -61
  54. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
  55. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
  56. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
  57. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/allowed-elements-C0OfX2zF-DIBV8lKu.js +0 -0
  58. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
  59. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
  60. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
  61. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
  62. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
  63. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
  64. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/index.modern-CioVZ357-nfRNslCS.js +0 -0
  65. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
  66. /package/dist/runtime/{1.33.0 → 1.34.0}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
@@ -3,4 +3,4 @@ import{r as s,j as e,L as Re,K as te,e as it}from"../nexly.js";import{x as ze,s
3
3
  `)}}function It({config:o,actions:i,baseUrl:n,i18n:p,auth:w,externalContext:b,productId:y,sessionId:j,sessionMessages:g,readOnly:U}){const S=U===!0,r=p?.t??(t=>t),u=b?.apiKey??"",m=p?.currentLanguage??"en",Z=Re(o.placeholder,m,{t:r,fallbackKey:"chat.input_placeholder",enDefault:"Type a message..."}),H=Re(o.welcomeMessage,m,{t:r,fallbackKey:"chat.empty_state",enDefault:["Hi! How can I help you?","Hello! How can I help you?"]}),f=typeof o._draft=="string"?o._draft:void 0,D=typeof o._draftContext=="string"?o._draftContext:void 0,I=o._autoSend===!0,$=Array.isArray(o._quickChips)?o._quickChips:[],E=JSON.stringify($),k=s.useRef(w?.jwt);s.useEffect(()=>{k.current=w?.jwt},[w?.jwt]);const F=b?.voice,d=!!F?.enabled&&(F?.languages??[]).includes(m),[c,h]=s.useState(()=>g?.map(t=>({id:t.id,role:t.role,text:t.content}))??[]),[T,z]=s.useState(""),[ce,se]=s.useState([]),[L,R]=s.useState(!1),[ge,q]=s.useState(null),[me,Q]=s.useState(!1),{containerRef:_,isPinned:V,scrollToBottom:C,stickToBottom:M}=ot(),v=s.useRef(null),J=s.useRef(null),K=s.useRef(j??De()),Y=s.useRef(g&&g.length>0?j??null:null),ee=s.useRef(null),le=s.useRef(void 0),ae=s.useRef(!1);s.useEffect(()=>{i.emit("chat:session",{sessionId:K.current})},[i]),s.useEffect(()=>{M()},[c,L,M]);const be=s.useCallback(()=>{const t=v.current;if(!t)return;const a=t.closest(".es-block")?.clientHeight??0,l=a>0?Math.round(a*.4):120;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,l)}px`,t.style.overflowY=t.scrollHeight>l?"auto":"hidden"},[]);s.useLayoutEffect(()=>{be()},[T,be]);const re=s.useCallback(()=>{ae.current&&(ae.current=!1,i.emit("chat:draftConsumed",void 0))},[i]),ne=s.useCallback(async t=>{const a=t.trim();if(!a||L)return;re();const l=le.current;le.current=void 0,se([]),Q(!1),J.current?.abort(),J.current=new AbortController;const A=yt.test(a),B=`user-${Date.now()}`,X={id:B,role:"user",text:a,...A?{linkStatus:"reading",linkFailedCount:0}:{}};h(x=>[...x,X]);const O=()=>{A&&h(x=>x.map(W=>W.id===B&&W.linkStatus==="reading"?{...W,linkStatus:"done"}:W))};C(),z(""),R(!0),q(null),v.current&&(v.current.style.height="auto");const N=c.map(x=>({role:x.role,content:x.text})),Te=await w?.ensureValidToken?.()??k.current,st={"Content-Type":"application/json",...u?{"X-API-Key":u}:{},...Te?{Authorization:`Bearer ${Te}`}:{}},ue=`assistant-${Date.now()}`;let ie="",Le=!1,xe=!1;const Ae=()=>{xe||(xe=!0,q(ue),h(x=>[...x,{id:ue,role:"assistant",text:ie}]))},Be=K.current,Pe=_t.test(Be)?Be:void 0,He=xt(),[je,ke]=await te(fetch(`${n}/api/widget/chat-bot/stream`,{method:"POST",headers:st,body:JSON.stringify({text:a,history:N,...Pe?{sessionId:Pe}:{},...y?{productId:y}:{},...He?{timeZone:He}:{},...l?{blockContext:l}:{}}),signal:J.current.signal}));if(ke){if(ke instanceof Error&&ke.name==="AbortError"){O();return}R(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}if(!je.ok||!je.body){R(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}const at=je.body.getReader(),rt=new TextDecoder;let de="",_e;const Me=()=>{_e&&clearTimeout(_e),_e=void 0},Ke=()=>{Me(),_e=setTimeout(()=>{J.current?.abort(),R(!1),q(null),O()},bt)},[,ve]=await te((async()=>{for(Ke();;){const{done:x,value:W}=await at.read();if(Ke(),x)break;de+=rt.decode(W,{stream:!0});let we;for(;(we=de.indexOf(`
4
4
 
5
5
  `))!==-1;){const nt=de.slice(0,we);de=de.slice(we+2);const{event:he,data:pe}=jt(nt);if(!(!he||!pe)){if(he==="start"){const P=JSON.parse(pe);P.sessionId&&P.sessionId!==K.current&&(K.current=P.sessionId,Y.current=P.sessionId,i.emit("chat:session",{sessionId:P.sessionId}))}else if(he==="token"){const P=JSON.parse(pe);ie+=P.value??"",Ae();const Se=ie;h(Ce=>Ce.map(G=>G.id===ue?{...G,text:Se}:G))}else if(he==="meta"){const P=JSON.parse(pe);Le=!0;const Se=P.assistantMessage?.content??ie,Ce=Array.isArray(P.pastedLinks)?P.pastedLinks.filter(G=>G.status&&G.status!=="ok").length:0;Ae(),h(G=>G.map(oe=>oe.id===ue?{...oe,text:Se,promptLogId:P.logId}:oe.id===B&&oe.linkStatus==="reading"?{...oe,linkStatus:"done",linkFailedCount:Ce}:oe))}else if(he==="error"){const P=JSON.parse(pe);throw new Error(P.message??"Stream error")}}}}if(!Le&&!ie)throw new Error("Stream ended before completion")})());if(Me(),R(!1),q(null),O(),ve){if(ve instanceof Error&&ve.name==="AbortError"||ie)return;h(xe?x=>x.map(W=>W.id===ue?{...W,text:r("chat.error_message"),promptLogId:void 0}:W):x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}])}},[L,i,c,r,u,n,y,C,w,re]),ye=s.useCallback(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop(),ne(T)},[ne,T,b]);s.useEffect(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop()},[j]);const qe=s.useCallback(t=>{if(t.autoSend){ne(t.message);return}se([]),z(""),re(),v.current&&(v.current.style.height="auto",v.current.focus())},[ne,re]);s.useEffect(()=>{if(!(f!==void 0||$.length>0))return;const t=`${f}${D??""}${String(I)}${E}`;if(ee.current!==t){if(ee.current=t,ae.current=!0,le.current=D,I&&f!==void 0){se([]),ne(f);return}se($),f!==void 0&&(z(f),v.current&&v.current.focus())}},[f,D,I,E,ne]);const Je=s.useCallback(t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),ye())},[ye]),Xe=s.useCallback(t=>{re(),z(t.target.value)},[re]),Ye=s.useCallback(t=>{const a=t.trim();a&&(z(l=>l?`${l} ${a}`:a),requestAnimationFrame(()=>{v.current?.focus()}))},[]);s.useEffect(()=>()=>J.current?.abort(),[]),s.useEffect(()=>i.on("chat:clearHistory",t=>{const a=t;h([]),Q(!1);const l=a?.sessionId??De();K.current=l,Y.current=l,i.emit("chat:session",{sessionId:l})}),[i]);const Ge=s.useCallback(async()=>{const t=k.current,[a,l]=await te(fetch(`${n}/api/chat/sessions/new`,{method:"POST",headers:{...u?{"X-API-Key":u}:{},...t?{Authorization:`Bearer ${t}`}:{}}}));if(!l&&a.ok){const[A,B]=await te(a.json());if(!B&&A.success&&A.data?.sessionId){i.emit("chat:clearHistory",{sessionId:A.data.sessionId});return}}i.emit("chat:clearHistory",void 0)},[i,u,n]),Ze=s.useCallback(()=>{i.emit("chat:showHistory",void 0)},[i]),fe=s.useCallback(async t=>{K.current=t,i.emit("chat:session",{sessionId:t}),h([]),Q(!1),R(!0);const a=k.current,[l,A]=await te(fetch(`${n}/api/chat/sessions/${encodeURIComponent(t)}/messages?limit=50`,{headers:{...u?{"X-API-Key":u}:{},...a?{Authorization:`Bearer ${a}`}:{}}}));if(R(!1),A||!l.ok){Q(!0);return}const[B,X]=await te(l.json());if(X){Q(!0);return}const O=B.data?.messages??[];h(O.map(N=>({id:N.id,role:N.role,text:N.content,promptLogId:N.promptLogId??void 0,rating:N.userScore??null}))),Y.current=t,C("auto")},[i,u,n,C]);s.useEffect(()=>i.on("chat:select-session",t=>{const{sessionId:a}=t;!a||a===Y.current||fe(a)}),[i,fe]);const Qe=s.useCallback(()=>{fe(K.current)},[fe]),Ie=s.useRef(c);s.useEffect(()=>{Ie.current=c},[c]);const Ve=s.useCallback(({messageId:t,rating:a},{keepalive:l})=>{const A=Ie.current.find(B=>B.id===t);!A||!A.promptLogId||!k.current||(h(B=>B.map(X=>X.id===t?{...X,rating:a,ratingPending:!0}:X)),(async()=>{const[B,X]=await te(fetch(`${n}/api/widget/ai-feedback`,{method:"POST",keepalive:l,headers:{"Content-Type":"application/json",...u?{"X-API-Key":u}:{},Authorization:`Bearer ${k.current}`},body:JSON.stringify({promptLogId:A.promptLogId,rating:a})}));if(X||!(B.ok||B.status===409)){h(O=>O.map(N=>N.id===t?{...N,rating:null,ratingPending:!1}:N));return}h(O=>O.map(N=>N.id===t?{...N,rating:a,ratingPending:!1}:N))})())},[u,n]),{pending:$e,rate:Ee,undo:et}=ct({submit:Ve}),tt=s.useCallback((t,a)=>{const l=c.find(A=>A.id===t);!l||!l.promptLogId||l.ratingPending||!k.current||Ee(t,a)},[c,Ee]);return e.jsxs(it,{blockType:"chat",children:[e.jsxs("div",{className:"es-chat__header",children:[e.jsx("span",{className:"es-chat__header-title",children:r("chat.chat")}),e.jsxs("div",{className:"es-chat__header-actions",children:[e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.new_session_button"),title:r("chat.new_session_button"),onClick:Ge,children:e.jsx(gt,{size:18})}),e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.history_button"),title:r("chat.history_button"),onClick:Ze,children:e.jsx(pt,{size:16})})]})]}),e.jsxs("div",{className:"es-block__body es-chat__body",children:[e.jsxs("div",{className:"es-chat__messages",ref:_,children:[c.length===0&&!me&&!L&&e.jsx("div",{className:"es-chat__welcome",children:H}),me&&e.jsxs("div",{className:"es-chat__load-error",role:"alert",children:[e.jsx("span",{className:"es-chat__load-error-text",children:r("chat.load_session_error")}),e.jsx("button",{type:"button",className:"es-chat__load-error-retry",onClick:Qe,children:r("chat.retry")})]}),c.map(t=>e.jsxs("div",{className:`es-chat__bubble es-chat__bubble--${t.role}${t.id===ge?" es-chat__bubble--streaming":""}`,children:[t.role==="assistant"?e.jsx("div",{className:"es-chat__bubble-text es-chat__bubble-text--md",children:e.jsx(ze,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:a=>We(a)??"",transformImageUri:()=>"",components:Fe,children:t.text})}):e.jsx("div",{className:"es-chat__bubble-text",children:t.text}),t.role==="user"&&t.linkStatus==="reading"&&e.jsxs("div",{className:"es-chat__link-status",role:"status",children:[e.jsx("span",{className:"es-chat__link-status-spinner","aria-hidden":"true"}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.reading_link")})]}),t.role==="user"&&t.linkStatus==="done"&&(t.linkFailedCount??0)>0&&e.jsxs("div",{className:"es-chat__link-status es-chat__link-status--failed",children:[e.jsx(mt,{size:13}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.link_unreadable")})]}),t.role==="assistant"&&t.promptLogId&&k.current&&(()=>{const a=$e?.messageId===t.id?$e.rating:null;return e.jsxs("div",{className:"es-chat__feedback",children:[e.jsx("span",{className:"es-chat__feedback-label",children:t.rating&&a===null?r("chat.feedback_thanks"):r("support_chat.rate_aria")}),e.jsx(ft,{value:a??t.rating??null,onChange:l=>tt(t.id,l),disabled:a===null&&(!!t.rating||t.ratingPending),t:r}),a!==null&&e.jsxs("div",{className:"es-chat__rating-undo",role:"status",children:[e.jsx("span",{className:"es-chat__rating-undo-text",children:r("support_chat.rating_undo_toast",{rating:a})}),e.jsx("button",{type:"button",className:"es-chat__rating-undo-btn",onClick:et,children:r("support_chat.rating_undo_button")})]})]})})()]},t.id)),L&&ge===null&&e.jsxs("div",{className:"es-chat__typing","aria-label":r("chat.typing_aria"),children:[e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"})]})]}),!V&&c.length>0&&e.jsxs("button",{type:"button",className:"es-chat__jump",onClick:()=>C(),"aria-label":r("chat.jump_to_latest"),title:r("chat.jump_to_latest"),children:[e.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5v14"}),e.jsx("path",{d:"m19 12-7 7-7-7"})]}),e.jsx("span",{className:"es-chat__jump-label",children:r("chat.jump_to_latest")})]})]}),e.jsxs("div",{className:"es-block__footer es-chat__footer",children:[ce.length>0&&e.jsx("div",{className:"es-chat__chips",role:"group","aria-label":r("chat.quick_actions_aria"),children:ce.map((t,a)=>e.jsx("button",{type:"button",className:"es-chat__chip",onClick:()=>qe(t),disabled:L||S,children:t.labelKey?r(t.labelKey):t.label},`${t.labelKey??t.label}-${a}`))}),e.jsx("div",{className:"es-chat__disclaimer",children:r("chat.disclaimer")}),e.jsxs("div",{className:"es-chat__input-row",children:[e.jsx("textarea",{ref:v,className:"es-chat__textarea",value:T,onChange:Xe,onKeyDown:Je,placeholder:Z,rows:1,maxLength:2e3,disabled:L||S,"aria-label":r("chat.input_aria")}),d&&!S&&e.jsx(ht,{baseUrl:n,apiKey:u,jwt:k.current,language:m,onTranscript:Ye,t:r,streaming:F?.streaming,voiceStream:b?.voiceStream,baseText:()=>T,onText:t=>{if(z(t.length>2e3?t.slice(0,2e3):t),t.length>=2e3){const a=b?.voiceStream;a?.getState&&a.getState()!=="idle"&&a.stop()}requestAnimationFrame(()=>{be(),v.current?.focus()})}}),e.jsx("button",{className:"es-chat__send",onClick:ye,disabled:!T.trim()||L||S,type:"button","aria-label":r("chat.send_aria"),children:L?e.jsx("span",{className:"es-chat__send-loading","aria-hidden":"true",children:"⋯"}):e.jsx("span",{"aria-hidden":"true",children:"➤"})})]})]})]})}const Ne=50;function $t({sessionId:o,baseUrl:i,jwt:n,isOpen:p,onToggle:w,i18n:b}){const y=b?.t??(d=>d),j=p!==void 0,[g,U]=s.useState(!1),S=j?p:g,[r,u]=s.useState([]),[m,Z]=s.useState(null),[H,f]=s.useState(!1),[D,I]=s.useState(null),$=s.useRef(!1),E=s.useCallback(async d=>{if(n){f(!0),I(null);try{const c=`${i}/api/chat/sessions/${o}/messages?limit=${Ne}&offset=${d}`,h=await fetch(c,{headers:{Authorization:`Bearer ${n}`},credentials:"include"});if(!h.ok)throw new Error(`HTTP ${h.status}`);const T=await h.json();if(!T.success)throw new Error(y("chat_history.error"));u(z=>d===0?T.data.messages:[...T.data.messages,...z]),Z(T.data.pagination)}catch(c){I(c instanceof Error?c.message:y("chat_history.error"))}finally{f(!1)}}},[i,n,o,y]),k=s.useCallback(()=>{j?w?.():U(d=>{const c=!d;return c&&!$.current&&($.current=!0,E(0)),c})},[j,w,E]),F=s.useCallback(()=>{if(!m)return;const d=Math.max(0,m.total-m.offset-Ne-Ne);E(d)},[E,m]);return s.useEffect(()=>{j&&S&&!$.current&&n&&($.current=!0,E(0))},[j,S,n,E]),s.useEffect(()=>{$.current=!1,u([]),Z(null),I(null),S&&n&&($.current=!0,E(0))},[o,n]),e.jsxs("div",{className:"es-chat-history",children:[!j&&e.jsxs("button",{className:"es-chat-history__toggle",type:"button","aria-expanded":S,onClick:k,disabled:!n,children:[e.jsx("span",{className:"es-chat-history__toggle-icon",children:S?"▲":"▼"}),y("chat_history.toggle")]}),S&&e.jsxs("div",{className:"es-chat-history__panel",children:[H&&e.jsxs("div",{className:"es-chat-history__loading",role:"status","aria-label":y("chat_history.loading_aria"),children:[e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"})]}),D&&!H&&e.jsx("div",{className:"es-chat-history__error",role:"alert",children:D}),!H&&!D&&e.jsxs(e.Fragment,{children:[m?.hasMore&&e.jsx("button",{className:"es-chat-history__load-more",type:"button",onClick:F,"aria-label":y("chat_history.load_older_aria"),children:y("chat_history.load_older")}),e.jsxs("div",{className:"es-chat-history__messages",role:"log","aria-live":"polite","aria-label":y("chat_history.panel_aria"),children:[r.length===0&&e.jsx("div",{className:"es-chat-history__empty",children:y("chat_history.empty")}),r.filter(d=>d.role!=="system").map(d=>e.jsx("div",{className:`es-chat-history__bubble es-chat-history__bubble--${d.role}`,children:d.role==="assistant"?e.jsx("div",{className:"es-chat-history__bubble-md",children:e.jsx(ze,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:c=>We(c)??"",transformImageUri:()=>"",components:Fe,children:d.content})}):d.content},d.id))]})]})]})]})}export{$t as ChatHistoryBlock,It as Component,Nt as manifest};
6
- //# sourceMappingURL=index-BO0vI80C-qK4w7DnX.js.map
6
+ //# sourceMappingURL=index-CSsAPgvv-qK4w7DnX.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as t,j as e,e as N}from"../nexly.js";const S={slug:"chat-session-nav",name:"Chat Session Navigator",version:"1.0.0",category:"interactive",configSchema:{},defaultConfig:{},sizing:{minWidth:200,preferredHeight:"fill",scrollable:!0},supportedPlacements:["sidebar","main"],events:{emits:[{name:"chat:select-session",description:"User selected a past chat session"}]}};function E(a,i){const d=Date.now()-new Date(a).getTime(),o=Math.floor(d/6e4);if(o<1)return i("time.just_now");if(o<60)return i("time.minutes_ago",{count:o});const c=Math.floor(o/60);return c<24?i("time.hours_ago",{count:c}):i("time.days_ago",{count:Math.floor(c/24)})}function H({actions:a,baseUrl:i,productId:d,i18n:o,auth:c,sessionId:v}){const n=o?.t??(s=>s),f=c?.jwt,[p,l]=t.useState(!1),[x,w]=t.useState([]),[h,b]=t.useState(!1),[j,g]=t.useState(null),[u,_]=t.useState(v??null);t.useEffect(()=>{_(v??null)},[v]);const m=t.useCallback(async()=>{b(!0),g(null);try{const s=await fetch(`${i}/api/chat/sessions?productId=${encodeURIComponent(d||"")}`,{headers:{...f?{Authorization:`Bearer ${f}`}:{}},credentials:"include"});if(!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();if(!r.success)throw new Error("Invalid response");w(r.data?.sessions??[])}catch{g(n("chat_session_nav.load_error"))}finally{b(!1)}},[i,f,d,n]);t.useEffect(()=>a.on("chat:session",s=>{const{sessionId:r}=s;r&&_(r),p&&m()}),[a,m,p]),t.useEffect(()=>a.on("chat:showHistory",()=>{l(!0),m()}),[a,m]),t.useEffect(()=>a.on("chat:clearHistory",()=>{l(!1)}),[a]);const y=t.useCallback(s=>{s!==u&&(_(s),a.emit("chat:select-session",{sessionId:s}),l(!1))},[a,u]),k=t.useCallback(()=>{a.emit("chat:clearHistory",void 0),_(null),l(!1)},[a]),C=t.useCallback(()=>{l(!1)},[]);return p?e.jsxs(N,{blockType:"chat-session-nav",children:[e.jsxs("div",{className:"es-csn__header",children:[e.jsx("span",{className:"es-csn__header-title",children:n("chat_session_nav.title")}),e.jsxs("div",{className:"es-csn__header-actions",children:[e.jsx("button",{type:"button",className:"es-csn__action-btn","aria-label":n("chat_session_nav.new_session"),title:n("chat_session_nav.new_session"),onClick:k,children:e.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})]})}),e.jsx("button",{type:"button",className:"es-csn__close-btn","aria-label":n("chat_session_nav.close"),onClick:C,children:"✕"})]})]}),e.jsx("div",{className:"es-block__body",children:e.jsxs("div",{className:"es-csn__list",role:"list","aria-label":n("chat_session_nav.list_aria"),children:[h&&e.jsx("div",{className:"es-csn__loading",role:"status",children:n("chat_session_nav.loading")}),j&&!h&&e.jsx("div",{className:"es-csn__error",role:"alert",children:j}),!h&&!j&&x.length===0&&e.jsx("div",{className:"es-csn__empty",children:n("chat_session_nav.empty")}),!h&&x.map(s=>e.jsxs("button",{role:"listitem",type:"button",className:`es-csn__item${s.id===u?" es-csn__item--active":""}`,onClick:()=>y(s.id),"aria-current":s.id===u?"true":void 0,children:[e.jsx("div",{className:"es-csn__item-preview",children:s.lastUserMessage??n("chat_session_nav.no_preview")}),e.jsxs("div",{className:"es-csn__item-meta",children:[e.jsx("span",{children:E(s.updatedAt,n)}),s.messageCount>0&&e.jsx("span",{children:n("chat_session_nav.message_count",{count:s.messageCount})})]})]},s.id))]})})]}):null}export{H as Component,S as manifest};
2
- //# sourceMappingURL=index-DZNxd978-BmIQ-NmU.js.map
2
+ //# sourceMappingURL=index-CXm6d9l1-BmIQ-NmU.js.map
@@ -1,2 +1,2 @@
1
1
  import{j as e,e as i}from"../nexly.js";const n={slug:"dashboard-overview",name:"Dashboard Overview",version:"1.0.0",category:"content",configSchema:{},defaultConfig:{},dataContract:{serviceSlug:null,inputSchema:{type:"object",properties:{}}},fields:[],sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function r({i18n:a}){const s=a?.t??(t=>t);return e.jsx(i,{blockType:"dashboard-overview",children:e.jsxs("div",{className:"es-widget__dash",children:[e.jsx("div",{className:"es-widget__panel-header",children:e.jsx("div",{className:"es-widget__panel-header-left",children:e.jsx("h2",{className:"es-widget__panel-header-title",children:s("dashboard.title")})})}),e.jsx("div",{className:"es-widget__dash-content",children:e.jsx("p",{className:"es-widget__dash-empty",children:s("dashboard.select_tab")})})]})})}export{r as Component,n as manifest};
2
- //# sourceMappingURL=index-BjHXOMPQ-Bt7j8evJ.js.map
2
+ //# sourceMappingURL=index-CZcU6ylZ-Bt7j8evJ.js.map
@@ -1,2 +1,2 @@
1
- import{r as h,j as e,e as g,l as M}from"../nexly.js";import{C as L}from"./block-rating-CAVRRYuG-CQMNokIy.js";const A={slug:"social-insights",name:"Social Insights",version:"1.0.0",category:"data",requiredService:"social-insights",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},proMode:{type:"boolean",default:!1},maxEvents:{type:"number",default:2},showCrmPlan:{type:"boolean",default:!0},showConversationTips:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1,proMode:!1,maxEvents:2,showCrmPlan:!0,showConversationTips:!1},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"social-insights",inputSchema:{type:"object",properties:{eventIntelligence:{type:"object",properties:{scoredEvents:{type:"array",items:{type:"object",properties:{eventName:{type:"string"},conversionScore:{type:"number"}}}},recommendedEvent:{type:"object",properties:{eventName:{type:"string"},missionGoal:{type:"string"}}}}},eventMissionBrief:{type:"object",properties:{conversationOpeners:{type:"array",items:{type:"string"}},qualificationQuestions:{type:"array",items:{type:"string"}},positioningStatement:{type:"string"}}},crmExecutionPlan:{type:"object",properties:{leadPipelineStructure:{type:"string"},recommendedDailyOutreachVolume:{type:"number"},messageTemplates:{type:"object",properties:{firstContact:{type:"string"},followup48h:{type:"string"}}}}},weeklySocialStrategy:{type:"object",properties:{mainObjectiveThisWeek:{type:"string"},numericTarget:{type:"string"}}}}},previewDataOverride:{eventIntelligence:{scoredEvents:[{eventName:"Seoul Tech & Crypto Meetup",category:"Networking",conversionScore:92,whyRelevant:"High density of crypto-curious professionals matching your target profile.",targetProfile:"Tech professionals aged 28–42",priorityLevel:"high"},{eventName:"Gangnam Business Luncheon",category:"Business Networking",conversionScore:74,whyRelevant:"Established entrepreneurs with disposable income open to investment opportunities.",targetProfile:"SME owners and executives",priorityLevel:"medium"},{eventName:"Online MLM Success Webinar",category:"Industry",conversionScore:61,whyRelevant:"Pre-qualified audience already interested in network marketing.",targetProfile:"MLM beginners and career changers",priorityLevel:"medium"}],recommendedEvent:{eventName:"Seoul Tech & Crypto Meetup",missionGoal:"Connect with 5 warm prospects and set 2 follow-up calls",contactsTarget:5,followupTarget:2}},eventMissionBrief:{conversationOpeners:["What brings you to the crypto/tech space?","Have you been following the recent Bitcoin surge?"],qualificationQuestions:["Are you currently looking for passive income opportunities?","What's your experience with network marketing?"],positioningStatement:"I help people build financial freedom through crypto-backed network marketing.",whatNotToSay:["Don't mention specific income figures in the first meeting."]},crmExecutionPlan:{leadPipelineStructure:"Prospect → First Contact → Follow-up (48h) → Meeting → Close",recommendedDailyOutreachVolume:8,followupIntervalsHours:48,messageTemplates:{firstContact:"Hi [Name], great meeting you at the Seoul meetup! I'd love to share something exciting with you — when's a good time for a 15-min call?",followup48h:"Hi [Name], just following up on my message. I have some insights about [topic we discussed] that I think you'll find valuable.",postEventMessage:"Thanks for connecting at [event]! Let me know if you're open to exploring what I mentioned."}},weeklySocialStrategy:{mainObjectiveThisWeek:"Qualify 10 new prospects from event pipeline",numericTarget:"10 new prospects, 3 follow-up calls",structureAlignmentGoal:"Focus on right leg to balance binary structure",riskMitigationFocus:"Avoid cap waste by ensuring team volume is distributed evenly"}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"proMode",type:"toggle",label:"Pro mode (full strategy details)",default:!1,group:"Display"},{id:"maxEvents",type:"range",label:"Max events shown",default:2,min:1,max:5,step:1,group:"Display"},{id:"showCrmPlan",type:"toggle",label:"Show CRM outreach plan",default:!0,group:"Display"},{id:"showConversationTips",type:"toggle",label:"Show conversation tips (pro)",default:!1,group:"Display"}],events:{emits:[{name:"social:eventSelected",description:"User selected an event to attend"},{name:"social:templateCopied",description:"User copied a message template"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"social:refresh",description:"Force refresh social insights"}]},supportedPlacements:["main","sidebar"]},j={high:0,medium:1,low:2};function v({text:s,prefix:a,onCopy:l,t:o}){const[t,d]=h.useState(!1),p=h.useRef(null),u=h.useCallback(()=>{l(s),d(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>d(!1),1200)},[l,s]);return h.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),e.jsxs("div",{className:`es-si__copyable${t?" es-si__copyable--copied":""}`,onClick:u,role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),u())},"aria-label":o(t?"social_insights.copied":"social_insights.tap_to_copy"),title:o("social_insights.tap_to_copy"),children:[a&&e.jsx("span",{className:"es-si__copyable-prefix",children:a}),e.jsx("span",{className:"es-si__copyable-text",children:s})]})}function P({total:s,high:a,medium:l,t:o}){return e.jsxs("div",{className:"es-si__stats",children:[e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n",children:s}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_events")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--high",children:a}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_high")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--medium",children:l}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_medium")})]})]})}function I({card:s,selected:a,onSelect:l,t:o}){return e.jsxs("div",{className:`es-si__row${a?" es-si__row--active":""}`,onClick:l,role:"button",tabIndex:0,"aria-pressed":a,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),l())},children:[e.jsx("span",{className:`es-si__dot es-si__dot--${s.priorityLevel}`,role:"img","aria-label":o(`social_insights.priority_${s.priorityLevel}`)}),e.jsxs("div",{className:"es-si__row-body",children:[e.jsx("div",{className:"es-si__row-name",children:s.eventName}),e.jsx("div",{className:"es-si__row-why",children:s.whyThisEventMatters})]}),e.jsx("span",{className:"es-si__row-go","aria-hidden":"true",children:o("social_insights.focus_cta")})]})}function D({card:s,onCopy:a,onTalkToGaio:l,hasChatView:o,t}){const d=s.conversationOpeners?.[0];return e.jsxs("div",{className:"es-si__focus",children:[e.jsxs("div",{className:"es-si__focus-tag",children:[e.jsx("span",{"aria-hidden":"true",children:"★"})," ",t("social_insights.focus_play")," ·"," ",e.jsx("span",{className:"es-si__focus-cat",children:s.category})]}),e.jsx("div",{className:"es-si__focus-name",children:s.eventName}),e.jsx("div",{className:"es-si__focus-profile",children:s.targetProfile}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"👁"})," ",t("social_insights.spot_them")]}),e.jsx("div",{className:"es-si__detail-text es-si__detail-text--muted",children:s.howToSpotThem}),d&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.best_opener")]}),e.jsx(v,{text:d,onCopy:a,t})]}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"🌉"})," ",t("social_insights.bridge")]}),e.jsx(v,{text:s.bridgeLine,onCopy:a,t}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"📩"})," ",t("social_insights.followup_48h")]}),e.jsx(v,{text:s.followUp48h,onCopy:a,t}),e.jsxs("div",{className:"es-si__focus-warn",children:[e.jsx("div",{className:"es-si__detail-label es-si__detail-label--warn",children:t("social_insights.do_not_say")}),e.jsx("div",{className:"es-si__detail-text",children:s.doNotSay})]}),o&&e.jsx("div",{className:"es-si__gaio-row",children:e.jsxs("button",{type:"button",className:"es-si__gaio-link","aria-label":t("social_insights.gaio.aria",{event:s.eventName}),onClick:()=>l(s),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.talk_to_gaio")]})})]})}function F({data:s,actions:a,metadata:l,i18n:o,baseUrl:t,externalContext:d,auth:p,previewMode:u}){const i=o?.t??(n=>n),_=s,b=s.promptLogId,w=d?.apiKey??"",N=d?.hasChatView===!0,[y,k]=h.useState(0),C=h.useCallback(n=>{navigator.clipboard?.writeText(n).catch(()=>{}),a.emit("social:templateCopied",{text:n})},[a]),S=h.useCallback(n=>{const c=n.eventName;a.emit("chat:draft",{message:i("social_insights.gaio_draft",{event:c,why:n.whyThisEventMatters}),autoSend:!1,quickChips:[{label:i("social_insights.gaio.chip.plan"),message:i("social_insights.gaio.chip.plan_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.opener"),message:i("social_insights.gaio.chip.opener_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.target"),message:i("social_insights.gaio.chip.target_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.other"),message:"",autoSend:!1}]})},[a,i]);if(!_.events&&!s.error)return e.jsx(g,{blockType:"social-insights",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-si__loading",children:l?.dataQuality==="none"?i("social_insights.sign_in_prompt"):i("social_insights.gathering_events")})})});if(s.error)return e.jsx(g,{blockType:"social-insights",error:M(s.error)});const r=[..._.events??[]].sort((n,c)=>j[n.priorityLevel]-j[c.priorityLevel]),m=_.quietWeek,T=r.filter(n=>n.priorityLevel==="high").length,E=r.filter(n=>n.priorityLevel==="medium").length,x=y<r.length?y:0,f=r[x];return e.jsx(g,{blockType:"social-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx(L,{promptLogId:b,baseUrl:t,apiKey:w,jwt:p?.jwt,previewMode:u,t:i}),r.length>0&&e.jsx(P,{total:r.length,high:T,medium:E,t:i}),r.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__section-head",children:[e.jsx("span",{className:"es-si__section-title",children:i("social_insights.ranked_events")}),e.jsx("span",{className:"es-si__section-hint",children:i("social_insights.tap_to_focus")})]}),e.jsx("div",{className:"es-si__list",role:"list","aria-label":i("social_insights.ranked_events"),children:r.map((n,c)=>e.jsx(I,{card:n,selected:c===x,onSelect:()=>k(c),t:i},`${n.eventName}-${c}`))}),f&&e.jsx(D,{card:f,onCopy:C,onTalkToGaio:S,hasChatView:N,t:i})]}),r.length===0&&m&&e.jsxs("div",{className:"es-si__quiet-week",children:[e.jsx("div",{className:"es-si__quiet-week-headline",children:m.headline}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.downline_focus")}),e.jsx("div",{className:"es-si__detail-text",children:m.downlineActivationTarget})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.warm_network_action")}),e.jsx("div",{className:"es-si__detail-text",children:m.warmNetworkAction})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.online_conversation")}),e.jsx("div",{className:"es-si__detail-text",children:m.onlineConversationPrompt})]})]}),_.complianceNote&&(r.length>0||m)&&e.jsxs("div",{className:"es-si__compliance",role:"note",children:[e.jsx("span",{className:"es-si__compliance-icon","aria-hidden":"true",children:"⚠"}),e.jsxs("span",{className:"es-si__compliance-text",children:[e.jsxs("span",{className:"es-si__compliance-label",children:[i("social_insights.compliance_label"),":"]})," ",_.complianceNote]})]})]})})}export{F as Component,A as manifest};
2
- //# sourceMappingURL=index-BwnCq3yC-LScXPMbE.js.map
1
+ import{r as h,j as e,e as g,l as M}from"../nexly.js";import{C as L}from"./block-rating-uD_0LK-1-CQMNokIy.js";const A={slug:"social-insights",name:"Social Insights",version:"1.0.0",category:"data",requiredService:"social-insights",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},proMode:{type:"boolean",default:!1},maxEvents:{type:"number",default:2},showCrmPlan:{type:"boolean",default:!0},showConversationTips:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1,proMode:!1,maxEvents:2,showCrmPlan:!0,showConversationTips:!1},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"social-insights",inputSchema:{type:"object",properties:{eventIntelligence:{type:"object",properties:{scoredEvents:{type:"array",items:{type:"object",properties:{eventName:{type:"string"},conversionScore:{type:"number"}}}},recommendedEvent:{type:"object",properties:{eventName:{type:"string"},missionGoal:{type:"string"}}}}},eventMissionBrief:{type:"object",properties:{conversationOpeners:{type:"array",items:{type:"string"}},qualificationQuestions:{type:"array",items:{type:"string"}},positioningStatement:{type:"string"}}},crmExecutionPlan:{type:"object",properties:{leadPipelineStructure:{type:"string"},recommendedDailyOutreachVolume:{type:"number"},messageTemplates:{type:"object",properties:{firstContact:{type:"string"},followup48h:{type:"string"}}}}},weeklySocialStrategy:{type:"object",properties:{mainObjectiveThisWeek:{type:"string"},numericTarget:{type:"string"}}}}},previewDataOverride:{eventIntelligence:{scoredEvents:[{eventName:"Seoul Tech & Crypto Meetup",category:"Networking",conversionScore:92,whyRelevant:"High density of crypto-curious professionals matching your target profile.",targetProfile:"Tech professionals aged 28–42",priorityLevel:"high"},{eventName:"Gangnam Business Luncheon",category:"Business Networking",conversionScore:74,whyRelevant:"Established entrepreneurs with disposable income open to investment opportunities.",targetProfile:"SME owners and executives",priorityLevel:"medium"},{eventName:"Online MLM Success Webinar",category:"Industry",conversionScore:61,whyRelevant:"Pre-qualified audience already interested in network marketing.",targetProfile:"MLM beginners and career changers",priorityLevel:"medium"}],recommendedEvent:{eventName:"Seoul Tech & Crypto Meetup",missionGoal:"Connect with 5 warm prospects and set 2 follow-up calls",contactsTarget:5,followupTarget:2}},eventMissionBrief:{conversationOpeners:["What brings you to the crypto/tech space?","Have you been following the recent Bitcoin surge?"],qualificationQuestions:["Are you currently looking for passive income opportunities?","What's your experience with network marketing?"],positioningStatement:"I help people build financial freedom through crypto-backed network marketing.",whatNotToSay:["Don't mention specific income figures in the first meeting."]},crmExecutionPlan:{leadPipelineStructure:"Prospect → First Contact → Follow-up (48h) → Meeting → Close",recommendedDailyOutreachVolume:8,followupIntervalsHours:48,messageTemplates:{firstContact:"Hi [Name], great meeting you at the Seoul meetup! I'd love to share something exciting with you — when's a good time for a 15-min call?",followup48h:"Hi [Name], just following up on my message. I have some insights about [topic we discussed] that I think you'll find valuable.",postEventMessage:"Thanks for connecting at [event]! Let me know if you're open to exploring what I mentioned."}},weeklySocialStrategy:{mainObjectiveThisWeek:"Qualify 10 new prospects from event pipeline",numericTarget:"10 new prospects, 3 follow-up calls",structureAlignmentGoal:"Focus on right leg to balance binary structure",riskMitigationFocus:"Avoid cap waste by ensuring team volume is distributed evenly"}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"proMode",type:"toggle",label:"Pro mode (full strategy details)",default:!1,group:"Display"},{id:"maxEvents",type:"range",label:"Max events shown",default:2,min:1,max:5,step:1,group:"Display"},{id:"showCrmPlan",type:"toggle",label:"Show CRM outreach plan",default:!0,group:"Display"},{id:"showConversationTips",type:"toggle",label:"Show conversation tips (pro)",default:!1,group:"Display"}],events:{emits:[{name:"social:eventSelected",description:"User selected an event to attend"},{name:"social:templateCopied",description:"User copied a message template"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"social:refresh",description:"Force refresh social insights"}]},supportedPlacements:["main","sidebar"]},j={high:0,medium:1,low:2};function v({text:s,prefix:a,onCopy:l,t:o}){const[t,d]=h.useState(!1),p=h.useRef(null),u=h.useCallback(()=>{l(s),d(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>d(!1),1200)},[l,s]);return h.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),e.jsxs("div",{className:`es-si__copyable${t?" es-si__copyable--copied":""}`,onClick:u,role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),u())},"aria-label":o(t?"social_insights.copied":"social_insights.tap_to_copy"),title:o("social_insights.tap_to_copy"),children:[a&&e.jsx("span",{className:"es-si__copyable-prefix",children:a}),e.jsx("span",{className:"es-si__copyable-text",children:s})]})}function P({total:s,high:a,medium:l,t:o}){return e.jsxs("div",{className:"es-si__stats",children:[e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n",children:s}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_events")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--high",children:a}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_high")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--medium",children:l}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_medium")})]})]})}function I({card:s,selected:a,onSelect:l,t:o}){return e.jsxs("div",{className:`es-si__row${a?" es-si__row--active":""}`,onClick:l,role:"button",tabIndex:0,"aria-pressed":a,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),l())},children:[e.jsx("span",{className:`es-si__dot es-si__dot--${s.priorityLevel}`,role:"img","aria-label":o(`social_insights.priority_${s.priorityLevel}`)}),e.jsxs("div",{className:"es-si__row-body",children:[e.jsx("div",{className:"es-si__row-name",children:s.eventName}),e.jsx("div",{className:"es-si__row-why",children:s.whyThisEventMatters})]}),e.jsx("span",{className:"es-si__row-go","aria-hidden":"true",children:o("social_insights.focus_cta")})]})}function D({card:s,onCopy:a,onTalkToGaio:l,hasChatView:o,t}){const d=s.conversationOpeners?.[0];return e.jsxs("div",{className:"es-si__focus",children:[e.jsxs("div",{className:"es-si__focus-tag",children:[e.jsx("span",{"aria-hidden":"true",children:"★"})," ",t("social_insights.focus_play")," ·"," ",e.jsx("span",{className:"es-si__focus-cat",children:s.category})]}),e.jsx("div",{className:"es-si__focus-name",children:s.eventName}),e.jsx("div",{className:"es-si__focus-profile",children:s.targetProfile}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"👁"})," ",t("social_insights.spot_them")]}),e.jsx("div",{className:"es-si__detail-text es-si__detail-text--muted",children:s.howToSpotThem}),d&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.best_opener")]}),e.jsx(v,{text:d,onCopy:a,t})]}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"🌉"})," ",t("social_insights.bridge")]}),e.jsx(v,{text:s.bridgeLine,onCopy:a,t}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"📩"})," ",t("social_insights.followup_48h")]}),e.jsx(v,{text:s.followUp48h,onCopy:a,t}),e.jsxs("div",{className:"es-si__focus-warn",children:[e.jsx("div",{className:"es-si__detail-label es-si__detail-label--warn",children:t("social_insights.do_not_say")}),e.jsx("div",{className:"es-si__detail-text",children:s.doNotSay})]}),o&&e.jsx("div",{className:"es-si__gaio-row",children:e.jsxs("button",{type:"button",className:"es-si__gaio-link","aria-label":t("social_insights.gaio.aria",{event:s.eventName}),onClick:()=>l(s),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.talk_to_gaio")]})})]})}function F({data:s,actions:a,metadata:l,i18n:o,baseUrl:t,externalContext:d,auth:p,previewMode:u}){const i=o?.t??(n=>n),_=s,b=s.promptLogId,w=d?.apiKey??"",N=d?.hasChatView===!0,[y,k]=h.useState(0),C=h.useCallback(n=>{navigator.clipboard?.writeText(n).catch(()=>{}),a.emit("social:templateCopied",{text:n})},[a]),S=h.useCallback(n=>{const c=n.eventName;a.emit("chat:draft",{message:i("social_insights.gaio_draft",{event:c,why:n.whyThisEventMatters}),autoSend:!1,quickChips:[{label:i("social_insights.gaio.chip.plan"),message:i("social_insights.gaio.chip.plan_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.opener"),message:i("social_insights.gaio.chip.opener_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.target"),message:i("social_insights.gaio.chip.target_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.other"),message:"",autoSend:!1}]})},[a,i]);if(!_.events&&!s.error)return e.jsx(g,{blockType:"social-insights",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-si__loading",children:l?.dataQuality==="none"?i("social_insights.sign_in_prompt"):i("social_insights.gathering_events")})})});if(s.error)return e.jsx(g,{blockType:"social-insights",error:M(s.error)});const r=[..._.events??[]].sort((n,c)=>j[n.priorityLevel]-j[c.priorityLevel]),m=_.quietWeek,T=r.filter(n=>n.priorityLevel==="high").length,E=r.filter(n=>n.priorityLevel==="medium").length,x=y<r.length?y:0,f=r[x];return e.jsx(g,{blockType:"social-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx(L,{promptLogId:b,baseUrl:t,apiKey:w,jwt:p?.jwt,previewMode:u,t:i}),r.length>0&&e.jsx(P,{total:r.length,high:T,medium:E,t:i}),r.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__section-head",children:[e.jsx("span",{className:"es-si__section-title",children:i("social_insights.ranked_events")}),e.jsx("span",{className:"es-si__section-hint",children:i("social_insights.tap_to_focus")})]}),e.jsx("div",{className:"es-si__list",role:"list","aria-label":i("social_insights.ranked_events"),children:r.map((n,c)=>e.jsx(I,{card:n,selected:c===x,onSelect:()=>k(c),t:i},`${n.eventName}-${c}`))}),f&&e.jsx(D,{card:f,onCopy:C,onTalkToGaio:S,hasChatView:N,t:i})]}),r.length===0&&m&&e.jsxs("div",{className:"es-si__quiet-week",children:[e.jsx("div",{className:"es-si__quiet-week-headline",children:m.headline}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.downline_focus")}),e.jsx("div",{className:"es-si__detail-text",children:m.downlineActivationTarget})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.warm_network_action")}),e.jsx("div",{className:"es-si__detail-text",children:m.warmNetworkAction})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.online_conversation")}),e.jsx("div",{className:"es-si__detail-text",children:m.onlineConversationPrompt})]})]}),_.complianceNote&&(r.length>0||m)&&e.jsxs("div",{className:"es-si__compliance",role:"note",children:[e.jsx("span",{className:"es-si__compliance-icon","aria-hidden":"true",children:"⚠"}),e.jsxs("span",{className:"es-si__compliance-text",children:[e.jsxs("span",{className:"es-si__compliance-label",children:[i("social_insights.compliance_label"),":"]})," ",_.complianceNote]})]})]})})}export{F as Component,A as manifest};
2
+ //# sourceMappingURL=index-Ce73FsEJ-Ce0fEutJ.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as i,j as e,e as m}from"../nexly.js";const f={slug:"faq",name:"FAQ",version:"1.0.0",category:"content",requiredService:"knowledge-search",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},limit:{type:"number",default:10}}},defaultConfig:{readAloudEnabled:!1,limit:10},dataContract:{serviceSlug:"knowledge-search",inputSchema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{question:{type:"string"},answer:{type:"string"},category:{type:"string"}}}},total:{type:"number"}},required:["items"]},previewDataOverride:{items:[{question:"What is your return policy?",answer:"We accept returns within 30 days of purchase.",category:"Returns"},{question:"How long does shipping take?",answer:"Standard shipping takes 3-5 business days.",category:"Shipping"},{question:"Do you offer international shipping?",answer:"Yes, we ship to over 50 countries worldwide.",category:"Shipping"},{question:"How do I track my order?",answer:"You will receive a tracking link via email once your order ships.",category:"Orders"},{question:"Can I change or cancel my order?",answer:"Orders can be modified or cancelled within 1 hour of placement.",category:"Orders"}],total:5}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"limit",type:"range",label:"Number of FAQs",default:10,min:1,max:50,step:1,group:"Content"}],events:{emits:[{name:"faq:itemExpanded",description:"User expanded a FAQ item"},{name:"faq:itemCollapsed",description:"User collapsed a FAQ item"}],listens:[{name:"faq:refresh",description:"Reload FAQ content from service"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function g({data:n,config:o,i18n:l}){const d=l?.t??(a=>a),t=n.items??o.items??[],[r,c]=i.useState(null),p=i.useCallback(a=>{c(s=>s===a?null:a)},[]);return e.jsx(m,{blockType:"faq",children:e.jsxs("div",{className:"es-block__body",children:[t.length===0&&e.jsx("div",{className:"es-block__empty",children:d("faq.empty")}),t.map((a,s)=>e.jsxs("div",{className:"es-faq__item",children:[e.jsxs("button",{className:"es-faq__question",onClick:()=>p(s),type:"button",children:[e.jsx("span",{children:a.question}),e.jsx("span",{className:"es-faq__chevron",children:r===s?"▲":"▼"})]}),r===s&&e.jsx("div",{className:"es-faq__answer",children:a.answer})]},s))]})})}export{g as Component,f as manifest};
2
- //# sourceMappingURL=index-S2W2KqpV-PMvqlUvO.js.map
2
+ //# sourceMappingURL=index-Cf3qMIwZ-PMvqlUvO.js.map
@@ -1,2 +1,2 @@
1
1
  import{j as t,T as Pt,r as Q,o as Vt}from"../nexly.js";import{x as _t,w as Rt}from"./accent-legibility-BJF2VO5n-CDPQ7suO.js";const It={slug:"gaio-dark",name:"GAIO Template Theme",version:"1.2.0",slots:["header","main","sidebar","footer"],cssVariables:{"--ai-bg":"#0F0F0F","--ai-bg-elevated":"#141414","--ai-bg-card":"#161616","--ai-bg-input":"#141414","--ai-bg-sidebar":"#121212","--ai-bg-footer":"#000000","--ai-fg":"#F5F5F5","--ai-fg-secondary":"#D1D5DB","--ai-muted":"#6B7280","--ai-muted-dim":"#4B5563","--ai-border":"#2a2a2a","--ai-border-subtle":"#1e1e1e","--ai-accent":"#C9A84C","--ai-accent-fg":"#0F0F0F","--ai-accent-hover":"#B8953F","--ai-accent-subtle":"rgba(201, 168, 76, 0.1)","--ai-accent-on-subtle":"#C9A84C","--ai-accent-on-subtle-strong":"#C9A84C","--ai-accent-border":"#6F5E2E","--ai-user-bubble":"#C9A84C","--ai-user-bubble-fg":"#0F0F0F","--ai-assistant-bubble":"#1a1a1a","--ai-assistant-bubble-fg":"#F5F5F5","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.7)","--ai-scrollbar":"#C9A84C","--ai-success":"#34D399","--ai-warning":"#FBBF24","--ai-error":"#F87171","--ai-info":"#6091BA","--ai-panel-width":"440px","--ai-panel-height":"720px","--ai-button-size":"80px","--ai-transition":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--ai-z-index":"999999","--es-color-surface":"#0F0F0F","--es-color-surface-elevated":"#1A1A1A","--es-color-surface-hover":"#2A2A2A","--es-color-on-surface":"#F5F5F5","--es-color-on-surface-muted":"#9CA3AF","--es-color-primary":"#C9A84C","--es-color-on-primary":"#0F0F0F","--es-color-primary-muted":"rgba(201, 168, 76, 0.1)","--es-color-primary-on-muted":"#C9A84C","--es-color-border":"#2a2a2a","--es-color-control-border":"#6B7280","--es-color-error":"#D27070","--es-color-success":"#5A9E6F","--es-color-on-success":"#0F0F0F","--es-color-interactive":"#E8D48B"},structure:{header:{id:"header",label:"Header",accepts:!0},sidebar:{id:"sidebar",label:"Sidebar Navigation",accepts:!1},main:{id:"main",label:"Main Content",accepts:!0},footer:{id:"footer",label:"Footer",accepts:!0}},defaultViews:[],requiredServices:["chat-bot","crypto-intel","event-scraper","venue-discovery"],description:"Premium dark theme with gold accents. Designed for crypto, fintech, and luxury e-commerce.",author:"E-Commerce Studio",planTierRequired:"free",packageName:"@ecommerce-studio/theme-gaio-dark",panels:[{id:"dashboard",name:"Dashboard",icon:"dashboard",order:0},{id:"coaching",name:"Coaching",icon:"coaching",order:1},{id:"discover",name:"Discover",icon:"discover",order:2},{id:"chat",name:"GAIO",icon:"chat",order:3},{id:"market",name:"Market",icon:"market",order:4},{id:"profile",name:"Profile",icon:"profile",order:5}],sidebarPosition:"right",options:[{id:"accentColor",type:"color",label:"Accent color",default:"#C9A84C",group:"Colors",cssVariable:"--ai-accent"},{id:"bgColor",type:"color",label:"Background",default:"#0F0F0F",group:"Colors",cssVariable:"--ai-bg"},{id:"textColor",type:"color",label:"Text color",default:"#F5F5F5",group:"Colors",cssVariable:"--ai-fg"},{id:"borderColor",type:"color",label:"Border color",default:"#2a2a2a",group:"Colors",cssVariable:"--ai-border"},{id:"panelWidth",type:"range",label:"Panel width",default:440,min:320,max:600,step:10,group:"Layout",cssVariable:"--ai-panel-width"},{id:"panelHeight",type:"range",label:"Panel height",default:720,min:480,max:900,step:10,group:"Layout",cssVariable:"--ai-panel-height"},{id:"initialOpen",type:"toggle",label:"Start open",default:!1,group:"Behavior"},{id:"position",type:"select",label:"Position",default:"bottom-right",group:"Layout",options:[{label:"Bottom Right",value:"bottom-right"},{label:"Bottom Left",value:"bottom-left"}]},{id:"sidebarPosition",type:"select",label:"Sidebar position",default:"right",group:"Layout",options:[{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Bottom",value:"bottom"},{label:"Hidden",value:"hidden"}]}],supports:{customCss:!0,customJs:!1,darkMode:!0,rtl:!1,views:!0}},Ot="http://www.w3.org/2000/svg",gt=27,vt=38,bt=53,Lt=38,J=1800,Tt=6400,qt=1800,Mt=J+Tt,Gt=Mt+qt,H=Gt+60;function wt(r){return r<.5?4*r*r*r:1-(-2*r+2)**3/2}function $t(r){return Math.max(0,Math.min(1,r))}function c(r,i,s){const d=document.createElementNS(Ot,r);if(i)for(const e in i){const f=i[e];f!==void 0&&d.setAttribute(e,f)}return s&&s.forEach(e=>d.appendChild(e)),d}function st(r,i){const s=c("text",r);return s.textContent=i,s}function Yt(r){const i=r.querySelector('[data-owl="props"]');if(!i||i.childNodes.length)return;const s=e=>c("path",{d:"M0 2.2 C -1 0 -4 0.4 -4 3 C -4 5.4 0 7.4 0 7.4 C 0 7.4 4 5.4 4 3 C 4 0.4 1 0 0 2.2 Z",fill:e}),d=e=>c("path",{d:"M0 -4 L1.2 -1.2 L4 -1 L1.8 1 L2.4 3.8 L0 2.2 L-2.4 3.8 L-1.8 1 L-4 -1 L-1.2 -1.2 Z",fill:e});i.appendChild(c("g",{"data-owl":"glasses",opacity:"0"},[c("circle",{cx:"27",cy:"38",r:"11",fill:"#BAE6FD",opacity:"0.22"}),c("circle",{cx:"53",cy:"38",r:"11",fill:"#BAE6FD",opacity:"0.22"}),c("circle",{cx:"27",cy:"38",r:"12.5",fill:"none",stroke:"#1F2937","stroke-width":"2"}),c("circle",{cx:"53",cy:"38",r:"12.5",fill:"none",stroke:"#1F2937","stroke-width":"2"}),c("path",{d:"M39.5 37 Q40 34.5 40.5 37",stroke:"#1F2937","stroke-width":"2",fill:"none"}),c("path",{d:"M14.5 37 L6 33",stroke:"#1F2937","stroke-width":"2",fill:"none","stroke-linecap":"round"}),c("path",{d:"M65.5 37 L74 33",stroke:"#1F2937","stroke-width":"2",fill:"none","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"book",opacity:"0"},[c("path",{d:"M40 60 L22 57 Q20 57 20 59 L20 71 Q20 73 22 73 L40 74 Z",fill:"#FEF3C7",stroke:"#B45309","stroke-width":"1"}),c("path",{d:"M40 60 L58 57 Q60 57 60 59 L60 71 Q60 73 58 73 L40 74 Z",fill:"#FFF7ED",stroke:"#B45309","stroke-width":"1"}),c("line",{x1:"40",y1:"60",x2:"40",y2:"74",stroke:"#B45309","stroke-width":"1"}),c("line",{x1:"24",y1:"62",x2:"36",y2:"63.5",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"24",y1:"65",x2:"36",y2:"66.5",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"24",y1:"68",x2:"34",y2:"69.3",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"44",y1:"63.5",x2:"56",y2:"62",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"44",y1:"66.5",x2:"56",y2:"65",stroke:"#9CA3AF","stroke-width":"0.8"}),c("line",{x1:"46",y1:"69.3",x2:"56",y2:"68",stroke:"#9CA3AF","stroke-width":"0.8"})])),i.appendChild(c("g",{"data-owl":"robot",opacity:"0"},[c("line",{x1:"86",y1:"40",x2:"86",y2:"34",stroke:"#64748B","stroke-width":"1.5"}),c("circle",{cx:"86",cy:"32.5",r:"1.8",fill:"#38BDF8"}),c("rect",{x:"78",y:"39",width:"16",height:"14",rx:"3",fill:"#CBD5E1",stroke:"#64748B","stroke-width":"1"}),c("circle",{"data-owl":"robot-eye-l",cx:"83",cy:"46",r:"2",fill:"#0EA5E9"}),c("circle",{"data-owl":"robot-eye-r",cx:"89",cy:"46",r:"2",fill:"#0EA5E9"}),c("rect",{x:"82",y:"50",width:"8",height:"1.6",rx:"0.8",fill:"#64748B"}),c("rect",{x:"80",y:"53.5",width:"12",height:"8",rx:"2",fill:"#94A3B8",stroke:"#64748B","stroke-width":"0.8"})])),i.appendChild(c("g",{"data-owl":"chat-bubble",opacity:"0",transform:"translate(50, 22) scale(0)"},[c("path",{d:"M2 -4 L1 2 L9 -4 Z",fill:"#FFFFFF"}),c("rect",{x:"0",y:"-20",width:"27",height:"16",rx:"5",fill:"#FFFFFF",stroke:"#E5E7EB","stroke-width":"0.6"}),c("line",{x1:"5",y1:"-14.5",x2:"21",y2:"-14.5",stroke:"#CBD5E1","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"5",y1:"-10",x2:"16",y2:"-10",stroke:"#CBD5E1","stroke-width":"2","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"phone",opacity:"0"},[c("rect",{x:"30",y:"50",width:"20",height:"30",rx:"4",fill:"#111827",stroke:"#374151","stroke-width":"1"}),c("rect",{x:"37",y:"51.6",width:"6",height:"1.4",rx:"0.7",fill:"#374151"}),c("clipPath",{id:"owl-phone-screen-clip"},[c("rect",{x:"32",y:"54",width:"16",height:"22",rx:"1.5"})]),c("g",{"clip-path":"url(#owl-phone-screen-clip)"},[c("rect",{x:"32",y:"54",width:"16",height:"22",fill:"#0EA5E9",opacity:"0.85"}),c("g",{"data-owl":"phone-feed"},[c("line",{x1:"34",y1:"58",x2:"46",y2:"58",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.9"}),c("line",{x1:"34",y1:"62",x2:"43",y2:"62",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.75"}),c("line",{x1:"34",y1:"66",x2:"46",y2:"66",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.6"}),c("line",{x1:"34",y1:"70",x2:"42",y2:"70",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.5"}),c("line",{x1:"34",y1:"74",x2:"45",y2:"74",stroke:"#FFFFFF","stroke-width":"1.4",opacity:"0.4"})])])])),i.appendChild(c("g",{"data-owl":"headband",opacity:"0"},[c("path",{d:"M14 27 Q40 19 66 27 L66 31 Q40 23 14 31 Z",fill:"#EF4444"}),c("path",{d:"M15 29 L5 26",stroke:"#EF4444","stroke-width":"2.6","stroke-linecap":"round"}),c("path",{d:"M15 31 L6 32",stroke:"#EF4444","stroke-width":"2.6","stroke-linecap":"round"}),c("line",{x1:"32",y1:"23.6",x2:"32",y2:"26.6",stroke:"#FCA5A5","stroke-width":"1"}),c("line",{x1:"40",y1:"22.8",x2:"40",y2:"25.8",stroke:"#FCA5A5","stroke-width":"1"}),c("line",{x1:"48",y1:"23.6",x2:"48",y2:"26.6",stroke:"#FCA5A5","stroke-width":"1"})])),i.appendChild(c("g",{"data-owl":"motion",opacity:"0"},[c("line",{x1:"2",y1:"40",x2:"12",y2:"40",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"0",y1:"48",x2:"11",y2:"48",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"}),c("line",{x1:"3",y1:"56",x2:"12",y2:"56",stroke:"#93C5FD","stroke-width":"2","stroke-linecap":"round"})])),i.appendChild(c("circle",{"data-owl":"sweat",cx:"63",cy:"34",r:"2.4",fill:"#38BDF8",opacity:"0"})),i.appendChild(c("g",{"data-owl":"social",opacity:"0"},[c("g",{"data-owl":"social-1",transform:"translate(20, 30)"},[s("#FB7185")]),c("g",{"data-owl":"social-2",transform:"translate(60, 26)"},[d("#FCD34D")]),c("g",{"data-owl":"social-3",transform:"translate(40, 18)"},[s("#F472B6")]),c("g",{"data-owl":"social-4",transform:"translate(70, 40)"},[c("circle",{cx:"0",cy:"0",r:"4.5",fill:"#34D399"}),c("path",{d:"M-2 0 L-0.6 1.6 L2.2 -1.6",stroke:"#FFFFFF","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})])])),i.appendChild(c("g",{"data-owl":"sleep-eyes",opacity:"0"},[c("circle",{cx:"27",cy:"38",r:"15",fill:"url(#owl-body-grad)"}),c("circle",{cx:"53",cy:"38",r:"15",fill:"url(#owl-body-grad)"}),c("path",{d:"M19 37 Q27 43 35 37",stroke:"#5C4413","stroke-width":"1.8",fill:"none","stroke-linecap":"round"}),c("path",{d:"M45 37 Q53 43 61 37",stroke:"#5C4413","stroke-width":"1.8",fill:"none","stroke-linecap":"round"}),c("path",{d:"M19 37 Q18 35.5 17 35.5",stroke:"#5C4413","stroke-width":"1",fill:"none","stroke-linecap":"round"}),c("path",{d:"M61 37 Q62 35.5 63 35.5",stroke:"#5C4413","stroke-width":"1",fill:"none","stroke-linecap":"round"})])),i.appendChild(c("g",{"data-owl":"zzz",opacity:"0"},[st({"data-owl":"zzz-1",x:"57",y:"27","font-size":"6","font-weight":"700",fill:"#93C5FD","font-family":"sans-serif"},"z"),st({"data-owl":"zzz-2",x:"62",y:"20","font-size":"8","font-weight":"700",fill:"#7DD3FC","font-family":"sans-serif"},"Z"),st({"data-owl":"zzz-3",x:"69",y:"12","font-size":"10","font-weight":"700",fill:"#BAE6FD","font-family":"sans-serif"},"Z")])),i.appendChild(c("g",{"data-owl":"notes",opacity:"0"},[st({"data-owl":"note-1",x:"12",y:"30","font-size":"10",fill:"#5EEAD4","font-family":"sans-serif"},"♪"),st({"data-owl":"note-2",x:"64",y:"26","font-size":"9",fill:"#F472B6","font-family":"sans-serif"},"♫"),st({"data-owl":"note-3",x:"40",y:"12","font-size":"8",fill:"#FCD34D","font-family":"sans-serif"},"♪")])),i.appendChild(c("circle",{"data-owl":"cold-glow",cx:"40",cy:"42",r:"44",fill:"none",stroke:"#38BDF8","stroke-width":"3",opacity:"0"})),i.appendChild(c("g",{"data-owl":"frost",opacity:"0"},[c("g",{"data-owl":"flake-1",transform:"translate(14, 24)"},[d("#E0F2FE")]),c("g",{"data-owl":"flake-2",transform:"translate(66, 22)"},[d("#BAE6FD")]),c("g",{"data-owl":"flake-3",transform:"translate(40, 14)"},[d("#E0F2FE")])]))}function Ht(r){const i=s=>r.querySelector(s);return{svg:r,pupilL:i('[data-owl="pupil-l"]'),pupilR:i('[data-owl="pupil-r"]'),eyelidL:i('[data-owl="eyelid-top-l"]'),eyelidR:i('[data-owl="eyelid-top-r"]'),highlightL:i('[data-owl="highlight-l"]'),highlightR:i('[data-owl="highlight-r"]'),blushL:i('[data-owl="blush-l"]'),blushR:i('[data-owl="blush-r"]'),mouth:i('[data-owl="mouth"]'),glasses:i('[data-owl="glasses"]'),book:i('[data-owl="book"]'),robot:i('[data-owl="robot"]'),robotEyeL:i('[data-owl="robot-eye-l"]'),robotEyeR:i('[data-owl="robot-eye-r"]'),chatBubble:i('[data-owl="chat-bubble"]'),phone:i('[data-owl="phone"]'),phoneFeed:i('[data-owl="phone-feed"]'),headband:i('[data-owl="headband"]'),motion:i('[data-owl="motion"]'),sweat:i('[data-owl="sweat"]'),social:i('[data-owl="social"]'),socialItems:[1,2,3,4].map(s=>i(`[data-owl="social-${s}"]`)),sleepEyes:i('[data-owl="sleep-eyes"]'),zzz:i('[data-owl="zzz"]'),zzzItems:[1,2,3].map(s=>i(`[data-owl="zzz-${s}"]`)),notes:i('[data-owl="notes"]'),noteItems:[1,2,3].map(s=>i(`[data-owl="note-${s}"]`)),coldGlow:i('[data-owl="cold-glow"]'),frost:i('[data-owl="frost"]'),frostItems:[1,2,3].map(s=>i(`[data-owl="flake-${s}"]`))}}function Ut(r,i){const s=(d,e,f)=>d?.setAttribute(e,f);s(r.pupilL,"r","6.5"),s(r.pupilL,"cx",String(gt)),s(r.pupilL,"cy",String(vt)),s(r.pupilR,"r","6.5"),s(r.pupilR,"cx",String(bt)),s(r.pupilR,"cy",String(Lt)),s(r.highlightL,"r","4"),s(r.highlightR,"r","4"),s(r.eyelidL,"transform","translate(0, 0)"),s(r.eyelidR,"transform","translate(0, 0)"),s(r.blushL,"opacity","0.2"),s(r.blushR,"opacity","0.2"),s(r.mouth,"d","M35 55Q40 58 45 55"),s(r.mouth,"opacity","0.25"),s(r.mouth,"stroke-width","1.2"),r.svg.style.transform="",r.chatBubble&&r.chatBubble.setAttribute("transform","translate(50, 22) scale(0)"),r.phoneFeed&&r.phoneFeed.setAttribute("transform",""),["glasses","book","robot","chatBubble","phone","headband","motion","sweat","social","sleepEyes","zzz","notes","coldGlow","frost"].forEach(d=>{const e=r[d];e&&e.setAttribute("opacity","0")}),["glasses","book","phone","robot"].forEach(d=>{const e=r[d];e&&e.setAttribute("transform","")}),i&&(i.style.transform="")}function jt(r){if(!r.eyelidL||!r.eyelidR)return;const i=150,s=performance.now();function d(e){const f=Math.min((e-s)/i,1),S=(f<.5?wt(f*2):wt((1-f)*2))*12;r.eyelidL.setAttribute("transform",`translate(0, ${S})`),r.eyelidR.setAttribute("transform",`translate(0, ${S})`),f<1?requestAnimationFrame(d):(r.eyelidL.setAttribute("transform","translate(0, 0)"),r.eyelidR.setAttribute("transform","translate(0, 0)"))}requestAnimationFrame(d)}const zt=["sleeping","reading","ai-chat","jogging","social","phone","dancing","eye-rolling","freezing","zoom-in","thinking","whisper","warning"];function Jt(r,i,s,d){const e=Ht(r);let f=0,S=!1;const N=performance.now(),Z=()=>{S||(S=!0,f&&cancelAnimationFrame(f),Ut(e,i),d?.())},O=()=>Z(),l=(n,o,u)=>n?.setAttribute(o,u),_=n=>n<J?wt($t(n/J)):n<Mt?1:1-wt($t((n-Mt)/qt));function B(n){function o(u){if(S)return;const j=u-N;if(n(j)){O();return}f=requestAnimationFrame(o)}f=requestAnimationFrame(o)}switch(s){case"sleeping":{B(n=>{const o=_(n);return l(e.sleepEyes,"opacity",String(o)),e.svg.style.transform=`translateY(${Math.sin(n/750)*1.6*o}px) rotate(${-6*o}deg)`,l(e.zzz,"opacity",String(o)),e.zzzItems.forEach((u,j)=>{if(!u)return;const D=(n+j*700)%2100/2100;u.setAttribute("opacity",String(Math.sin(D*Math.PI)*o)),u.setAttribute("transform",`translate(${D*5}, ${-D*8})`)}),n>H});break}case"reading":{let n=!1,o=!1,u=!1;B(j=>{const D=_(j);e.glasses&&(e.glasses.setAttribute("opacity",String(D)),e.glasses.setAttribute("transform",`translate(0, ${-9*(1-D)})`)),e.book&&(e.book.setAttribute("opacity",String(D)),e.book.setAttribute("transform",`translate(0, ${10*(1-D)})`));const q=4*D;return l(e.pupilL,"cy",String(38+q)),l(e.pupilR,"cy",String(38+q)),e.svg.style.transform=`rotate(${Math.sin(j/700)*2*D}deg)`,!n&&j>J+700&&(n=!0,jt(e)),!o&&j>J+2600&&(o=!0,jt(e)),!u&&j>J+4500&&(u=!0,jt(e)),j>H});break}case"ai-chat":{B(n=>{const o=_(n);e.robot&&(e.robot.setAttribute("opacity",String(o)),e.robot.setAttribute("transform",`translate(${(1-o)*14}, 0)`));const u=Math.floor(n/640)%2;if(e.chatBubble){const j=u===0?o:0;e.chatBubble.setAttribute("opacity",String(j)),e.chatBubble.setAttribute("transform",`translate(50, 22) scale(${j})`)}if(e.robotEyeL&&e.robotEyeR){const j=2+(u===1?Math.abs(Math.sin(n/80)):0)*o;e.robotEyeL.setAttribute("r",String(j)),e.robotEyeR.setAttribute("r",String(j))}return e.svg.style.transform=`rotate(${Math.sin(n/300)*3*o}deg)`,n>H});break}case"jogging":{B(n=>{const o=_(n);if(l(e.headband,"opacity",String(o)),e.svg.style.transform=`translateY(${-Math.abs(Math.sin(n/90))*6*o}px) rotate(${Math.sin(n/90)*3*o}deg)`,l(e.motion,"opacity",String((.4+.6*Math.abs(Math.sin(n/70)))*o)),e.sweat){const u=n/700%1;e.sweat.setAttribute("opacity",String((1-u)*o)),e.sweat.setAttribute("cy",String(34+u*12))}return l(e.blushL,"opacity",String(.15+.25*o)),l(e.blushR,"opacity",String(.15+.25*o)),n>H});break}case"social":{const n=[[20,30],[60,26],[40,18],[70,40]];B(o=>{const u=_(o);return l(e.social,"opacity",String(u)),e.socialItems.forEach((j,D)=>{if(!j)return;const q=(o+D*320)%1300/1300,[C,w]=n[D]??[0,0],R=Math.sin(q*Math.PI);j.setAttribute("transform",`translate(${C}, ${w-q*18}) scale(${.7+R*.5})`),j.setAttribute("opacity",String(R*u))}),e.svg.style.transform=`translateY(${Math.sin(o/220)*-2*u}px)`,l(e.blushL,"opacity",String(.2+.25*u)),l(e.blushR,"opacity",String(.2+.25*u)),o>H});break}case"phone":{B(n=>{const o=_(n);e.phone&&(e.phone.setAttribute("opacity",String(o)),e.phone.setAttribute("transform",`translate(0, ${12*(1-o)})`));const u=5*o;return l(e.pupilL,"cy",String(38+u)),l(e.pupilR,"cy",String(38+u)),e.phoneFeed&&e.phoneFeed.setAttribute("transform",`translate(0, ${-(n/1400*22%22)})`),l(e.blushL,"opacity","0.15"),l(e.blushR,"opacity","0.15"),n>H});break}case"dancing":{B(n=>{const o=_(n),u=n/300;return e.svg.style.transform=`translateY(${-Math.abs(Math.sin(u*2))*4*o}px) rotate(${Math.sin(u)*11*o}deg)`,l(e.blushL,"opacity",String(.2+.3*o)),l(e.blushR,"opacity",String(.2+.3*o)),l(e.mouth,"d","M34 55Q40 60 46 55"),l(e.mouth,"opacity",String(.4*o)),l(e.mouth,"stroke-width","1.5"),l(e.notes,"opacity",String(o)),e.noteItems.forEach((j,D)=>{if(!j)return;const q=(n+D*400)%1200/1200;j.setAttribute("opacity",String(Math.sin(q*Math.PI)*o)),j.setAttribute("transform",`translate(${Math.sin(q*Math.PI*2)*3}, ${-q*14})`)}),n>H});break}case"eye-rolling":{B(n=>{const o=_(n),u=-Math.PI/2+n/1100*Math.PI*2,j=3.4*o;return l(e.pupilL,"cx",String(gt+Math.cos(u)*j)),l(e.pupilL,"cy",String(vt+Math.sin(u)*j)),l(e.pupilR,"cx",String(bt+Math.cos(u)*j)),l(e.pupilR,"cy",String(Lt+Math.sin(u)*j)),e.svg.style.transform=`rotate(${Math.sin(n/1100)*4*o}deg)`,l(e.mouth,"d","M35 56 L45 56"),l(e.mouth,"opacity",String(.35*o)),l(e.mouth,"stroke-width","1.3"),n>H});break}case"freezing":{const n=[[14,24],[66,22],[40,14]];B(o=>{const u=_(o),j=5*u;l(e.eyelidL,"transform",`translate(0, ${j})`),l(e.eyelidR,"transform",`translate(0, ${j})`);const D=6.5-2.6*u;return l(e.pupilL,"r",String(D)),l(e.pupilR,"r",String(D)),l(e.coldGlow,"opacity",String((.15+.25*Math.abs(Math.sin(o/500)))*u)),l(e.frost,"opacity",String(u)),e.frostItems.forEach((q,C)=>{if(!q)return;const[w,R]=n[C]??[0,0],I=(o/1600+C*.33)%1;q.setAttribute("transform",`translate(${w+Math.sin(o/400+C)*2}, ${R+I*10}) rotate(${o/20+C*60})`),q.setAttribute("opacity",String(Math.sin(I*Math.PI)*.9*u))}),l(e.mouth,"d","M35 56 L45 56"),l(e.mouth,"opacity",String(.08+.28*u)),l(e.mouth,"stroke-width","1.3"),e.svg.style.transform=`rotate(${Math.sin(o/900)*1.5*u}deg)`,o>H});break}case"zoom-in":{B(n=>{const o=_(n);i&&(i.style.transform=`scale(${1+.75*o})`);const u=6.5+3.2*o;l(e.pupilL,"r",String(u)),l(e.pupilR,"r",String(u));const j=4+1.6*o;l(e.highlightL,"r",String(j)),l(e.highlightR,"r",String(j));const D=Math.sin(n/260)*2.2*o,q=Math.cos(n/330)*1.6*o;return l(e.pupilL,"cx",String(gt+D)),l(e.pupilL,"cy",String(vt+q)),l(e.pupilR,"cx",String(bt+D)),l(e.pupilR,"cy",String(Lt+q)),l(e.blushL,"opacity",String(.2+.15*o)),l(e.blushR,"opacity",String(.2+.15*o)),n>H});break}case"thinking":{B(n=>{const o=_(n);e.svg.style.transform=`rotate(${-12*o}deg)`;const u=Math.sin(n/1300)*1.8*o;return l(e.pupilL,"cx",String(gt+u)),l(e.pupilR,"cx",String(bt+u)),l(e.pupilL,"cy",String(38-3.5*o)),l(e.pupilR,"cy",String(38-3.5*o)),l(e.pupilL,"r",String(6.5-1*o)),l(e.pupilR,"r",String(6.5-1*o)),n>H});break}case"whisper":{B(n=>{const o=_(n);e.svg.style.transform=`scale(${1+.05*o})`,l(e.pupilL,"r",String(6.5+2*o)),l(e.pupilR,"r",String(6.5+2*o));const u=n>J+500&&n<J+950||n>J+2400&&n<J+2850;return l(e.eyelidR,"transform",`translate(0, ${u?9:0})`),l(e.blushL,"opacity",String(.2+.3*o)),l(e.blushR,"opacity",String(.2+.3*o)),n>H});break}case"warning":{B(n=>{const o=_(n);e.svg.style.transform=`rotate(${Math.sin(n/80)*5*o}deg)`;const u=5*o;return l(e.eyelidL,"transform",`translate(0, ${u})`),l(e.eyelidR,"transform",`translate(0, ${u})`),l(e.blushL,"opacity","0.1"),l(e.blushR,"opacity","0.1"),n>H});break}default:O()}return Z}const Xt="http://www.w3.org/2000/svg",kt=(()=>{const r=[-58,-50,-42,-34,-26,-18,-10,-2,6,14],i=[34,40,46,50,52,52,50,46,40,33];return r.map((s,d)=>({angle:s,len:i[d]??33,rx:-5+d*(10/(r.length-1)),ry:-13+Math.abs(d-4.5)*.5}))})(),Kt=[{angle:-46,len:20,rx:-9,ry:-2},{angle:-33,len:22,rx:-6,ry:-3},{angle:-20,len:23,rx:-3,ry:-4},{angle:-8,len:22,rx:0,ry:-4},{angle:4,len:20,rx:3,ry:-3},{angle:16,len:17,rx:6,ry:-2}],te=[{angle:-28,len:15,rx:-7,ry:3},{angle:-12,len:17,rx:-4,ry:4},{angle:3,len:17,rx:-1,ry:4.5},{angle:18,len:15,rx:2,ry:4},{angle:33,len:12,rx:5,ry:3}];function ee(r,i){return`M0 0 C ${-i} ${-r*.28} ${-i*.9} ${-r*.72} 0 ${-r} C ${i*.9} ${-r*.72} ${i} ${-r*.28} 0 0 Z`}function re(r){const i=r.querySelector('[data-owl="wing-l"]');if(!i||i.childNodes.length)return;const s=(e,f)=>{const S=document.createElementNS(Xt,e);for(const N in f)S.setAttribute(N,f[N]);return S},d=(e,f,S,N)=>{const Z=s("path",{d:ee(e,f),fill:S,stroke:"#8B6914","stroke-width":"0.7","stroke-linejoin":"round"});return N?[Z,s("path",{d:`M0 -3 L0 ${-(e-4)}`,stroke:"#7A6220","stroke-width":"0.5",fill:"none",opacity:"0.4"})]:[Z]};kt.forEach((e,f)=>{const S=s("g",{"data-owl":`wing-feather-${f+1}`,transform:`translate(${e.rx}, ${e.ry}) rotate(0)`});d(e.len,4.2,"url(#owl-feather-grad)",!0).forEach(N=>S.appendChild(N)),i.appendChild(S)}),Kt.forEach(e=>{const f=s("g",{transform:`translate(${e.rx}, ${e.ry}) rotate(${e.angle})`});d(e.len,4.6,"url(#owl-feather-grad)",!0).forEach(S=>f.appendChild(S)),i.appendChild(f)}),te.forEach(e=>{const f=s("g",{transform:`translate(${e.rx}, ${e.ry}) rotate(${e.angle})`});d(e.len,4.4,"url(#owl-feather-grad-dark)",!1).forEach(S=>f.appendChild(S)),i.appendChild(f)})}function m(r,i,s,d,e,f){const S=-s*(r.x-i),N=-d*r.v,Z=(S+N)/e;return{x:r.x+r.v*f,v:r.v+Z*f}}function ot(r,i,s=.3){return Math.abs(r.v)<s&&Math.abs(r.x-i)<s}function U(r){return r<.5?4*r*r*r:1-(-2*r+2)**3/2}function ie(r){return 1+2.70158*(r-1)**3+1.70158*(r-1)**2}const St=27,Bt=38,Et=53,Dt=38,oe=3.5;function ae(r){const i=D=>r.querySelector(D),s=i('[data-owl="pupil-l"]'),d=i('[data-owl="pupil-r"]'),e=i('[data-owl="eyelid-top-l"]'),f=i('[data-owl="eyelid-top-r"]'),S=i('[data-owl="highlight-l"]'),N=i('[data-owl="highlight-r"]'),Z=i('[data-owl="glow"]'),O=i('[data-owl="eureka-symbol"]'),l=i('[data-owl="exclamation"]'),_=i('[data-owl="blush-l"]'),B=i('[data-owl="blush-r"]'),n=i('[data-owl="mouth"]');if(!s||!d||!e||!f||!S||!N||!Z||!O||!l||!_||!B||!n)return null;const o=[];for(let D=1;D<=7;D++){const q=i(`[data-owl="ray-${D}"]`);q&&o.push(q)}const u=i('[data-owl="wing-l"]'),j=u?Array.from(u.children).slice(0,kt.length):[];return{svg:r,pupilL:s,pupilR:d,eyelidL:e,eyelidR:f,highlightL:S,highlightR:N,glow:Z,eureka:O,exclamation:l,blushL:_,blushR:B,mouth:n,rays:o,wingL:u,wingStaticL:i('[data-owl="wing-static-l"]'),chatBubble:i('[data-owl="chat-bubble"]'),notifDot:i('[data-owl="notif-dot"]'),wingFeathers:j}}function Wt(r,i,s,d,e){const f=r.getBoundingClientRect(),S=f.left+d/80*f.width,N=f.top+e/80*f.height,Z=i-S,O=s-N,l=Math.sqrt(Z*Z+O*O);if(l===0)return{x:0,y:0};const _=Math.min(l,300)/300*oe;return{x:Z/l*_,y:O/l*_}}function se(r,i,s,d=!1){r.pupilL.setAttribute("r","6.5"),r.pupilL.setAttribute("cx",String(St)),r.pupilL.setAttribute("cy",String(Bt)),r.pupilR.setAttribute("r","6.5"),r.pupilR.setAttribute("cx",String(Et)),r.pupilR.setAttribute("cy",String(Dt)),r.highlightL.setAttribute("r","4"),r.highlightL.setAttribute("cx","22"),r.highlightL.setAttribute("cy","33"),r.highlightR.setAttribute("r","4"),r.highlightR.setAttribute("cx","48"),r.highlightR.setAttribute("cy","33"),r.eyelidL.setAttribute("transform","translate(0, 0)"),r.eyelidR.setAttribute("transform","translate(0, 0)"),s.set(r.svg,{lx:0,ly:0,rx:0,ry:0}),r.svg.style.transform="",r.glow.setAttribute("opacity","0"),r.eureka.setAttribute("opacity","0"),r.eureka.setAttribute("transform","translate(58, -6)"),r.exclamation.setAttribute("opacity","0"),r.exclamation.setAttribute("transform","translate(-6, 6)"),r.blushL.setAttribute("opacity","0.2"),r.blushR.setAttribute("opacity","0.2"),r.mouth.setAttribute("d","M35 55Q40 58 45 55"),r.mouth.setAttribute("opacity","0.25"),r.mouth.setAttribute("stroke-width","1.2"),r.rays.forEach(e=>e.setAttribute("opacity","0")),r.wingL?.setAttribute("opacity","0"),r.wingL?.setAttribute("transform","translate(21, 59) scale(0)"),r.wingStaticL?.setAttribute("opacity","1"),r.chatBubble?.setAttribute("opacity","0"),r.chatBubble?.setAttribute("transform","translate(50, 22) scale(0)"),r.notifDot?.setAttribute("opacity",d?"1":"0"),r.notifDot?.setAttribute("r","5"),i&&(i.style.transform="")}function ne(r,i){const s=Q.useRef(new Set),d=Q.useRef(0),e=Q.useRef(!1),f=Q.useRef(null),S=Q.useRef(!1),N=Q.useRef(!1),Z=Q.useRef(null),O=Q.useRef(new WeakMap),l=Q.useRef(0),_=Q.useCallback(C=>{const w=s.current;if(C)w.add(C),re(C),S.current&&!N.current&&C.querySelector('[data-owl="notif-dot"]')?.setAttribute("opacity","1");else for(const R of w)R.isConnected||w.delete(R)},[]),B=Q.useCallback(()=>{const C=[];for(const w of s.current){const R=ae(w);R&&C.push(R)}return C},[]),n=Q.useCallback(()=>{const C=performance.now();function w(R){const I=Math.min((R-C)/150,1),y=(I<.5?U(I*2):U((1-I)*2))*12;for(const a of B())a.eyelidL.setAttribute("transform",`translate(0, ${y})`),a.eyelidR.setAttribute("transform",`translate(0, ${y})`);if(I<1)requestAnimationFrame(w);else for(const a of B())a.eyelidL.setAttribute("transform","translate(0, 0)"),a.eyelidR.setAttribute("transform","translate(0, 0)")}requestAnimationFrame(w)},[B]),o=Q.useCallback(()=>{const C=B();for(const w of C)w.glow.setAttribute("opacity","0.3"),w.blushL.setAttribute("opacity","0.4"),w.blushR.setAttribute("opacity","0.4");setTimeout(()=>{for(const w of B())w.glow.setAttribute("opacity","0"),w.blushL.setAttribute("opacity","0.2"),w.blushR.setAttribute("opacity","0.2")},500)},[B]),u=Q.useCallback(C=>{if(f.current&&(f.current(),f.current=null),e.current||B().length===0)return;if(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){o();return}e.current=!0;const w=performance.now(),R=y=>{for(const a of B()){const h=a.svg.closest(".gaio-theme__button");y(a,h)}},I=()=>{for(const y of B()){const a=y.svg.closest(".gaio-theme__button");se(y,a,O.current,S.current)}N.current=!1,e.current=!1};if(C==="eureka"){let y=function(z){const F=.016666666666666666,X=z-w;if(b===0&&X>300&&(b=1),b===1&&X>1100&&(b=2),b===2&&X>2400&&(b=3),b===0&&(a=m(a,.7,180,16,1,F),h=m(h,-10,160,10,1.2,F),k=m(k,1.1,250,6,.6,F),g=m(g,0,180,8,.8,F)),b===1&&(a=m(a,1.2,200,10,.8,F),h=m(h,5,220,10,1,F),p=m(p,.55,200,7,1,F),L=m(L,1.18,250,5,.6,F),A=m(A,.55,160,10,1,F),v=m(v,-6,180,7,.7,F),x=m(x,1.15,220,5,.5,F),M=m(M,1,200,8,1,F),k=m(k,.9,100,12,1,F),g=m(g,-2,80,10,1,F)),b===2){const W=(X-1100)/1300;h={x:Math.sin(W*Math.PI*5)*4*(1-W),v:0},a=m(a,1.1,100,12,1,F),A=m(A,.6,80,10,1,F),p=m(p,.25,50,10,1,F),L=m(L,1.06,100,10,1,F),v={x:-6+Math.sin(W*Math.PI*3)*2.5,v:0},x=m(x,1,80,10,1,F),M=m(M,.6,60,10,1,F),k=m(k,0,100,8,1,F)}b===3&&(a=m(a,1,90,14,1,F),h=m(h,0,70,12,1,F),p=m(p,0,50,10,1,F),L=m(L,1,70,12,1,F),x=m(x,0,100,10,1,F),v=m(v,12,50,10,1,F),k=m(k,0,80,10,1,F),A=m(A,.2,50,10,1,F),M=m(M,0,60,10,1,F));const T=6.5*a.x,K=String(Math.max(2.5,T)),E=String(4*Math.max(.4,a.x*.65)),G=`rotate(${h.x}deg)`,nt=String(Math.max(0,p.x)),lt=`scale(${L.x})`,P=Math.max(0,x.x),Y=String(Math.min(1,P)),ht=`translate(58, ${v.x}) scale(${P})`,ut=Math.max(0,k.x),tt=String(Math.min(1,ut)),At=`translate(-6, ${g.x}) scale(${ut})`,pt=String(A.x),ft=(b===1||b===2)&&P>.3;if(ft&&($+=.1),R((W,at)=>{if(W.pupilL.setAttribute("r",K),W.pupilR.setAttribute("r",K),W.highlightL.setAttribute("r",E),W.highlightR.setAttribute("r",E),W.svg.style.transform=G,W.glow.setAttribute("opacity",nt),at&&(at.style.transform=lt),W.eureka.setAttribute("opacity",Y),W.eureka.setAttribute("transform",ht),W.exclamation.setAttribute("opacity",tt),W.exclamation.setAttribute("transform",At),ft?W.rays.forEach((et,Ft)=>{const xt=.2+.8*Math.abs(Math.sin($+Ft*.9));et.setAttribute("opacity",String(xt*Math.min(1,P)))}):W.rays.forEach(et=>et.setAttribute("opacity","0")),W.blushL.setAttribute("opacity",pt),W.blushR.setAttribute("opacity",pt),b===1||b===2){const et=Math.min(1,(X-300)/600);W.mouth.setAttribute("d",`M34 55Q40 ${58+et*3} 46 55`),W.mouth.setAttribute("opacity","0.4"),W.mouth.setAttribute("stroke-width","1.5")}else b===3&&(W.mouth.setAttribute("d","M35 55Q40 58 45 55"),W.mouth.setAttribute("opacity","0.25"),W.mouth.setAttribute("stroke-width","1.2"))}),b===3&&ot(a,1)&&ot(h,0)&&ot(p,0)&&ot(L,1)&&ot(x,0)&&ot(k,0)&&ot(A,.2,.05)){I();return}d.current=requestAnimationFrame(y)},a={x:1,v:0},h={x:0,v:0},p={x:0,v:0},L={x:1,v:0},v={x:18,v:0},x={x:0,v:0},g={x:12,v:0},k={x:0,v:0},A={x:.2,v:0},M={x:0,v:0},b=0,$=0;d.current=requestAnimationFrame(y);return}if(C==="notification"){let y=function(K){const E=K-w;let G;E<g?G=U(T(E/g)):E<$?G=1:G=1-U(T((E-$)/M));const nt=v*G,lt=a[0]+(h[0]-a[0])*G,P=a[1]+(h[1]-a[1])*G,Y=`scale(${1+.18*G})`,ht=String(.2+.2*G),ut=String(Math.max(0,1-G*1.6));let tt;if(E<g)tt=p*U(T(E/g));else if(E<b){const V=(E-g)/k;tt=p+Math.sin(V*Math.PI*4)*9}else if(E<$){const V=U(T((E-b)/A));tt=p+(L-p)*V}else{const V=U(T((E-$)/M));tt=L*(1-V)}const At=`translate(${lt}, ${P}) rotate(${tt}) scale(${Math.max(0,nt)})`,pt=String(Math.max(0,G)),ft=kt.map((V,rt)=>{let it,ct=0;if(E<g)it=U(T((E-rt*16)/(g*.72)));else if(E<b){it=1;const dt=(E-g)/k;ct=Math.sin(dt*Math.PI*4-rt*.55)*7*(1-dt*.3)}else if(E<$){it=1;const dt=(E-b)/A;ct=Math.sin((1-dt)*Math.PI*2-rt*.4)*3*(1-dt)}else it=1-U(T((E-$-(X-1-rt)*14)/(M*.72)));const yt=V.angle*(x+(1-x)*it)+ct;return`translate(${V.rx}, ${V.ry}) rotate(${yt})`});let W=0,at=0;if(E>=b&&E<$)W=ie(T((E-b)/300)),at=T((E-b)/170);else if(E>=$){const V=U(T((E-$)/(M*.6)));W=1-V,at=1-V}const et=String(Math.max(0,at)),Ft=`translate(50, 22) scale(${Math.max(0,W)})`,xt=E>=z&&S.current?T((E-z)/F):0,Qt=String(xt),Zt=String(5+Math.sin(xt*Math.PI)*1.6);if(R((V,rt)=>{rt&&(rt.style.transform=Y),V.blushL.setAttribute("opacity",ht),V.blushR.setAttribute("opacity",ht),V.wingStaticL?.setAttribute("opacity",ut),V.wingL?.setAttribute("opacity",pt),V.wingL?.setAttribute("transform",At),V.wingFeathers.forEach((it,ct)=>{const yt=ft[ct];yt&&it.setAttribute("transform",yt)}),V.chatBubble?.setAttribute("opacity",et),V.chatBubble?.setAttribute("transform",Ft),E>=z&&(V.notifDot?.setAttribute("opacity",Qt),V.notifDot?.setAttribute("r",Zt))}),E>z+F+60){I();return}d.current=requestAnimationFrame(y)};N.current=!0;const a=[21,59],h=[13,55],p=-48,L=-72,v=1.6,x=.2,g=520,k=660,A=480,M=620,b=g+k,$=b+A,z=$+M,F=260,X=kt.length,T=K=>Math.max(0,Math.min(1,K));d.current=requestAnimationFrame(y);return}if(C==="attention"){let y=function(p){const L=.016666666666666666,v=p-w;a=m(a,4.5,240,14,1,L),h=m(h,v<500?.4:0,180,10,1,L);const x=4+Math.sin(v/150)*1.5,g=String(Math.max(2.5,a.x)),k=String(x),A=String(Math.max(0,h.x));if(R(M=>{M.pupilL.setAttribute("r",g),M.pupilR.setAttribute("r",g),M.highlightL.setAttribute("r",k),M.highlightR.setAttribute("r",k),M.glow.setAttribute("opacity",A)}),v>1500){I();return}d.current=requestAnimationFrame(y)},a={x:6.5,v:0},h={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="important"){let y=function(L){const v=.016666666666666666,x=L-w,g=x<1100;a=m(a,g?0:12,220,9,.7,v),h=m(h,x<350?1.2:g?1:0,240,8,.6,v),p=m(p,x<500?.25:0,160,10,1,v);const k=Math.max(0,h.x),A=String(Math.min(1,k)),M=`translate(-6, ${a.x}) scale(${k})`,b=String(Math.max(0,p.x));if(R($=>{$.exclamation.setAttribute("opacity",A),$.exclamation.setAttribute("transform",M),$.glow.setAttribute("opacity",b)}),x>1500){I();return}d.current=requestAnimationFrame(y)},a={x:12,v:0},h={x:0,v:0},p={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="success"){let y=function(L){const v=.016666666666666666,x=L-w;a=m(a,x<400?-8:0,220,11,1,v),h=m(h,x<1500?.55:.2,120,12,1,v),p=m(p,x<1500?.3:0,120,12,1,v);const g=4+Math.sin(x/180)*1,k=`translateY(${a.x}px)`,A=String(g),M=String(h.x),b=String(Math.max(0,p.x)),$=x<1700;if(R(z=>{z.svg.style.transform=k,z.highlightL.setAttribute("r",A),z.highlightR.setAttribute("r",A),z.blushL.setAttribute("opacity",M),z.blushR.setAttribute("opacity",M),z.glow.setAttribute("opacity",b),$&&(z.mouth.setAttribute("d","M34 55Q40 60 46 55"),z.mouth.setAttribute("opacity","0.4"),z.mouth.setAttribute("stroke-width","1.5"))}),x>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:.2,v:0},p={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="thinking"){let y=function(L){const v=.016666666666666666,x=L-w,g=x<1500;a=m(a,g?-12:0,200,13,1,v),h=m(h,g?34.5:38,200,13,1,v),p=m(p,g?5.5:6.5,200,13,1,v);const k=`rotate(${a.x}deg)`,A=String(h.x),M=String(Math.max(2.5,p.x));if(R(b=>{b.svg.style.transform=k,b.pupilL.setAttribute("cy",A),b.pupilR.setAttribute("cy",A),b.pupilL.setAttribute("r",M),b.pupilR.setAttribute("r",M)}),x>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:38,v:0},p={x:6.5,v:0};d.current=requestAnimationFrame(y);return}if(C==="warning"){let y=function(p){const L=.016666666666666666,v=p-w;let x=0;v<350?x=-5:v<700?x=5:v<1050?x=-3:x=0,a=m(a,x,260,12,1,L),h=m(h,v<1600?8:0,200,13,1,L);const g=`rotate(${a.x}deg)`,k=`translate(0, ${h.x})`;if(R(A=>{A.svg.style.transform=g,A.eyelidL.setAttribute("transform",k),A.eyelidR.setAttribute("transform",k),A.blushL.setAttribute("opacity","0.1"),A.blushR.setAttribute("opacity","0.1")}),v>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:0,v:0};d.current=requestAnimationFrame(y);return}if(C==="greeting"){let y=function(v){const x=.016666666666666666,g=v-w;let k=10;g>400&&g<800?k=-5:g>=800&&(k=0),a=m(a,k,220,12,1,x),h=m(h,g<1100?.25:.2,120,12,1,x),!p&&g>200&&(p=!0,n()),!L&&g>500&&(L=!0,n());const A=`rotate(${a.x}deg)`,M=String(h.x);if(R(b=>{b.svg.style.transform=A,b.blushL.setAttribute("opacity",M),b.blushR.setAttribute("opacity",M)}),g>1500){I();return}d.current=requestAnimationFrame(y)},a={x:0,v:0},h={x:.15,v:0},p=!1,L=!1;d.current=requestAnimationFrame(y);return}if(C==="celebrate"){let y=function(a){const h=a-w,p=Math.min(h/2e3,1),L=p*360,v=Math.sin(p*Math.PI)*.6,x=.15+Math.sin(p*Math.PI)*.45,g=1+Math.sin(p*Math.PI)*.1,k=`rotate(${L}deg)`,A=String(Math.max(0,v)),M=String(x),b=`scale(${g})`;if(R(($,z)=>{$.svg.style.transform=k,$.glow.setAttribute("opacity",A),$.blushL.setAttribute("opacity",M),$.blushR.setAttribute("opacity",M),z&&(z.style.transform=b)}),h>2e3){I();return}d.current=requestAnimationFrame(y)};d.current=requestAnimationFrame(y);return}if(C==="whisper"){let y=function(v){const x=.016666666666666666,g=v-w,k=g<1500;a=m(a,k?1.05:1,200,14,1,x),h=m(h,k?8.5:6.5,200,14,1,x);const A=g>500&&g<1100;L=m(L,A?9:0,220,13,1,x),p=m(p,g<700?.5:g<1500?.3:.2,120,12,1,x);const M=`scale(${a.x})`,b=String(Math.max(2.5,h.x)),$=`translate(0, ${L.x})`,z=String(p.x);if(R(F=>{F.svg.style.transform=M,F.pupilL.setAttribute("r",b),F.pupilR.setAttribute("r",b),F.eyelidR.setAttribute("transform",$),F.blushL.setAttribute("opacity",z),F.blushR.setAttribute("opacity",z)}),g>2e3){I();return}d.current=requestAnimationFrame(y)},a={x:1,v:0},h={x:6.5,v:0},p={x:.15,v:0},L={x:0,v:0};d.current=requestAnimationFrame(y);return}e.current=!1},[B,n,o]),j=Q.useCallback(C=>{if(S.current=C,!(C&&N.current))for(const w of B())w.notifDot?.setAttribute("opacity",C?"1":"0"),w.notifDot?.setAttribute("r","5")},[B]);Q.useEffect(()=>{const C=O.current;function w(y){Z.current={x:y.clientX,y:y.clientY}}function R(){if(!e.current&&!f.current){const y=Z.current;for(const a of B()){const h=C.get(a.svg)??{lx:0,ly:0,rx:0,ry:0};let p=0,L=0,v=0,x=0;if(y){const g=Wt(a.svg,y.x,y.y,St,Bt),k=Wt(a.svg,y.x,y.y,Et,Dt);p=g.x,L=g.y,v=k.x,x=k.y}h.lx+=(p-h.lx)*.12,h.ly+=(L-h.ly)*.12,h.rx+=(v-h.rx)*.12,h.ry+=(x-h.ry)*.12,C.set(a.svg,h),a.pupilL.setAttribute("cx",String(St+h.lx)),a.pupilL.setAttribute("cy",String(Bt+h.ly)),a.pupilR.setAttribute("cx",String(Et+h.rx)),a.pupilR.setAttribute("cy",String(Dt+h.ry)),a.highlightL.setAttribute("cx",String(22+h.lx*.4)),a.highlightL.setAttribute("cy",String(33+h.ly*.4)),a.highlightR.setAttribute("cx",String(48+h.rx*.4)),a.highlightR.setAttribute("cy",String(33+h.ry*.4))}}l.current=requestAnimationFrame(R)}document.addEventListener("mousemove",w),l.current=requestAnimationFrame(R);const I=setInterval(()=>{e.current||n()},2500+Math.random()*2500);return()=>{document.removeEventListener("mousemove",w),cancelAnimationFrame(l.current),clearInterval(I),d.current&&cancelAnimationFrame(d.current),e.current=!1}},[r,B,n]);const D=i?.enabled??!1,q=Math.max(3e3,i?.intervalMs??1e4);return Q.useEffect(()=>{if(!D||s.current.size===0||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;for(const w of s.current)Yt(w);const C=setInterval(()=>{if(e.current||f.current)return;const w=[...s.current].filter(a=>a.isConnected);if(w.length===0)return;const R=zt[Math.floor(Math.random()*zt.length)]??"sleeping",I=()=>{f.current=null;for(const a of w)O.current.set(a,{lx:0,ly:0,rx:0,ry:0})},y=w.map((a,h)=>{const p=a.closest(".gaio-theme__button");return Jt(a,p,R,h===0?I:void 0)});f.current=()=>{for(const a of y)a();I()}},q);return()=>{clearInterval(C),f.current&&(f.current(),f.current=null)}},[r,D,q]),{registerSvg:_,react:u,setNotifBadge:j}}const le=["notification","attention","eureka","important","success","thinking","warning","greeting","celebrate","whisper"];function ce({owl:r}){return typeof window<"u"&&new URLSearchParams(window.location.search).get("owlDebug")!=="1"?null:t.jsxs("div",{"data-testid":"owl-debug-panel",style:{position:"fixed",bottom:90,right:16,zIndex:9999,background:"rgba(0,0,0,0.8)",borderRadius:8,padding:8,display:"flex",flexDirection:"column",gap:4},children:[le.map(i=>t.jsx("button",{type:"button",onClick:()=>{r.react(i),i==="notification"&&r.setNotifBadge(!0)},style:{color:"white",background:"#333",border:"1px solid #555",borderRadius:4,padding:"4px 8px",cursor:"pointer",fontSize:12},children:i},i)),t.jsx("button",{type:"button",onClick:()=>r.setNotifBadge(!1),style:{color:"white",background:"#5a1f1f",border:"1px solid #555",borderRadius:4,padding:"4px 8px",cursor:"pointer",fontSize:12},children:"clear dot"})]})}function Nt({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})}function de({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M4 14h6v6"}),t.jsx("path",{d:"M20 10h-6V4"}),t.jsx("path",{d:"M14 10l7-7"}),t.jsx("path",{d:"M3 21l7-7"})]})}function he({size:r=18,className:i}){return t.jsx("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Ct({size:r=64,className:i,svgRef:s}){return t.jsxs("svg",{ref:s,className:i,width:r,height:r,viewBox:"0 0 80 80",fill:"none","aria-hidden":"true",style:{overflow:"visible",transformOrigin:"40px 42px"},children:[t.jsx("circle",{"data-owl":"glow",cx:"40",cy:"42",r:"44",fill:"none",stroke:"#FCD34D",strokeWidth:"3",opacity:"0"}),t.jsxs("g",{"data-owl":"eureka-symbol",opacity:"0",transform:"translate(58, -6)",children:[t.jsx("ellipse",{cx:"10",cy:"8",rx:"8",ry:"9",fill:"#FDE68A"}),t.jsx("ellipse",{cx:"10",cy:"7",rx:"5.5",ry:"6",fill:"#FEF9C3",opacity:"0.7"}),t.jsx("path",{d:"M7.5 9C8 6 9 5 10 7C11 5 12 6 12.5 9",stroke:"#F59E0B",strokeWidth:"1",fill:"none",strokeLinecap:"round"}),t.jsx("rect",{x:"6",y:"16.5",width:"8",height:"2",rx:"1",fill:"#F59E0B"}),t.jsx("rect",{x:"6.5",y:"18.5",width:"7",height:"1.5",rx:"0.75",fill:"#D97706"}),t.jsx("rect",{x:"7",y:"20",width:"6",height:"1.2",rx:"0.6",fill:"#B45309"}),t.jsx("circle",{cx:"10",cy:"22",r:"1",fill:"#92400E"}),t.jsx("line",{"data-owl":"ray-1",x1:"10",y1:"-4",x2:"10",y2:"-1.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-2",x1:"20",y1:"3",x2:"17.5",y2:"4.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-3",x1:"20",y1:"13",x2:"17.5",y2:"11.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-4",x1:"0",y1:"3",x2:"2.5",y2:"4.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-5",x1:"0",y1:"13",x2:"2.5",y2:"11.5",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-6",x1:"18",y1:"-1",x2:"16",y2:"1",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"}),t.jsx("line",{"data-owl":"ray-7",x1:"2",y1:"-1",x2:"4",y2:"1",stroke:"#FCD34D",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0"})]}),t.jsxs("g",{"data-owl":"exclamation",opacity:"0",transform:"translate(-6, 6)",children:[t.jsx("rect",{x:"3",y:"0",width:"5",height:"14",rx:"2.5",fill:"#F59E0B"}),t.jsx("circle",{cx:"5.5",cy:"18",r:"2.5",fill:"#F59E0B"})]}),t.jsx("path",{d:"M16 18Q20 4 28 20Z",fill:"#C9A84C",opacity:.7}),t.jsx("path",{d:"M64 18Q60 4 52 20Z",fill:"#C9A84C",opacity:.7}),t.jsx("path",{d:"M18 17Q21 8 25 19Z",fill:"#D4B85C",opacity:.4}),t.jsx("path",{d:"M62 17Q59 8 55 19Z",fill:"#D4B85C",opacity:.4}),t.jsx("path",{d:"M19 12Q20 6 22 14Z",fill:"#8B6914",opacity:.6}),t.jsx("path",{d:"M61 12Q60 6 58 14Z",fill:"#8B6914",opacity:.6}),t.jsx("path",{d:"M20 8Q20.5 5 21.5 10Z",fill:"#5C4413",opacity:.5}),t.jsx("path",{d:"M60 8Q59.5 5 58.5 10Z",fill:"#5C4413",opacity:.5}),t.jsx("circle",{cx:20.5,cy:6,r:.8,fill:"#2DD4BF",opacity:.2}),t.jsx("circle",{cx:59.5,cy:6,r:.8,fill:"#2DD4BF",opacity:.2}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",fill:"url(#owl-body-grad)"}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",stroke:"#A8893A",strokeWidth:"1.5",fill:"none",opacity:.35}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"28",ry:"30",fill:"url(#owl-body-shade)",opacity:.2}),t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"owl-body-grad",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"#D4B85C"}),t.jsx("stop",{offset:"50%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#A8893A"})]}),t.jsxs("radialGradient",{id:"owl-belly-grad",cx:"50%",cy:"45%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FEF9C3",stopOpacity:.35}),t.jsx("stop",{offset:"60%",stopColor:"#F5E6B8",stopOpacity:.2}),t.jsx("stop",{offset:"100%",stopColor:"#C9A84C",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"owl-body-shade",cx:"50%",cy:"40%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"transparent"}),t.jsx("stop",{offset:"70%",stopColor:"transparent"}),t.jsx("stop",{offset:"100%",stopColor:"#8B7500"})]}),t.jsxs("radialGradient",{id:"owl-iris-grad-l",cx:"45%",cy:"42%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"50%",stopColor:"#2DD4BF"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("radialGradient",{id:"owl-iris-grad-r",cx:"45%",cy:"42%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"50%",stopColor:"#2DD4BF"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("linearGradient",{id:"owl-feather-grad",x1:"0",y1:"1",x2:"0",y2:"0",children:[t.jsx("stop",{offset:"0%",stopColor:"#9A7D2E"}),t.jsx("stop",{offset:"55%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#ECD684"})]}),t.jsxs("linearGradient",{id:"owl-feather-grad-dark",x1:"0",y1:"1",x2:"0",y2:"0",children:[t.jsx("stop",{offset:"0%",stopColor:"#5C4A18"}),t.jsx("stop",{offset:"70%",stopColor:"#8B7028"}),t.jsx("stop",{offset:"100%",stopColor:"#B8993E"})]}),t.jsx("filter",{id:"owl-wing-shadow",x:"-35%",y:"-35%",width:"170%",height:"170%",children:t.jsx("feDropShadow",{dx:"0",dy:"1",stdDeviation:"0.9",floodColor:"#2E230A",floodOpacity:"0.5"})})]}),t.jsx("ellipse",{cx:"40",cy:"52",rx:"14",ry:"16",fill:"url(#owl-belly-grad)"}),t.jsx("path",{d:"M33 48Q40 52 47 48",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.18}),t.jsx("path",{d:"M31 52Q40 57 49 52",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.15}),t.jsx("path",{d:"M32 56Q40 61 48 56",stroke:"#B8953F",strokeWidth:"0.6",fill:"none",opacity:.12}),t.jsx("ellipse",{cx:"40",cy:"38",rx:"24",ry:"18",stroke:"#D4A800",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("ellipse",{cx:"40",cy:"38",rx:"20",ry:"15",stroke:"#D4A800",strokeWidth:"0.5",fill:"none",opacity:"0.1"}),t.jsx("path",{d:"M13 28Q20 21 30 27",stroke:"#5C4413",strokeWidth:"3.2",strokeLinecap:"round",fill:"none",opacity:.25}),t.jsx("path",{d:"M67 28Q60 21 50 27",stroke:"#5C4413",strokeWidth:"3.2",strokeLinecap:"round",fill:"none",opacity:.25}),t.jsx("path",{d:"M13 27Q20 20 30 26",stroke:"#A8893A",strokeWidth:"2.8",strokeLinecap:"round",fill:"none",opacity:.65}),t.jsx("path",{d:"M67 27Q60 20 50 26",stroke:"#A8893A",strokeWidth:"2.8",strokeLinecap:"round",fill:"none",opacity:.65}),t.jsx("path",{d:"M15 26Q21 21 28 25",stroke:"#D4B85C",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:.4}),t.jsx("path",{d:"M65 26Q59 21 52 25",stroke:"#D4B85C",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:.4}),t.jsx("circle",{cx:"27",cy:"38",r:"15",fill:"#0D9488",opacity:.08}),t.jsx("circle",{cx:"27",cy:"38",r:"14",fill:"white",opacity:.97}),t.jsx("circle",{cx:"27",cy:"38",r:"14",stroke:"#8B7500",strokeWidth:"1.2",fill:"none",opacity:.25}),t.jsx("circle",{cx:"27",cy:"38",r:"12",fill:"url(#owl-iris-grad-l)",opacity:.9}),t.jsx("circle",{cx:"27",cy:"38",r:"10",stroke:"#0F766E",strokeWidth:"0.4",fill:"none",opacity:.2}),t.jsx("circle",{cx:"27",cy:"38",r:"8.5",stroke:"#134E4A",strokeWidth:"0.3",fill:"none",opacity:.12}),t.jsx("circle",{"data-owl":"pupil-l",cx:"27",cy:"38",r:"6.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"27",cy:"38",r:"6.5",stroke:"#0D9488",strokeWidth:"0.5",fill:"none",opacity:.3}),t.jsx("circle",{"data-owl":"highlight-l",cx:"22",cy:"33",r:"4",fill:"white",opacity:"0.95"}),t.jsx("circle",{cx:"31",cy:"42",r:"2",fill:"white",opacity:"0.5"}),t.jsx("circle",{cx:"23",cy:"35",r:"1",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M16 44Q27 48 38 44",stroke:"#C5B200",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("circle",{cx:"53",cy:"38",r:"15",fill:"#0D9488",opacity:.08}),t.jsx("circle",{cx:"53",cy:"38",r:"14",fill:"white",opacity:.97}),t.jsx("circle",{cx:"53",cy:"38",r:"14",stroke:"#8B7500",strokeWidth:"1.2",fill:"none",opacity:.25}),t.jsx("circle",{cx:"53",cy:"38",r:"12",fill:"url(#owl-iris-grad-r)",opacity:.9}),t.jsx("circle",{cx:"53",cy:"38",r:"10",stroke:"#0F766E",strokeWidth:"0.4",fill:"none",opacity:.2}),t.jsx("circle",{cx:"53",cy:"38",r:"8.5",stroke:"#134E4A",strokeWidth:"0.3",fill:"none",opacity:.12}),t.jsx("circle",{"data-owl":"pupil-r",cx:"53",cy:"38",r:"6.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"53",cy:"38",r:"6.5",stroke:"#0D9488",strokeWidth:"0.5",fill:"none",opacity:.3}),t.jsx("circle",{"data-owl":"highlight-r",cx:"48",cy:"33",r:"4",fill:"white",opacity:"0.95"}),t.jsx("circle",{cx:"57",cy:"42",r:"2",fill:"white",opacity:"0.5"}),t.jsx("circle",{cx:"49",cy:"35",r:"1",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M42 44Q53 48 64 44",stroke:"#C5B200",strokeWidth:"0.8",fill:"none",opacity:"0.15"}),t.jsx("clipPath",{id:"owl-eye-clip-l",children:t.jsx("circle",{cx:"27",cy:"38",r:"14"})}),t.jsx("rect",{"data-owl":"eyelid-top-l",x:"13",y:"14",width:"28",height:"16",fill:"#C9A84C",opacity:"0.2",clipPath:"url(#owl-eye-clip-l)"}),t.jsx("clipPath",{id:"owl-eye-clip-r",children:t.jsx("circle",{cx:"53",cy:"38",r:"14"})}),t.jsx("rect",{"data-owl":"eyelid-top-r",x:"39",y:"14",width:"28",height:"16",fill:"#C9A84C",opacity:"0.2",clipPath:"url(#owl-eye-clip-r)"}),t.jsx("ellipse",{"data-owl":"blush-l",cx:"14",cy:"47",rx:"5",ry:"2.5",fill:"#FB7185",opacity:"0.15"}),t.jsx("ellipse",{"data-owl":"blush-r",cx:"66",cy:"47",rx:"5",ry:"2.5",fill:"#FB7185",opacity:"0.15"}),t.jsx("path",{d:"M36 49Q40 57 44 49Q40 52 36 49Z",fill:"#E8A000"}),t.jsx("path",{d:"M36 49Q40 57 44 49",stroke:"#B45309",strokeWidth:"0.8",fill:"none",opacity:"0.4"}),t.jsx("circle",{cx:"38",cy:"51",r:"0.6",fill:"#B45309",opacity:"0.3"}),t.jsx("circle",{cx:"42",cy:"51",r:"0.6",fill:"#B45309",opacity:"0.3"}),t.jsx("path",{"data-owl":"mouth",d:"M35 55Q40 58 45 55",stroke:"#C5B200",strokeWidth:"1.2",strokeLinecap:"round",fill:"none",opacity:"0.3"}),t.jsxs("g",{"data-owl":"wing-static-l",children:[t.jsx("path",{d:"M12 45Q5 53 11 65",stroke:"#8B6914",strokeWidth:"2.5",fill:"none",opacity:.3,strokeLinecap:"round"}),t.jsx("path",{d:"M13 46Q7 54 12 64",stroke:"#D4A800",strokeWidth:"2",fill:"none",opacity:.35,strokeLinecap:"round"}),t.jsx("path",{d:"M14 48Q9 55 13 62",stroke:"#5C4413",strokeWidth:"1",fill:"none",opacity:.2,strokeLinecap:"round"}),t.jsx("path",{d:"M14 50Q10 56 13 60",stroke:"#2DD4BF",strokeWidth:"0.8",fill:"none",opacity:.08,strokeLinecap:"round"})]}),t.jsx("path",{d:"M68 45Q75 53 69 65",stroke:"#8B6914",strokeWidth:"2.5",fill:"none",opacity:.3,strokeLinecap:"round"}),t.jsx("path",{d:"M67 46Q73 54 68 64",stroke:"#D4A800",strokeWidth:"2",fill:"none",opacity:.35,strokeLinecap:"round"}),t.jsx("path",{d:"M66 48Q71 55 67 62",stroke:"#5C4413",strokeWidth:"1",fill:"none",opacity:.2,strokeLinecap:"round"}),t.jsx("path",{d:"M66 50Q70 56 67 60",stroke:"#2DD4BF",strokeWidth:"0.8",fill:"none",opacity:.08,strokeLinecap:"round"}),t.jsx("path",{d:"M35 72Q38 76 40 72",stroke:"#D4A800",strokeWidth:"1",fill:"none",opacity:"0.2",strokeLinecap:"round"}),t.jsx("path",{d:"M40 72Q42 76 45 72",stroke:"#D4A800",strokeWidth:"1",fill:"none",opacity:"0.2",strokeLinecap:"round"}),t.jsx("path",{d:"M28 69Q30 74 33 70Q31 74 34 70Q33 74 36 69",stroke:"#E8A000",strokeWidth:"1.3",fill:"none",opacity:"0.5",strokeLinecap:"round"}),t.jsx("path",{d:"M44 69Q47 74 49 70Q48 74 50 70Q50 74 52 69",stroke:"#E8A000",strokeWidth:"1.3",fill:"none",opacity:"0.5",strokeLinecap:"round"}),t.jsx("path",{d:"M18 36Q15 40 18 44",stroke:"#8B6914",strokeWidth:"0.8",fill:"none",opacity:.25}),t.jsx("path",{d:"M62 36Q65 40 62 44",stroke:"#8B6914",strokeWidth:"0.8",fill:"none",opacity:.25}),t.jsx("path",{d:"M18 37Q16 40 18 43",stroke:"#2DD4BF",strokeWidth:"0.5",fill:"none",opacity:.08}),t.jsx("path",{d:"M62 37Q64 40 62 43",stroke:"#2DD4BF",strokeWidth:"0.5",fill:"none",opacity:.08}),t.jsx("g",{"data-owl":"props"}),t.jsx("g",{"data-owl":"wing-l",opacity:"0",transform:"translate(21, 59) scale(0)",filter:"url(#owl-wing-shadow)"}),t.jsxs("g",{"data-owl":"chat-bubble",opacity:"0",transform:"translate(50, 22) scale(0)",filter:"url(#owl-wing-shadow)",children:[t.jsx("path",{d:"M2 -4 L1 2 L9 -4 Z",fill:"#FFFFFF"}),t.jsx("rect",{x:"0",y:"-20",width:"27",height:"16",rx:"5",fill:"#FFFFFF",stroke:"#E5E7EB",strokeWidth:"0.6"}),t.jsx("line",{x1:"5",y1:"-14.5",x2:"21",y2:"-14.5",stroke:"#CBD5E1",strokeWidth:"2",strokeLinecap:"round"}),t.jsx("line",{x1:"5",y1:"-10",x2:"16",y2:"-10",stroke:"#CBD5E1",strokeWidth:"2",strokeLinecap:"round"})]}),t.jsx("circle",{"data-owl":"notif-dot",cx:"62",cy:"14",r:"5",fill:"#EF4444",stroke:"#FFFFFF",strokeWidth:"1.5",opacity:"0"})]})}function ue({size:r=24,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function pe({size:r=24,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),t.jsx("rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),t.jsx("rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),t.jsx("rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}function fe({size:r=18,className:i}){return t.jsxs("svg",{className:i,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),t.jsx("polyline",{points:"12 5 19 12 12 19"})]})}function xe({icon:r,size:i=24}){const s=Vt(r);return s?t.jsx(s,{size:i}):t.jsx(pe,{size:i})}const mt={"--es-color-surface":"#FFFFFF","--es-color-surface-elevated":"#F3F4F6","--es-color-surface-hover":"#E5E7EB","--es-color-on-surface":"#111827","--es-color-on-surface-muted":"#4B5563","--es-color-primary":"#8A6A1E","--es-color-on-primary":"#FFFFFF","--es-color-primary-muted":"rgba(120, 92, 26, 0.08)","--es-color-primary-on-muted":"#785C1A","--es-color-border":"#E5E7EB","--es-color-control-border":"#6B7280","--es-color-error":"#AD2C26","--es-color-success":"#00672B","--es-color-on-success":"#FFFFFF","--es-color-interactive":"#92400E","--es-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.1)","--es-shadow-md":"0 4px 12px rgba(0, 0, 0, 0.15)","--ai-bg":"#FFFFFF","--ai-bg-elevated":"#F9FAFB","--ai-bg-card":"#F3F4F6","--ai-bg-input":"#F9FAFB","--ai-bg-sidebar":"#F3F4F6","--ai-bg-footer":"#F9FAFB","--ai-fg":"#111827","--ai-fg-secondary":"#374151","--ai-muted":"#6B7280","--ai-muted-dim":"#9CA3AF","--ai-border":"#E5E7EB","--ai-border-subtle":"#F3F4F6","--ai-card":"#F3F4F6","--ai-accent":"#8A6A1E","--ai-accent-fg":"#FFFFFF","--ai-accent-hover":"#6F5518","--ai-accent-subtle":"rgba(130, 100, 28, 0.08)","--ai-accent-on-subtle":"#82641C","--ai-accent-on-subtle-strong":"#795D1A","--ai-accent-border":"#AA925B","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.12)","--ai-placeholder":"#9CA3AF","--ai-icon-muted":"#9CA3AF","--ai-scrollbar":"#D1D5DB","--ai-error":"#AD2C26","--ai-success":"#00672B","--ai-warning":"#9C5300","--ai-user-bubble":"#8A6A1E","--ai-user-bubble-fg":"#FFFFFF","--ai-assistant-bubble":"#F3F4F6","--ai-assistant-bubble-fg":"#111827","--ai-code-bg":"rgba(0, 0, 0, 0.05)"},ye=Object.fromEntries((It.options??[]).filter(r=>r.type==="color"&&typeof r.cssVariable=="string").map(r=>[r.cssVariable,String(r.default).trim().toLowerCase()]));function ge(r){if(!r)return mt;const i=Object.entries(r).filter(([d,e])=>{const f=ye[d];return f!==void 0&&String(e).trim().toLowerCase()!==f});if(i.length===0)return mt;const s={...mt};for(const[d]of i)delete s[d];return s}function be(r,i){const s=(O,l)=>{const _=r[O];return typeof _=="string"&&Rt(_)?_:l},d=i==="light"?{accent:"#8A6A1E",primary:"#8A6A1E",bg:"#FFFFFF",card:"#F3F4F6",elevated:"#F3F4F6"}:{accent:"#C9A84C",primary:"#C9A84C",bg:"#0F0F0F",card:"#161616",elevated:"#1A1A1A"},e={ai:["--ai-bg","--ai-bg-elevated","--ai-bg-card","--ai-bg-input","--ai-bg-sidebar","--ai-bg-footer"],es:["--es-color-surface","--es-color-surface-elevated","--es-color-surface-hover"]},f=i==="light"?{...mt}:{...It.cssVariables},S=(O,l)=>{const _=new Set([l]);for(const B of e[O]){const n=r[B]??f[B];typeof n=="string"&&Rt(n)&&_.add(n)}return[..._]},N=_t({accent:s("--ai-accent",d.accent),surface:S("ai",s("--ai-bg-card",d.card)),backdrop:s("--ai-bg",d.bg),tintAlpha:i==="light"?.08:.1,mode:i}),Z=_t({accent:s("--es-color-primary",d.primary),surface:S("es",s("--es-color-surface-elevated",d.elevated)),backdrop:s("--es-color-surface",d.bg),tintAlpha:i==="light"?.08:.1,mode:i});return{"--ai-accent-subtle":N.tint,"--ai-accent-on-subtle":N.onTint,"--ai-accent-on-subtle-strong":N.onStrongTint,"--ai-accent-border":N.boundary,"--es-color-primary-muted":Z.tint,"--es-color-primary-on-muted":Z.onTint}}function ke({brandName:r="GAIO",logoUrl:i,userName:s,headerQuote:d,headerQuoteAuthor:e,onFullscreenToggle:f,fullscreen:S,position:N="bottom-right",sidebarPosition:Z="right",initialOpen:O=!1,views:l=[],activeView:_="",onViewChange:B=()=>{},children:n=null,cssVariables:o,unreadCount:u=0,onSettingsClick:j,footerLabel:D,footerTitle:q,footerUpdated:C,footerDotCount:w=4,footerActiveDot:R=0,onFooterAction:I,version:y,t:a,colorScheme:h,builderMode:p=!1,owlIdleLife:L=!1,owlIdleLifeIntervalMs:v,onOpenChange:x,panelReadAloudControl:g}){const k=Pt(h),[A,M]=Q.useState(O||p),[b,$]=Q.useState(!1),z=ne(!0,{enabled:L&&!p&&!A,intervalMs:v}),F=Q.useRef(u);Q.useEffect(()=>{const P=F.current;F.current=u,u>P&&!A&&!p&&z.react("notification"),z.setNotifBadge(u>0)},[u,A,p]);const X=Q.useCallback(()=>{M(P=>{const Y=!P;return x?.(Y),Y})},[x]),T=Q.useCallback(()=>{M(!1),$(!1),x?.(!1)},[x]),K=Q.useCallback(()=>{$(P=>!P)},[]),E=N==="bottom-left",G=Q.useMemo(()=>{const P={...o??{},...k==="light"?ge(o):{}};return{...P,...be(P,k==="light"?"light":"dark"),...p?{width:"100%",height:"100%"}:{}}},[o,k,p]),nt=p?{position:"relative",bottom:"auto",right:"auto",left:"auto",width:"100%",height:"100%",maxHeight:"100%",borderRadius:0,opacity:1,transform:"none",pointerEvents:"auto",visibility:"visible"}:void 0,lt=["gaio-theme",k==="light"&&"gaio-theme--light",k==="dark"&&"gaio-theme--dark"].filter(Boolean).join(" ");return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:lt,style:G,children:[!p&&t.jsx("button",{type:"button",className:["gaio-theme__button",E&&"gaio-theme__button--left",A&&"gaio-theme__button--hidden"].filter(Boolean).join(" "),onClick:X,"aria-label":a?.("floating.open_widget")??"Open chat widget",tabIndex:A?-1:0,"aria-hidden":A,children:t.jsx(Ct,{size:54,svgRef:z.registerSvg})}),t.jsxs("div",{className:["gaio-theme__panel",E&&!p&&"gaio-theme__panel--left",(A||p)&&"gaio-theme__panel--open",b&&!p&&"gaio-theme__panel--expanded"].filter(Boolean).join(" "),style:nt,role:"dialog","aria-label":a?.("chat.widget_aria")??"Chat widget","aria-hidden":p?!1:!A,children:[t.jsxs("header",{className:"gaio-theme__header",children:[t.jsxs("div",{className:"gaio-theme__header-brand",children:[t.jsx("div",{className:"gaio-theme__header-owl",children:i?t.jsx("img",{className:"gaio-theme__header-logo",src:i,alt:""}):t.jsx(Ct,{size:40,svgRef:z.registerSvg})}),t.jsxs("div",{className:"gaio-theme__header-info",children:[t.jsx("h1",{className:"gaio-theme__brand-name",children:r}),t.jsx("p",{className:"gaio-theme__brand-tagline",children:a?.("header.brand_tagline")??"Your Guide AI Owl"}),s&&t.jsx("p",{className:"gaio-theme__brand-user",children:s})]})]}),d&&t.jsxs("div",{className:"gaio-theme__header-quote",children:[t.jsx("p",{className:"gaio-theme__header-quote-text",children:d}),e&&t.jsx("span",{className:"gaio-theme__header-quote-author",children:e})]}),t.jsxs("div",{className:"gaio-theme__header-actions",children:[g,f&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn",onClick:f,"aria-label":a?.(S?"header.exit_fullscreen":"header.enter_fullscreen")??(S?"Exit fullscreen":"Enter fullscreen"),children:t.jsx(Nt,{size:18})}),!p&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn gaio-theme__header-btn--expand",onClick:K,"aria-pressed":b,"aria-label":b?a?.("header.collapse")??"Collapse":a?.("header.expand")??"Expand",children:b?t.jsx(de,{size:18}):t.jsx(Nt,{size:18})}),!p&&t.jsx("button",{type:"button",className:"gaio-theme__header-btn",onClick:T,"aria-label":a?.("header.close_widget")??"Close widget",children:t.jsx(he,{size:20})})]})]}),t.jsxs("div",{className:["gaio-theme__body",Z==="left"&&"gaio-theme__body--sidebar-left",Z==="bottom"&&"gaio-theme__body--sidebar-bottom",Z==="hidden"&&"gaio-theme__body--sidebar-hidden"].filter(Boolean).join(" "),children:[t.jsx("main",{className:"gaio-theme__content",style:{containerName:"es-slot",containerType:"inline-size"},children:n}),t.jsxs("aside",{className:"gaio-theme__sidebar",role:"tablist","aria-label":a?.("nav.widget_aria")??"Widget navigation",children:[t.jsx("div",{className:"gaio-theme__sidebar-tabs",children:l.map(P=>{const Y=_===P.slug;return t.jsxs("button",{type:"button",role:"tab","aria-selected":Y,tabIndex:Y?0:-1,className:["gaio-theme__sidebar-tab",Y&&"gaio-theme__sidebar-tab--active"].filter(Boolean).join(" "),onClick:()=>B(P.slug),children:[P.slug==="chat"||P.icon==="owl"?t.jsx(Ct,{size:26,svgRef:z.registerSvg}):t.jsx(xe,{icon:P.icon,size:24}),t.jsx("span",{className:"gaio-theme__sidebar-tab-label",children:P.label})]},P.slug)})}),t.jsx("div",{className:"gaio-theme__sidebar-settings",children:t.jsx("button",{type:"button",className:"gaio-theme__sidebar-settings-btn","aria-label":a?.("menu.settings")??"Settings",onClick:j,children:t.jsx(ue,{size:20})})})]})]}),t.jsx("footer",{className:"gaio-theme__footer",children:t.jsxs("div",{className:"gaio-theme__footer-inner",children:[t.jsxs("div",{className:"gaio-theme__footer-text",children:[D?t.jsxs("div",{className:"gaio-theme__footer-fade",children:[t.jsxs("p",{className:"gaio-theme__footer-label",children:[D,w>0&&t.jsx("span",{className:"gaio-theme__footer-dots",children:Array.from({length:w}).map((P,Y)=>t.jsx("span",{className:`gaio-theme__footer-dot${Y===R?" gaio-theme__footer-dot--active":""}`},Y))})]}),q&&t.jsx("p",{className:"gaio-theme__footer-title",children:q})]}):"",C&&t.jsx("p",{className:"gaio-theme__footer-updated",children:C}),y&&t.jsxs("p",{className:"gaio-theme__footer-version",children:["v",y]})]}),I&&t.jsx("button",{type:"button",className:"gaio-theme__footer-action-btn",onClick:I,"aria-label":a?.("nav.go_to_section")??"Go to section",children:t.jsx(fe,{size:18})})]})})]})]}),t.jsx(ce,{owl:z})]})}function Ae({size:r=80,className:i}){return t.jsxs("svg",{width:r,height:r,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,"aria-hidden":"true",children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"owl-body",x1:"20",y1:"10",x2:"60",y2:"70",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:"0%",stopColor:"#D4B85C"}),t.jsx("stop",{offset:"50%",stopColor:"#C9A84C"}),t.jsx("stop",{offset:"100%",stopColor:"#A8893A"})]}),t.jsxs("linearGradient",{id:"owl-eye-l",cx:"0.5",cy:"0.3",r:"0.5",gradientUnits:"objectBoundingBox",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]}),t.jsxs("linearGradient",{id:"owl-eye-r",cx:"0.5",cy:"0.3",r:"0.5",gradientUnits:"objectBoundingBox",children:[t.jsx("stop",{offset:"0%",stopColor:"#5EEAD4"}),t.jsx("stop",{offset:"100%",stopColor:"#0D9488"})]})]}),t.jsx("ellipse",{cx:"40",cy:"44",rx:"22",ry:"26",fill:"url(#owl-body)"}),t.jsx("path",{d:"M22 22 L18 8 L28 18 Z",fill:"#C9A84C"}),t.jsx("path",{d:"M18 8 L20 14",stroke:"#3a3a3a",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("path",{d:"M58 22 L62 8 L52 18 Z",fill:"#C9A84C"}),t.jsx("path",{d:"M62 8 L60 14",stroke:"#3a3a3a",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("circle",{cx:"30",cy:"36",r:"10",fill:"#1a1a1a"}),t.jsx("circle",{cx:"50",cy:"36",r:"10",fill:"#1a1a1a"}),t.jsx("circle",{cx:"30",cy:"36",r:"8",fill:"url(#owl-eye-l)"}),t.jsx("circle",{cx:"50",cy:"36",r:"8",fill:"url(#owl-eye-r)"}),t.jsx("circle",{cx:"30",cy:"36",r:"4.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"50",cy:"36",r:"4.5",fill:"#0a0a0a"}),t.jsx("circle",{cx:"27",cy:"33",r:"2",fill:"white",opacity:"0.7"}),t.jsx("circle",{cx:"47",cy:"33",r:"2",fill:"white",opacity:"0.7"}),t.jsx("path",{d:"M37 44 L40 50 L43 44",fill:"#E8A000"}),t.jsx("circle",{cx:"22",cy:"42",r:"4",fill:"#E8A0A0",opacity:"0.15"}),t.jsx("circle",{cx:"58",cy:"42",r:"4",fill:"#E8A0A0",opacity:"0.15"}),t.jsx("ellipse",{cx:"40",cy:"56",rx:"10",ry:"8",fill:"#B8953F",opacity:"0.3"})]})}export{Ae as OwlIcon,ke as ThemeShell,It as manifest};
2
- //# sourceMappingURL=index-CnknkPUN-Yl3jEGAx.js.map
2
+ //# sourceMappingURL=index-CqSCG8MM-Yl3jEGAx.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as p,j as e,e as N}from"../nexly.js";import{S as k,I,L as M,$ as T,j as L,_ as E,k as z,m as D}from"./index.modern-CioVZ357-nfRNslCS.js";import"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";const R={slug:"event-map",name:"Event Map",version:"1.0.0",category:"interactive",requiredService:"event-scraper",configSchema:{properties:{zoom:{type:"number",default:12},showFilters:{type:"boolean",default:!0}}},defaultConfig:{zoom:12,showFilters:!0},dataContract:{serviceSlug:"event-scraper",inputSchema:{type:"object",properties:{events:{type:"array",items:{type:"object",properties:{id:{type:"string"},title:{type:"string"},date:{type:"string"},lat:{type:"number"},lng:{type:"number"},isFree:{type:"boolean"}}}},centerLat:{type:"number"},centerLng:{type:"number"}},required:["events"]},previewDataOverride:{events:[{id:"evt-1",title:"Tech Startup Networking Night",date:"2026-04-10T18:00:00Z",lat:37.4979,lng:127.0276,isFree:!0},{id:"evt-2",title:"AI & Machine Learning Summit",date:"2026-04-15T09:00:00Z",lat:37.5563,lng:126.9177,isFree:!1},{id:"evt-3",title:"Web3 Developer Workshop",date:"2026-04-20T14:00:00Z",lat:37.5145,lng:127.1059,isFree:!0}],centerLat:37.5665,centerLng:126.978}},fields:[{id:"zoom",type:"range",label:"Default zoom level",default:12,min:8,max:18,step:1,group:"Map"},{id:"showFilters",type:"toggle",label:"Show filter controls",default:!0,group:"Display"}],events:{emits:[{name:"eventMap:markerClicked",description:"User clicked on an event map marker"},{name:"eventMap:viewChanged",description:"Map viewport moved or zoomed"}],listens:[{name:"events:refresh",description:"Reload events and re-render markers"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function A(s,n){const d=new Date(s);return Number.isNaN(d.getTime())?s:new Intl.DateTimeFormat(n,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(d)}function W({events:s,selectedId:n,onSelect:d,useAdvanced:v,onPrimaryInk:r,onSuccessInk:g}){const c=T();return p.useEffect(()=>{if(!c||!n)return;const t=s.find(o=>o.id===n);t&&c.panTo({lat:t.lat,lng:t.lng})},[c,n,s]),v?e.jsx(e.Fragment,{children:s.map((t,o)=>{const u=t.id!=null&&t.id===n;return e.jsx(L,{position:{lat:t.lat,lng:t.lng},title:t.title,onClick:()=>d(t.id??null),children:e.jsx(E,{background:u?"var(--es-color-interactive, #2563EB)":t.isFree?"var(--es-color-success, #00672B)":"var(--es-color-primary, #2563EB)",borderColor:z,glyphColor:!u&&t.isFree?g:r,scale:u?1.25:1})},t.id??o)})}):e.jsx(e.Fragment,{children:s.map((t,o)=>e.jsx(D,{position:{lat:t.lat,lng:t.lng},title:t.title,onClick:()=>d(t.id??null)},t.id??o))})}const Z={id:"__builder_placeholder__",title:"Sample event location",lat:37.5665,lng:126.978};function q({data:s,actions:n,i18n:d,builderMode:v}){const r=d?.t??(a=>a),g=d?.currentLanguage??s.language??"en",[c,t]=p.useState(null),o=p.useRef(null),u=k(o,"--es-color-on-primary","#ffffff"),S=k(o,"--es-color-on-success","#ffffff"),b=s.events??[],j=s.googleMapsApiKey,y=s.googleMapsMapId??void 0,C=!!y,m=b.length,i=p.useMemo(()=>b.filter(a=>typeof a.lat=="number"&&typeof a.lng=="number"),[b]),l=c!=null?i.find(a=>a.id===c)??null:null,x=p.useCallback(a=>{if(t(a),a){const f=i.find(h=>h.id===a);f&&n.emit("events:eventSelected",{id:a,event:f}),n.emit("events:markerHighlight",{id:a})}else n.emit("events:markerHighlight",{id:null})},[n,i]);if(p.useEffect(()=>{const a=n.on("events:hover",f=>{const h=f?.id??null;h!=null&&i.some(w=>w.id===h)&&t(h)});return()=>a()},[n,i]),!j)return e.jsx(N,{blockType:"event-map",children:e.jsx("div",{className:"es-block__body",children:e.jsxs("div",{className:"es-map-placeholder",children:[e.jsx("div",{className:"es-map-placeholder__icon","aria-hidden":"true",children:"🗺"}),e.jsx("div",{className:"es-map-placeholder__message",children:r("event_map.no_key_message")}),m>0&&e.jsx("div",{className:"es-map-placeholder__count",children:r("event_map.events_available",{count:m})}),e.jsx("div",{className:"es-map-placeholder__hint",children:r("event_map.use_event_list_hint")})]})})});const _=v&&i.length===0?[Z]:i,F=_.length>0?{lat:_[0].lat,lng:_[0].lng}:{lat:37.5665,lng:126.978};return e.jsx(N,{blockType:"event-map",children:e.jsxs("div",{className:"es-block__body es-block__body--map",ref:o,children:[e.jsx(I,{apiKey:j,language:g,children:e.jsx(M,{className:"es-eventmap__canvas",defaultCenter:F,defaultZoom:_.length>0?12:10,mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,...y?{mapId:y}:{},children:e.jsx(W,{events:_,selectedId:c,onSelect:x,useAdvanced:C,onPrimaryInk:u,onSuccessInk:S})})}),!v&&m>0&&i.length===0&&e.jsxs("div",{className:"es-eventmap__no-coords-overlay",role:"note",children:[e.jsx("div",{className:"es-eventmap__no-coords-overlay__icon","aria-hidden":"true",children:"📍"}),e.jsx("div",{className:"es-eventmap__no-coords-overlay__message",children:r("event_map.no_coords_notice")}),e.jsx("div",{className:"es-eventmap__no-coords-overlay__count",children:r("event_map.events_no_coords",{count:m})})]}),!v&&i.length>0&&m>i.length&&e.jsxs("div",{className:"es-eventmap__no-coords-badge",role:"note",children:[e.jsx("span",{className:"es-eventmap__no-coords-badge__icon","aria-hidden":"true",children:"📍"}),e.jsx("span",{className:"es-eventmap__no-coords-badge__text",children:r("event_map.partial_no_coords_badge",{count:m-i.length})})]}),l&&e.jsxs("div",{className:"es-eventmap__detail",role:"dialog","aria-label":l.title,children:[e.jsx("button",{type:"button",className:"es-eventmap__detail-close",onClick:()=>x(null),"aria-label":r("event_map.close_details"),children:"×"}),e.jsxs("div",{className:"es-eventmap__detail-header",children:[e.jsx("h3",{className:"es-eventmap__detail-title",children:l.title}),l.isFree&&e.jsx("span",{className:"es-eventmap__detail-badge",children:r("event_list.free")})]}),e.jsxs("div",{className:"es-eventmap__detail-meta",children:[l.date&&e.jsxs("span",{className:"es-eventmap__detail-meta-item",children:[e.jsx("span",{"aria-hidden":"true",children:"🗓"}),A(l.date,g)]}),(l.address||l.location)&&e.jsxs("span",{className:"es-eventmap__detail-meta-item",children:[e.jsx("span",{"aria-hidden":"true",children:"📍"}),l.address||l.location]})]}),l.url&&e.jsxs("a",{href:l.url,className:"es-eventmap__detail-cta",target:"_blank",rel:"noopener noreferrer",children:[r("event_list.view_details")," →"]})]})]})})}export{q as Component,R as manifest};
2
- //# sourceMappingURL=index-CZCcZigQ-qH_mrcVT.js.map
2
+ //# sourceMappingURL=index-CzfX3ctc-qH_mrcVT.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as S,j as e,e as _,l as C}from"../nexly.js";const D={slug:"new-member-onboarding-tracker",name:"New Member Onboarding Tracker",version:"1.0.0",category:"interactive",requiredService:"new-member-onboarding-tracker",configSchema:{properties:{mode:{type:"string",default:"basic"},showStreak:{type:"boolean",default:!0}}},defaultConfig:{mode:"basic",showStreak:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"new-member-onboarding-tracker",inputSchema:{type:"object",properties:{steps:{type:"array",items:{type:"object",properties:{id:{type:"string"},label:{type:"string"},completed:{type:"boolean"},timeEstimate:{type:"string"}}}},completedCount:{type:"number"},totalCount:{type:"number"},daysSinceJoin:{type:"number"},aiMessage:{type:"string"},streak:{type:"number"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",daysSinceJoin:2,completedCount:2,totalCount:6,streak:3,aiMessage:"Great progress! Setting up your profile is key — it helps your upline and new contacts understand your focus area. Takes about 5 minutes.",steps:[{id:"1",label:"Watch welcome video",completed:!0,timeEstimate:"5 min"},{id:"2",label:"Complete your profile",completed:!0,timeEstimate:"10 min"},{id:"3",label:"Join the team chat group",completed:!1,timeEstimate:"2 min"},{id:"4",label:"Schedule your first 1-on-1 with upline",completed:!1,timeEstimate:"5 min"},{id:"5",label:"Place your first personal purchase",completed:!1,timeEstimate:"15 min"},{id:"6",label:"Share your first product post",completed:!1,timeEstimate:"10 min"}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — checklist + next action",value:"basic"},{label:"Pro — guided steps with AI coaching",value:"pro"}],group:"Display"},{id:"showStreak",type:"toggle",label:"Show streak counter (pro mode)",default:!0,group:"Display"}],events:{emits:[{name:"nmot:stepFocused",description:"User focused a step in pro mode"},{name:"nmot:stepCompleted",description:"User marked a step as done"}],listens:[{name:"nmot:refresh",description:"Force refresh onboarding step data"}]}};function J({data:t,config:b,actions:d,metadata:u,i18n:f}){const a=f?.t??(s=>s),r=b.mode??t.mode??"basic",v=b.showStreak??!0,n=t.steps??[],m=t.completedCount??n.filter(s=>s.completed).length,i=t.totalCount??n.length,g=t.daysSinceJoin??0,h=t.aiMessage,x=t.streak??0,[y,j]=S.useState(()=>n.find(s=>!s.completed)?.id??null);if(n.length===0&&!t.error)return e.jsx(_,{blockType:"new-member-onboarding-tracker",children:e.jsxs("div",{className:"es-block__body es-nmot__body",children:[e.jsx("div",{className:"es-nmot__header",children:e.jsx("div",{className:"es-nmot__day-badge",children:a("onboarding.day_badge",{n:1})})}),e.jsxs("div",{className:"es-nmot__progress-wrap",children:[e.jsxs("div",{className:"es-nmot__progress-label",children:[e.jsx("span",{children:u?.dataQuality==="none"?a("onboarding.signin_prompt"):a("onboarding.getting_started")}),e.jsx("span",{children:"0/0"})]}),e.jsx("div",{className:"es-nmot__progress-bar",role:"progressbar","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"es-nmot__progress-fill",style:{width:"0%"}})})]}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0"},children:u?.dataQuality==="none"?a("onboarding.signin_steps_hint"):a("onboarding.empty")})]})});if(t.error)return e.jsx(_,{blockType:"new-member-onboarding-tracker",error:C(t.error)});const c=i>0?Math.round(m/i*100):0,l=m>=i;n.find(s=>s.id===y);function N(s){r==="pro"&&(j(s.id),d.emit("nmot:stepFocused",{stepId:s.id}))}function k(s){d.call("completeStep",{stepId:s}).catch(()=>{}),d.emit("nmot:stepCompleted",{stepId:s});const p=n.find(o=>!o.completed&&o.id!==s);j(p?.id??null)}return e.jsx(_,{blockType:"new-member-onboarding-tracker",children:e.jsxs("div",{className:"es-block__body es-nmot__body",children:[e.jsxs("div",{className:"es-nmot__header",children:[e.jsx("div",{className:"es-nmot__day-badge",children:a("onboarding.day_badge",{n:g+1})}),r==="pro"&&v&&x>0&&e.jsxs("div",{className:"es-nmot__streak",children:[e.jsx("span",{className:"es-nmot__streak-icon","aria-hidden":"true",children:"🔥"}),e.jsx("span",{className:"es-nmot__streak-count",children:x}),e.jsx("span",{className:"es-nmot__streak-label",children:a("onboarding.day_streak")})]})]}),e.jsxs("div",{className:"es-nmot__progress-wrap",children:[e.jsxs("div",{className:"es-nmot__progress-label",children:[e.jsx("span",{children:a(l?"onboarding.complete":"onboarding.getting_started")}),e.jsxs("span",{children:[m,"/",i]})]}),e.jsx("div",{className:"es-nmot__progress-bar",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a("onboarding.progress_aria",{percent:c}),children:e.jsx("div",{className:`es-nmot__progress-fill${l?" es-nmot__progress-fill--done":""}`,style:{width:`${c}%`}})})]}),e.jsx("ul",{className:"es-nmot__steps",role:"list",children:n.map((s,p)=>{const o=r==="pro"&&s.id===y,w=["es-nmot__step",s.completed?"es-nmot__step--done":"",o?"es-nmot__step--active":""].filter(Boolean).join(" ");return e.jsxs("li",{className:w,children:[e.jsxs("button",{className:"es-nmot__step-row",onClick:()=>N(s),"aria-current":o?"step":void 0,disabled:r==="basic",children:[e.jsx("span",{className:"es-nmot__step-check","aria-hidden":"true",children:s.completed?"✓":e.jsx("span",{className:"es-nmot__step-num",children:p+1})}),e.jsx("span",{className:"es-nmot__step-label",children:s.label}),s.timeEstimate&&e.jsx("span",{className:"es-nmot__step-time",children:s.timeEstimate})]}),r==="pro"&&o&&!s.completed&&e.jsxs("div",{className:"es-nmot__step-detail",children:[h&&e.jsxs("div",{className:"es-nmot__ai-message",children:[e.jsx("span",{className:"es-nmot__ai-label",children:a("onboarding.ai_coach_label")}),e.jsx("p",{className:"es-nmot__ai-text",children:h})]}),e.jsx("button",{className:"es-nmot__complete-btn",onClick:()=>k(s.id),children:a("onboarding.mark_done")})]})]},s.id)})}),r==="basic"&&!l&&e.jsxs("div",{className:"es-nmot__next-prompt",children:[e.jsx("span",{className:"es-nmot__next-label",children:a("onboarding.next_up")}),e.jsx("span",{className:"es-nmot__next-text",children:n.find(s=>!s.completed)?.label??a("onboarding.all_steps_complete")})]}),l&&e.jsxs("div",{className:"es-nmot__done-banner",children:[e.jsx("span",{className:"es-nmot__done-icon","aria-hidden":"true",children:"🎉"}),e.jsx("span",{children:a("onboarding.done_banner",{n:g+1})})]})]})})}export{J as Component,D as manifest};
2
- //# sourceMappingURL=index-DsyaMk1k-DpMzyqHN.js.map
2
+ //# sourceMappingURL=index-DBhWCUM5-DpMzyqHN.js.map
@@ -1,4 +1,4 @@
1
- import{r as F,j as a,e as Z,k as oe}from"../nexly.js";import{C as He}from"./block-rating-CAVRRYuG-CQMNokIy.js";import{m as b}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";import{j as ve}from"./PanelInfoVideo-XFcVoL2c-qpxDXdLm.js";const Ve=se([["!","ǃⵑ"],[":","ː˸։׃܃܄ःઃ᛬᠃᠉⁚∶ꓽ꞉𑷙"],["<","˂ᐸᚲ‹❮𝈶"],["<<","≪"],["<<<","⋘"],["a","ɑαаᗅ⍶⍺ꓮꭺ𐊠𖽀"],["aa","ꜳ"],["ae","æӕ"],["ao","ꜵ"],["ar","🜇"],["au","ꜷ"],["c","¢ȼςϛсҫငၚᴄ₡ⲋⲥꓚꮯ𐊢𐌂𐐽𐔜𑣩𑣲🅮🝌"],["cc","🅭"],["d","ðđƌɖɗԁᑯᗞᗪ₫ꓒꓓꭰꮷ"],["e","ɇεеҽҿ℮⋿ⴹꓰꬲꭼ𐊆𑣆𑣎"],["g","ƍǥɠɡԍցᏻᶃꓖꮐ"],["h","ħɦнћңһӈӊհᏺᕼⱨⲏꓧꚕꮋꮒ𐋏𐓵"],["i","ıɨɩɪιіւᵻᵼ⍳⍸ⲓꙇꭵ𑣃"],["k","ƙκкқҟᛕ₭ⱪⲕꓗꝁꮶ𐔘"],["l","1|łƚǀɫɭӏ׀וןا١ٳ۱ߊᒪᛁ∣⏽│┃ⳑⵏꓡꓲꮮ𐊊𐌉𐌠𐑃𐔦𑣒𑷚𑷡𖻅𖼖𖼨𝈪𞣇"],["ll","ǁװ‖∥𐆙"],["lls","𐆘"],["lo","ю⏨"],["ls","ʪ"],["lt","₶"],["n","ŋƞɲɳηνղոռበᑎᵰ∩⋂ⲛꓠꓵ𐆎𐔓𝉅"],["o","0øɵθοσϭоѳөօסه٥ھہە۵ۿ߀०০੦૦ଠ୦௦ం౦ಂ೦ംഠ൦ං๐໐ဝ၀ჿዐ០ᴏᴑ⊖⊝⍬ⲑⲟⴱⵁⵔ〇ꓳꝋꬽꬾꭴꮎꮻ𐊒𐊫𐐬𐓪𐔖𑓐𑣈𑣕𑣗𑣠𑷠𝈚🜔"],["oe","œ"],["oo","∞ꚙꝏ"],["p","þƥƿρϸрᑭᵽ⍴ⲣⳏꓑꮲ𐊕𐓬"],["q","ʠԛգզⵕ"],["qe","🜀"],["r","ɍɼɽʀгғᖇᴦᵲⲅꓣꭇꭈꭱꮁꮢ𐓜𖼵𝈖"],["rn","mɱμϻмӎᗰᛖᵯ₥ⲙꓟꮇ𐊰𐌑𑜀𑣣"],["s","ƽʂѕտടᵴꓢꜱꮥꮪ𐊖𐑈𑣁𖼺"],["sss","🝜"],["t","ŧƭʈτтҭᵵ₮⊤⍡⟙ⱦⲧꓔꭲ𐊗𐊱𐌕𑣜𖼊🝨"],["ts","ʦ"],["u","ʉʋυџսሀᑌᴜᵾ∪⋃ꓴꞟꭎꭒꮜ𐓶𑣘𖽂"],["ue","ᵫ"],["uo","ꭣ"],["w","ɯшѡѽԝաᗯᴡ₩ⲽꓪꝡꮃꮗꮤ𑓅𑜊𑜎𑜏𑣦𑣯𝈢"]]),Ue=se([["h","Η"],["l","ƖƗΙІⲒ𑢣"]]),We=se([["c","Ϲ"]]),Be=new Set([..."˗۔⁃∸➖⨩⨪ⲲⲳⲺⲻ﬩~"]);function se(r){const t=new Map;for(const[e,o]of r)for(const i of o)t.set(i,e);return t}const we=7e3,pe=80;function xe(r){return r.length<=pe?r:`${r.slice(0,pe-1).trimEnd()}…`}function ie(r){if(typeof r!="string")return"";const t=r.replace(/\p{Cc}/gu," ").replace(/[\p{Cf}\p{Default_Ignorable_Code_Point}]/gu,"").replace(/\s+/g," ").trim();return t?xe(t):""}function Fe(r){return typeof r!="string"?"":ie(ce(r))}function v(r){return r.length<=we?r:`${r.slice(0,we-1).trimEnd()}…`}function S(r,t){return r==null?t("network_growth.gaio.a_member"):ie(ce(r))||t("network_growth.gaio.a_member")}function m(r){return xe(ce(r))}const fe={citizensWithRank:"network_growth.gaio.gap.citizens",binaryTreeRank:"network_growth.gaio.gap.binary",totalTreeVolume:"network_growth.gaio.gap.volume",personalPoints:"network_growth.gaio.gap.points",personalPurchase:"network_growth.gaio.gap.purchase"};function x(r,t){const e=r.next_target_rank?t("network_growth.gaio.leader",{rank:m(r.current_rank),next:m(r.next_target_rank)}):t("network_growth.gaio.leader_top",{rank:m(r.current_rank)}),o=r.binding_constraint;if(!o)return e;const i=t("network_growth.gaio.leader_gap",{gap:t(fe[o.type]),current:o.current,required:o.required});return`${e} ${i}`}function ye(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=[];return r.is_tree_branch_qualifier&&o.push(t("network_growth.gaio.flag_branch")),r.is_binary_qualifier&&o.push(t("network_growth.gaio.flag_binary")),r.paid_rank_decay_risk&&o.push(t("network_growth.gaio.flag_decay")),o.length===0?e:`${e} ${t("network_growth.gaio.cand_why",{reasons:o.join("; ")})}`}const V={defend_citizen:"network_growth.t2.reason.defend_citizen",promotes_to_citizen:"network_growth.t2.reason.promotes_to_citizen",existing_citizen:"network_growth.t2.reason.existing_citizen",complete_leg:"network_growth.t2.reason.complete_leg",reengage:"network_growth.t2.reason.reengage",grow_volume:"network_growth.t2.reason.grow_volume"};function Ye(r,t,e,o){switch(r){case"defend_citizen":return o(V.defend_citizen,{rank:m(t.citizen_rank_type??e),payout_rank:m(t.payout_rank??"")});case"promotes_to_citizen":return o(V.promotes_to_citizen,{rank:m(t.citizen_rank_type??""),count:t.citizens_gap??0});case"existing_citizen":return o(V.existing_citizen,{rank:m(t.rank??e)});case"complete_leg":return o(V.complete_leg,{leg:o(`network_growth.leg.${t.leg??"balanced"}`)});case"reengage":return o(V.reengage);default:return o(V.grow_volume)}}function je(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=Ye(r.reason_code,r.reason_params,r.current_rank,t);return`${e} ${t("network_growth.gaio.cand_why",{reasons:o})}`}function Qe(r,t){const e=r.recommendations;if(e.length===0)return v(x(r.leader,t));const o=e.map((i,l)=>`${l+1}. ${i.title}. ${i.detail}`);return v(`${x(r.leader,t)}
1
+ import{r as F,j as a,e as Z,k as oe}from"../nexly.js";import{C as He}from"./block-rating-uD_0LK-1-CQMNokIy.js";import{m as b}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";import{j as ve}from"./PanelInfoVideo-Di7qwhV_-qpxDXdLm.js";const Ve=se([["!","ǃⵑ"],[":","ː˸։׃܃܄ःઃ᛬᠃᠉⁚∶ꓽ꞉𑷙"],["<","˂ᐸᚲ‹❮𝈶"],["<<","≪"],["<<<","⋘"],["a","ɑαаᗅ⍶⍺ꓮꭺ𐊠𖽀"],["aa","ꜳ"],["ae","æӕ"],["ao","ꜵ"],["ar","🜇"],["au","ꜷ"],["c","¢ȼςϛсҫငၚᴄ₡ⲋⲥꓚꮯ𐊢𐌂𐐽𐔜𑣩𑣲🅮🝌"],["cc","🅭"],["d","ðđƌɖɗԁᑯᗞᗪ₫ꓒꓓꭰꮷ"],["e","ɇεеҽҿ℮⋿ⴹꓰꬲꭼ𐊆𑣆𑣎"],["g","ƍǥɠɡԍցᏻᶃꓖꮐ"],["h","ħɦнћңһӈӊհᏺᕼⱨⲏꓧꚕꮋꮒ𐋏𐓵"],["i","ıɨɩɪιіւᵻᵼ⍳⍸ⲓꙇꭵ𑣃"],["k","ƙκкқҟᛕ₭ⱪⲕꓗꝁꮶ𐔘"],["l","1|łƚǀɫɭӏ׀וןا١ٳ۱ߊᒪᛁ∣⏽│┃ⳑⵏꓡꓲꮮ𐊊𐌉𐌠𐑃𐔦𑣒𑷚𑷡𖻅𖼖𖼨𝈪𞣇"],["ll","ǁװ‖∥𐆙"],["lls","𐆘"],["lo","ю⏨"],["ls","ʪ"],["lt","₶"],["n","ŋƞɲɳηνղոռበᑎᵰ∩⋂ⲛꓠꓵ𐆎𐔓𝉅"],["o","0øɵθοσϭоѳөօסه٥ھہە۵ۿ߀०০੦૦ଠ୦௦ం౦ಂ೦ംഠ൦ං๐໐ဝ၀ჿዐ០ᴏᴑ⊖⊝⍬ⲑⲟⴱⵁⵔ〇ꓳꝋꬽꬾꭴꮎꮻ𐊒𐊫𐐬𐓪𐔖𑓐𑣈𑣕𑣗𑣠𑷠𝈚🜔"],["oe","œ"],["oo","∞ꚙꝏ"],["p","þƥƿρϸрᑭᵽ⍴ⲣⳏꓑꮲ𐊕𐓬"],["q","ʠԛգզⵕ"],["qe","🜀"],["r","ɍɼɽʀгғᖇᴦᵲⲅꓣꭇꭈꭱꮁꮢ𐓜𖼵𝈖"],["rn","mɱμϻмӎᗰᛖᵯ₥ⲙꓟꮇ𐊰𐌑𑜀𑣣"],["s","ƽʂѕտടᵴꓢꜱꮥꮪ𐊖𐑈𑣁𖼺"],["sss","🝜"],["t","ŧƭʈτтҭᵵ₮⊤⍡⟙ⱦⲧꓔꭲ𐊗𐊱𐌕𑣜𖼊🝨"],["ts","ʦ"],["u","ʉʋυџսሀᑌᴜᵾ∪⋃ꓴꞟꭎꭒꮜ𐓶𑣘𖽂"],["ue","ᵫ"],["uo","ꭣ"],["w","ɯшѡѽԝաᗯᴡ₩ⲽꓪꝡꮃꮗꮤ𑓅𑜊𑜎𑜏𑣦𑣯𝈢"]]),Ue=se([["h","Η"],["l","ƖƗΙІⲒ𑢣"]]),We=se([["c","Ϲ"]]),Be=new Set([..."˗۔⁃∸➖⨩⨪ⲲⲳⲺⲻ﬩~"]);function se(r){const t=new Map;for(const[e,o]of r)for(const i of o)t.set(i,e);return t}const we=7e3,pe=80;function xe(r){return r.length<=pe?r:`${r.slice(0,pe-1).trimEnd()}…`}function ie(r){if(typeof r!="string")return"";const t=r.replace(/\p{Cc}/gu," ").replace(/[\p{Cf}\p{Default_Ignorable_Code_Point}]/gu,"").replace(/\s+/g," ").trim();return t?xe(t):""}function Fe(r){return typeof r!="string"?"":ie(ce(r))}function v(r){return r.length<=we?r:`${r.slice(0,we-1).trimEnd()}…`}function S(r,t){return r==null?t("network_growth.gaio.a_member"):ie(ce(r))||t("network_growth.gaio.a_member")}function m(r){return xe(ce(r))}const fe={citizensWithRank:"network_growth.gaio.gap.citizens",binaryTreeRank:"network_growth.gaio.gap.binary",totalTreeVolume:"network_growth.gaio.gap.volume",personalPoints:"network_growth.gaio.gap.points",personalPurchase:"network_growth.gaio.gap.purchase"};function x(r,t){const e=r.next_target_rank?t("network_growth.gaio.leader",{rank:m(r.current_rank),next:m(r.next_target_rank)}):t("network_growth.gaio.leader_top",{rank:m(r.current_rank)}),o=r.binding_constraint;if(!o)return e;const i=t("network_growth.gaio.leader_gap",{gap:t(fe[o.type]),current:o.current,required:o.required});return`${e} ${i}`}function ye(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=[];return r.is_tree_branch_qualifier&&o.push(t("network_growth.gaio.flag_branch")),r.is_binary_qualifier&&o.push(t("network_growth.gaio.flag_binary")),r.paid_rank_decay_risk&&o.push(t("network_growth.gaio.flag_decay")),o.length===0?e:`${e} ${t("network_growth.gaio.cand_why",{reasons:o.join("; ")})}`}const V={defend_citizen:"network_growth.t2.reason.defend_citizen",promotes_to_citizen:"network_growth.t2.reason.promotes_to_citizen",existing_citizen:"network_growth.t2.reason.existing_citizen",complete_leg:"network_growth.t2.reason.complete_leg",reengage:"network_growth.t2.reason.reengage",grow_volume:"network_growth.t2.reason.grow_volume"};function Ye(r,t,e,o){switch(r){case"defend_citizen":return o(V.defend_citizen,{rank:m(t.citizen_rank_type??e),payout_rank:m(t.payout_rank??"")});case"promotes_to_citizen":return o(V.promotes_to_citizen,{rank:m(t.citizen_rank_type??""),count:t.citizens_gap??0});case"existing_citizen":return o(V.existing_citizen,{rank:m(t.rank??e)});case"complete_leg":return o(V.complete_leg,{leg:o(`network_growth.leg.${t.leg??"balanced"}`)});case"reengage":return o(V.reengage);default:return o(V.grow_volume)}}function je(r,t){const e=r.next_rank?t("network_growth.gaio.cand_path",{name:S(r.display_name,t),rank:m(r.current_rank),next:m(r.next_rank)}):t("network_growth.gaio.cand_path_max",{name:S(r.display_name,t),rank:m(r.current_rank)}),o=Ye(r.reason_code,r.reason_params,r.current_rank,t);return`${e} ${t("network_growth.gaio.cand_why",{reasons:o})}`}function Qe(r,t){const e=r.recommendations;if(e.length===0)return v(x(r.leader,t));const o=e.map((i,l)=>`${l+1}. ${i.title}. ${i.detail}`);return v(`${x(r.leader,t)}
2
2
 
3
3
  ${t("network_growth.gaio.support_list")}
4
4
  ${o.join(`
@@ -47,4 +47,4 @@ ${i.join(`
47
47
  ${k}`,autoSend:!1,quickChips:G??[{label:n("network_growth.chip.approach"),message:n("network_growth.chip.approach_msg"),autoSend:!0},{label:n("network_growth.chip.message"),message:n("network_growth.chip.message_msg"),autoSend:!0},{label:n("network_growth.chip.why"),message:n("network_growth.chip.why_msg"),autoSend:!0},{label:n("network_growth.chip.other"),message:"",autoSend:!1}]})},[t,n]),C=F.useCallback(s=>{const k=$e(s,n);if(k===null||!g)return;const G=dt[s.key],H=G?.(g,n);t.emit("chat:draft",{message:H?`${k}
48
48
 
49
49
  ${H}`:k,autoSend:!0})},[t,n,g]),L=F.useCallback((s,k)=>{f(s,k,[{label:n("network_growth.chip.plan_first"),message:n("network_growth.chip.plan_first_msg"),autoSend:!0},{label:n("network_growth.chip.plan_fastest"),message:n("network_growth.chip.plan_fastest_msg"),autoSend:!0},{label:n("network_growth.chip.other"),message:"",autoSend:!1}])},[f,n]);if(!g||g.contract_version!=="2.0"&&g.contract_version!=="3.0"){if(r.error)return a.jsx(Z,{blockType:"network-growth",children:a.jsx("div",{className:"ng2",children:a.jsx("p",{className:"ng2__error",children:n("network_growth.error")})})});const s=e?.dataQuality,k=s!=="none"&&!!r&&Object.keys(r).some(Ge=>!Ge.startsWith("_"));let G="🌱",H=n("network_growth.empty.loading");return s==="none"?H=n("network_growth.empty.sign_in"):k&&(G="🔄",H=n("network_growth.empty.stale")),a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:"ng2 ng2--empty",children:[a.jsx("div",{className:"ng2__empty-icon","aria-hidden":"true",children:G}),a.jsx("p",{className:"ng2__empty-text",children:H})]})})}const{leader:h,tiles:I,recommendations:j,context_size:Q,digest_v3:z}=g,{cascade_potential:w,at_risk:p,binary_placement:c,structure_summary:u,earning_levers:q}=I;if(z)return a.jsx(Ot,{out:g,digestV3:z,t:n,hasChatView:y,handleTalkToGaio:f,handleAskGaio:C,handlePlanWithGaio:L,sectionRating:N,actions:t,baseUrl:l,apiKey:i?.apiKey});const T=n("network_growth.a11y.expand"),P=n("network_growth.a11y.collapse"),ee=n("network_growth.talk_to_gaio"),O=(s,k)=>({text:n(`network_growth.${s}.help`),ariaLabel:n("network_growth.help_aria",{title:n(k)})}),U=(s,k)=>s?.title?.trim()||k,W=(s,k)=>s?.teaser?.trim()||k,te=s=>le(s,n),Ee=s=>s.cascade_reason_code?Se(s.cascade_reason_code,s.cascade_reason_params??{},s.current_rank,n):s.cascade_reason,D=(s,k)=>y?{label:ee,onClick:()=>f(s,k)}:void 0,_e=j[0],Te=_e?_e.teaser:n("network_growth.t3.empty_teaser"),ge=h.path_to_next_rank??[],A=b(h.mode==="defend"?h.defend_target_rank??h.current_rank:h.next_target_rank??h.current_rank,n),re=h.mode==="defend"?n("network_growth.tpath.move_title_defend",{rank:A}):n("network_growth.tpath.move_title_advance",{rank:A}),B=h.binding_constraint??ge.find(s=>!s.met)??null,de=B?h.mode==="defend"?n("network_growth.tpath.move_advice_defend",{rank:A,dimension:n(St[B.type])}):n(`network_growth.tpath.move_advice.${B.type}`,{rank:A,gap:E(Math.max(0,B.required-B.current))}):n("network_growth.tpath.move_all_met",{rank:A}),Pe=h.mode==="defend"?n("network_growth.tpath.move_intro_defend",{rank:A}):n("network_growth.tpath.move_intro_advance",{rank:A}),Re=h.mode==="defend"?n("network_growth.tpath.move_cta_defend",{rank:A}):n("network_growth.tpath.move_cta_advance",{rank:A}),Me=w.cascade_candidates.length>0?n("network_growth.t2.teaser",{count:w.cascade_candidates.length}):n("network_growth.t2.teaser_empty"),Ie=p.re_activatable_count>0?n("network_growth.t4.teaser_reactivatable",{count:p.members.length,reactivatable:p.re_activatable_count}):n("network_growth.t4.teaser",{count:p.members.length}),Oe=n("network_growth.t7.teaser",{count:c.imbalanced_members.length,usd:E(c.estimated_total_weekly_usd_lost)}),De=n("network_growth.t8.teaser",{active:u.active_purchasing_count_30d,paid:u.active_paid_rank_count}),Ke=n("network_growth.t6.teaser",{count:q.scp2_active_members.length,levels:q.scp2_levels_unlocked}),he=c.top5_by_cycle_loss.length>0?c.top5_by_cycle_loss:c.imbalanced_members,K=u.team_binary_force,R=u.structure_expansion_gap;return a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:`ng2 ng2--${Q}`,children:[a.jsx("div",{className:"ng2__icon-row",children:a.jsx(ve,{panelKey:"network-growth",baseUrl:l,apiKey:i?.apiKey,t:n})}),h.grace_period_ranks.length>0&&a.jsxs("div",{className:"ng2__grace",role:"alert",children:[a.jsx("span",{"aria-hidden":"true",children:"⚠️"}),a.jsx("span",{children:n("network_growth.grace_banner",{rank:h.grace_period_ranks[0]?b(h.grace_period_ranks[0],n):""})})]}),ge.length>0&&a.jsxs(M,{id:"path",title:re,teaser:de,defaultOpen:!0,expandLabel:T,collapseLabel:P,help:{text:n("network_growth.tpath.move_help"),ariaLabel:n("network_growth.help_aria",{title:re})},gaio:y?{label:Re,onClick:()=>f(re,at(g,n))}:void 0,rating:N("path"),children:[a.jsx("p",{className:"ng-path-intro",children:Pe}),a.jsx("p",{className:"ng-path-advice",children:de})]}),a.jsx(M,{id:"support",title:n("network_growth.t3.title"),teaser:Te,defaultOpen:!0,expandLabel:T,collapseLabel:P,help:O("t3","network_growth.t3.title"),gaio:j.length>0?void 0:D(n("network_growth.t3.title"),Qe(g,n)),rating:N("support"),children:j.length===0?a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t3.empty")}):a.jsx("ul",{className:"ng-rec-list",children:j.map(s=>a.jsxs("li",{className:"ng-rec",children:[a.jsxs("div",{className:"ng-rec__head",children:[a.jsx("span",{className:`ng-badge ng-badge--${s.tier.toLowerCase()}`,children:n(Tt[s.tier])}),a.jsx("span",{className:"ng-rec__title",children:s.title})]}),a.jsx("p",{className:"ng-rec__detail",children:s.detail}),y&&a.jsx(Y,{label:ee,onClick:()=>f(s.title,Ne(g,s,n))})]},s.id))})}),w.visible&&a.jsxs(M,{id:"cascade",title:U(w.narrative,n("network_growth.t2.title")),teaser:W(w.narrative,Me),narrativeDetail:w.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t2","network_growth.t2.title"),gaio:w.cascade_candidates.length>0?void 0:D(n("network_growth.t2.title"),Xe(g,n)),rating:N("cascade"),children:[a.jsx(be,{binary:w.binary_qualification_gap,branch:w.tree_branch_coverage,t:n}),w.rank_elevation_candidates_count>0&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t2.elevation",{count:w.rank_elevation_candidates_count,high:w.high_cascade_count})}),w.cascade_candidates.length===0?a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t2.empty")}):a.jsx("ul",{className:"ng-cand-list",children:w.cascade_candidates.map(s=>a.jsxs("li",{className:`ng-cand${s.is_defend_priority?" ng-cand--defend":""}`,children:[a.jsx("div",{className:"ng-cand__top",children:a.jsx("span",{className:"ng-cand__name",children:$(s.display_name,s.user_id)})}),a.jsxs("div",{className:"ng-cand__rank",children:[b(s.current_rank,n),s.next_rank?` → ${b(s.next_rank,n)}`:""]}),(s.is_binary_qualifier||s.is_tree_branch_qualifier||s.paid_rank_decay_risk)&&a.jsxs("div",{className:"ng-cand__chips",children:[s.is_binary_qualifier&&a.jsx("span",{className:"ng-chip ng-chip--qualifier",children:n("network_growth.t2.chip.binary_qualifier")}),s.is_tree_branch_qualifier&&a.jsx("span",{className:"ng-chip ng-chip--qualifier",children:n("network_growth.t2.chip.branch_qualifier")}),s.paid_rank_decay_risk&&a.jsx("span",{className:"ng-chip ng-chip--decay",children:n("network_growth.t2.chip.decay_risk")})]}),a.jsx("p",{className:"ng-cand__reason",children:Ee(s)}),y&&a.jsx(Y,{label:ee,onClick:()=>f(n("network_growth.t2.gaio_headline",{name:$(s.display_name,s.user_id)}),Je(g,s,n))})]},s.user_id))}),w.aggregated_stats&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t2.aggregate",{active:w.aggregated_stats.active_count,total:w.total_members})})]}),p.visible&&p.members.length>0&&a.jsxs(M,{id:"atrisk",title:U(p.narrative,n("network_growth.t4.title")),teaser:W(p.narrative,Ie),narrativeDetail:p.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t4","network_growth.t4.title"),gaio:D(n("network_growth.t4.title"),Ze(g,n)),rating:N("atrisk"),children:[(p.paid_rank_expiry_warnings>0||p.weekly_points_lost_to_dormancy>0)&&a.jsxs("div",{className:"ng-atrisk-summary",children:[p.paid_rank_expiry_warnings>0&&a.jsx("span",{className:"ng-chip ng-chip--urgent",children:n("network_growth.t4.expiry_warning",{count:p.paid_rank_expiry_warnings})}),p.weekly_points_lost_to_dormancy>0&&a.jsx("span",{className:"ng-atrisk-summary__lost",children:n("network_growth.t4.points_lost",{points:p.weekly_points_lost_to_dormancy})})]}),a.jsx("ul",{className:"ng-risk-list",children:p.members.map(s=>a.jsxs("li",{className:`ng-risk ng-risk--${Et[s.severity]}`,children:[a.jsx("span",{className:"ng-risk__dot","aria-hidden":"true"}),a.jsxs("div",{className:"ng-risk__info",children:[a.jsx("span",{className:"ng-risk__name",children:$(s.display_name,s.user_id)}),a.jsx("span",{className:"ng-risk__signal",children:n(`network_growth.signal.${s.signal.toLowerCase()}`)}),s.is_reactivatable&&s.paid_rank_grace_expires_in_days!==null&&a.jsx("span",{className:"ng-risk__grace",children:n("network_growth.t4.grace_expires",{days:s.paid_rank_grace_expires_in_days})})]}),a.jsxs("span",{className:"ng-risk__tags",children:[s.is_reactivatable&&a.jsx("span",{className:"ng-chip ng-chip--reactivate",children:n("network_growth.t4.reactivatable_badge")}),s.is_counted_citizen&&a.jsx("span",{className:"ng-risk__flag",children:n("network_growth.t4.counts")})]})]},s.user_id))})]}),c.visible&&he.length>0&&a.jsxs(M,{id:"placement",title:U(c.narrative,n("network_growth.t7.title")),teaser:W(c.narrative,Oe),narrativeDetail:c.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t7","network_growth.t7.title"),gaio:D(n("network_growth.t7.title"),et(g,n)),rating:N("placement"),children:[a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t7.totals",{watch:c.imbalanced_count_watch,critical:c.imbalanced_count_critical})}),c.auto_placement_risk.flagged&&a.jsx("div",{className:"ng-placement-warn",role:"note",children:n("network_growth.t7.autoplace_warning",{side:te(c.auto_placement_risk.dominant_leg??"none")})}),a.jsx("ul",{className:"ng-cand-list",children:he.map(s=>a.jsxs("li",{className:`ng-place ng-place--${s.severity}`,children:[a.jsxs("div",{className:"ng-cand__top",children:[a.jsx("span",{className:"ng-cand__name",children:$(s.display_name,s.user_id)}),a.jsx("span",{className:`ng-chip ng-chip--sev-${s.severity}`,children:n(`network_growth.t7.severity.${s.severity}`)})]}),a.jsx("div",{className:"ng-cand__rank",children:n("network_growth.t7.member_ratio",{ratio:ke(s.generation_ratio),side:te(s.dominant_side)})}),s.cycles_lost_lifetime_estimate>0&&a.jsx("p",{className:"ng-cand__reason",children:n("network_growth.t7.member_loss",{cycles:s.cycles_lost_lifetime_estimate,usd:E(s.usd_lost_lifetime_upper_bound)})})]},s.user_id))}),a.jsx("p",{className:"ng-disclaimer",children:n("network_growth.t7.estimate_disclaimer")})]}),a.jsxs(M,{id:"structure",title:U(u.narrative,n("network_growth.t8.title")),teaser:W(u.narrative,De),narrativeDetail:u.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t8","network_growth.t8.title"),gaio:D(n("network_growth.t8.title"),tt(g,n)),rating:N("structure"),children:[a.jsxs("div",{className:"ng-stats",children:[a.jsx(J,{value:E(u.active_purchasing_count_30d),label:n("network_growth.t8.active_buyers")}),a.jsx(J,{value:E(u.builders_count),label:n("network_growth.t8.builders")}),a.jsx(J,{value:E(u.active_paid_rank_count),label:n("network_growth.t8.active_paid")}),a.jsx(J,{value:E(u.reactivatable_paid_rank_count),label:n("network_growth.t8.reactivatable_paid")})]}),a.jsxs("div",{className:`ng-binforce ng-binforce--${K.balance_status}`,children:[a.jsx("span",{className:"ng-binforce__dot","aria-hidden":"true"}),a.jsx("span",{children:K.dominant_side==="balanced"?n("network_growth.t8.binary_force_balanced",{status:n(`network_growth.t8.balance.${K.balance_status}`)}):n("network_growth.t8.binary_force",{ratio:ke(K.ratio),side:te(K.dominant_side),status:n(`network_growth.t8.balance.${K.balance_status}`)})})]}),R&&a.jsxs("div",{className:"ng-expansion",children:[a.jsx("div",{className:"ng-expansion__title",children:n("network_growth.t8.expansion_title",{rank:b(R.next_normal_rank_target,n)})}),a.jsx(be,{binary:R.binary_gap,branch:R.tree_branch_gap,t:n}),a.jsx("p",{className:"ng-aggregate",children:R.scp2_uncovered_levels>0?n("network_growth.t8.scp2_uncovered",{levels:R.scp2_uncovered_levels,cycles:R.scp2_cycles_per_month_locked}):n("network_growth.t8.scp2_covered")})]})]}),q.visible&&a.jsxs(M,{id:"levers",title:U(q.narrative,n("network_growth.t6.title")),teaser:W(q.narrative,Ke),narrativeDetail:q.narrative?.detail,expandLabel:T,collapseLabel:P,help:O("t6","network_growth.t6.title"),gaio:D(n("network_growth.t6.title"),rt(g,n)),rating:N("levers"),children:[q.scp2_active_members.length>0?a.jsx("ul",{className:"ng-lever-list",children:q.scp2_active_members.map(s=>a.jsxs("li",{className:"ng-lever",children:[a.jsx("span",{className:"ng-lever__name",children:$(s.display_name,s.user_id)}),a.jsxs("span",{className:"ng-lever__meta",children:[n("network_growth.t6.level",{level:s.position})," · ",Ae(s.team_sales)]})]},s.user_id))}):a.jsx("p",{className:"ng-empty-note",children:n("network_growth.t6.empty")}),q.scp3_direct_referrals.length>0&&a.jsx("p",{className:"ng-aggregate",children:n("network_growth.t6.referrals",{count:q.scp3_direct_referrals.length})})]})]})})}function Ot({out:r,digestV3:t,t:e,hasChatView:o,handleTalkToGaio:i,handleAskGaio:l,handlePlanWithGaio:d,sectionRating:_,actions:n,baseUrl:y,apiKey:N}){const{leader:g,context_mode:f,recommendations:C}=r,L=f.is_onboarding,h=L?"onboarding":g.mode,I=L?e("network_growth.v4.hero.onboarding_headline"):h==="defend"?e("network_growth.v4.hero.defend_headline",{rank:b(g.defend_target_rank??g.current_rank,e)}):e("network_growth.v4.hero.advance_headline",{rank:b(g.next_target_rank??g.current_rank,e)}),j=e(L?"network_growth.v4.hero.cta_onboarding":h==="defend"?"network_growth.v4.hero.cta_defend":"network_growth.v4.hero.cta_advance"),Q=L?It(f.member_count,f.has_binary_data,f.leader_has_paid_rank,e):null,z=c=>t.suggested_questions.filter(u=>u.section===c).slice(0,2),w=t.top_candidates.filter(c=>!C.some(u=>u.target_member?.user_id===c.user_id)),p=r.tiles.at_risk.members.find(c=>c.is_reactivatable&&c.has_active_substructure);return a.jsx(Z,{blockType:"network-growth",children:a.jsxs("div",{className:`ng4 ng4--${h}`,children:[a.jsx("div",{className:"ng4__icon-row",children:a.jsx(ve,{panelKey:"network-growth",baseUrl:y,apiKey:N,t:e})}),a.jsxs("section",{className:`ng4-hero ng4-hero--${h}`,children:[a.jsx("p",{className:"ng4-hero__headline",children:I}),r.hero_reason&&a.jsx("p",{className:"ng4-hero__reason",children:r.hero_reason}),Q&&a.jsx("ol",{className:"ng4-hero__milestones",children:Q.map((c,u)=>a.jsxs("li",{className:`ng4-hero__milestone${c.done?" ng4-hero__milestone--done":""}`,children:[a.jsx("span",{className:"ng4-hero__milestone-dot","aria-hidden":"true"}),c.label]},u))}),o&&a.jsxs("button",{type:"button",className:"ng4-hero__cta",onClick:()=>d(j,ot(r,e)),children:[a.jsx(oe,{size:16,className:"ng4-hero__cta-owl"}),j]}),_("hero")]}),t.insights.length>0&&a.jsxs("section",{className:"ng4-section ng4-insights",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.insights.title")}),a.jsx("ul",{className:"ng4-insight-list",children:t.insights.map((c,u)=>a.jsx("li",{className:`ng4-insight ng4-insight--${c.severity}`,children:Mt(c,e)},u))}),o&&a.jsx(X,{questions:z("branches").concat(z("structure"),z("overview")).slice(0,2),onAsk:l,t:e}),_("insights")]}),t.hidden_leaders.length>0&&a.jsxs("section",{className:"ng4-section ng4-hidden",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.hidden.title")}),a.jsx("ul",{className:"ng4-hidden-list",children:t.hidden_leaders.map(c=>a.jsxs("li",{className:"ng4-hidden-row",children:[a.jsxs("div",{className:"ng4-hidden-row__info",children:[a.jsx("span",{className:"ng4-hidden-row__name",children:$(c.display_name,c.user_id)}),a.jsx("span",{className:"ng4-hidden-row__meta",children:b(c.rank,e)}),a.jsxs("span",{className:"ng4-hidden-row__caption",children:[c.team_sales>0&&a.jsxs(a.Fragment,{children:[e("network_growth.v4.hidden.team_sales",{sales:Ae(c.team_sales)})," · "]}),e("network_growth.t6.level",{level:c.height})]})]}),o&&a.jsx("button",{type:"button",className:"ng4-hidden-row__cta",onClick:()=>i(e("network_growth.v4.hidden.topic",{name:$(c.display_name,c.user_id)}),it(r,c,e)),children:e("network_growth.v4.hidden.cta")})]},c.user_id))}),o&&a.jsx(X,{questions:z("hidden_leaders"),onAsk:l,t:e}),_("hidden_leaders")]}),a.jsxs("section",{className:"ng4-section ng4-coach",children:[a.jsx("h3",{className:"ng4-section__title",children:e("network_growth.v4.coach.title")}),C.length===0&&w.length===0?a.jsx("p",{className:"ng-empty-note",children:e("network_growth.t3.empty")}):a.jsxs("ul",{className:"ng4-coach-list",children:[C.map(c=>a.jsxs("li",{className:"ng4-coach-item",children:[a.jsx("p",{className:"ng4-coach-item__reason",children:c.detail}),o&&a.jsx(Y,{label:e("network_growth.v4.coach.cta"),onClick:()=>i(c.title,Ne(r,c,e))})]},c.id)),w.map(c=>a.jsxs("li",{className:"ng4-coach-item",children:[a.jsx("span",{className:"ng4-coach-item__name",children:$(c.display_name,c.user_id)}),a.jsx("p",{className:"ng4-coach-item__reason",children:r.candidate_notes?.[c.user_id]??Se(c.reason_code,c.reason_params??{},c.current_rank,e)}),o&&a.jsx(Y,{label:e("network_growth.v4.coach.cta"),onClick:()=>i(e("network_growth.t2.gaio_headline",{name:$(c.display_name,c.user_id)}),nt(r,c,e))})]},c.user_id))]}),o&&a.jsx(X,{questions:z("cascade"),onAsk:l,t:e}),_("coach")]}),t.segments.reactivation_pool_count>0&&a.jsxs("section",{className:"ng4-section ng4-reactivation",children:[a.jsx("p",{className:"ng4-reactivation__sentence",children:p?e("network_growth.v4.reactivation.sentence_named",{name:$(p.display_name,p.user_id)}):e("network_growth.v4.reactivation.sentence")}),o&&a.jsx(X,{questions:z("reactivation"),onAsk:l,t:e}),_("reactivation")]})]})})}const Ut={slug:"network-growth",name:"Network Growth Tracker",version:"2.0.0",category:"interactive",requiredService:"network-growth",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"}],sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"network-growth",inputSchema:{type:"object",properties:{contract_version:{type:"string"},context_size:{type:"string"},leader:{type:"object"},tiles:{type:"object"},recommendations:{type:"array"},context_mode:{type:"object"},digest_v3:{type:"object"}},required:["contract_version","leader","tiles","recommendations"]}},events:{emits:[{name:"chat:draft",description:'User clicked "Talk to GAIO" on a recommendation — drafts the gaioContext into the chat bot'}]}};export{Vt as Component,Vt as NetworkGrowthBlock,Ut as manifest};
50
- //# sourceMappingURL=index-CYP-tLa5-DLVDVk-F.js.map
50
+ //# sourceMappingURL=index-DT9H1y9L-DladDuuj.js.map