@syntrologie/runtime-sdk 2.2.0-canary.8 → 2.2.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.
- package/README.md +2 -1
- package/dist/actions/types.d.ts +7 -0
- package/dist/antiFlicker.d.ts +2 -0
- package/dist/apps/builtinRuntimeModules.generated.d.ts +20 -0
- package/dist/{chunk-MEBUEMEZ.js → chunk-V4MDQX67.js} +2868 -1417
- package/dist/chunk-V4MDQX67.js.map +7 -0
- package/dist/configFetcher.d.ts +3 -1
- package/dist/context/ContextManager.d.ts +4 -0
- package/dist/diagnostics/service-worker-check.d.ts +23 -0
- package/dist/editorLoader.d.ts +8 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1563 -12
- package/dist/index.js.map +4 -4
- package/dist/integrations/gtm-bridge.d.ts +36 -0
- package/dist/navigation/NavigationMonitor.d.ts +45 -0
- package/dist/overlays/runtime/utils/AnchorWatcher.d.ts +22 -0
- package/dist/overlays/types.d.ts +2 -0
- package/dist/react.js +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/smart-canvas.esm.js +62 -36
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +15828 -23049
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +62 -36
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/telemetry/adapters/posthog.d.ts +19 -0
- package/dist/telemetry/consent.d.ts +62 -0
- package/dist/version.d.ts +1 -1
- package/dist/widgets/WidgetRegistry.d.ts +10 -0
- package/package.json +13 -4
- package/schema/canvas-config.schema.json +124 -22
- package/scripts/syntroReactPlugin.mjs +113 -0
- package/dist/adaptives/adaptive-chatbot/index.js +0 -9
- package/dist/adaptives/adaptive-chatbot/index.js.map +0 -7
- package/dist/adaptives/adaptive-content/index.js +0 -22
- package/dist/adaptives/adaptive-content/index.js.map +0 -7
- package/dist/adaptives/adaptive-faq/index.js +0 -28
- package/dist/adaptives/adaptive-faq/index.js.map +0 -7
- package/dist/adaptives/adaptive-gamification/index.js +0 -2
- package/dist/adaptives/adaptive-gamification/index.js.map +0 -7
- package/dist/adaptives/adaptive-nav/index.js +0 -27
- package/dist/adaptives/adaptive-nav/index.js.map +0 -7
- package/dist/adaptives/adaptive-overlays/index.js +0 -94
- package/dist/adaptives/adaptive-overlays/index.js.map +0 -7
- package/dist/chunk-MEBUEMEZ.js.map +0 -7
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
function $(...e){return e.filter(Boolean).join(" ")}function Ma(){return typeof SynOS<"u"&&SynOS.React||{}}function Ta(e,a,t){var o=Ma(),r=a||{},s=r.children;return delete r.children,t!==void 0&&(r.key=t),Array.isArray(s)?o.createElement.apply(null,[e,r].concat(s)):s!==void 0?o.createElement(e,r,s):o.createElement(e,r)}var m=Ta,w=Ta,Ie=Ma().Fragment;function me(){return typeof SynOS<"u"&&SynOS.React||{}}var _o=new Proxy({},{get:function(e,a){return me()[a]}});function X(){return me().useState.apply(null,arguments)}function Y(){return me().useEffect.apply(null,arguments)}function j(){return me().useCallback.apply(null,arguments)}function fe(){return me().useRef.apply(null,arguments)}function Me(){return me().createElement.apply(null,arguments)}function _e(){return me().forwardRef.apply(null,arguments)}var Te=me(),Xo=Te.Fragment,jo=Te.Suspense,Ko=Te.Children,Zo=Te.Component,Qo=Te.PureComponent;function Tt(){return typeof SynOS<"u"&&SynOS.ReactDOM||{}}var Yo=new Proxy({},{get:function(e,a){return Tt()[a]}});var W={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};var Dt="CssSelectorGenerator";function Xe(e="unknown problem",...a){console.warn(`${Dt}: ${e}`,...a)}var fr={selectors:[W.id,W.class,W.tag,W.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY,useScope:!1};function Da(e){return e instanceof RegExp}function Ft(e){return e.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}function da(e){let a=e.map(t=>{if(Da(t))return o=>t.test(o);if(typeof t=="function")return o=>{let r=t(o);return typeof r!="boolean"?(Xe("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):r};if(typeof t=="string"){let o=new RegExp("^"+Ft(t)+"$");return r=>o.test(r)}return Xe("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1});return t=>a.some(o=>o(t))}var Ot=new RegExp(["^$","\\s"].join("|")),qt=new RegExp(["^$"].join("|")),Ba=[W.nthoftype,W.tag,W.id,W.class,W.attribute,W.nthchild];var yr=da(["class","id","ng-*"]);var Is="3a".toUpperCase();var Oa=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,t,o)=>o?o.toUpperCase():t.toLowerCase()),fa=e=>{let a=zt(e);return a.charAt(0).toUpperCase()+a.slice(1)},Ke=(...e)=>e.filter((a,t,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim(),qa=e=>{for(let a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var Ha={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Ua=_e(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:l,...u},d)=>Me("svg",{ref:d,...Ha,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:Ke("lucide",r),...!s&&!qa(u)&&{"aria-hidden":"true"},...u},[...l.map(([n,L])=>Me(n,L)),...Array.isArray(s)?s:[s]]));var ee=(e,a)=>{let t=_e(({className:o,...r},s)=>Me(Ua,{ref:s,iconNode:a,className:Ke(`lucide-${Oa(fa(e))}`,`lucide-${e}`,o),...r}));return t.displayName=fa(e),t};var Vt=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],De=ee("message-square",Vt);var _t=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Be=ee("route",_t);var Xt=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],xe=ee("sparkles",Xt);var jt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Fe=ee("square",jt);var Kt=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Ee=ee("tag",Kt);var Zt=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Oe=ee("zap",Zt);function ia({found:e}){return m("span",{className:$("se-w-2 se-h-2 se-rounded-full se-shrink-0 se-inline-block",e?"se-bg-green-4":"se-bg-text-tertiary"),title:e?"Found on this page":"Not found on this page"})}function ca({count:e,children:a}){let[t,o]=X(!1);return w("div",{className:"se-mt-4 se-cursor-pointer se-select-none",children:[w("div",{role:"button",tabIndex:0,className:"se-text-xs se-font-semibold se-text-text-tertiary se-flex se-items-center se-gap-1.5 se-cursor-pointer",onClick:()=>o(!t),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&o(!t)},children:[m("span",{children:t?"\u25BE":"\u25B8"}),w("span",{children:["Dismissed (",e,")"]})]}),t&&m("div",{className:"se-mt-1.5",children:a})]})}function pa({children:e}){return m("div",{className:"se-flex-1 se-overflow-auto se-p-6",children:e})}function ma({children:e,itemKey:a,onClick:t,onMouseEnter:o,onMouseLeave:r,className:s,validated:l}){return m("div",{"data-item-key":a,onClick:t,onMouseEnter:o,onMouseLeave:r,className:$("se-py-2 se-px-2.5 se-rounded-lg se-border se-bg-card-bg se-shadow-sm se-mb-1 se-text-sm se-text-text-primary",l?"se-border-green-4/40 se-shadow-glow-green":"se-border-border-primary",t&&"se-cursor-pointer hover:se-border-border-primary/80 hover:se-bg-sidebar-hover se-transition-colors",s),children:e})}function xa({onSave:e,onPublish:a}){return w("div",{className:"se-py-3 se-px-4 se-border-t se-border-border-primary se-flex se-gap-2",children:[m("button",{onClick:e,className:"se-flex-1 se-h-10 se-px-4 se-py-2 se-rounded-md se-bg-btn-neutral se-text-btn-neutral-text se-border se-border-btn-neutral-border hover:se-text-btn-neutral-text-hover se-text-sm se-font-medium se-cursor-pointer se-inline-flex se-items-center se-justify-center focus-visible:se-shadow-focus-primary focus-visible:se-outline-none",children:"Save Draft"}),m("button",{onClick:a,className:"se-flex-1 se-h-10 se-px-4 se-py-2 se-rounded-md se-border-none se-bg-btn-primary se-text-btn-primary-text hover:se-bg-btn-primary-hover se-text-sm se-font-medium se-cursor-pointer se-inline-flex se-items-center se-justify-center focus-visible:se-shadow-focus-primary focus-visible:se-outline-none",children:"Publish"})]})}function La({title:e,subtitle:a}){return w("div",{className:"se-px-4 se-pt-3 se-pb-2",children:[m("h2",{className:"se-m-0 se-text-base se-font-semibold se-text-text-primary",children:e}),a&&m("p",{className:"se-mt-0.5 se-mb-0 se-text-xs se-text-text-secondary",children:a})]})}function Ce({label:e,className:a,...t}){return w("div",{children:[e&&m("label",{className:"se-text-sm se-font-medium se-text-input-field-text-label se-mb-1 se-block",children:e}),m("input",{...t,className:$("se-w-full se-py-2 se-px-3 se-rounded-lg se-border se-border-input-field-border se-bg-slate-grey-3 se-text-text-primary se-text-sm se-font-[inherit] se-mb-2 se-box-border","placeholder:se-text-input-field-text-placeholder","focus:se-border-input-field-border-selected focus:se-outline-none focus:se-shadow-focus-primary","disabled:se-bg-input-field-bg-disabled disabled:se-cursor-not-allowed disabled:se-opacity-50",a)})]})}function ga({children:e}){return m("div",{className:"se-flex se-flex-col se-h-full se-font-sans",children:e})}function Ze({label:e,className:a,value:t,...o}){let r=fe(null);return Y(()=>{let s=r.current;s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)},[t]),w("div",{children:[e&&m("label",{className:"se-text-sm se-font-medium se-text-input-field-text-label se-mb-1 se-block",children:e}),m("textarea",{ref:r,value:t,...o,className:$("se-w-full se-py-2 se-px-3 se-rounded-lg se-border se-border-input-field-border se-bg-slate-grey-3 se-text-text-primary se-text-sm se-font-[inherit] se-mb-2 se-resize-y se-min-h-[60px] se-max-h-[50vh] se-overflow-y-auto se-box-border","placeholder:se-text-input-field-text-placeholder","focus:se-border-input-field-border-selected focus:se-outline-none focus:se-shadow-focus-primary","disabled:se-bg-input-field-bg-disabled disabled:se-cursor-not-allowed disabled:se-opacity-50",a)})]})}function ha({message:e}){return m("div",{className:"se-text-center se-py-8 se-px-4 se-text-text-secondary se-text-sm",children:e})}function Qe({label:e,count:a,className:t}){return w("div",{className:$("se-text-xs se-font-bold se-text-text-primary se-uppercase se-tracking-wide se-py-1 se-pb-2 se-flex se-items-center se-justify-between",t),children:[m("span",{children:e}),m("span",{className:"se-text-xs se-text-text-secondary se-bg-badge-slate-bg se-px-1.5 se-py-0.5 se-rounded-lg",children:a})]})}function Je(e){if(!e)return"(no target)";if(e.startsWith("#"))return Na(e.slice(1),50);let a=e.match(/\[data-testid="([^"]+)"\]/);return a?`${a[1]} element`:Na(e,50)}function Na(e,a){return e.length<=a?e:`${e.slice(0,a)}...`}function $a(e,a){return e.length<=a?`"${e}"`:`"${e.slice(0,a)}..."`}function Ia(e,a){switch(e){case"tooltips":{let t=a.anchorId||"",o=Je(t),s=a.content?.body||"";return`Tooltip on ${o}: ${$a(s,40)}`}case"highlights":{let t=a.anchorId||"";return`Highlight ${Je(t)}`}case"badges":{let t=a.anchorId||"",o=Je(t);return`Badge "${a.content||""}" on ${o}`}case"pulses":{let t=a.anchorId||"";return`Pulse on ${Je(t)}`}case"modals":{let t=a.content,o=t?.title||t?.body||"";return`Modal: ${$a(o,40)}`}case"tours":{let t=a.tourId||"unknown",r=(a.steps||[]).length;return`Tour: ${t} (${r} ${r===1?"step":"steps"})`}default:return"Unknown overlay"}}function wa(e,a){return`${e}:${a}`}var Wa=["tooltips","highlights","badges","pulses","modals"],Yt={tooltips:De,highlights:xe,badges:Ee,pulses:Oe,modals:Fe,tours:Be};function Ca({section:e,className:a}){let t=Yt[e];return m(t,{size:16,className:a})}function Sa(e){let a=[];for(let o of Wa)(e[o]||[]).forEach((s,l)=>{let u=s;a.push({key:wa(o,l),section:o,index:l,summary:Ia(o,u),anchorId:u.anchorId||"",isTour:!1})});return(e.tours||[]).forEach((o,r)=>{a.push({key:wa("tours",r),section:"tours",index:r,summary:Ia("tours",o),anchorId:"",isTour:!0})}),a}function ba(e,a){let t={...e},o=[...Wa,"tours"];for(let r of o){let l=(e[r]||[]).filter((u,d)=>!a.has(wa(r,d)));(l.length>0||e[r]!==void 0)&&(t[r]=l)}return t}function eo(e){let t=e.action.kind||"";return t.includes("tooltip")?"\u{1F4AC}":t.includes("highlight")?"\u2728":t.includes("modal")?"\u{1F4E6}":t.includes("badge")?"\u{1F3F7}\uFE0F":t.includes("pulse")?"\u{1F4AB}":"\u25CF"}function ao(e){let a=e.action,t=a.anchorId;if(t)return t;let o=a.content;return o?.title?o.title:o?.body?o.body.slice(0,30):e.id}function to(e,a){let[t,o]=X(new Map),r=fe(e),s=fe(a);return r.current=e,s.current=a,Y(()=>{let l=()=>{let d=new Map;for(let n of r.current){let L=n.anchorId;if(n.isTour&&!L){let g=(s.current.tours||[])[n.index];g&&g.steps.length>0&&(L=g.steps[0].action?.anchorId||"")}if(!L){d.set(n.key,{found:!1,element:null});continue}try{let x=document.querySelector(L);d.set(n.key,{found:x!==null,element:x})}catch{d.set(n.key,{found:!1,element:null})}}o(d)};l();let u=setInterval(l,2e3);return()=>clearInterval(u)},[]),t}function oo(e){let[a,t]=e.split(":");return{section:a,index:Number(t)}}function ro({config:e,onChange:a,editor:t}){let o=e,[r,s]=X(()=>t.getDismissedKeys?.()??new Set),[l,u]=X(null),[d,n]=X(null),[L,x]=X("after");Y(()=>{t.setDismissedKeys?.(r)},[r,t]),Y(()=>{let i=t.previewMode;if(i)if(i==="before"){let v=new Set(Sa(o).map(q=>q.key)),T=ba(o,v);t.previewConfig(T)}else t.previewConfig(e)},[t.previewMode]);let g=fe(!1);Y(()=>{if(t.initialEditKey!=null&&!g.current){g.current=!0;let i=Sa(o),v=Number(t.initialEditKey);if(v>=0&&v<i.length){let T=i[v];T.isTour?u(T.key):(n(T.key),T.anchorId&&t.highlightElement(T.anchorId))}t.clearInitialState?.()}else t.initialCreate&&!g.current&&(g.current=!0,t.clearInitialState?.())},[t,o]);let f=Sa(o),I=f.filter(i=>!r.has(i.key)),S=f.filter(i=>r.has(i.key)),b=I.filter(i=>!i.isTour),p=I.filter(i=>i.isTour),h=I.length,[y,k]=X(null),C=to(f,o),M=I.filter(i=>C.get(i.key)?.found).length,F=j(i=>{s(v=>{let T=new Set(v);return T.add(i),T}),l===i&&u(null),d===i&&n(null)},[l,d]),z=j(i=>{s(v=>{let T=new Set(v);return T.delete(i),T})},[]),R=j(i=>{i.isTour?u(v=>v===i.key?null:i.key):(i.anchorId&&t.highlightElement(i.anchorId),n(i.key))},[t]),P=j(()=>{n(null),x("after"),t.previewConfig(e),t.clearHighlight()},[t,e]);Y(()=>(t.setBackHandler?.(d!==null?P:null),()=>t.setBackHandler?.(null)),[d,P,t]);let B=j(i=>{if(x(i),i==="before"){let v=ba(o,new Set([d]));t.previewConfig(v)}else t.previewConfig(e)},[o,d,t,e]),D=j((i,v,T)=>{let q=(o[i]||[]).slice(),ne={...q[v]};q[v]=T(ne);let Z={...o,[i]:q};a(Z),t.setDirty(!0)},[o,a,t]),H=j(()=>{if(r.size>0){let i=ba(o,r);a(i)}t.publish()},[r,o,a,t]),E=j(i=>{k(i.key),i.anchorId&&t.highlightElement(i.anchorId)},[t]),V=j(()=>{k(null),t.clearHighlight()},[t]),A=(i,v)=>{let q=(o[i]||[])[v];if(!q)return null;let ne=q.anchorId||"";switch(i){case"tooltips":{let Z=q.content||{};return w("div",{className:"se-py-1",children:[m("div",{className:"se-text-[11px] se-font-mono se-text-slate-grey-8 se-py-1 se-px-2 se-bg-white/[0.04] se-rounded se-mb-3",children:ne}),m(Ce,{label:"Title",value:Z.title||"",onChange:_=>D(i,v,oe=>({...oe,content:{...oe.content,title:_.target.value}}))}),m(Ze,{label:"Body",value:Z.body||"",onChange:_=>D(i,v,oe=>({...oe,content:{...oe.content,body:_.target.value}}))})]})}case"highlights":return w("div",{className:"se-py-1",children:[m("div",{className:"se-text-[11px] se-font-mono se-text-slate-grey-8 se-py-1 se-px-2 se-bg-white/[0.04] se-rounded se-mb-3",children:ne}),m(Ce,{label:"Color",value:q.style?.color||"",onChange:Z=>D(i,v,_=>({..._,style:{..._.style||{},color:Z.target.value}}))})]});case"badges":return w("div",{className:"se-py-1",children:[m("div",{className:"se-text-[11px] se-font-mono se-text-slate-grey-8 se-py-1 se-px-2 se-bg-white/[0.04] se-rounded se-mb-3",children:ne}),m(Ce,{label:"Content",value:q.content||"",onChange:Z=>D(i,v,_=>({..._,content:Z.target.value}))})]});case"pulses":return w("div",{className:"se-py-1",children:[m("div",{className:"se-text-[11px] se-font-mono se-text-slate-grey-8 se-py-1 se-px-2 se-bg-white/[0.04] se-rounded se-mb-3",children:ne}),m(Ce,{label:"Duration (ms)",type:"number",value:q.duration||"",onChange:Z=>D(i,v,_=>({..._,duration:Number(Z.target.value)||void 0}))})]});case"modals":{let Z=q.content||{};return w("div",{className:"se-py-1",children:[m(Ce,{label:"Title",value:Z.title||"",onChange:_=>D(i,v,oe=>({...oe,content:{...oe.content,title:_.target.value}}))}),m(Ze,{label:"Body",value:Z.body||"",onChange:_=>D(i,v,oe=>({...oe,content:{...oe.content,body:_.target.value}}))})]})}default:return null}},U=i=>{let T=(o.tours||[])[i];return T?w("div",{className:"se-p-3 se-rounded-lg se-border se-border-white/[0.08] se-bg-white/[0.02] se-mt-1 se-mb-2",children:[w("div",{className:"se-text-[13px] se-font-semibold se-text-slate-grey-10 se-mb-2",children:["\u{1F3AF}"," Tour: ",T.tourId]}),w("label",{className:"se-flex se-items-center se-gap-2 se-text-xs se-text-[#d1d5db] se-mb-2",children:[m("input",{type:"checkbox",checked:T.autoStart||!1,readOnly:!0}),"Auto-start tour"]}),T.steps.map((q,ne)=>w("div",{className:"se-flex se-items-center se-gap-2 se-py-1.5 se-px-2 se-rounded se-border se-border-white/[0.04] se-mb-1 se-text-xs se-text-[#d1d5db]",children:[w("span",{className:"se-text-[11px] se-font-bold se-text-slate-grey-7 se-min-w-[18px]",children:[ne+1,"."]}),m("span",{children:eo(q)}),w("div",{className:"se-flex-1 se-overflow-hidden",children:[m("div",{children:ao(q)}),q.route&&m("div",{className:"se-text-[10px] se-text-slate-grey-7 se-font-mono",children:q.route})]})]},q.id||ne)),T.steps.length===0&&m("div",{className:"se-text-xs se-text-slate-grey-7 se-py-2",children:"No steps in this tour."}),m("button",{type:"button",className:"se-py-1 se-px-2.5 se-rounded se-border se-border-white/10 se-bg-transparent se-text-slate-grey-8 se-text-[11px] se-cursor-pointer se-mt-2",onClick:()=>u(null),children:"\u2190 Back to list"})]}):null},N=i=>{let v=C.get(i.key);return w("div",{children:[w(ma,{itemKey:i.key,onClick:()=>R(i),className:"se-flex se-items-center se-gap-2",onMouseEnter:()=>E(i),onMouseLeave:V,children:[m(ia,{found:v?.found??!1}),m("span",{className:"se-shrink-0 se-flex se-items-center -se-ml-1",onClick:T=>{T.stopPropagation(),R(i)},children:m(Ca,{section:i.section})}),m("span",{className:"se-flex-1 se-overflow-hidden se-text-ellipsis se-whitespace-nowrap",onClick:()=>R(i),children:i.summary}),m("button",{type:"button",className:"se-py-0.5 se-px-1.5 se-rounded se-border-none se-bg-transparent se-text-slate-grey-7 se-text-sm se-cursor-pointer se-shrink-0 se-leading-none",onClick:T=>{T.stopPropagation(),F(i.key)},title:"Dismiss",children:"\xD7"})]}),i.isTour&&l===i.key&&U(i.index)]},i.key)};return w(ga,{children:[m(La,{title:"Review Changes",subtitle:`${h} item${h!==1?"s":""}${h>0?` (${M} found on this page)`:""}`,onBack:()=>t.navigateHome()}),m(pa,{children:d!==null?(()=>{let i=oo(d),v=f.find(T=>T.key===d);return w(Ie,{children:[w("div",{className:"se-flex se-items-center se-gap-2 se-mb-3 se-text-[13px] se-font-semibold se-text-slate-grey-10",children:[m("span",{children:v&&m(Ca,{section:v.section})}),m("span",{children:v?.summary})]}),A(i.section,i.index)]})})():w(Ie,{children:[f.length===0&&m(ha,{message:"No overlays configured."}),b.length>0&&w(Ie,{children:[m(Qe,{label:"OVERLAYS",count:b.length}),b.map(N)]}),p.length>0&&w(Ie,{children:[m(Qe,{label:"TOURS",count:p.length,className:b.length>0?"se-mt-4":""}),p.map(N)]}),S.length>0&&m(ca,{count:S.length,children:S.map(i=>w("div",{className:"se-flex se-items-center se-gap-2 se-py-1.5 se-px-2.5 se-rounded-md se-border se-border-white/[0.03] se-bg-transparent se-mb-0.5 se-cursor-pointer se-text-xs se-text-slate-grey-6 se-opacity-60",children:[m("span",{className:"se-shrink-0 se-flex se-items-center -se-ml-1",children:m(Ca,{section:i.section})}),m("span",{className:"se-flex-1 se-overflow-hidden se-text-ellipsis se-whitespace-nowrap se-line-through",children:i.summary}),m("button",{type:"button",className:"se-py-0.5 se-px-1.5 se-rounded se-border-none se-bg-transparent se-text-blue-5 se-text-[11px] se-cursor-pointer se-shrink-0 se-leading-none",onClick:v=>{v.stopPropagation(),z(i.key)},children:"Restore"})]},i.key))})]})}),m(xa,{onSave:()=>t.save(),onPublish:H})]})}var ya={panel:{title:"Overlays",icon:"\u{1F4AC}",description:"Tooltips, highlights, and visual overlays"},component:ro},gd=ya.panel;var ue={white:"#ffffff",black:"#000000"},Q={0:"#2c0b0a",1:"#5b1715",2:"#89221f",3:"#b72e2a",4:"#d44844",5:"#dd6d69",6:"#e5918f",7:"#eeb6b4",8:"#f6dada",9:"#faebea"},c={0:"#07080a",1:"#0f1318",2:"#0e1114",3:"#1c222a",4:"#2b333f",5:"#394454",6:"#475569",7:"#677384",8:"#87919f",9:"#a8afba",10:"#cbd0d7",11:"#e8eaee",12:"#f6f7f9"},O={0:"#07230a",1:"#0e4514",2:"#16681e",3:"#1d8a28",4:"#24ad32",5:"#4fbd5a",6:"#7acd82",7:"#a5deab",8:"#d0eed3",9:"#e5f6e7"},de={0:"#301f09",1:"#5f3e12",2:"#8f5e1b",3:"#be7d24",4:"#ee9c2d",5:"#f1b057",6:"#f5c481",7:"#f8d7ab",8:"#fcebd5",9:"#fdf5ea"},G={0:"#330707",1:"#660f0e",2:"#991616",3:"#cc1e1d",4:"#ff2524",5:"#ff5150",6:"#ff7c7c",7:"#ffa8a7",8:"#ffd3d3",9:"#ffe9e9"},Le={0:"#051533",1:"#0a2a66",2:"#0f3f98",3:"#1454cb",4:"#1969fe",5:"#4787fe",6:"#75a5fe",7:"#a3c3ff",8:"#d1e1ff",9:"#e8f0ff"},qe={0:"#662500",1:"#993d00",2:"#cc5800",3:"#ff7700",4:"#fea85d",5:"#fec58f",6:"#ffd6ae",7:"#fee6cd",8:"#fff1e1",9:"#fff8f0"},He={0:"#151229",1:"#2a2452",2:"#40357c",3:"#5547a5",4:"#6a59ce",5:"#887ad8",6:"#a69be2",7:"#c3bdeb",8:"#e1def5",9:"#f0eefa"},Ue={0:"#37091f",1:"#69123c",2:"#9b1c58",3:"#cd2575",4:"#ff2e92",5:"#ff58a8",6:"#ff82be",7:"#ffabd3",8:"#ffd5e9",9:"#ffeaf4"};var Cd={primary:c[10],secondary:c[9],tertiary:c[8]},Sd={primary:c[2],secondary:c[0]},bd={primary:c[4],secondary:c[3]},wd={primary:{text:ue.white,icon:ue.white,border:Q[3],backgroundDefault:Q[3],backgroundHover:Q[2]},neutral:{text:c[10],textHover:ue.white,icon:c[10],iconHover:ue.white,border:c[4],background:c[2]},link:{text:ue.white,icon:ue.white,hover:Q[5]},error:{text:G[5],hover:G[6]},success:{text:O[5],hover:O[6]}},yd={slateGrey:{content:c[10],pillOutline:c[10],borderPrimary:c[5],borderSecondary:c[5],background:c[3]},brand:{content:Q[9],pillOutline:Q[9],borderPrimary:Q[6],borderSecondary:Q[6],background:Q[0]},red:{content:G[8],pillOutline:G[4],borderPrimary:G[2],borderSecondary:G[2],background:G[0]},yellow:{content:de[8],pillOutline:de[4],borderPrimary:de[2],borderSecondary:de[2],background:de[0]},green:{content:O[8],pillOutline:O[4],borderPrimary:O[2],borderSecondary:O[2],background:O[0]},purple:{content:He[8],pillOutline:He[4],borderPrimary:He[2],borderSecondary:He[2],background:He[0]},blue:{content:Le[8],pillOutline:Le[4],borderPrimary:Le[2],borderSecondary:Le[2],background:Le[0]},orange:{content:qe[8],pillOutline:qe[4],borderPrimary:qe[2],borderSecondary:qe[2],background:qe[0]},pink:{content:Ue[8],pillOutline:Ue[4],borderPrimary:Ue[2],borderSecondary:Ue[2],background:Ue[0]}},kd={green:{content:O[8],border:O[2],background:O[0]},yellow:{content:de[8],border:de[2],background:de[0]},red:{content:G[8],border:G[2],background:G[0]}},vd={green:{content:O[1],background:O[9]},yellow:{content:de[1],background:de[9]},red:{content:G[1],background:G[9]}},Pd={content:c[10],border:c[4],background:"#1c2124"},Ad={backgroundDefault:c[2],backgroundHover:c[1],selected:c[3]},Rd={background:c[2],icon:c[10],borderDefault:c[4],borderSelected:Q[3],textLabel:c[9],textPlaceholder:c[8],textHint:c[8]},Md={backgroundDefault:c[2],backgroundDisabled:c[0],textLabel:c[9],textPlaceholder:c[8],textHint:c[8],textError:G[5],iconDefault:c[9],iconPlaceholder:c[10],iconError:G[5],borderDefault:c[4],borderSelected:Q[3],borderError:G[5]},Td={handleDefault:ue.white,handleDisabled:c[10],off:{backgroundDefault:c[4],backgroundHover:c[5],backgroundDisabled:c[4]},on:{backgroundDefault:O[3],backgroundHover:O[2],backgroundDisabled:c[4]}},Dd={off:{backgroundDefault:"#00000000",backgroundHover:c[5],backgroundDisabled:c[2],border:c[6]},on:{backgroundDefault:O[0],backgroundHover:O[1],backgroundDisabled:c[2],border:O[3]}},Bd={content:c[10],background:c[4]},Fd={background:c[4],active:O[3]},Ed={background:c[1],content:c[9],border:c[4]},Od={backgroundDefault:c[1],backgroundHover:c[3],backgroundActive:c[4],border:c[4],contentPrimary:c[10],contentSecondary:c[9],contentTertiary:c[8]},qd={background:c[1],content:c[9],border:c[4]},Hd={activeBackground:c[3],activeContent:Q[5],inactiveContent:c[9],border:c[4]},Ud={header:{textDefault:c[9],textHover:c[8],backgroundDefault:c[1]},border:c[4],cell:{textPrimary:c[10],textSecondary:c[9],backgroundDefault:c[2],backgroundHover:c[1]}},Nd={textPrimaryDefault:c[10],textPrimaryHover:c[10],textSecondaryDefault:c[8],textSecondaryHover:c[9],iconPrimary:c[10],iconSecondary:c[8]},$d={background:O[1],active:O[5]},Wd={textDefault:c[10],textSelected:ue.white,textDisabled:c[7],backgroundDefault:c[2],backgroundMiddle:c[3],backgroundSelected:Q[3],border:c[4]},Gd=c[9];var Ga=typeof CSS<"u"&&CSS.supports?.("clip-path","path('M0 0 H1 V1 Z')");function za(e,a,t){let o=t?.paddingPx??12,r=t?.radiusPx??12,s=Math.min(Math.max(t?.scrimOpacity??.55,0),1),l=t?.ringColor??`var(--syntro-ring, ${Le[5]})`,u=t?.blocking??!1,d=t?.onClickOutside??!0,n=t?.onEsc??!0,L=getComputedStyle(document.documentElement),x=L.getPropertyValue("--syntro-spotlight-backdrop").trim(),g=L.getPropertyValue("--syntro-ring").trim(),f=document.createElement("div");f.className="syntro-spotlight-scrim";let I=u||d;Object.assign(f.style,{position:"fixed",inset:"0",zIndex:"2147483646",pointerEvents:I?"auto":"none",background:x||`rgba(2, 6, 23, ${s})`,transition:"opacity 220ms ease",opacity:"0"}),a.appendChild(f),requestAnimationFrame(()=>f.style.opacity="1");let S=document.createElement("div");S.className="syntro-spotlight-ring",Object.assign(S.style,{position:"fixed",pointerEvents:"none",borderRadius:`${r}px`,border:`2px solid ${l||g||Le[5]}`,boxShadow:"0 0 0 4px rgba(255,255,255,0.35)",zIndex:"2147483647",transition:"all 220ms cubic-bezier(0.16,1,0.3,1)"}),a.appendChild(S);let b=[];if(!Ga)for(let R=0;R<4;R++){let P=document.createElement("div");P.style.position="fixed",P.style.background="inherit",b.push(P),f.appendChild(P)}let p=R=>{f.style.clipPath=R,f.style.webkitClipPath=R},h=()=>{let R=e.getBoundingClientRect(),P=Math.max(0,R.left-o),B=Math.max(0,R.top-o),D=Math.min(window.innerWidth,R.width+o*2),H=Math.min(window.innerHeight,R.height+o*2);if(Object.assign(S.style,{left:`${P}px`,top:`${B}px`,width:`${D}px`,height:`${H}px`}),Ga){let E=window.innerWidth,V=window.innerHeight,A=Math.min(r,D/2,H/2),U=`M 0 0 L ${E} 0 L ${E} ${V} L 0 ${V} Z`,N=`M ${P+A} ${B} A ${A} ${A} 0 0 0 ${P} ${B+A} L ${P} ${B+H-A} A ${A} ${A} 0 0 0 ${P+A} ${B+H} L ${P+D-A} ${B+H} A ${A} ${A} 0 0 0 ${P+D} ${B+H-A} L ${P+D} ${B+A} A ${A} ${A} 0 0 0 ${P+D-A} ${B} L ${P+A} ${B} Z`;p(`path('${U} ${N}')`)}else{let[E,V,A,U]=b;Object.assign(E.style,{left:"0px",top:"0px",width:"100vw",height:`${B}px`}),Object.assign(A.style,{left:"0px",top:`${B+H}px`,width:"100vw",height:`${Math.max(0,window.innerHeight-(B+H))}px`}),Object.assign(U.style,{left:"0px",top:`${B}px`,width:`${P}px`,height:`${H}px`}),Object.assign(V.style,{left:`${P+D}px`,top:`${B}px`,width:`${Math.max(0,window.innerWidth-(P+D))}px`,height:`${H}px`})}},y=new ResizeObserver(()=>requestAnimationFrame(h));y.observe(e);let k=()=>requestAnimationFrame(h),C=()=>requestAnimationFrame(h);window.addEventListener("scroll",k,!0),window.addEventListener("resize",C);let M=R=>{R.key==="Escape"&&n&&z.destroy()};n&&window.addEventListener("keydown",M);let F=R=>{u?(R.preventDefault(),R.stopPropagation()):d&&z.destroy()};f.addEventListener("click",F);let z={destroy(){y.disconnect(),window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",C),n&&window.removeEventListener("keydown",M),f.removeEventListener("click",F),f.style.pointerEvents="none",f.style.opacity="0",setTimeout(()=>{f.remove(),S.remove()},220)}};return h(),z}var so=new Set(["b","strong","i","em","u","span","div","p","br","ul","ol","li","code","pre","small","sup","sub","a","button"]);function J(e){if(typeof window.Sanitizer=="function")try{let u=new window.Sanitizer({}).sanitizeToFragment(e),d=document.createElement("div");return d.append(u),d.innerHTML}catch{}let t=document.createElement("template");t.innerHTML=e;let o=t.content,r=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,null),s=[];for(;r.nextNode();){let l=r.currentNode,u=l.tagName.toLowerCase();if(!so.has(u)){s.push(l);continue}for(let d of Array.from(l.attributes)){let n=d.name.toLowerCase(),L=d.value.trim().toLowerCase(),x=n.startsWith("on"),g=(n==="href"||n==="src")&&L.startsWith("javascript:");(x||g)&&l.removeAttribute(d.name)}}for(let l of s){for(;l.firstChild;)l.parentNode?.insertBefore(l.firstChild,l);l.remove()}return t.innerHTML}var Va=async(e,a)=>{let{content:t,size:o="md",blocking:r=!1,scrim:s,dismiss:l,ctaButtons:u}=e,d=document.createElement("div");d.className="syntro-modal-scrim",d.style.cssText=`
|
|
2
|
-
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
|
-
background: rgba(0, 0, 0, ${s?.opacity??.6});
|
|
5
|
-
z-index: 2147483645;
|
|
6
|
-
opacity: 0;
|
|
7
|
-
transition: opacity 200ms ease-out;
|
|
8
|
-
`,a.overlayRoot.appendChild(d);let n=document.createElement("div");n.className=`syntro-modal syntro-modal-${o}`,n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let L={sm:"360px",md:"480px",lg:"640px"};n.style.cssText=`
|
|
9
|
-
position: fixed;
|
|
10
|
-
top: 50%;
|
|
11
|
-
left: 50%;
|
|
12
|
-
transform: translate(-50%, -50%) scale(0.95);
|
|
13
|
-
max-width: ${L[o]};
|
|
14
|
-
width: 90%;
|
|
15
|
-
background: ${ue.white};
|
|
16
|
-
border-radius: 12px;
|
|
17
|
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
18
|
-
z-index: 2147483646;
|
|
19
|
-
opacity: 0;
|
|
20
|
-
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
21
|
-
padding: 24px;
|
|
22
|
-
`;let x="";if(t.title&&(x+=`<h2 class="syntro-modal-title" style="margin: 0 0 12px 0; font-size: 18px; font-weight: 600; color: #111827;">${J(t.title)}</h2>`),x+=`<div class="syntro-modal-body" style="color: #4b5563; line-height: 1.5;">${J(t.body)}</div>`,l?.closeButton!==!1&&(x+=`
|
|
23
|
-
<button class="syntro-modal-close" data-syntro-action="dismiss" style="
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 16px;
|
|
26
|
-
right: 16px;
|
|
27
|
-
background: none;
|
|
28
|
-
border: none;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
padding: 4px;
|
|
31
|
-
color: #6b7280;
|
|
32
|
-
" aria-label="Close">
|
|
33
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
|
|
34
|
-
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
|
|
35
|
-
</svg>
|
|
36
|
-
</button>
|
|
37
|
-
`),u&&u.length>0){x+='<div class="syntro-modal-actions" style="display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end;">';for(let C of u){let M=C.primary??!1;x+=`
|
|
38
|
-
<button
|
|
39
|
-
class="syntro-modal-btn ${M?"syntro-modal-btn-primary":""}"
|
|
40
|
-
data-syntro-action="${J(C.actionId)}"
|
|
41
|
-
style="
|
|
42
|
-
padding: 10px 20px;
|
|
43
|
-
border-radius: 8px;
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: background 150ms ease;
|
|
48
|
-
${M?"background: #4f46e5; color: white; border: none;":"background: white; color: #374151; border: 1px solid #d1d5db;"}
|
|
49
|
-
"
|
|
50
|
-
>
|
|
51
|
-
${J(C.label)}
|
|
52
|
-
</button>
|
|
53
|
-
`}x+="</div>"}n.innerHTML=x,a.overlayRoot.appendChild(n);let g=null,f=n.querySelectorAll("[data-syntro-action]"),I=C=>{let F=C.currentTarget.getAttribute("data-syntro-action");F&&(g=F,a.publishEvent("action.modal_cta_clicked",{actionId:F}),k.destroy())};f.forEach(C=>C.addEventListener("click",I));let S=C=>{C.key==="Escape"&&l?.onEsc!==!1&&k.destroy()};window.addEventListener("keydown",S);let b=()=>{r||k.destroy()};d.addEventListener("click",b);let p=[];r&&Array.from(document.body.children).forEach(C=>{C!==a.overlayRoot&&C.getAttribute("inert")===null&&!C.querySelector("[data-syntro-editor-panel]")&&!C.hasAttribute("data-syntro-editor-panel")&&(C.setAttribute("inert",""),p.push(C))});let h;l?.timeoutMs&&(h=setTimeout(()=>{k.destroy()},l.timeoutMs));let y=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');y.length>0&&requestAnimationFrame(()=>y[0].focus()),requestAnimationFrame(()=>{d.style.opacity="1",n.style.opacity="1",n.style.transform="translate(-50%, -50%) scale(1)"}),a.publishEvent("action.applied",{id:a.generateId(),kind:"overlays:modal",size:o,blocking:r});let k={destroy(){h&&clearTimeout(h),window.removeEventListener("keydown",S),d.removeEventListener("click",b),f.forEach(C=>C.removeEventListener("click",I)),p.forEach(C=>C.removeAttribute("inert")),n.style.pointerEvents="none",d.style.pointerEvents="none",n.style.opacity="0",n.style.transform="translate(-50%, -50%) scale(0.95)",d.style.opacity="0",setTimeout(()=>{n.remove(),d.remove()},200),a.publishEvent("action.modal_dismissed",{actionClicked:g})}};return{cleanup:()=>{k.destroy()}}};var ja=["top","right","bottom","left"];var ge=Math.min,ie=Math.max,$e=Math.round,We=Math.floor,re=e=>({x:e,y:e}),lo={left:"right",right:"left",bottom:"top",top:"bottom"},uo={start:"end",end:"start"};function ea(e,a,t){return ie(e,ge(a,t))}function Se(e,a){return typeof e=="function"?e(a):e}function he(e){return e.split("-")[0]}function ve(e){return e.split("-")[1]}function ka(e){return e==="x"?"y":"x"}function aa(e){return e==="y"?"height":"width"}var no=new Set(["top","bottom"]);function ce(e){return no.has(he(e))?"y":"x"}function ta(e){return ka(ce(e))}function Ka(e,a,t){t===void 0&&(t=!1);let o=ve(e),r=ta(e),s=aa(r),l=r==="x"?o===(t?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[s]>a.floating[s]&&(l=Ne(l)),[l,Ne(l)]}function Za(e){let a=Ne(e);return[Ye(e),a,Ye(a)]}function Ye(e){return e.replace(/start|end/g,a=>uo[a])}var _a=["left","right"],Xa=["right","left"],fo=["top","bottom"],io=["bottom","top"];function co(e,a,t){switch(e){case"top":case"bottom":return t?a?Xa:_a:a?_a:Xa;case"left":case"right":return a?fo:io;default:return[]}}function Qa(e,a,t,o){let r=ve(e),s=co(he(e),t==="start",o);return r&&(s=s.map(l=>l+"-"+r),a&&(s=s.concat(s.map(Ye)))),s}function Ne(e){return e.replace(/left|right|bottom|top/g,a=>lo[a])}function po(e){return{top:0,right:0,bottom:0,left:0,...e}}function va(e){return typeof e!="number"?po(e):{top:e,right:e,bottom:e,left:e}}function be(e){let{x:a,y:t,width:o,height:r}=e;return{width:o,height:r,top:t,left:a,right:a+o,bottom:t+r,x:a,y:t}}function Ja(e,a,t){let{reference:o,floating:r}=e,s=ce(a),l=ta(a),u=aa(l),d=he(a),n=s==="y",L=o.x+o.width/2-r.width/2,x=o.y+o.height/2-r.height/2,g=o[u]/2-r[u]/2,f;switch(d){case"top":f={x:L,y:o.y-r.height};break;case"bottom":f={x:L,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:x};break;case"left":f={x:o.x-r.width,y:x};break;default:f={x:o.x,y:o.y}}switch(ve(a)){case"start":f[l]-=g*(t&&n?-1:1);break;case"end":f[l]+=g*(t&&n?-1:1);break}return f}async function at(e,a){var t;a===void 0&&(a={});let{x:o,y:r,platform:s,rects:l,elements:u,strategy:d}=e,{boundary:n="clippingAncestors",rootBoundary:L="viewport",elementContext:x="floating",altBoundary:g=!1,padding:f=0}=Se(a,e),I=va(f),b=u[g?x==="floating"?"reference":"floating":x],p=be(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(b)))==null||t?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:n,rootBoundary:L,strategy:d})),h=x==="floating"?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),k=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},C=be(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:y,strategy:d}):h);return{top:(p.top-C.top+I.top)/k.y,bottom:(C.bottom-p.bottom+I.bottom)/k.y,left:(p.left-C.left+I.left)/k.x,right:(C.right-p.right+I.right)/k.x}}var tt=async(e,a,t)=>{let{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:l}=t,u=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(a)),n=await l.getElementRects({reference:e,floating:a,strategy:r}),{x:L,y:x}=Ja(n,o,d),g=o,f={},I=0;for(let b=0;b<u.length;b++){var S;let{name:p,fn:h}=u[b],{x:y,y:k,data:C,reset:M}=await h({x:L,y:x,initialPlacement:o,placement:g,strategy:r,middlewareData:f,rects:n,platform:{...l,detectOverflow:(S=l.detectOverflow)!=null?S:at},elements:{reference:e,floating:a}});L=y??L,x=k??x,f={...f,[p]:{...f[p],...C}},M&&I<=50&&(I++,typeof M=="object"&&(M.placement&&(g=M.placement),M.rects&&(n=M.rects===!0?await l.getElementRects({reference:e,floating:a,strategy:r}):M.rects),{x:L,y:x}=Ja(n,g,d)),b=-1)}return{x:L,y:x,placement:g,strategy:r,middlewareData:f}},ot=e=>({name:"arrow",options:e,async fn(a){let{x:t,y:o,placement:r,rects:s,platform:l,elements:u,middlewareData:d}=a,{element:n,padding:L=0}=Se(e,a)||{};if(n==null)return{};let x=va(L),g={x:t,y:o},f=ta(r),I=aa(f),S=await l.getDimensions(n),b=f==="y",p=b?"top":"left",h=b?"bottom":"right",y=b?"clientHeight":"clientWidth",k=s.reference[I]+s.reference[f]-g[f]-s.floating[I],C=g[f]-s.reference[f],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n)),F=M?M[y]:0;(!F||!await(l.isElement==null?void 0:l.isElement(M)))&&(F=u.floating[y]||s.floating[I]);let z=k/2-C/2,R=F/2-S[I]/2-1,P=ge(x[p],R),B=ge(x[h],R),D=P,H=F-S[I]-B,E=F/2-S[I]/2+z,V=ea(D,E,H),A=!d.arrow&&ve(r)!=null&&E!==V&&s.reference[I]/2-(E<D?P:B)-S[I]/2<0,U=A?E<D?E-D:E-H:0;return{[f]:g[f]+U,data:{[f]:V,centerOffset:E-V-U,...A&&{alignmentOffset:U}},reset:A}}});var rt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var t,o;let{placement:r,middlewareData:s,rects:l,initialPlacement:u,platform:d,elements:n}=a,{mainAxis:L=!0,crossAxis:x=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:S=!0,...b}=Se(e,a);if((t=s.arrow)!=null&&t.alignmentOffset)return{};let p=he(r),h=ce(u),y=he(u)===u,k=await(d.isRTL==null?void 0:d.isRTL(n.floating)),C=g||(y||!S?[Ne(u)]:Za(u)),M=I!=="none";!g&&M&&C.push(...Qa(u,S,I,k));let F=[u,...C],z=await d.detectOverflow(a,b),R=[],P=((o=s.flip)==null?void 0:o.overflows)||[];if(L&&R.push(z[p]),x){let E=Ka(r,l,k);R.push(z[E[0]],z[E[1]])}if(P=[...P,{placement:r,overflows:R}],!R.every(E=>E<=0)){var B,D;let E=(((B=s.flip)==null?void 0:B.index)||0)+1,V=F[E];if(V&&(!(x==="alignment"?h!==ce(V):!1)||P.every(N=>ce(N.placement)===h?N.overflows[0]>0:!0)))return{data:{index:E,overflows:P},reset:{placement:V}};let A=(D=P.filter(U=>U.overflows[0]<=0).sort((U,N)=>U.overflows[1]-N.overflows[1])[0])==null?void 0:D.placement;if(!A)switch(f){case"bestFit":{var H;let U=(H=P.filter(N=>{if(M){let i=ce(N.placement);return i===h||i==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(i=>i>0).reduce((i,v)=>i+v,0)]).sort((N,i)=>N[1]-i[1])[0])==null?void 0:H[0];U&&(A=U);break}case"initialPlacement":A=u;break}if(r!==A)return{reset:{placement:A}}}return{}}}};function Ya(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function et(e){return ja.some(a=>e[a]>=0)}var st=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){let{rects:t,platform:o}=a,{strategy:r="referenceHidden",...s}=Se(e,a);switch(r){case"referenceHidden":{let l=await o.detectOverflow(a,{...s,elementContext:"reference"}),u=Ya(l,t.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:et(u)}}}case"escaped":{let l=await o.detectOverflow(a,{...s,altBoundary:!0}),u=Ya(l,t.floating);return{data:{escapedOffsets:u,escaped:et(u)}}}default:return{}}}}};var mo=new Set(["left","top"]);async function xo(e,a){let{placement:t,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),l=he(t),u=ve(t),d=ce(t)==="y",n=mo.has(l)?-1:1,L=s&&d?-1:1,x=Se(a,e),{mainAxis:g,crossAxis:f,alignmentAxis:I}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return u&&typeof I=="number"&&(f=u==="end"?I*-1:I),d?{x:f*L,y:g*n}:{x:g*n,y:f*L}}var lt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var t,o;let{x:r,y:s,placement:l,middlewareData:u}=a,d=await xo(a,e);return l===((t=u.offset)==null?void 0:t.placement)&&(o=u.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:l}}}}},ut=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){let{x:t,y:o,placement:r,platform:s}=a,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:p=>{let{x:h,y}=p;return{x:h,y}}},...n}=Se(e,a),L={x:t,y:o},x=await s.detectOverflow(a,n),g=ce(he(r)),f=ka(g),I=L[f],S=L[g];if(l){let p=f==="y"?"top":"left",h=f==="y"?"bottom":"right",y=I+x[p],k=I-x[h];I=ea(y,I,k)}if(u){let p=g==="y"?"top":"left",h=g==="y"?"bottom":"right",y=S+x[p],k=S-x[h];S=ea(y,S,k)}let b=d.fn({...a,[f]:I,[g]:S});return{...b,data:{x:b.x-t,y:b.y-o,enabled:{[f]:l,[g]:u}}}}}};function oa(){return typeof window<"u"}function we(e){return nt(e)?(e.nodeName||"").toLowerCase():"#document"}function K(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function se(e){var a;return(a=(nt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function nt(e){return oa()?e instanceof Node||e instanceof K(e).Node:!1}function ae(e){return oa()?e instanceof Element||e instanceof K(e).Element:!1}function le(e){return oa()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function dt(e){return!oa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}var Lo=new Set(["inline","contents"]);function Ae(e){let{overflow:a,overflowX:t,overflowY:o,display:r}=te(e);return/auto|scroll|overlay|hidden|clip/.test(a+o+t)&&!Lo.has(r)}var go=new Set(["table","td","th"]);function ft(e){return go.has(we(e))}var ho=[":popover-open",":modal"];function Ge(e){return ho.some(a=>{try{return e.matches(a)}catch{return!1}})}var Io=["transform","translate","scale","rotate","perspective"],Co=["transform","translate","scale","rotate","perspective","filter"],So=["paint","layout","strict","content"];function ra(e){let a=sa(),t=ae(e)?te(e):e;return Io.some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!a&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!a&&(t.filter?t.filter!=="none":!1)||Co.some(o=>(t.willChange||"").includes(o))||So.some(o=>(t.contain||"").includes(o))}function it(e){let a=pe(e);for(;le(a)&&!ye(a);){if(ra(a))return a;if(Ge(a))return null;a=pe(a)}return null}function sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var bo=new Set(["html","body","#document"]);function ye(e){return bo.has(we(e))}function te(e){return K(e).getComputedStyle(e)}function ze(e){return ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pe(e){if(we(e)==="html")return e;let a=e.assignedSlot||e.parentNode||dt(e)&&e.host||se(e);return dt(a)?a.host:a}function ct(e){let a=pe(e);return ye(a)?e.ownerDocument?e.ownerDocument.body:e.body:le(a)&&Ae(a)?a:ct(a)}function Pe(e,a,t){var o;a===void 0&&(a=[]),t===void 0&&(t=!0);let r=ct(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),l=K(r);if(s){let u=la(l);return a.concat(l,l.visualViewport||[],Ae(r)?r:[],u&&t?Pe(u):[])}return a.concat(r,Pe(r,[],t))}function la(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lt(e){let a=te(e),t=parseFloat(a.width)||0,o=parseFloat(a.height)||0,r=le(e),s=r?e.offsetWidth:t,l=r?e.offsetHeight:o,u=$e(t)!==s||$e(o)!==l;return u&&(t=s,o=l),{width:t,height:o,$:u}}function Aa(e){return ae(e)?e:e.contextElement}function Re(e){let a=Aa(e);if(!le(a))return re(1);let t=a.getBoundingClientRect(),{width:o,height:r,$:s}=Lt(a),l=(s?$e(t.width):t.width)/o,u=(s?$e(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}var wo=re(0);function gt(e){let a=K(e);return!sa()||!a.visualViewport?wo:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function yo(e,a,t){return a===void 0&&(a=!1),!t||a&&t!==K(e)?!1:a}function ke(e,a,t,o){a===void 0&&(a=!1),t===void 0&&(t=!1);let r=e.getBoundingClientRect(),s=Aa(e),l=re(1);a&&(o?ae(o)&&(l=Re(o)):l=Re(e));let u=yo(s,t,o)?gt(s):re(0),d=(r.left+u.x)/l.x,n=(r.top+u.y)/l.y,L=r.width/l.x,x=r.height/l.y;if(s){let g=K(s),f=o&&ae(o)?K(o):o,I=g,S=la(I);for(;S&&o&&f!==I;){let b=Re(S),p=S.getBoundingClientRect(),h=te(S),y=p.left+(S.clientLeft+parseFloat(h.paddingLeft))*b.x,k=p.top+(S.clientTop+parseFloat(h.paddingTop))*b.y;d*=b.x,n*=b.y,L*=b.x,x*=b.y,d+=y,n+=k,I=K(S),S=la(I)}}return be({width:L,height:x,x:d,y:n})}function ua(e,a){let t=ze(e).scrollLeft;return a?a.left+t:ke(se(e)).left+t}function ht(e,a){let t=e.getBoundingClientRect(),o=t.left+a.scrollLeft-ua(e,t),r=t.top+a.scrollTop;return{x:o,y:r}}function ko(e){let{elements:a,rect:t,offsetParent:o,strategy:r}=e,s=r==="fixed",l=se(o),u=a?Ge(a.floating):!1;if(o===l||u&&s)return t;let d={scrollLeft:0,scrollTop:0},n=re(1),L=re(0),x=le(o);if((x||!x&&!s)&&((we(o)!=="body"||Ae(l))&&(d=ze(o)),le(o))){let f=ke(o);n=Re(o),L.x=f.x+o.clientLeft,L.y=f.y+o.clientTop}let g=l&&!x&&!s?ht(l,d):re(0);return{width:t.width*n.x,height:t.height*n.y,x:t.x*n.x-d.scrollLeft*n.x+L.x+g.x,y:t.y*n.y-d.scrollTop*n.y+L.y+g.y}}function vo(e){return Array.from(e.getClientRects())}function Po(e){let a=se(e),t=ze(e),o=e.ownerDocument.body,r=ie(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),s=ie(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight),l=-t.scrollLeft+ua(e),u=-t.scrollTop;return te(o).direction==="rtl"&&(l+=ie(a.clientWidth,o.clientWidth)-r),{width:r,height:s,x:l,y:u}}var pt=25;function Ao(e,a){let t=K(e),o=se(e),r=t.visualViewport,s=o.clientWidth,l=o.clientHeight,u=0,d=0;if(r){s=r.width,l=r.height;let L=sa();(!L||L&&a==="fixed")&&(u=r.offsetLeft,d=r.offsetTop)}let n=ua(o);if(n<=0){let L=o.ownerDocument,x=L.body,g=getComputedStyle(x),f=L.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,I=Math.abs(o.clientWidth-x.clientWidth-f);I<=pt&&(s-=I)}else n<=pt&&(s+=n);return{width:s,height:l,x:u,y:d}}var Ro=new Set(["absolute","fixed"]);function Mo(e,a){let t=ke(e,!0,a==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,s=le(e)?Re(e):re(1),l=e.clientWidth*s.x,u=e.clientHeight*s.y,d=r*s.x,n=o*s.y;return{width:l,height:u,x:d,y:n}}function mt(e,a,t){let o;if(a==="viewport")o=Ao(e,t);else if(a==="document")o=Po(se(e));else if(ae(a))o=Mo(a,t);else{let r=gt(e);o={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return be(o)}function It(e,a){let t=pe(e);return t===a||!ae(t)||ye(t)?!1:te(t).position==="fixed"||It(t,a)}function To(e,a){let t=a.get(e);if(t)return t;let o=Pe(e,[],!1).filter(u=>ae(u)&&we(u)!=="body"),r=null,s=te(e).position==="fixed",l=s?pe(e):e;for(;ae(l)&&!ye(l);){let u=te(l),d=ra(l);!d&&u.position==="fixed"&&(r=null),(s?!d&&!r:!d&&u.position==="static"&&!!r&&Ro.has(r.position)||Ae(l)&&!d&&It(e,l))?o=o.filter(L=>L!==l):r=u,l=pe(l)}return a.set(e,o),o}function Do(e){let{element:a,boundary:t,rootBoundary:o,strategy:r}=e,l=[...t==="clippingAncestors"?Ge(a)?[]:To(a,this._c):[].concat(t),o],u=l[0],d=l.reduce((n,L)=>{let x=mt(a,L,r);return n.top=ie(x.top,n.top),n.right=ge(x.right,n.right),n.bottom=ge(x.bottom,n.bottom),n.left=ie(x.left,n.left),n},mt(a,u,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Bo(e){let{width:a,height:t}=Lt(e);return{width:a,height:t}}function Fo(e,a,t){let o=le(a),r=se(a),s=t==="fixed",l=ke(e,!0,s,a),u={scrollLeft:0,scrollTop:0},d=re(0);function n(){d.x=ua(r)}if(o||!o&&!s)if((we(a)!=="body"||Ae(r))&&(u=ze(a)),o){let f=ke(a,!0,s,a);d.x=f.x+a.clientLeft,d.y=f.y+a.clientTop}else r&&n();s&&!o&&r&&n();let L=r&&!o&&!s?ht(r,u):re(0),x=l.left+u.scrollLeft-d.x-L.x,g=l.top+u.scrollTop-d.y-L.y;return{x,y:g,width:l.width,height:l.height}}function Pa(e){return te(e).position==="static"}function xt(e,a){if(!le(e)||te(e).position==="fixed")return null;if(a)return a(e);let t=e.offsetParent;return se(e)===t&&(t=t.ownerDocument.body),t}function Ct(e,a){let t=K(e);if(Ge(e))return t;if(!le(e)){let r=pe(e);for(;r&&!ye(r);){if(ae(r)&&!Pa(r))return r;r=pe(r)}return t}let o=xt(e,a);for(;o&&ft(o)&&Pa(o);)o=xt(o,a);return o&&ye(o)&&Pa(o)&&!ra(o)?t:o||it(e)||t}var Eo=async function(e){let a=this.getOffsetParent||Ct,t=this.getDimensions,o=await t(e.floating);return{reference:Fo(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Oo(e){return te(e).direction==="rtl"}var qo={convertOffsetParentRelativeRectToViewportRelativeRect:ko,getDocumentElement:se,getClippingRect:Do,getOffsetParent:Ct,getElementRects:Eo,getClientRects:vo,getDimensions:Bo,getScale:Re,isElement:ae,isRTL:Oo};function St(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function Ho(e,a){let t=null,o,r=se(e);function s(){var u;clearTimeout(o),(u=t)==null||u.disconnect(),t=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),s();let n=e.getBoundingClientRect(),{left:L,top:x,width:g,height:f}=n;if(u||a(),!g||!f)return;let I=We(x),S=We(r.clientWidth-(L+g)),b=We(r.clientHeight-(x+f)),p=We(L),y={rootMargin:-I+"px "+-S+"px "+-b+"px "+-p+"px",threshold:ie(0,ge(1,d))||1},k=!0;function C(M){let F=M[0].intersectionRatio;if(F!==d){if(!k)return l();F?l(!1,F):o=setTimeout(()=>{l(!1,1e-7)},1e3)}F===1&&!St(n,e.getBoundingClientRect())&&l(),k=!1}try{t=new IntersectionObserver(C,{...y,root:r.ownerDocument})}catch{t=new IntersectionObserver(C,y)}t.observe(e)}return l(!0),s}function bt(e,a,t,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,n=Aa(e),L=r||s?[...n?Pe(n):[],...Pe(a)]:[];L.forEach(p=>{r&&p.addEventListener("scroll",t,{passive:!0}),s&&p.addEventListener("resize",t)});let x=n&&u?Ho(n,t):null,g=-1,f=null;l&&(f=new ResizeObserver(p=>{let[h]=p;h&&h.target===n&&f&&(f.unobserve(a),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(a)})),t()}),n&&!d&&f.observe(n),f.observe(a));let I,S=d?ke(e):null;d&&b();function b(){let p=ke(e);S&&!St(S,p)&&t(),S=p,I=requestAnimationFrame(b)}return t(),()=>{var p;L.forEach(h=>{r&&h.removeEventListener("scroll",t),s&&h.removeEventListener("resize",t)}),x?.(),(p=f)==null||p.disconnect(),f=null,d&&cancelAnimationFrame(I)}}var wt=lt;var yt=ut,kt=rt;var vt=st,Pt=ot;var At=(e,a,t)=>{let o=new Map,r={platform:qo,...t},s={...r.platform,_c:o};return tt(e,a,{...r,platform:s})};function Uo(e){let a=e.getBoundingClientRect(),t=window.innerWidth,o=window.innerHeight;if(!(a.width>t*.8||a.height>o*.8))return e;let s=Math.max(a.left,0),l=Math.max(a.top,0),u=Math.min(a.right,t),d=Math.min(a.bottom,o),n=(s+u)/2,L=(l+d)/2;return{getBoundingClientRect(){return{width:0,height:0,x:n,y:L,top:L,left:n,right:n,bottom:L}}}}function Rt(e,a,t){let o=e.getBoundingClientRect();o.width>window.innerWidth*.8||o.height>window.innerHeight*.8||e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});let s=document.createElement("div");if(s.className="syntro-tooltip",s.setAttribute("role","tooltip"),s.innerHTML=J(t.html),!t.trigger||t.trigger==="immediate"){let p=document.createElement("button");p.className="syntro-tooltip-close",p.setAttribute("aria-label","Close"),p.textContent="\xD7",Object.assign(p.style,{position:"absolute",top:"4px",right:"4px",background:"none",border:"none",color:"inherit",fontSize:"16px",lineHeight:"1",cursor:"pointer",opacity:"0.6",padding:"2px 4px"}),p.addEventListener("mouseenter",()=>{p.style.opacity="1"}),p.addEventListener("mouseleave",()=>{p.style.opacity="0.6"}),p.addEventListener("click",()=>b.destroy()),s.style.position="relative",s.appendChild(p)}let l=s.querySelectorAll("[data-syntro-action]"),u=p=>{let y=p.currentTarget.getAttribute("data-syntro-action");y&&t.onAction&&t.onAction(y)};l.forEach(p=>p.addEventListener("click",u));let d=document.createElement("div");d.className="syntro-tooltip-arrow",s.appendChild(d),a.appendChild(s);let n=[wt(t.offsetPx??8),kt(),yt({padding:8}),vt(),Pt({element:d})],L=t.placement&&t.placement!=="auto"?t.placement:"top",x=bt(e,s,async()=>{let p=Uo(e),h=await At(p,s,{placement:L,middleware:n}),{x:y,y:k,strategy:C,middlewareData:M,placement:F}=h;if(Object.assign(s.style,{left:`${y}px`,top:`${k}px`,position:C}),M.arrow){let{x:z,y:R}=M.arrow,P=F.split("-")[0],B={top:"bottom",right:"left",bottom:"top",left:"right"};Object.assign(d.style,{left:z!=null?`${z}px`:"",top:R!=null?`${R}px`:"",right:"",bottom:"",[B[P]]:"-4px"});let D={top:"0deg",right:"90deg",bottom:"180deg",left:"270deg"};d.style.transform=`rotate(${D[P]||"0deg"})`}}),g=p=>{p.key==="Escape"&&b.destroy()};window.addEventListener("keydown",g);let f=[];if(t.blocking){Array.from(document.body.children).forEach(h=>{h!==a&&h.getAttribute("inert")===null&&(h.setAttribute("inert",""),f.push(h.id||h.tagName))});let p=Array.from(s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(p.length>0){let h=p[0],y=p[p.length-1],k=C=>{C.key==="Tab"&&(C.shiftKey?document.activeElement===h&&(y.focus(),C.preventDefault()):document.activeElement===y&&(h.focus(),C.preventDefault()))};s.addEventListener("keydown",k),requestAnimationFrame(()=>h.focus())}}let S=(()=>{if(t.trigger==="hover"){let p=()=>{s.style.visibility="visible",s.style.opacity="1"},h=()=>{s.style.visibility="hidden",s.style.opacity="0"};return s.style.visibility="hidden",s.style.opacity="0",s.style.transition="opacity 200ms ease, visibility 200ms",e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",h),e.addEventListener("focus",p),e.addEventListener("blur",h),()=>{e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",h),e.removeEventListener("focus",p),e.removeEventListener("blur",h)}}if(t.trigger==="click"){let p=()=>{s.style.visibility==="visible"?b.destroy():(s.style.visibility="visible",s.style.opacity="1")};return s.style.visibility="hidden",s.style.opacity="0",s.style.transition="opacity 200ms ease, visibility 200ms",e.addEventListener("click",p),()=>e.removeEventListener("click",p)}return s.style.opacity="0",s.style.transition="opacity 200ms ease",requestAnimationFrame(()=>{s.style.opacity="1"}),()=>{}})(),b={el:s,destroy(){x(),S(),window.removeEventListener("keydown",g),l.forEach(p=>p.removeEventListener("click",u)),t.blocking&&Array.from(document.body.children).forEach(p=>{p!==a&&p.removeAttribute("inert")}),s.style.pointerEvents="none",s.style.opacity="0",setTimeout(()=>s.remove(),200)}};return b}var No=async(e,a)=>{let t=a.resolveAnchor(e.anchorId);if(!t)throw new Error(`Anchor not found: ${e.anchorId}`);let o=za(t,a.overlayRoot,{paddingPx:e.style?.paddingPx??12,radiusPx:e.style?.radiusPx??12,scrimOpacity:e.style?.scrimOpacity??.55,ringColor:e.style?.color,blocking:e.blocking??!1,onClickOutside:e.onClickOutside??!0,onEsc:e.onEsc??!0});return a.publishEvent("action.applied",{id:a.generateId(),kind:"overlays:highlight",anchorId:e.anchorId}),{cleanup:()=>{o.destroy()}}},$o=async(e,a)=>{let t=a.resolveAnchor(e.anchorId);if(!t)throw new Error(`Anchor not found: ${e.anchorId}`);let o=e.duration??2e3;if(!document.querySelector("[data-syntro-pulse-styles]")){let l=document.createElement("style");l.setAttribute("data-syntro-pulse-styles",""),l.textContent=`
|
|
54
|
-
@keyframes syntro-pulse-anim {
|
|
55
|
-
0%, 100% {
|
|
56
|
-
box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
|
|
57
|
-
}
|
|
58
|
-
50% {
|
|
59
|
-
box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`,document.head.appendChild(l)}let r=t.style.animation;t.style.animation="syntro-pulse-anim 1s cubic-bezier(0.4, 0, 0.6, 1) infinite",t.setAttribute("data-syntro-pulse","true");let s=setTimeout(()=>{t.style.animation=r,t.removeAttribute("data-syntro-pulse")},o);return a.publishEvent("action.applied",{id:a.generateId(),kind:"overlays:pulse",anchorId:e.anchorId,duration:o}),{cleanup:()=>{clearTimeout(s),t.style.animation=r,t.removeAttribute("data-syntro-pulse")}}},Wo=async(e,a)=>{let t=a.resolveAnchor(e.anchorId);if(!t)throw new Error(`Anchor not found: ${e.anchorId}`);let o=document.createElement("div");o.textContent=e.content,o.setAttribute("data-syntro-badge",e.anchorId),Object.assign(o.style,{position:"absolute",padding:"2px 6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",color:"white",background:"var(--syntro-accent, #4f46e5)",borderRadius:"9999px",pointerEvents:"none",zIndex:"2147483646",whiteSpace:"nowrap"});let r=e.position??"top-right",s=t.style.position;switch(getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(o),r){case"top-left":Object.assign(o.style,{top:"-8px",left:"-8px"});break;case"top-right":Object.assign(o.style,{top:"-8px",right:"-8px"});break;case"bottom-left":Object.assign(o.style,{bottom:"-8px",left:"-8px"});break;case"bottom-right":Object.assign(o.style,{bottom:"-8px",right:"-8px"});break}return a.publishEvent("action.applied",{id:a.generateId(),kind:"overlays:badge",anchorId:e.anchorId,content:e.content,position:r}),{cleanup:()=>{o.remove(),s!==void 0&&(t.style.position=s)},updateFn:l=>{"content"in l&&typeof l.content=="string"&&(o.textContent=l.content)}}},Go=async(e,a)=>{let t=a.resolveAnchor(e.anchorId);if(!t)throw new Error(`Anchor not found: ${e.anchorId}`);let{content:o}=e,r="";if(o.title&&(r+=`<div class="syntro-tt-title">${J(o.title)}</div>`),r+=`<div class="syntro-tt-body">${J(o.body)}</div>`,o.ctaButtons&&o.ctaButtons.length>0){r+='<div class="syntro-tt-actions">';for(let l of o.ctaButtons){let u=l.primary??!1;r+=`
|
|
63
|
-
<button
|
|
64
|
-
class="syntro-tt-btn ${u?"syntro-tt-btn-primary":""}"
|
|
65
|
-
data-syntro-action="${J(l.actionId)}"
|
|
66
|
-
>
|
|
67
|
-
${J(l.label)}
|
|
68
|
-
</button>
|
|
69
|
-
`}r+="</div>"}else o.cta&&(r+=`<div class="syntro-tt-actions">
|
|
70
|
-
<button class="syntro-tt-btn syntro-tt-btn-primary" data-syntro-action="cta">
|
|
71
|
-
${J(o.cta.label)}
|
|
72
|
-
</button>
|
|
73
|
-
</div>`);let s=Rt(t,a.overlayRoot,{html:r,placement:e.placement??"top",trigger:e.trigger??"immediate",onAction:l=>{if(l==="dismiss"){s.destroy();return}if(l==="cta"&&o.cta)a.publishEvent("action.cta_clicked",{anchorId:e.anchorId,ctaLabel:o.cta.label});else if(o.ctaButtons){let u=o.ctaButtons.find(d=>d.actionId===l);u&&a.publishEvent("action.tooltip_cta_clicked",{anchorId:e.anchorId,actionId:l,label:u.label})}s.destroy()}});return a.publishEvent("action.applied",{id:a.generateId(),kind:"overlays:tooltip",anchorId:e.anchorId,trigger:e.trigger??"immediate"}),{cleanup:()=>{s.destroy()}}},Ra=[{kind:"overlays:highlight",executor:No},{kind:"overlays:pulse",executor:$o},{kind:"overlays:badge",executor:Wo},{kind:"overlays:tooltip",executor:Go},{kind:"overlays:modal",executor:Va}],Ve={id:"adaptive-overlays",version:"1.0.0",name:"Overlays",description:"Tooltips, highlights, badges, modals, and visual overlays",executors:Ra};var Mt={id:Ve.id,version:Ve.version,name:Ve.name,description:Ve.description,runtime:{actions:Ra.map(({kind:e,executor:a})=>({kind:e,executor:a}))},editor:ya,metadata:{isBuiltIn:!0}};if(typeof window<"u"){let e=window.SynOS?.appRegistry;e&&typeof e.register=="function"&&e.register(Mt)}var Mn=Mt;export{Mn as default,Mt as manifest};
|
|
74
|
-
/*! Bundled license information:
|
|
75
|
-
|
|
76
|
-
lucide-react/dist/esm/shared/src/utils.js:
|
|
77
|
-
lucide-react/dist/esm/defaultAttributes.js:
|
|
78
|
-
lucide-react/dist/esm/Icon.js:
|
|
79
|
-
lucide-react/dist/esm/createLucideIcon.js:
|
|
80
|
-
lucide-react/dist/esm/icons/message-square.js:
|
|
81
|
-
lucide-react/dist/esm/icons/route.js:
|
|
82
|
-
lucide-react/dist/esm/icons/sparkles.js:
|
|
83
|
-
lucide-react/dist/esm/icons/square.js:
|
|
84
|
-
lucide-react/dist/esm/icons/tag.js:
|
|
85
|
-
lucide-react/dist/esm/icons/zap.js:
|
|
86
|
-
lucide-react/dist/esm/lucide-react.js:
|
|
87
|
-
(**
|
|
88
|
-
* @license lucide-react v0.539.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*)
|
|
93
|
-
*/
|
|
94
|
-
//# sourceMappingURL=index.js.map
|