@sentientui/react 0.19.1 → 0.21.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 +25 -1
- package/dist/devtools.js +1 -1
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +1 -1
- package/dist/devtools.mjs.map +1 -1
- package/dist/index.d.cts +70 -2
- package/dist/index.d.ts +70 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/next/adaptive-root.d.ts +10 -0
- package/dist/next/adaptive-root.js +2 -2
- package/dist/next/adaptive-root.js.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/dist/testing.mjs.map +1 -1
- package/llms.txt +8 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
var tt=Object.defineProperty,nt=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var he=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var be=(e,t,n)=>t in e?tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t)=>{for(var n in t||(t={}))it.call(t,n)&&be(e,n,t[n]);if(he)for(var n of he(t))ot.call(t,n)&&be(e,n,t[n]);return e},J=(e,t)=>nt(e,rt(t));import{createContext as ct,useContext as E,useEffect as B,useMemo as Pe,useRef as Te,useState as q,useSyncExternalStore as ut}from"react";import{detectDeviceClass as dt,detectTrafficSource as ft,init as gt}from"@sentientui/core";var we=new Map,H=new Map;function Ae(e,t){let n=H.get(e);return n||(n=new Set,H.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&H.delete(e)}}function xe(e,t){we.set(e,t);let n=H.get(e);if(n)for(let s of n)try{s(t)}catch(l){}}function ke(e){var t;return(t=we.get(e))!=null?t:null}var st={on:!1,listeners:new Set};function Ce(){if(typeof window=="undefined")return st;let e=window;return e.__sentient_preview||(e.__sentient_preview={on:!1,listeners:new Set}),e.__sentient_preview}function oe(){return Ce().on}function Re(e){let t=Ce().listeners;return t.add(e),()=>{t.delete(e)}}function _e(e){return{isLocal:e.isLocal,track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},fetchWeights:()=>Promise.resolve([]),getAssignment:(t,n)=>e.getAssignment(t,n),assign:(t,n,s,l)=>e.assign(t,n,s,l),decide:()=>Promise.resolve(null),getSlotResult:t=>e.getSlotResult(t),getPersona:()=>e.getPersona(),getGraph:()=>e.getGraph(),dispose:()=>e.dispose(),destroy:()=>e.destroy()}}var Ge="sentient:overrides-changed";function se(){var e;return typeof window=="undefined"?0:(e=window.__sentient_overrides_version)!=null?e:0}function T(e){return typeof window=="undefined"?()=>{}:(window.addEventListener(Ge,e),()=>window.removeEventListener(Ge,e))}function Oe(e){typeof window!="undefined"&&(window.__sentient_devtools_config=e)}function R(){var e;return typeof process=="undefined"||((e=process.env)==null?void 0:e.NODE_ENV)!=="production"}function L(e){return typeof e=="string"?{type:"click"}:e}function j(e){return typeof e=="string"?e:e.type}function at(e){if(!(e instanceof Element))return!1;let t=e.tagName.toLowerCase();return t==="a"||t==="button"?!0:e.getAttribute("role")==="button"}function Ee(e,t,n){if(n){try{let l=e;for(;l&&l!==t;){if(l.matches(n))return!0;l=l.parentElement}}catch(l){}return!1}let s=e;for(;s&&s!==t;){if(at(s))return!0;s=s.parentElement}return!1}function I(e,t,n){if(t.type==="weighted_composite"){let i=new Set,u=[];return t.steps.forEach(({goal:a,name:h,weight:d},p)=>{let k=()=>{i.has(p)||(i.add(p),n.fireStep(h,d,p))};if(a.type==="click"){let m=f=>{let v=f.target;v instanceof Element&&Ee(v,e,a.selector)&&k()};e.addEventListener("click",m),u.push(()=>e.removeEventListener("click",m));return}if(a.type==="form_submit"){let m=f=>{f.target instanceof HTMLFormElement&&e.contains(f.target)&&k()};e.addEventListener("submit",m),u.push(()=>e.removeEventListener("submit",m));return}if(a.type==="scroll_depth"){let m=Math.max(0,Math.min(1,a.threshold)),f=new IntersectionObserver(v=>{for(let o of v)if(o.intersectionRatio>=m){k(),f.disconnect();break}},{threshold:[m]});f.observe(e),u.push(()=>f.disconnect())}}),()=>{for(let a of u)a()}}let s=t.type==="composite"?t.all:[t],l=new Set(s.map((i,u)=>u)),r=i=>{l.delete(i),l.size===0&&n.fireGoal()},c=[];return s.forEach((i,u)=>{if(i.type==="click"){let a=h=>{let d=h.target;d instanceof Element&&Ee(d,e,i.selector)&&(t.type==="composite"?r(u):n.fireGoal())};e.addEventListener("click",a),c.push(()=>e.removeEventListener("click",a));return}if(i.type==="form_submit"){let a=h=>{h.target instanceof HTMLFormElement&&e.contains(h.target)&&(t.type==="composite"?r(u):n.fireGoal())};e.addEventListener("submit",a),c.push(()=>e.removeEventListener("submit",a));return}if(i.type==="scroll_depth"){let a=Math.max(0,Math.min(1,i.threshold)),h=new IntersectionObserver(d=>{for(let p of d)if(p.intersectionRatio>=a){t.type==="composite"?r(u):n.fireGoal(),h.disconnect();break}},{threshold:[a]});h.observe(e),c.push(()=>h.disconnect());return}}),()=>{for(let i of c)i()}}function D(e,t,n,s){e.track({projectId:t,componentId:n,variantId:s,eventType:"variant_assigned",payload:{}})}var lt={components:new Map,slots:new Map,sections:[],listeners:new Set,version:0};function M(){if(typeof window=="undefined")return lt;let e=window;return e.__sentient_registry||(e.__sentient_registry={components:new Map,slots:new Map,sections:[],listeners:new Set,version:0}),e.__sentient_registry}function $(){M().version+=1;for(let e of M().listeners)e()}var Le=()=>{};function z(e){return R()?(M().components.set(e.id,e),$(),()=>{M().components.delete(e.id),$()}):Le}function X(e){return R()?(M().slots.set(e.id,e),$(),()=>{M().slots.delete(e.id),$()}):Le}function Ie(e){R()&&(M().sections=[...e],$())}import{jsx as ht}from"react/jsx-runtime";function pt(){var e,t;if(typeof window=="undefined")return"desktop:direct";try{let n=dt((e=navigator.userAgent)!=null?e:""),s=ft((t=document.referrer)!=null?t:"",window.location.origin);return`${n}:${s}`}catch(n){return"desktop:direct"}}var De="https://api.sentient-ui.com/v1",O=ct({client:null,apiKey:"",initialAssignments:{},sessionSegment:"desktop:direct",ssrFallback:"first",onAssignment:void 0,initialLayoutOrder:null,initialSlots:{},initialPersona:null,apiBaseUrl:De,debug:!1});function mt(e){let[t,n]=q(!1),s=Te(e);s.current=e;let{cookie:l,value:r,event:c}=e!=null?e:{},i=typeof(e==null?void 0:e.check)=="function";return B(()=>{let u=()=>{var p;let h=s.current;if(!h)return!1;if(h.check)return h.check()===!0;if(!h.cookie||typeof document=="undefined")return!1;let d=`${h.cookie}=${(p=h.value)!=null?p:"accepted"}`;return document.cookie.split("; ").some(k=>k.trim()===d)};if(u()){n(!0);return}if(!c)return;let a=()=>{u()&&n(!0)};return window.addEventListener(c,a),()=>window.removeEventListener(c,a)},[l,r,c,i]),t}function vt(e){var k,m;let[t,n]=q(null),[s]=q(()=>{var f;return(f=e.sessionSegment)!=null?f:pt()}),[l,r]=q(oe());B(()=>Re(()=>r(oe())),[]);let c=mt(e.consentFrom),i=e.consentFrom?e.consent===!0||c:e.consent;B(()=>{if(i===!1&&!e.preConsentBehavior){n(b=>(b==null||b.destroy(),null));return}let f={apiKey:e.apiKey,context:e.context,debug:e.debug,initialAssignments:e.initialAssignments,sessionSegment:s,consent:i,preConsentBehavior:e.preConsentBehavior,respectDoNotTrack:e.respectDoNotTrack,ssrSessionId:e.ssrSessionId,country:e.country,localMode:e.localMode,initialSlots:e.initialSlots,initialPersona:e.initialPersona,ingestUrl:e.apiBaseUrl?`${e.apiBaseUrl.replace(/\/$/,"")}/events`:void 0},v=!1,o=null,g=null,y=b=>{e.engagement!==!1&&import("@sentientui/core/engagement").then(({startEngagementCapture:A})=>{v||(g=A(b,{apiKey:e.apiKey,apiBase:e.apiBaseUrl?e.apiBaseUrl.replace(/\/$/,""):void 0}))})};return e.enableGraph!==!1?import("@sentientui/core/graph").then(({init:b})=>{v||(o=b(J(G({},f),{graph:!0,captureDomText:e.captureDomText===!0})),n(o),y(o))}):(o=gt(f),n(o),y(o)),()=>{v=!0,g==null||g(),o==null||o.dispose()}},[i]),B(()=>{if(!t)return;let f=!1,v=async()=>{if(f)return;let g;try{g=await t.fetchWeights()}catch(y){return}if(!f)for(let y of g){let b={componentId:y.componentId,updatedAt:y.updatedAt,variants:y.variants.map(A=>{var C;return{variantId:A.variantId,pulls:A.pulls,avgReward:(C=A.avgReward)!=null?C:0}})};xe(y.componentId,b)}};v();let o=setInterval(()=>{v()},6e4);return()=>{f=!0,clearInterval(o)}},[t]);let u=(k=e.ssrFallback)!=null?k:"first",a=((m=e.apiBaseUrl)!=null?m:De).replace(/\/$/,""),h=Te(null);B(()=>{var o;if(typeof process!="undefined"&&((o=process.env)==null?void 0:o.NODE_ENV)==="production")return;let f={apiKey:e.apiKey,context:e.context,country:e.country,apiBaseUrl:a},v=h.current;if(h.current=f,v!==null)for(let g of["apiKey","context","country","apiBaseUrl"])Object.is(v[g],f[g])||console.warn(`[sentient] AdaptiveProvider: \`${g}\` changed after initialisation, but the SDK client is stable for the session and only re-inits on \`consent\` \u2014 the new value is ignored. Remount the provider (e.g. via a changing \`key\` prop) to apply it.`)},[e.apiKey,e.context,e.country,a]),B(()=>{var f;typeof process!="undefined"&&((f=process.env)==null?void 0:f.NODE_ENV)==="production"||Oe({apiKey:e.apiKey,apiBaseUrl:a,isLocal:(t==null?void 0:t.isLocal)===!0})},[t,e.apiKey,a]),B(()=>{e.initialLayoutOrder&&e.initialLayoutOrder.length>0&&Ie(e.initialLayoutOrder)},[e.initialLayoutOrder]);let d=Pe(()=>t&&l?_e(t):t,[t,l]),p=Pe(()=>{var f,v,o,g,y;return{client:d,apiKey:e.apiKey,initialAssignments:(f=e.initialAssignments)!=null?f:{},sessionSegment:s,ssrFallback:u,onAssignment:e.onAssignment,initialLayoutOrder:(v=e.initialLayoutOrder)!=null?v:null,initialSlots:(o=e.initialSlots)!=null?o:{},initialPersona:(g=e.initialPersona)!=null?g:null,apiBaseUrl:a,debug:(y=e.debug)!=null?y:!1}},[d,e.apiKey,e.initialAssignments,s,u,e.onAssignment,e.initialLayoutOrder,e.initialSlots,e.initialPersona,a,e.debug]);return ht(O.Provider,{value:p,children:e.children})}function _(){return E(O).client}function P(){return E(O).apiKey}function ae(){return E(O).initialAssignments}function Q(){return E(O).sessionSegment}function Me(){return E(O).ssrFallback}function Y(){return E(O).onAssignment}function Be(){return E(O).debug}function yt(){let e=E(O).initialLayoutOrder,t=ut(T,()=>{var n;return typeof window=="undefined"?null:(n=window.__sentient_layout_override)!=null?n:null},()=>null);return t!=null?t:e}function Fe(){return E(O).initialSlots}function Ke(){return E(O).initialPersona}function St(){return E(O).apiBaseUrl}import{memo as xt,useEffect as F,useMemo as Ne,useRef as ee,useState as kt}from"react";import{attachMicroSignalDetectors as Ct}from"@sentientui/core";import{useEffect as Z,useRef as je,useState as bt,useSyncExternalStore as wt}from"react";function W(e){var n;if(typeof window=="undefined")return null;let t=(n=window.__sentient_overrides)==null?void 0:n[e];if(t)return t;if(!window.location.search)return null;try{let s=new URLSearchParams(window.location.search);for(let l of s.getAll("sentient_variant")){let r=l.indexOf(":");if(r!==-1&&l.slice(0,r)===e)return l.slice(r+1)}}catch(s){}return null}var At=5;function We(e,t){var s,l;let n=null;for(let r of e.variants){if(!t.includes(r.variantId))continue;let c=(s=r.pulls)!=null?s:0,i=c>0?c*r.avgReward/(c+At):0;(!n||i>n.score)&&(n={variantId:r.variantId,score:i})}return(l=n==null?void 0:n.variantId)!=null?l:null}function U(e,t,n,s){let l=ae(),r=Me(),c=_(),i=Q(),u=Y(),a=Be(),h=je(null),d=wt(T,()=>W(e),()=>null),p=d&&t.includes(d)?d:null,k=je(null);Z(()=>{a&&p&&k.current!==p&&(k.current=p,console.info(`[sentient] override active: ${e} -> ${p}`))},[a,p,e]);let[m,f]=bt(()=>{var y,b;if(p)return{variantId:p,content:null,isLoading:!1,settled:!0};if(!c){let A=l[e];return A&&t.includes(A)?{variantId:A,content:null,isLoading:!1,settled:!0}:r==="first"&&t.length>0?{variantId:t[0],content:null,isLoading:!1,settled:!1}:{variantId:null,content:null,isLoading:!0,settled:!1}}let o=c.getAssignment(e,i);if(o&&(t.includes(o.variantId)||o.content))return{variantId:o.variantId,content:(y=o.content)!=null?y:null,isLoading:!1,settled:!0};let g=ke(e);if(g){let A=We(g,t);if(A)return{variantId:A,content:null,isLoading:!1,settled:!0}}return{variantId:(b=t[0])!=null?b:null,content:null,isLoading:!1,settled:!1}}),v=o=>{u&&h.current!==o&&(h.current=o,u(e,o))};return Z(()=>{var g;if(p||!c)return;let o=c.getAssignment(e,i);if(o&&(t.includes(o.variantId)||o.content)){f({variantId:o.variantId,content:(g=o.content)!=null?g:null,isLoading:!1,settled:!0}),v(o.variantId);return}f(y=>{var b;return y.variantId?y:{variantId:(b=t[0])!=null?b:null,content:null,isLoading:!1,settled:!1}})},[p,c,e,i]),Z(()=>{if(p||!c)return;let o=c.getAssignment(e,i);if(o&&t.includes(o.variantId))return;let g=!1;return c.assign(e,t,n,s).then(y=>{var b;g||y&&(!t.includes(y.variantId)&&!y.content||(f({variantId:y.variantId,content:(b=y.content)!=null?b:null,isLoading:!1,settled:!0}),v(y.variantId)))}),()=>{g=!0}},[p,c,e,i]),Z(()=>{if(!p&&c)return Ae(e,o=>{var b;let g=c.getAssignment(e,i);if(g&&(t.includes(g.variantId)||g.content)){f({variantId:g.variantId,content:(b=g.content)!=null?b:null,isLoading:!1,settled:!0});return}let y=We(o,t);y&&f({variantId:y,content:null,isLoading:!1,settled:!0})})},[p,c,e,i]),p?{variantId:p,content:null,isLoading:!1,settled:!0,isOverride:!0}:m}import{jsx as Gt}from"react/jsx-runtime";function Rt(e){var b;let t=_(),n=P(),s=Object.keys(e.variants).join("\0"),l=Ne(()=>Object.keys(e.variants),[s]),{variantId:r,content:c,isOverride:i,settled:u}=U(e.id,l,e.agentData,e.agentDataByVariant),a=ee(null),[h,d]=kt(!1);F(()=>{d(!0)},[]);let p=ee(!1),k=ee(new Set),m=ee(null),f=typeof e.goal=="string"?e.goal:JSON.stringify(e.goal),v=Ne(()=>L(e.goal),[f]),o=typeof e.goal=="string"?e.goal:v.type;if(F(()=>z({id:e.id,variantIds:l,goal:o}),[e.id,l,o]),F(()=>{i||u&&(!t||!r||!n||m.current!==r&&(m.current=r,D(t,n,e.id,r)))},[t,r,n,e.id,i,u]),F(()=>{p.current=!1,k.current=new Set},[r,v]),F(()=>{if(i||!u||!t||!r)return;let A=a.current;if(!A)return;let C=null,S=0,w=()=>{S=Date.now(),C=setTimeout(()=>{t.track({projectId:n,componentId:e.id,variantId:r,eventType:"cursor_signal",payload:{hoverDuration:Date.now()-S}}),C=null},800)},x=()=>{C!==null&&(clearTimeout(C),C=null)};return A.addEventListener("mouseenter",w),A.addEventListener("mouseleave",x),()=>{A.removeEventListener("mouseenter",w),A.removeEventListener("mouseleave",x),C!==null&&clearTimeout(C)}},[t,r,n,e.id,i,u]),F(()=>{if(i||!u||!t||!r)return;let A=a.current;if(!A)return;let C=Date.now();return Ct((S,w={})=>{var ve,ye,Se;t.track({projectId:n,componentId:e.id,variantId:r,eventType:"micro_signal",payload:G({signalType:S},w)});let x=(ve=e.microSignalGoals)==null?void 0:ve[S];if(!x||k.current.has(S))return;k.current.add(S);let K=typeof x=="string"?x:x.name,V=typeof x=="string"?1:(ye=x.weight)!=null?ye:1,et=typeof x=="string"?0:(Se=x.stepIndex)!=null?Se:0;t.goal(K,G({signalType:S},w),V,et)},A,C)},[t,r,n,e.id,e.microSignalGoals,i,u]),F(()=>{if(i||!t||!r)return;let A=a.current;if(A)return I(A,v,{fireGoal:()=>{p.current||(p.current=!0,t.track({projectId:n,componentId:e.id,variantId:r,eventType:"goal_achieved",goalType:o,payload:{reward:1}}),t.goal(o,{componentId:e.id,variantId:r},1,0))},fireStep:(C,S,w)=>{t.track({projectId:n,componentId:e.id,variantId:r,eventType:"goal_achieved",goalType:C,payload:{reward:S}}),t.goal(C,{},S,w)}})},[t,r,n,e.id,v,o,i]),e.clientOnly&&(!h||!t)||!r)return null;let g=(b=e.variants[r])!=null?b:null,y=g===null?c:null;return R()&&g===null&&y===null&&console.warn(`[sentient] <Adaptive id="${e.id}"> was assigned variant "${r}" but no matching key exists in props.variants. If this is a dashboard-managed text variant, use <AdaptiveText id="${e.id}"> instead.`),Gt("div",{ref:a,"data-sentient-id":e.id,"data-sentient-variant":r,children:g!=null?g:y})}var _t=xt(Rt,(e,t)=>{if(e.id!==t.id||e.goal!==t.goal&&JSON.stringify(e.goal)!==JSON.stringify(t.goal)||e.microSignalGoals!==t.microSignalGoals||e.clientOnly!==t.clientOnly||e.agentData!==t.agentData||e.agentDataByVariant!==t.agentDataByVariant)return!1;if(e.variants===t.variants)return!0;let n=Object.keys(e.variants),s=Object.keys(t.variants);return n.length!==s.length?!1:n.every(l=>l in t.variants&&Object.is(e.variants[l],t.variants[l]))});import{useEffect as te,useMemo as Ot,useRef as le,useState as $e,useSyncExternalStore as Et}from"react";import{jsx as It}from"react/jsx-runtime";function Lt({id:e,default:t,component:n="span",className:s,goal:l}){var C;let r=_(),c=P(),i=Y(),u=Q(),a=le(null),h=le(null),d=Et(T,()=>W(e),()=>null),[p,k]=$e(()=>{var S,w;return(w=(S=r==null?void 0:r.getAssignment(e,u))==null?void 0:S.content)!=null?w:null}),[m,f]=$e(()=>{var S,w;return(w=(S=r==null?void 0:r.getAssignment(e,u))==null?void 0:S.variantId)!=null?w:null});te(()=>{var w;if(d||!r||((w=r.getAssignment(e,u))==null?void 0:w.content)!==void 0)return;let S=!1;return r.assign(e).then(x=>{if(!S){if(!x){R()&&console.warn(`[sentient] <AdaptiveText id="${e}"> assignment failed \u2014 showing default text.`);return}f(x.variantId),x.content&&k(x.content)}}),()=>{S=!0}},[r,e,u,d]),te(()=>{d||!r||!m||!c||a.current!==m&&(a.current=m,r.track({projectId:c,componentId:e,variantId:m,eventType:"variant_assigned",payload:{}}),i==null||i(e,m))},[r,m,c,e,i,d]);let v=l===void 0?"":typeof l=="string"?l:JSON.stringify(l),o=Ot(()=>l===void 0?null:L(l),[v]),g=l===void 0?null:typeof l=="string"?l:o.type,y=le(!1);te(()=>{y.current=!1},[m,v]),te(()=>{if(d||!r||!m||!c||!o||!g)return;let S=h.current;if(S)return I(S,o,{fireGoal:()=>{y.current||(y.current=!0,r.track({projectId:c,componentId:e,variantId:m,eventType:"goal_achieved",goalType:g,payload:{reward:1}}),r.goal(g,{componentId:e,variantId:m},1,0))},fireStep:(w,x,K)=>{r.track({projectId:c,componentId:e,variantId:m,eventType:"goal_achieved",goalType:w,payload:{reward:x}}),r.goal(w,{},x,K)}})},[r,m,c,e,o,g,d]);let b=p!=null?p:t;if(d){let S=r==null?void 0:r.getAssignment(e,u);b=S&&S.variantId===d&&(C=S.content)!=null?C:t}return It(n,{ref:S=>{h.current=S},className:s,children:b})}import{useCallback as Pt}from"react";function Tt(e){let t=_();return Pt((n,s)=>{var l,r;W(e)||(t==null||t.componentGoal(e,n,s),t==null||t.goal(n,(l=s==null?void 0:s.metadata)!=null?l:{},(r=s==null?void 0:s.reward)!=null?r:1,0))},[t,e])}import{renderPrePaintScript as Dt}from"@sentientui/core";import{confidenceBand as Mt}from"@sentientui/policy";import{jsx as Kt}from"react/jsx-runtime";function Ue(e){return JSON.stringify(e).replace(/</g,"\\u003c")}function Bt(e){return e.persona?'(function(){try{var d=document.documentElement;if(d.hasAttribute("data-sentient-persona"))return;d.setAttribute("data-sentient-persona",'+Ue(e.persona.persona)+');d.setAttribute("data-sentient-confidence",'+Ue(Mt(e.persona.confidence))+");}catch(e){}})();":Dt(e.apiKey)}function Ft(e){return Kt("script",{"data-sentient-persona-script":"",nonce:e.nonce,dangerouslySetInnerHTML:{__html:Bt(e)}})}import{useEffect as ue,useMemo as de,useRef as Jt}from"react";import{validateSlotDecl as Ht}from"@sentientui/policy";import{useEffect as ce,useReducer as jt,useState as Wt,useSyncExternalStore as Je}from"react";import{armOfResult as ne,baselineResultFor as Nt}from"@sentientui/core";import{confidenceBand as $t}from"@sentientui/policy";var Ve=new Set;function re(e,t){var h;Je(T,se,()=>0);let n=_(),s=Fe(),[,l]=jt(d=>d+1,0),r=typeof window!="undefined"?(h=window.__sentient_slot_overrides)==null?void 0:h[e]:void 0,c=r===void 0?s[e]:void 0,i=r===void 0&&c===void 0&&n?n.getSlotResult(e):null,u=(n==null?void 0:n.isLocal)===!0&&r===void 0&&c===void 0&&i===null;ce(()=>{if(!u||!n)return;let d=!1;return n.decide({slots:[t]}).then(p=>{!d&&p&&l()}),()=>{d=!0}},[n,e,u]);let a=(()=>{if(r!==void 0)return{result:r,arm:ne(r),source:"override"};if(c!==void 0)return{result:c,arm:ne(c),source:"preloaded"};if(i!==null)return{result:i,arm:ne(i),source:"client"};let d=Nt(t);return{result:d,arm:ne(d),source:"baseline"}})();return ce(()=>{R()&&(!n||n.isLocal===!0||a.source==="baseline"&&(Ve.has(e)||(Ve.add(e),console.warn(`[sentient] slot "${e}" resolved to its baseline \u2014 no SSR-preloaded or decided result. Keyed clients decide slots server-side, so this slot serves baseline for the whole session and records no exposure. Preload it via loadAdaptiveDecision()/initialSlots so it can serve a decided arm and learn.`))))},[n,a.source,e]),a}function Ut(){var t;if(typeof window=="undefined")return null;let e=window.__sentient_persona_override;if(e!=null&&e.persona)return{persona:e.persona,confidence:(t=e.confidence)!=null?t:1};try{let n=new URLSearchParams(window.location.search).get("sentient_persona");if(n)return{persona:n,confidence:1}}catch(n){}return null}function Vt(){let e=_(),t=Ke();Je(T,se,()=>0);let[n,s]=Wt(!1);ce(()=>s(!0),[]);let l=i=>({persona:i.persona,confidence:i.confidence,band:$t(i.confidence)});if(!n)return t?l(t):null;let r=Ut();if(r)return l(r);if(t)return l(t);let c=e?e.getPersona():null;return c?l(c):null}var fe=new Set;function zt(e){return typeof CSS!="undefined"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[\\"]/g,"\\$&")}function Xt(e,t,n){let s=_(),l=P(),r=JSON.stringify(t),c=de(()=>({id:e,dims:t}),[e,r]),{result:i,arm:u,source:a}=re(e,c),h=de(()=>typeof i=="string"?{}:i,[u]);if(R()&&!fe.has(e)){let m=Ht({id:e,dims:Object.fromEntries(Object.entries(t).map(([v,o])=>[v,[...o]]))}),f=Object.values(t).reduce((v,o)=>v*o.length,1);m.ok?f>4&&(fe.add(e),console.warn(`[sentient] useAdaptiveTokens("${e}") declares ${f} combinations \u2014 more than the recommended 4. Each extra combination needs more traffic to learn; consider fewer dims/values.`)):(fe.add(e),console.warn(`[sentient] useAdaptiveTokens("${e}"): invalid declaration \u2014 ${m.reason}. Serving baseline.`))}let d=(n==null?void 0:n.goal)===void 0?null:typeof n.goal=="string"?n.goal:JSON.stringify(n.goal);ue(()=>X({id:e,dims:t}),[e]);let p=Jt(null);ue(()=>{!s||a==="baseline"||a==="override"||p.current===u||(p.current=u,D(s,l,e,u))},[s,l,e,u,a]),ue(()=>{if(!s||!(n!=null&&n.goal)||a==="override")return;let m=document.querySelector(`[data-sentient-slot="${zt(e)}"]`);if(!m){R()&&console.warn(`[sentient] useAdaptiveTokens("${e}"): a goal is declared but no element carries the returned props \u2014 spread {...props} on the slot's element.`);return}let f=j(n.goal),v=!1;return I(m,L(n.goal),{fireGoal:()=>{v||(v=!0,s.componentGoal(e,f),s.goal(f,{componentId:e,arm:u},1,0))},fireStep:(o,g,y)=>{s.componentGoal(e,o,{reward:g}),s.goal(o,{componentId:e,arm:u},g,y)}})},[s,e,d,u,a]);let k=de(()=>{let m={"data-sentient-slot":e};for(let[f,v]of Object.entries(h))m[`data-${f}`]=v;return m},[e,h]);return{tokens:h,props:k}}import{useCallback as He,useEffect as N,useMemo as ge,useRef as pe,useState as qt}from"react";import{attachMicroSignalDetectors as Qt}from"@sentientui/core";var ze=new Set;function Yt(e,t){var C;if(R()&&!t.goal)throw new Error(`[sentient] useAdaptive("${e}"): a goal is required \u2014 without one the optimizer accumulates exposures with no rewards and cannot learn. Pass e.g. goal: 'buy_click'.`);let n=_(),s=P(),l=Object.keys(t.variants).join(" "),r=ge(()=>Object.keys(t.variants),[l]),{variantId:c,isOverride:i,settled:u}=U(e,r),a=(C=c!=null?c:r[0])!=null?C:"",h=t.variants[a],[d,p]=qt(null),k=pe(null),m=He(S=>{k.current=S,p(S)},[]),f=typeof t.goal=="string"?t.goal:JSON.stringify(t.goal),v=ge(()=>L(t.goal),[f]),o=j(t.goal);N(()=>z({id:e,variantIds:r,goal:o}),[e,r,o]);let g=pe(null);N(()=>{i||u&&(!n||!a||!d||g.current!==a&&(g.current=a,D(n,s,e,a)))},[n,s,e,a,d,i,u]);let y=pe(!1);N(()=>{y.current=!1},[a,f]),N(()=>{if(!i&&!(!n||!a||!d))return I(d,v,{fireGoal:()=>{y.current||(y.current=!0,n.track({projectId:s,componentId:e,variantId:a,eventType:"goal_achieved",goalType:o,payload:{reward:1}}),n.goal(o,{componentId:e,variantId:a},1,0))},fireStep:(S,w,x)=>{n.track({projectId:s,componentId:e,variantId:a,eventType:"goal_achieved",goalType:S,payload:{reward:w}}),n.goal(S,{},w,x)}})},[n,d,a,s,e,v,o,i]),N(()=>{if(i||!n||!a||!d)return;let S=Date.now();return Qt((w,x={})=>{n.track({projectId:s,componentId:e,variantId:a,eventType:"micro_signal",payload:G({signalType:w},x)})},d,S)},[n,d,a,s,e,i]),N(()=>{if(!R()||!n)return;let S=setTimeout(()=>{!k.current&&!ze.has(e)&&(ze.add(e),console.warn(`[sentient] useAdaptive("${e}"): bind was never attached \u2014 spread {...bind} on the rendered element, otherwise exposure and goal tracking cannot work and the optimizer learns nothing.`))},0);return()=>clearTimeout(S)},[n,e]);let b=He((S,w)=>{var K,V;if(i)return;let x=S!=null?S:o;n==null||n.componentGoal(e,x,w),n==null||n.goal(x,(K=w==null?void 0:w.metadata)!=null?K:{},(V=w==null?void 0:w.reward)!=null?V:1,0)},[n,e,o,i]),A=ge(()=>({ref:m,"data-sentient-id":e,"data-sentient-variant":a}),[m,e,a]);return{variant:a,value:h,bind:A,fireGoal:b}}import{Children as Zt,isValidElement as en,useEffect as me,useMemo as Xe,useRef as qe}from"react";import{jsx as nn}from"react/jsx-runtime";var ie=new Set;function tn(e){var v;let t=_(),n=P(),s=qe(null),l=Object.keys(e.arrangements).join(" "),r=Xe(()=>Object.keys(e.arrangements),[l]),c=Xe(()=>G({id:e.id,arms:r},e.baseline!==void 0?{baseline:e.baseline}:{}),[e.id,r,e.baseline]),{arm:i,source:u}=re(e.id,c);R()&&e.baseline!==void 0&&e.baseline!==r[0]&&!ie.has(e.id+":baseline")&&(ie.add(e.id+":baseline"),console.warn(`[sentient] <AdaptiveGroup id="${e.id}">: baseline "${e.baseline}" is not the first-declared arrangement ("${r[0]}"). The first arrangement should usually be the page's real incumbent (the holdout sees it).`));let a=Zt.toArray(e.children).filter(en),h=new Map;for(let o of a)h.set(String((v=o.key)!=null?v:"").replace(/^\.\$/,""),o);let d=e.arrangements[i],p=d!==void 0&&d.length===a.length&&d.every(o=>h.has(o));R()&&d!==void 0&&!p&&!ie.has(e.id+":keys")&&(ie.add(e.id+":keys"),console.warn(`[sentient] <AdaptiveGroup id="${e.id}">: arrangement "${i}" [${d.join(", ")}] does not match the children's keys \u2014 rendering declaration order (fail-safe).`));let k=p?d.map(o=>h.get(o)):a;me(()=>X({id:e.id,arms:Object.keys(e.arrangements)}),[e.id]);let m=qe(null);me(()=>{!t||u==="baseline"||u==="override"||m.current===i||(m.current=i,D(t,n,e.id,i))},[t,n,e.id,i,u]);let f=e.goal===void 0?null:typeof e.goal=="string"?e.goal:JSON.stringify(e.goal);return me(()=>{if(!t||e.goal===void 0||u==="override")return;let o=s.current;if(!o)return;let g=j(e.goal),y=!1;return I(o,L(e.goal),{fireGoal:()=>{y||(y=!0,t.componentGoal(e.id,g),t.goal(g,{componentId:e.id,arm:i},1,0))},fireStep:(b,A,C)=>{t.componentGoal(e.id,b,{reward:A}),t.goal(b,{componentId:e.id,arm:i},A,C)}})},[t,e.id,f,i,u]),nn("div",{ref:s,"data-sentient-id":e.id,"data-sentient-variant":i,children:k})}import{deriveSessionSegment as rn}from"@sentientui/core";var on=["page","blocks","layoutOrder"],Qe=new Map;function sn(e,t){Qe.set(e,t)}function Ye(e){return Qe.get(e)}function an(e){var l,r;let t=(r=(l=e.content)!=null?l:Ye(e.page))!=null?r:{},n={};for(let[c,i]of Object.entries(t))on.includes(c)||(n[c]=i);let s=J(G({},n),{page:e.page,blocks:e.blocks});return e.layoutOrder&&(s.layoutOrder=e.layoutOrder),s}function ln(e){return`<script type="application/ld+json">${Ze(e)}</script>`}function Ze(e){return JSON.stringify(G({"@context":"https://schema.org","@type":"WebPage"},e)).replace(/</g,"\\u003c")}function cn(e){let t=[];e.title&&t.push(`# ${e.title}`,""),e.summary&&t.push(String(e.summary),"");for(let[n,s]of Object.entries(e))["page","title","summary","blocks","layoutOrder"].includes(n)||t.push(`## ${n}`,"","```json",JSON.stringify(s,null,2),"```","");if(e.blocks.length>0){t.push("## blocks","");for(let n of e.blocks)t.push(`- **${n.id}** \u2192 variant \`${n.variant}\``),n.content!==void 0&&t.push(""," ```json",JSON.stringify(n.content,null,2)," ```");t.push("")}return t.join(`
|
|
2
|
+
var at=Object.defineProperty,lt=Object.defineProperties;var ut=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable;var Ae=(e,t,n)=>t in e?at(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))ke.call(t,n)&&Ae(e,n,t[n]);if(H)for(var n of H(t))Ce.call(t,n)&&Ae(e,n,t[n]);return e},z=(e,t)=>lt(e,ut(t));var Ge=(e,t)=>{var n={};for(var o in e)ke.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&H)for(var o of H(e))t.indexOf(o)<0&&Ce.call(e,o)&&(n[o]=e[o]);return n};import{createContext as gt,useContext as E,useEffect as K,useMemo as Be,useRef as Ke,useState as Y,useSyncExternalStore as mt}from"react";import{detectDeviceClass as pt,detectTrafficSource as vt,init as yt}from"@sentientui/core";var Re=new Map,X=new Map;function _e(e,t){let n=X.get(e);return n||(n=new Set,X.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&X.delete(e)}}function Oe(e,t){Re.set(e,t);let n=X.get(e);if(n)for(let o of n)try{o(t)}catch(i){}}function Ee(e){var t;return(t=Re.get(e))!=null?t:null}var ct={on:!1,listeners:new Set};function Ie(){if(typeof window=="undefined")return ct;let e=window;return e.__sentient_preview||(e.__sentient_preview={on:!1,listeners:new Set}),e.__sentient_preview}function ae(){return Ie().on}function Le(e){let t=Ie().listeners;return t.add(e),()=>{t.delete(e)}}function Pe(e){return{isLocal:e.isLocal,track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},fetchWeights:()=>Promise.resolve([]),getAssignment:(t,n)=>e.getAssignment(t,n),assign:(t,n,o,i)=>e.assign(t,n,o,i),decide:()=>Promise.resolve(null),getSlotResult:t=>e.getSlotResult(t),getPersona:()=>e.getPersona(),getGraph:()=>e.getGraph(),dispose:()=>e.dispose(),destroy:()=>e.destroy()}}var Te="sentient:overrides-changed";function le(){var e;return typeof window=="undefined"?0:(e=window.__sentient_overrides_version)!=null?e:0}function M(e){return typeof window=="undefined"?()=>{}:(window.addEventListener(Te,e),()=>window.removeEventListener(Te,e))}function De(e){typeof window!="undefined"&&(window.__sentient_devtools_config=e)}function _(){var e;return typeof process=="undefined"||((e=process.env)==null?void 0:e.NODE_ENV)!=="production"}function I(e){return typeof e=="string"?{type:"click"}:e}function W(e){return typeof e=="string"?e:e.type}function L(e){if(typeof e!="string"&&(e.type==="click"||e.type==="form_submit"||e.type==="scroll_depth"))return e.value}function dt(e){if(!(e instanceof Element))return!1;let t=e.tagName.toLowerCase();return t==="a"||t==="button"?!0:e.getAttribute("role")==="button"}function Me(e,t,n){if(n){try{let i=e;for(;i&&i!==t;){if(i.matches(n))return!0;i=i.parentElement}}catch(i){}return!1}let o=e;for(;o&&o!==t;){if(dt(o))return!0;o=o.parentElement}return!1}function P(e,t,n){if(t.type==="weighted_composite"){let s=new Set,c=[];return t.steps.forEach(({goal:l,name:h,weight:d},m)=>{let C=()=>{s.has(m)||(s.add(m),n.fireStep(h,d,m))};if(l.type==="click"){let b=f=>{let p=f.target;p instanceof Element&&Me(p,e,l.selector)&&C()};e.addEventListener("click",b),c.push(()=>e.removeEventListener("click",b));return}if(l.type==="form_submit"){let b=f=>{f.target instanceof HTMLFormElement&&e.contains(f.target)&&C()};e.addEventListener("submit",b),c.push(()=>e.removeEventListener("submit",b));return}if(l.type==="scroll_depth"){let b=Math.max(0,Math.min(1,l.threshold)),f=new IntersectionObserver(p=>{for(let a of p)if(a.intersectionRatio>=b){C(),f.disconnect();break}},{threshold:[b]});f.observe(e),c.push(()=>f.disconnect())}}),()=>{for(let l of c)l()}}let o=t.type==="composite"?t.all:[t],i=new Set(o.map((s,c)=>c)),r=s=>{i.delete(s),i.size===0&&n.fireGoal()},u=[];return o.forEach((s,c)=>{if(s.type==="click"){let l=h=>{let d=h.target;d instanceof Element&&Me(d,e,s.selector)&&(t.type==="composite"?r(c):n.fireGoal())};e.addEventListener("click",l),u.push(()=>e.removeEventListener("click",l));return}if(s.type==="form_submit"){let l=h=>{h.target instanceof HTMLFormElement&&e.contains(h.target)&&(t.type==="composite"?r(c):n.fireGoal())};e.addEventListener("submit",l),u.push(()=>e.removeEventListener("submit",l));return}if(s.type==="scroll_depth"){let l=Math.max(0,Math.min(1,s.threshold)),h=new IntersectionObserver(d=>{for(let m of d)if(m.intersectionRatio>=l){t.type==="composite"?r(c):n.fireGoal(),h.disconnect();break}},{threshold:[l]});h.observe(e),u.push(()=>h.disconnect());return}}),()=>{for(let s of u)s()}}function F(e,t,n,o){e.track({projectId:t,componentId:n,variantId:o,eventType:"variant_assigned",payload:{}})}var ft={components:new Map,slots:new Map,sections:[],listeners:new Set,version:0};function B(){if(typeof window=="undefined")return ft;let e=window;return e.__sentient_registry||(e.__sentient_registry={components:new Map,slots:new Map,sections:[],listeners:new Set,version:0}),e.__sentient_registry}function U(){B().version+=1;for(let e of B().listeners)e()}var Fe=()=>{};function q(e){return _()?(B().components.set(e.id,e),U(),()=>{B().components.delete(e.id),U()}):Fe}function Q(e){return _()?(B().slots.set(e.id,e),U(),()=>{B().slots.delete(e.id),U()}):Fe}function ue(e){_()&&(B().sections=[...e],U())}import{jsx as At}from"react/jsx-runtime";function St(){var e,t;if(typeof window=="undefined")return"desktop:direct";try{let n=pt((e=navigator.userAgent)!=null?e:""),o=vt((t=document.referrer)!=null?t:"",window.location.origin);return`${n}:${o}`}catch(n){return"desktop:direct"}}var je="https://api.sentient-ui.com/v1",O=gt({client:null,apiKey:"",initialAssignments:{},sessionSegment:"desktop:direct",ssrFallback:"first",onAssignment:void 0,initialLayoutOrder:null,initialSlots:{},initialPersona:null,apiBaseUrl:je,debug:!1});function ht(e){let[t,n]=Y(!1),o=Ke(e);o.current=e;let{cookie:i,value:r,event:u}=e!=null?e:{},s=typeof(e==null?void 0:e.check)=="function";return K(()=>{let c=()=>{var m;let h=o.current;if(!h)return!1;if(h.check)return h.check()===!0;if(!h.cookie||typeof document=="undefined")return!1;let d=`${h.cookie}=${(m=h.value)!=null?m:"accepted"}`;return document.cookie.split("; ").some(C=>C.trim()===d)};if(c()){n(!0);return}if(!u)return;let l=()=>{c()&&n(!0)};return window.addEventListener(u,l),()=>window.removeEventListener(u,l)},[i,r,u,s]),t}function bt(e){var C,b;let[t,n]=Y(null),[o]=Y(()=>{var f;return(f=e.sessionSegment)!=null?f:St()}),[i,r]=Y(ae());K(()=>Le(()=>r(ae())),[]);let u=ht(e.consentFrom),s=e.consentFrom?e.consent===!0||u:e.consent;K(()=>{if(s===!1&&!e.preConsentBehavior){n(w=>(w==null||w.destroy(),null));return}let f={apiKey:e.apiKey,context:e.context,debug:e.debug,initialAssignments:e.initialAssignments,sessionSegment:o,consent:s,preConsentBehavior:e.preConsentBehavior,respectDoNotTrack:e.respectDoNotTrack,ssrSessionId:e.ssrSessionId,country:e.country,localMode:e.localMode,initialSlots:e.initialSlots,initialPersona:e.initialPersona,ingestUrl:e.apiBaseUrl?`${e.apiBaseUrl.replace(/\/$/,"")}/events`:void 0},p=!1,a=null,g=null,S=w=>{e.engagement!==!1&&import("@sentientui/core/engagement").then(({startEngagementCapture:A})=>{p||(g=A(w,{apiKey:e.apiKey,apiBase:e.apiBaseUrl?e.apiBaseUrl.replace(/\/$/,""):void 0}))})};return e.enableGraph!==!1?import("@sentientui/core/graph").then(({init:w})=>{p||(a=w(z(x({},f),{graph:!0,captureDomText:e.captureDomText===!0})),n(a),S(a))}):(a=yt(f),n(a),S(a)),()=>{p=!0,g==null||g(),a==null||a.dispose()}},[s]),K(()=>{if(!t)return;let f=!1,p=async()=>{if(f)return;let g;try{g=await t.fetchWeights()}catch(S){return}if(!f)for(let S of g){let w={componentId:S.componentId,updatedAt:S.updatedAt,variants:S.variants.map(A=>{var G;return{variantId:A.variantId,pulls:A.pulls,avgReward:(G=A.avgReward)!=null?G:0}})};Oe(S.componentId,w)}};p();let a=setInterval(()=>{p()},6e4);return()=>{f=!0,clearInterval(a)}},[t]);let c=(C=e.ssrFallback)!=null?C:"first",l=((b=e.apiBaseUrl)!=null?b:je).replace(/\/$/,""),h=Ke(null);K(()=>{var a;if(typeof process!="undefined"&&((a=process.env)==null?void 0:a.NODE_ENV)==="production")return;let f={apiKey:e.apiKey,context:e.context,country:e.country,apiBaseUrl:l},p=h.current;if(h.current=f,p!==null)for(let g of["apiKey","context","country","apiBaseUrl"])Object.is(p[g],f[g])||console.warn(`[sentient] AdaptiveProvider: \`${g}\` changed after initialisation, but the SDK client is stable for the session and only re-inits on \`consent\` \u2014 the new value is ignored. Remount the provider (e.g. via a changing \`key\` prop) to apply it.`)},[e.apiKey,e.context,e.country,l]),K(()=>{var f;typeof process!="undefined"&&((f=process.env)==null?void 0:f.NODE_ENV)==="production"||De({apiKey:e.apiKey,apiBaseUrl:l,isLocal:(t==null?void 0:t.isLocal)===!0})},[t,e.apiKey,l]),K(()=>{let f=e.initialLayoutOrder;if(f&&f.length>0){ue(f);return}e.declaredSections&&e.declaredSections.length>0&&ue(e.declaredSections)},[e.initialLayoutOrder,e.declaredSections]);let d=Be(()=>t&&i?Pe(t):t,[t,i]),m=Be(()=>{var f,p,a,g,S;return{client:d,apiKey:e.apiKey,initialAssignments:(f=e.initialAssignments)!=null?f:{},sessionSegment:o,ssrFallback:c,onAssignment:e.onAssignment,initialLayoutOrder:(p=e.initialLayoutOrder)!=null?p:null,initialSlots:(a=e.initialSlots)!=null?a:{},initialPersona:(g=e.initialPersona)!=null?g:null,apiBaseUrl:l,debug:(S=e.debug)!=null?S:!1}},[d,e.apiKey,e.initialAssignments,o,c,e.onAssignment,e.initialLayoutOrder,e.initialSlots,e.initialPersona,l,e.debug]);return At(O.Provider,{value:m,children:e.children})}function R(){return E(O).client}function T(){return E(O).apiKey}function ce(){return E(O).initialAssignments}function Z(){return E(O).sessionSegment}function Ve(){return E(O).ssrFallback}function ee(){return E(O).onAssignment}function We(){return E(O).debug}function wt(){let e=E(O).initialLayoutOrder,t=mt(M,()=>{var n;return typeof window=="undefined"?null:(n=window.__sentient_layout_override)!=null?n:null},()=>null);return t!=null?t:e}function $e(){return E(O).initialSlots}function Ne(){return E(O).initialPersona}function xt(){return E(O).apiBaseUrl}import{memo as Rt,useEffect as j,useMemo as He,useRef as ne,useState as _t}from"react";import{attachMicroSignalDetectors as Ot}from"@sentientui/core";import{useEffect as te,useRef as Ue,useState as kt,useSyncExternalStore as Ct}from"react";function $(e){var n;if(typeof window=="undefined")return null;let t=(n=window.__sentient_overrides)==null?void 0:n[e];if(t)return t;if(!window.location.search)return null;try{let o=new URLSearchParams(window.location.search);for(let i of o.getAll("sentient_variant")){let r=i.indexOf(":");if(r!==-1&&i.slice(0,r)===e)return i.slice(r+1)}}catch(o){}return null}var Gt=5;function Je(e,t){var o,i;let n=null;for(let r of e.variants){if(!t.includes(r.variantId))continue;let u=(o=r.pulls)!=null?o:0,s=u>0?u*r.avgReward/(u+Gt):0;(!n||s>n.score)&&(n={variantId:r.variantId,score:s})}return(i=n==null?void 0:n.variantId)!=null?i:null}function J(e,t,n,o){let i=ce(),r=Ve(),u=R(),s=Z(),c=ee(),l=We(),h=Ue(null),d=Ct(M,()=>$(e),()=>null),m=d&&t.includes(d)?d:null,C=Ue(null);te(()=>{l&&m&&C.current!==m&&(C.current=m,console.info(`[sentient] override active: ${e} -> ${m}`))},[l,m,e]);let[b,f]=kt(()=>{var S,w;if(m)return{variantId:m,content:null,isLoading:!1,settled:!0};if(!u){let A=i[e];return A&&t.includes(A)?{variantId:A,content:null,isLoading:!1,settled:!0}:r==="first"&&t.length>0?{variantId:t[0],content:null,isLoading:!1,settled:!1}:{variantId:null,content:null,isLoading:!0,settled:!1}}let a=u.getAssignment(e,s);if(a&&(t.includes(a.variantId)||a.content))return{variantId:a.variantId,content:(S=a.content)!=null?S:null,isLoading:!1,settled:!0};let g=Ee(e);if(g){let A=Je(g,t);if(A)return{variantId:A,content:null,isLoading:!1,settled:!0}}return{variantId:(w=t[0])!=null?w:null,content:null,isLoading:!1,settled:!1}}),p=a=>{c&&h.current!==a&&(h.current=a,c(e,a))};return te(()=>{var g;if(m||!u)return;let a=u.getAssignment(e,s);if(a&&(t.includes(a.variantId)||a.content)){f({variantId:a.variantId,content:(g=a.content)!=null?g:null,isLoading:!1,settled:!0}),p(a.variantId);return}f(S=>{var w;return S.variantId?S:{variantId:(w=t[0])!=null?w:null,content:null,isLoading:!1,settled:!1}})},[m,u,e,s]),te(()=>{if(m||!u)return;let a=u.getAssignment(e,s);if(a&&t.includes(a.variantId))return;let g=!1;return u.assign(e,t,n,o).then(S=>{var w;g||S&&(!t.includes(S.variantId)&&!S.content||(f({variantId:S.variantId,content:(w=S.content)!=null?w:null,isLoading:!1,settled:!0}),p(S.variantId)))}),()=>{g=!0}},[m,u,e,s]),te(()=>{if(!m&&u)return _e(e,a=>{var w;let g=u.getAssignment(e,s);if(g&&(t.includes(g.variantId)||g.content)){f({variantId:g.variantId,content:(w=g.content)!=null?w:null,isLoading:!1,settled:!0});return}let S=Je(a,t);S&&f({variantId:S,content:null,isLoading:!1,settled:!0})})},[m,u,e,s]),m?{variantId:m,content:null,isLoading:!1,settled:!0,isOverride:!0}:b}import{jsx as Lt}from"react/jsx-runtime";function Et(e){var w;let t=R(),n=T(),o=Object.keys(e.variants).join("\0"),i=He(()=>Object.keys(e.variants),[o]),{variantId:r,content:u,isOverride:s,settled:c}=J(e.id,i,e.agentData,e.agentDataByVariant),l=ne(null),[h,d]=_t(!1);j(()=>{d(!0)},[]);let m=ne(!1),C=ne(new Set),b=ne(null),f=typeof e.goal=="string"?e.goal:JSON.stringify(e.goal),p=He(()=>I(e.goal),[f]),a=typeof e.goal=="string"?e.goal:p.type;if(j(()=>q({id:e.id,variantIds:i,goal:a}),[e.id,i,a]),j(()=>{s||c&&(!t||!r||!n||b.current!==r&&(b.current=r,F(t,n,e.id,r)))},[t,r,n,e.id,s,c]),j(()=>{m.current=!1,C.current=new Set},[r,p]),j(()=>{if(s||!c||!t||!r)return;let A=l.current;if(!A)return;let G=null,v=0,y=()=>{v=Date.now(),G=setTimeout(()=>{t.track({projectId:n,componentId:e.id,variantId:r,eventType:"cursor_signal",payload:{hoverDuration:Date.now()-v}}),G=null},800)},k=()=>{G!==null&&(clearTimeout(G),G=null)};return A.addEventListener("mouseenter",y),A.addEventListener("mouseleave",k),()=>{A.removeEventListener("mouseenter",y),A.removeEventListener("mouseleave",k),G!==null&&clearTimeout(G)}},[t,r,n,e.id,s,c]),j(()=>{if(s||!c||!t||!r)return;let A=l.current;if(!A)return;let G=Date.now();return Ot((v,y={})=>{var be,we,xe;t.track({projectId:n,componentId:e.id,variantId:r,eventType:"micro_signal",payload:x({signalType:v},y)});let k=(be=e.microSignalGoals)==null?void 0:be[v];if(!k||C.current.has(v))return;C.current.add(v);let D=typeof k=="string"?k:k.name,V=typeof k=="string"?1:(we=k.weight)!=null?we:1,st=typeof k=="string"?0:(xe=k.stepIndex)!=null?xe:0;t.goal(D,{metadata:x({signalType:v},y),weight:V,stepIndex:st})},A,G)},[t,r,n,e.id,e.microSignalGoals,s,c]),j(()=>{if(s||!t||!r)return;let A=l.current;if(!A)return;let G=L(p);return P(A,p,{fireGoal:()=>{m.current||(m.current=!0,t.track({projectId:n,componentId:e.id,variantId:r,eventType:"goal_achieved",goalType:a,payload:x({reward:1},G!==void 0?{goalValue:G}:{})}),t.goal(a,x({metadata:{componentId:e.id,variantId:r},weight:1,stepIndex:0},G!==void 0?{value:G}:{})))},fireStep:(v,y,k)=>{t.track({projectId:n,componentId:e.id,variantId:r,eventType:"goal_achieved",goalType:v,payload:{reward:y}}),t.goal(v,{metadata:{},weight:y,stepIndex:k})}})},[t,r,n,e.id,p,a,s]),e.clientOnly&&(!h||!t)||!r)return null;let g=(w=e.variants[r])!=null?w:null,S=g===null?u:null;return _()&&g===null&&S===null&&console.warn(`[sentient] <Adaptive id="${e.id}"> was assigned variant "${r}" but no matching key exists in props.variants. If this is a dashboard-managed text variant, use <AdaptiveText id="${e.id}"> instead.`),Lt("div",{ref:l,"data-sentient-id":e.id,"data-sentient-variant":r,children:g!=null?g:S})}var It=Rt(Et,(e,t)=>{if(e.id!==t.id||e.goal!==t.goal&&JSON.stringify(e.goal)!==JSON.stringify(t.goal)||e.microSignalGoals!==t.microSignalGoals||e.clientOnly!==t.clientOnly||e.agentData!==t.agentData||e.agentDataByVariant!==t.agentDataByVariant)return!1;if(e.variants===t.variants)return!0;let n=Object.keys(e.variants),o=Object.keys(t.variants);return n.length!==o.length?!1:n.every(i=>i in t.variants&&Object.is(e.variants[i],t.variants[i]))});import{useEffect as re,useMemo as Pt,useRef as de,useState as ze,useSyncExternalStore as Tt}from"react";import{jsx as Mt}from"react/jsx-runtime";function Dt({id:e,default:t,component:n="span",className:o,goal:i}){var G;let r=R(),u=T(),s=ee(),c=Z(),l=de(null),h=de(null),d=Tt(M,()=>$(e),()=>null),[m,C]=ze(()=>{var v,y;return(y=(v=r==null?void 0:r.getAssignment(e,c))==null?void 0:v.content)!=null?y:null}),[b,f]=ze(()=>{var v,y;return(y=(v=r==null?void 0:r.getAssignment(e,c))==null?void 0:v.variantId)!=null?y:null});re(()=>{var y;if(d||!r||((y=r.getAssignment(e,c))==null?void 0:y.content)!==void 0)return;let v=!1;return r.assign(e).then(k=>{if(!v){if(!k){_()&&console.warn(`[sentient] <AdaptiveText id="${e}"> assignment failed \u2014 showing default text.`);return}f(k.variantId),k.content&&C(k.content)}}),()=>{v=!0}},[r,e,c,d]),re(()=>{d||!r||!b||!u||l.current!==b&&(l.current=b,r.track({projectId:u,componentId:e,variantId:b,eventType:"variant_assigned",payload:{}}),s==null||s(e,b))},[r,b,u,e,s,d]);let p=i===void 0?"":typeof i=="string"?i:JSON.stringify(i),a=Pt(()=>i===void 0?null:I(i),[p]),g=i===void 0?null:typeof i=="string"?i:a.type,S=de(!1);re(()=>{S.current=!1},[b,p]),re(()=>{if(d||!r||!b||!u||!a||!g)return;let v=h.current;if(!v)return;let y=L(a);return P(v,a,{fireGoal:()=>{S.current||(S.current=!0,r.track({projectId:u,componentId:e,variantId:b,eventType:"goal_achieved",goalType:g,payload:x({reward:1},y!==void 0?{goalValue:y}:{})}),r.goal(g,x({metadata:{componentId:e,variantId:b},weight:1,stepIndex:0},y!==void 0?{value:y}:{})))},fireStep:(k,D,V)=>{r.track({projectId:u,componentId:e,variantId:b,eventType:"goal_achieved",goalType:k,payload:{reward:D}}),r.goal(k,{metadata:{},weight:D,stepIndex:V})}})},[r,b,u,e,a,g,d]);let w=m!=null?m:t;if(d){let v=r==null?void 0:r.getAssignment(e,c);w=v&&v.variantId===d&&(G=v.content)!=null?G:t}return Mt(n,{ref:v=>{h.current=v},className:o,children:w})}import{useCallback as Ft,useRef as Bt}from"react";function fe(e){let t=R(),n=Bt(new Set);return Ft((o,i)=>{var r,u;if(!$(e)){if(i!=null&&i.once){if(n.current.has(o))return;n.current.add(o)}t==null||t.componentGoal(e,o,i),t==null||t.goal(o,x(x(x({metadata:(r=i==null?void 0:i.metadata)!=null?r:{},weight:(u=i==null?void 0:i.reward)!=null?u:1,stepIndex:0},(i==null?void 0:i.value)!==void 0?{value:i.value}:{}),(i==null?void 0:i.currency)!==void 0?{currency:i.currency}:{}),(i==null?void 0:i.externalId)!==void 0?{externalId:i.externalId}:{}))}},[t,e])}import{useEffect as Kt,useRef as Xe}from"react";function jt(e,t={}){let c=t,{componentId:n}=c,o=Ge(c,["componentId"]),i=R(),r=fe(n!=null?n:""),u=Xe(!1),s=Xe(o);s.current=o,Kt(()=>{if(!i||u.current)return;u.current=!0;let{metadata:l,reward:h,value:d,currency:m,externalId:C}=s.current;if(n){r(e,s.current);return}i.goal(e,x(x(x({metadata:l!=null?l:{},weight:h!=null?h:1,stepIndex:0},d!==void 0?{value:d}:{}),m!==void 0?{currency:m}:{}),C!==void 0?{externalId:C}:{}))},[i,n,e,r])}import{renderPrePaintScript as Vt}from"@sentientui/core";import{confidenceBand as Wt}from"@sentientui/policy";import{jsx as Ut}from"react/jsx-runtime";function qe(e){return JSON.stringify(e).replace(/</g,"\\u003c")}function $t(e){return e.persona?'(function(){try{var d=document.documentElement;if(d.hasAttribute("data-sentient-persona"))return;d.setAttribute("data-sentient-persona",'+qe(e.persona.persona)+');d.setAttribute("data-sentient-confidence",'+qe(Wt(e.persona.confidence))+");}catch(e){}})();":Vt(e.apiKey)}function Nt(e){return Ut("script",{"data-sentient-persona-script":"",nonce:e.nonce,dangerouslySetInnerHTML:{__html:$t(e)}})}import{useEffect as me,useMemo as pe,useRef as Yt}from"react";import{validateSlotDecl as Zt}from"@sentientui/policy";import{useEffect as ge,useReducer as Jt,useState as Ht,useSyncExternalStore as Ye}from"react";import{armOfResult as ie,baselineResultFor as zt}from"@sentientui/core";import{confidenceBand as Xt}from"@sentientui/policy";var Qe=new Set;function oe(e,t){var h;Ye(M,le,()=>0);let n=R(),o=$e(),[,i]=Jt(d=>d+1,0),r=typeof window!="undefined"?(h=window.__sentient_slot_overrides)==null?void 0:h[e]:void 0,u=r===void 0?o[e]:void 0,s=r===void 0&&u===void 0&&n?n.getSlotResult(e):null,c=(n==null?void 0:n.isLocal)===!0&&r===void 0&&u===void 0&&s===null;ge(()=>{if(!c||!n)return;let d=!1;return n.decide({slots:[t]}).then(m=>{!d&&m&&i()}),()=>{d=!0}},[n,e,c]);let l=(()=>{if(r!==void 0)return{result:r,arm:ie(r),source:"override"};if(u!==void 0)return{result:u,arm:ie(u),source:"preloaded"};if(s!==null)return{result:s,arm:ie(s),source:"client"};let d=zt(t);return{result:d,arm:ie(d),source:"baseline"}})();return ge(()=>{_()&&(!n||n.isLocal===!0||l.source==="baseline"&&(Qe.has(e)||(Qe.add(e),console.warn(`[sentient] slot "${e}" resolved to its baseline \u2014 no SSR-preloaded or decided result. Keyed clients decide slots server-side, so this slot serves baseline for the whole session and records no exposure. Preload it via loadAdaptiveDecision()/initialSlots so it can serve a decided arm and learn.`))))},[n,l.source,e]),l}function qt(){var t;if(typeof window=="undefined")return null;let e=window.__sentient_persona_override;if(e!=null&&e.persona)return{persona:e.persona,confidence:(t=e.confidence)!=null?t:1};try{let n=new URLSearchParams(window.location.search).get("sentient_persona");if(n)return{persona:n,confidence:1}}catch(n){}return null}function Qt(){let e=R(),t=Ne();Ye(M,le,()=>0);let[n,o]=Ht(!1);ge(()=>o(!0),[]);let i=s=>({persona:s.persona,confidence:s.confidence,band:Xt(s.confidence)});if(!n)return t?i(t):null;let r=qt();if(r)return i(r);if(t)return i(t);let u=e?e.getPersona():null;return u?i(u):null}var ve=new Set;function en(e){return typeof CSS!="undefined"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[\\"]/g,"\\$&")}function tn(e,t,n){let o=R(),i=T(),r=JSON.stringify(t),u=pe(()=>({id:e,dims:t}),[e,r]),{result:s,arm:c,source:l}=oe(e,u),h=pe(()=>typeof s=="string"?{}:s,[c]);if(_()&&!ve.has(e)){let b=Zt({id:e,dims:Object.fromEntries(Object.entries(t).map(([p,a])=>[p,[...a]]))}),f=Object.values(t).reduce((p,a)=>p*a.length,1);b.ok?f>4&&(ve.add(e),console.warn(`[sentient] useAdaptiveTokens("${e}") declares ${f} combinations \u2014 more than the recommended 4. Each extra combination needs more traffic to learn; consider fewer dims/values.`)):(ve.add(e),console.warn(`[sentient] useAdaptiveTokens("${e}"): invalid declaration \u2014 ${b.reason}. Serving baseline.`))}let d=(n==null?void 0:n.goal)===void 0?null:typeof n.goal=="string"?n.goal:JSON.stringify(n.goal);me(()=>Q({id:e,dims:t}),[e]);let m=Yt(null);me(()=>{!o||l==="baseline"||l==="override"||m.current===c||(m.current=c,F(o,i,e,c))},[o,i,e,c,l]),me(()=>{if(!o||!(n!=null&&n.goal)||l==="override")return;let b=document.querySelector(`[data-sentient-slot="${en(e)}"]`);if(!b){_()&&console.warn(`[sentient] useAdaptiveTokens("${e}"): a goal is declared but no element carries the returned props \u2014 spread {...props} on the slot's element.`);return}let f=W(n.goal),p=L(n.goal),a=!1;return P(b,I(n.goal),{fireGoal:()=>{a||(a=!0,p!==void 0?o.componentGoal(e,f,{value:p}):o.componentGoal(e,f),o.goal(f,x({metadata:{componentId:e,arm:c},weight:1,stepIndex:0},p!==void 0?{value:p}:{})))},fireStep:(g,S,w)=>{o.componentGoal(e,g,{reward:S}),o.goal(g,{metadata:{componentId:e,arm:c},weight:S,stepIndex:w})}})},[o,e,d,c,l]);let C=pe(()=>{let b={"data-sentient-slot":e};for(let[f,p]of Object.entries(h))b[`data-${f}`]=p;return b},[e,h]);return{tokens:h,props:C}}import{useCallback as Ze,useEffect as N,useMemo as ye,useRef as Se,useState as nn}from"react";import{attachMicroSignalDetectors as rn}from"@sentientui/core";var et=new Set;function on(e,t){var G;if(_()&&!t.goal)throw new Error(`[sentient] useAdaptive("${e}"): a goal is required \u2014 without one the optimizer accumulates exposures with no rewards and cannot learn. Pass e.g. goal: 'buy_click'.`);let n=R(),o=T(),i=Object.keys(t.variants).join(" "),r=ye(()=>Object.keys(t.variants),[i]),{variantId:u,isOverride:s,settled:c}=J(e,r),l=(G=u!=null?u:r[0])!=null?G:"",h=t.variants[l],[d,m]=nn(null),C=Se(null),b=Ze(v=>{C.current=v,m(v)},[]),f=typeof t.goal=="string"?t.goal:JSON.stringify(t.goal),p=ye(()=>I(t.goal),[f]),a=W(t.goal);N(()=>q({id:e,variantIds:r,goal:a}),[e,r,a]);let g=Se(null);N(()=>{s||c&&(!n||!l||!d||g.current!==l&&(g.current=l,F(n,o,e,l)))},[n,o,e,l,d,s,c]);let S=Se(!1);N(()=>{S.current=!1},[l,f]),N(()=>{if(s||!n||!l||!d)return;let v=L(p);return P(d,p,{fireGoal:()=>{S.current||(S.current=!0,n.track({projectId:o,componentId:e,variantId:l,eventType:"goal_achieved",goalType:a,payload:x({reward:1},v!==void 0?{goalValue:v}:{})}),n.goal(a,x({metadata:{componentId:e,variantId:l},weight:1,stepIndex:0},v!==void 0?{value:v}:{})))},fireStep:(y,k,D)=>{n.track({projectId:o,componentId:e,variantId:l,eventType:"goal_achieved",goalType:y,payload:{reward:k}}),n.goal(y,{metadata:{},weight:k,stepIndex:D})}})},[n,d,l,o,e,p,a,s]),N(()=>{if(s||!n||!l||!d)return;let v=Date.now();return rn((y,k={})=>{n.track({projectId:o,componentId:e,variantId:l,eventType:"micro_signal",payload:x({signalType:y},k)})},d,v)},[n,d,l,o,e,s]),N(()=>{if(!_()||!n)return;let v=setTimeout(()=>{!C.current&&!et.has(e)&&(et.add(e),console.warn(`[sentient] useAdaptive("${e}"): bind was never attached \u2014 spread {...bind} on the rendered element, otherwise exposure and goal tracking cannot work and the optimizer learns nothing.`))},0);return()=>clearTimeout(v)},[n,e]);let w=Ze((v,y)=>{var D,V;if(s)return;let k=v!=null?v:a;n==null||n.componentGoal(e,k,y),n==null||n.goal(k,x(x(x({metadata:(D=y==null?void 0:y.metadata)!=null?D:{},weight:(V=y==null?void 0:y.reward)!=null?V:1,stepIndex:0},(y==null?void 0:y.value)!==void 0?{value:y.value}:{}),(y==null?void 0:y.currency)!==void 0?{currency:y.currency}:{}),(y==null?void 0:y.externalId)!==void 0?{externalId:y.externalId}:{}))},[n,e,a,s]),A=ye(()=>({ref:b,"data-sentient-id":e,"data-sentient-variant":l}),[b,e,l]);return{variant:l,value:h,bind:A,fireGoal:w}}import{Children as sn,isValidElement as an,useEffect as he,useMemo as tt,useRef as nt}from"react";import{jsx as un}from"react/jsx-runtime";var se=new Set;function ln(e){var p;let t=R(),n=T(),o=nt(null),i=Object.keys(e.arrangements).join(" "),r=tt(()=>Object.keys(e.arrangements),[i]),u=tt(()=>x({id:e.id,arms:r},e.baseline!==void 0?{baseline:e.baseline}:{}),[e.id,r,e.baseline]),{arm:s,source:c}=oe(e.id,u);_()&&e.baseline!==void 0&&e.baseline!==r[0]&&!se.has(e.id+":baseline")&&(se.add(e.id+":baseline"),console.warn(`[sentient] <AdaptiveGroup id="${e.id}">: baseline "${e.baseline}" is not the first-declared arrangement ("${r[0]}"). The first arrangement should usually be the page's real incumbent (the holdout sees it).`));let l=sn.toArray(e.children).filter(an),h=new Map;for(let a of l)h.set(String((p=a.key)!=null?p:"").replace(/^\.\$/,""),a);let d=e.arrangements[s],m=d!==void 0&&d.length===l.length&&d.every(a=>h.has(a));_()&&d!==void 0&&!m&&!se.has(e.id+":keys")&&(se.add(e.id+":keys"),console.warn(`[sentient] <AdaptiveGroup id="${e.id}">: arrangement "${s}" [${d.join(", ")}] does not match the children's keys \u2014 rendering declaration order (fail-safe).`));let C=m?d.map(a=>h.get(a)):l;he(()=>Q({id:e.id,arms:Object.keys(e.arrangements)}),[e.id]);let b=nt(null);he(()=>{!t||c==="baseline"||c==="override"||b.current===s||(b.current=s,F(t,n,e.id,s))},[t,n,e.id,s,c]);let f=e.goal===void 0?null:typeof e.goal=="string"?e.goal:JSON.stringify(e.goal);return he(()=>{if(!t||e.goal===void 0||c==="override")return;let a=o.current;if(!a)return;let g=W(e.goal),S=L(e.goal),w=!1;return P(a,I(e.goal),{fireGoal:()=>{w||(w=!0,S!==void 0?t.componentGoal(e.id,g,{value:S}):t.componentGoal(e.id,g),t.goal(g,x({metadata:{componentId:e.id,arm:s},weight:1,stepIndex:0},S!==void 0?{value:S}:{})))},fireStep:(A,G,v)=>{t.componentGoal(e.id,A,{reward:G}),t.goal(A,{metadata:{componentId:e.id,arm:s},weight:G,stepIndex:v})}})},[t,e.id,f,s,c]),un("div",{ref:o,"data-sentient-id":e.id,"data-sentient-variant":s,children:C})}import{deriveSessionSegment as cn}from"@sentientui/core";var dn=["page","blocks","layoutOrder"],rt=new Map;function fn(e,t){rt.set(e,t)}function it(e){return rt.get(e)}function gn(e){var i,r;let t=(r=(i=e.content)!=null?i:it(e.page))!=null?r:{},n={};for(let[u,s]of Object.entries(t))dn.includes(u)||(n[u]=s);let o=z(x({},n),{page:e.page,blocks:e.blocks});return e.layoutOrder&&(o.layoutOrder=e.layoutOrder),o}function mn(e){return`<script type="application/ld+json">${ot(e)}</script>`}function ot(e){return JSON.stringify(x({"@context":"https://schema.org","@type":"WebPage"},e)).replace(/</g,"\\u003c")}function pn(e){let t=[];e.title&&t.push(`# ${e.title}`,""),e.summary&&t.push(String(e.summary),"");for(let[n,o]of Object.entries(e))["page","title","summary","blocks","layoutOrder"].includes(n)||t.push(`## ${n}`,"","```json",JSON.stringify(o,null,2),"```","");if(e.blocks.length>0){t.push("## blocks","");for(let n of e.blocks)t.push(`- **${n.id}** \u2192 variant \`${n.variant}\``),n.content!==void 0&&t.push(""," ```json",JSON.stringify(n.content,null,2)," ```");t.push("")}return t.join(`
|
|
3
3
|
`).trimEnd()+`
|
|
4
|
-
`}import{grantConsent as
|
|
4
|
+
`}import{grantConsent as mi}from"@sentientui/core";export{It as Adaptive,ln as AdaptiveGroup,bt as AdaptiveProvider,Dt as AdaptiveText,Nt as SentientPersonaScript,gn as buildAgentFeed,fn as defineAgentContent,cn as detectSegment,it as getAgentContent,mi as grantConsent,mn as renderAgentJsonLd,ot as renderAgentJsonLdBody,pn as renderAgentMarkdown,on as useAdaptive,xt as useAdaptiveApiBaseUrl,fe as useAdaptiveGoal,Qt as useAdaptivePersona,tn as useAdaptiveTokens,J as useAssignment,ce as useInitialAssignments,wt as useLayoutOrder,jt as usePageGoal,R as useSentient};
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|