@tavus/embed 0.19.7 → 0.20.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/dist/index.iife.js +18 -17
- package/dist/index.mjs +5134 -4614
- package/package.json +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var TavusEmbed=(function(e){let t=typeof document<`u`&&document.currentScript?document.currentScript.src:void 0;Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y={},b=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function T(e,t,n){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return E(e,s,i,a,null)}function E(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++a,__i:-1,__u:0};return o==null&&i.vnode!=null&&i.vnode(s),s}function D(e){return e.children}function ee(e,t){this.props=e,this.context=t}function O(e,t){if(t==null)return e.__?O(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?O(e):null}function k(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],o=C({},t);o.__v=t.__v+1,i.vnode&&i.vnode(o),ue(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??O(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,fe(r,o,a),t.__e=t.__=null,o.__e!=n&&A(o)}}function A(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),A(e)}function te(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!ne.__r++||c!=i.debounceRendering)&&((c=i.debounceRendering)||l)(ne)}function ne(){try{for(var e,t=1;s.length;)s.length>t&&s.sort(u),e=s.shift(),t=s.length,k(e)}finally{s.length=ne.__r=0}}function re(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||b,v=t.length;for(c=ie(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||y,p.__i=d,g=ue(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&he(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=j(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ie(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=E(null,o,null,null,null):S(o)?o=e.__k[a]=E(D,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=E(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=oe(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=O(s)),ge(s,s));return r}function j(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=j(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=O(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ae(e,t){return t||=[],e==null||typeof e==`boolean`||(S(e)?e.some(function(e){ae(e,t)}):t.push(e)),t}function oe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function se(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||x.test(t)?n:n+`px`}function ce(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||se(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||se(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(m,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[p]=r[p]:(n[p]=h,e.addEventListener(t,a?_:g,a)):e.removeEventListener(t,a?_:g,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function le(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[f]==null)t[f]=h++;else if(t[f]<n[p])return;return n(i.event?i.event(t):t)}}}function ue(e,t,n,r,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,x,T,E,k,A,te,ne,ie=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=i.__b)&&d(t);n:if(typeof ie==`function`){f=s.length;try{if(y=t.props,x=ie.prototype&&ie.prototype.render,T=(d=ie.contextType)&&r[d.__c],E=d?T?T.props.value:d.__:r,n.__c?v=(p=t.__c=n.__c).__=p.__E:(x?t.__c=p=new ie(y,E):(t.__c=p=new ee(y,E),p.constructor=ie,p.render=_e),T&&T.sub(p),p.state||(p.state={}),p.__n=r,m=p.__d=!0,p.__h=[],p._sb=[]),x&&p.__s==null&&(p.__s=p.state),x&&ie.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=C({},p.__s)),C(p.__s,ie.getDerivedStateFromProps(y,p.__s))),h=p.props,g=p.state,p.__v=t,m)x&&ie.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),x&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(x&&ie.getDerivedStateFromProps==null&&y!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(y,E),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(y,p.__s,E)){t.__v!=n.__v&&(p.props=y,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),b.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=O(n);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(y,p.__s,E),x&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,g,_)})}if(p.context=E,p.props=y,p.__P=e,p.__e=!1,k=i.__r,A=0,x)p.state=p.__s,p.__d=!1,k&&k(t),d=p.render(p.props,p.state,p.context),b.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,k&&k(t),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++A<25);p.state=p.__s,p.getChildContext!=null&&(r=C(C({},r),p.getChildContext())),x&&!m&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(h,g)),te=d!=null&&d.type===D&&d.key==null?pe(d.props.children):d,c=re(e,S(te)?te:[te],t,n,r,a,o,s,c,l,u),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),v&&(p.__E=p.__=null)}catch(e){if(s.length=f,t.__v=null,l||o!=null){if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),t.__e=c}else if(o!=null)for(ne=o.length;ne--;)w(o[ne])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||de(t),i.__e(e,t,n)}}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=me(n.__e,t,n,r,a,o,s,l,u);return(d=i.diffed)&&d(t),128&t.__u?void 0:c}function de(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(de))}function fe(e,t,n){for(var r=0;r<n.length;r++)he(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function pe(e){return typeof e!=`object`||!e||e.__b>0?e:S(e)?e.map(pe):e.constructor===void 0?C({},e):null}function me(e,t,n,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=n.props||y,b=t.props,x=t.type;if(x==`svg`?o=`http://www.w3.org/2000/svg`:x==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((h=s[d])&&`setAttribute`in h==!!x&&(x?h.localName==x:h.nodeType==3)){e=h,s[d]=null;break}}if(e==null){if(x==null)return document.createTextNode(b);e=document.createElementNS(o,x,b.is&&b),l&&=(i.__m&&i.__m(t,s),!1),s=null}if(x==null)v===b||l&&e.data==b||(e.data=b);else{if(s=x==`textarea`&&b.defaultValue!=null?null:s&&r.call(e.childNodes),!l&&s!=null)for(v={},d=0;d<e.attributes.length;d++)v[(h=e.attributes[d]).name]=h.value;for(d in v)h=v[d],d==`dangerouslySetInnerHTML`?p=h:d==`children`||d in b||d==`value`&&`defaultValue`in b||d==`checked`&&`defaultChecked`in b||ce(e,d,null,h,o);for(d in b)h=b[d],d==`children`?m=h:d==`dangerouslySetInnerHTML`?f=h:d==`value`?g=h:d==`checked`?_=h:l&&typeof h!=`function`||v[d]===h||ce(e,d,h,v[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),re(t.type==`template`?e.content:e,S(m)?m:[m],t,n,a,x==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:n.__k&&O(n,0),l,u),s!=null)for(d=s.length;d--;)w(s[d]);l&&x!=`textarea`||(d=`value`,x==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[d]||x==`progress`&&!g||x==`option`&&g!=v[d])&&ce(e,d,g,v[d],o),d=`checked`,_!=null&&_!=e[d]&&ce(e,d,_,v[d],o))}return e}function he(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function ge(e,t,n){var r,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||he(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ge(r[a],t,n||typeof e.type!=`function`);n||w(e.__e),e.__c=e.__=e.__e=void 0}function _e(e,t,n){return this.constructor(e,n)}function ve(e,t,n){var a,o,s,c;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(a=typeof n==`function`)?null:n&&n.__k||t.__k,s=[],c=[],ue(t,e=(!a&&n||t).__k=T(D,null,[e]),o||y,y,t.namespaceURI,!a&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,s,!a&&n?n:o?o.__e:t.firstChild,a,c),fe(s,e,c),e.props.children=null}function ye(e,t){ve(e,t,ye)}function be(e,t,n){var i,a,o,s,c=C({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o==`key`?i=t[o]:o==`ref`?a=t[o]:c[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),E(e.type,c,i||e.key,a||e.ref,null)}function xe(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,te(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+v++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=b.slice,i={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},a=0,o=function(e){return e!=null&&e.constructor===void 0},ee.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state);typeof e==`function`&&(e=e(C({},n),this.props)),e&&C(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),te(this))},ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),te(this))},ee.prototype.render=D,s=[],l=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},ne.__r=0,d=Math.random().toString(8),f=`__d`+d,p=`__a`+d,m=/(PointerCapture)$|Capture$/i,h=0,g=le(!1),_=le(!0),v=0;function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(this,arguments)}function Ce(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var we=[`context`,`children`],Te=[`useFragment`];function Ee(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){Oe.call(this,r)},i.prototype.attributeChangedCallback=Ae,i.prototype.disconnectedCallback=je,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function De(e){this.getChildContext=function(){return e.context};var t=e.children;return be(t,Ce(e,we))}function Oe(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=T(De,Se({},this._props,{context:t.detail.context}),Ne(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?ye:ve)(this._vdom,this._root)}function ke(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function Ae(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[ke(e)]=n,this._vdom=be(this._vdom,r),ve(this._vdom,this._root)}}function je(){ve(this._vdom=null,this._root)}function Me(e,t){var n=this,r=e.useFragment,i=Ce(e,Te);return T(r?D:`slot`,Se({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function Ne(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!==`slot`&&(i[o[a].name]=o[a].value,i[ke(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=Ne(s[a],null,n),l=s[a].slot;l?i[l]=T(Me,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?T(Me,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),T(t||e.nodeName.toLowerCase(),i,d)}var Pe=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-preview-action:oklch(100% 0 0);--color-preview-action-content:oklch(21% 0 0);--text-preview-title:clamp(1.125rem, 2.65cqw, 2rem);--text-preview-title-narrow:clamp(1.375rem, 4.5cqw, 2rem);--text-preview-title-full-screen:clamp(1.5rem, 3.6cqw, 2rem);--text-preview-description-full-screen:clamp(.875rem, 2.25cqw, 1.25rem)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--page-has-backdrop:var(--page-scroll-lock) 1;--page-scroll-bg:var(--page-scroll-lock) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg:var(--page-scroll-lock) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{background-image:var(--page-scroll-lock) linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000));transition:var(--page-scroll-lock) background-color .3s ease-out;animation:var(--page-scroll-lock) set-page-has-scroll forwards;animation-timeline:var(--page-scroll-lock) scroll();--page-has-scroll:initial;scrollbar-gutter:var(--page-has-scroll) var(--page-scroll-lock) stable}@keyframes set-page-has-scroll{0%,to{--page-has-scroll: }}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host,[data-theme]{background-color:var(--root-bg);color:var(--color-base-content)}:host{background-color:var(--page-scroll-bg,var(--root-bg))}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:host{--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:overlay .3s allow-discrete, visibility .3s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;inset:0;overflow:clip}.modal::backdrop{display:none}.modal[popover]{color:inherit;background:0 0;border:0;max-width:none;max-height:none;margin:0;padding:0;inset:0}.modal[popover]::backdrop{background-color:oklch(0% 0 0/.4);transition:background-color .3s ease-out}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);--tt-tail-off:.5rem;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;font-weight:400;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%;display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.tab:is(.tabs>.tab){cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}.tab:is(.tabs>.tab){--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(.tabs>.tab):is(input[type=radio]){min-width:fit-content}.tab:is(.tabs>.tab):is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(.tabs>.tab):is(label){position:relative}.tab:is(.tabs>.tab):is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:is(.tabs>.tab):checked,.tab:is(.tabs>.tab):is(label:has(:checked)),.tab:is(.tabs>.tab):is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:is(.tabs>.tab):not(input):empty{cursor:default;flex-grow:1}.tab:is(.tabs>.tab):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tab:is(.tabs>.tab):focus-visible,.tab:is(.tabs>.tab):is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab:is(.tabs>.tab)[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul,li menu){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul,li menu):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,menu,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;content:"";pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled,.menu :where(li) [disabled]{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled,.menu :where(li) [disabled]{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>:not(:where(script,style,template)){cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:not(:where(script,style,template)):hover{opacity:.8}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{opacity:1}.dock>:not(:where(script,style,template)) .dock-label{font-size:.6875rem}.dock>:not(:where(script,style,template)):after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:2147483647px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,block-end) var(--anchor-h,span-inline-end);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover]{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover]{opacity:0;scale:.95}}.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none;pointer-events:none;pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content{opacity:1;opacity:1;opacity:1;scale:1}.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details){overflow:revert-layer}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{--size:calc(var(--size-field,.25rem) * 10);--btn-p:1rem;--btn-fg:var(--color-base-content);cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;border-width:var(--border);touch-action:manipulation;--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-color,var(--color-base-200));border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow,transform;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 calc(var(--depth) * 5%))}}.btn{--btn-soft-bg:initial;--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize,.875rem);background-color:var(--btn-bg);color:var(--btn-fg);border-color:var(--btn-border);border-style:var(--btn-border-style,solid);outline-color:var(--btn-color,var(--color-base-content));--tw-prose-links:var(--btn-fg);background-image:none, var(--fx-noise);background-size:auto, calc(var(--noise,0) * 100%);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));box-shadow:var(--btn-inset) inset, var(--btn-shadow)}.btn:is([type=checkbox],[type=radio]){appearance:none}.btn:is([type=checkbox],[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@media (prefers-reduced-motion:no-preference){.loading{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.collapse:not(td,tr,colgroup){border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup){transition:grid-template-rows .2s}}.collapse:not(td,tr,colgroup)>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){--overflow-delay:.2s;overflow:revert-layer;content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:not(td,tr,colgroup):focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=checkbox],.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(td,tr,colgroup):not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse:not(td,tr,colgroup)[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse:not(td,tr,colgroup)[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:not(td,tr,colgroup):is(details){width:100%}.collapse:not(td,tr,colgroup):is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup):is(details)::details-content{transition:overflow .2s allow-discrete var(--overflow-delay), content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:not(td,tr,colgroup):is(details)>summary{outline:none;display:block;position:relative}.collapse:not(td,tr,colgroup):is(details)>summary::-webkit-details-marker{display:none}.filter{flex-wrap:wrap;display:flex}.filter [type=radio]{width:auto}.filter input{opacity:1;transition:visibility .1s allow-discrete, margin .1s, opacity .3s, padding .3s, border-width .1s;overflow:hidden;scale:1}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter>input:not(:last-child),.filter>:not(:last-child) input{margin-inline-end:.25rem}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:checked:before{background-color:currentColor}@starting-style{.toggle:checked:before{opacity:0}}.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle[aria-checked=true]:before{background-color:currentColor}@starting-style{.toggle[aria-checked=true]:before{opacity:0}}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked):before{background-color:currentColor}@starting-style{.toggle:has(>input:checked):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;--size:calc(var(--size-field,.25rem) * var(--in-size-mul,10));--input-color:var(--color-base-content);flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input{cursor:text;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field))}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input input{appearance:none;background-color:#0000;border:none;width:100%;height:100%}.input input::placeholder{color:var(--color-base-content);opacity:.5}.input input:focus,.input input:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input input:focus,.input input:focus-within{outline-offset:2px;outline:2px solid #0000}}.input input::-webkit-calendar-picker-indicator{inset-inline-end:-.15em}.input::-webkit-inner-spin-button{margin-inline-end:-10px}.input::-webkit-calendar-picker-indicator{inset-inline-end:.75em}input.input{text-align:start;display:inline-flex;position:relative}input.input[type=url],input.input[type=tel],input.input[type=email],input.input[type=number]{direction:ltr}input.input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}input.input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}input.input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input input{text-align:start;display:inline-flex;position:relative}.input input[type=url],.input input[type=tel],.input input[type=email],.input input[type=number]{direction:ltr}.input input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}.input input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}.input input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus{--font-size:1rem}}}.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]){box-shadow:none}.input:is(:disabled,[disabled])::placeholder,.input:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}fieldset:disabled .input{box-shadow:none}fieldset:disabled .input::placeholder,fieldset:disabled .input ::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{--range-fill-x:calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2));--range-fill-y:0;--range-fill-spread:calc(100cqw * var(--range-fill));cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);position:relative;inset-block-start:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);background-color:currentColor;position:relative}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range:disabled{cursor:not-allowed;opacity:.3}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%) var(--indicator-y,-50%);position:absolute}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.avatar-group .avatar{border:4px solid var(--color-base-100);border-radius:2147483647px;overflow:hidden}.avatar{vertical-align:middle;align-self:center;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox:checked:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox[aria-checked=true]:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.checkbox[aria-checked=mixed]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox[aria-checked=mixed]{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox[aria-checked=mixed]:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card{border-radius:var(--radius-box);outline-offset:2px;outline:2px solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus-visible,.card[aria-checked=true]{outline-color:currentColor}.card:has(>:checked,>:is([type=checkbox],[type=radio]):focus-visible){outline-color:currentColor}.card[aria-checked=true]:focus-visible{outline-width:4px}.card:has(>:checked:focus-visible){outline-width:4px}.card[aria-checked=true]:has(>:is([type=checkbox],[type=radio]):focus-visible){outline-width:4px}.card:has(>:is([type=checkbox],[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card>:is([type=checkbox],[type=radio]){appearance:none}.progress{appearance:none;border-radius:var(--radius-box);background-color:currentColor;width:100%;height:.5rem;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.progress{background-color:color-mix(in oklab, currentcolor 20%, transparent)}}.progress{color:var(--color-base-content)}.progress:indeterminate{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%}@media (prefers-reduced-motion:no-preference){.progress:indeterminate{animation:5s ease-in-out infinite progress}}@supports ((-moz-appearance:none)){.progress:indeterminate::-moz-progress-bar{background-color:#0000}@media (prefers-reduced-motion:no-preference){.progress:indeterminate::-moz-progress-bar{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}}.progress::-moz-progress-bar{border-radius:var(--radius-box);background-color:currentColor}@media (prefers-reduced-motion:no-preference){.progress::-moz-progress-bar{transition:inline-size .3s}}}@supports ((-webkit-appearance:none)){.progress::-webkit-progress-bar{border-radius:var(--radius-box);background-color:#0000}.progress::-webkit-progress-value{border-radius:var(--radius-box);background-color:currentColor}@media (prefers-reduced-motion:no-preference){.progress::-webkit-progress-value{transition:inline-size .3s}}}.textarea{appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;--input-color:var(--color-base-content);flex-shrink:1;min-height:5rem;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea{width:clamp(3rem,20rem,100%);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea::placeholder{color:var(--color-base-content);opacity:.5}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus{--font-size:1rem}}}.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:is(:disabled,[disabled])::placeholder,.textarea:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.hero{background-position:50%;background-size:cover;place-items:center;width:100%;display:grid}.hero>*{grid-row-start:1;grid-column-start:1}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>:not(script,style,template){place-items:start;gap:.5rem;display:grid}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 33%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(>:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-outline{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content)));--btn-border:var(--btn-color,var(--color-base-content));--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.btn-ghost{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content,currentColor)));--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.aura:has(>.card,>.alert){--aura-radius:var(--radius-box)}.aura:has(>.btn,>.input,>.select){--aura-radius:var(--radius-field)}.aura:has(>.checkbox,>.toggle,>.badge){--aura-radius:var(--radius-selector)}}@layer daisyui.l1.l2{.modal.modal-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal.modal-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal.modal-open){--page-scroll-lock: }@starting-style{.modal.modal-open{opacity:0}}.modal[open]{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal[open]>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal[open]){--page-scroll-lock: }@starting-style{.modal[open]{opacity:0}}.modal:popover-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:popover-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:popover-open){--page-scroll-lock: }@starting-style{.modal:popover-open{opacity:0}}.modal:target{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:target>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:target){--page-scroll-lock: }@starting-style{.modal:target{opacity:0}}.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal-toggle:checked+.modal>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal-toggle:checked+.modal){--page-scroll-lock: }@starting-style{.modal-toggle:checked+.modal{opacity:0}}.tabs-border>.tab{--tab-border-color:#0000 #0000 var(--tab-border-color) #0000;border-radius:var(--radius-field);position:relative}.tabs-border>.tab:before{content:"";background-color:var(--tab-border-color);width:calc(100% - var(--tab-p) * 2);border-radius:var(--radius-field);height:3px;bottom:0;left:var(--tab-p);transition:background-color .2s;position:absolute}:is(.tabs-border>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-border>.tab:is(input:checked),.tabs-border>.tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.tabs-lift>.tab{--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right;border-width:var(--tab-border);padding:var(--tab-paddings);border-color:var(--tab-border-colors);border-start-start-radius:var(--tab-radius-ss);border-start-end-radius:var(--tab-radius-se);border-end-end-radius:var(--tab-radius-ee);border-end-start-radius:var(--tab-radius-es)}.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad));background-color:var(--tab-bg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):before{z-index:1;content:"";width:var(--tab-corner-width);height:var(--tab-corner-height);background-position:var(--tab-corner-position);background-image:var(--radius-start), var(--radius-end);background-size:var(--tab-radius-limit) var(--tab-radius-limit);inset:var(--tab-inset);background-repeat:no-repeat;display:block;position:absolute}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{--radius-start:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{transform:rotateY(180deg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{--radius-end:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{transform:rotateY(180deg)}.tabs-lift:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-top>.tab{--tab-order:0;--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-top>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-top>.tab:is(input:checked),.tabs-top>.tab:is(label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad))}.tabs-top:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-bottom>.tab{--tab-order:1;--tab-border:var(--border) 0 0 0;--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:var(--tab-radius-limit);--tab-radius-ee:var(--tab-radius-limit);--tab-border-colors:var(--tab-border-color) #0000 #0000 #0000;--tab-paddings:0 var(--tab-p) var(--border) var(--tab-p);--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-bottom>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-bottom>.tab:is(input:checked),.tabs-bottom>.tab:is(label:has(:checked)){--tab-border:0 var(--border) var(--border) var(--border);--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);--tab-paddings:var(--border) calc(var(--tab-p) - var(--border)) 0 calc(var(--tab-p) - var(--border));--tab-inset:0 auto auto auto;--radius-start:radial-gradient(circle at bottom left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at bottom right, var(--tab-radius-grad))}.tabs-bottom:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color)}.tabs-box>.tab{border-radius:var(--radius-field);border-style:none}.tabs-box>.tab:focus-visible,.tabs-box>.tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>.tab:focus-visible{z-index:1}.tabs-xs>.tab{--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.tabs-sm>.tab{--tab-p:.5rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.875rem}.tabs-md>.tab{--tab-p:.75rem;--tab-radius-min:calc(.75rem - var(--border));font-size:.875rem}.tabs-lg>.tab{--tab-p:1rem;--tab-radius-min:calc(1.5rem - var(--border));font-size:1.125rem}.tabs-xl>.tab{--tab-p:1.25rem;--tab-radius-min:calc(2rem - var(--border));font-size:1.125rem}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup)[open].collapse-arrow>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse:not(td,tr,colgroup).collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse:not(td,tr,colgroup)[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse:not(td,tr,colgroup).collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse:not(td,tr,colgroup)[open].collapse-plus>.collapse-title:after,.collapse:not(td,tr,colgroup)[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(>.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(>.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.steps-horizontal .step{text-align:center;grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps-horizontal .step:before{width:100%;height:.5rem;margin-inline-start:-100%;translate:0}[dir=rtl] :is(.steps-horizontal .step):before{translate:0}.steps-vertical .step{grid-template-rows:auto;grid-template-columns:40px 1fr;justify-items:start;gap:.5rem;min-height:4rem;display:grid}.steps-vertical .step:before{width:.5rem;height:100%;margin-inline-start:50%;translate:-50% -50%}[dir=rtl] :is(.steps-vertical .step):before{translate:50% -50%}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.checkbox:disabled{cursor:not-allowed;opacity:.2}.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card-xs .card-body{--card-p:.5rem;--card-fs:.6875rem}.card-sm .card-body{--card-p:1rem;--card-fs:.75rem}.card-md .card-body{--card-p:1.5rem;--card-fs:.875rem}.card-lg .card-body{--card-p:2rem;--card-fs:1rem}.card-xl .card-body{--card-p:2.5rem;--card-fs:1.125rem}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.card-xs .card-title{--cardtitle-fs:.875rem}.card-sm .card-title{--cardtitle-fs:1rem}.card-md .card-title{--cardtitle-fs:1.125rem}.card-lg .card-title{--cardtitle-fs:1.25rem}.card-xl .card-title{--cardtitle-fs:1.375rem}.btn-circle{width:var(--size);height:var(--size);border-radius:2147483647px;padding-inline:0}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}@media (prefers-reduced-motion:no-preference){.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content);--btn-soft-bg:var(--color-neutral-content) 80%;--btn-rest-fg:initial}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content);--btn-soft-bg:initial}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content);--btn-soft-bg:initial}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content);--btn-soft-bg:initial}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem) * 12)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);--btn-soft-bg:initial}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}.textarea-sm{--font-size-min:.75rem}.floating-label:has(.textarea-sm){--top-mul:4;--font-size:.75rem}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}@layer daisyui.l1{@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:hover{color:var(--btn-fg);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:hover{--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0)}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-bg:var(--btn-color,var(--color-base-200));color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){isolation:isolate}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){visibility:hidden;opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(:focus-visible)):has(:checked:not(.filter-reset,[type=checkbox])) :is(input,button):not(:checked,.filter-reset,[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}}@layer daisyui{.btn:is(:disabled,[disabled],[aria-disabled=true]){pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true]){color:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true]){--btn-bg:#0000;--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}:is(.input[type=url],.input[type=tel],.input[type=email],.input[type=number]):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-start-start-radius:var(--join-se,var(--radius-field));border-start-end-radius:var(--join-ss,var(--radius-field));border-end-end-radius:var(--join-es,var(--radius-field));border-end-start-radius:var(--join-ee,var(--radius-field))}@layer daisyui.l1.l2.l3.l4{.card-body p{flex-grow:1}.card figure:first-child{border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card figure:last-child{border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[16\\%\\]{inset:16%}.inset-\\[20\\%\\]{inset:20%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:0}.inset-x-8{inset-inline:calc(var(--spacing) * 8)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-\\[20\\%\\]{bottom:20%}.bottom-\\[calc\\(6rem_\\+_var\\(--cvi-status-strip\\,0px\\)\\)\\]{bottom:calc(6rem + var(--cvi-status-strip,0px))}.bottom-\\[calc\\(6rem_\\+_var\\(--mc-strip-band\\,0px\\)\\)\\]{bottom:calc(6rem + var(--mc-strip-band,0px))}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;--join-ml:0;--join-mt:0;--join-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:2}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){z-index:1}}:scope :where(:scope>:first-child){--join-ss:var(--radius-field);--join-se:calc(var(--radius-field) * var(--join-v));--join-es:calc(var(--radius-field) * var(--join-h));--join-ee:0}:scope :where(:scope>:last-child){--join-ss:0;--join-se:calc(var(--radius-field) * var(--join-h));--join-es:calc(var(--radius-field) * var(--join-v));--join-ee:var(--radius-field)}:scope :where(:scope>:only-child){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:scope :where(:scope>:not(:first-child)){--join-ml:calc(var(--border,1px) * -1 * var(--join-h));--join-mt:calc(var(--border,1px) * -1 * var(--join-v))}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[5\\]{z-index:5}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-2{grid-row-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-\\[var\\(--tavus-expand-aspect\\)\\]{aspect-ratio:var(--tavus-expand-aspect)}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:0}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-2\\/5{height:40%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-\\[var\\(--tavus-expand-height\\)\\]{height:var(--tavus-expand-height)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\\[var\\(--tavus-expand-max-height\\)\\]{max-height:var(--tavus-expand-max-height)}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.w-0{width:0}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[28rem\\]{width:28rem}.w-\\[100vw\\]{width:100vw}.w-\\[var\\(--tavus-expand-width\\)\\]{width:var(--tavus-expand-width)}.w-full{width:100%}.w-max{width:max-content}.w-screen{width:100vw}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[22rem\\]{max-width:22rem}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,80vw\\)\\]{max-width:min(20rem,80vw)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-\\[var\\(--tavus-expand-max-width\\)\\]{max-width:var(--tavus-expand-max-width)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.appearance-none{appearance:none}.grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.grid-cols-\\[5\\.5rem_1fr\\]{grid-template-columns:5.5rem 1fr}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\\[length\\:var\\(--border\\)\\]{border-style:var(--tw-border-style);border-width:var(--border)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-300{border-color:var(--color-base-300)}.border-info\\/80{border-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.border-info\\/80{border-color:color-mix(in oklab, var(--color-info) 80%, transparent)}}.border-success{border-color:var(--color-success)}.border-warning,.border-warning\\/70{border-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\\/70{border-color:color-mix(in oklab, var(--color-warning) 70%, transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.border-white\\/50{border-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.glass{-webkit-backdrop-filter:blur(var(--glass-blur,40px));backdrop-filter:blur(var(--glass-blur,40px));background-color:#0000;background-image:linear-gradient(135deg, oklch(100% 0 0 / var(--glass-opacity,30%)) 0%, oklch(0% 0 0/0) 100%), linear-gradient(var(--glass-reflect-degree,100deg), oklch(100% 0 0 / var(--glass-reflect-opacity,5%)) 25%, oklch(0% 0 0/0) 25%);box-shadow:0 0 0 1px oklch(100% 0 0 / var(--glass-border-opacity,20%)) inset, 0 0 0 2px oklch(0% 0 0/.05);text-shadow:0 1px oklch(0% 0 0 / var(--glass-text-shadow-opacity,5%));border:none}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab, red, red)){.bg-black\\/35{background-color:color-mix(in oklab, var(--color-black) 35%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-info\\/5{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/5{background-color:color-mix(in oklab, var(--color-info) 5%, transparent)}}.bg-info\\/85{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/85{background-color:color-mix(in oklab, var(--color-info) 85%, transparent)}}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-success\\/70{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/70{background-color:color-mix(in oklab, var(--color-success) 70%, transparent)}}.bg-success\\/85{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/85{background-color:color-mix(in oklab, var(--color-success) 85%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-warning\\/85{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/85{background-color:color-mix(in oklab, var(--color-warning) 85%, transparent)}}.bg-warning\\/90{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/90{background-color:color-mix(in oklab, var(--color-warning) 90%, transparent)}}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab, red, red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab, var(--color-black) 60%, transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-16{padding-inline:calc(var(--spacing) * 16)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.text-preview-description-full-screen{font-size:var(--text-preview-description-full-screen)}.text-preview-title{font-size:var(--text-preview-title)}.text-preview-title-full-screen{font-size:var(--text-preview-title-full-screen)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-info-content{color:var(--color-info-content)}.text-inherit{color:inherit}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-success{color:var(--color-success)}.text-success-content{color:var(--color-success-content)}.text-warning{color:var(--color-warning)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-base-100,.ring-base-100\\/20{--tw-ring-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.ring-base-100\\/20{--tw-ring-color:color-mix(in oklab, var(--color-base-100) 20%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-xl{--tw-blur:blur(var(--blur-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-\\[0\\.55\\]{--tw-brightness:brightness(.55);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn-preview-action{--btn-color:var(--color-preview-action);--btn-fg:var(--color-preview-action-content)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[--tavus-expand-default-max-height\\:900px\\]{--tavus-expand-default-max-height:900px}.\\[--tavus-expand-default-max-width\\:1280px\\]{--tavus-expand-default-max-width:1280px}.\\[text-shadow\\:0_1px_3px_rgb\\(0_0_0\\/0\\.45\\)\\]{text-shadow:0 1px 3px #00000073}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}.backdrop\\:bg-black\\/60::backdrop{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.backdrop\\:bg-black\\/60::backdrop{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:bg-black\\/50:hover{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/50:hover{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:text-error:hover{color:var(--color-error)}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.has-\\[\\.cvi-video-surface\\]\\:will-change-transform:has(.cvi-video-surface){will-change:transform}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}.motion-safe\\:backdrop\\:animate-\\[tavusFadeIn_180ms_ease-out\\]::backdrop{animation:.18s ease-out tavusFadeIn}}@container not (width>=56.25rem){.\\@max-mobile\\:inset-x-5{inset-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:bottom-\\[calc\\(5rem_\\+_var\\(--cvi-status-strip\\,0px\\)\\)\\]{bottom:calc(5rem + var(--cvi-status-strip,0px))}.\\@max-mobile\\:bottom-\\[calc\\(5rem_\\+_var\\(--mc-strip-band\\,0px\\)\\)\\]{bottom:calc(5rem + var(--mc-strip-band,0px))}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:col-span-2{grid-column:span 2/span 2}.\\@max-mobile\\:row-start-1{grid-row-start:1}.\\@max-mobile\\:block{display:block}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:var(--spacing)}.\\@max-mobile\\:self-start{align-self:flex-start}.\\@max-mobile\\:p-5{padding:calc(var(--spacing) * 5)}.\\@max-mobile\\:px-5{padding-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\@max-mobile\\:text-preview-title-narrow{font-size:var(--text-preview-title-narrow)}}@container not (width>=48rem){.\\@max-3xl\\:px-10{padding-inline:calc(var(--spacing) * 10)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}.\\@max-md\\:px-5{padding-inline:calc(var(--spacing) * 5)}@layer daisyui.l1.l2{.\\@max-md\\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem) * 10)}}}@container (width>=48rem){.\\@3xl\\:grid-cols-\\[1fr_1\\.2fr\\]{grid-template-columns:1fr 1.2fr}}@media (width<=768px){.\\[\\@media\\(max-width\\:768px\\)\\]\\:h-dvh{height:100dvh}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-h-none{max-height:none}.\\[\\@media\\(max-width\\:768px\\)\\]\\:w-screen{width:100vw}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-w-none{max-width:none}}@media (width>=2560px){.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-height\\:1200px\\]{--tavus-expand-default-max-height:1200px}.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-width\\:1600px\\]{--tavus-expand-default-max-width:1600px}}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));background-color:var(--btn-bg);background-image:none, var(--fx-noise);color:var(--btn-fg);opacity:.9}.cvi-autohide{transition-property:opacity,transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}.cvi-control-rail{pointer-events:auto}.cvi-autohide[data-hidden=true]{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-autohide-slide[data-hidden=true]{transform:translateY(100%)}.cvi-control-rail[data-hidden=true]{pointer-events:none}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide-slide{transform:translateY(100%)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-control-rail{pointer-events:none}}@media (prefers-reduced-motion:reduce){.cvi-autohide{transition:none}}.cvi-status-strip{transition-property:transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-status-strip{transform:translateY(var(--cvi-status-strip-drop,0px));transition-timing-function:cubic-bezier(.7,0,.84,0)}}@media (prefers-reduced-motion:reduce){.cvi-status-strip{transition:none}}.cvi-strip-lift{transition-property:bottom;transition-duration:.3s;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){.cvi-strip-lift{transition:none}}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide[data-pinned=true]:not([data-hidden=true]){opacity:1;transition-timing-function:cubic-bezier(.16,1,.3,1)}}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusFadeIn{0%{opacity:0}to{opacity:1}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}@keyframes tavusAudioWave{0%{opacity:var(--wave-peak,.25);transform:scale(1)}to{opacity:0;transform:scale(1.9)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes aura{to{--aura-angle:360deg;transform:translateZ(1px)}}@keyframes aura-glow{20%,80%{opacity:.7;filter:blur(.25rem)}50%{opacity:1;filter:blur(.75rem)}}@keyframes aura-glow-after{20%,80%{opacity:.3;filter:blur(1rem)}50%{opacity:.6;filter:blur(1.5rem)}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Fe,Ie,Le,Re,ze=0,Be=[],Ve=i,He=Ve.__b,Ue=Ve.__r,We=Ve.diffed,Ge=Ve.__c,Ke=Ve.unmount,qe=Ve.__;function Je(e,t){Ve.__h&&Ve.__h(Ie,e,ze||t),ze=0;var n=Ie.__H||(Ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function M(e){return ze=1,Ye(it,e)}function Ye(e,t,n){var r=Je(Fe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):it(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ie,!Ie.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};Ie.__f=!0;var a=Ie.shouldComponentUpdate,o=Ie.componentWillUpdate;Ie.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Ie.shouldComponentUpdate=i}return r.__N||r.__}function N(e,t){var n=Je(Fe++,3);!Ve.__s&&rt(n.__H,t)&&(n.__=e,n.u=t,Ie.__H.__h.push(n))}function Xe(e,t){var n=Je(Fe++,4);!Ve.__s&&rt(n.__H,t)&&(n.__=e,n.u=t,Ie.__h.push(n))}function P(e){return ze=5,F(function(){return{current:e}},[])}function F(e,t){var n=Je(Fe++,7);return rt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function I(e,t){return ze=8,F(function(){return e},t)}function L(e){var t=Ie.context[e.__c],n=Je(Fe++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ie)),t.props.value):e.__}function Ze(){var e=Je(Fe++,11);if(!e.__){for(var t=Ie.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Qe(){for(var e;e=Be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(tt),t.__h.some(nt),t.__h=[]}catch(n){t.__h=[],Ve.__e(n,e.__v)}}}Ve.__b=function(e){Ie=null,He&&He(e)},Ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qe&&qe(e,t)},Ve.__r=function(e){Ue&&Ue(e),Fe=0;var t=(Ie=e.__c).__H;t&&(Le===Ie?(t.__h=[],Ie.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(tt),t.__h.some(nt),t.__h=[],Fe=0)),Le=Ie},Ve.diffed=function(e){We&&We(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Be.push(t)!==1&&Re===Ve.requestAnimationFrame||((Re=Ve.requestAnimationFrame)||et)(Qe)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Le=Ie=null},Ve.__c=function(e,t){t.some(function(e){try{e.__h.some(tt),e.__h=e.__h.filter(function(e){return!e.__||nt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Ve.__e(n,e.__v)}}),Ge&&Ge(e,t)},Ve.unmount=function(e){Ke&&Ke(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{tt(e)}catch(e){t=e}}),n.__H=void 0,t&&Ve.__e(t,n.__v))};var $e=typeof requestAnimationFrame==`function`;function et(e){var t,n=function(){clearTimeout(r),$e&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);$e&&(t=requestAnimationFrame(n))}function tt(e){var t=Ie,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ie=t}function nt(e){var t=Ie;e.__c=e.__(),Ie=t}function rt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function it(e,t){return typeof t==`function`?t(e):t}var at=16/9,ot=9/16,st=`var(--tavus-expand-default-max-width)`,ct=`var(--tavus-expand-default-max-height)`,lt=`100vw - 40px`,ut=`100dvh - 40px`;function dt(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t||Array.isArray(t))return;let n=t,r={};return typeof n.enabled==`boolean`&&(r.enabled=n.enabled),typeof n.fullscreen==`boolean`&&(r.fullscreen=n.fullscreen),(n.aspect===`horizontal`||n.aspect===`vertical`)&&(r.aspect=n.aspect),(typeof n.custom_aspect==`string`||typeof n.custom_aspect==`number`)&&(r.custom_aspect=n.custom_aspect),typeof n.max_width==`number`&&(r.max_width=n.max_width),typeof n.max_height==`number`&&(r.max_height=n.max_height),r}function ft(e){if(typeof e==`number`)return ht(e);if(typeof e!=`string`)return;let t=e.trim();if(!t)return;let n=t.split(/[/:]/);if(n.length===2){let e=ht(Number(n[0])),t=ht(Number(n[1]));return e&&t?e/t:void 0}return n.length===1?ht(Number(t)):void 0}function pt(e){let t=ft(e?.custom_aspect)??(e?.aspect===`vertical`?ot:at),n=ht(e?.max_width),r=ht(e?.max_height),i=t>=1?`landscape`:`portrait`;return e?.fullscreen?{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:{"--tavus-expand-aspect":`auto`,"--tavus-expand-width":`100%`,"--tavus-expand-height":`100%`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":`none`}}:{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:i===`landscape`?{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`min(${lt}, (${ut}) * ${t}, ${n?`${n}px`:st})`,"--tavus-expand-height":`auto`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":r?`${r}px`:`none`}:{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`auto`,"--tavus-expand-height":`min(${ut}, (${lt}) / ${t}, ${r?`${r}px`:ct})`,"--tavus-expand-max-width":n?`${n}px`:`none`,"--tavus-expand-max-height":`none`}}}function mt(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}function ht(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:void 0}var gt=0;Array.isArray;function R(e,t,n,r,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return i.vnode&&i.vnode(u),u}var _t=xe(null);function vt(e){let t,n;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{n=`invalid_override_config`}let r=!!e.token;return{surface:e.surface,layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,cameraOnStart:e[`camera-on-start`]===`off`?`off`:`on`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:bt(e[`conversational-context`]),customGreeting:bt(e[`custom-greeting`]),memoryStores:xt(e[`memory-stores`]),overrideConfig:t,...n?{configInputError:n}:{},expandOptions:dt(e[`expand-options`]),mode:r?`preview`:`production`}}function yt(e){let t=F(()=>vt({surface:e.surface,layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token}),[e.surface,e.layout,e[`camera-on-start`],e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`memory-stores`],e[`base-url`],e[`expand-options`],e.token]);return R(_t.Provider,{value:t,children:e.children})}function bt(e){return e?.trim()||void 0}function xt(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var St=Symbol.for(`preact-signals`);function Ct(){if(kt>1)kt--;else{var e,t=!1;for((function(){var e=Nt;for(Nt=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();Ot!==void 0;){var n=Ot;for(Ot=void 0,At++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Rt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(At=0,kt--,t)throw e}}function wt(e){if(kt>0)return e();Mt=++jt,kt++;try{return e()}finally{Ct()}}var Tt,Et=void 0;function Dt(e){var t=Et,n=Tt;Et=void 0,Tt=void 0;try{return e()}finally{Et=t,Tt=n}}var Ot=void 0,kt=0,At=0,jt=0,Mt=0,Nt=void 0,Pt=0;function Ft(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function It(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}It.prototype.brand=St,It.prototype.h=function(){return!0},It.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?Dt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},It.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Dt(function(){var e;(e=t.Z)==null||e.call(t)}))}},It.prototype.subscribe=function(e){var t=this;return qt(function(){var n=t.value;Dt(function(){return e(n)})},{name:`sub`})},It.prototype.valueOf=function(){return this.value},It.prototype.toString=function(){return this.value+``},It.prototype.toJSON=function(){return this.value},It.prototype.peek=function(){var e=this;return Dt(function(){return e.value})},Object.defineProperty(It.prototype,"value",{get:function(){var e=Ft(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(At>100)throw Error(`Cycle detected`);(function(e){kt!==0&&At===0&&e.l!==Mt&&(e.l=Mt,Nt={S:e,v:e.v,i:e.i,o:Nt})})(this),this.v=e,this.i++,Pt++,kt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ct()}}}});function Lt(e,t){return new It(e,t)}function Rt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function zt(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Bt(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Vt(e,t){It.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Pt-1,this.f=4}Vt.prototype=new It,Vt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pt))return!0;if(this.g=Pt,this.f|=1,this.i>0&&!Rt(this))return this.f&=-2,!0;var e=Et;try{zt(this),Et=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Et=e,Bt(this),this.f&=-2,!0},Vt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}It.prototype.S.call(this,e)},Vt.prototype.U=function(e){if(this.t!==void 0&&(It.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Vt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Vt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Ft(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ht(e,t){return new Vt(e,t)}function Ut(e){var t=e.m;if(e.m=void 0,typeof t==`function`){kt++;var n=Et;Et=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Wt(e),t}finally{Et=n,Ct()}}}function Wt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ut(e)}function Gt(e){if(Et!==this)throw Error(`Out-of-order effect`);Bt(this),Et=e,this.f&=-2,8&this.f&&Wt(this),Ct()}function Kt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Tt&&Tt.push(this)}Kt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},Kt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Ut(this),zt(this),kt++;var e=Et;return Et=this,Gt.bind(this,e)},Kt.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ot,Ot=this)},Kt.prototype.d=function(){this.f|=8,1&this.f||Wt(this)},Kt.prototype.dispose=function(){this.d()};function qt(e,t){var n=new Kt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Jt,Yt,Xt=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,Zt=[],Qt=[];qt(function(){Jt=this.N})();function $t(e,t){i[e]=t.bind(null,i[e]||function(){})}function en(e){if(Yt){var t=Yt;Yt=void 0,t()}Yt=e&&e.S()}function tn(e){var t=this,n=e.data,r=rn(n);r.name=`ReactiveDom`,r.value=n;var i=F(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Ht(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Ht(function(){return!Array.isArray(i.value)&&!o(i.value)}),s=qt(function(){if(this.N=un,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),c=t.__$u.d;return t.__$u.d=function(){s(),c.call(this)},[a,i]},[]),a=i[0],s=i[1];return a.value?s.peek():s.value}tn.displayName=`ReactiveTextNode`,Object.defineProperties(It.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:tn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),$t(`__b`,function(e,t){if(en(),typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof It&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),$t(`__r`,function(e,t){if(e(t),t.type!==D){en();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return qt(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;Xt&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),en(n)}}),$t(`__e`,function(e,t,n,r){en(),e(t,n,r)}),$t(`diffed`,function(e,t){en();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=nn(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function nn(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=Lt(n);return{o:function(e,t){a.value=e,r=t},d:qt(function(){this.N=un;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}$t(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),$t(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),ee.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function rn(e,t){return F(function(){return Lt(e,t)},[])}var an=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},on=function(e){queueMicrotask(function(){queueMicrotask(e)})};function sn(){wt(function(){for(var e;e=Zt.shift();)Jt.call(e)})}function cn(){Zt.push(this)===1&&(i.requestAnimationFrame||an)(sn)}function ln(){wt(function(){for(var e;e=Qt.shift();)Jt.call(e)})}function un(){Qt.push(this)===1&&(i.requestAnimationFrame||on)(ln)}function dn(e,t){var n=P(e);n.current=e,N(function(){return qt(function(){return this.N=cn,n.current()},t)},[])}function fn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}function pn(){if(!globalThis.crypto?.getRandomValues)return;let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function mn(e){return typeof e==`string`&&/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(e)}function hn(e,t){let n=e.split(`?`)[0];if(!n.startsWith(`/v2/deployments/${t}/`))return;let r=n.slice(n.lastIndexOf(`/`)+1);if(r===`start-token`)return`start_token`;if(r===`init`||r===`start`||r===`end`)return r}var gn=fn(`API`);function _n(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token,r=e.deploymentId?{deploymentId:e.deploymentId,sessionId:pn()}:void 0;function i(e){try{r?.observe?.(e)}catch{gn.warn(`Diagnostic observer failed`)}}async function a(e,a,o,s){let c={};o!=null&&(c[`Content-Type`]=`application/json`),n&&(c.Authorization=`Bearer ${n}`);let l=r&&hn(a,r.deploymentId),u=l?pn():void 0,d=r?.attemptId,f=`${t}${a}`;gn.info(e,f);let p=performance.now(),m,h=!1,g,_=a.match(/\/conversations\/(c[A-Za-z0-9]{1,63})\/end(?:\?|$)/)?.[1],v=(e,t)=>{l&&u&&i({stage:l,outcome:e,client_request_id:u,request_id:g,attempt_id:d,conversation_id:_,status:m?.status,duration_ms:e===`started`?void 0:performance.now()-p,...e===`failed`?{error:t,networkFailure:h&&m===void 0}:{}})};v(`started`);try{let t=o==null?void 0:JSON.stringify(o);h=!0,m=await fetch(f,{method:e,headers:c,body:t,signal:s?.signal,keepalive:s?.keepalive});let n=m.headers.get(`X-Tavus-Request-Id`);if(g=mn(n)?n:void 0,l&&yn(r,m),!m.ok){let t=await m.text().catch(()=>``);throw gn.error(`${e} ${f} → ${m.status}`,t),new vn(m.status,t||m.statusText,m.headers)}if(m.headers.get(`content-type`)?.includes(`application/json`)){let e=await m.json();return _=bn(e)??_,v(`succeeded`),e}v(`succeeded`);return}catch(e){throw v(`failed`,e),e}}return{...r?{diagnostics:r}:{},get:(e,t)=>a(`GET`,e,void 0,t),post:(e,t,n)=>a(`POST`,e,t,n)}}var vn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function yn(e,t){let n=t.headers.get(`X-Tavus-Telemetry-Version`);if(n&&/^[1-9][0-9]{0,8}$/.test(n))try{e?.capabilities?.(Number(n))}catch{gn.warn(`Diagnostic capability observer failed`)}}function bn(e){if(e&&typeof e==`object`&&`conversation_id`in e&&typeof e.conversation_id==`string`&&/^c[A-Za-z0-9]{1,63}$/.test(e.conversation_id))return e.conversation_id}function xn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function Sn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function Cn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function wn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function En(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(n[r]=Tn(a)&&Tn(i)?En(a,i):i)}return n}var Dn=z,On={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:{type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},show_fullscreen_hint:{type:`boolean`,default:!0},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``},magic_grid:{type:`boolean`}}},style:{type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},field_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},selectors_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},border_width:{type:`integer`,enum:[0,1,2,3,4],default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:[1,2,3],default:2},selectors_size:{type:`integer`,enum:[1,2,3],default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`},magic_canvas:{type:`object`,properties:{accent_color:{type:`string`}}}}},widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:{type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},preview:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},haircheck:{type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},after_call:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]}}},branding:{type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},unavailable_screen:{type:`object`,properties:{daily_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},total_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},busy:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},error:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},captcha_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},insecure_context:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},browser_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]}}}}}},kn=Object.prototype.hasOwnProperty;function z(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){if(e&&typeof e==`object`&&!Array.isArray(e)){e.schema_version===void 0&&(e.schema_version=1),e.terms_content===void 0&&(e.terms_content=``),e.terms_enabled===void 0&&(e.terms_enabled=!1),e.show_haircheck===void 0&&(e.show_haircheck=!0),e.language_selector===void 0&&(e.language_selector=!1),e.conversation===void 0&&(e.conversation={}),e.style===void 0&&(e.style={}),e.widget===void 0&&(e.widget={}),e.landing_page===void 0&&(e.landing_page={}),e.preview===void 0&&(e.preview={}),e.haircheck===void 0&&(e.haircheck={}),e.after_call===void 0&&(e.after_call={}),e.branding===void 0&&(e.branding={});for(let t in e)kn.call(On.properties,t)||delete e[t];{let n=e.schema_version;if(typeof n!=`number`||n%1||isNaN(n))return z.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(n!==1)return z.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/const`,keyword:`const`,params:{allowedValue:1},message:`must be equal to constant`}],!1;var a=!0;if(a){if(typeof e.terms_content!=`string`)return z.errors=[{instancePath:t+`/terms_content`,schemaPath:`#/properties/terms_content/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var a=!0;if(a){if(typeof e.terms_enabled!=`boolean`)return z.errors=[{instancePath:t+`/terms_enabled`,schemaPath:`#/properties/terms_enabled/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.show_haircheck!=`boolean`)return z.errors=[{instancePath:t+`/show_haircheck`,schemaPath:`#/properties/show_haircheck/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.language_selector!=`boolean`)return z.errors=[{instancePath:t+`/language_selector`,schemaPath:`#/properties/language_selector/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){let n=e.conversation;if(n&&typeof n==`object`&&!Array.isArray(n)){n.modality===void 0&&(n.modality=`video`),n.enable_chat===void 0&&(n.enable_chat=!1),n.enable_closed_captions===void 0&&(n.enable_closed_captions=!1),n.enable_picture_in_picture===void 0&&(n.enable_picture_in_picture=!1),n.show_fullscreen_hint===void 0&&(n.show_fullscreen_hint=!0),n.unique_memory_tag===void 0&&(n.unique_memory_tag=!0),n.context===void 0&&(n.context=``);for(let e in n)e!==`modality`&&e!==`enable_chat`&&e!==`enable_closed_captions`&&e!==`enable_picture_in_picture`&&e!==`show_fullscreen_hint`&&e!==`unique_memory_tag`&&e!==`context`&&e!==`magic_grid`&&delete n[e];{let e=n.modality;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`audio`&&e!==`video`&&e!==`chat`)return z.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/enum`,keyword:`enum`,params:{allowedValues:On.properties.conversation.properties.modality.enum},message:`must be equal to one of the allowed values`}],!1;var o=!0;if(o){if(typeof n.enable_chat!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_chat`,schemaPath:`#/properties/conversation/properties/enable_chat/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_closed_captions!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_closed_captions`,schemaPath:`#/properties/conversation/properties/enable_closed_captions/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_picture_in_picture!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_picture_in_picture`,schemaPath:`#/properties/conversation/properties/enable_picture_in_picture/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.show_fullscreen_hint!=`boolean`)return z.errors=[{instancePath:t+`/conversation/show_fullscreen_hint`,schemaPath:`#/properties/conversation/properties/show_fullscreen_hint/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.unique_memory_tag!=`boolean`)return z.errors=[{instancePath:t+`/conversation/unique_memory_tag`,schemaPath:`#/properties/conversation/properties/unique_memory_tag/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.context!=`string`)return z.errors=[{instancePath:t+`/conversation/context`,schemaPath:`#/properties/conversation/properties/context/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var o=!0;if(o){if(n.magic_grid!==void 0){if(typeof n.magic_grid!=`boolean`)return z.errors=[{instancePath:t+`/conversation/magic_grid`,schemaPath:`#/properties/conversation/properties/magic_grid/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0}else var o=!0}}}}}}}}}else return z.errors=[{instancePath:t+`/conversation`,schemaPath:`#/properties/conversation/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.style;if(n&&typeof n==`object`&&!Array.isArray(n)){n.mode===void 0&&(n.mode=`system`),n.style===void 0&&(n.style=`basic`),n.boxes_radius===void 0&&(n.boxes_radius=1),n.field_radius===void 0&&(n.field_radius=1),n.selectors_radius===void 0&&(n.selectors_radius=1),n.border_width===void 0&&(n.border_width=0),n.depth_effect===void 0&&(n.depth_effect=!1),n.noise_effect===void 0&&(n.noise_effect=!1),n.fields_size===void 0&&(n.fields_size=2),n.selectors_size===void 0&&(n.selectors_size=2),n.icon_library===void 0&&(n.icon_library=`pixelarticons`);for(let e in n)kn.call(On.properties.style.properties,e)||delete n[e];{let e=n.mode;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`system`&&e!==`light`&&e!==`dark`)return z.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.mode.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.style;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`basic`&&e!==`wireframe`&&e!==`silk`&&e!==`cyberpunk`&&e!==`retro`&&e!==`lemonade`)return z.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.style.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.boxes_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.boxes_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.field_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.field_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.selectors_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.border_width;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.border_width.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(typeof n.depth_effect!=`boolean`)return z.errors=[{instancePath:t+`/style/depth_effect`,schemaPath:`#/properties/style/properties/depth_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){if(typeof n.noise_effect!=`boolean`)return z.errors=[{instancePath:t+`/style/noise_effect`,schemaPath:`#/properties/style/properties/noise_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){let e=n.fields_size;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return z.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.fields_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_size;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return z.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.selectors_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.icon_library;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`pixelarticons`&&e!==`lucide`)return z.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.icon_library.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(n.magic_canvas!==void 0){let e=n.magic_canvas;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let t in e)t!==`accent_color`&&delete e[t];if(e.accent_color!==void 0&&typeof e.accent_color!=`string`)return z.errors=[{instancePath:t+`/style/magic_canvas/accent_color`,schemaPath:`#/properties/style/properties/magic_canvas/properties/accent_color/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/style/magic_canvas`,schemaPath:`#/properties/style/properties/magic_canvas/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0}}}}}}}}}}}}}else return z.errors=[{instancePath:t+`/style`,schemaPath:`#/properties/style/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.widget;if(n&&typeof n==`object`&&!Array.isArray(n)){n.variant===void 0&&(n.variant=`compact`),n.position===void 0&&(n.position=`bottom-right`),n.expandable===void 0&&(n.expandable=`default`),n.avatar===void 0&&(n.avatar={}),n.text===void 0&&(n.text={});for(let e in n)e!==`variant`&&e!==`position`&&e!==`expandable`&&e!==`avatar`&&e!==`text`&&delete n[e];{let e=n.variant;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`tiny`&&e!==`compact`&&e!==`full`)return z.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.variant.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.position;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`bottom-left`&&e!==`bottom-right`&&e!==`top-left`&&e!==`top-right`&&e!==`top`&&e!==`bottom`)return z.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.position.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.expandable;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!=="default"&&e!==`always`&&e!==`start-expanded`)return z.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.expandable.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.avatar;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`orb`);for(let t in e)t!==`type`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return z.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`orb`&&n!==`image`)return z.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.avatar.properties.type.enum},message:`must be equal to one of the allowed values`}],!1}}else return z.errors=[{instancePath:t+`/widget/avatar`,schemaPath:`#/properties/widget/properties/avatar/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0;if(c){let e=n.text;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.btn_title===void 0&&(e.btn_title=``);for(let t in e)t!==`title`&&t!==`btn_title`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/widget/text/title`,schemaPath:`#/properties/widget/properties/text/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.btn_title!=`string`)return z.errors=[{instancePath:t+`/widget/text/btn_title`,schemaPath:`#/properties/widget/properties/text/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/widget/text`,schemaPath:`#/properties/widget/properties/text/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}}}}}}else return z.errors=[{instancePath:t+`/widget`,schemaPath:`#/properties/widget/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.landing_page;if(n&&typeof n==`object`&&!Array.isArray(n)){n.template===void 0&&(n.template=`1`),n.access===void 0&&(n.access=`public`),n.logo===void 0&&(n.logo=``),n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]),n.background===void 0&&(n.background=null);for(let e in n)e!==`template`&&e!==`access`&&e!==`logo`&&e!==`title`&&e!==`description`&&e!==`cta`&&e!==`background`&&delete n[e];{let e=n.template;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`1`&&e!==`2`&&e!==`3`&&e!==`4`&&e!==`5`)return z.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.template.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){let e=n.access;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`public`&&e!==`auth_required`)return z.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.access.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){if(typeof n.logo!=`string`)return z.errors=[{instancePath:t+`/landing_page/logo`,schemaPath:`#/properties/landing_page/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/landing_page/title`,schemaPath:`#/properties/landing_page/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/landing_page/description`,schemaPath:`#/properties/landing_page/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/landing_page/cta/`+r+`/title`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0;if(u){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/landing_page/cta/`+r+`/url`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0}}else return z.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/landing_page/cta`,schemaPath:`#/properties/landing_page/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var l=!0;if(l){let e=n.background;if((!e||typeof e!=`object`||Array.isArray(e))&&e!==null)return z.errors=[{instancePath:t+`/landing_page/background`,schemaPath:`#/properties/landing_page/properties/background/type`,keyword:`type`,params:{type:On.properties.landing_page.properties.background.type},message:`must be object,null`}],!1;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`default`),e.url===void 0&&(e.url=null);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return z.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!=="default"&&n!==`image`)return z.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;{let n=e.url;if(typeof n!=`string`&&n!==null)return z.errors=[{instancePath:t+`/landing_page/background/url`,schemaPath:`#/properties/landing_page/properties/background/properties/url/type`,keyword:`type`,params:{type:On.properties.landing_page.properties.background.properties.url.type},message:`must be string,null`}],!1}}}var l=!0}}}}}}}}else return z.errors=[{instancePath:t+`/landing_page`,schemaPath:`#/properties/landing_page/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.preview;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.btn_title===void 0&&(n.btn_title=``),n.background===void 0&&(n.background={});for(let e in n)e!==`title`&&e!==`description`&&e!==`btn_title`&&e!==`background`&&delete n[e];if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/preview/title`,schemaPath:`#/properties/preview/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/preview/description`,schemaPath:`#/properties/preview/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.btn_title!=`string`)return z.errors=[{instancePath:t+`/preview/btn_title`,schemaPath:`#/properties/preview/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){let e=n.background;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=null),e.url===void 0&&(e.url=``);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`&&n!==null)return z.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/type`,keyword:`type`,params:{type:On.properties.preview.properties.background.properties.type.type},message:`must be string,null`}],!1;if(n!==`replica`&&n!==`background-gradient`&&n!==`custom-image`&&n!==null)return z.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.preview.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;if(typeof e.url!=`string`)return z.errors=[{instancePath:t+`/preview/background/url`,schemaPath:`#/properties/preview/properties/background/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return z.errors=[{instancePath:t+`/preview/background`,schemaPath:`#/properties/preview/properties/background/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var d=!0}}}}else return z.errors=[{instancePath:t+`/preview`,schemaPath:`#/properties/preview/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.haircheck;if(n&&typeof n==`object`&&!Array.isArray(n)){n.permission_request_title===void 0&&(n.permission_request_title=``),n.permission_request_description===void 0&&(n.permission_request_description=``),n.permission_granted_title===void 0&&(n.permission_granted_title=``),n.permission_granted_description===void 0&&(n.permission_granted_description=``),n.permission_denied_title===void 0&&(n.permission_denied_title=``),n.permission_denied_description===void 0&&(n.permission_denied_description=``),n.join_button===void 0&&(n.join_button=``),n.cancel_btn===void 0&&(n.cancel_btn=``);for(let e in n)e!==`permission_request_title`&&e!==`permission_request_description`&&e!==`permission_granted_title`&&e!==`permission_granted_description`&&e!==`permission_denied_title`&&e!==`permission_denied_description`&&e!==`join_button`&&e!==`cancel_btn`&&delete n[e];if(typeof n.permission_request_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_request_title`,schemaPath:`#/properties/haircheck/properties/permission_request_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_request_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_request_description`,schemaPath:`#/properties/haircheck/properties/permission_request_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_granted_title`,schemaPath:`#/properties/haircheck/properties/permission_granted_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_granted_description`,schemaPath:`#/properties/haircheck/properties/permission_granted_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_denied_title`,schemaPath:`#/properties/haircheck/properties/permission_denied_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_denied_description`,schemaPath:`#/properties/haircheck/properties/permission_denied_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.join_button!=`string`)return z.errors=[{instancePath:t+`/haircheck/join_button`,schemaPath:`#/properties/haircheck/properties/join_button/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.cancel_btn!=`string`)return z.errors=[{instancePath:t+`/haircheck/cancel_btn`,schemaPath:`#/properties/haircheck/properties/cancel_btn/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0}}}}}}}}else return z.errors=[{instancePath:t+`/haircheck`,schemaPath:`#/properties/haircheck/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.after_call;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]);for(let e in n)e!==`title`&&e!==`description`&&e!==`cta`&&delete n[e];if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/after_call/title`,schemaPath:`#/properties/after_call/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/after_call/description`,schemaPath:`#/properties/after_call/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/after_call/cta/`+r+`/title`,schemaPath:`#/properties/after_call/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0;if(m){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/after_call/cta/`+r+`/url`,schemaPath:`#/properties/after_call/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0}}else return z.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/after_call/cta`,schemaPath:`#/properties/after_call/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var p=!0}}}else return z.errors=[{instancePath:t+`/after_call`,schemaPath:`#/properties/after_call/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.branding;if(n&&typeof n==`object`&&!Array.isArray(n)){n.hide_tavus_badge===void 0&&(n.hide_tavus_badge=!1),n.logo===void 0&&(n.logo=``),n.text===void 0&&(n.text=``);for(let e in n)e!==`hide_tavus_badge`&&e!==`logo`&&e!==`text`&&delete n[e];if(typeof n.hide_tavus_badge!=`boolean`)return z.errors=[{instancePath:t+`/branding/hide_tavus_badge`,schemaPath:`#/properties/branding/properties/hide_tavus_badge/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var h=!0;if(h){if(typeof n.logo!=`string`)return z.errors=[{instancePath:t+`/branding/logo`,schemaPath:`#/properties/branding/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0;if(h){if(typeof n.text!=`string`)return z.errors=[{instancePath:t+`/branding/text`,schemaPath:`#/properties/branding/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0}}}else return z.errors=[{instancePath:t+`/branding`,schemaPath:`#/properties/branding/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){if(e.unavailable_screen!==void 0){let n=e.unavailable_screen;if(n&&typeof n==`object`&&!Array.isArray(n)){for(let e in n)e!==`daily_limit`&&e!==`total_limit`&&e!==`busy`&&e!==`error`&&e!==`captcha_unsupported`&&e!==`insecure_context`&&e!==`browser_unsupported`&&e!==`cta`&&delete n[e];if(n.daily_limit!==void 0){let e=n.daily_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.total_limit!==void 0){let e=n.total_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/total_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/total_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/total_limit`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.busy!==void 0){let e=n.busy;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/busy/title`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/busy/description`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/busy`,schemaPath:`#/properties/unavailable_screen/properties/busy/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.error!==void 0){let e=n.error;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/error/title`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/error/description`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/error`,schemaPath:`#/properties/unavailable_screen/properties/error/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.captcha_unsupported!==void 0){let e=n.captcha_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.insecure_context!==void 0){let e=n.insecure_context;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context/title`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context/description`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.browser_unsupported!==void 0){let e=n.browser_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.cta!==void 0){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/title`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0;if(_){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/url`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0}}else return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/unavailable_screen/cta`,schemaPath:`#/properties/unavailable_screen/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var g=!0}else var g=!0}}}}}}}}else return z.errors=[{instancePath:t+`/unavailable_screen`,schemaPath:`#/properties/unavailable_screen/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0}else var a=!0}}}}}}}}}}}}}}}else return z.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return z.errors=null,!0}var An=fn(`Config`);function jn(e,t){let n=e.customization??{};return n.widget===null&&delete n.widget,n.landing_page===null&&delete n.landing_page,Dn(n)||(t?.(),An.warn(`Customization validation failed`,Dn.errors)),{...e,customization:n}}var Mn=class extends Error{code;constructor(e){super(e===`unsupported_security_version`?`This deployment requires a newer Tavus SDK. Update the integration to continue.`:`The start security response could not be validated. Please try again.`),this.code=e,this.name=`StartSecurityError`}},Nn={name:`@tavus/embed`,version:`0.19.7`,variant:`embed`},Pn=new Set([`Error`,`TypeError`,`RangeError`,`ReferenceError`,`SyntaxError`,`URIError`,`NotAllowedError`,`NotFoundError`,`NotReadableError`,`NotSupportedError`,`AbortError`,`TimeoutError`,`OperationError`,`SecurityError`,`ApiError`]),Fn={network:`The request did not receive a response.`,timeout:`The operation timed out.`,unsupported:`The browser does not support this operation.`,NotAllowedError:`Access to the requested device was denied.`,NotFoundError:`The requested device was not found.`,NotReadableError:`The requested device could not be opened.`,AbortError:`The operation was cancelled.`,meeting_error:`The conversation connection failed.`,http_error:`The API request returned an error.`,rate_limited:`The request was rate limited.`,start_token_invalid:`The start token was rejected.`,security_session_invalid:`The security session was rejected.`,start_in_progress:`A conversation start is already in progress.`,security_unavailable:`The security service is temporarily unavailable.`,captcha_unavailable:`CAPTCHA verification is temporarily unavailable.`,deployment_security_required:`The deployment requires an updated SDK.`,config_invalid:`Deployment configuration validation failed.`,security_response_invalid:`The security response could not be validated.`,asset_error:`A deployment preview asset failed to load.`,playback_error:`Media playback failed.`,device_error:`A media device failed during the conversation.`,connection_lost:`The conversation connection was interrupted.`,canvas_error:`A Magic Canvas operation failed.`,integration_error:`An SDK integration operation failed.`};function In(e){return e&&/^[0-9]{6}$/.test(e)?`CAPTCHA verification failed.`:e&&Object.hasOwn(Fn,e)&&Fn[e]||`An SDK operation failed.`}var Ln=new Map;function Rn(e,t){if(!(!/^[a-z0-9_-]+\/[A-Za-z0-9_.-]+\.m?js$/.test(t)||t.length>128||Ln.size>=32))try{let n=new URL(e);[`https:`,`http:`,`file:`].includes(n.protocol)&&Ln.set(n.href,t)}catch{}}var zn=typeof document>`u`?null:document.currentScript,Bn=typeof HTMLScriptElement<`u`&&zn instanceof HTMLScriptElement?zn.src:void 0,Vn=t,Hn=Nn.variant,Un=Hn===`core`?`index.js`:Hn===`core-embed`?`embed.js`:Hn===`core-widget`?`widget.js`:Bn?`index.iife.js`:`index.mjs`,Wn=Bn||Vn;if(Wn)for(let e of Gn(Wn,Nn,Un))Rn(e,`${Hn}/${Un}`);function Gn(e,t,n){let r;try{r=new URL(e)}catch{return[]}if(r.pathname.endsWith(`/${n}`))return[r.href];if(t.variant!==`embed`&&t.variant!==`widget`||r.search)return[];let i=r.origin===`https://unpkg.com`?`/${t.name}`:r.origin===`https://cdn.jsdelivr.net`?`/npm/${t.name}`:void 0;return!i||!r.pathname.startsWith(i)||!/^(?:@[A-Za-z0-9_.-]+)?\/?$/.test(r.pathname.slice(i.length))?[]:[r.href,`${r.origin}${i}@${t.version}/dist/${n}`]}function Kn(e){if(!(e instanceof Error)||typeof e.stack!=`string`)return[];let t=[];for(let n of e.stack.slice(0,16384).split(`
|
|
2
|
+
@layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-preview-action:oklch(100% 0 0);--color-preview-action-content:oklch(21% 0 0);--text-preview-title:clamp(1.125rem, 2.65cqw, 2rem);--text-preview-title-narrow:clamp(1.375rem, 4.5cqw, 2rem);--text-preview-title-full-screen:clamp(1.5rem, 3.6cqw, 2rem);--text-preview-description-full-screen:clamp(.875rem, 2.25cqw, 1.25rem)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--page-has-backdrop:var(--page-scroll-lock) 1;--page-scroll-bg:var(--page-scroll-lock) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg:var(--page-scroll-lock) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{background-image:var(--page-scroll-lock) linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000));transition:var(--page-scroll-lock) background-color .3s ease-out;animation:var(--page-scroll-lock) set-page-has-scroll forwards;animation-timeline:var(--page-scroll-lock) scroll();--page-has-scroll:initial;scrollbar-gutter:var(--page-has-scroll) var(--page-scroll-lock) stable}@keyframes set-page-has-scroll{0%,to{--page-has-scroll: }}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host,[data-theme]{background-color:var(--root-bg);color:var(--color-base-content)}:host{background-color:var(--page-scroll-bg,var(--root-bg))}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:host{--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:overlay .3s allow-discrete, visibility .3s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;inset:0;overflow:clip}.modal::backdrop{display:none}.modal[popover]{color:inherit;background:0 0;border:0;max-width:none;max-height:none;margin:0;padding:0;inset:0}.modal[popover]::backdrop{background-color:oklch(0% 0 0/.4);transition:background-color .3s ease-out}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);--tt-tail-off:.5rem;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;font-weight:400;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%;display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.tab:is(.tabs>.tab){cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}.tab:is(.tabs>.tab){--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(.tabs>.tab):is(input[type=radio]){min-width:fit-content}.tab:is(.tabs>.tab):is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(.tabs>.tab):is(label){position:relative}.tab:is(.tabs>.tab):is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:is(.tabs>.tab):checked,.tab:is(.tabs>.tab):is(label:has(:checked)),.tab:is(.tabs>.tab):is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:is(.tabs>.tab):not(input):empty{cursor:default;flex-grow:1}.tab:is(.tabs>.tab):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tab:is(.tabs>.tab):focus-visible,.tab:is(.tabs>.tab):is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab:is(.tabs>.tab)[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul,li menu){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul,li menu):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,menu,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;content:"";pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled,.menu :where(li) [disabled]{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled,.menu :where(li) [disabled]{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>:not(:where(script,style,template)){cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:not(:where(script,style,template)):hover{opacity:.8}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{opacity:1}.dock>:not(:where(script,style,template)) .dock-label{font-size:.6875rem}.dock>:not(:where(script,style,template)):after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:2147483647px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,block-end) var(--anchor-h,span-inline-end);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover]{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover]{opacity:0;scale:.95}}.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none;pointer-events:none;pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content{opacity:1;opacity:1;opacity:1;scale:1}.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details){overflow:revert-layer}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{--size:calc(var(--size-field,.25rem) * 10);--btn-p:1rem;--btn-fg:var(--color-base-content);cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;border-width:var(--border);touch-action:manipulation;--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-color,var(--color-base-200));border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow,transform;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 calc(var(--depth) * 5%))}}.btn{--btn-soft-bg:initial;--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize,.875rem);background-color:var(--btn-bg);color:var(--btn-fg);border-color:var(--btn-border);border-style:var(--btn-border-style,solid);outline-color:var(--btn-color,var(--color-base-content));--tw-prose-links:var(--btn-fg);background-image:none, var(--fx-noise);background-size:auto, calc(var(--noise,0) * 100%);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));box-shadow:var(--btn-inset) inset, var(--btn-shadow)}.btn:is([type=checkbox],[type=radio]){appearance:none}.btn:is([type=checkbox],[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@media (prefers-reduced-motion:no-preference){.loading{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.collapse:not(td,tr,colgroup){border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup){transition:grid-template-rows .2s}}.collapse:not(td,tr,colgroup)>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){--overflow-delay:.2s;overflow:revert-layer;content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:not(td,tr,colgroup):focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=checkbox],.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(td,tr,colgroup):not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse:not(td,tr,colgroup)[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse:not(td,tr,colgroup)[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:not(td,tr,colgroup):is(details){width:100%}.collapse:not(td,tr,colgroup):is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup):is(details)::details-content{transition:overflow .2s allow-discrete var(--overflow-delay), content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:not(td,tr,colgroup):is(details)>summary{outline:none;display:block;position:relative}.collapse:not(td,tr,colgroup):is(details)>summary::-webkit-details-marker{display:none}.filter{flex-wrap:wrap;display:flex}.filter [type=radio]{width:auto}.filter input{opacity:1;transition:visibility .1s allow-discrete, margin .1s, opacity .3s, padding .3s, border-width .1s;overflow:hidden;scale:1}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter>input:not(:last-child),.filter>:not(:last-child) input{margin-inline-end:.25rem}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:checked:before{background-color:currentColor}@starting-style{.toggle:checked:before{opacity:0}}.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle[aria-checked=true]:before{background-color:currentColor}@starting-style{.toggle[aria-checked=true]:before{opacity:0}}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked):before{background-color:currentColor}@starting-style{.toggle:has(>input:checked):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;--size:calc(var(--size-field,.25rem) * var(--in-size-mul,10));--input-color:var(--color-base-content);flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input{cursor:text;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field))}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input input{appearance:none;background-color:#0000;border:none;width:100%;height:100%}.input input::placeholder{color:var(--color-base-content);opacity:.5}.input input:focus,.input input:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input input:focus,.input input:focus-within{outline-offset:2px;outline:2px solid #0000}}.input input::-webkit-calendar-picker-indicator{inset-inline-end:-.15em}.input::-webkit-inner-spin-button{margin-inline-end:-10px}.input::-webkit-calendar-picker-indicator{inset-inline-end:.75em}input.input{text-align:start;display:inline-flex;position:relative}input.input[type=url],input.input[type=tel],input.input[type=email],input.input[type=number]{direction:ltr}input.input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}input.input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}input.input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input input{text-align:start;display:inline-flex;position:relative}.input input[type=url],.input input[type=tel],.input input[type=email],.input input[type=number]{direction:ltr}.input input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}.input input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}.input input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus{--font-size:1rem}}}.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]){box-shadow:none}.input:is(:disabled,[disabled])::placeholder,.input:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}fieldset:disabled .input{box-shadow:none}fieldset:disabled .input::placeholder,fieldset:disabled .input ::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{--range-fill-x:calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2));--range-fill-y:0;--range-fill-spread:calc(100cqw * var(--range-fill));cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);position:relative;inset-block-start:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);background-color:currentColor;position:relative}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range:disabled{cursor:not-allowed;opacity:.3}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%) var(--indicator-y,-50%);position:absolute}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.avatar-group .avatar{border:4px solid var(--color-base-100);border-radius:2147483647px;overflow:hidden}.avatar{vertical-align:middle;align-self:center;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox:checked:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox[aria-checked=true]:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.checkbox[aria-checked=mixed]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox[aria-checked=mixed]{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox[aria-checked=mixed]:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card{border-radius:var(--radius-box);outline-offset:2px;outline:2px solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus-visible,.card[aria-checked=true]{outline-color:currentColor}.card:has(>:checked,>:is([type=checkbox],[type=radio]):focus-visible){outline-color:currentColor}.card[aria-checked=true]:focus-visible{outline-width:4px}.card:has(>:checked:focus-visible){outline-width:4px}.card[aria-checked=true]:has(>:is([type=checkbox],[type=radio]):focus-visible){outline-width:4px}.card:has(>:is([type=checkbox],[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card>:is([type=checkbox],[type=radio]){appearance:none}.progress{appearance:none;border-radius:var(--radius-box);background-color:currentColor;width:100%;height:.5rem;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.progress{background-color:color-mix(in oklab, currentcolor 20%, transparent)}}.progress{color:var(--color-base-content)}.progress:indeterminate{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%}@media (prefers-reduced-motion:no-preference){.progress:indeterminate{animation:5s ease-in-out infinite progress}}@supports ((-moz-appearance:none)){.progress:indeterminate::-moz-progress-bar{background-color:#0000}@media (prefers-reduced-motion:no-preference){.progress:indeterminate::-moz-progress-bar{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}}.progress::-moz-progress-bar{border-radius:var(--radius-box);background-color:currentColor}@media (prefers-reduced-motion:no-preference){.progress::-moz-progress-bar{transition:inline-size .3s}}}@supports ((-webkit-appearance:none)){.progress::-webkit-progress-bar{border-radius:var(--radius-box);background-color:#0000}.progress::-webkit-progress-value{border-radius:var(--radius-box);background-color:currentColor}@media (prefers-reduced-motion:no-preference){.progress::-webkit-progress-value{transition:inline-size .3s}}}.textarea{appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;--input-color:var(--color-base-content);flex-shrink:1;min-height:5rem;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea{width:clamp(3rem,20rem,100%);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea::placeholder{color:var(--color-base-content);opacity:.5}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus{--font-size:1rem}}}.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:is(:disabled,[disabled])::placeholder,.textarea:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.hero{background-position:50%;background-size:cover;place-items:center;width:100%;display:grid}.hero>*{grid-row-start:1;grid-column-start:1}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>:not(script,style,template){place-items:start;gap:.5rem;display:grid}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 33%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(>:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-outline{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content)));--btn-border:var(--btn-color,var(--color-base-content));--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.btn-ghost{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content,currentColor)));--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.aura:has(>.card,>.alert){--aura-radius:var(--radius-box)}.aura:has(>.btn,>.input,>.select){--aura-radius:var(--radius-field)}.aura:has(>.checkbox,>.toggle,>.badge){--aura-radius:var(--radius-selector)}}@layer daisyui.l1.l2{.modal.modal-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal.modal-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal.modal-open){--page-scroll-lock: }@starting-style{.modal.modal-open{opacity:0}}.modal[open]{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal[open]>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal[open]){--page-scroll-lock: }@starting-style{.modal[open]{opacity:0}}.modal:popover-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:popover-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:popover-open){--page-scroll-lock: }@starting-style{.modal:popover-open{opacity:0}}.modal:target{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:target>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:target){--page-scroll-lock: }@starting-style{.modal:target{opacity:0}}.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal-toggle:checked+.modal>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal-toggle:checked+.modal){--page-scroll-lock: }@starting-style{.modal-toggle:checked+.modal{opacity:0}}.tabs-border>.tab{--tab-border-color:#0000 #0000 var(--tab-border-color) #0000;border-radius:var(--radius-field);position:relative}.tabs-border>.tab:before{content:"";background-color:var(--tab-border-color);width:calc(100% - var(--tab-p) * 2);border-radius:var(--radius-field);height:3px;bottom:0;left:var(--tab-p);transition:background-color .2s;position:absolute}:is(.tabs-border>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-border>.tab:is(input:checked),.tabs-border>.tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.tabs-lift>.tab{--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right;border-width:var(--tab-border);padding:var(--tab-paddings);border-color:var(--tab-border-colors);border-start-start-radius:var(--tab-radius-ss);border-start-end-radius:var(--tab-radius-se);border-end-end-radius:var(--tab-radius-ee);border-end-start-radius:var(--tab-radius-es)}.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad));background-color:var(--tab-bg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):before{z-index:1;content:"";width:var(--tab-corner-width);height:var(--tab-corner-height);background-position:var(--tab-corner-position);background-image:var(--radius-start), var(--radius-end);background-size:var(--tab-radius-limit) var(--tab-radius-limit);inset:var(--tab-inset);background-repeat:no-repeat;display:block;position:absolute}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{--radius-start:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{transform:rotateY(180deg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{--radius-end:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{transform:rotateY(180deg)}.tabs-lift:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-top>.tab{--tab-order:0;--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-top>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-top>.tab:is(input:checked),.tabs-top>.tab:is(label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad))}.tabs-top:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-bottom>.tab{--tab-order:1;--tab-border:var(--border) 0 0 0;--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:var(--tab-radius-limit);--tab-radius-ee:var(--tab-radius-limit);--tab-border-colors:var(--tab-border-color) #0000 #0000 #0000;--tab-paddings:0 var(--tab-p) var(--border) var(--tab-p);--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-bottom>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-bottom>.tab:is(input:checked),.tabs-bottom>.tab:is(label:has(:checked)){--tab-border:0 var(--border) var(--border) var(--border);--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);--tab-paddings:var(--border) calc(var(--tab-p) - var(--border)) 0 calc(var(--tab-p) - var(--border));--tab-inset:0 auto auto auto;--radius-start:radial-gradient(circle at bottom left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at bottom right, var(--tab-radius-grad))}.tabs-bottom:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color)}.tabs-box>.tab{border-radius:var(--radius-field);border-style:none}.tabs-box>.tab:focus-visible,.tabs-box>.tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>.tab:focus-visible{z-index:1}.tabs-xs>.tab{--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.tabs-sm>.tab{--tab-p:.5rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.875rem}.tabs-md>.tab{--tab-p:.75rem;--tab-radius-min:calc(.75rem - var(--border));font-size:.875rem}.tabs-lg>.tab{--tab-p:1rem;--tab-radius-min:calc(1.5rem - var(--border));font-size:1.125rem}.tabs-xl>.tab{--tab-p:1.25rem;--tab-radius-min:calc(2rem - var(--border));font-size:1.125rem}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup)[open].collapse-arrow>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse:not(td,tr,colgroup).collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse:not(td,tr,colgroup)[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse:not(td,tr,colgroup).collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse:not(td,tr,colgroup)[open].collapse-plus>.collapse-title:after,.collapse:not(td,tr,colgroup)[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(>.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(>.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.steps-horizontal .step{text-align:center;grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps-horizontal .step:before{width:100%;height:.5rem;margin-inline-start:-100%;translate:0}[dir=rtl] :is(.steps-horizontal .step):before{translate:0}.steps-vertical .step{grid-template-rows:auto;grid-template-columns:40px 1fr;justify-items:start;gap:.5rem;min-height:4rem;display:grid}.steps-vertical .step:before{width:.5rem;height:100%;margin-inline-start:50%;translate:-50% -50%}[dir=rtl] :is(.steps-vertical .step):before{translate:50% -50%}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.checkbox:disabled{cursor:not-allowed;opacity:.2}.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card-xs .card-body{--card-p:.5rem;--card-fs:.6875rem}.card-sm .card-body{--card-p:1rem;--card-fs:.75rem}.card-md .card-body{--card-p:1.5rem;--card-fs:.875rem}.card-lg .card-body{--card-p:2rem;--card-fs:1rem}.card-xl .card-body{--card-p:2.5rem;--card-fs:1.125rem}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.card-xs .card-title{--cardtitle-fs:.875rem}.card-sm .card-title{--cardtitle-fs:1rem}.card-md .card-title{--cardtitle-fs:1.125rem}.card-lg .card-title{--cardtitle-fs:1.25rem}.card-xl .card-title{--cardtitle-fs:1.375rem}.btn-circle{width:var(--size);height:var(--size);border-radius:2147483647px;padding-inline:0}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}@media (prefers-reduced-motion:no-preference){.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content);--btn-soft-bg:var(--color-neutral-content) 80%;--btn-rest-fg:initial}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content);--btn-soft-bg:initial}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content);--btn-soft-bg:initial}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content);--btn-soft-bg:initial}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem) * 12)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);--btn-soft-bg:initial}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}.textarea-sm{--font-size-min:.75rem}.floating-label:has(.textarea-sm){--top-mul:4;--font-size:.75rem}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}@layer daisyui.l1{@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:hover{color:var(--btn-fg);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:hover{--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0)}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-bg:var(--btn-color,var(--color-base-200));color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){isolation:isolate}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){visibility:hidden;opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(:focus-visible)):has(:checked:not(.filter-reset,[type=checkbox])) :is(input,button):not(:checked,.filter-reset,[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}}@layer daisyui{.btn:is(:disabled,[disabled],[aria-disabled=true]){pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true]){color:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true]){--btn-bg:#0000;--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}:is(.input[type=url],.input[type=tel],.input[type=email],.input[type=number]):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-start-start-radius:var(--join-se,var(--radius-field));border-start-end-radius:var(--join-ss,var(--radius-field));border-end-end-radius:var(--join-es,var(--radius-field));border-end-start-radius:var(--join-ee,var(--radius-field))}@layer daisyui.l1.l2.l3.l4{.card-body p{flex-grow:1}.card figure:first-child{border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card figure:last-child{border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[16\\%\\]{inset:16%}.inset-\\[20\\%\\]{inset:20%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:0}.inset-x-8{inset-inline:calc(var(--spacing) * 8)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-\\[20\\%\\]{bottom:20%}.bottom-\\[calc\\(6rem_\\+_var\\(--cvi-status-strip\\,0px\\)\\)\\]{bottom:calc(6rem + var(--cvi-status-strip,0px))}.bottom-\\[calc\\(6rem_\\+_var\\(--mc-strip-band\\,0px\\)\\)\\]{bottom:calc(6rem + var(--mc-strip-band,0px))}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;--join-ml:0;--join-mt:0;--join-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:2}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){z-index:1}}:scope :where(:scope>:first-child){--join-ss:var(--radius-field);--join-se:calc(var(--radius-field) * var(--join-v));--join-es:calc(var(--radius-field) * var(--join-h));--join-ee:0}:scope :where(:scope>:last-child){--join-ss:0;--join-se:calc(var(--radius-field) * var(--join-h));--join-es:calc(var(--radius-field) * var(--join-v));--join-ee:var(--radius-field)}:scope :where(:scope>:only-child){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:scope :where(:scope>:not(:first-child)){--join-ml:calc(var(--border,1px) * -1 * var(--join-h));--join-mt:calc(var(--border,1px) * -1 * var(--join-v))}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[5\\]{z-index:5}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-2{grid-row-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-\\[var\\(--tavus-expand-aspect\\)\\]{aspect-ratio:var(--tavus-expand-aspect)}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:0}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-2\\/5{height:40%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-\\[var\\(--tavus-expand-height\\)\\]{height:var(--tavus-expand-height)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\\[var\\(--tavus-expand-max-height\\)\\]{max-height:var(--tavus-expand-max-height)}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.w-0{width:0}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[28rem\\]{width:28rem}.w-\\[100vw\\]{width:100vw}.w-\\[var\\(--tavus-expand-width\\)\\]{width:var(--tavus-expand-width)}.w-full{width:100%}.w-max{width:max-content}.w-screen{width:100vw}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[22rem\\]{max-width:22rem}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,80vw\\)\\]{max-width:min(20rem,80vw)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-\\[var\\(--tavus-expand-max-width\\)\\]{max-width:var(--tavus-expand-max-width)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.appearance-none{appearance:none}.grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.grid-cols-\\[5\\.5rem_1fr\\]{grid-template-columns:5.5rem 1fr}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\\[length\\:var\\(--border\\)\\]{border-style:var(--tw-border-style);border-width:var(--border)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-300{border-color:var(--color-base-300)}.border-info\\/80{border-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.border-info\\/80{border-color:color-mix(in oklab, var(--color-info) 80%, transparent)}}.border-success{border-color:var(--color-success)}.border-warning,.border-warning\\/70{border-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\\/70{border-color:color-mix(in oklab, var(--color-warning) 70%, transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.border-white\\/50{border-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.glass{-webkit-backdrop-filter:blur(var(--glass-blur,40px));backdrop-filter:blur(var(--glass-blur,40px));background-color:#0000;background-image:linear-gradient(135deg, oklch(100% 0 0 / var(--glass-opacity,30%)) 0%, oklch(0% 0 0/0) 100%), linear-gradient(var(--glass-reflect-degree,100deg), oklch(100% 0 0 / var(--glass-reflect-opacity,5%)) 25%, oklch(0% 0 0/0) 25%);box-shadow:0 0 0 1px oklch(100% 0 0 / var(--glass-border-opacity,20%)) inset, 0 0 0 2px oklch(0% 0 0/.05);text-shadow:0 1px oklch(0% 0 0 / var(--glass-text-shadow-opacity,5%));border:none}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab, red, red)){.bg-black\\/35{background-color:color-mix(in oklab, var(--color-black) 35%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-info\\/5{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/5{background-color:color-mix(in oklab, var(--color-info) 5%, transparent)}}.bg-info\\/85{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/85{background-color:color-mix(in oklab, var(--color-info) 85%, transparent)}}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-success\\/70{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/70{background-color:color-mix(in oklab, var(--color-success) 70%, transparent)}}.bg-success\\/85{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/85{background-color:color-mix(in oklab, var(--color-success) 85%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-warning\\/85{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/85{background-color:color-mix(in oklab, var(--color-warning) 85%, transparent)}}.bg-warning\\/90{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/90{background-color:color-mix(in oklab, var(--color-warning) 90%, transparent)}}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab, red, red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab, var(--color-black) 60%, transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-16{padding-inline:calc(var(--spacing) * 16)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.text-preview-description-full-screen{font-size:var(--text-preview-description-full-screen)}.text-preview-title{font-size:var(--text-preview-title)}.text-preview-title-full-screen{font-size:var(--text-preview-title-full-screen)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-info-content{color:var(--color-info-content)}.text-inherit{color:inherit}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-success{color:var(--color-success)}.text-success-content{color:var(--color-success-content)}.text-warning{color:var(--color-warning)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-base-100,.ring-base-100\\/20{--tw-ring-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.ring-base-100\\/20{--tw-ring-color:color-mix(in oklab, var(--color-base-100) 20%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-xl{--tw-blur:blur(var(--blur-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-\\[0\\.55\\]{--tw-brightness:brightness(.55);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn-preview-action{--btn-color:var(--color-preview-action);--btn-fg:var(--color-preview-action-content)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[--tavus-expand-default-max-height\\:900px\\]{--tavus-expand-default-max-height:900px}.\\[--tavus-expand-default-max-width\\:1280px\\]{--tavus-expand-default-max-width:1280px}.\\[text-shadow\\:0_1px_3px_rgb\\(0_0_0\\/0\\.45\\)\\]{text-shadow:0 1px 3px #00000073}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}.backdrop\\:bg-black\\/60::backdrop{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.backdrop\\:bg-black\\/60::backdrop{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:bg-black\\/50:hover{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/50:hover{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:text-error:hover{color:var(--color-error)}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.has-\\[\\.cvi-video-surface\\]\\:will-change-transform:has(.cvi-video-surface){will-change:transform}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}.motion-safe\\:backdrop\\:animate-\\[tavusFadeIn_180ms_ease-out\\]::backdrop{animation:.18s ease-out tavusFadeIn}}@container not (width>=56.25rem){.\\@max-mobile\\:inset-x-5{inset-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:bottom-\\[calc\\(5rem_\\+_var\\(--cvi-status-strip\\,0px\\)\\)\\]{bottom:calc(5rem + var(--cvi-status-strip,0px))}.\\@max-mobile\\:bottom-\\[calc\\(5rem_\\+_var\\(--mc-strip-band\\,0px\\)\\)\\]{bottom:calc(5rem + var(--mc-strip-band,0px))}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:col-span-2{grid-column:span 2/span 2}.\\@max-mobile\\:row-start-1{grid-row-start:1}.\\@max-mobile\\:block{display:block}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:var(--spacing)}.\\@max-mobile\\:self-start{align-self:flex-start}.\\@max-mobile\\:p-5{padding:calc(var(--spacing) * 5)}.\\@max-mobile\\:px-5{padding-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\@max-mobile\\:text-preview-title-narrow{font-size:var(--text-preview-title-narrow)}}@container not (width>=48rem){.\\@max-3xl\\:px-10{padding-inline:calc(var(--spacing) * 10)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}.\\@max-md\\:px-5{padding-inline:calc(var(--spacing) * 5)}@layer daisyui.l1.l2{.\\@max-md\\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem) * 10)}}}@container (width>=48rem){.\\@3xl\\:grid-cols-\\[1fr_1\\.2fr\\]{grid-template-columns:1fr 1.2fr}}@media (width<=768px){.\\[\\@media\\(max-width\\:768px\\)\\]\\:h-dvh{height:100dvh}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-h-none{max-height:none}.\\[\\@media\\(max-width\\:768px\\)\\]\\:w-screen{width:100vw}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-w-none{max-width:none}}@media (width>=2560px){.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-height\\:1200px\\]{--tavus-expand-default-max-height:1200px}.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-width\\:1600px\\]{--tavus-expand-default-max-width:1600px}}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));background-color:var(--btn-bg);background-image:none, var(--fx-noise);color:var(--btn-fg);opacity:.9}.cvi-autohide{transition-property:opacity,transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}.cvi-control-rail{pointer-events:auto}.cvi-autohide[data-hidden=true]{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-autohide-slide[data-hidden=true]{transform:translateY(100%)}.cvi-control-rail[data-hidden=true]{pointer-events:none}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide-slide{transform:translateY(100%)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-control-rail{pointer-events:none}}@media (prefers-reduced-motion:reduce){.cvi-autohide{transition:none}}.cvi-status-strip{transition-property:transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-status-strip{transform:translateY(var(--cvi-status-strip-drop,0px));transition-timing-function:cubic-bezier(.7,0,.84,0)}}@media (prefers-reduced-motion:reduce){.cvi-status-strip{transition:none}}.cvi-strip-lift{transition-property:bottom;transition-duration:.3s;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){.cvi-strip-lift{transition:none}}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide[data-pinned=true]:not([data-hidden=true]){opacity:1;transition-timing-function:cubic-bezier(.16,1,.3,1)}}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusFadeIn{0%{opacity:0}to{opacity:1}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}@keyframes tavusAudioWave{0%{opacity:var(--wave-peak,.25);transform:scale(1)}to{opacity:0;transform:scale(1.9)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes aura{to{--aura-angle:360deg;transform:translateZ(1px)}}@keyframes aura-glow{20%,80%{opacity:.7;filter:blur(.25rem)}50%{opacity:1;filter:blur(.75rem)}}@keyframes aura-glow-after{20%,80%{opacity:.3;filter:blur(1rem)}50%{opacity:.6;filter:blur(1.5rem)}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Fe,Ie,Le,Re,ze=0,Be=[],Ve=i,He=Ve.__b,Ue=Ve.__r,We=Ve.diffed,Ge=Ve.__c,Ke=Ve.unmount,qe=Ve.__;function Je(e,t){Ve.__h&&Ve.__h(Ie,e,ze||t),ze=0;var n=Ie.__H||(Ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function M(e){return ze=1,Ye(it,e)}function Ye(e,t,n){var r=Je(Fe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):it(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ie,!Ie.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};Ie.__f=!0;var a=Ie.shouldComponentUpdate,o=Ie.componentWillUpdate;Ie.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Ie.shouldComponentUpdate=i}return r.__N||r.__}function N(e,t){var n=Je(Fe++,3);!Ve.__s&&rt(n.__H,t)&&(n.__=e,n.u=t,Ie.__H.__h.push(n))}function Xe(e,t){var n=Je(Fe++,4);!Ve.__s&&rt(n.__H,t)&&(n.__=e,n.u=t,Ie.__h.push(n))}function P(e){return ze=5,F(function(){return{current:e}},[])}function F(e,t){var n=Je(Fe++,7);return rt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function I(e,t){return ze=8,F(function(){return e},t)}function L(e){var t=Ie.context[e.__c],n=Je(Fe++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ie)),t.props.value):e.__}function Ze(){var e=Je(Fe++,11);if(!e.__){for(var t=Ie.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function Qe(){for(var e;e=Be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(tt),t.__h.some(nt),t.__h=[]}catch(n){t.__h=[],Ve.__e(n,e.__v)}}}Ve.__b=function(e){Ie=null,He&&He(e)},Ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qe&&qe(e,t)},Ve.__r=function(e){Ue&&Ue(e),Fe=0;var t=(Ie=e.__c).__H;t&&(Le===Ie?(t.__h=[],Ie.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(tt),t.__h.some(nt),t.__h=[],Fe=0)),Le=Ie},Ve.diffed=function(e){We&&We(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Be.push(t)!==1&&Re===Ve.requestAnimationFrame||((Re=Ve.requestAnimationFrame)||et)(Qe)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Le=Ie=null},Ve.__c=function(e,t){t.some(function(e){try{e.__h.some(tt),e.__h=e.__h.filter(function(e){return!e.__||nt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Ve.__e(n,e.__v)}}),Ge&&Ge(e,t)},Ve.unmount=function(e){Ke&&Ke(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{tt(e)}catch(e){t=e}}),n.__H=void 0,t&&Ve.__e(t,n.__v))};var $e=typeof requestAnimationFrame==`function`;function et(e){var t,n=function(){clearTimeout(r),$e&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);$e&&(t=requestAnimationFrame(n))}function tt(e){var t=Ie,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ie=t}function nt(e){var t=Ie;e.__c=e.__(),Ie=t}function rt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function it(e,t){return typeof t==`function`?t(e):t}var at=16/9,ot=9/16,st=`var(--tavus-expand-default-max-width)`,ct=`var(--tavus-expand-default-max-height)`,lt=`100vw - 40px`,ut=`100dvh - 40px`;function dt(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t||Array.isArray(t))return;let n=t,r={};return typeof n.enabled==`boolean`&&(r.enabled=n.enabled),typeof n.fullscreen==`boolean`&&(r.fullscreen=n.fullscreen),(n.aspect===`horizontal`||n.aspect===`vertical`)&&(r.aspect=n.aspect),(typeof n.custom_aspect==`string`||typeof n.custom_aspect==`number`)&&(r.custom_aspect=n.custom_aspect),typeof n.max_width==`number`&&(r.max_width=n.max_width),typeof n.max_height==`number`&&(r.max_height=n.max_height),r}function ft(e){if(typeof e==`number`)return ht(e);if(typeof e!=`string`)return;let t=e.trim();if(!t)return;let n=t.split(/[/:]/);if(n.length===2){let e=ht(Number(n[0])),t=ht(Number(n[1]));return e&&t?e/t:void 0}return n.length===1?ht(Number(t)):void 0}function pt(e){let t=ft(e?.custom_aspect)??(e?.aspect===`vertical`?ot:at),n=ht(e?.max_width),r=ht(e?.max_height),i=t>=1?`landscape`:`portrait`;return e?.fullscreen?{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:{"--tavus-expand-aspect":`auto`,"--tavus-expand-width":`100%`,"--tavus-expand-height":`100%`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":`none`}}:{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:i===`landscape`?{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`min(${lt}, (${ut}) * ${t}, ${n?`${n}px`:st})`,"--tavus-expand-height":`auto`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":r?`${r}px`:`none`}:{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`auto`,"--tavus-expand-height":`min(${ut}, (${lt}) / ${t}, ${r?`${r}px`:ct})`,"--tavus-expand-max-width":n?`${n}px`:`none`,"--tavus-expand-max-height":`none`}}}function mt(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}function ht(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:void 0}var gt=0;Array.isArray;function R(e,t,n,r,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return i.vnode&&i.vnode(u),u}var _t=xe(null);function vt(e){let t,n;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{n=`invalid_override_config`}let r=!!e.token;return{surface:e.surface,layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,cameraOnStart:e[`camera-on-start`]===`off`?`off`:`on`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:bt(e[`conversational-context`]),customGreeting:bt(e[`custom-greeting`]),memoryStores:xt(e[`memory-stores`]),overrideConfig:t,...n?{configInputError:n}:{},expandOptions:dt(e[`expand-options`]),mode:r?`preview`:`production`}}function yt(e){let t=F(()=>vt({surface:e.surface,layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token}),[e.surface,e.layout,e[`camera-on-start`],e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`memory-stores`],e[`base-url`],e[`expand-options`],e.token]);return R(_t.Provider,{value:t,children:e.children})}function bt(e){return e?.trim()||void 0}function xt(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var St=Symbol.for(`preact-signals`);function Ct(){if(kt>1)kt--;else{var e,t=!1;for((function(){var e=Nt;for(Nt=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();Ot!==void 0;){var n=Ot;for(Ot=void 0,At++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Rt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(At=0,kt--,t)throw e}}function wt(e){if(kt>0)return e();Mt=++jt,kt++;try{return e()}finally{Ct()}}var Tt,Et=void 0;function Dt(e){var t=Et,n=Tt;Et=void 0,Tt=void 0;try{return e()}finally{Et=t,Tt=n}}var Ot=void 0,kt=0,At=0,jt=0,Mt=0,Nt=void 0,Pt=0;function Ft(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function It(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}It.prototype.brand=St,It.prototype.h=function(){return!0},It.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?Dt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},It.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Dt(function(){var e;(e=t.Z)==null||e.call(t)}))}},It.prototype.subscribe=function(e){var t=this;return qt(function(){var n=t.value;Dt(function(){return e(n)})},{name:`sub`})},It.prototype.valueOf=function(){return this.value},It.prototype.toString=function(){return this.value+``},It.prototype.toJSON=function(){return this.value},It.prototype.peek=function(){var e=this;return Dt(function(){return e.value})},Object.defineProperty(It.prototype,"value",{get:function(){var e=Ft(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(At>100)throw Error(`Cycle detected`);(function(e){kt!==0&&At===0&&e.l!==Mt&&(e.l=Mt,Nt={S:e,v:e.v,i:e.i,o:Nt})})(this),this.v=e,this.i++,Pt++,kt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ct()}}}});function Lt(e,t){return new It(e,t)}function Rt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function zt(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Bt(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Vt(e,t){It.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Pt-1,this.f=4}Vt.prototype=new It,Vt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pt))return!0;if(this.g=Pt,this.f|=1,this.i>0&&!Rt(this))return this.f&=-2,!0;var e=Et;try{zt(this),Et=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Et=e,Bt(this),this.f&=-2,!0},Vt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}It.prototype.S.call(this,e)},Vt.prototype.U=function(e){if(this.t!==void 0&&(It.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Vt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Vt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Ft(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ht(e,t){return new Vt(e,t)}function Ut(e){var t=e.m;if(e.m=void 0,typeof t==`function`){kt++;var n=Et;Et=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Wt(e),t}finally{Et=n,Ct()}}}function Wt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ut(e)}function Gt(e){if(Et!==this)throw Error(`Out-of-order effect`);Bt(this),Et=e,this.f&=-2,8&this.f&&Wt(this),Ct()}function Kt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Tt&&Tt.push(this)}Kt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},Kt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Ut(this),zt(this),kt++;var e=Et;return Et=this,Gt.bind(this,e)},Kt.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ot,Ot=this)},Kt.prototype.d=function(){this.f|=8,1&this.f||Wt(this)},Kt.prototype.dispose=function(){this.d()};function qt(e,t){var n=new Kt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Jt,Yt,Xt=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,Zt=[],Qt=[];qt(function(){Jt=this.N})();function $t(e,t){i[e]=t.bind(null,i[e]||function(){})}function en(e){if(Yt){var t=Yt;Yt=void 0,t()}Yt=e&&e.S()}function tn(e){var t=this,n=e.data,r=rn(n);r.name=`ReactiveDom`,r.value=n;var i=F(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Ht(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Ht(function(){return!Array.isArray(i.value)&&!o(i.value)}),s=qt(function(){if(this.N=un,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),c=t.__$u.d;return t.__$u.d=function(){s(),c.call(this)},[a,i]},[]),a=i[0],s=i[1];return a.value?s.peek():s.value}tn.displayName=`ReactiveTextNode`,Object.defineProperties(It.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:tn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),$t(`__b`,function(e,t){if(en(),typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof It&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),$t(`__r`,function(e,t){if(e(t),t.type!==D){en();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return qt(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;Xt&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),en(n)}}),$t(`__e`,function(e,t,n,r){en(),e(t,n,r)}),$t(`diffed`,function(e,t){en();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=nn(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function nn(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=Lt(n);return{o:function(e,t){a.value=e,r=t},d:qt(function(){this.N=un;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}$t(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),$t(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),ee.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function rn(e,t){return F(function(){return Lt(e,t)},[])}var an=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},on=function(e){queueMicrotask(function(){queueMicrotask(e)})};function sn(){wt(function(){for(var e;e=Zt.shift();)Jt.call(e)})}function cn(){Zt.push(this)===1&&(i.requestAnimationFrame||an)(sn)}function ln(){wt(function(){for(var e;e=Qt.shift();)Jt.call(e)})}function un(){Qt.push(this)===1&&(i.requestAnimationFrame||on)(ln)}function dn(e,t){var n=P(e);n.current=e,N(function(){return qt(function(){return this.N=cn,n.current()},t)},[])}function fn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}function pn(){if(!globalThis.crypto?.getRandomValues)return;let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function mn(e){return typeof e==`string`&&/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(e)}function hn(e,t){let n=e.split(`?`)[0];if(!n.startsWith(`/v2/deployments/${t}/`))return;let r=n.slice(n.lastIndexOf(`/`)+1);if(r===`start-token`)return`start_token`;if(r===`init`||r===`start`||r===`end`)return r}var gn=fn(`API`);function _n(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token,r=e.deploymentId?{deploymentId:e.deploymentId,sessionId:pn()}:void 0;function i(e){try{r?.observe?.(e)}catch{gn.warn(`Diagnostic observer failed`)}}async function a(e,a,o,s){let c={};o!=null&&(c[`Content-Type`]=`application/json`),n&&(c.Authorization=`Bearer ${n}`);let l=r&&hn(a,r.deploymentId),u=l?pn():void 0,d=r?.attemptId,f=`${t}${a}`;gn.info(e,f);let p=performance.now(),m,h=!1,g,_=a.match(/\/conversations\/(c[A-Za-z0-9]{1,63})\/end(?:\?|$)/)?.[1],v=(e,t)=>{l&&u&&i({stage:l,outcome:e,client_request_id:u,request_id:g,attempt_id:d,conversation_id:_,status:m?.status,duration_ms:e===`started`?void 0:performance.now()-p,...e===`failed`?{error:t,networkFailure:h&&m===void 0}:{}})};v(`started`);try{let t=o==null?void 0:JSON.stringify(o);h=!0,m=await fetch(f,{method:e,headers:c,body:t,signal:s?.signal,keepalive:s?.keepalive});let n=m.headers.get(`X-Tavus-Request-Id`);if(g=mn(n)?n:void 0,l&&yn(r,m),!m.ok){let t=await m.text().catch(()=>``);throw gn.error(`${e} ${f} → ${m.status}`,t),new vn(m.status,t||m.statusText,m.headers)}if(m.headers.get(`content-type`)?.includes(`application/json`)){let e=await m.json();return _=bn(e)??_,v(`succeeded`),e}v(`succeeded`);return}catch(e){throw v(`failed`,e),e}}return{...r?{diagnostics:r}:{},get:(e,t)=>a(`GET`,e,void 0,t),post:(e,t,n)=>a(`POST`,e,t,n)}}var vn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function yn(e,t){let n=t.headers.get(`X-Tavus-Telemetry-Version`);if(n&&/^[1-9][0-9]{0,8}$/.test(n))try{e?.capabilities?.(Number(n))}catch{gn.warn(`Diagnostic capability observer failed`)}}function bn(e){if(e&&typeof e==`object`&&`conversation_id`in e&&typeof e.conversation_id==`string`&&/^c[A-Za-z0-9]{1,63}$/.test(e.conversation_id))return e.conversation_id}function xn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function Sn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function Cn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function wn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function En(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(n[r]=Tn(a)&&Tn(i)?En(a,i):i)}return n}var Dn=z,On={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:{type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},show_fullscreen_hint:{type:`boolean`,default:!0},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``},magic_grid:{type:`boolean`}}},style:{type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},field_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},selectors_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},border_width:{type:`integer`,enum:[0,1,2,3,4],default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:[1,2,3],default:2},selectors_size:{type:`integer`,enum:[1,2,3],default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`},magic_canvas:{type:`object`,properties:{accent_color:{type:`string`}}}}},widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:{type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},preview:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},haircheck:{type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},after_call:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]}}},branding:{type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},unavailable_screen:{type:`object`,properties:{daily_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},total_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},busy:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},error:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},captcha_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},insecure_context:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},browser_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]}}}}}},kn=Object.prototype.hasOwnProperty;function z(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){if(e&&typeof e==`object`&&!Array.isArray(e)){e.schema_version===void 0&&(e.schema_version=1),e.terms_content===void 0&&(e.terms_content=``),e.terms_enabled===void 0&&(e.terms_enabled=!1),e.show_haircheck===void 0&&(e.show_haircheck=!0),e.language_selector===void 0&&(e.language_selector=!1),e.conversation===void 0&&(e.conversation={}),e.style===void 0&&(e.style={}),e.widget===void 0&&(e.widget={}),e.landing_page===void 0&&(e.landing_page={}),e.preview===void 0&&(e.preview={}),e.haircheck===void 0&&(e.haircheck={}),e.after_call===void 0&&(e.after_call={}),e.branding===void 0&&(e.branding={});for(let t in e)kn.call(On.properties,t)||delete e[t];{let n=e.schema_version;if(typeof n!=`number`||n%1||isNaN(n))return z.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(n!==1)return z.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/const`,keyword:`const`,params:{allowedValue:1},message:`must be equal to constant`}],!1;var a=!0;if(a){if(typeof e.terms_content!=`string`)return z.errors=[{instancePath:t+`/terms_content`,schemaPath:`#/properties/terms_content/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var a=!0;if(a){if(typeof e.terms_enabled!=`boolean`)return z.errors=[{instancePath:t+`/terms_enabled`,schemaPath:`#/properties/terms_enabled/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.show_haircheck!=`boolean`)return z.errors=[{instancePath:t+`/show_haircheck`,schemaPath:`#/properties/show_haircheck/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.language_selector!=`boolean`)return z.errors=[{instancePath:t+`/language_selector`,schemaPath:`#/properties/language_selector/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){let n=e.conversation;if(n&&typeof n==`object`&&!Array.isArray(n)){n.modality===void 0&&(n.modality=`video`),n.enable_chat===void 0&&(n.enable_chat=!1),n.enable_closed_captions===void 0&&(n.enable_closed_captions=!1),n.enable_picture_in_picture===void 0&&(n.enable_picture_in_picture=!1),n.show_fullscreen_hint===void 0&&(n.show_fullscreen_hint=!0),n.unique_memory_tag===void 0&&(n.unique_memory_tag=!0),n.context===void 0&&(n.context=``);for(let e in n)e!==`modality`&&e!==`enable_chat`&&e!==`enable_closed_captions`&&e!==`enable_picture_in_picture`&&e!==`show_fullscreen_hint`&&e!==`unique_memory_tag`&&e!==`context`&&e!==`magic_grid`&&delete n[e];{let e=n.modality;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`audio`&&e!==`video`&&e!==`chat`)return z.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/enum`,keyword:`enum`,params:{allowedValues:On.properties.conversation.properties.modality.enum},message:`must be equal to one of the allowed values`}],!1;var o=!0;if(o){if(typeof n.enable_chat!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_chat`,schemaPath:`#/properties/conversation/properties/enable_chat/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_closed_captions!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_closed_captions`,schemaPath:`#/properties/conversation/properties/enable_closed_captions/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_picture_in_picture!=`boolean`)return z.errors=[{instancePath:t+`/conversation/enable_picture_in_picture`,schemaPath:`#/properties/conversation/properties/enable_picture_in_picture/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.show_fullscreen_hint!=`boolean`)return z.errors=[{instancePath:t+`/conversation/show_fullscreen_hint`,schemaPath:`#/properties/conversation/properties/show_fullscreen_hint/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.unique_memory_tag!=`boolean`)return z.errors=[{instancePath:t+`/conversation/unique_memory_tag`,schemaPath:`#/properties/conversation/properties/unique_memory_tag/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.context!=`string`)return z.errors=[{instancePath:t+`/conversation/context`,schemaPath:`#/properties/conversation/properties/context/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var o=!0;if(o){if(n.magic_grid!==void 0){if(typeof n.magic_grid!=`boolean`)return z.errors=[{instancePath:t+`/conversation/magic_grid`,schemaPath:`#/properties/conversation/properties/magic_grid/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0}else var o=!0}}}}}}}}}else return z.errors=[{instancePath:t+`/conversation`,schemaPath:`#/properties/conversation/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.style;if(n&&typeof n==`object`&&!Array.isArray(n)){n.mode===void 0&&(n.mode=`system`),n.style===void 0&&(n.style=`basic`),n.boxes_radius===void 0&&(n.boxes_radius=1),n.field_radius===void 0&&(n.field_radius=1),n.selectors_radius===void 0&&(n.selectors_radius=1),n.border_width===void 0&&(n.border_width=0),n.depth_effect===void 0&&(n.depth_effect=!1),n.noise_effect===void 0&&(n.noise_effect=!1),n.fields_size===void 0&&(n.fields_size=2),n.selectors_size===void 0&&(n.selectors_size=2),n.icon_library===void 0&&(n.icon_library=`pixelarticons`);for(let e in n)kn.call(On.properties.style.properties,e)||delete n[e];{let e=n.mode;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`system`&&e!==`light`&&e!==`dark`)return z.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.mode.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.style;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`basic`&&e!==`wireframe`&&e!==`silk`&&e!==`cyberpunk`&&e!==`retro`&&e!==`lemonade`)return z.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.style.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.boxes_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.boxes_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.field_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.field_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_radius;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.selectors_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.border_width;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return z.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.border_width.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(typeof n.depth_effect!=`boolean`)return z.errors=[{instancePath:t+`/style/depth_effect`,schemaPath:`#/properties/style/properties/depth_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){if(typeof n.noise_effect!=`boolean`)return z.errors=[{instancePath:t+`/style/noise_effect`,schemaPath:`#/properties/style/properties/noise_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){let e=n.fields_size;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return z.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.fields_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_size;if(typeof e!=`number`||e%1||isNaN(e))return z.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return z.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.selectors_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.icon_library;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`pixelarticons`&&e!==`lucide`)return z.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/enum`,keyword:`enum`,params:{allowedValues:On.properties.style.properties.icon_library.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(n.magic_canvas!==void 0){let e=n.magic_canvas;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let t in e)t!==`accent_color`&&delete e[t];if(e.accent_color!==void 0&&typeof e.accent_color!=`string`)return z.errors=[{instancePath:t+`/style/magic_canvas/accent_color`,schemaPath:`#/properties/style/properties/magic_canvas/properties/accent_color/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/style/magic_canvas`,schemaPath:`#/properties/style/properties/magic_canvas/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0}}}}}}}}}}}}}else return z.errors=[{instancePath:t+`/style`,schemaPath:`#/properties/style/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.widget;if(n&&typeof n==`object`&&!Array.isArray(n)){n.variant===void 0&&(n.variant=`compact`),n.position===void 0&&(n.position=`bottom-right`),n.expandable===void 0&&(n.expandable=`default`),n.avatar===void 0&&(n.avatar={}),n.text===void 0&&(n.text={});for(let e in n)e!==`variant`&&e!==`position`&&e!==`expandable`&&e!==`avatar`&&e!==`text`&&delete n[e];{let e=n.variant;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`tiny`&&e!==`compact`&&e!==`full`)return z.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.variant.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.position;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`bottom-left`&&e!==`bottom-right`&&e!==`top-left`&&e!==`top-right`&&e!==`top`&&e!==`bottom`)return z.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.position.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.expandable;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!=="default"&&e!==`always`&&e!==`start-expanded`)return z.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.expandable.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.avatar;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`orb`);for(let t in e)t!==`type`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return z.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`orb`&&n!==`image`)return z.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.widget.properties.avatar.properties.type.enum},message:`must be equal to one of the allowed values`}],!1}}else return z.errors=[{instancePath:t+`/widget/avatar`,schemaPath:`#/properties/widget/properties/avatar/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0;if(c){let e=n.text;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.btn_title===void 0&&(e.btn_title=``);for(let t in e)t!==`title`&&t!==`btn_title`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/widget/text/title`,schemaPath:`#/properties/widget/properties/text/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.btn_title!=`string`)return z.errors=[{instancePath:t+`/widget/text/btn_title`,schemaPath:`#/properties/widget/properties/text/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/widget/text`,schemaPath:`#/properties/widget/properties/text/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}}}}}}else return z.errors=[{instancePath:t+`/widget`,schemaPath:`#/properties/widget/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.landing_page;if(n&&typeof n==`object`&&!Array.isArray(n)){n.template===void 0&&(n.template=`1`),n.access===void 0&&(n.access=`public`),n.logo===void 0&&(n.logo=``),n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]),n.background===void 0&&(n.background=null);for(let e in n)e!==`template`&&e!==`access`&&e!==`logo`&&e!==`title`&&e!==`description`&&e!==`cta`&&e!==`background`&&delete n[e];{let e=n.template;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`1`&&e!==`2`&&e!==`3`&&e!==`4`&&e!==`5`)return z.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.template.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){let e=n.access;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`public`&&e!==`auth_required`)return z.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.access.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){if(typeof n.logo!=`string`)return z.errors=[{instancePath:t+`/landing_page/logo`,schemaPath:`#/properties/landing_page/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/landing_page/title`,schemaPath:`#/properties/landing_page/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/landing_page/description`,schemaPath:`#/properties/landing_page/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/landing_page/cta/`+r+`/title`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0;if(u){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/landing_page/cta/`+r+`/url`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0}}else return z.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/landing_page/cta`,schemaPath:`#/properties/landing_page/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var l=!0;if(l){let e=n.background;if((!e||typeof e!=`object`||Array.isArray(e))&&e!==null)return z.errors=[{instancePath:t+`/landing_page/background`,schemaPath:`#/properties/landing_page/properties/background/type`,keyword:`type`,params:{type:On.properties.landing_page.properties.background.type},message:`must be object,null`}],!1;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`default`),e.url===void 0&&(e.url=null);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return z.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!=="default"&&n!==`image`)return z.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.landing_page.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;{let n=e.url;if(typeof n!=`string`&&n!==null)return z.errors=[{instancePath:t+`/landing_page/background/url`,schemaPath:`#/properties/landing_page/properties/background/properties/url/type`,keyword:`type`,params:{type:On.properties.landing_page.properties.background.properties.url.type},message:`must be string,null`}],!1}}}var l=!0}}}}}}}}else return z.errors=[{instancePath:t+`/landing_page`,schemaPath:`#/properties/landing_page/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.preview;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.btn_title===void 0&&(n.btn_title=``),n.background===void 0&&(n.background={});for(let e in n)e!==`title`&&e!==`description`&&e!==`btn_title`&&e!==`background`&&delete n[e];if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/preview/title`,schemaPath:`#/properties/preview/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/preview/description`,schemaPath:`#/properties/preview/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.btn_title!=`string`)return z.errors=[{instancePath:t+`/preview/btn_title`,schemaPath:`#/properties/preview/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){let e=n.background;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=null),e.url===void 0&&(e.url=``);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`&&n!==null)return z.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/type`,keyword:`type`,params:{type:On.properties.preview.properties.background.properties.type.type},message:`must be string,null`}],!1;if(n!==`replica`&&n!==`background-gradient`&&n!==`custom-image`&&n!==null)return z.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:On.properties.preview.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;if(typeof e.url!=`string`)return z.errors=[{instancePath:t+`/preview/background/url`,schemaPath:`#/properties/preview/properties/background/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return z.errors=[{instancePath:t+`/preview/background`,schemaPath:`#/properties/preview/properties/background/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var d=!0}}}}else return z.errors=[{instancePath:t+`/preview`,schemaPath:`#/properties/preview/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.haircheck;if(n&&typeof n==`object`&&!Array.isArray(n)){n.permission_request_title===void 0&&(n.permission_request_title=``),n.permission_request_description===void 0&&(n.permission_request_description=``),n.permission_granted_title===void 0&&(n.permission_granted_title=``),n.permission_granted_description===void 0&&(n.permission_granted_description=``),n.permission_denied_title===void 0&&(n.permission_denied_title=``),n.permission_denied_description===void 0&&(n.permission_denied_description=``),n.join_button===void 0&&(n.join_button=``),n.cancel_btn===void 0&&(n.cancel_btn=``);for(let e in n)e!==`permission_request_title`&&e!==`permission_request_description`&&e!==`permission_granted_title`&&e!==`permission_granted_description`&&e!==`permission_denied_title`&&e!==`permission_denied_description`&&e!==`join_button`&&e!==`cancel_btn`&&delete n[e];if(typeof n.permission_request_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_request_title`,schemaPath:`#/properties/haircheck/properties/permission_request_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_request_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_request_description`,schemaPath:`#/properties/haircheck/properties/permission_request_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_granted_title`,schemaPath:`#/properties/haircheck/properties/permission_granted_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_granted_description`,schemaPath:`#/properties/haircheck/properties/permission_granted_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_title!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_denied_title`,schemaPath:`#/properties/haircheck/properties/permission_denied_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_description!=`string`)return z.errors=[{instancePath:t+`/haircheck/permission_denied_description`,schemaPath:`#/properties/haircheck/properties/permission_denied_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.join_button!=`string`)return z.errors=[{instancePath:t+`/haircheck/join_button`,schemaPath:`#/properties/haircheck/properties/join_button/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.cancel_btn!=`string`)return z.errors=[{instancePath:t+`/haircheck/cancel_btn`,schemaPath:`#/properties/haircheck/properties/cancel_btn/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0}}}}}}}}else return z.errors=[{instancePath:t+`/haircheck`,schemaPath:`#/properties/haircheck/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.after_call;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]);for(let e in n)e!==`title`&&e!==`description`&&e!==`cta`&&delete n[e];if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/after_call/title`,schemaPath:`#/properties/after_call/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){if(typeof n.description!=`string`)return z.errors=[{instancePath:t+`/after_call/description`,schemaPath:`#/properties/after_call/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/after_call/cta/`+r+`/title`,schemaPath:`#/properties/after_call/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0;if(m){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/after_call/cta/`+r+`/url`,schemaPath:`#/properties/after_call/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0}}else return z.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/after_call/cta`,schemaPath:`#/properties/after_call/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var p=!0}}}else return z.errors=[{instancePath:t+`/after_call`,schemaPath:`#/properties/after_call/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.branding;if(n&&typeof n==`object`&&!Array.isArray(n)){n.hide_tavus_badge===void 0&&(n.hide_tavus_badge=!1),n.logo===void 0&&(n.logo=``),n.text===void 0&&(n.text=``);for(let e in n)e!==`hide_tavus_badge`&&e!==`logo`&&e!==`text`&&delete n[e];if(typeof n.hide_tavus_badge!=`boolean`)return z.errors=[{instancePath:t+`/branding/hide_tavus_badge`,schemaPath:`#/properties/branding/properties/hide_tavus_badge/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var h=!0;if(h){if(typeof n.logo!=`string`)return z.errors=[{instancePath:t+`/branding/logo`,schemaPath:`#/properties/branding/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0;if(h){if(typeof n.text!=`string`)return z.errors=[{instancePath:t+`/branding/text`,schemaPath:`#/properties/branding/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0}}}else return z.errors=[{instancePath:t+`/branding`,schemaPath:`#/properties/branding/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){if(e.unavailable_screen!==void 0){let n=e.unavailable_screen;if(n&&typeof n==`object`&&!Array.isArray(n)){for(let e in n)e!==`daily_limit`&&e!==`total_limit`&&e!==`busy`&&e!==`error`&&e!==`captcha_unsupported`&&e!==`insecure_context`&&e!==`browser_unsupported`&&e!==`cta`&&delete n[e];if(n.daily_limit!==void 0){let e=n.daily_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/daily_limit`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.total_limit!==void 0){let e=n.total_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/total_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/total_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/total_limit`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.busy!==void 0){let e=n.busy;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/busy/title`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/busy/description`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/busy`,schemaPath:`#/properties/unavailable_screen/properties/busy/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.error!==void 0){let e=n.error;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/error/title`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/error/description`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/error`,schemaPath:`#/properties/unavailable_screen/properties/error/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.captcha_unsupported!==void 0){let e=n.captcha_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.insecure_context!==void 0){let e=n.insecure_context;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context/title`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context/description`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/insecure_context`,schemaPath:`#/properties/unavailable_screen/properties/insecure_context/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.browser_unsupported!==void 0){let e=n.browser_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return z.errors=[{instancePath:t+`/unavailable_screen/browser_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/browser_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.cta!==void 0){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/title`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0;if(_){if(n.url!==void 0){if(typeof n.url!=`string`)return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/url`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0}}else return z.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return z.errors=[{instancePath:t+`/unavailable_screen/cta`,schemaPath:`#/properties/unavailable_screen/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var g=!0}else var g=!0}}}}}}}}else return z.errors=[{instancePath:t+`/unavailable_screen`,schemaPath:`#/properties/unavailable_screen/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0}else var a=!0}}}}}}}}}}}}}}}else return z.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return z.errors=null,!0}var An=fn(`Config`);function jn(e,t){let n=e.customization??{};return n.widget===null&&delete n.widget,n.landing_page===null&&delete n.landing_page,Dn(n)||(t?.(),An.warn(`Customization validation failed`,Dn.errors)),{...e,customization:n}}var Mn=class extends Error{code;constructor(e){super(e===`unsupported_security_version`?`This deployment requires a newer Tavus SDK. Update the integration to continue.`:`The start security response could not be validated. Please try again.`),this.code=e,this.name=`StartSecurityError`}},Nn={name:`@tavus/embed`,version:`0.20.0`,variant:`embed`},Pn=new Set([`Error`,`TypeError`,`RangeError`,`ReferenceError`,`SyntaxError`,`URIError`,`NotAllowedError`,`NotFoundError`,`NotReadableError`,`NotSupportedError`,`AbortError`,`TimeoutError`,`OperationError`,`SecurityError`,`ApiError`]),Fn={network:`The request did not receive a response.`,timeout:`The operation timed out.`,unsupported:`The browser does not support this operation.`,NotAllowedError:`Access to the requested device was denied.`,NotFoundError:`The requested device was not found.`,NotReadableError:`The requested device could not be opened.`,AbortError:`The operation was cancelled.`,meeting_error:`The conversation connection failed.`,http_error:`The API request returned an error.`,rate_limited:`The request was rate limited.`,start_token_invalid:`The start token was rejected.`,security_session_invalid:`The security session was rejected.`,start_in_progress:`A conversation start is already in progress.`,security_unavailable:`The security service is temporarily unavailable.`,captcha_unavailable:`CAPTCHA verification is temporarily unavailable.`,deployment_security_required:`The deployment requires an updated SDK.`,config_invalid:`Deployment configuration validation failed.`,security_response_invalid:`The security response could not be validated.`,asset_error:`A deployment preview asset failed to load.`,playback_error:`Media playback failed.`,device_error:`A media device failed during the conversation.`,connection_lost:`The conversation connection was interrupted.`,canvas_error:`A Magic Canvas operation failed.`,integration_error:`An SDK integration operation failed.`};function In(e){return e&&/^[0-9]{6}$/.test(e)?`CAPTCHA verification failed.`:e&&Object.hasOwn(Fn,e)&&Fn[e]||`An SDK operation failed.`}var Ln=new Map;function Rn(e,t){if(!(!/^[a-z0-9_-]+\/[A-Za-z0-9_.-]+\.m?js$/.test(t)||t.length>128||Ln.size>=32))try{let n=new URL(e);[`https:`,`http:`,`file:`].includes(n.protocol)&&Ln.set(n.href,t)}catch{}}var zn=typeof document>`u`?null:document.currentScript,Bn=typeof HTMLScriptElement<`u`&&zn instanceof HTMLScriptElement?zn.src:void 0,Vn=t,Hn=Nn.variant,Un=Hn===`core`?`index.js`:Hn===`core-embed`?`embed.js`:Hn===`core-widget`?`widget.js`:Bn?`index.iife.js`:`index.mjs`,Wn=Bn||Vn;if(Wn)for(let e of Gn(Wn,Nn,Un))Rn(e,`${Hn}/${Un}`);function Gn(e,t,n){let r;try{r=new URL(e)}catch{return[]}if(r.pathname.endsWith(`/${n}`))return[r.href];if(t.variant!==`embed`&&t.variant!==`widget`||r.search)return[];let i=r.origin===`https://unpkg.com`?`/${t.name}`:r.origin===`https://cdn.jsdelivr.net`?`/npm/${t.name}`:void 0;return!i||!r.pathname.startsWith(i)||!/^(?:@[A-Za-z0-9_.-]+)?\/?$/.test(r.pathname.slice(i.length))?[]:[r.href,`${r.origin}${i}@${t.version}/dist/${n}`]}function Kn(e){if(!(e instanceof Error)||typeof e.stack!=`string`)return[];let t=[];for(let n of e.stack.slice(0,16384).split(`
|
|
3
3
|
`).slice(0,40)){let e=n.match(/(?:\(|@|\s)((?:https?|file):\/\/[^\s()]+):(\d+):(\d+)\)?$/);if(!e)continue;let r=Ln.get(e[1]),i=Number(e[2]),a=Number(e[3]);if(!(!r||i<1||a<1||i>1e7||a>1e7)&&(t.push({artifact_id:r,line:i,column:a}),t.length===20))break}return t}function qn(e){if(!Array.isArray(e))return[];let t=new Set(Ln.values());return(e??[]).slice(0,20).flatMap(e=>e&&t.has(e.artifact_id)&&Number.isInteger(e.line)&&Number.isInteger(e.column)&&e.line>0&&e.line<=1e7&&e.column>0&&e.column<=1e7?[{artifact_id:e.artifact_id,line:e.line,column:e.column}]:[])}var Jn={ejected:!0,"nbf-room":!0,"nbf-token":!0,"exp-room":!0,"exp-token":!0,"no-room":!0,"meeting-full":!0,"end-of-life":!0,"not-allowed":!0,"connection-error":!0,"cam-in-use":!0,"mic-in-use":!0,"cam-mic-in-use":!0,permissions:!0,"undefined-mediadevices":!0,"not-found":!0,constraints:!0,unknown:!0,"input-settings-error":!0,"screen-share-error":!0,"local-audio-level-observer-error":!0,"video-processor-error":!0,"video-processor-warning":!0,"audio-processor-error":!0,"remote-media-player-error":!0,"live-streaming-warning":!0,"meeting-session-data-error":!0};function Yn(e){return`daily_${e.replace(/-/g,`_`)}`}var Xn=Object.keys(Jn).map(Yn);function Zn(e){return typeof e==`string`&&Object.hasOwn(Jn,e)?Yn(e):void 0}var Qn=class extends Error{code;constructor(e){super(`Daily reported a fatal error: ${e}`),this.code=e,this.name=`DailyFatalError`}};function $n(e){let t=typeof e==`object`&&!!e&&`error`in e&&e.error,n=Zn(typeof t==`object`&&!!t&&`type`in t&&t.type);return n?new Qn(n):e}function er(e,t){if(typeof t==`string`)return e.meetingState()===`error`?`daily_load_failed`:`daily_start_camera_failed`}var tr=fn(`Telemetry`),nr=20,rr=16384,ir=40,ar=65536,or=6e5,sr=2e3,cr=5e3,lr=3e4,ur=new TextEncoder,dr=new Set([`init`,`captcha`,`start_token`,`start`,`join`,`end`,`permissions`,`runtime`,`media`,`connection`,`magic_canvas`,`host_bridge`,`telemetry`]),fr=new Set([`started`,`succeeded`,`failed`,`cancelled`,`interactive`,`shown`,`expired`,`retry`,`unsupported`,`degraded`,`recovered`,`dropped`]),pr=new Set([`init`,`config.normalize`,`start_token`,`start`,`end`,`render`,`captcha.load`,`captcha.execute`,`daily.join`,`daily.leave`,`daily.connection`,`media.microphone`,`media.camera`,`media.output`,`media.playback`,`media.preview`,`media.devices`,`canvas.validate`,`canvas.load`,`canvas.bridge`,`host.command`,`host.event`,`telemetry.deliver`]),mr=new Set([`api`,`config`,`captcha`,`conversation`,`permissions`,`media`,`runtime`,`magic_canvas`,`host_bridge`,`telemetry`]);function hr(e,t,n){return e!==void 0&&Number.isInteger(e)&&e>=t&&e<=n?e:void 0}function gr(e){return e.severity===`error`||[`failed`,`unsupported`,`degraded`,`dropped`].includes(e.outcome)}function _r(e){return typeof e==`string`?Tr.has(e)||/^[0-9]{6}$/.test(e)?e:`unknown`:e===void 0?void 0:`unknown`}function vr(e){return{stage:e.stage,outcome:e.outcome,code:_r(e.code),status:hr(e.status,100,599),operation:e.operation&&pr.has(e.operation)?e.operation:void 0,component:e.component&&mr.has(e.component)?e.component:void 0,severity:e.severity&&[`info`,`warning`,`error`].includes(e.severity)?e.severity:gr(e)?`error`:`info`,duration_ms:e.duration_ms!==void 0&&Number.isFinite(e.duration_ms)?Math.max(0,Math.min(864e5,Math.round(e.duration_ms))):void 0,dropped_events:e.stage===`telemetry`&&e.outcome===`dropped`?hr(e.dropped_events,1,1e6):void 0}}function yr(e){return{handled:typeof e.handled==`boolean`?e.handled:void 0,error_type:e.error_type&&Pn.has(e.error_type)?e.error_type:void 0,error_message:gr(e)||e.error_message!==void 0?In(_r(e.code)):void 0,stack_frames:e.stack_frames?qn(e.stack_frames):void 0}}function br(e,t,n){let r=e.attempt_id??t,i=e.conversation_id??n;return{conversation_id:typeof i==`string`&&/^c[A-Za-z0-9]{1,63}$/.test(i)?i:void 0,attempt_id:mn(r)?r:void 0,client_request_id:mn(e.client_request_id)?e.client_request_id:void 0,request_id:mn(e.request_id)?e.request_id:void 0}}function xr(e,t,n={name:Nn.name,version:Nn.version}){let r=e.diagnostics?.deploymentId===t?e.diagnostics:void 0,i=r?.sessionId??pn(),a=performance.now(),o,s,c,l,u,d=!1,f=!1,p=!1,m=0,h=Date.now(),g=0,_=0,v=0,y=[],b,x=new Map,S=!1,C=()=>globalThis.navigator?.onLine===!1;function w(){S=!0,m=Date.now()+lr}let T=()=>{S&&(S=!1,m=0,ae())};globalThis.addEventListener?.(`online`,T);let E=e=>({version:1,session_id:i,sdk_name:n.name,sdk_version:n.version,events:e});function D(e,t){t?.stage!==`telemetry`&&x.set(e,Math.min(1e6,(x.get(e)??0)+1))}function ee(){y=y.filter(e=>Date.now()-e.created<or||(D(`expired`,e.event),!1))}function O(){d||b||f||!o||!y.length&&!(p&&x.size)||(b=setTimeout(()=>void ae(),Math.min(2147483647,Math.max(sr,m-Date.now(),g>=120?h+6e4-Date.now():0))))}function k(){o=!!(t&&i)&&(c??s)===1&&(s===void 0||s===1),o||(y=[]),O()}function A(e){if(!dr.has(e.stage)||!fr.has(e.outcome)||d||o===!1||!t||!i)return;v+=1;let n=pn();if(!n)return;if(Date.now()-h>=6e4&&(h=Date.now(),g=0,_=0),g>=120||!gr(e)&&_>=100){D(`rate_limited`,e);return}ee();let r={...vr(e),...yr(e),...br(e,l,u),client_event_id:n,event_sequence:v,occurred_at:new Date().toISOString(),session_elapsed_ms:Math.max(0,Math.round(performance.now()-a))},s=ur.encode(JSON.stringify(r)).byteLength;for(s>8192&&(r.stack_frames=[],s=ur.encode(JSON.stringify(r)).byteLength);y.length>=ir||y.reduce((e,t)=>e+t.bytes,s)>ar;){let e=gr(r)?y.findIndex(e=>!gr(e.event)):-1;if(e<0){D(`queue_full`,r);return}let[t]=y.splice(e,1);D(`queue_full`,t.event)}return g+=1,gr(r)||(_+=1),y.push({event:r,bytes:s,created:Date.now(),attempts:0}),O(),!0}function te(e,t){let n=Er(e,t.component===`api`);A({...n,...t,error_type:t.error_type??(e instanceof Error&&Pn.has(e.name)?e.name:`Error`),error_message:In(t.code??n.code),stack_frames:Kn(e)})}let ne=e=>{e.stage===`start`&&e.outcome===`succeeded`&&e.conversation_id&&(u=e.conversation_id);let t={...e,operation:e.stage,component:`api`,handled:!0};if(e.outcome===`failed`){let n=Er(e.error,e.networkFailure);te(e.error,{...t,...n,outcome:n.code===`AbortError`?`cancelled`:`failed`})}else A(t)},re=e=>{s=e,k()};r&&(r.observe=ne,r.capabilities=re);function ie(e,t){let n=!(e instanceof vn)||[408,429].includes(e.status)||e.status>=500;if(!(e instanceof vn)&&C()){for(let e of t)--e.attempts;w()}else{let r=Math.max(...t.map(e=>e.attempts));m=Date.now()+Math.max(Sr(e),n?Math.min(3e4,1e3*2**(r-1))*(.5+Math.random()*.5):3e4)}for(y=[...t.filter(e=>{let t=n?e.attempts>=5?`retry_exhausted`:m-e.created>=or?`expired`:void 0:`rejected`;return t&&D(t,e.event),!t&&!d}),...y];y.length>ir||y.reduce((e,t)=>e+t.bytes,0)>ar;){let e=y.findIndex(e=>!gr(e.event)),[t]=y.splice(e>=0?e:y.length-1,1);D(`queue_full`,t.event)}}function j(){let e=Array.from(x);for(let[t,n]of e)if(A({stage:`telemetry`,outcome:`dropped`,component:`telemetry`,operation:`telemetry.deliver`,severity:`warning`,code:t,dropped_events:n})){let e=(x.get(t)??0)-n;e>0?x.set(t,e):x.delete(t)}}async function ae(){if(clearTimeout(b),b=void 0,ee(),p&&!d&&!y.length&&Date.now()>=m&&j(),!o||f||!y.length||Date.now()<m){O();return}let n=[],r=[];for(;y.length&&n.length<nr;){let e=y[0],t=e.event;if(ur.encode(JSON.stringify(E([...r,t]))).byteLength>rr)break;y.shift(),e.attempts+=1,n.push(e),r.push(t)}if(!r.length){O();return}let i=new AbortController,a=setTimeout(()=>i.abort(),cr);f=!0;try{await e.post(`/v2/deployments/${t}/telemetry`,E(r),{keepalive:!0,signal:i.signal}),p=!0,d||j()}catch(e){ie(e,n),tr.warn(`Delivery failed`,e instanceof vn?e.status:`network`)}finally{clearTimeout(a),f=!1,d&&(y=[]),O()}}return{sessionId:i,requestInstrumented:!!r,configure(e){c=e,k()},record(e){try{A(e)}catch{tr.warn(`Event observation failed`)}},captureError:te,beginAttempt(){l=pn(),u=void 0,r&&(r.attemptId=l)},flush:ae,dispose(){d=!0,globalThis.removeEventListener?.(`online`,T),clearTimeout(b),b=void 0,r?.observe===ne&&(r.observe=void 0),r?.capabilities===re&&(r.capabilities=void 0),ae(),f||(y=[])}}}function Sr(e){let t=e instanceof vn?e.headers?.get(`Retry-After`):null;if(!t)return 0;let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.min(2**53-1-Date.now(),n*1e3);let r=Date.parse(t);return Number.isFinite(r)?Math.max(0,r-Date.now()):0}var Cr=new Set([`NotAllowedError`,`NotFoundError`,`NotReadableError`,`AbortError`]),wr=new Set([`start_token_invalid`,`start_in_progress`,`security_session_invalid`,`deployment_security_required`,`security_unavailable`,`rate_limited`,`captcha_unavailable`,`bad_request`,`payload_too_large`,`authentication_required`,`billing`,`capacity_limit`,`deployment_limit`,`origin_forbidden`,`password_required`,`password_invalid`,`captcha_required`,`captcha_invalid`,`deployment_not_found`,`conversation_not_found`,`persona_unavailable`,`replica_unavailable`]),Tr=new Set([...Cr,...wr,`network`,`timeout`,`unsupported`,`insecure_context`,`daily_load_failed`,`daily_start_camera_failed`,`exhausted`,`broken`,`unknown`,`http_error`,`meeting_error`,`unsupported_security_version`,`Error`,`TypeError`,`RangeError`,`ReferenceError`,`SyntaxError`,`playback_error`,`asset_error`,`config_invalid`,`security_response_invalid`,`device_error`,`connection_lost`,`canvas_error`,`integration_error`,`queue_full`,`expired`,`retry_exhausted`,`rejected`,...Xn]);function Er(e,t=!0){if(e instanceof Mn||e instanceof Qn)return{code:e.code};if(e instanceof Error&&e.name===`TimeoutError`)return{code:`timeout`};if(e instanceof vn){let t=`http_error`;try{let n=JSON.parse(e.body);n&&typeof n==`object`&&`code`in n&&typeof n.code==`string`&&wr.has(n.code)&&(t=n.code)}catch{}return{status:e.status,code:t}}return e instanceof Error&&Cr.has(e.name)?{code:e.name}:{code:e instanceof TypeError&&t?`network`:e instanceof Error&&Pn.has(e.name)&&e.name!==`Error`?e.name:`unknown`}}function Dr(e,t,n){try{e?.captureError?e.captureError(t,n):e?.record({...Er(t,n.component===`api`),...n})}catch{tr.warn(`Error observation failed`)}}async function Or(e,t,n,r,i={}){if(e?.requestInstrumented&&[`init`,`start_token`,`start`,`end`].includes(t))return n();let a=performance.now(),o={stage:t,conversation_id:r,...i};e?.record({...o,outcome:`started`});try{let t=await n();return e?.record({...o,outcome:`succeeded`,duration_ms:performance.now()-a}),t}catch(n){let r=Er(n,[`init`,`start_token`,`start`,`end`].includes(t));throw Dr(e,n,{...o,...r,handled:i.handled??!0,outcome:r.code===`AbortError`?`cancelled`:`failed`,duration_ms:performance.now()-a}),n}}function kr(e,t,n){try{return n()}catch(n){throw Dr(e,n,t),n}}var Ar=class extends ee{componentDidCatch(e){throw Dr(this.props.telemetry,e,{stage:`runtime`,outcome:`failed`,component:`runtime`,operation:`render`,handled:!1,error_type:e instanceof Error&&Pn.has(e.name)?e.name:`Error`}),this.props.telemetry.flush(),e}render(){return this.props.children}},jr=fn(`Config`);function Mr(){return{is_available:!1}}var Nr=280,Pr=xe(null);function Fr({children:e,fallback:t}){let n=L(_t),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=F(()=>_n({baseUrl:a??`https://tavusapi.com`,token:o,deploymentId:r}),[a,o,r]),c=F(()=>xr(s,r,{name:n.surface?`@tavus/${n.surface}`:Nn.name,version:Nn.version}),[s,r,n.surface]);N(()=>{c.sessionId&&console.info(`[Tavus:Diagnostics] Session:`,c.sessionId);let e=()=>{c.flush()},t=()=>{document.visibilityState===`hidden`&&e()};return window.addEventListener(`pagehide`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`pagehide`,e),document.removeEventListener(`visibilitychange`,t),c.dispose()}},[c]),N(()=>{n.configInputError&&c.record({stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,code:`SyntaxError`,error_type:`SyntaxError`,handled:!0})},[n.configInputError,c]);let l=F(()=>Lt(null),[]),u=F(()=>Lt(null),[]),d=F(()=>Lt(!1),[]),f=F(()=>Lt(0),[]),p=P([]),m=I(()=>{let e=p.current;p.current=[];for(let t of e)t()},[]),h=I(()=>r?new Promise(e=>{p.current.push(e),f.value=f.peek()+1}):Promise.resolve(),[r,f]);dn(()=>{if(f.value,!r){u.value=null,d.value=!1,l.value=i||null;return}let e=new AbortController;return Or(c,`init`,async()=>{let t=await xn(s,r,{signal:e.signal});return kr(c,{stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,handled:!0},()=>(e.signal.aborted||c.configure(t.telemetry?.version),t))}).then(t=>{e.signal.aborted||(u.value=null,d.value=!1,l.value=t,jr.info(`Deployment initialized`,t.deployment_id),m())}).catch(t=>{e.signal.aborted||(jr.error(`Init failed:`,t),u.value=t,d.value=!i,l.value=i||Mr(),m())}),()=>{e.abort()}});let g=F(()=>Lt(null),[]);Xe(()=>l.subscribe(e=>{if(!e){g.value=null;return}let t=i?En(e,i):e;g.value=kr(c,{stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,handled:!1},()=>jn(t,()=>c.record({stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,code:`config_invalid`,handled:!0})))}),[g,l,i,c]);let _=g.value!==null,[v,y]=M(`pending`);if(N(()=>{if(!_){y(`pending`);return}if(!t||(globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1)){y(`done`);return}y(`fading`);let e=setTimeout(()=>y(`done`),Nr);return()=>clearTimeout(e)},[_]),!t){if(!_)return R(D,{});let t={telemetry:c,deploymentId:r,config:g,initError:u,configError:d,retryInit:h,client:s};return R(Pr.Provider,{value:t,children:R(Ar,{telemetry:c,children:e})})}let b=_?{telemetry:c,deploymentId:r,config:g,initError:u,configError:d,retryInit:h,client:s}:null;return R(`div`,{class:`relative w-full h-full`,children:[b&&R(Pr.Provider,{value:b,children:R(Ar,{telemetry:c,children:e})}),v!==`done`&&R(`div`,{class:`absolute inset-0 z-10${v===`fading`?` pointer-events-none motion-safe:animate-[tavusFadeOut_280ms_ease-out_forwards]`:``}`,"aria-hidden":v===`fading`?`true`:void 0,children:t})]})}var Ir=xe(null);function Lr({children:e}){let{client:t}=L(Pr),n=F(()=>({client:t}),[t]);return R(Ir.Provider,{value:n,children:e})}function Rr(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Br(e){return Br=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Br(e)}function Vr(e){var t=function(e,t){if(Br(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Br(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Br(t)==`symbol`?t:t+``}function Hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Vr(r.key),r)}}function Ur(e,t,n){return t&&Hr(e.prototype,t),n&&Hr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wr(e,t){if(t&&(Br(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Gr(e){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gr(e)}function Kr(e,t){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kr(e,t)}function qr(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kr(e,t)}function Jr(e,t,n){return(t=Vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yr(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function B(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Yr(a,r,i,o,s,`next`,e)}function s(e){Yr(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Xr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zr(e,t){if(e){if(typeof e==`string`)return Xr(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xr(e,t):void 0}}function Qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||Zr(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var ei,ti={exports:{}},ni=function(){if(ei)return ti.exports;ei=1;var e,t=typeof Reflect==`object`?Reflect:null,n=t&&typeof t.apply==`function`?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&typeof t.ownKeys==`function`?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}ti.exports=i,ti.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&m(e,`error`,t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function s(e){return e._maxListeners===void 0?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,a,c,l;if(o(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),c=a[t]),c===void 0)c=a[t]=n,++e._eventsCount;else if(typeof c==`function`?c=a[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function p(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);a=e}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},ti.exports}(),ri=$r(ni),ii=Object.prototype.hasOwnProperty;function ai(e,t,n){for(n of e.keys())if(oi(n,t))return n}function oi(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&oi(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&typeof i==`object`&&!(i=ai(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&typeof i==`object`&&!(i=ai(t,i))||!oi(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(ii.call(e,n)&&++r&&!ii.call(t,n)||!(n in t)||!oi(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var si={AmazonBot:`amazonbot`,"Amazon Silk":`amazon_silk`,"Android Browser":`android`,BaiduSpider:`baiduspider`,Bada:`bada`,BingCrawler:`bingcrawler`,Brave:`brave`,BlackBerry:`blackberry`,"ChatGPT-User":`chatgpt_user`,Chrome:`chrome`,ClaudeBot:`claudebot`,Chromium:`chromium`,Diffbot:`diffbot`,DuckDuckBot:`duckduckbot`,DuckDuckGo:`duckduckgo`,Electron:`electron`,Epiphany:`epiphany`,FacebookExternalHit:`facebookexternalhit`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,GPTBot:`gptbot`,"Internet Explorer":`ie`,InternetArchiveCrawler:`internetarchivecrawler`,"K-Meleon":`k_meleon`,LibreWolf:`librewolf`,Linespider:`linespider`,Maxthon:`maxthon`,"Meta-ExternalAds":`meta_externalads`,"Meta-ExternalAgent":`meta_externalagent`,"Meta-ExternalFetcher":`meta_externalfetcher`,"Meta-WebIndexer":`meta_webindexer`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,"OAI-SearchBot":`oai_searchbot`,Omgilibot:`omgilibot`,Opera:`opera`,"Opera Coast":`opera_coast`,"Pale Moon":`pale_moon`,PerplexityBot:`perplexitybot`,"Perplexity-User":`perplexity_user`,PhantomJS:`phantomjs`,PingdomBot:`pingdombot`,Puffin:`puffin`,QQ:`qq`,QQLite:`qqlite`,QupZilla:`qupzilla`,Roku:`roku`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SlackBot:`slackbot`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,"Sogou Browser":`sogou`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,YahooSlurp:`yahooslurp`,"Yandex Browser":`yandex`,YandexBot:`yandexbot`,YouBot:`youbot`},ci={amazonbot:`AmazonBot`,amazon_silk:`Amazon Silk`,android:`Android Browser`,baiduspider:`BaiduSpider`,bada:`Bada`,bingcrawler:`BingCrawler`,blackberry:`BlackBerry`,brave:`Brave`,chatgpt_user:`ChatGPT-User`,chrome:`Chrome`,claudebot:`ClaudeBot`,chromium:`Chromium`,diffbot:`Diffbot`,duckduckbot:`DuckDuckBot`,duckduckgo:`DuckDuckGo`,edge:`Microsoft Edge`,electron:`Electron`,epiphany:`Epiphany`,facebookexternalhit:`FacebookExternalHit`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,google_search:`Google Search`,googlebot:`Googlebot`,gptbot:`GPTBot`,ie:`Internet Explorer`,internetarchivecrawler:`InternetArchiveCrawler`,k_meleon:`K-Meleon`,librewolf:`LibreWolf`,linespider:`Linespider`,maxthon:`Maxthon`,meta_externalads:`Meta-ExternalAds`,meta_externalagent:`Meta-ExternalAgent`,meta_externalfetcher:`Meta-ExternalFetcher`,meta_webindexer:`Meta-WebIndexer`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,oai_searchbot:`OAI-SearchBot`,omgilibot:`Omgilibot`,opera:`Opera`,opera_coast:`Opera Coast`,pale_moon:`Pale Moon`,perplexitybot:`PerplexityBot`,perplexity_user:`Perplexity-User`,phantomjs:`PhantomJS`,pingdombot:`PingdomBot`,puffin:`Puffin`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,qupzilla:`QupZilla`,roku:`Roku`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,slackbot:`SlackBot`,sleipnir:`Sleipnir`,sogou:`Sogou Browser`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yahooslurp:`YahooSlurp`,yandex:`Yandex Browser`,yandexbot:`YandexBot`,youbot:`YouBot`},V={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},li={Android:`Android`,Bada:`Bada`,BlackBerry:`BlackBerry`,ChromeOS:`Chrome OS`,HarmonyOS:`HarmonyOS`,iOS:`iOS`,Linux:`Linux`,MacOS:`macOS`,PlayStation4:`PlayStation 4`,Roku:`Roku`,Tizen:`Tizen`,WebOS:`WebOS`,Windows:`Windows`,WindowsPhone:`Windows Phone`},ui={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`},H=class e{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||``}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||``}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case`NT`:return`NT`;case`XP`:case`NT 5.1`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}}static getMacOSVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);t.push(0);let n=t[0],r=t[1];if(n===10)switch(r){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}switch(n){case 11:return`Big Sur`;case 12:return`Monterey`;case 13:return`Ventura`;case 14:return`Sonoma`;case 15:return`Sequoia`;default:return}}static getAndroidVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0}static getVersionPrecision(e){return e.split(`.`).length}static compareVersions(t,n,r=!1){let i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],t=>{let n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),e=>Array(20-e.length).join(`0`)+e).reverse()});for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}}static map(e,t){let n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){let r=e[n];if(t(r,n))return r}}static assign(e,...t){let n=e,r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){let e=t[r];typeof e==`object`&&e&&Object.keys(e).forEach(t=>{n[t]=e[t]})}return e}static getBrowserAlias(e){return si[e]}static getBrowserTypeByAlias(e){return ci[e]||``}},U=/version\/(\d+(\.?_?\d+)+)/i,di=[{test:[/gptbot/i],describe(e){let t={name:`GPTBot`},n=H.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){let t={name:`ChatGPT-User`},n=H.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){let t={name:`OAI-SearchBot`},n=H.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){let t={name:`ClaudeBot`},n=H.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){let t={name:`Omgilibot`},n=H.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){let t={name:`Diffbot`},n=H.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){let t={name:`PerplexityBot`},n=H.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){let t={name:`Perplexity-User`},n=H.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){let t={name:`YouBot`},n=H.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){let t={name:`Meta-WebIndexer`},n=H.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){let t={name:`Meta-ExternalAds`},n=H.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){let t={name:`Meta-ExternalAgent`},n=H.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){let t={name:`Meta-ExternalFetcher`},n=H.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=H.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){let t={name:`Linespider`},n=H.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){let t={name:`AmazonBot`},n=H.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){let t={name:`BingCrawler`},n=H.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){let t={name:`BaiduSpider`},n=H.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){let t={name:`DuckDuckBot`},n=H.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){let t={name:`InternetArchiveCrawler`},n=H.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({name:`FacebookExternalHit`})},{test:[/slackbot/i,/slack-imgProxy/i],describe(e){let t={name:`SlackBot`},n=H.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:()=>({name:`YahooSlurp`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({name:`YandexBot`})},{test:[/pingdom/i],describe:()=>({name:`PingdomBot`})},{test:[/opera/i],describe(e){let t={name:`Opera`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=H.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:`NAVER Whale Browser`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){let t={name:`Pale Moon`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=H.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=H.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=H.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:`Opera Touch`},n=H.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=H.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:`K-Meleon`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=H.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=H.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=H.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=H.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:`Microsoft Edge`},n=H.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=H.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=H.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=H.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:`Amazon Silk`},n=H.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=H.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=H.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:`BlackBerry`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:`WebOS Browser`},n=H.getFirstMatch(U,e)||H.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:`Bada`},n=H.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=H.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=H.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){let t={name:`LibreWolf`},n=H.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:`Firefox`},n=H.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:`Electron`},n=H.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){let t={name:`Sogou Browser`},n=H.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=H.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=H.getFirstMatch(/se ([\d.]+)x/i,e),a=n||r||i;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:`Miui`},n=H.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>!!e.hasBrand(`DuckDuckGo`)||e.test(/\sDdg\/[\d.]+$/i),describe(e,t){let n={name:`DuckDuckGo`};if(t){let e=t.getBrandVersion(`DuckDuckGo`);if(e)return n.version=e,n}let r=H.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:e=>e.hasBrand(`Brave`),describe(e,t){let n={name:`Brave`};if(t){let e=t.getBrandVersion(`Brave`);if(e)return n.version=e,n}return n}},{test:[/chromium/i],describe(e){let t={name:`Chromium`},n=H.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=H.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:`Google Search`},n=H.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:`Android Browser`},n=H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=H.getFirstMatch(U,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:H.getFirstMatch(t,e),version:H.getSecondMatch(t,e)}}}],fi=[{test:[/Roku\/DVP/],describe(e){let t=H.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:li.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=H.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:li.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=H.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=H.getWindowsVersionName(t);return{name:li.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:li.iOS},n=H.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=H.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=H.getMacOSVersionName(t),r={name:li.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=H.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:li.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){let t=H.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:li.HarmonyOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=H.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=H.getAndroidVersionName(t),r={name:li.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=H.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:li.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=H.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||H.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||H.getFirstMatch(/\bbb(\d+)/i,e);return{name:li.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=H.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:li.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=H.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:li.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:li.Linux})},{test:[/CrOS/],describe:()=>({name:li.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=H.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:li.PlayStation4,version:t}}}],pi=[{test:[/googlebot/i],describe:()=>({type:V.bot,vendor:`Google`})},{test:[/linespider/i],describe:()=>({type:V.bot,vendor:`Line`})},{test:[/amazonbot/i],describe:()=>({type:V.bot,vendor:`Amazon`})},{test:[/gptbot/i],describe:()=>({type:V.bot,vendor:`OpenAI`})},{test:[/chatgpt-user/i],describe:()=>({type:V.bot,vendor:`OpenAI`})},{test:[/oai-searchbot/i],describe:()=>({type:V.bot,vendor:`OpenAI`})},{test:[/baiduspider/i],describe:()=>({type:V.bot,vendor:`Baidu`})},{test:[/bingbot/i],describe:()=>({type:V.bot,vendor:`Bing`})},{test:[/duckduckbot/i],describe:()=>({type:V.bot,vendor:`DuckDuckGo`})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:V.bot,vendor:`Anthropic`})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:V.bot,vendor:`Webz.io`})},{test:[/diffbot/i],describe:()=>({type:V.bot,vendor:`Diffbot`})},{test:[/perplexitybot/i],describe:()=>({type:V.bot,vendor:`Perplexity AI`})},{test:[/perplexity-user/i],describe:()=>({type:V.bot,vendor:`Perplexity AI`})},{test:[/youbot/i],describe:()=>({type:V.bot,vendor:`You.com`})},{test:[/ia_archiver/i],describe:()=>({type:V.bot,vendor:`Internet Archive`})},{test:[/meta-webindexer/i],describe:()=>({type:V.bot,vendor:`Meta`})},{test:[/meta-externalads/i],describe:()=>({type:V.bot,vendor:`Meta`})},{test:[/meta-externalagent/i],describe:()=>({type:V.bot,vendor:`Meta`})},{test:[/meta-externalfetcher/i],describe:()=>({type:V.bot,vendor:`Meta`})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:V.bot,vendor:`Meta`})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:V.bot,vendor:`Slack`})},{test:[/yahoo/i],describe:()=>({type:V.bot,vendor:`Yahoo`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:V.bot,vendor:`Yandex`})},{test:[/pingdom/i],describe:()=>({type:V.bot,vendor:`Pingdom`})},{test:[/huawei/i],describe(e){let t=H.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:V.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:V.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:V.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:V.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:V.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:V.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:V.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=H.getFirstMatch(/(ipod|iphone)/i,e);return{type:V.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:V.mobile,vendor:`Nexus`})},{test:[/Nokia/i],describe(e){let t=H.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:V.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:V.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:V.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:V.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:V.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:V.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:V.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:V.tv})},{test:[/netcast/i],describe:()=>({type:V.tv})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:V.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:V.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:V.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:V.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:V.tv})}],mi=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:ui.Blink};let t=H.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ui.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:ui.Trident},n=H.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:ui.Presto},n=H.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:ui.Gecko},n=H.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:ui.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:ui.WebKit},n=H.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],hi=class{constructor(e,t=!1,n=null){if(e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e;let r=!1;typeof t==`boolean`?(r=t,this._hints=n):this._hints=typeof t==`object`&&t?t:null,this.parsedResult={},!0!==r&&this.parse()}getHints(){return this._hints}hasBrand(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;let t=e.toLowerCase();return this._hints.brands.some(e=>e.brand&&e.brand.toLowerCase()===t)}getBrandVersion(e){if(!this._hints||!Array.isArray(this._hints.brands))return;let t=e.toLowerCase(),n=this._hints.brands.find(e=>e.brand&&e.brand.toLowerCase()===t);return n?n.version:void 0}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=H.find(di,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.browser=e.describe(this.getUA(),this)),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=H.find(fi,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||``:t||``}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||``:t||``}parsePlatform(){this.parsedResult.platform={};let e=H.find(pi,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``}parseEngine(){this.parsedResult.engine={};let e=H.find(mi,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return H.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},i=0;if(Object.keys(e).forEach(a=>{let o=e[a];typeof o==`string`?(r[a]=o,i+=1):typeof o==`object`&&(t[a]=o,n+=1)}),n>0){let e=Object.keys(t),n=H.find(e,e=>this.isOS(e));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=H.find(e,e=>this.isPlatform(e));if(r){let e=this.satisfies(t[r]);if(e!==void 0)return e}}if(i>0){let e=Object.keys(r),t=H.find(e,e=>this.isBrowser(e,!0));if(t!==void 0)return this.compareVersion(r[t])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=H.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(H.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}},gi=class{static getParser(e,t=!1,n=null){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new hi(e,t,n)}static parse(e,t=null){return new hi(e,t).getResult()}static get BROWSER_MAP(){return ci}static get ENGINE_MAP(){return ui}static get OS_MAP(){return li}static get PLATFORMS_MAP(){return V}};function _i(e){return function(e){if(Array.isArray(e))return Xr(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||Zr(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function vi(){return Date.now()+Math.random().toString()}function yi(){throw Error(`Method must be implemented in subclass`)}var bi=[`daily.co`,`dailywebrtc.com`,`dailywebrtc.net`],xi=null;function Si(){return xi}function Ci(e){(e===null||bi.includes(e))&&(xi=e)}function wi(e){try{var t=new URL(e).hostname;return bi.find(function(e){return t===e||t.endsWith(`.${e}`)})||null}catch{return null}}function Ti(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function Ei(e,t){var n=bi.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function Di(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xi??bi[0];return e!=null&&e.callObjectBundleUrlOverride?(console.warn(`The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js).`),Ei(e.callObjectBundleUrlOverride,t)):function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xi??bi[0];if(t&&t.trim()!==``||(t=xi??bi[0]),e!=null&&e.bundlePathOverride){var n=Ei(e.bundlePathOverride,t);return n.endsWith(`/`)?n.slice(0,-1):n}if(e!=null&&e.callObjectBundleUrlOverride){var r=Ei(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf(`/`));return i.endsWith(`/`)?i.slice(0,-1):i}var a=Ti(`https://c.${t}/call-machine/versioned/0.92.2/static`,e);return a.endsWith(`/`)?a.slice(0,-1):a}(e,t)+`/call-machine-object-bundle.js`}function Oi(e){var t=e?.bundlePathOverride||e?.callObjectBundleUrlOverride;return!(!t||bi.some(function(e){return t.includes(e)}))||!!(e?.proxyUrl||function(){try{return typeof localStorage<`u`&&localStorage.getItem(`daily:disable-base-domain-fallback`)===`1`}catch{return!1}}())}function ki(e){try{var t=e??window.location.hostname;return bi.find(function(e){return t===e||t.endsWith(`.${e}`)})??null}catch{return null}}function Ai(e,t){var n=wi(e);if(!n||Oi(t))return[e];var r=xi??ki()??bi[0];return(r===bi[0]?bi:[r].concat(_i(bi.filter(function(e){return e!==r})))).map(function(t){return t===n?e:function(e,t,n){try{var r=new URL(e);return r.hostname.endsWith(`.${t}`)?r.hostname=r.hostname.slice(0,-t.length)+n:r.hostname===t&&(r.hostname=n),r.toString()}catch{return e}}(e,n,t)})}function ji(e){try{new URL(e)}catch{return!1}return!0}var Mi=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Ni=`8.55.2`,Pi=globalThis;function Fi(e,t,n){let r=n||Pi,i=r.__SENTRY__=r.__SENTRY__||{},a=i[Ni]=i[Ni]||{};return a[e]||(a[e]=t())}var Ii=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Li=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],Ri={};function zi(e){if(!(`console`in Pi))return e();let t=Pi.console,n={},r=Object.keys(Ri);r.forEach(e=>{let r=Ri[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}var W=Fi(`logger`,function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ii?Li.forEach(n=>{t[n]=(...t)=>{e&&zi(()=>{Pi.console[n](`Sentry Logger [${n}]:`,...t)})}}):Li.forEach(e=>{t[e]=()=>{}}),t}),Bi=`?`,Vi=/\(error: (.*)\)/,Hi=/captureMessage|captureException/;function Ui(e){return e[e.length-1]||{}}var Wi=`<anonymous>`;function Gi(e){try{return e&&typeof e==`function`&&e.name||Wi}catch{return Wi}}function Ki(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var qi={},Ji={};function Yi(e,t){qi[e]=qi[e]||[],qi[e].push(t)}function Xi(e,t){if(!Ji[e]){Ji[e]=!0;try{t()}catch(t){Ii&&W.error(`Error while instrumenting ${e}`,t)}}}function Zi(e,t){let n=e&&qi[e];if(n)for(let r of n)try{r(t)}catch(t){Ii&&W.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Gi(r)}\nError:`,t)}}var Qi=null;function $i(){Qi=Pi.onerror,Pi.onerror=function(e,t,n,r,i){return Zi(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!Qi&&Qi.apply(this,arguments)},Pi.onerror.__SENTRY_INSTRUMENTED__=!0}var ea=null;function ta(){ea=Pi.onunhandledrejection,Pi.onunhandledrejection=function(e){return Zi(`unhandledrejection`,e),!ea||ea.apply(this,arguments)},Pi.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function na(){return ra(Pi),Pi}function ra(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ni,t[Ni]=t[Ni]||{}}var ia=Object.prototype.toString;function aa(e){switch(ia.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return ha(e,Error)}}function oa(e,t){return ia.call(e)===`[object ${t}]`}function sa(e){return oa(e,`ErrorEvent`)}function ca(e){return oa(e,`DOMError`)}function la(e){return oa(e,`String`)}function ua(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function da(e){return e===null||ua(e)||typeof e!=`object`&&typeof e!=`function`}function fa(e){return oa(e,`Object`)}function pa(e){return typeof Event<`u`&&ha(e,Event)}function ma(e){return!!(e&&e.then&&typeof e.then==`function`)}function ha(e,t){try{return e instanceof t}catch{return!1}}function ga(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var _a=Pi;function va(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(o=ya(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function ya(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(_a.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i&&i.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&la(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function ba(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xa(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{ga(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function Sa(e,t,n=!1){return!!la(e)&&(oa(t,`RegExp`)?t.test(e):!!la(t)&&(n?e===t:e.includes(t)))}function Ca(e,t=[],n=!1){return t.some(t=>Sa(e,t,n))}function wa(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&Ea(i,r);try{e[t]=i}catch{Ii&&W.log(`Failed to replace method "${t}" in object`,e)}}function Ta(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ii&&W.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ea(e,t){try{e.prototype=t.prototype=t.prototype||{},Ta(e,`__sentry_original__`,t)}catch{}}function Da(e){return e.__sentry_original__}function Oa(e){if(aa(e))return{message:e.message,name:e.name,stack:e.stack,...Aa(e)};if(pa(e)){let t={type:e.type,target:ka(e.target),currentTarget:ka(e.currentTarget),...Aa(e)};return typeof CustomEvent<`u`&&ha(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ka(e){try{return t=e,typeof Element<`u`&&ha(t,Element)?va(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function Aa(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ja(e){return Ma(e,new Map)}function Ma(e,t){if(function(e){if(!fa(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.getOwnPropertyNames(e))e[n]!==void 0&&(r[n]=Ma(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(e=>{r.push(Ma(e,t))}),r}return e}function Na(){return Date.now()/1e3}var Pa=function(){let{performance:e}=Pi;if(!e||!e.now)return Na;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Fa(){let e=Pi,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function Ia(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function La(e){let{message:t,event_id:n}=e;if(t)return t;let r=Ia(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Ra(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function za(e,t){let n=Ia(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:`generic`,handled:!0,...r,...t},t&&`data`in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function Ba(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Ta(e,`__sentry_captured__`,!0)}catch{}return!1}var Va;function Ha(e){return new Wa(t=>{t(e)})}function Ua(e){return new Wa((t,n)=>{n(e)})}(()=>{let{performance:e}=Pi;if(!e||!e.now)return;let t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;(a||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`}(Va||={});var Wa=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=Va.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){r(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){r(e)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init(){this._resolve=e=>{this._setResult(Va.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Va.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Va.PENDING&&(ma(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Va.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Va.RESOLVED&&e[1](this._value),this._state===Va.REJECTED&&e[2](this._value),!0)})}}};function Ga(e){let t=Pa(),n={sid:Fa(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return ja({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Ka(n,e),n}function Ka(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Pa(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Fa()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function qa(){return Fa()}function Ja(){return Fa().substring(16)}function Ya(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Ya(r[e],t[e],n-1));return r}var Xa=`_sentrySpan`;function Za(e,t){t?Ta(e,Xa,t):delete e[Xa]}function Qa(e){return e[Xa]}var $a=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qa(),spanId:Ja()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Za(t,Qa(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ka(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t=typeof e==`function`?e(this):e,[n,r]=t instanceof $a?[t.getScopeData(),t.getRequestSession()]:fa(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Za(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qa()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:Na(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Qa(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ya(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Ja(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:Fa();if(!this._client)return W.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:Fa();if(!this._client)return W.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:Fa();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(W.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}},eo=class{constructor(e,t){let n,r;n=e||new $a,r=t||new $a,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return ma(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function to(){let e=ra(na());return e.stack=e.stack||new eo(Fi(`defaultCurrentScope`,()=>new $a),Fi(`defaultIsolationScope`,()=>new $a))}function no(e){return to().withScope(e)}function ro(e,t){let n=to();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function io(e){return to().withScope(()=>e(to().getIsolationScope()))}function ao(e){let t=ra(e);return t.acs?t.acs:{withIsolationScope:io,withScope:no,withSetScope:ro,withSetIsolationScope:(e,t)=>io(t),getCurrentScope:()=>to().getScope(),getIsolationScope:()=>to().getIsolationScope()}}function oo(){return ao(na()).getCurrentScope()}function so(){return ao(na()).getIsolationScope()}function co(){return oo().getClient()}function lo(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return ja({trace_id:t,span_id:n,parent_span_id:r})}function uo(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(ja(r));return n}var fo=/^sentry-/;function po(e){let t=function(e){if(e&&(la(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=mo(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):mo(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(fo)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function mo(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var ho=!1;function go(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ja({parent_span_id:r?t:yo(e).parent_span_id,span_id:r?Ja():t,trace_id:n})}function _o(e){return typeof e==`number`?vo(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?vo(e.getTime()):Pa()}function vo(e){return e>9999999999?e/1e3:e}function yo(e){if(function(e){return typeof e.getSpanJSON==`function`}(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return ja({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:_o(i),timestamp:_o(o)||void 0,status:bo(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:uo(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function bo(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function xo(e){return e._sentryRootSpan||e}function So(){ho||=(zi(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),!0)}var Co=`production`;function wo(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=ja({environment:n.environment||Co,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function To(e){let t=co();if(!t)return{};let n=xo(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&po(a);if(o)return o;let s=wo(e.spanContext().traceId,t),c=yo(n),l=c.data||{},u=l[`sentry.sample_rate`];u!=null&&(s.sample_rate=`${u}`);let d=l[`sentry.source`],f=c.description;return d!==`url`&&f&&(s.transaction=f),function(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=co(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}()&&(s.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return t===1}(n))),t.emit(`createDsc`,s,n),s}var Eo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Do(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Oo(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ko(e){let t=typeof e==`string`?function(e){let t=Eo.exec(e);if(!t)return void zi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Oo({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):Oo(e);if(t&&function(e){if(!Ii)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(W.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(W.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(W.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(W.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Ao(e,t=100,n=1/0){try{return Mo(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function jo(e,t=3,n=102400){let r=Ao(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?jo(e,t-1,n):r;var i}function Mo(e,t,n=1/0,r=1/0,i=function(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=function(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(ga(t))return`[VueViewModel]`;if(fa(n=t)&&`nativeEvent`in n&&`preventDefault`in n&&`stopPropagation`in n)return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${Gi(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return Mo(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=Oa(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=Mo(e,t,c-1,r,i),d++}return o(t),u}function No(e,t=[]){return[e,t]}function Po(e,t){let[n,r]=e;return[n,[...r,t]]}function Fo(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function Io(e){return Pi.__SENTRY__&&Pi.__SENTRY__.encodePolyfill?Pi.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Lo(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Io(r),e]:r.push(typeof e==`string`?Io(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Ao(n))}i(e)}}return typeof r==`string`?r:function(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(r)}function Ro(e){let t=typeof e.data==`string`?Io(e.data):e.data;return[ja({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var zo={session:`session`,sessions:`session`,attachment:`attachment`,transaction:`transaction`,event:`error`,client_report:`internal`,user_report:`default`,profile:`profile`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,feedback:`feedback`,span:`span`,statsd:`metric_bucket`,raw_security:`security`};function Bo(e){return zo[e]}function Vo(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ho(e,t,n,r){let i=Vo(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;(function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])})(e,n&&n.sdk);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Do(r)},...i&&{trace:ja({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,No(o,[[{type:a},e]])}function Uo(e,t,n,r=0){return new Wa((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);Mi&&o.id&&s===null&&W.log(`Event processor "${o.id}" dropped event`),ma(s)?s.then(t=>Uo(e,t,n,r+1).then(i)).then(null,a):Uo(e,s,n,r+1).then(i).then(null,a)}})}var Wo,Go,Ko;function qo(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=ja(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=ja(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=ja(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=ja(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:go(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:To(t),...e.sdkProcessingMetadata};let n=yo(xo(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function Jo(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;Yo(e,`extra`,n),Yo(e,`tags`,r),Yo(e,`user`,i),Yo(e,`contexts`,a),e.sdkProcessingMetadata=Ya(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Yo(e,t,n){e[t]=Ya(e[t],n,1)}function Xo(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Fa(),timestamp:t.timestamp||Na()},l=n.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||n||Co,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=ba(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ba(o.value,a));let s=e.request;s&&s.url&&(s.url=ba(s.url,a))})(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&function(e,t){let n=function(e){let t=Pi._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Ko&&n.length===Go||(Go=n.length,Ko=n.reduce((n,r)=>{Wo||={};let i=Wo[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e],o=a&&a.filename,s=t[r];if(o&&s){n[o]=s,Wo[r]=[o,s];break}}}return n},{})),Ko}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch{}}(c,e.stackParser);let u=function(e,t){if(!t)return e;let n=e?e.clone():new $a;return n.update(t),n}(r,n.captureContext);n.mechanism&&za(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Fi(`globalScope`,()=>new $a).getScopeData();a&&Jo(f,a.getScopeData()),u&&Jo(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),qo(c,f),Uo([...d,...f.eventProcessors],c,n).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}(e),typeof o==`number`&&o>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ao(e.data,t,n)}}))},...e.user&&{user:Ao(e.user,t,n)},...e.contexts&&{contexts:Ao(e.contexts,t,n)},...e.extra&&{extra:Ao(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ao(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Ao(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Ao(e.contexts.flags,3,n)),r}(e,o,s):e))}function Zo(e){if(e)return function(e){return e instanceof $a||typeof e==`function`}(e)||function(e){return Object.keys(e).some(e=>Qo.includes(e))}(e)?{captureContext:e}:e}var Qo=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function $o(e,t){return oo().captureEvent(e,t)}function es(e){let t=co(),n=so(),r=oo(),{release:i,environment:a=Co}=t&&t.getOptions()||{},{userAgent:o}=Pi.navigator||{},s=Ga({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&Ka(c,{status:`exited`}),ts(),n.setSession(s),r.setSession(s),s}function ts(){let e=so(),t=oo(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Ka(e,n)}(n),ns(),e.setSession(),t.setSession()}function ns(){let e=so(),t=oo(),n=co(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function rs(e=!1){e?ts():ns()}function is(e,t,n){return t||`${function(e){return`${function(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var as=[];function os(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function ss(e,t,n){if(n[t.name])Mi&&W.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,as.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),as.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}Mi&&W.log(`Integration installed: ${t.name}`)}}var cs=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},ls=`Not capturing exception because it's already been captured.`,us=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ko(e.dsn):Mi&&W.warn(`No DSN provided, client will not send events.`),this._dsn){let t=is(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=[`enableTracing`,`tracesSampleRate`,`tracesSampler`].find(t=>t in e&&e[t]==null);t&&zi(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,n){let r=Fa();if(Ba(e))return Mi&&W.log(ls),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n))),i.event_id}captureMessage(e,t,n,r){let i={event_id:Fa(),...n},a=ua(e)?e:String(e),o=da(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){let r=Fa();if(t&&t.originalException&&Ba(t.originalException))return Mi&&W.log(ls),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){typeof e.release==`string`?(this.sendSession(e),Ka(e,{init:!1})):Mi&&W.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit(`flush`),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Ha(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit(`close`),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];ss(this,e,this._integrations),t||os(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Ho(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=Po(n,Ro(e));let r=this.sendEnvelope(n);r&&r.then(t=>this.emit(`afterSendEvent`,e,t),null)}sendSession(e){let t=function(e,t,n,r){let i=Vo(n);return No({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Do(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;Mi&&W.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(Mi&&W.error(`Error while sending envelope:`,e),e)):(Mi&&W.error(`Transport disabled`),Ha({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&ss(e,t,n)}),n}(this,e),os(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Ka(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Wa(t=>{let n=0,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&this._transport!==void 0}_prepareEvent(e,t,n=oo(),r=so()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Xo(i,e,t,n,this,r).then(e=>(e===null||(e.contexts={trace:lo(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||wo(n.traceId,e)}(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{Mi&&(e instanceof cs&&e.logLevel===`log`?W.log(e.message):W.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=fs(e),o=ds(e),s=e.type||`error`,c=`before send for type \`${s}\``,l=i===void 0?void 0:function(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t;Mi&&W.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(o&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`,e),Ua(new cs(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let u=s===`replay_event`?`replay`:s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,u,e),new cs("An event processor returned `null`, will not send event.",`log`);return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ma(e))return e.then(e=>{if(!fa(e)&&e!==null)throw new cs(n);return e},e=>{throw new cs(`${t} rejected with ${e}`)});if(!fa(e)&&e!==null)throw new cs(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(ds(n)&&i)return i(n,r);if(fs(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(So(),e.recordDroppedEvent(`before_send`,`span`))}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),c)}).then(r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new cs(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof cs?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new cs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){Mi&&W.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(Mi&&W.log(`No outcomes to send`));if(!this._dsn)return void(Mi&&W.log(`No dsn provided, will not send outcomes`));Mi&&W.log(`Sending outcomes:`,e);let t=(n=e,No((r=this._options.tunnel&&Do(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||Na(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function ds(e){return e.type===void 0}function fs(e){return e.type===`transaction`}function ps(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Ua(new cs(`Not adding Promise because buffer limit was reached.`));let i=r();return t.indexOf(i)===-1&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new Wa((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Ha(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}function ms(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(let e of n.split(`;`))e===`metric_bucket`&&a&&!a.split(`;`).includes(`custom`)||(i[e]=r+s);else i.all=r+s}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):t===429&&(i.all=r+6e4);return i}function hs(e,t,n=ps(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(Fo(i,(t,n)=>{let i=Bo(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){let r=gs(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return Ha({});let o=No(i[0],a),s=t=>{Fo(o,(n,r)=>{let i=gs(n,r);e.recordDroppedEvent(t,Bo(r),i)})};return n.add(()=>t({body:Lo(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&Mi&&W.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ms(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof cs)return Mi&&W.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Ha({});throw e})},flush:e=>n.drain(e)}}function gs(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var _s=100;function vs(e,t){let n=co(),r=so();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=_s}=n.getOptions();if(a<=0)return;let o={timestamp:Na(),...e},s=i?zi(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var ys,bs=new WeakMap,xs=()=>({name:`FunctionToString`,setupOnce(){ys=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Da(this),n=bs.has(co())&&t!==void 0?t:this;return ys.apply(n,e)}}catch{}},setup(e){bs.set(e,!0)}}),Ss=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,`undefined is not an object (evaluating 'a.L')`,`can't redefine non-configurable property "solana"`,`vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)`,`Can't find variable: _AutofillCallbackHandler`,/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Cs=(e={})=>({name:`InboundFilters`,processEvent(t,n,r){return function(e,t){return t.ignoreInternal&&function(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}(e)?(Mi&&W.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${La(e)}`),!0):function(e,t){return e.type||!t||!t.length?!1:function(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>Ca(e,t))}(e,t.ignoreErrors)?(Mi&&W.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${La(e)}`),!0):function(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value)}(e)?(Mi&&W.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${La(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&Ca(n,t)}(e,t.ignoreTransactions)?(Mi&&W.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${La(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=ws(e);return!!n&&Ca(n,t)}(e,t.denyUrls)?(Mi&&W.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${La(e)}.\nUrl: ${ws(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;let n=ws(e);return!n||Ca(n,t)}(e,t.allowUrls)&&(Mi&&W.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${La(e)}.\nUrl: ${ws(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ss],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function ws(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}(t):null}catch{return Mi&&W.error(`Cannot extract url for event ${La(e)}`),null}}function Ts(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&ha(o.originalException,Error)))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=Es(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map(e=>(e.value&&=ba(e.value,l),e))))}function Es(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(ha(r[i],Error)){Ds(o,s);let a=e(t,r[i]),l=c.length;Os(a,i,l,s),c=Es(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(ha(r,Error)){Ds(o,s);let l=e(t,r),u=c.length;Os(l,`errors[${a}]`,u,s),c=Es(e,t,n,r,i,[l,...c],l,u)}}),c}function Ds(e,t){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function Os(e,t,n,r){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function ks(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function As(){`console`in Pi&&Li.forEach(function(e){e in Pi.console&&wa(Pi.console,e,function(t){return Ri[e]=t,function(...t){Zi(`console`,{args:t,level:e});let n=Ri[e];n&&n.apply(Pi.console,t)}})})}function js(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ms=()=>{let e;return{name:`Dedupe`,processEvent(t){if(t.type)return t;try{if(function(e,t){return t?!!(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ps(e,t)||!Ns(e,t))}(e,t)||function(e,t){let n=Fs(t),r=Fs(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ps(e,t)||!Ns(e,t))}(e,t)):!1}(t,e))return Mi&&W.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function Ns(e,t){let n=Ki(e),r=Ki(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Ps(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join(``)===r.join(``)}catch{return!1}}function Fs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Is(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var Ls=Pi;function Rs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function zs(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in Ls))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(Rs(Ls.fetch))return!0;let e=!1,t=Ls.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Rs(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){Ii&&W.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Bs(e,t){let n=`fetch`;Yi(n,e),Xi(n,()=>function(e,t=!1){(!t||zs())&&wa(Pi,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=function(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Hs(t),method:Vs(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:Hs(t),method:Vs(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*Pa(),virtualError:r};return e||Zi(`fetch`,{...o}),t.apply(Pi,n).then(async t=>(e?e(t):Zi(`fetch`,{...o,endTimestamp:1e3*Pa(),response:t}),t),e=>{throw Zi(`fetch`,{...o,endTimestamp:1e3*Pa(),error:e}),aa(e)&&e.stack===void 0&&(e.stack=r.stack,Ta(e,`framesToPop`,1)),e})}})}(void 0,t))}function Vs(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Hs(e){return typeof e==`string`?e:e?Vs(e,`url`)?e.url:e.toString?e.toString():``:``}var Us=Pi,Ws=Pi,Gs=0;function Ks(){return Gs>0}function qs(e,t={}){if(!function(e){return typeof e==`function`}(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Da(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>qs(e,t));return e.apply(this,r)}catch(e){throw Gs++,setTimeout(()=>{Gs--}),function(...e){let t=ao(na());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{var i,a;r.addEventProcessor(e=>(t.mechanism&&(Ra(e,void 0,void 0),za(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,oo().captureException(i,Zo(a))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ea(n,e),Ta(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var Js=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Ys(e,t){let n=Qs(e,t),r={type:tc(t),value:nc(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Xs(e,t,n,r){let i=co(),a=i&&i.getOptions().normalizeDepth,o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:jo(t,a)};if(o)return{exception:{values:[Ys(e,o)]},extra:s};let c={exception:{values:[{type:pa(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:ac(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=Qs(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Zs(e,t){return{exception:{values:[Ys(e,t)]}}}function Qs(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&$s.test(e.message)?1:0}(t),i=function(e){return typeof e.framesToPop==`number`?e.framesToPop:0}(t);try{return e(n,r,i)}catch{}return[]}var $s=/Minified React error #\d+;/i;function ec(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function tc(e){let t=e&&e.name;return!t&&ec(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function nc(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:ec(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function rc(e,t,n,r,i){let a;if(sa(t)&&t.error)return Zs(e,t.error);if(ca(t)||oa(t,`DOMException`)){let i=t;if(`stack`in t)a=Zs(e,t);else{let t=i.name||(ca(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=ic(e,o,n,r),Ra(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return aa(t)?Zs(e,t):fa(t)||pa(t)?(a=Xs(e,t,n,i),za(a,{synthetic:!0}),a):(a=ic(e,t,n,r),Ra(a,`${t}`,void 0),za(a,{synthetic:!0}),a)}function ic(e,t,n,r){let i={};if(r&&n){let r=Qs(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),za(i,{synthetic:!0})}if(ua(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function ac(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(Oa(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return ba(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:ba(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return sa(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:pa(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var oc=class extends us{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:Ni})),version:Ni},e._metadata=i})(t,`browser`,[`browser`],Ws.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&Ws.document&&Ws.document.addEventListener(`visibilitychange`,()=>{Ws.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=rc(e,t,n&&n.syntheticException||void 0,r);return za(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),Ha(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=ic(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Ha(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Js&&W.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return No({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Do(r)}},[function(e){return[{type:`user_report`},e]}(e)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}},sc=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,cc=Pi,lc,uc,dc,fc;function pc(){if(!cc.document)return;let e=Zi.bind(null,`dom`),t=mc(e,!0);cc.document.addEventListener(`click`,t,!1),cc.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=cc[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(wa(r,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=mc(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),wa(r,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function mc(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return e===`keypress`&&(!t||!t.tagName||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)}(n.type,r))return;Ta(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Ta(r,`_sentryId`,Fa());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==uc)return!1;try{if(!e.target||e.target._sentryId!==dc)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),uc=n.type,dc=r?r._sentryId:void 0),clearTimeout(lc),lc=cc.setTimeout(()=>{dc=void 0,uc=void 0},1e3)}}function hc(e){let t=`history`;Yi(t,e),Xi(t,gc)}function gc(){if(!function(){let e=Us.chrome,t=e&&e.app&&e.app.runtime,n=`history`in Us&&!!Us.history.pushState&&!!Us.history.replaceState;return!t&&n}())return;let e=cc.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=fc,t=String(n);fc=t,Zi(`history`,{from:e,to:t})}return e.apply(this,t)}}cc.onpopstate=function(...t){let n=cc.location.href,r=fc;if(fc=n,Zi(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},wa(cc.history,`pushState`,t),wa(cc.history,`replaceState`,t)}var _c={};function vc(e){_c[e]=void 0}var yc=`__sentry_xhr_v3__`;function bc(){if(!cc.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*Pa(),a=la(n[0])?n[0].toUpperCase():void 0,o=function(e){if(la(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[yc]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[yc];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Zi(`xhr`,{endTimestamp:1e3*Pa(),startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[yc];return a&&la(r)&&la(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[yc];return r&&(n[0]!==void 0&&(r.body=n[0]),Zi(`xhr`,{startTimestamp:1e3*Pa(),xhr:t})),e.apply(t,n)}})}function xc(e,t=function(e){let t=_c[e];if(t)return t;let n=cc[e];if(Rs(n))return _c[e]=n.bind(cc);let r=cc.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){sc&&W.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(_c[e]=n.bind(cc))}(`fetch`)){let n=0,r=0;return hs(e,function(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return vc(`fetch`),Ua(`No fetch implementation available`);try{return t(e.url,o).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}}))}catch(e){return vc(`fetch`),n-=a,r--,Ua(e)}})}function Sc(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?Bi:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Cc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,wc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Tc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ec=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Dc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Oc=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
@@ -52,12 +52,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
52
52
|
border: 0;
|
|
53
53
|
pointer-events: none;
|
|
54
54
|
`,document.body.appendChild(n),t.layout||=`custom-v1`,e.wrap(n,t)}},{key:`getCallInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return e?Ud[e]:Object.values(Ud)[0]}}]);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,O,k,A,te,ne,re,ie,j,ae,oe,se}();function of(e){if(e.extension){if(typeof e.extension!=`string`)throw Error(`Error starting dial out: extension must be a string`);if(e.extension.length>20)throw Error(`Error starting dial out: extension length must be less than or equal to 20`)}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!=`number`)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be a number`);if(e.waitBeforeExtensionDialSec>60)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60`);if(!e.extension)throw Error(`Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension`)}}function sf(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn(`MediaStreamTrack found in props or cache.`,r),n[r]=ru;else if(r===`dailyConfig`){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=a,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function cf(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==`joined-meeting`){var n=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} only supported after join.`;throw t&&(n+=` ${t}`),console.error(n),Error(n)}}function lf(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function uf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`This daily-js method`,r=arguments.length>3?arguments[3]:void 0;if(lf(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function df(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`,n=arguments.length>2?arguments[2]:void 0;if(!e){var r=`${t}${arguments.length>3&&arguments[3]!==void 0&&arguments[3]?` requires preAuth() or startCamera() to initialize call state.`:` requires preAuth(), startCamera(), or join() to initialize call state.`}`;throw n&&(r+=` ${n}`),console.error(r),Error(r)}}function ff(e){if(e){var t=`A pre-call quality test is in progress. Please try ${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} again once testing has completed. Use stopTestCallQuality() to end it early.`;throw console.error(t),Error(t)}}function pf(e){if(!e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported on custom callObject instances`;throw console.error(t),Error(t)}}function mf(e){if(e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported as part of Daily's Prebuilt`;throw console.error(t),Error(t)}}function hf(){if(mu())throw Error(`This daily-js method is not currently supported in React Native`)}function gf(){if(!mu())throw Error(`This daily-js method is only supported in React Native`)}function _f(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),oi(JSON.parse(t),e)||console.warn(`The userData provided will be modified when serialized.`)}catch(e){throw Error(`userData must be serializable to JSON: ${e}`)}if(t.length>4096)throw Error(`userData is too large (${t.length} characters). Maximum size suppported is 4096.`);return!0}function vf(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=[`local`];return n||t.push(`*`),e&&!t.includes(e)},i=function(e){return!!(e.layer===void 0||Number.isInteger(e.layer)&&e.layer>=0||e.layer===`inherit`)},a=function(e){return!!e&&!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=Qr(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function yf(e){if(Br(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Qr(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(Br(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Qr(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!Sf(u))return!1;break;case`settings`:if(!Cf(u))return!1;break;default:return!1}}break;case`audio`:if(Br(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Qr(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!xf(h))return!1;break;case`settings`:if(!Cf(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function bf(e,t,n){var r,i=[];e.video&&e.video.processor&&(Su((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(Cu()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push(`audio`))),i.length>0&&console.error(`Ignoring settings for browser- or platform-unsupported input processor(s): ${i.join(`, `)}`),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:ru}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:ru}):delete n.videoTrack)}function xf(e){if(mu())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&Br(e)===`object`&&(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> audio -> processor : ${t}`),delete e[t]}),!!function(e){return typeof e==`string`?Object.values(au).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function Sf(e){if(mu())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||Br(e)!==`object`||!function(e){return typeof e==`string`?Object.values(iu).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(Br(e.config)!==`object`||!function(e,t){var n=Object.keys(t);if(n.length===0)return!0;var r=`invalid object in inputSettings -> video -> processor -> config`;switch(e){case iu.BGBLUR:return n.length>1||n[0]!==`strength`?(console.error(r),!1):!(typeof t.strength!=`number`||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(`${r}; expected: {0 < strength <= 1}, got: ${t.strength}`),!1);case iu.BGIMAGE:return!(t.source!==void 0&&!function(e){return e.source==="default"?(e.type=`default`,!0):e.source instanceof ArrayBuffer?!0:ji(e.source)?(e.type=`url`,!!function(e){var t=new URL(e),n=t.pathname;if(t.protocol===`data:`)try{var r=n.substring(n.indexOf(`:`)+1,n.indexOf(`;`)).split(`/`)[1];return lu.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return lu.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${lu.join(`, `)}]`),!1)):(t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error(`invalid image selection; must be an int, > 0, <= 10`),!1):(e.type=`daily-preselect`,!0));var t,n}(t));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> video -> processor : ${t}`),delete e[t]}),!0)}function Cf(e){return Br(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function wf(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(iu).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(au).join(` | `)} ] } } }`}function Tf(e){return`receiveSettings must be of the form { [<remote participant id> | ${Qc}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function Ef(){return`customIntegrations should be an object of type ${JSON.stringify($d)}.`}function Df(e){if(e&&Br(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(Qd)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Qr(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Qr(a[i],2),s=o[0],c=o[1],l=Qd.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!ji(c))return console.error(`customTrayButton ${s} should be a url.`),!1;break;case`visualState`:if(![`default`,`sidebar-open`,`active`].includes(c))return console.error(`customTrayButton ${s} should be ${l}. Got: ${c}`),!1;break;default:if(Br(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function Of(e){if(!e||e&&Br(e)!==`object`||Array.isArray(e))return console.error(Ef()),!1;for(var t=function(e){return`${e} should be ${$d.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Qr(i[r],1)[0];if(!(`label`in e[a]))return n(a,`label is required`),!1;if(!(`location`in e[a]))return n(a,`location is required`),!1;if(!(`src`in e[a])&&!(`srcdoc`in e[a]))return n(a,`src or srcdoc is required`),!1;for(var o=0,s=Object.entries(e[a]);o<s.length;o++){var c=Qr(s[o],2),l=c[0],u=c[1];switch(l){case`allow`:case`csp`:case`name`:case`referrerPolicy`:case`sandbox`:if(typeof u!=`string`)return n(a,t(l)),!1;break;case`iconURL`:if(!ji(u))return n(a,`${l} should be a url`),!1;break;case`src`:if(`srcdoc`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(!ji(u))return n(a,`src "${u}" is not a valid URL`),!1;break;case`srcdoc`:if(`src`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(typeof u!=`string`)return n(a,t(l)),!1;break;case`location`:if(![`main`,`sidebar`].includes(u))return n(a,t(l)),!1;break;case`controlledBy`:if(u!==`*`&&u!==`owners`&&(!Array.isArray(u)||u.some(function(e){return typeof e!=`string`})))return n(a,t(l)),!1;break;case`shared`:if((!Array.isArray(u)||u.some(function(e){return typeof e!=`string`}))&&u!==`owners`&&typeof u!=`boolean`)return n(a,t(l)),!1;break;default:if(!$d.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function kf(e,t){if(t===void 0)return!1;switch(Br(t)){case`string`:return Br(e)===t;case`object`:if(Br(e)!==`object`)return!1;for(var n in e)if(!kf(e[n],t[n]))return!1;return!0;default:return!1}}function Af(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw Error(`${t}() requires a sessionId and toEndPoint`);if(typeof n!=`string`||typeof r!=`string`)throw Error(`Invalid paramater: sessionId and toEndPoint must be of type string`);if(a&&!r.startsWith(`sip:`))throw Error(`"toEndPoint" must be a "sip" address`);if(!r.startsWith(`sip:`)&&!r.startsWith(`+`))throw Error(`toEndPoint: ${r} must starts with either "sip:" or "+"`);if(i&&typeof i!=`string`)throw Error(`callerId must be of type string`);if(i&&!r.startsWith(`+`))throw Error(`callerId is only valid when transferring to a PSTN number`)}function jf(e){if(Br(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(ou).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(ou));if(e.volume){if(typeof e.volume!=`number`)throw Error(`RemoteMediaPlayerSettings.volume: must be "number" type`);if(e.volume<0||e.volume>2)throw Error(`RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0`)}}function Mf(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function Nf(e,t){return e&&!t&&delete e.data,e}function Pf(e,t,n){if(e.blocked?.byDeviceInUse)return`in-use`;if(e.blocked?.byDeviceMissing)return`not-found`;if(e.blocked?.byPermissions||n===`denied`&&e.persistentTrack?.readyState!==`live`)return`blocked`;if((t===`idle`||t===`pending`)&&!e.persistentTrack){if(n===`prompt`&&e.state===`interrupted`)return`pending`;if(e.off?.byUser)return`idle`}return`granted`}function Ff(e,t,n,r){return e.filter(e=>e.kind===t&&e.deviceId!==``).map(e=>{let t=r.find(t=>t.device.deviceId===e.deviceId);return{device:e,selected:`deviceId`in n?n.deviceId===e.deviceId:!!t?.selected,state:t?.state??`granted`}}).sort((e,t)=>e.device.deviceId===t.device.deviceId?0:e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label))}function If(e,t){let n=Lt(void 0),r=Lt(void 0),i=Lt(`idle`),a=Lt(`idle`),o=Lt([]),s=Lt([]),c=Lt([]),l=0,u=0,d=!1;async function f(){let t=++l;if(!navigator.mediaDevices?.getUserMedia||!navigator.mediaDevices?.enumerateDevices)wt(()=>{i.value=`not-supported`,a.value=`not-supported`});else try{let{devices:n}=await e.enumerateDevices(),{camera:r,mic:i,speaker:a}=await e.getInputDevices();if(d||t!==l)return;wt(()=>{o.value=Ff(n,`videoinput`,r,o.peek()),s.value=Ff(n,`audioinput`,i,s.peek()),c.value=Ff(n,`audiooutput`,a,c.peek())})}catch(e){if(d||t!==l)return;console.warn(`Unable to enumerate Daily devices`,e),wt(()=>{i.value=`not-supported`,a.value=`not-supported`})}}async function p(e){try{return(await navigator.permissions.query({name:e})).state}catch{return`prompt`}}async function m(){let t=++u,c=e.participants().local;if(!c)return;let[l,m]=await Promise.all([p(`camera`),p(`microphone`)]);d||t!==u||(wt(()=>{i.value=Pf({...c.tracks.video,persistentTrack:c.tracks.video.persistentTrack??r.peek()},i.peek(),l),a.value=Pf({...c.tracks.audio,persistentTrack:c.tracks.audio.persistentTrack??n.peek()},a.peek(),m),o.value=o.peek().map(e=>e.selected?{...e,state:i.peek()===`in-use`?`in-use`:`granted`}:e),s.value=s.peek().map(e=>e.selected?{...e,state:a.peek()===`in-use`?`in-use`:`granted`}:e)}),await f())}return t(`joined-meeting`,()=>{m()}),t(`participant-updated`,e=>{e.participant.local&&m()}),t(`available-devices-updated`,()=>{f()}),t(`selected-devices-updated`,()=>{f()}),t(`started-camera`,()=>{wt(()=>{i.value=`granted`,a.value=`granted`}),m()}),t(`camera-error`,({error:e})=>{++u,wt(()=>{switch(e.type){case`cam-in-use`:i.value=`in-use`;break;case`mic-in-use`:a.value=`in-use`;break;case`cam-mic-in-use`:i.value=a.value=`in-use`;break;case`not-found`:e.missingMedia.includes(`video`)&&(i.value=`not-found`),e.missingMedia.includes(`audio`)&&(a.value=`not-found`);break;case`permissions`:e.blockedMedia.includes(`video`)&&(i.value=`blocked`),e.blockedMedia.includes(`audio`)&&(a.value=`blocked`);break;case`constraints`:i.value=a.value=e.reason===`invalid`?`constraints-invalid`:`constraints-none-specified`;break;case`undefined-mediadevices`:i.value=a.value=`undefined-mediadevices`;break;default:i.value=a.value=`unknown`}})}),e.participants().local&&m(),{camState:i,micState:a,providedAudioTrack:n,providedVideoTrack:r,setProvidedTracks(e,t){wt(()=>{n.value=e,r.value=t})},cameras:o,microphones:s,speakers:c,refreshDevices:f,async setCamera(t){await e.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t}),r.value=void 0},async setMicrophone(t){await e.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null}),n.value=void 0},async setSpeaker(t){await e.setOutputDeviceAsync({outputDeviceId:t})},reset(){++l,++u,wt(()=>{n.value=r.value=void 0,i.value=a.value=`idle`,o.value=[],s.value=[],c.value=[]})},dispose(){d=!0,++l,++u}}}function Lf(e){return{...e,tracks:{...e.tracks,audio:{...e.tracks.audio},video:{...e.tracks.video},screenAudio:{...e.tracks.screenAudio},screenVideo:{...e.tracks.screenVideo}}}}function Rf(e){let t=Lt(e.meetingState()),n=Lt({}),r=Lt(e.getActiveSpeaker()?.peerId??null),i=[],a=!1;function o(t,n){e.on(t,n);let r=()=>{e.off(t,n)};return i.push(r),r}function s(){n.value=Object.fromEntries(Object.values(e.participants()).filter(Boolean).map(e=>[e.session_id,Lf(e)]))}let c=Ht(()=>Object.values(n.value).find(e=>e.local)?.session_id??null),l=If(e,o);for(let n of[`loading`,`loaded`,`joining-meeting`,`joined-meeting`,`left-meeting`,`error`])o(n,()=>{t.value=e.meetingState()});for(let e of[`participant-joined`,`participant-updated`])o(e,({participant:e})=>{n.value={...n.peek(),[e.session_id]:Lf(e)}});o(`started-camera`,s),o(`joined-meeting`,s),o(`participant-left`,({participant:e})=>{let t={...n.peek()};delete t[e.session_id],n.value=t,r.peek()===e.session_id&&(r.value=null)}),o(`active-speaker-change`,({activeSpeaker:e})=>{r.value=e.peerId??null});function u(){wt(()=>{n.value={},r.value=null,l.reset()})}return o(`left-meeting`,u),o(`call-instance-destroyed`,()=>{u(),t.value=`new`}),s(),{call:e,meetingState:t,participants:n,localSessionId:c,activeSpeakerId:r,devices:l,dispose(){a||(a=!0,i.forEach(e=>e()),l.dispose())}}}var zf=`default`in af?af.default:af,Bf=fn(`Daily`),Vf=class extends Error{reason;constructor(e){super(e===`insecure_context`?`Conversations need a secure (HTTPS) page`:`This browser cannot run a conversation`),this.reason=e,this.name=`CallUnsupportedError`}};function Hf(){return globalThis.isSecureContext===!1?`insecure_context`:typeof RTCPeerConnection>`u`||typeof RTCRtpTransceiver>`u`?`unsupported`:zf.supportedBrowser().supported?`supported`:`unsupported`}var Uf=xe(null),Wf=xe(`supported`);function Gf({children:e,callObject:t}){let[n,r]=M(null),[i]=M(()=>{let e=t??zf.getCallInstance();return e&&!e.isDestroyed()?`supported`:Hf()});return N(()=>{i===`insecure_context`?Bf.error(`This page is not served over HTTPS, so the browser blocks WebRTC and no conversation can start. Serve it over HTTPS; http://localhost works for development.`):i===`unsupported`&&Bf.warn(`This browser cannot run WebRTC, so no conversation can start.`)},[i]),Xe(()=>{if(i!==`supported`)return;let e=!1,n;function a(){if(e)return;let i=t??zf.getCallInstance(),o=i&&!i.isDestroyed()?i:zf.createCallObject(),s=Rf(o),c=()=>{n?.(),r(null),t||queueMicrotask(a)};o.on(`call-instance-destroyed`,c),n=()=>{s.dispose(),o.off(`call-instance-destroyed`,c)},r({call:o,store:s})}return a(),()=>{e=!0,n?.()}},[t,i]),R(Wf.Provider,{value:i,children:R(Uf.Provider,{value:n,children:n||i!==`supported`?e:null})})}function Kf(){return L(Uf)}function qf(){return L(Wf)}var Jf=new WeakMap;function Yf(e,t,n,r){let i=Jf.get(e)??new Map;Jf.set(e,i);let a=t?`local`:`remote`,o=i.get(a);if(!o){let r=t?!e.isLocalAudioLevelObserverRunning():!e.isRemoteParticipantsAudioLevelObserverRunning(),s=()=>{t?e.stopLocalAudioLevelObserver():e.stopRemoteParticipantsAudioLevelObserver()};async function c(){r&&(t?await e.startLocalAudioLevelObserver(n):await e.startRemoteParticipantsAudioLevelObserver(n),!i.has(a)&&!e.isDestroyed()&&s())}o={consumers:0,owned:r,ready:c(),stop:s},i.set(a,o)}o.consumers++;let s=!0;return o.ready.catch(e=>{s&&r(e)}),()=>{s=!1,!(--o.consumers>0)&&(i.delete(a),o.owned&&!e.isDestroyed()&&o.stop())}}function Xf(){return Kf()?.call??null}function Zf(){return Kf()?.store.meetingState.value??`new`}function Qf(){return Kf()?.store.localSessionId.value??null}function $f(){return Kf()?.store.activeSpeakerId.value??null}function ep(e,t){let n=Xf(),r=P(t);r.current=t,Xe(()=>{if(!n||n.isDestroyed())return;let t=e=>r.current(e);return n.on(e,t),()=>{n.off(e,t)}},[n,e])}function tp({onAppMessage:e}={}){let t=Xf();return ep(`app-message`,t=>e?.(t)),I((e,n=`*`)=>{t?.sendAppMessage(e,n)},[t])}function np({filter:e}){let t=Kf()?.store;return F(()=>{let n=[];return Ht(()=>{let r=Object.values(t?.participants.value??{}).filter(e).map(e=>e.session_id);return r.length===n.length&&r.every((e,t)=>e===n[t])?n:(n=r,r)})},[t,e]).value}function rp(e,t=`video`){let n=Kf()?.store,r=F(()=>Ht(()=>n?.participants.value[e??``]?.tracks[t]),[n,e,t]).value;return r?{...r,isOff:r.state===`off`||r.state===`blocked`}:{state:`off`,subscribed:!1,isOff:!0}}function ip(e){return rp(e,`video`)}function ap(e){return rp(e,`audio`)}function op(e){return rp(e,`screenVideo`)}function sp(){let e=Kf()?.store.devices,t=e?.cameras.value??[],n=e?.microphones.value??[],r=e?.speakers.value??[];return{cameras:t,microphones:n,speakers:r,providedAudioTrack:e?.providedAudioTrack.value,providedVideoTrack:e?.providedVideoTrack.value,camState:e?.camState.value??`idle`,micState:e?.micState.value??`idle`,currentCam:t.find(e=>e.selected),currentMic:n.find(e=>e.selected),currentSpeaker:r.find(e=>e.selected),setCamera:I(async t=>{await e?.setCamera(t)},[e]),setMicrophone:I(async t=>{await e?.setMicrophone(t)},[e]),setSpeaker:I(async t=>{await e?.setSpeaker(t)},[e])}}function cp(e,t,n,r){let i=Xf(),a=Qf(),o=!!e&&e===a,s=P(n);s.current=n,ep(`local-audio-level`,n=>{e&&o&&t(n.audioLevel)}),ep(`remote-participants-audio-level`,n=>{e&&!o&&t(n.participantsAudioLevel[e]??0)}),Xe(()=>{if(i&&e&&!i.isDestroyed())return Yf(i,o,r,e=>{s.current?s.current(`Audio level observer not supported in this browser`):console.warn(`Unable to start audio level observer`,e)})},[i,e,o,r])}function lp(e,t){for(var n in t)e[n]=t[n];return e}function up(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function dp(e,t){this.props=e,this.context=t}function fp(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:up(this.props,e)}function r(t){return this.shouldComponentUpdate=n,T(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(dp.prototype=new ee).isPureReactComponent=!0,dp.prototype.shouldComponentUpdate=function(e,t){return up(this.props,e)||up(this.state,t)};var pp=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),pp&&pp(e)};var mp=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function hp(e){function t(t){var n=lp({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=mp,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var gp=i.__e;i.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k||[]),i.__c(e,t)}gp(e,t,n,r)};var _p=i.unmount;function vp(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=lp({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return vp(e,t,n)})),e}function yp(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return yp(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function bp(){this.__u=0,this.o=null,this.__b=null}function xp(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Sp(){this.i=null,this.l=null}i.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),_p&&_p(e)},(bp.prototype=new ee).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=xp(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=yp(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},bp.prototype.componentWillUnmount=function(){this.o=[]},bp.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=vp(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&T(D,null,e.fallback);return i&&(i.__u&=-33),[T(D,null,t.__a?null:e.children),i]};var Cp=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function wp(e){return this.getChildContext=function(){return e.context},e.children}function Tp(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){ve(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}ve(T(wp,{context:t.context},e.__v),t.v)}function Ep(e,t){var n=T(Tp,{__v:e,h:t});return n.containerInfo=t,n}(Sp.prototype=new ee).__a=function(e){var t=this,n=xp(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Cp(t,e,r)):i()};n?n(a):a()}},Sp.prototype.render=function(e){this.i=null,this.l=new Map;var t=ae(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Sp.prototype.componentDidUpdate=Sp.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Cp(e,n,t)})};var Dp=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Op=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,kp=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ap=/[A-Z0-9]/g,jp=typeof document<`u`,Mp=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};ee.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(ee.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Np=i.event;i.event=function(e){return Np&&(e=Np(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Pp={configurable:!0,get:function(){return this.class}},Fp=i.vnode;i.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||jp&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||Mp(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:kp.test(a)&&(a=s):s=a=`oninput`:i&&Op.test(a)?a=a.replace(Ap,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=ae(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=ae(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Pp)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Dp,Fp&&Fp(e)};var Ip=i.__r;i.__r=function(e){Ip&&Ip(e),e.__c};var Lp=i.diffed;i.diffed=function(e){Lp&&Lp(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value)};function Rp(e,t){return F(()=>n=>{for(let r of[e,t])typeof r==`function`?r(n):r&&(r.current=n)},[e,t])}var zp=fp(hp(function({automirror:e,fit:t=`contain`,mirror:n,onResize:r,onPlayFailed:i,playableStyle:a={},sessionId:o,style:s={},type:c=`video`,...l},u){let d=Qf()===o,f=c===`screenVideo`,p=d&&c===`video`,m=P(null),h=Rp(m,u),g=P(!1),_=P(i);_.current=i;let v=rp(o,c),y=v.persistentTrack,b=p||f||!v.isOff,x=v.subscribed,S=F(()=>{if(typeof n==`boolean`)return n;if(!e)return!1;if(!y)return p;let t=y.getSettings();return`facingMode`in t?p&&t.facingMode===`user`:p},[e,p,n,y]);return N(()=>{g.current=S},[S]),N(function(){let e=m.current;if(!e)return;let t=()=>{let t=e.srcObject;if(!t)return;let n=e.play();n!==void 0&&n.then(()=>{e.srcObject===t&&(e.controls=!1)}).catch(n=>{e.srcObject===t&&(e.controls=!0,console.warn(`Failed to play video`,n),_.current?.(n))})},n=()=>{e.paused&&t()},r=()=>{e.style.transform=`scale(1)`},i=()=>{e.style.transform=g.current?`scale(-1, 1)`:``,e.paused&&t()},a=()=>{document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),()=>{e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}},[]),N(function(){let e=m.current;if(e&&y){if(typeof MediaStream>`u`)console.warn(`MediaStream API not available. Can't setup ${c} for ${o}`);else return e.srcObject=new MediaStream([y]),e.load(),()=>{e.srcObject=null,e.load()}}},[o,c,y,y?.id]),N(function(){let e=m.current;if(!r||!e)return;let t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let e=m.current;if(!e||document.hidden)return;let t=e.videoWidth,n=e.videoHeight;t&&n&&r?.({aspectRatio:t/n,height:n,width:t})})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),()=>{t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[r]),R(`video`,{autoPlay:!0,muted:!0,playsInline:!0,ref:h,"data-local":d,"data-mirrored":S||void 0,"data-playable":b||void 0,"data-session-id":o,"data-subscribed":x,"data-video-type":c,style:Object.assign({objectFit:t,transform:S?`scale(-1, 1)`:``},s,b?a:{}),...l})}));zp.displayName=`DailyVideo`;var Bp=fp(hp(({onPlayFailed:e,sessionId:t,type:n=`audio`,...r},i)=>{let a=P(null),o=rp(t,n),s=Rp(a,i),c=o.subscribed,l=P(e);return l.current=e,N(()=>{let e=a.current;if(!e||!o?.persistentTrack)return;if(typeof MediaStream>`u`){console.warn(`MediaStream API not available. Can't setup ${n} for ${t}`),l.current?.({sessionId:t,target:e,type:n,message:`MediaStream API not available`,name:`MediaStream API not available`});return}let r=!1,i=()=>{e.play().catch(i=>{if(r)return;let a={sessionId:t,target:e,type:n,message:i instanceof Error?i.message:String(i),name:i instanceof Error?i.name:void 0};l.current?l.current(a):console.warn(`Failed to play Daily audio`,i)})};return e.addEventListener(`loadedmetadata`,i),e.srcObject=new MediaStream([o.persistentTrack]),e.load(),()=>{r=!0,e.removeEventListener(`loadedmetadata`,i),e.pause(),e.srcObject=null}},[o.persistentTrack,o.persistentTrack?.id,t,n]),ep(`participant-left`,I(e=>{let n=a.current;e.participant.session_id===t&&n&&(n.pause(),n.srcObject=null)},[t])),ep(`left-meeting`,I(()=>{let e=a.current;e&&(e.pause(),e.srcObject=null)},[])),R(`audio`,{autoPlay:!0,ref:s,...r,"data-session-id":t,"data-audio-type":n,"data-subscribed":c})}));Bp.displayName=`DailyAudioTrack`;function Vp(e,t){if(e?.enabled===!1)return!1;if(!e?.track)return!0;if(e.track.readyState!==`live`||e.track.kind!==t)throw new DOMException(`The selected media track is no longer available`,`NotFoundError`);return!1}function Hp(e){return!e?.deviceId||{deviceId:{exact:e.deviceId}}}var Up=class extends Error{device;constructor(e,t){super(e instanceof Error?e.message:`Unable to open the selected media devices.`),this.device=t,this.name=e instanceof Error?e.name:`MEDIA_ERROR`}};async function Wp(e){let t=[],n=`microphone`;try{for(let n of[e.microphone,e.camera])n?.track&&(n.track=n.track.clone(),t.push(n.track));let r=Vp(e.microphone,`audio`),i=Vp(e.camera,`video`);if(!r&&!i)return t;if(n=r?`microphone`:`camera`,!navigator.mediaDevices?.getUserMedia)throw new DOMException(`Media capture is unavailable on this page`,`NotSupportedError`);let a=await navigator.mediaDevices.getUserMedia({audio:r&&Hp(e.microphone),video:i&&Hp(e.camera)});return t.push(...a.getTracks()),r&&(e.microphone={...e.microphone,track:a.getTracks().find(e=>e.kind===`audio`)}),i&&(e.camera={...e.camera,track:a.getTracks().find(e=>e.kind===`video`)}),t}catch(e){throw Jp(t),new Up(e,n)}}function Gp(e,t){if(!e.devices)return e;let n=e=>{if(!e?.track)return e;let n=e.track.clone();return t.push(n),{...e,track:n}};return{...e,devices:{microphone:n(e.devices.microphone),camera:n(e.devices.camera)}}}function Kp(e,t,n){if(!e?.track)return e?.deviceId;if(e.track.readyState!==`live`||e.track.kind!==t)throw new DOMException(`The selected media track is no longer available`,`NotFoundError`);let r=e.track.clone();return n.push(r),r}function qp(e,t,n,r){if(t)return{url:e,startAudioOff:!0,startVideoOff:!0};let i=Kp(n?.microphone,`audio`,r),a=Kp(n?.camera,`video`,r);return{url:e,...n?.microphone&&{...i!==void 0&&{audioSource:i},startAudioOff:n.microphone.enabled===!1},...n?.camera&&{...a!==void 0&&{videoSource:a},startVideoOff:n.camera.enabled===!1}}}function Jp(e){for(let t of e.splice(0))t.stop()}function Yp(e,t){if(!t)return e;let n=()=>t.reason??new DOMException(`The operation was aborted`,`AbortError`);return t.aborted?(e.catch(()=>void 0),Promise.reject(n())):new Promise((r,i)=>{let a=()=>i(n());t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{t.removeEventListener(`abort`,a),r(e)},e=>{t.removeEventListener(`abort`,a),i(e)})})}var Xp=class extends Error{constructor(){super(`Microphone blocked by the browser at join`),this.name=`MicrophoneBlockedError`}};function Zp(e){return e instanceof Xp}var Qp=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function $p(e){return e===401||e===403?`forbidden`:e===402?`limit_exceeded`:e===423?`busy`:e===429?`rate_limited`:e===409?`concurrency`:e===503?`unavailable`:e>=500?`server`:`unknown`}function em(e){if(!e)return;let t=e.get(`Retry-After`);if(!t)return;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&n>=0)return n;let r=Date.parse(t);if(!Number.isNaN(r)){let e=Math.floor((r-Date.now())/1e3);return e>0?e:0}}function tm(e){if(e instanceof Mn)return{kind:`unavailable`,raw:e.message,retryable:e.code===`security_response_invalid`};if(e instanceof Error&&e.name===`TimeoutError`)return{kind:`network`,raw:e.message,retryable:!0};if(e instanceof vn){let{code:t}=Er(e),n=t===`start_token_invalid`||t===`security_session_invalid`?`unavailable`:$p(e.status);return{kind:n,status:e.status,raw:e.body,retryable:Qp.has(n),retryAfterSec:em(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var nm=new Set([`Captcha token required`,`Captcha verification failed`]);function rm(e){if(!(e instanceof vn)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function im(e){return rm(e)===`Captcha token required`}function am(e){return e instanceof vn&&e.status===426&&Er(e).code===`deployment_security_required`}function om(e){let t=rm(e);return t!==null&&nm.has(t)}var sm=`Origin not allowed`;function cm(e){return rm(e)===sm}function lm(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}function um(e,t){let{code:n}=Er(e);return n===`security_unavailable`||n===`captcha_unavailable`||n===`deployment_security_required`||n===`start_token_invalid`||n===`security_session_invalid`||n===`unsupported_security_version`||n===`security_response_invalid`?`error`:lm(t)}var dm=1e4,fm=12e4;function pm(e){return e.reason??new DOMException(`The operation was aborted`,`AbortError`)}function mm(e){if(e?.aborted)throw pm(e)}function hm(e,t){return t?new Promise((n,r)=>{let i=()=>{clearTimeout(a),r(pm(t))},a=setTimeout(()=>{t.removeEventListener(`abort`,i),n()},e);t.aborted?i():t.addEventListener(`abort`,i,{once:!0})}):new Promise(t=>setTimeout(t,e))}async function gm(e,t){let n=(e.retryAt??0)-Date.now();n>0&&await hm(n,t)}function _m(e,t){let{status:n,retryAfterSec:r}=tm(t);if(n!==429&&n!==503||r===void 0)return;let i=Math.min(r*1e3,fm);e.retryAt=Math.max(e.retryAt??0,Date.now()+i)}function vm(e,t){if(!e||typeof e!=`object`||!(`version`in e)||e.version!==1||!(`start_token`in e)||typeof e.start_token!=`string`||!/^dst1_[A-Za-z0-9_-]{43}$/.test(e.start_token))throw new Mn(`security_response_invalid`);if(!t)return{token:e.start_token};if(!(`security_session`in e)||typeof e.security_session!=`string`||!/^dss1_[A-Za-z0-9_-]{43}$/.test(e.security_session)||!(`session_expires_in`in e)||typeof e.session_expires_in!=`number`||!Number.isSafeInteger(e.session_expires_in)||e.session_expires_in<=0)throw new Mn(`security_response_invalid`);return{token:e.start_token,session:{token:e.security_session,expiresAt:Date.now()+e.session_expires_in*1e3}}}async function ym(e,t,n,r,i,a){let o=new AbortController,s=()=>o.abort(i?.signal?.reason);i?.signal?.aborted?s():i?.signal?.addEventListener(`abort`,s,{once:!0});let c=setTimeout(()=>o.abort(new DOMException(`Security check timed out`,`TimeoutError`)),dm);(!r||n.current&&n.current.expiresAt<=Date.now())&&(n.current=null);try{for(let i=0;i<2;i+=1){mm(o.signal);try{let i=await e.post(`/v2/deployments/${t}/start-token`,n.current?{security_session:n.current.token}:{},{signal:o.signal}),s=a?.requestInstrumented?kr(a,{stage:`start_token`,outcome:`failed`,operation:`start_token`,component:`api`,code:`security_response_invalid`,handled:!0},()=>vm(i,r)):vm(i,r);return n.current=s.session??null,s}catch(e){if(i!==0||!n.current||!(e instanceof vn)||e.status!==403||Er(e).code!==`security_session_invalid`)throw e;n.current=null}}throw new Mn(`security_response_invalid`)}finally{clearTimeout(c),i?.signal?.removeEventListener(`abort`,s)}}async function bm(e,t,n,r,i,a,o={current:null},s){await gm(o,i?.signal);try{return await xm(e,t,n,r,i,a,o,s)}catch(e){throw _m(o,e),e}}async function xm(e,t,n,r,i,a,o,s){let c=n=>(mm(i?.signal),s?.(),Or(a,`start`,()=>Sn(e,t,n)));if(!n)return c(r);if(n.version!==1)throw a?.record({stage:`start_token`,outcome:`failed`,code:`unsupported_security_version`}),new Mn(`unsupported_security_version`);for(let s=0;s<2;s+=1){mm(i?.signal);let l=await Or(a,`start_token`,()=>ym(e,t,o,n.session_ttl_seconds!==void 0,i,a));mm(i?.signal);try{return await c({...r,start_security_version:1,start_token:l.token,...l.session&&{security_session:l.session.token}})}catch(e){let t=Er(e).code;if(s!==0||!(e instanceof vn)||e.status!==403||t!==`start_token_invalid`&&t!==`security_session_invalid`)throw e;t===`security_session_invalid`&&(o.current=null),a?.record({stage:`start_token`,outcome:`retry`,code:t})}}throw new Mn(`security_response_invalid`)}var Sm=xe(null),Cm=`tavus:memory-user-id:`,wm=new Map;function Tm(e){return`${Cm}${e}`}function Em(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Dm(e){if(!e)return``;let t=Tm(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=Em();return window.localStorage.setItem(t,n),n}catch{}let n=wm.get(t);if(n)return n;let r=Em();return wm.set(t,r),r}var Om=`tavus:terms-accepted:`;function km(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function Am(e,t){return`${Om}${e}:${km(t)}`}function jm(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(Am(e,t))===`1`}catch{return!1}}function Mm(e,t){if(e&&t)try{globalThis.localStorage?.setItem(Am(e,t),`1`)}catch{}}var Nm=null;function Pm(e,t){e&&t&&(Nm={deploymentId:e,content:t})}function Fm(){Nm&&=(Mm(Nm.deploymentId,Nm.content),null)}function Im(e){return e===`user`?`user`:e===`pal`?`replica`:null}function Lm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Rm(e){if(!Lm(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!Lm(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=Im(t.role);return n?{kind:`chat-message`,sender:n===`user`?`user`:`agent`,text:t.speech}:null}if(e.event_type===`conversation.utterance.streaming`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=Im(t.role);if(!n)return null;let r=t.final===!0||t.is_interrupted===!0;return{kind:`caption-update`,text:t.speech,final:r,role:n}}return null}function zm(e,t,n=!1){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t,...n?{needs_only_chat_response:!0}:{}}}}function Bm(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function Vm(e,t){return typeof e[t]==`string`?{[t]:e[t]}:{}}function Hm(e){let t=Im(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...Bm(e,`seq`),...Bm(e,`turn_idx`)}}}function Um(e){let t=Im(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance.streaming`,event_type:`conversation.utterance.streaming`,properties:{role:t,speech:e.speech,...typeof e.final==`boolean`?{final:e.final}:{},...typeof e.is_interrupted==`boolean`?{is_interrupted:e.is_interrupted}:{},...Bm(e,`seq`)}}}function Wm(e){return typeof e.name!=`string`||typeof e.arguments!=`string`?null:{kind:`tool_call`,event_type:`conversation.tool_call`,properties:{name:e.name,arguments:e.arguments,...Vm(e,`tool_call_id`),...Bm(e,`seq`),...Bm(e,`turn_idx`)}}}function Gm(e){if(typeof e==`string`)return e;try{let t=JSON.stringify(e??{});return typeof t==`string`?t:null}catch{return null}}function Km(e){if(typeof e.name!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;if(!t)return null;let n=Gm(e.arguments);return n===null?null:{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:n,modality:t}}}function qm(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function Jm(e,t){return{kind:`speaking`,event_type:t,properties:{...Bm(e,`seq`),...Bm(e,`turn_idx`)}}}var Ym={"conversation.utterance":Hm,"conversation.utterance.streaming":Um,"conversation.tool_call":Wm,"conversation.perception_tool_call":Km,"conversation.perception_analysis":qm,"conversation.replica_started_speaking":Jm,"conversation.replica_stopped_speaking":Jm,"conversation.user_started_speaking":Jm,"conversation.user_stopped_speaking":Jm};function Xm(e){if(!Lm(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!Lm(e.properties))return null;let t=Ym[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function Zm(e){let t=Xm(e);return t?.kind===`speaking`&&t.event_type===`conversation.replica_started_speaking`}function Qm(e,t,n=!1){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:{...t.properties,...t.event_type===`conversation.respond`&&n?{needs_only_chat_response:!0}:{}}}}function $m(e,t){let n=Rm(e);return n?n.kind===`chat-message`?(t.appendChatMessage(n.sender,n.text),!0):(t.setCaption(n.text,n.final,n.role),!0):!1}function eh(e=5e3){let t=[],n=n=>{for(;t.length>0&&n-t[0].ts>e;)t.shift()};return{markSent(e){t.push({text:e,ts:Date.now()})},consumeMatch(e){n(Date.now());let r=t.findIndex(t=>t.text===e);return r!==-1&&(t.splice(r,1),!0)}}}var th=fn(`Conversation`),nh=1500;async function rh(e,t,n){try{await Yp(Promise.resolve(e?.join(t)),n)}catch(e){throw $n(e)}}function ih(e,t,n){return!t&&n?.microphone?.enabled!==!1&&e!==null}var ah=xe(null);function oh({children:e}){return R(Gf,{children:R(_h,{children:e})})}function sh(e,t,n){let{role:r,speech:i}=e.properties;if(!(r===`user`&&n.consumeMatch(i)))for(let n of t)n.onUtterance?.({...e.properties})}function ch(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function lh(e,t){for(let n of t)n.onPerception?.(e)}function uh(e,t){let n=e.event_type,r=n.startsWith(`conversation.replica`)?`replica`:`user`,i=n.endsWith(`started_speaking`)?`started`:`stopped`;for(let n of t)n.onSpeakingState?.({who:r,state:i,...e.properties})}function dh(e,t){for(let n of t)n.onMessage?.(e)}function fh(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:sh(e,t,n);return;case`tool_call`:ch(e,t);return;case`perception_tool_call`:case`perception_analysis`:lh(e,t);return;case`speaking`:uh(e,t);return;case`unknown`:dh(e,t);return}}function ph(e,t,n){let r=e;return t&&r?.conversational_context==null&&(r={...r,conversational_context:t}),n&&r?.custom_greeting==null&&(r={...r,custom_greeting:n}),r}function mh(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}function hh(e){let t=e.participants().local?.tracks.audio;return t?.state===`blocked`&&t.blocked?.byPermissions===!0}function gh(e,t){return t?e instanceof vn&&e.status===401:!1}function _h({children:e}){let{deploymentId:t,client:n,config:r,telemetry:i}=L(Pr),a=F(()=>({current:null}),[n,t]),{memoryStores:o,conversationalContext:s,customGreeting:c}=L(_t),l=Xf(),u=qf(),d=Kf()?.store.devices,f=Zf(),p=L(Sm),m=F(()=>Lt(`idle`),[]),h=F(()=>Lt(null),[]),g=F(()=>Lt(null),[]),_=F(()=>Lt([]),[]),v=F(()=>Lt(``),[]),y=F(()=>Lt(null),[]),b=F(()=>Lt(null),[]),x=F(()=>Lt(null),[]),S=F(()=>Lt(null),[]),C=P(null),w=P(null),T=F(()=>Lt(null),[]),E=P(null),D=P(null),ee=P([]),O=F(()=>eh(),[]),k=F(()=>new Set,[]),A=F(()=>Lt(`idle`),[]),te=p?.flowSignal??A,ne=I(e=>{x.value=e},[x]),re=I(e=>{S.value=e},[S]);N(()=>{if(!l?.on||!i)return;let e,t=T.subscribe(t=>{if(e?.(),e=void 0,t===null)return;let r={conversation_id:t,attempt_id:n.diagnostics?.attemptId},a=new Set,o=e=>{if(e.event===`interrupted`){if(a.has(e.type))return;a.add(e.type),i.record({...r,stage:`connection`,outcome:`degraded`,operation:`daily.connection`,component:`conversation`,code:`connection_lost`,handled:!0})}else e.event===`connected`&&a.delete(e.type)&&a.size===0&&i.record({...r,stage:`connection`,outcome:`recovered`,operation:`daily.connection`,component:`conversation`})},s=e=>i.record({...r,stage:`media`,outcome:`failed`,operation:`media.devices`,component:`media`,code:Zn(e.error?.type)??`device_error`,handled:!0}),c=e=>i.record({...r,stage:`media`,outcome:`degraded`,operation:e.type===`audio-playback-error`?`media.playback`:`media.devices`,component:`media`,code:e.type===`audio-playback-error`?`playback_error`:Zn(e.type)??`device_error`,handled:!0});l.on(`network-connection`,o),l.on(`camera-error`,s),l.on(`nonfatal-error`,c),e=()=>{l.off(`network-connection`,o),l.off(`camera-error`,s),l.off(`nonfatal-error`,c)}});return()=>{t(),e?.()}},[l,i,n,T]);let ie=I(()=>{let e=T.peek();return e!==null&&(T.value=null,h.peek()?.conversationId===e)},[T,h]);ep(`joined-meeting`,()=>{let e=T.peek();e!==null&&e===h.peek()?.conversationId&&m.peek()===`connecting`&&(m.value=`connected`,th.info(`Connected to meeting`))}),ep(`left-meeting`,()=>{ie()&&(Jp(ee.current),m.value=`ended`,Fm(),th.info(`Left meeting`))}),ep(`error`,e=>{let t=m.peek()===`connected`;ie()&&(Jp(ee.current),t&&i?.record({stage:`connection`,outcome:`failed`,operation:`daily.connection`,component:`conversation`,code:Zn(e.error?.type)??`meeting_error`,conversation_id:h.peek()?.conversationId,handled:!0}),b.value=`Meeting error`,m.value=`error`)});let j=I(()=>T.peek()===null?f===`joining-meeting`||f===`joined-meeting`:!1,[T,f]),ae=I(()=>E.current,[]);dn(()=>{let e=m.value;if(e===`connected`)for(let e of k)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of k)e.onDisconnect?.();else if(e===`error`){let e=b.peek()??`Unknown error`;for(let t of k)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),dn(()=>{let e=te.value;for(let t of k)t.onModeChange?.(e)}),tp({onAppMessage:I(e=>{$m(e?.data,{appendChatMessage(e,t){e===`user`&&O.consumeMatch(t)||(_.value=[..._.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){v.value=e,y.value=n,C.current!==null&&(clearTimeout(C.current),C.current=null),t&&(C.current=setTimeout(()=>{v.value=``,y.value=null,C.current=null},nh))}});let t=Xm(e?.data);t&&fh(t,k,O)},[_,v,y,O,k])}),N(()=>()=>{C.current!==null&&(clearTimeout(C.current),C.current=null)},[]);let oe=P(null),se=F(()=>new DOMException(`The conversation was ended before it started`,`AbortError`),[]),ce=I(()=>{if(oe.current)return!0;let e=m.peek();return e===`connecting`||e===`connected`},[m]),le=P(!1),ue=I((e=!1)=>{let t=D.current!==null&&!D.current.claimed;!e&&g.peek()===null&&!t&&i?.beginAttempt?.(),le.current=!0,w.current=null,h.value=null,_.value=[],v.value=``,y.value=null,C.current!==null&&(clearTimeout(C.current),C.current=null),(m.peek()===`ended`||m.peek()===`error`)&&(m.value=`idle`)},[h,g,m,_,v,y,i]),de=I(e=>{ce()||ue(e)},[ce,ue]),fe=I(()=>{let e=h.peek()?.conversationId??null,r=w.current;if(r?.conversationId===e)return r.promise;m.value=`disconnecting`,Jp(ee.current);let a=!1,o=e?Or(i,`end`,()=>Cn(n,t,e,{keepalive:!0}),e).catch(e=>{a=!0,th.error(`End conversation API failed`,e)}):Promise.resolve(),s;try{s=l?.leave()}catch(t){a=!0,Dr(i,t,{stage:`end`,outcome:`failed`,operation:`daily.leave`,component:`conversation`,handled:!0,conversation_id:e??void 0}),th.error(`Daily leave failed`,t)}let c=Promise.resolve(s).catch(t=>{a=!0,Dr(i,t,{stage:`end`,outcome:`failed`,operation:`daily.leave`,component:`conversation`,handled:!0,conversation_id:e??void 0}),th.error(`Daily leave failed`,t)}),u=c.then(()=>{E.current===u&&(E.current=null)});E.current=u;let d=Promise.all([o,c]).then(()=>{w.current?.promise===d&&(T.peek()===e&&(T.value=null),m.value=`ended`,a&&(w.current=null))});return w.current={conversationId:e,promise:d},d},[n,t,l,h,m,T,i]),pe=F(()=>new Set,[]),me=I(e=>(pe.add(e),()=>{pe.delete(e)}),[pe]),he=I(()=>{for(let e of pe)e();return oe.current?.controller.abort(se),fe()},[pe,fe,se]),ge=I(e=>h.peek()?.conversationId===e?fe():Promise.resolve(),[h,fe]),_e=I(async(e,l)=>{if(u!==`supported`)throw new Vf(u);let d=e,f=x.peek();f&&d?.password==null&&(d={...d,password:f});let p=r.value.customization.conversation.unique_memory_tag===!0;if(!d?.memory_stores){let e=o??(p?[Dm(t)]:[]);e.length&&(d={...d,memory_stores:e})}d=ph(d,s,c);let m=mh();m&&d?.user_timezone==null&&(d={...d,user_timezone:m});let h=S.peek();h&&d?.captcha_token==null&&(d={...d,captcha_token:h});let g=await bm(n,t,r.peek().start_security,d,l,i,a,()=>{S.value=null});return console.info(`[Tavus:Conversation] Conversation created:`,g.conversation_id),{conversationId:g.conversation_id,conversationName:g.conversation_name,conversationUrl:g.conversation_url,callbackUrl:g.callback_url,createdAt:g.created_at,magicGrid:g.magic_grid===!0}},[u,n,a,i,t,x,S,r,o,s,c]),ve=I(e=>Or(i,`end`,()=>Cn(n,t,e.conversationId,{keepalive:!0}),e.conversationId).catch(e=>{th.error(`End created conversation API failed`,e)}),[n,t,i]),ye=I(()=>{let e=D.current;return!e||e.claimed?null:(e.claimed=!0,e.promise.catch(()=>null))},[]),be=I(async()=>{let e=ye(),t=g.peek();g.value=null;let n=e?await e:null;await Promise.all([t,n].filter(e=>e!==null).map(ve))},[ye,g,ve]),xe=I((e,t)=>{let n=D.current;if(n&&!n.claimed)return n.promise;let a=be();i?.beginAttempt?.();let o={claimed:!1};return o.promise=a.then(()=>_e(e,t)).then(e=>(D.current===o&&(D.current=null),o.claimed||(g.value=e),e),e=>{throw D.current===o&&(D.current=null),gh(e,r.value.has_password===!0)&&(x.value=null),th.error(`Create failed`,e),e}),D.current=o,o.promise},[be,i,_e,g,r,x]),Se=P(be);Se.current=be,N(()=>()=>void Se.current(),[]);let Ce=I(async(e,t)=>{let n=null,a=[];try{le.current||ue(),le.current=!1,m.value=`connecting`,b.value=null;let o=g.peek(),s=o?null:ye(),c=o??(s?await s:null)??await _e(e,t);if(t.signal.aborted)throw o&&(g.value=null),ve(c),t.signal.reason??new DOMException(`The operation was aborted`,`AbortError`);n=c.conversationId,wt(()=>{o&&(g.value=null),h.value=c});let u=r.value.customization.conversation.modality===`chat`,f=E.current;f&&await Yp(f,t.signal);let p=qp(c.conversationUrl,u,t.devices,a);if(d?.setProvidedTracks(typeof p?.audioSource==`object`?p.audioSource:void 0,typeof p?.videoSource==`object`?p.videoSource:void 0),T.value=c.conversationId,await Or(i,`join`,()=>rh(l,p,t.signal),c.conversationId,{operation:`daily.join`,component:`conversation`}),ih(l,u,t.devices)&&hh(l)){let e=new Xp;throw Dr(i,e,{stage:`permissions`,outcome:`failed`,operation:`media.microphone`,component:`permissions`,code:`NotAllowedError`,error_type:`NotAllowedError`,handled:!0}),e}ee.current.push(...a),le.current=!1}catch(e){throw Jp(a),await fe(),n&&(h.value=null),t.signal.aborted?t.signal.reason??e:(gh(e,r.value.has_password===!0)&&(x.value=null),th.error(`Start failed`,e),b.value=String(e),m.value=`error`,e)}},[i,l,d,m,b,h,g,ye,x,r,_e,ue,fe,ve,T]),we=I((e,t)=>{let n=oe.current;if(n&&!n.controller.signal.aborted)return n.promise;if(!n&&ce())return Promise.resolve();let r=t?.signal,i=new AbortController,a=()=>i.abort(r?.reason);r?.aborted?a():r?.addEventListener(`abort`,a,{once:!0});let o,s,c={controller:i,promise:new Promise((e,t)=>{o=e,s=t})};oe.current=c;let l=()=>{r?.removeEventListener(`abort`,a),oe.current===c&&(oe.current=null)},u=()=>i.signal.aborted?Promise.reject(i.signal.reason):Ce(e,{...t,signal:i.signal});return(n?n.promise.then(u,u):u()).then(()=>{l(),o()},e=>{l(),s(e)}),c.promise},[Ce,ce]),Te=I(()=>oe.current!==null,[]);N(()=>()=>oe.current?.controller.abort(se),[se]);let Ee=I(e=>{if(!l)return;let t=h.peek();t?(O.markSent(e),l.sendAppMessage(zm(t.conversationId,e,r.peek().customization.conversation.modality===`chat`),`*`),_.value=[..._.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]):th.warn(`sendChat called before session was established; dropping message`)},[l,_,h,O,r]),De=I(e=>{if(!l){th.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=h.peek();t?(e.event_type===`conversation.respond`&&O.markSent(e.properties.text),l.sendAppMessage(Qm(t.conversationId,e,r.peek().customization.conversation.modality===`chat`),`*`)):th.warn(`sendMessage called before session was established; dropping message`)},[l,h,O,r]),Oe=I(e=>{k.add(e)},[k]),ke=I(e=>{k.delete(e)},[k]),Ae=F(()=>({state:m,session:h,createdSession:g,chatMessages:_,captionText:v,captionRole:y,error:b,password:x,setPassword:ne,captchaToken:S,setCaptchaToken:re,mode:te,start:we,create:xe,discardCreatedConversation:be,end:he,endSession:ge,hasPendingStart:Te,__onEnd:me,sendChat:Ee,sendMessage:De,conversation:{start:we,create:xe,end:he,sendMessage:De},__registerSubscriber:Oe,__unregisterSubscriber:ke,__beginAttempt:de,isSharedCallBusy:j,pendingLeave:ae}),[m,h,g,_,v,y,b,x,ne,S,re,te,we,xe,be,he,ge,Te,me,Ee,De,Oe,ke,de,j,ae]);return R(ah.Provider,{value:Ae,children:e})}var vh=fn(`CaptchaChallenge`),yh=new Set([`110600`,`110620`,`200500`]);function bh(e){return e.startsWith(`3`)||e.startsWith(`6`)}var xh=new Set([`110500`,`110510`]);function Sh(e){return e.startsWith(`3`)||e.startsWith(`6`)||yh.has(e)}function Ch(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function wh({baseUrl:e,challengePath:t,deploymentId:n,action:r,parentOrigin:i,ancestorOrigins:a}){let o=new URL(`${e.replace(/\/+$/,``)}/${t.replace(/^\/+/,``)}`);o.searchParams.set(`deployment_uuid`,n),o.searchParams.set(`action`,r),o.searchParams.set(`parent_origin`,i);for(let e of a)o.searchParams.append(`ancestor_origin`,e);return o.toString()}function Th(){return`ancestorOrigins`in window.location?Array.from(window.location.ancestorOrigins):[]}function Eh({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,onLoadedChange:a,onLoadError:o,presented:s=!0}){let c=L(_t),l=L(Pr)?.telemetry,u=(c.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),d=new URL(u).origin,[f,p]=M(0),[m,h]=M(!1),[g,_]=M(!1),v=P(0),y=P(0),b=P(null),x=P(!1);N(()=>{g||(x.current=!1);let e=b.current;if(!g||!s||m||!e||typeof IntersectionObserver>`u`)return;let t=!1,n=()=>{t&&document.visibilityState===`visible`&&!x.current&&(x.current=!0,l?.record({stage:`captcha`,outcome:`shown`}))},r=new IntersectionObserver(([e])=>{t=!!e?.isIntersecting&&e.intersectionRatio>=.5,n()},{threshold:.5});return r.observe(e),document.addEventListener(`visibilitychange`,n),()=>{r.disconnect(),document.removeEventListener(`visibilitychange`,n)}},[g,s,m,f,l]);let S=wh({baseUrl:u,challengePath:e.challenge_path,deploymentId:t,action:e.action,parentOrigin:window.location.origin,ancestorOrigins:Th()}),C=I(()=>{_(!1),i?.(!1),a?.(!1),v.current=0,y.current=0,p(e=>e+1)},[i,a]);if(Xe(()=>{function e(e){if(l?.record({stage:`captcha`,outcome:`failed`,code:/^[0-9]{6}$/.test(e)?e:`unknown`}),vh.warn(`Captcha error received`,e),Sh(e)){if(v.current+=1,bh(e)&&(y.current+=1),v.current<2){_(!1),i?.(!1);return}vh.warn(`Captcha error keeps recurring, falling back to no-token mode`),h(!0),r(y.current>=2?`unsupported`:`exhausted`)}else vh.warn(`Captcha error is not retryable, falling back to no-token mode`),h(!0),r(xh.has(e)?`unsupported`:`broken`)}function s(s){if(m||s.origin!==d)return;let c=b.current?.contentWindow;if(!c||s.source!==c)return;let u=s.data;Ch(u)&&u.deployment_uuid===t&&(u.type===`ready`?a?.(!0):u.type===`load-error`?(h(!0),o?.()):u.type===`interactive`?(_(!0),i?.(!0)):u.type===`interaction-ended`?(_(!1),i?.(!1)):u.type===`unsupported`?(h(!0),r(`unsupported`)):u.type===`token`&&u.token?(vh.info(`Captcha token received`),_(!1),i?.(!1),n(u.token)):u.type===`expired`?(l?.record({stage:`captcha`,outcome:`expired`}),vh.info(`Captcha token expired, reloading iframe`),C()):u.type===`error`&&e(String(u.code??``)))}return window.addEventListener(`message`,s),()=>window.removeEventListener(`message`,s)},[d,t,m,n,r,i,a,o,C,l]),m)return null;let w=g&&s;return R(`div`,{class:w?`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-[tavusFadeUp_180ms_ease-out]`:`absolute top-0 left-0 w-0 h-0 overflow-hidden opacity-0 pointer-events-none`,"aria-hidden":!w,children:R(`iframe`,{ref:b,src:S,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},f)})}var Dh=fn(`Captcha`),Oh=2e4,kh=xe(null);function Ah({children:e}){let{config:t,deploymentId:n,telemetry:r}=L(Pr),i=L(ah),a=rn(!0),o=rn(null),s=rn(!1),c=rn(0),l=rn(!1),u=rn(!1),d=P([]),f=P(0),p=P(!1),m=t.value.captcha??null,h=i?.state.value??`idle`,g=h===`connecting`||h===`connected`,_=m!==null&&!l.value&&!g&&s.value,v=I(e=>{let t=d.current;d.current=[];for(let n of t)n(e)},[]),y=I(()=>{s.value=!1,u.value=!1},[s,u]),b=I((e,t,n,i=t)=>{Dh.warn(e),r?.record({stage:`captcha`,operation:n,outcome:t===`unsupported`?`unsupported`:`failed`,code:i,duration_ms:performance.now()-f.current}),l.value=!0,y(),v({kind:`unavailable`,reason:t})},[l,v,y,r]),x=I(e=>{i?.setCaptchaToken(e)},[i]),S=i?.captchaToken;N(()=>{if(S)return S.subscribe(e=>{e!==null&&(s.peek()&&r?.record({stage:`captcha`,outcome:`succeeded`,duration_ms:performance.now()-f.current}),y())})},[S,y,s,r]);let C=I(e=>{b(`Captcha challenge unavailable; not attempting /start without a token`,e,`captcha.execute`)},[b]),w=I(e=>{p.current=e},[]),T=I(()=>{b(`Captcha script failed to load`,`exhausted`,`captcha.load`,`network`)},[b]),E=I(e=>{e&&!u.peek()&&r?.record({stage:`captcha`,outcome:`interactive`}),u.value=e},[u,r]),D=I(async(e,{waitForHuman:n=!0}={})=>(t.peek().captcha??null)===null?{kind:`not-required`}:(i?.captchaToken.peek()??null)===null?(l.peek()&&(l.value=!1,c.value=c.peek()+1),s.peek()||(f.current=performance.now(),p.current=!1,r?.record({stage:`captcha`,outcome:`started`})),s.value=!0,new Promise(t=>{let a=!1,o,s,c,l=n=>{if(a)return;a=!0,clearTimeout(o),c?.(),e?.removeEventListener(`abort`,h),s?.();let r=d.current.indexOf(l);r!==-1&&d.current.splice(r,1),t(n)},m=e=>{l(e),d.current.length===0&&(r?.record({stage:`captcha`,outcome:`cancelled`,code:e.reason,duration_ms:performance.now()-f.current}),y())},h=()=>m({kind:`unavailable`,reason:`cancelled`});d.current.push(l),c=u.subscribe(e=>{clearTimeout(o),e&&!n?m({kind:`unavailable`,reason:`interactive`}):e||(o=setTimeout(()=>b(`Captcha mint timed out`,`timeout`,p.current?`captcha.execute`:`captcha.load`),Oh))}),a?c():(s=i?.captchaToken.subscribe(e=>{e!==null&&l({kind:`token`})}),e?.aborted?h():e?.addEventListener(`abort`,h,{once:!0}))})):{kind:`token`},[s,t,i,c,l,b,u,y,r]),ee=F(()=>({ensureToken:D,hostVisible:a,promptSlot:o}),[D,a,o]),O=o.value,k=_&&m?R(Eh,{captcha:m,deploymentId:n,presented:a.value,onToken:x,onFallback:C,onInteractive:E,onLoadedChange:w,onLoadError:T},c.value):null;return R(kh.Provider,{value:ee,children:[e,O&&k?Ep(k,O):k]})}function jh(){let e=L(Pr);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var Mh=`tavus_pudl_`,Nh=172800,Ph=new Map;function Fh(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function Ih(e){return`${Mh}${e}`}function Lh(e){try{let t=`${Ih(e)}=`,n=document.cookie.split(`; `).find(e=>e.startsWith(t));if(!n)return 0;let[r,i]=decodeURIComponent(n.slice(t.length)).split(`.`);if(r!==Fh())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function Rh(e,t){try{let n=encodeURIComponent(`${Fh()}.${t}`);document.cookie=`${Ih(e)}=${n}; max-age=${Nh}; path=/; SameSite=Lax`}catch{return}}function zh(e){let t=Ph.get(e);return t||(t=Lt(e?Lh(e):0),Ph.set(e,t)),t}function Bh(e){if(!e)return;Rh(e,Lh(e)+1);let t=Lh(e),n=Ph.get(e);n?n.value=t:Ph.set(e,Lt(t))}function Vh(e){switch(e){case`blocked`:return`blocked`;case`in-use`:return`in-use`;case`not-found`:return`not-found`;case`not-supported`:case`undefined-mediadevices`:return`unsupported`;default:return null}}function Hh(e,t,n,r){return e===`granted`&&r?`granted`:Vh(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function Uh(e,t){let n=e===`granted`,r=e===`blocked`||e===`in-use`||e===`not-found`||e===`unsupported`;return{status:e,isGranted:n,isBlocked:r,canRequest:e===`prompt`,needsAttention:r||e===`prompt`&&t!==`granted`}}function Wh(e){let[t,n]=M(null);return N(()=>{let t=!1,r=navigator.permissions;if(r?.query)return r.query({name:e}).then(e=>{t||(n(e.state),e.onchange=()=>{t||n(e.state)})}).catch(()=>{}),()=>{t=!0}},[e]),t}function Gh(){let e=L(Pr)?.telemetry,t=Xf(),n=Zf(),r=Qf(),{micState:i,camState:a,currentMic:o,currentCam:s,providedAudioTrack:c,providedVideoTrack:l}=sp(),u=ap(r).persistentTrack,d=ip(r).persistentTrack,f=(u??c)?.readyState===`live`,p=(d??l)?.readyState===`live`,m=Wh(`microphone`),h=Wh(`camera`),g=n===`joined-meeting`||!!r,[_,v]=M(!1),[y,b]=M(!1),[x,S]=M(!1),C=I(t=>{g?t.setLocalAudio(!0):Promise.resolve(t.startCamera({videoSource:!1})).catch(n=>{let r=er(t,n);Dr(e,n,{stage:`permissions`,outcome:`failed`,operation:`media.microphone`,component:`permissions`,handled:!0,...r&&{code:r}})})},[g,e]),w=I(()=>{v(!0),t?C(t):S(!0)},[t,C]);N(()=>{x&&t&&(S(!1),C(t))},[x,t,C]);let T=I(async()=>{if(t){if(b(!0),p)t.setLocalVideo(!0);else{try{await t.setInputDevicesAsync({videoSource:!0})}catch(t){Dr(e,t,{stage:`permissions`,outcome:`failed`,operation:`media.camera`,component:`permissions`,handled:!0})}t.setLocalVideo(!0)}}},[t,p,e]);return{mic:F(()=>Uh(Hh(i,m,_,!!o||f),m),[i,m,_,o,f]),camera:F(()=>Uh(Hh(a,h,y,!!s||p),h),[a,h,y,s,p]),requestMic:w,requestCamera:T}}var Kh=3,qh=3e4,Jh=9e5,Yh={count:0,retryAt:null};function Xh(e,t){let n=e.count+1;return n<Kh?{count:n,retryAt:null}:{count:n,retryAt:t+Math.min(qh*2**(n-Kh),Jh)}}var Zh=class extends TypeError{constructor(e){super(`Invalid startConversation options: ${e}`),this.name=`INVALID_ARGUMENT`}};function Qh(e,t,n){if(!e||typeof e!=`object`||Array.isArray(e))throw new Zh(`${n} must be an object.`);for(let r of Object.keys(e))if(!t.includes(r))throw new Zh(`Unknown field ${n}.${r}.`)}function $h(e,t,n){if(e!==void 0){if(!e||typeof e!=`object`||!(`clone`in e)||typeof e.clone!=`function`||!(`stop`in e)||typeof e.stop!=`function`||!(`kind`in e)||!(`readyState`in e)||e.readyState!==`live`)throw new Zh(`${t} must be a live MediaStreamTrack.`);if(e.kind!==n)throw new Zh(`${t} must be a ${n} track.`)}}function eg(e,t,n){if(e!==void 0){if(Qh(e,[`enabled`,`deviceId`,`track`],t),e.enabled!==void 0&&typeof e.enabled!=`boolean`)throw new Zh(`${t}.enabled must be a boolean.`);if(e.deviceId!==void 0&&(typeof e.deviceId!=`string`||e.deviceId.trim()===``))throw new Zh(`${t}.deviceId must be a non-empty string.`);$h(e.track,`${t}.track`,n)}}function tg(e){if(Qh(e,[`haircheck`,`devices`],`options`),e.haircheck!==void 0&&e.haircheck!==`provided`)throw new Zh(`options.haircheck must be "provided" when specified.`);e.devices!==void 0&&(Qh(e.devices,[`microphone`,`camera`],`options.devices`),eg(e.devices.microphone,`options.devices.microphone`,`audio`),eg(e.devices.camera,`options.devices.camera`,`video`))}var ng=fn(`Flow`),rg=[`idle`,`unavailable`,`ended`],ig={supported:null,insecure_context:`insecure_context`,unsupported:`browser_unsupported`};function ag({children:e}){let{config:t,retryInit:n,telemetry:r}=jh(),{cameraOnStart:i}=L(_t),{start:a,create:o,discardCreatedConversation:s,end:c,session:l,createdSession:u,state:d,__beginAttempt:f,__onEnd:p,hasPendingStart:m,isSharedCallBusy:h,pendingLeave:g,password:_,setPassword:v}=L(ah),y=qf(),b=ig[y],x=t.value.deployment_id??``,S=zh(x),C=P(null),w=I(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),T=L(kh),[E,D]=M(b?`unavailable`:`idle`),[ee,O]=M(!1),[k,A]=M(null),[te,ne]=M(null),re=P(Yh),[ie,j]=M(b),[ae,oe]=M(!1),{mic:se,camera:ce,requestMic:le,requestCamera:ue}=Gh();N(()=>{y!==`supported`&&r?.record({stage:`init`,outcome:`unsupported`,code:y===`insecure_context`?`insecure_context`:`unsupported`,component:`conversation`})},[y,r]),N(()=>{if(!k||![`blocked`,`unsupported`,`not-found`,`in-use`].includes(k.status))return;let e=k.status===`blocked`?`NotAllowedError`:k.status===`not-found`?`NotFoundError`:k.status===`in-use`?`NotReadableError`:`unsupported`;r?.record({stage:`permissions`,outcome:`failed`,code:e,operation:k.kind===`camera`?`media.camera`:`media.microphone`,component:`permissions`,handled:!0})},[k,r]);let de=F(()=>Lt(E),[]);N(()=>{de.value=E},[E,de]);let fe=I(()=>u.peek()!==null||C.current!==null,[u]),pe=I(()=>t.peek().has_password===!0&&_.peek()===null&&!fe(),[t,_,fe]),me=I(()=>{let e=d.peek();return e===`connecting`||e===`connected`},[d]);dn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel===`widget`||e.channel===`embed`)&&de.value===`idle`&&S.value>=n&&!fe()&&!me()&&(j(`daily_limit`),oe(!1),D(`unavailable`))});let he=P(!1),ge=P(!1),_e=I(e=>!ge.current&&(im(e)&&!t.peek().captcha||am(e)&&!t.peek().start_security),[t]),ve=P(async()=>{}),ye=P(!1),be=P({}),xe=P(void 0),Se=P([]),Ce=I(()=>Jp(Se.current),[]),we=I(e=>e===xe.current?e:(Ce(),xe.current=e&&t.peek().has_password===!0?Gp(e,Se.current):e,xe.current),[t,Ce]),Te=P(null),Ee=P(null),De=I(()=>{let e=Ee.current;Ee.current=null,e?.resolve()},[]),Oe=P(null),ke=I(async(e=new AbortController)=>{Oe.current=e;let{signal:r}=e,o=be.current;O(!0);let s=[],c=!1;try{let e=t.peek().customization;if(o.haircheck===`provided`&&e.conversation.modality!==`chat`){let t=o.devices??={};if(t.microphone??={},t.camera??={enabled:e.conversation.modality===`video`&&i===`on`},s.push(...await Wp(t)),r.aborted)return;let n=g();if(n&&await n,r.aborted)return}let n=fe(),c=n?{kind:`not-required`}:await T?.ensureToken(r)??{kind:`not-required`};if(r.aborted)return;if(c.kind===`unavailable`){j(c.reason===`unsupported`?`captcha_unsupported`:`error`),oe(c.reason===`timeout`||c.reason===`exhausted`),D(`unavailable`);return}if(await Yp(a(void 0,{signal:r,devices:o.devices}),r),r.aborted)return;re.current=Yh,he.current=!1,ge.current=!1,!n&&w()!=null&&Bh(x),D(`call`)}catch(i){if(r.aborted)return;if(i instanceof DOMException&&i.name===`AbortError`){D(`idle`);return}if(i instanceof Up)throw i.name===`NotAllowedError`?(A({kind:i.device,status:`blocked`}),D(`idle`)):(j(`error`),oe(!0),D(`unavailable`)),i;let a=tm(i);if(Zp(i)){De(),A({kind:`microphone`,status:`blocked`}),D(`idle`);return}if(_e(i))return ge.current=!0,ng.info(`/start requires protection the loaded config lacks; refreshing config`),await n(),r.aborted?void 0:(f(!0),c=!0,await ve.current(e));if(om(i)&&!he.current){he.current=!0,O(!1),D(`idle`);return}if(he.current=!1,cm(i)){ng.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),j(`error`),oe(!1),D(`unavailable`);return}if(a.status===401&&t.value.has_password===!0){re.current=Xh(re.current,Date.now()),ne({reason:`rejected`,retryAt:re.current.retryAt}),c=!0,D(`idle`);return}let o=um(i,a.kind)??`busy`;j(o),oe(a.retryable),D(`unavailable`)}finally{Jp(s),c||Ce(),Oe.current===e&&(Oe.current=null),O(!1)}},[a,fe,t,w,x,T,n,_e,De,f,i,g,Ce]);ve.current=ke;let Ae=I(async()=>{if(y!==`supported`)throw new Vf(y);let e=w();if(e!=null&&S.value>=e&&!fe())throw j(`daily_limit`),oe(!1),D(`unavailable`),Error(`Daily conversation limit reached for this visitor`);let t=C.current;if(t)return t.promise;let r=new AbortController,i={controller:r,promise:(async()=>{let e=async()=>{let t=await T?.ensureToken(r.signal,{waitForHuman:!1})??{kind:`not-required`};if(t.kind===`unavailable`)throw Error(`Bot check unavailable: ${t.reason}`);if(r.signal.aborted)throw new DOMException(`Conversation creation cancelled`,`AbortError`);try{return await o(void 0,{signal:r.signal})}catch(t){if(!_e(t))throw t;return ge.current=!0,ng.info(`/start requires protection the loaded config lacks; refreshing config`),await n(),e()}},t=await e();return ge.current=!1,w()!=null&&Bh(x),t})()};return C.current=i,i.promise.finally(()=>{C.current===i&&(C.current=null)})},[y,w,S,fe,T,o,_e,n,x]);N(()=>()=>{C.current?.controller.abort(),Te.current?.controller.abort(),Oe.current?.abort(),Ee.current?.controller.abort(),Ee.current?.resolve(),Jp(Se.current)},[]);let je=I(async()=>{let e=Ee.current;if(e){A(null);try{await ke(e.controller)}finally{Ee.current===e&&(Ee.current=null),e.resolve()}}},[ke]),Me=I(()=>{let e=Ee.current;e&&!e.proceeding&&(e.proceeding=!0,t.peek().customization.conversation.modality===`video`&&i===`on`&&!ce.isGranted&&!ce.isBlocked?(A({kind:`camera`,status:ce.status}),ue().finally(()=>{je()})):je())},[t,i,ce,ue,je]);N(()=>{if(Ee.current&&k?.kind===`microphone`){if(k.status!==se.status&&A({kind:`microphone`,status:se.status}),se.isGranted)Me();else if(se.isBlocked){let e=Ee.current;Ee.current=null,O(!1),e.resolve()}}},[k,se,Me]);let Ne=I(e=>{if(Ee.current)return Ee.current.promise;let t,n=new Promise(e=>{t=e});return Ee.current={promise:n,resolve:t,proceeding:!1,controller:e},O(!0),se.isGranted?Me():se.isBlocked?(A({kind:`microphone`,status:se.status}),Ee.current=null,O(!1),t()):(A({kind:`microphone`,status:se.status}),le()),n},[se,le,Me]),Pe=I(async(e,n)=>{if(n!==void 0&&tg(n),!rg.includes(E))return;if(b){j(b),oe(!1),D(`unavailable`);return}let r=we(n);be.current=r===void 0?{}:{...r,devices:r.devices&&{microphone:r.devices.microphone&&{...r.devices.microphone},camera:r.devices.camera&&{...r.devices.camera}}};let i=t.peek().customization,a=i.show_haircheck,o=i.conversation.modality,s=n?.haircheck===`provided`,c=a&&o!==`chat`&&!s,l=!a&&o!==`chat`&&!s,u=w();if(u!=null&&S.value>=u&&!fe()){j(`daily_limit`),oe(!1),D(`unavailable`);return}if(h()){j(`busy`),oe(!0),D(`unavailable`);return}if(pe()){ne({reason:`required`,retryAt:re.current.retryAt}),D(`idle`);return}ne(null);let d=g();if(d&&!s&&await d,!e.signal.aborted){if(f(),c&&!ye.current)D(`haircheck`);else return l?Ne(e):ke(e)}},[E,b,t,Ne,ke,w,S,fe,f,h,g,pe,we]),Fe=P(Pe);Fe.current=Pe;let Ie=I(e=>{let t=Te.current;if(t&&!t.controller.signal.aborted)return t.promise;let n,r,i={controller:new AbortController,promise:new Promise((e,t)=>{n=e,r=t})};Te.current=i;let a=()=>{Te.current===i&&(Te.current=null)},o=()=>Fe.current(i.controller,e);return(t?t.promise.then(o,o):o()).then(()=>{a(),n()},e=>{a(),r(e)}),i.promise},[]),Le=I(e=>{let{retryAt:t}=re.current;t!==null&&Date.now()<t||(v(e),Ie(xe.current))},[v,Ie]),Re=I(()=>{ne(null),Ce()},[Ce]),ze=I(async()=>{E===`haircheck`&&(ye.current=!0,await ke())},[E,ke]),Be=I(()=>{ne(null),Ce();let e=Te.current,t=Ee.current,n=t?.controller??Oe.current;t&&(Ee.current=null,t.resolve(),A(null)),e?.controller.abort(),n?.abort(),(n||e)&&(O(!1),D(e=>e===`call`?e:`idle`))},[Ce]);N(()=>p(Be),[p,Be]);let Ve=I(()=>{Be(),E===`haircheck`&&D(`idle`),C.current?.controller.abort(),s()},[Be,E,s]),He=I(()=>{E===`call`&&D(`ended`)},[E]);N(()=>{let e=()=>{let e=Ee.current!==null||Oe.current!==null||m(),t=E===`haircheck`||E===`call`,n=l.peek()!==null,r=n&&d.peek()!==`ended`;Ve(),(e||t||n)&&((E===`call`||r)&&D(`ended`),c())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[E,l,d,Ve,c,s,m]);let Ue=I(()=>{ne(null),Ce(),j(b),oe(!1),D(b?`unavailable`:`idle`)},[b,Ce]),We=F(()=>({flowSignal:de,setFlowState:D,isStarting:ee,permissionRequest:k,passwordRequest:te,submitPassword:Le,dismissPasswordRequest:Re,unavailableCause:ie,canRetry:ae,start:Ie,create:Ae,join:ze,cancel:Ve,leave:He,restart:Ue}),[de,ee,k,te,Le,Re,ie,ae,Ie,Ae,ze,Ve,He,Ue]);return R(Sm.Provider,{value:We,children:e})}var og=xe(null),sg=fn(`HostBridge`),cg=xe(null);function lg(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function ug({children:e}){let t=L(ah),n=L(Pr),r=L(Sm),i=P(r);i.current=r;let a=P(t);a.current=t;let o=P(new Set),s=L(og),c=L(_t),l=rn(null),u=c?.overrideConfig,d=I(e=>{l.value=lg(e)},[l]),f=I((e,t)=>{let n=l.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),sg.info(`Event:`,e,t)},[l]);N(()=>{let e=l.value;if(!e)return;let r={createConversation:async()=>{let e=i.current,t=a.current;try{return{conversationId:(await(e?e.create():t.create())).conversationId}}catch(e){throw e instanceof DOMException&&e.name===`AbortError`||(sg.error(`createConversation failed`,e),f(`tavus:error`,{code:`CONVERSATION_CREATE_FAILED`,message:e instanceof Error?e.message:String(e)})),e}},startConversation:async e=>{let t=i.current,n=a.current;try{e!==void 0&&tg(e),t?await t.start(e):await n.start(void 0,{devices:e?.devices})}catch(e){sg.error(`startConversation failed`,e),(e instanceof Up||e instanceof Error&&e.name===`INVALID_ARGUMENT`)&&f(`tavus:error`,{code:e.name,message:e.message})}},endConversation:async()=>{let e=i.current,t=a.current;try{let n=e?.flowSignal.peek();if(n===`call`){e?.leave();return}e?.cancel();let r=n!==`haircheck`&&(t.session.peek()||t.hasPendingStart())?t.end():void 0;await t.discardCreatedConversation(),await r}catch(e){sg.error(`endConversation failed`,e)}},sendMessage:e=>{a.current.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let r=u??{};kr(n?.telemetry,{stage:`host_bridge`,outcome:`failed`,operation:`host.command`,component:`host_bridge`,code:`integration_error`,handled:!1},()=>{let n=En(r,t);e.setAttribute(`override-config`,JSON.stringify(n))})},destroy:()=>{let t=a.current;t.discardCreatedConversation(),t.session.peek()&&t.end(),e.remove()}},c=(e,t)=>{o.current.has(e)||(o.current.add(e),sg.warn(`el.tavus.${e}() is deprecated; call el.${t}() instead.`))},d={start:()=>(c(`start`,`startConversation`),r.startConversation()),create:t.create,end:()=>(c(`end`,`endConversation`),r.endConversation()),sendChat:t.sendChat,sendMessage:t.sendMessage},p=s?{...r,tavus:d,open:s.expand,close:s.close}:{...r,tavus:d};return Object.assign(e,p),()=>{for(let t of Object.keys(p))delete e[t]}},[l.value,t,r,u,n,s,f]);let p=P(null);N(()=>t.createdSession.subscribe(e=>{e!==null&&e.conversationId!==p.current&&(p.current=e.conversationId,f(`tavus:conversation-created`,{conversationId:e.conversationId}))}),[t,f]);let m=P(!1);N(()=>{m.current||l.value&&n&&(m.current=!0,f(`tavus:ready`,{deploymentId:n.deploymentId}))},[l.value,n,f]);let h=P(null),g=P(new Set);N(()=>t.state.subscribe(e=>{if(e!==h.current)switch(h.current=e,e){case`connected`:{let n=t.session.peek()?.conversationId??``;g.current.add(n),f(`tavus:conversation-started`,{conversationId:n}),f(`tavus:state-change`,{state:e});break}case`ended`:{let n=t.session.peek()?.conversationId??``;g.current.delete(n),f(`tavus:conversation-ended`,{conversationId:n}),f(`tavus:state-change`,{state:e});break}case`error`:f(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),f(`tavus:state-change`,{state:e});break;default:f(`tavus:state-change`,{state:e})}}),[t,f]),dn(()=>{if(!r)return;let e=r.flowSignal.value;f(`tavus:mode-change`,{mode:e})}),N(()=>{let e={onUtterance(e){f(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){f(`tavus:tool-call`,e),f(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){f(`tavus:protocol-message`,e)},onSpeakingState({who:e,state:t,seq:n,turn_idx:r}){let i={state:t,...n===void 0?{}:{seq:n},...r===void 0?{}:{turn_idx:r}};f(`tavus:protocol-message`,{kind:`speaking`,event_type:e===`replica`?t===`started`?`conversation.replica_started_speaking`:`conversation.replica_stopped_speaking`:t===`started`?`conversation.user_started_speaking`:`conversation.user_stopped_speaking`,properties:i})},onMessage(e){f(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,f]);let _=F(()=>({shadowHost:l,dispatchEvent:f}),[l,f]);return R(cg.Provider,{value:_,children:[R(`div`,{ref:d,style:`display:contents`}),e]})}var dg=xe(null);function fg({children:e}){let{config:t}=L(Pr),n=F(()=>Ht(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=F(()=>Ht(()=>{let e=t.value.customization.style;return e.style===`basic`?n.value?`white-black`:`black-white`:n.value?`${e.style}-dark`:e.style}),[t,n]),i=F(()=>Ht(()=>yg(t.value.customization.style)),[t]),a=F(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return R(dg.Provider,{value:a,children:R(`div`,{"data-theme":r.value,style:bg(i.value),class:`contents`,children:e})})}var pg=[0,.125,.25,.5,.75],mg=[0,1,2,3,4],hg=[0,.2,.25,.3],gg=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,_g=/^(?:rgba?|hsla?|oklch)\([0-9a-z%.,\s/+-]{1,64}\)$/i;function vg(e){let t=e?.trim();if(t)return gg.test(t)||_g.test(t)?t:void 0}function yg(e){let t=vg(e.magic_canvas?.accent_color);return{"--radius-box":`${pg[e.boxes_radius]??.5}rem`,"--radius-field":`${pg[e.field_radius]??.25}rem`,"--radius-selector":`${pg[e.selectors_radius]??.5}rem`,"--border":`${mg[e.border_width]??1}px`,"--size-field":`${hg[e.fields_size]??.25}rem`,"--size-selector":`${hg[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`,...t?{"--tavus-magic-canvas-accent":t}:{}}}function bg(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}var xg=.5,Sg=.01;function Cg(e,t){if(!Eg(e)||!Eg(t))return null;let n=e.left-t.left,r=e.top-t.top,i=e.width/t.width,a=e.height/t.height;return Math.abs(n)<xg&&Math.abs(r)<xg&&Math.abs(i-1)<Sg&&Math.abs(a-1)<Sg?null:`translate(${Dg(n)}px, ${Dg(r)}px) scale(${Dg(i)}, ${Dg(a)})`}function wg(e){if(e==null)return null;let t=Tg(e.width),n=Tg(e.height);return t===null&&n===null?null:{width:t,height:n}}function Tg(e){return Number.isFinite(e)&&e>0?e:null}function Eg(e){return Number.isFinite(e.left)&&Number.isFinite(e.top)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0}function Dg(e){return Math.round(e*1e3)/1e3}function Og(e,t){N(()=>{let n=e.current;if(!n)return;let r=new ResizeObserver(e=>{let n=e[0];n&&t(n)});return r.observe(n),()=>r.disconnect()},[e,t])}var kg=new WeakMap;function Ag(e){let t=kg.get(e);t?t.holders+=1:kg.set(e,{holders:1,restore:jg(e)});let n=!1;return()=>{if(n)return;n=!0;let t=kg.get(e);t&&(--t.holders,!(t.holders>0)&&(kg.delete(e),t.restore()))}}function jg(e){let{body:t,documentElement:n}=e,r=n.style.overflowX,i=n.style.overflowY,a=t.style.paddingRight,o=n.clientWidth;n.style.overflow=`hidden`;let s=n.clientWidth-o,c=s>0?`${Mg(t)+s}px`:null;return c&&(t.style.paddingRight=c),()=>{n.style.overflow===`hidden`&&(n.style.overflow=``,n.style.overflowX=r,n.style.overflowY=i),c&&t.style.paddingRight===c&&(t.style.paddingRight=a)}}function Mg(e){let t=e.ownerDocument.defaultView?.getComputedStyle(e).paddingRight,n=Number.parseFloat(t??``);return Number.isFinite(n)?n:0}var Ng=xe(null),Pg=480,Fg=768,Ig=`relative w-full h-full`,Lg=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`,Rg=`${Lg} block static w-full h-full`,zg=`${Lg} fixed inset-0 flex items-center justify-center w-screen h-dvh backdrop:bg-black/60 motion-safe:backdrop:animate-[tavusFadeIn_180ms_ease-out]`,Bg=`relative outline-none aspect-[var(--tavus-expand-aspect)] [--tavus-expand-default-max-width:1280px] [--tavus-expand-default-max-height:900px] [@media(min-width:2560px)]:[--tavus-expand-default-max-width:1600px] [@media(min-width:2560px)]:[--tavus-expand-default-max-height:1200px] w-[var(--tavus-expand-width)] h-[var(--tavus-expand-height)] max-w-[var(--tavus-expand-max-width)] max-h-[var(--tavus-expand-max-height)] [@media(max-width:768px)]:w-screen [@media(max-width:768px)]:h-dvh [@media(max-width:768px)]:max-w-none [@media(max-width:768px)]:max-h-none`,Vg=280,Hg=`cubic-bezier(0.22, 1, 0.36, 1)`,Ug={kind:`inline`};function Wg(e,t,{isStarting:n=!1,awaitingPermission:r=!1,startWasUnderway:i=!1}={}){return e?t===`haircheck`||t===`call`||n||r?!0:t===`unavailable`&&i:!1}function Gg(e){return typeof e?.showModal==`function`&&typeof e.close==`function`}function Kg(e,t){let n=e.flowSignal.peek(),r=n===`call`,i=r||n===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t?.()}function qg({children:e}){let t=P(null),n=P(null),r=F(()=>Lt(`full`),[]),[i,a]=M(Ug),o=L(_t),s=L(Sm),c=L(cg),l=L(kh),u=L(ah),d=o?.expandOptions,f=c?.shadowHost.value??null,p=s?.flowSignal.value??`idle`,m=s?.isStarting??!1,h=s?.permissionRequest!=null,g=P(!1);N(()=>{m||p===`haircheck`||p===`call`?g.current=!0:(p===`idle`||p===`ended`)&&(g.current=!1)},[m,p]);let _=Wg(d?.enabled===!0,p,{isStarting:m,awaitingPermission:h,startWasUnderway:g.current}),v=i.kind!==`inline`;Xe(()=>{let e=t.current;if(e){if(i.kind===`inline`){if(!_||!Gg(n.current))return;let t=e.getBoundingClientRect();a({kind:`expanding`,from:t,slot:wg(f?.getBoundingClientRect())})}else!_&&i.kind!==`collapsing`?a({kind:`collapsing`,from:e.getBoundingClientRect(),slot:i.slot}):_&&i.kind===`collapsing`&&a({kind:`expanding`,from:e.getBoundingClientRect(),slot:i.slot})}},[_,i,f]);let y=i.kind===`inline`?null:i.slot;Xe(()=>{if(!f||!y)return;let e=f.style.minWidth,t=f.style.minHeight;return y.width!==null&&(f.style.minWidth=`${y.width}px`),y.height!==null&&(f.style.minHeight=`${y.height}px`),()=>{f.style.minWidth=e,f.style.minHeight=t}},[f,y]);let b=I(()=>{s&&Kg(s,u?.end)},[s,u]),x=P(b);x.current=b,Xe(()=>{let e=n.current;if(!e||!v||!Gg(e))return;let t=()=>{e.isConnected&&!e.open&&(e.showModal(),x.current())};return e.addEventListener(`close`,t),e.open||e.showModal(),()=>{e.removeEventListener(`close`,t),e.open&&e.close()}},[v]),Xe(()=>{if(f&&v)return Ag(f.ownerDocument)},[f,v]),Xe(()=>{let e=t.current;if(!e||i.kind!==`expanding`&&i.kind!==`collapsing`)return;let n=()=>a(i.kind===`expanding`?{kind:`expanded`,slot:i.slot}:Ug),r=e.getBoundingClientRect(),o=c?.shadowHost.peek()??null,s=i.kind===`expanding`?r:o?.getBoundingClientRect()??r,l=Cg(i.from,r)??`none`,u=Cg(s,r)??`none`,d=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1;if(l===u||d||typeof e.animate!=`function`){n();return}let f=e.animate([{transform:l,transformOrigin:`top left`},{transform:u,transformOrigin:`top left`}],{duration:Vg,easing:Hg,fill:`forwards`}),p=!1;return f.finished.then(()=>{p||n()},()=>{}),()=>{p=!0,f.cancel()}},[i,c]),Xe(()=>{let e=n.current;if(!e||!v)return;let t=e=>{e.preventDefault(),x.current()};return e.addEventListener(`cancel`,t),()=>e.removeEventListener(`cancel`,t)},[v]);let S=I(e=>{let t=e.contentRect.width;t<Pg?r.value=`compact`:t<Fg?r.value=`medium`:r.value=`full`},[r]);N(()=>{if(l)return l.promptSlot.value=t.current,()=>{l.promptSlot.value=null}},[l,v]),Og(t,S);let C=F(()=>({layoutMode:r,containerRef:t}),[r,t]);return R(Ng.Provider,{value:C,children:R(`dialog`,{ref:n,class:v?zg:Rg,"aria-label":v?`Conversation`:void 0,role:v?void 0:`none`,children:R(`div`,{ref:t,class:v?Bg:Ig,style:v?mt(pt(d).vars):void 0,tabIndex:v?-1:void 0,autofocus:v,children:e})})})}var Jg=`@container/conversation w-full h-full`,Yg=`motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,Xg=`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box`;function Zg({animate:e=!1,innerClassName:t,innerStyle:n,innerRef:r,role:i,"aria-live":a,"aria-label":o,children:s}){return R(`div`,{class:e?`${Jg} ${Yg}`:Jg,children:R(`div`,{ref:r,class:t?`${Xg} ${t}`:Xg,style:n,role:i,"aria-live":a,"aria-label":o,children:s})})}var Qg=41/2,$g=23/2,e_=Math.hypot(Qg,$g),t_=Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-Qg,r-$g)/e_*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});function n_(){return R(Zg,{innerClassName:`embed-loading-screen`,role:`status`,"aria-live":`polite`,"aria-label":`Loading deployment`,children:R(`div`,{class:`embed-loading-dot-field`,"aria-hidden":`true`,style:{"--dot-columns":`42`,"--dot-rows":`24`},children:t_.map((e,t)=>R(`span`,{class:`embed-loading-field-dot`,style:{"--dot-delay":e.delay,"--dot-opacity":e.opacity}},t))})})}var r_=xe(null);function i_({children:e}){let t=P(null);return R(r_.Provider,{value:{frameRef:t},children:R(`div`,{class:`@container/conversation w-full h-full`,children:R(`div`,{ref:t,class:`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box bg-base-100 has-[.cvi-video-surface]:will-change-transform`,children:e})})})}var a_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),o_=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function s_(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:o_(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var c_=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},l_=e=>{let t=c_(e);return t.charAt(0).toUpperCase()+t.slice(1)},u_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function d_(e){return e!=null}function f_(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??u_.width,a=e.size??e.height??u_.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?a_(...c):a_(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??u_[`stroke-width`])*Number(e.size??e.width??u_.width)/Number(t.size??t.width??u_.width):t.strokeWidth??u_[`stroke-width`];return[`svg`,{...Object.entries(u_).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&d_(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&d_(t.width)&&{[r(`width`)]:t.width},...`height`in t&&d_(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var p_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},m_=xe({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),h_=()=>L(m_),g_=({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,children:s,iconNode:c=[],icon:l={node:c,aliases:[],size:24},class:u=``,...d})=>{let{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:h=!1,color:g=`currentColor`,class:_=``}=h_()??{},[v,y,b=[]]=f_(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:a_(_,u),hasA11yProp:!!s||p_(d),attributes:d});return T(v,{...y},[...b.map(([e,t])=>T(e,t)),...ae(s)])};function __(e,t,n=[]){let r=typeof e==`string`?s_(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>T(g_,{...i,icon:r,class:a_(e,t)},n);return r.name&&(i.displayName=l_(r.name)),i}var v_=__({name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]}),y_=__({name:`camera-off`,size:24,node:[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]}),b_=__({name:`captions`,size:24,node:[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]],aliases:[`subtitles`]}),x_=__({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),S_=__({name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]}),C_=__({name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]}),w_=__({name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]}),T_=__({name:`face-slightly-smiling`,size:24,node:[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`smile`]}),E_=__({name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]}),D_=__({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),O_=__({name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]}),k_=__({name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]}),A_=__({name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]}),j_=__({name:`monitor-up`,size:24,node:[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]}),M_=__({name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]}),N_=__({name:`phone-off`,size:24,node:[[`path`,{d:`M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272`,key:`1wngk7`}],[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}],[`path`,{d:`M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473`,key:`10hv5p`}]]}),P_=__({name:`picture-in-picture-2`,size:24,node:[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]}),F_=__({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),I_=__({name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]}),L_=__({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),R_=__({name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]}),z_=__({name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]}),B_=__({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function V_(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>R(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:R(e,{size:n})})}var H_={close:V_(B_,`Close`),cancel:V_(B_,`Cancel`),leave:V_(N_,`Leave call`),more:V_(S_,`More`),error:V_(L_,`Error`),mic:V_(k_,`Microphone`),"mic-off":V_(O_,`Microphone muted`),cam:V_(v_,`Camera`),"cam-off":V_(y_,`Camera off`),"screen-share":V_(j_,`Screen share`),pip:V_(P_,`Picture in picture`),user:V_(R_,`User`),"face-smile":V_(T_,`Camera off`),captions:V_(b_,`Closed captions`),chat:V_(D_,`Chat`),fullscreen:V_(E_,`Enter fullscreen`),"fullscreen-exit":V_(A_,`Exit fullscreen`),expand:V_(C_,`Expand`),collapse:V_(I_,`Collapse`),send:V_(F_,`Send`),"external-link":V_(w_,`External link`),clock:V_(x_,`Clock`),moon:V_(M_,`Unavailable`),users:V_(z_,`Busy`)},U_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 21h-2v-2h2v2Zm-6-2H4v-2h10v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h-2v-2h-2v-2h-2V7h2v2h2V7h2V5h2v14ZM4 17H2V7h2v10Zm12 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H8V9h2v2ZM8 9H6V7h2v2ZM6 7H4V5h2v2Zm8 0h-4V5h4v2ZM4 5H2V3h2v2Z"/></svg>`,W_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M3 4h18v2H3zm0 14h18v2H3zM1 6h2v12H1zm20 0h2v12h-2zM5 10h2v4H5zm8 0h2v4h-2zM7 8h4v2H7zm0 6h4v2H7zm8 0h4v2h-4zm0-6h4v2h-4z"/></svg>`,G_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M22 22h-2v-2h-2v-2h2v-8h2v12Zm-4-4h-8v-2h8v2ZM4 12h2v2H4v2H2V4h2v8Zm6 4H8v-6h2v6Zm10-6H10V8h10v2Zm-4-4h-2V4h2v2Zm-2-2H4V2h10v2Z"/></svg>`,K_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12Zm-5-1h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2V6h2v7ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,q_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm4 0H6v-2h2v2Zm14 0h-2V6h2v12Zm-12-2H8v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,J_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19H5v-2h2v2Zm12 0h-2v-2h2v2ZM9 15v2H7v-2h2Zm8 2h-2v-2h2v2Zm-6-2H9v-2h2v2Zm4 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H9V9h2v2Zm4 0h-2V9h2v2ZM9 9H7V7h2v2Zm8 0h-2V7h2v2ZM7 7H5V5h2v2Zm12 0h-2V5h2v2Z"/></svg>`,Y_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19h2v-2h2v-2h2v2h2v2h2v2H7v-2Zm13-6H4v-2h16v2Zm-3-8h-2v2h-2v2h-2V7H9V5H7V3h10v2Z"/></svg>`,X_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2V4h2v16Zm18 0h-2V4h2v16Zm-9-2h-2v-2h2v2Zm0-4h-2V6h2v8Zm7-10H4V2h16v2Z"/></svg>`,Z_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M15 19h-2v2h-2v-2H9v-2H7v-2h10v2h-2v2Zm5-6H4v-2h16v2Zm-7-8h2v2h2v2H7V7h2V5h2V3h2v2Z"/></svg>`,Q_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8 22H4v-2h4v2Zm12 0h-4v-2h4v2ZM4 20H2v-4h2v4Zm18 0h-2v-4h2v4Zm-6-3H8v-2h8v2Zm-8-2H6V9h2v6Zm10 0h-2V9h2v6Zm-2-6H8V7h8v2ZM4 8H2V4h2v4Zm18 0h-2V4h2v4ZM8 4H4V2h4v2Zm12 0h-4V2h4v2Z"/></svg>`,$_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4V4h2v16Zm14 0h-2v-3h2v3ZM16 9h2v2h2v2h-2v2h-2v2h-2v-4H8v-2h6V7h2v2Zm4-2h-2V4h2v3Zm-2-3H6V2h12v2Z"/></svg>`,ev=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm-5-4H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8 0h-4v-2h4v2Zm6 0h-2v-6h2v6Zm-10-2H8V4h2v10Zm6 0h-2V4h2v10ZM14 4h-4V2h4v2Z"/></svg>`,tv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm9 0h-2v-2h2v2Zm-2-2h-2v-2h2v2ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8-2h2v2h-6v-2h2v-2h2v2Zm-4-4h2v2h-2v2H8V8h2v2Zm10 4h-2v-4h2v4Zm-4-4h-2V4h2v6ZM8 8H6V6h2v2ZM6 6H4V4h2v2ZM4 4H2V2h2v2Zm10 0h-4V2h4v2Z"/></svg>`,nv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H8v-2h10v2ZM8 20H6v-2h2v2Zm12 0h-2v-2h2v2ZM6 18H4v-2h2v2Zm16 0h-2v-4h-2v-2h2v-2h2v8ZM4 16H2V6h2v10Zm14 0h-6v-2h6v2Zm-6-2h-2v-2h2v2Zm-2-2H8V6h2v6ZM6 6H4V4h2v2Zm8-2h-2v2h-2V4H6V2h8v2Z"/></svg>`,rv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M5 15H3v-2h2v2Zm8 0h-2v-2h2v2Zm8 0h-2v-2h2v2ZM3 13H1v-2h2v2Zm4 0H5v-2h2v2Zm4 0H9v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2ZM5 11H3V9h2v2Zm8 0h-2V9h2v2Zm8 0h-2V9h2v2Z"/></svg>`,iv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 20H4v-2h16v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12ZM18 8v6h-8V8h8Zm2-2H4V4h16v2Zm-4 4h-4v2h4v-2Z"/></svg>`,av=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 18h-7v2h3v2H8v-2h3v-2H4v-2h16v2ZM4 16H2V4h2v12Zm18 0h-2v-6h2v6Zm-6-6h-2V8h2v2Zm2-2h-2V6h2v2Zm4-6v6h-2V6h-2V4h-2V2h6Zm-8 2H4V2h10v2Z"/></svg>`,ov=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M4 19h4v2H2v-8h2v6Zm8 0H8v-2h4v2Zm4-2h-4v-2h4v2Zm4-2h-4v-2h4v2Zm-10-2H4v-2h6v2Zm12 0h-2v-2h2v2ZM8 5H4v6H2V3h6v2Zm12 6h-4V9h4v2Zm-4-2h-4V7h4v2Zm-4-2H8V5h4v2Z"/></svg>`,sv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 22H4v-4h2v4Zm14 0h-2v-4h2v4ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2Zm-2-2H8v-2h8v2Zm-1-4H9v-2h6v2Zm-6-2H7V4h2v6Zm8 0h-2V4h2v6Zm-2-6H9V2h6v2Z"/></svg>`,cv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M2 22H0v-4h2v4Zm14 0h-2v-4h2v4Zm8 0h-2v-4h2v4ZM4 18H2v-2h2v2Zm10 0h-2v-2h2v2Zm8 0h-2v-2h2v2Zm-10-2H4v-2h8v2Zm8 0h-4v-2h4v2Zm-9-4H5v-2h6v2Zm8 0h-4v-2h4v2ZM5 10H3V4h2v6Zm8 0h-2V4h2v6Zm8 0h-2V4h2v6ZM11 4H5V2h6v2Zm8 0h-4V2h4v2Z"/></svg>`,lv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2v-6H0v-2h2V8h2v12Zm18-8h2v2h-2v6h-2V8h2v4Zm-8 6h-4v-2h4v2Zm-4-2H8v-2h2v2Zm6 0h-2v-2h2v2Zm-6-4H8v-2h2v2Zm6 0h-2v-2h2v2Zm-3-6h7v2H4V6h7V4h2v2Zm4-2h-4V2h4v2Z"/></svg>`,uv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M17 21H5v-2h12v2ZM5 19H3V7h2v12Zm14 0h-2v-6h2v6Zm-8-4H9v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V9h2v2Zm6 0h-2V7h-2V5h-4V3h8v8Zm-4-2h-2V7h2v2Zm-6-2H5V5h6v2Z"/></svg>`,dv=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 9h2V7h2V5h2v14h-2v-2h-2v-2h-2v4H2V5h14v4ZM4 17h10V7H4v10Z"/></svg>
|
|
55
|
-
`;function fv(e){return e.replace(/\s(width|height)="\d+"/g,``)}function pv(e,t){let n=fv(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>R(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var mv={pixelarticons:{close:pv(q_,`Close`),cancel:pv(J_,`Cancel`),leave:pv($_,`Leave call`),more:pv(rv,`More`),error:pv(X_,`Error`),mic:pv(ev,`Microphone`),"mic-off":pv(tv,`Microphone muted`),cam:pv(dv,`Camera`),"cam-off":pv(U_,`Camera off`),"screen-share":pv(av,`Screen share`),pip:pv(iv,`Picture in picture`),user:pv(sv,`User`),"face-smile":pv(lv,`Camera off`),captions:pv(W_,`Closed captions`),chat:pv(G_,`Chat`),fullscreen:pv(Q_,`Enter fullscreen`),"fullscreen-exit":pv(Y_,`Exit fullscreen`),expand:pv(Z_,`Expand`),collapse:pv(Y_,`Collapse`),send:pv(ov,`Send`),"external-link":pv(uv,`External link`),clock:pv(K_,`Clock`),moon:pv(nv,`Unavailable`),users:pv(cv,`Busy`)},lucide:H_};function hv({name:e,...t}){let{config:n}=jh(),r=(mv[n.value.customization.style.icon_library]??mv.pixelarticons)[e];return R(r,{...t})}var gv=`Ready when you are`,_v=`Start the conversation`;function vv(e){return typeof e==`string`&&e.length>0?e:``}var yv=new Set([`avif`,`bmp`,`gif`,`jpeg`,`jpg`,`png`,`svg`,`webp`]),bv=new Set([`m4v`,`mov`,`mp4`,`webm`]);function xv(e){try{return new URL(e).pathname}catch{return e.split(/[?#]/,1)[0]??``}}function Sv(e){let t=xv(e).replace(/\/+$/,``).split(`/`).pop()??``,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?null:t.slice(n+1).toLowerCase()}function Cv(e){let t=Sv(e);return t?yv.has(t)?`image`:bv.has(t)?`video`:`unknown`:`unknown`}function wv(e){let t=vv(e.replica_thumbnail_image_url)||null,n=vv(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function Tv(e){let{preview:t}=e.customization,{background:n}=t,r=wv(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=vv(n.url);return{title:t.title||gv,description:t.description||``,btn_title:t.btn_title||_v,background:{type:i,url:a}}}var Ev={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},Dv=`absolute inset-0 w-full h-full object-cover`,Ov=`#t=0.1`;function kv(e){return e.includes(`#`)?e:`${e}${Ov}`}function Av(){return R(`div`,{class:`absolute inset-0`,style:Ev})}var jv=new WeakMap;function Mv(e,t,n,r){if(!e)return;let i=jv.get(e)??new Set;jv.set(e,i);let a=`${t} ${n}`;i.has(a)||(i.add(a),e.record({stage:`media`,outcome:t,operation:`media.preview`,component:`media`,code:`asset_error`,handled:!0,duration_ms:performance.now()-r}))}function Nv({replica:e,fallback:t=null}){let[n,r]=M(()=>new Set),i=L(Pr)?.telemetry,{imageUrl:a,videoUrl:o}=e,s=F(()=>performance.now(),[a,o]),c=`${a??``} ${o??``}`,l=e=>{(e!==a||!o||n.has(o))&&Mv(i,`degraded`,c,s),r(t=>new Set(t).add(e))};return a&&!n.has(a)?R(`img`,{class:Dv,src:a,loading:`lazy`,alt:``,onError:()=>l(a)}):o&&!n.has(o)?R(`video`,{class:Dv,src:kv(o),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onLoadedData:()=>{a&&n.has(a)&&Mv(i,`recovered`,c,s)},onError:()=>l(o)}):R(D,{children:t})}function Pv(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Fv({url:e,onError:t}){let n=L(Pr)?.telemetry,[r]=M(()=>performance.now()),[i,a]=M(!1),[o,s]=M(!1);return i?R(Av,{}):R(D,{children:[!o&&R(Av,{}),R(`img`,{class:Dv,style:o?void 0:{opacity:0},src:e,alt:``,onLoad:()=>s(!0),onError:()=>{t?t():(Mv(n,`degraded`,e,r),a(!0))}})]})}function Iv({url:e}){let t=L(Pr)?.telemetry,[n]=M(()=>performance.now()),[r,i]=M(!1),[a,o]=M(!1),s=Pv();return r?R(Av,{}):R(D,{children:[!a&&R(Av,{}),R(`video`,{class:Dv,style:a?void 0:{opacity:0},src:s?kv(e):e,muted:!0,loop:!s,autoplay:!s,playsinline:!0,preload:s?`metadata`:void 0,controls:!1,onLoadedData:()=>o(!0),onError:()=>{Mv(t,`degraded`,e,n),i(!0)}})]})}function Lv({url:e}){let[t,n]=M(!1);return t?R(Iv,{url:e}):R(Fv,{url:e,onError:()=>n(!0)})}function Rv({url:e}){switch(Cv(e)){case`video`:return R(Iv,{url:e});case`image`:return R(Fv,{url:e});case`unknown`:return R(Lv,{url:e})}}function zv({variant:e,replica:t}){return e.type===`replica`&&t?R(Nv,{replica:t,fallback:R(Av,{})}):e.type===`custom-image`&&e.url?R(Rv,{url:e.url},e.url):R(Av,{})}function Bv({className:e=``}){let{config:t}=jh(),n=Tv(t.value),r=wv(t.value);return R(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:R(zv,{variant:n.background,replica:r})})}var Vv=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function Hv({title:e,description:t,media:n,children:r,overlay:i}){return R(`div`,{class:Vv,children:[n===void 0?R(Bv,{}):n,(e||t)&&R(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&R(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&R(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&R(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}function Uv({loading:e=!1,disabled:t,class:n,children:r,...i}){return R(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[R(`span`,{children:r}),e&&R(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:R(`span`,{class:`loading loading-spinner loading-sm`})})]})}var Wv={daily_limit:{title:`PAL is at today's limit`,description:`This PAL can take more conversations tomorrow.`},total_limit:{title:`PAL is unavailable`,description:`This PAL isn't available right now. Please check back later.`},busy:{title:`PAL is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this PAL`,description:`This PAL couldn't be loaded. Please try again later.`},captcha_unsupported:{title:`This PAL isn't available on this device`,description:`The security check couldn't run in this browser. Please try another device.`},insecure_context:{title:`PAL is unavailable`,description:`This PAL isn't available on this page.`},browser_unsupported:{title:`This PAL isn't available in this browser`,description:`Please try a different browser or device.`}};function Gv(e,t){let n=t?.[e];return{title:n?.title||Wv[e].title,description:n?.description||Wv[e].description}}var Kv={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`,insecure_context:`error`,browser_unsupported:`error`},qv={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`,insecure_context:`never`,browser_unsupported:`never`};function Jv({cause:e}){return R(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:R(hv,{name:Kv[e],size:`2rem`})})}function Yv({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=jh(),o=a.value.customization?.unavailable_screen,s=Gv(e,o),c=o?.cta??[],l=qv[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return R(Hv,{media:R(Jv,{cause:e}),title:s.title,description:s.description,children:d&&R(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[u&&R(Uv,{class:`btn-neutral rounded-box`,disabled:!t,loading:i,onClick:n,children:`Try again`}),c.map(e=>R(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&R(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function Xv(){let e=L(Sm);return{state:e.flowSignal.value,isStarting:e.isStarting,permissionRequest:e.permissionRequest,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var Zv={start_button:`Start the conversation`,ready_to_start:``};function Qv(){let{config:e}=jh(),{preview:t}=e.value.customization;return F(()=>({start_button:t.btn_title??Zv.start_button,ready_to_start:t.description??Zv.ready_to_start}),[t])}function $v(){return L(_t)?.layout??`inline`}function ey({kind:e,status:t}){if(e===`camera`)return`Allow camera access to use video. Camera is optional.`;switch(t){case`blocked`:return`Microphone is blocked. Allow access in your browser settings to continue.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;default:return`Allow microphone access to start the conversation.`}}function ty({message:e,class:t}){return R(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[R(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),R(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:R(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var ny=`text-preview-title @max-mobile:text-preview-title-narrow`,ry=`text-preview-title-full-screen`,iy=`text-sm @max-mobile:text-xs`,ay=`text-preview-description-full-screen`;function oy({title:e,description:t,fullScreen:n}){return!e&&!t?null:R(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&R(`h2`,{class:`${n?ry:ny} font-medium leading-tight`,children:e}),t&&R(`p`,{class:`${n?ay:iy} text-white/80 leading-snug`,children:t})]})}var sy=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,cy=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,ly=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,uy=`absolute inset-0 bg-black/45`,dy=`absolute inset-0 overflow-y-auto p-8 @max-mobile:p-5 text-white [text-shadow:0_1px_3px_rgb(0_0_0/0.45)]`;function fy({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=jh(),l=Tv(c.value),u=wv(c.value),d=$v()===`full-screen`,f=!!i;return R(`div`,{class:a?`${sy} ${a}`:sy,role:o,"aria-live":s,children:[R(zv,{variant:l.background,replica:u}),r===`center`?R(D,{children:[R(`div`,{class:uy}),R(`div`,{class:`${dy} flex flex-col items-center justify-center gap-3`,inert:f,children:n})]}):R(D,{children:[(e||t)&&(d?R(`div`,{class:cy}):R(D,{children:[R(`div`,{class:`${cy} hidden @max-mobile:block`}),R(`div`,{class:ly})]})),d?R(`div`,{class:dy,inert:f,children:[R(oy,{title:e,description:t,fullScreen:!0}),R(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):R(`div`,{class:`${dy} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,inert:f,children:[R(`div`,{class:`col-start-1 row-start-2 self-center @max-mobile:col-span-2 @max-mobile:row-start-1 @max-mobile:self-start`,children:R(oy,{title:e,description:t})}),R(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}var py={video:`cam`,audio:`mic`,chat:`chat`},my={"full-screen":`btn-lg px-16 @max-3xl:px-10 @max-md:btn-md @max-md:px-5`,inline:`px-8 @max-mobile:px-5`};function hy({children:e,loading:t=!1,...n}){let{config:r}=jh(),i=$v(),a=py[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return R(Uv,{class:`btn-preview-action rounded-box ${my[i]}`,loading:t,...n,children:o?R(`span`,{class:`flex items-center justify-center gap-2`,children:[R(hv,{name:a,"aria-hidden":!0}),e]}):e})}var gy=`Thanks for joining`,_y=`You can start a new conversation whenever you're ready.`,vy=`Start a new conversation`;function yy(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function by({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=jh(),a=$v()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>yy(e.url)),c=o.title||e?.title||gy,l=o.description||e?.description||_y,u=e?.restart||vy;return R(fy,{title:c,description:l,children:[R(`div`,{class:`relative`,children:[r&&R(ty,{message:ey(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),R(hy,{onClick:t,loading:n,children:u})]}),s.length>0&&R(`div`,{class:`flex flex-wrap items-center gap-2 ${a?`justify-center`:`justify-end`}`,children:s.map(e=>R(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn rounded-box border-white/50 bg-black/35 text-white backdrop-blur-xs hover:bg-black/50`,children:e.title},e.url))})]})}function xy(){let e=L(Pr)?.telemetry,t=P(!1);return{report:I(n=>{t.current||(t.current=!0,e?.record({stage:`media`,outcome:`failed`,operation:`media.playback`,component:`media`,code:`playback_error`,handled:!0,error_type:n&&Pn.has(n)?n:void 0}))},[e]),recover:I(()=>{t.current&&(t.current=!1,e?.record({stage:`media`,outcome:`recovered`,operation:`media.playback`,component:`media`}))},[e])}}var Sy=hp((e,t)=>{let{report:n,recover:r}=xy();return R(zp,{...e,ref:t,onPlayFailed:t=>{n(t instanceof Error?t.name:void 0),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})}),Cy=hp((e,t)=>{let{report:n,recover:r}=xy();return R(Bp,{...e,ref:t,onPlayFailed:t=>{n(t.name),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})});function wy(){let e=Xf(),t=Qf(),{isOff:n}=ip(t),{camState:r}=sp();return{isCamReady:F(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:I(()=>{e?.setLocalVideo(n)},[e,n])}}function Ty(){let e=Xf(),t=Qf(),{isOff:n}=ap(t),{micState:r}=sp();return{isMicReady:F(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:I(()=>{e?.setLocalAudio(n)},[e,n])}}function Ey(){let e=Xf(),t=Qf(),{isOff:n}=op(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:I(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var Dy={microphone:`microphone`,camera:`camera`};function Oy({class:e}){return R(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[R(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function ky(){return R(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[R(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),R(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),R(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),R(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:R(Oy,{})}),R(`g`,{transform:`translate(34 78)`,children:[R(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),R(`g`,{transform:`translate(40 120)`,children:[R(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),R(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var Ay=fp(({device:e,onClose:t})=>{let n=Dy[e];return N(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),R(`div`,{class:`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tavus-blocked-title`,onClick:t,children:R(`div`,{class:`relative w-full max-w-md rounded-box bg-base-100 text-base-content shadow-xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[R(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:R(hv,{name:`close`,size:`1.1rem`})}),R(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[R(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:R(ky,{})}),R(`div`,{class:`flex flex-col gap-4`,children:[R(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),R(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[R(`li`,{class:`flex items-start gap-2`,children:[R(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),R(`span`,{class:`leading-snug`,children:[`Click the `,R(Oy,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),R(`li`,{class:`flex items-start gap-2`,children:[R(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),R(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),R(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),jy=xe({open:()=>{},close:()=>{}});function My(){return L(jy)}function Ny({children:e}){let[t,n]=M(null),r=I(e=>n(e),[]),i=I(()=>n(null),[]),a=F(()=>({open:r,close:i}),[r,i]);return R(jy.Provider,{value:a,children:[e,t&&R(Ay,{device:t,onClose:i})]})}var Py=fp(()=>R(`span`,{"aria-hidden":`true`,class:`absolute -top-0.5 -right-0.5 z-20 flex h-4 w-4 items-center justify-center rounded-full bg-warning text-warning-content text-[0.6rem] font-bold leading-none ring-2 ring-base-100 pointer-events-none`,children:`!`})),Fy=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,Iy=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,Ly=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,Ry=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,zy=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function By(){return R(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:R(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function Vy(){let e=Qf(),t=P(null),n=P(void 0);return cp(e??``,I(e=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let n=Math.max(0,Math.min(1,e**.6));t.current?.style.setProperty(`--mic-level`,String(n))})},[])),R(`span`,{ref:t,"aria-hidden":`true`,class:`pointer-events-none absolute inset-x-0 bottom-0 z-0 bg-success/70`,style:{"--mic-level":`0`,height:`calc(var(--mic-level, 0) * 100%)`,transition:`height 100ms ease-out`}})}function Hy({value:e,devices:t,disabled:n,onChange:r,label:i}){return R(D,{children:[R(`select`,{class:Iy,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>R(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),R(`span`,{class:Ly,children:R(By,{})})]})}function Uy(e){return R(`div`,{class:Fy,children:R(Hy,{...e})})}function Wy({iconName:e,...t}){return R(`div`,{class:Fy,children:[R(`span`,{class:Ry,"aria-hidden":`true`,children:R(hv,{name:e})}),R(Hy,{...t})]})}var Gy=fp(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=Ty(),{microphones:i,currentMic:a,setMicrophone:o}=sp();if(!a||(i?.length??0)<=1)return R(Jy,{level:e});let s=e&&n&&!r;return R(`div`,{class:`relative inline-flex items-center`,children:[R(Uy,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),R(`button`,{type:`button`,onClick:t,disabled:!n,class:`${zy} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&R(Vy,{}),R(`span`,{class:`relative z-10 inline-flex`,children:R(hv,{name:r||!n?`mic-off`:`mic`})})]})]})});function Ky(){let{onToggleCamera:e,isCamMuted:t}=wy(),{camera:n,requestCamera:r}=Gh(),{open:i}=My(),a=n.isGranted&&!t;return{isOn:a,onClick:()=>{if(n.isBlocked)return i(`camera`);if(a)return e();r()},label:a?`Turn camera off`:n.isGranted?`Turn camera on`:`Enable camera`,needsAttention:n.needsAttention}}var qy=fp(()=>{let{isCamReady:e}=wy(),{currentCam:t,cameras:n,setCamera:r}=sp(),i=Ky();return!t||(n?.length??0)<=1?R(Yy,{}):R(`div`,{class:`relative inline-flex items-center`,children:[R(Uy,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),R(`button`,{type:`button`,onClick:i.onClick,class:zy,"aria-label":i.label,"aria-pressed":!i.isOn,children:R(hv,{name:i.isOn?`cam`:`cam-off`})})]})}),Jy=fp(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=Ty(),{mic:r,requestMic:i}=Gh(),{open:a}=My(),o=()=>{if(r.isGranted)return t();if(r.isBlocked)return a(`microphone`);i()},s=r.isGranted?n?`Unmute microphone`:`Mute microphone`:`Allow microphone access`,c=e&&r.isGranted&&!n;return R(`span`,{class:`relative inline-flex`,children:[R(`button`,{type:`button`,onClick:o,class:`btn btn-control btn-neutral relative overflow-hidden`,"aria-label":s,"aria-pressed":r.isGranted?n:void 0,children:[c&&R(Vy,{}),R(`span`,{class:`relative z-10 inline-flex`,children:R(hv,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&R(Py,{})]})}),Yy=fp(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Ky();return R(`span`,{class:`relative inline-flex`,children:[R(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:R(hv,{name:e?`cam`:`cam-off`})}),r&&R(Py,{})]})});fp(({compact:e=!1}={})=>{let{isMicReady:t}=Ty(),{microphones:n,currentMic:r,setMicrophone:i}=sp();return(n?.length??0)<=1?null:R(Wy,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),fp(({compact:e=!1}={})=>{let{isCamReady:t}=wy(),{currentCam:n,cameras:r,setCamera:i}=sp();return(r?.length??0)<=1?null:R(Wy,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Xy=fp((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=Ey();return R(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:R(hv,{name:`screen-share`})})});function Zy(e){let t=L(ah);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return N(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Qy=xe(null);function $y({children:e,defaultEnabled:t=!1}){let[n,r]=M(t),i=I(()=>r(e=>!e),[]),a=F(()=>({isEnabled:n,toggle:i}),[n,i]);return R(Qy.Provider,{value:a,children:e})}function eb(){let e=L(Qy);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var tb=fp(()=>{let{isEnabled:e,toggle:t}=eb();return R(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:R(hv,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),nb=fp(()=>{let{isEnabled:e}=eb(),{captionText:t,captionRole:n}=Zy(),r=t.value,i=n.value;return!e||!r?null:R(`div`,{class:`cvi-strip-lift pointer-events-none absolute bottom-[calc(6rem_+_var(--cvi-status-strip,0px))] left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white z-40`,role:`status`,"aria-live":`polite`,children:R(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:R(`div`,{children:[R(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),rb=xe(null);function ib({children:e,defaultOpen:t=!1}){let[n,r]=M(t),i=I(()=>r(e=>!e),[]),a=I(()=>r(!1),[]),o=F(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return R(rb.Provider,{value:o,children:e})}function ab(){let e=L(rb);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var ob=fp((e={})=>{let{isOpen:t,toggle:n}=ab();return R(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:R(hv,{name:`chat`})})}),sb=fp(({message:e})=>{let t=e.sender===`user`;return R(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[R(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),R(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),cb=fp(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=ab(),{chatMessages:i,sendChat:a,session:o}=Zy(),s=o.value?.conversationId??null,c=i.value,[l,u]=M(``),d=P(null);N(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=I(()=>{let e=l.trim();e&&s&&(a(e),u(``))},[l,a,s]),p=I(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return R(`aside`,{class:e?`absolute inset-0 w-full h-full bg-base-100 flex flex-col z-30`:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${n?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e&&!n,inert:!e&&!n,children:[R(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[R(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:R(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:R(hv,{name:`close`,size:20})})]}),R(`ul`,{ref:d,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:c.length===0?R(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>R(sb,{message:e},e.id))}),R(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[R(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:s?`Type a message…`:`Connecting…`,disabled:!s,rows:1,"aria-label":`Message`}),R(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:R(hv,{name:`send`,size:18})})]})]})});function lb({label:e}){return R(fy,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:R(`div`,{class:`flex items-center gap-2`,children:[R(`span`,{class:`loading loading-spinner loading-sm`}),R(`span`,{class:`text-base font-medium`,children:e})]})})}var ub=fp(()=>R(lb,{label:`Connecting…`})),db=fp(()=>R(lb,{label:`Leaving…`}));function fb({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return R(`div`,{class:`flex items-center gap-2`,children:[r&&R(`span`,{class:`rounded-field bg-base-100 px-2 py-1 text-xs font-medium whitespace-nowrap text-base-content shadow-md motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,children:`Expand for a better view`}),R(`button`,{type:`button`,onClick:t,class:`btn btn-xs btn-control ${r?`btn-primary`:e?`btn-info`:`btn-neutral`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:R(hv,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var pb=fp(({id:e})=>{let t=$f()===e,n=P(null),r=P(null),i=P(null),a=P(void 0);cp(e,I(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return R(`div`,{class:`flex items-center justify-center w-6 h-6`,children:R(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[R(`div`,{ref:n,class:o,style:{height:`20%`}}),R(`div`,{ref:r,class:o,style:{height:`20%`}}),R(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),mb=[0,1,2],hb=.05,gb=450;function _b({sessionId:e,className:t=``}){let{config:n}=jh(),r=Tv(n.value),i=wv(n.value),a=P(null),o=P(void 0),s=P(void 0),[c,l]=M(!1),u=P(!1);return cp(e??``,I(t=>{e&&(o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));a.current?.style.setProperty(`--audio-level`,String(e)),e>hb?(s.current&&=(clearTimeout(s.current),void 0),u.current||(u.current=!0,l(!0))):u.current&&s.current===void 0&&(s.current=setTimeout(()=>{s.current=void 0,u.current=!1,l(!1)},gb))}))},[e])),N(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),R(`div`,{ref:a,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[mb.map(e=>R(`div`,{class:`absolute inset-[16%] rounded-full will-change-transform`,style:{border:`2px solid var(--color-primary)`,opacity:0,animation:c?`tavusAudioWave 2.4s ease-out ${e*.8}s infinite`:`none`,"--wave-peak":`calc(0.18 + var(--audio-level, 0) * 0.5)`}},e)),R(`div`,{class:`absolute inset-[16%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 60%, transparent), transparent 70%)`,filter:`blur(20px)`,scale:`calc(1 + var(--audio-level, 0) * 0.25)`,opacity:`calc(0.35 + var(--audio-level, 0) * 0.5)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),R(`div`,{class:`absolute inset-[20%] rounded-full overflow-hidden bg-base-300 ring-2 ring-base-100/20 shadow-xl will-change-transform`,style:{scale:`calc(1 + var(--audio-level, 0) * 0.06)`,transition:`scale 100ms ease-out`},children:R(zv,{variant:r.background,replica:i})})]})}function vb({children:e,class:t,className:n,...r}){return R(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),R(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var yb=e=>!!e.user_id?.includes(`tavus-replica`);function bb(){return np({filter:yb})}function xb(e){let t=bb()[0],n=ip(t??``),r=Zf(),[i,a]=M(!1);return N(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var Sb=fp(({isAudioOnly:e})=>{let t=xb(e);return t.phase===`left`?R(db,{}):t.phase===`connecting`?R(ub,{}):e?R(vb,{class:`flex items-center justify-center`,children:R(_b,{sessionId:t.replicaId})}):R(`div`,{class:`relative w-full h-full`,children:R(Sy,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`})})}),Cb=fp(({onLeave:e})=>{let{config:t}=jh(),n=t.value.customization.conversation.modality===`audio`;return R(`div`,{class:`@container/pip w-full h-full`,children:R(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[R(`div`,{class:`relative w-full h-full z-5`,children:R(Sb,{isAudioOnly:n})}),R(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[R(Jy,{}),!n&&R(Yy,{}),R(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:R(hv,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function wb(e,t){return e<=0||t<=0?!1:e/t<.75}var Tb=fp(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=P(null),o=i??a,[s,c]=M(0),[l,u]=M(0),d=I(({aspectRatio:e})=>c(e),[]);N(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[e.length-1].contentRect;u(n>0?t/n:0)});return t.observe(e),()=>t.disconnect()},[o]);let f=n?t??``:e,p=!n&&r,m=!n&&wb(s,l),h=n||m;return R(D,{children:[m&&R(Sy,{sessionId:e,type:`video`,fit:`cover`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 w-full h-full object-cover scale-110 blur-xl brightness-[0.55] ${p?`hidden`:``}`}),R(Sy,{ref:o,automirror:!0,sessionId:f,type:n?`screenVideo`:`video`,fit:h?`contain`:`cover`,onResize:n?void 0:d,className:`absolute inset-0 w-full h-full transition-all ${h?`object-contain`:`object-cover`} ${p?`hidden`:``}`})]})}),Eb=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),Db=new Set([`tavusapi.com`]);function Ob(e){let t;try{t=new URL(e)}catch{return!1}return Mb(t)?!0:t.protocol===`https:`&&Eb.has(t.hostname)}function kb(e){return Ob(e)}function Ab(e){try{return Mb(new URL(e))}catch{return!1}}function jb(e){let t;try{t=new URL(e)}catch{return!1}return Nb(t)?!0:t.protocol===`https:`&&Db.has(t.hostname)}function Mb(e){return Nb(e)}function Nb(e){return!Pb()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function Pb(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}function Fb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ib=new Set([`canvas.question`,`canvas.input`,`canvas.calendar`,`canvas.scheduling_embed`]);[...new Set([`direct_user`,`autonomous`,`system`])];var Lb=new Set([`clear`,`replacement`]);function Rb(e,t,n){return t===`submit`&&n===`direct_user`&&Ib.has(e)}function zb(e,t,n,r){if(r!==void 0&&(!r||n===void 0||!Rb(e,t,n)))throw Error(`Canvas response text is allowed only for a supported direct-user submit.`)}function Bb(e,t){if(t===`system`||Lb.has(e))throw Error(`Canvas producer interactions cannot mint host-only system actions.`)}async function Vb(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var Hb=`tavus.canvas.interaction`,Ub=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],Wb=`safe-area-right`,Gb={x:275/1280,y:111/720,width:730/1280,height:609/720},Kb={type:`snapshot_mirror`};function qb(e){return xx(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&xx(e.properties):!1}function Jb(e){if(!xx(e))return null;let t=Fx(e,`component`),n=Fx(e,`component_version`),r=Fx(e,`sandbox_url`),i=Rx(e,`mcp_server_url`,kb),a=Rx(e,`api_base_url`,jb),o=Rx(e,`interaction_url`,jb),s=Tx(e.layout),c=Bx(e),l=e.version;return l!==1||!t||!n||!r||!Ob(r)||!Xb(r,t,n)||i===null||a===null||o===null||s===null||c===null?null:{version:l,component:t,component_version:n,resource_uri:Fx(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:Fx(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,...c,layout:s,host_context:xx(e.host_context)?e.host_context:void 0}}var Yb=/^\/canvas\/([^/]+)\/([^/]+)(?:\/|$)/;function Xb(e,t,n){let r;try{r=new URL(e)}catch{return!1}let i=Yb.exec(r.pathname);return i?t===`canvas.${i[1]}`&&n===i[2]:Ab(e)}function Zb(e){if(e===void 0)return{ok:!0,value:{}};if(xx(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return xx(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:Sx(e)}}}function Qb(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=Zb(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!xx(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}var $b=[`safe-area-left`,`safe-area-right`];function ex(e){let t=$b.includes(e.preferred_slot)?e.preferred_slot:Wb;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function tx(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function nx(e,t){return[t]}function rx(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return nx(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=_x(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:ex({preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop}),revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&tx(o.layout)===tx(i.layout)?a:nx(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>e.conversation_id!==t.conversation_id||e.tool_call_id!==t.tool_call_id):e.filter(e=>e.conversation_id!==t.conversation_id)}}var ix=`canvas.task_status`;function ax(e){return e.canvas_config.component===ix}function ox(e,t){return t.kind===`show`?ax(t.instance):e!==null&&t.tool_call_id!==void 0&&t.tool_call_id===e.tool_call_id&&t.conversation_id===e.conversation_id}function sx(e,t){return ox(e,t)?{strip:rx(e?[e]:[],t)[0]??null,consumed:!0}:{strip:e,consumed:!1}}function cx(e){if(!xx(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!xx(t))continue;let e=(xx(t._meta)?t._meta:null)?.[Hb];if(xx(e))return zx(e)}return null}function lx(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);if(e.canvas_config.protocol_mode===`v1`&&!t.interaction_id)throw Error(`Magic Canvas v1 interaction requires a producer-supplied interaction_id.`);if(e.canvas_config.protocol_mode===`v1`&&(t.protocol_version!==1||!t.initiation_source||!t.initiated_at||!Number.isSafeInteger(t.producer_revision)||(t.producer_revision??-1)<0||!t.payload_digest))throw Error(`Magic Canvas v1 interaction causal envelope is incomplete.`);if(e.canvas_config.protocol_mode===`v1`&&t.producer_revision!==e.revision)throw Error(`Magic Canvas v1 interaction does not match the mounted card revision.`);return Bb(n,t.initiation_source),zb(e.canvas_config.component,n,t.initiation_source,t.response_text),{interaction_id:t.interaction_id??bx(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:e.canvas_config.component,component_version:e.canvas_config.component_version,type:n,value:r,metadata:xx(t.metadata)?t.metadata:{},protocol_mode:e.canvas_config.protocol_mode,protocol_version:t.protocol_version,initiation_source:t.initiation_source,initiated_at:t.initiated_at,producer_revision:t.producer_revision,payload_digest:t.payload_digest,response_text:t.response_text,issued_card_capability:e.canvas_config.issued_card_capability}}function ux(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function dx(e,t){if(!xx(e)||!Array.isArray(e.content))return``;let n=e.content.map(e=>xx(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
56
|
-
`).trim();if(!t){
|
|
57
|
-
`)
|
|
58
|
-
`).trim():``}function wx(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function Tx(e){if(e===void 0)return;if(!xx(e))return null;let t=Ex(e),n=jx(e.safe_area??e.safeArea),r=Mx(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...Nx(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function Ex(e){if(typeof e==`string`&&Px(e))return e;if(!xx(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&Px(t)?t:void 0}function Dx(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function Ox(e){let t=xx(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function kx(e){let t=xx(e.layout)?e.layout:void 0;return jx(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function Ax(e){let t=xx(e.layout)?e.layout:void 0;return Mx(e.backdrop??t?.backdrop)??void 0}function jx(e){if(e===void 0)return;if(!xx(e))return null;let t=Ix(e,`x`),n=Ix(e,`y`),r=Ix(e,`width`),i=Ix(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:Lx(t,0,1),y:Lx(n,0,1),width:Lx(r,0,1),height:Lx(i,0,1)}}function Mx(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!xx(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function Nx(e,t){return typeof e==`boolean`?{[t]:e}:{}}function Px(e){return Ub.includes(e)}function Fx(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function Ix(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function Lx(e,t,n){return Math.min(Math.max(e,t),n)}function Rx(e,t,n){let r=Fx(e,t);if(r)return n(r)?r:null}function zx(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!xx(e.metadata)||e.protocol_version!==void 0&&typeof e.protocol_version!=`number`||e.initiation_source!==void 0&&e.initiation_source!==`direct_user`&&e.initiation_source!==`autonomous`&&e.initiation_source!==`system`&&e.initiation_source!==`unknown`||e.initiated_at!==void 0&&typeof e.initiated_at!=`string`||e.producer_revision!==void 0&&typeof e.producer_revision!=`number`||e.payload_digest!==void 0&&typeof e.payload_digest!=`string`||e.response_text!==void 0&&typeof e.response_text!=`string`?null:e}function Bx(e){let t=Object.hasOwn(e,`protocol_mode`),n=Object.hasOwn(e,`protocol_version`),r=Object.hasOwn(e,`issued_card_capability`);if(!t&&!n&&!r)return{};if(e.protocol_mode===`legacy`)return n&&e.protocol_version!==null||r?null:{protocol_mode:`legacy`,protocol_version:null};if(e.protocol_mode!==`v1`||e.protocol_version!==1)return null;let i=Fx(e,`issued_card_capability`);return i?{protocol_mode:`v1`,protocol_version:1,issued_card_capability:i}:null}var Vx=`tavus-deployment magic-canvas/0.0.0`;function Hx(e){if(!qb(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=Jb(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=Zb(e.properties.arguments);if(!r.ok)throw r.error;return px({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function Ux(e){if(!qb(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=Hx(e);return t?{kind:`show`,instance:t}:null}return Qb(e)}function Wx(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function Gx(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:yx(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:Vx,styles:{variables:Kx(e.cssVars)}}}function Kx(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...e[`--font-mono`]?{"--font-mono":e[`--font-mono`]}:{},...qx(e)}}function qx(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o=e[`--color-primary`],s=e[`--tavus-magic-canvas-accent`],c={},l=(e,t)=>{t&&(c[e]=t)},u=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return l(`--color-background-primary`,n),l(`--color-background-secondary`,r),l(`--color-border-secondary`,i),l(`--color-border-primary`,u(t,28,n)),l(`--color-text-primary`,t),l(`--color-text-secondary`,u(t,62,n)),l(`--color-text-danger`,a),l(`--color-border-danger`,a),l(`--color-ring-primary`,s||o),c}var Jx=96;function Yx(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function Xx(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function Zx(e){if(!e)return null;let t=e.getBoundingClientRect();return t.width<=0||t.height<=0?null:{left:t.left,right:t.right,top:t.top,bottom:t.bottom}}function Qx(e,t,n,r){if(!t)return!1;let i=r?r.left:0,a=r?r.top:0,o=r?r.right-r.left:globalThis.innerWidth,s=r?r.bottom-r.top:globalThis.innerHeight,c=e?.safe_area??Gb,l=i+c.x*o+n,u=i+(c.x+c.width)*o+n,d=a+c.y*s,f=a+(c.y+c.height)*s;return l<t.right&&u>t.left&&d<t.bottom&&f>t.top}function $x(e,t,n){let[r,i]=M(()=>e?Yx(Xx(n?.current)):null);return Xe(()=>{if(!e){i(null);return}let t=Xx(n?.current),r=()=>i(Yx(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function eS(e,t,n){let[r,i]=M(()=>t?Zx(e.current):null);return Xe(()=>{if(!t){i(null);return}let n=()=>i(Zx(e.current)),r=new ResizeObserver(n);n(),e.current&&r.observe(e.current),r.observe(document.documentElement);let a=globalThis.requestAnimationFrame(n);return globalThis.addEventListener(`resize`,n),()=>{r.disconnect(),globalThis.removeEventListener(`resize`,n),globalThis.cancelAnimationFrame(a)}},[t,n,e]),t?r:null}function tS(e,t,n,r,i,a){let o=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:o!=null&&(t===`pip`||t===`auto`&&Qx(e,r,i,a)),side:o}}function nS(e,t=document,n){let r=n?n.left:0,i=n?n.right:globalThis.innerWidth,a=n?n.top:0,o=n?n.bottom:globalThis.innerHeight,s=i-r,c=o-a,l=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),u,d,f,p;if(l.length>0){let t=Math.min(...l.map(e=>e.left)),n=Math.max(...l.map(e=>e.right));f=Math.min(...l.map(e=>e.top)),p=Math.max(...l.map(e=>e.bottom)),[u,d]=e===`right`?[r,t]:[n,i]}else{let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let m=d-u>=144&&p-f>=Jx&&u>=r&&d<=i;if(l.length>0&&!m){let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let h=Math.max(0,d-u-48),g=Math.max(Jx,Math.min(h,c-48));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var rS=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function iS(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function aS(e,t,n){let[r,i]=M(()=>e&&t?nS(t,Xx(n?.current),Zx(n?.current)):null);return Xe(()=>{if(!e||!t){i(null);return}let r=Xx(n?.current),a=()=>i(nS(t,r,Zx(n?.current))),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),n?.current&&o.observe(n.current),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function oS(e,t){let[n,r]=M(null);return Xe(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var sS=1;function cS(e,t,n){return Math.min(Math.max(e,t),n)}function lS(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??Gb,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:cS(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:cS(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var uS=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function dS(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=lS(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function fS(e,t,n){let r=P(null),i=P(e),a=P(n),o=P(0),s=P(0);i.current=e,a.current=n,N(()=>{let e=i.current;if(!e)return;if(!r.current||pS()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of uS){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?uS.map(t=>Math.round(e[t]*100)).join():``,t]),N(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function pS(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function mS({geom:e,visible:t}){return R(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function hS(e,t){let n=t>=0?`left`:`right`,r=P({side:n,shift:t});N(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:iS(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function gS(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function _S({snapshotUrl:e,transformOrigin:t}){return R(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function vS({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return R(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:R(_S,{snapshotUrl:e,transformOrigin:r})})}function yS({ambient:e,usePip:t,transition:n}){return e===`none`?null:R(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function bS({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return R(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:R(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&R(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${sS}px)`}:{right:`calc(100% - ${sS}px)`},children:R(_S,{snapshotUrl:t,transformOrigin:`center`})})]})})}function xS({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=rS,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=P(null),[f,p]=M(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=P(null),_=gS(e,h,c),{usePip:v,side:y}=tS(e,s,c,$x(s!==`shift`,_,g),h,eS(g,s!==`shift`,_)),b=aS(s!==`shift`,y,g),x=hS(m,h);N(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);t?p(t):(r+=1,r<8&&(n=globalThis.setTimeout(a,150)))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),N(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=oS(g,C),T=f!==null&&!C,E=C&&y!=null,D=P(null),ee=P(null),[O,k]=M(!0),A=P(!0),te=I((e,t)=>{let n=D.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=ee.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),A.current!==t&&(A.current=t,k(t))},[]);return fS(C?dS(b,S,w,h,e):null,o,te),R(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&R(vS,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&R(yS,{ambient:l,usePip:v,transition:a}),R(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:R(bS,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:D,videoWrapRef:ee,fill:r,videoRef:d})}),C&&b&&R(mS,{geom:b,visible:S&&O}),u]})}var SS=480,CS=fp(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return R(`div`,{class:`absolute inset-0 overflow-hidden`,children:R(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${SS}px`:`0px`,right:o<0?`${SS}px`:`0px`,transition:`left ${rS}, right ${rS}`},children:[R(Sy,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),R(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:a?R(`div`,{class:`flex w-full h-full items-center justify-center`,children:R(_b,{sessionId:e})}):R(Sy,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})})});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function wS(e){return e&&Object.assign(OS,e),OS}var TS,ES,DS,OS,kS=n((()=>{ES=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},DS=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(TS=globalThis).__zod_globalConfig??(TS.__zod_globalConfig={}),OS=globalThis.__zod_globalConfig}));function AS(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function jS(e,t){return typeof t==`bigint`?t.toString():t}function MS(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function NS(e){return e==null}function PS(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function FS(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function IS(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==sC)return r===void 0&&(r=sC,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function LS(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function RS(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function zS(e){return JSON.stringify(e)}function BS(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function VS(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function HS(e){if(VS(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return VS(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function US(e){return HS(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function WS(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function GS(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function KS(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function qS(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return GS(e,RS(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return LS(this,`shape`,e),e},checks:[]}))}function JS(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return GS(e,RS(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return LS(this,`shape`,r),r},checks:[]}))}function YS(e,t){if(!HS(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return GS(e,RS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return LS(this,`shape`,n),n}}))}function XS(e,t){if(!HS(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return GS(e,RS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return LS(this,`shape`,n),n}}))}function ZS(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return GS(e,RS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return LS(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function QS(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return GS(t,RS(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return LS(this,`shape`,i),i},checks:[]}))}function $S(e,t,n){return GS(t,RS(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return LS(this,`shape`,i),i}}))}function eC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function nC(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rC(e){return typeof e==`string`?e:e?.message}function iC(e,t,n){let r=e.message?e.message:rC(e.inst?._zod.def?.error?.(e))??rC(t?.error?.(e))??rC(n.customError?.(e))??rC(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function aC(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function oC(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var sC,cC,lC,uC,dC,fC=n((()=>{kS(),sC=Symbol(`evaluating`),cC=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},lC=MS(()=>{if(OS.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),uC=new Set([`string`,`number`,`symbol`]),dC={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function pC(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function mC(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var hC,gC,_C,vC=n((()=>{kS(),fC(),hC=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},gC=K(`$ZodError`,hC),_C=K(`$ZodError`,hC,{Parent:Error})})),yC,bC,xC,SC,CC,wC,TC,EC,DC,OC,kC,AC,jC,MC,NC=n((()=>{kS(),vC(),fC(),yC=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new ES;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>iC(e,a,wS())));throw cC(t,i?.callee),t}return o.value},bC=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>iC(e,a,wS())));throw cC(t,i?.callee),t}return o.value},xC=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ES;return a.issues.length?{success:!1,error:new(e??gC)(a.issues.map(e=>iC(e,i,wS())))}:{success:!0,data:a.value}},SC=xC(_C),CC=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>iC(e,i,wS())))}:{success:!0,data:a.value}},wC=CC(_C),TC=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return yC(e)(t,n,i)},EC=e=>(t,n,r)=>yC(e)(t,n,r),DC=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bC(e)(t,n,i)},OC=e=>async(t,n,r)=>bC(e)(t,n,r),kC=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xC(e)(t,n,i)},AC=e=>(t,n,r)=>xC(e)(t,n,r),jC=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return CC(e)(t,n,i)},MC=e=>async(t,n,r)=>CC(e)(t,n,r)}));function PC(){return new RegExp(JC,`u`)}function FC(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function IC(e){return RegExp(`^${FC(e)}$`)}function LC(e){let t=FC({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${rw}T(?:${r})$`)}var RC,zC,BC,VC,HC,UC,WC,GC,KC,qC,JC,YC,XC,ZC,QC,$C,ew,tw,nw,rw,iw,aw,ow,sw,cw,lw,uw,dw,fw,pw=n((()=>{RC=/^[cC][0-9a-z]{6,}$/,zC=/^[0-9a-z]+$/,BC=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,VC=/^[0-9a-vA-V]{20}$/,HC=/^[A-Za-z0-9]{27}$/,UC=/^[a-zA-Z0-9_-]{21}$/,WC=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,GC=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,KC=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qC=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,JC=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,YC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XC=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ZC=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,QC=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$C=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ew=/^[A-Za-z0-9_-]*$/,tw=/^https?$/,nw=/^\+[1-9]\d{6,14}$/,rw=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,iw=RegExp(`^${rw}$`),aw=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ow=/^-?\d+$/,sw=/^-?\d+(?:\.\d+)?$/,cw=/^(?:true|false)$/i,lw=/^null$/i,uw=/^undefined$/i,dw=/^[^A-Z]*$/,fw=/^[^a-z]*$/})),mw,hw,gw,_w,vw,yw,bw,xw,Sw,Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw=n((()=>{kS(),pw(),fC(),mw=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hw={number:`number`,bigint:`bigint`,object:`date`},gw=K(`$ZodCheckLessThan`,(e,t)=>{mw.init(e,t);let n=hw[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_w=K(`$ZodCheckGreaterThan`,(e,t)=>{mw.init(e,t);let n=hw[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vw=K(`$ZodCheckMultipleOf`,(e,t)=>{mw.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):FS(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yw=K(`$ZodCheckNumberFormat`,(e,t)=>{mw.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=dC[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=ow)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),bw=K(`$ZodCheckMaxLength`,(e,t)=>{var n;mw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!NS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=aC(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xw=K(`$ZodCheckMinLength`,(e,t)=>{var n;mw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!NS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=aC(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sw=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;mw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!NS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=aC(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Cw=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;mw.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ww=K(`$ZodCheckRegex`,(e,t)=>{Cw.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tw=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=dw,Cw.init(e,t)}),Ew=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=fw,Cw.init(e,t)}),Dw=K(`$ZodCheckIncludes`,(e,t)=>{mw.init(e,t);let n=WS(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ow=K(`$ZodCheckStartsWith`,(e,t)=>{mw.init(e,t);let n=RegExp(`^${WS(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),kw=K(`$ZodCheckEndsWith`,(e,t)=>{mw.init(e,t);let n=RegExp(`.*${WS(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Aw=K(`$ZodCheckOverwrite`,(e,t)=>{mw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Mw,Nw=n((()=>{Mw=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
55
|
+
`;function fv(e){return e.replace(/\s(width|height)="\d+"/g,``)}function pv(e,t){let n=fv(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>R(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var mv={pixelarticons:{close:pv(q_,`Close`),cancel:pv(J_,`Cancel`),leave:pv($_,`Leave call`),more:pv(rv,`More`),error:pv(X_,`Error`),mic:pv(ev,`Microphone`),"mic-off":pv(tv,`Microphone muted`),cam:pv(dv,`Camera`),"cam-off":pv(U_,`Camera off`),"screen-share":pv(av,`Screen share`),pip:pv(iv,`Picture in picture`),user:pv(sv,`User`),"face-smile":pv(lv,`Camera off`),captions:pv(W_,`Closed captions`),chat:pv(G_,`Chat`),fullscreen:pv(Q_,`Enter fullscreen`),"fullscreen-exit":pv(Y_,`Exit fullscreen`),expand:pv(Z_,`Expand`),collapse:pv(Y_,`Collapse`),send:pv(ov,`Send`),"external-link":pv(uv,`External link`),clock:pv(K_,`Clock`),moon:pv(nv,`Unavailable`),users:pv(cv,`Busy`)},lucide:H_};function hv({name:e,...t}){let{config:n}=jh(),r=(mv[n.value.customization.style.icon_library]??mv.pixelarticons)[e];return R(r,{...t})}var gv=`Ready when you are`,_v=`Start the conversation`;function vv(e){return typeof e==`string`&&e.length>0?e:``}var yv=new Set([`avif`,`bmp`,`gif`,`jpeg`,`jpg`,`png`,`svg`,`webp`]),bv=new Set([`m4v`,`mov`,`mp4`,`webm`]);function xv(e){try{return new URL(e).pathname}catch{return e.split(/[?#]/,1)[0]??``}}function Sv(e){let t=xv(e).replace(/\/+$/,``).split(`/`).pop()??``,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?null:t.slice(n+1).toLowerCase()}function Cv(e){let t=Sv(e);return t?yv.has(t)?`image`:bv.has(t)?`video`:`unknown`:`unknown`}function wv(e){let t=vv(e.replica_thumbnail_image_url)||null,n=vv(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function Tv(e){let{preview:t}=e.customization,{background:n}=t,r=wv(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=vv(n.url);return{title:t.title||gv,description:t.description||``,btn_title:t.btn_title||_v,background:{type:i,url:a}}}var Ev={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},Dv=`absolute inset-0 w-full h-full object-cover`,Ov=`#t=0.1`;function kv(e){return e.includes(`#`)?e:`${e}${Ov}`}function Av(){return R(`div`,{class:`absolute inset-0`,style:Ev})}var jv=new WeakMap;function Mv(e,t,n,r){if(!e)return;let i=jv.get(e)??new Set;jv.set(e,i);let a=`${t} ${n}`;i.has(a)||(i.add(a),e.record({stage:`media`,outcome:t,operation:`media.preview`,component:`media`,code:`asset_error`,handled:!0,duration_ms:performance.now()-r}))}function Nv({replica:e,fallback:t=null}){let[n,r]=M(()=>new Set),i=L(Pr)?.telemetry,{imageUrl:a,videoUrl:o}=e,s=F(()=>performance.now(),[a,o]),c=`${a??``} ${o??``}`,l=e=>{(e!==a||!o||n.has(o))&&Mv(i,`degraded`,c,s),r(t=>new Set(t).add(e))};return a&&!n.has(a)?R(`img`,{class:Dv,src:a,loading:`lazy`,alt:``,onError:()=>l(a)}):o&&!n.has(o)?R(`video`,{class:Dv,src:kv(o),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onLoadedData:()=>{a&&n.has(a)&&Mv(i,`recovered`,c,s)},onError:()=>l(o)}):R(D,{children:t})}function Pv(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Fv({url:e,onError:t}){let n=L(Pr)?.telemetry,[r]=M(()=>performance.now()),[i,a]=M(!1),[o,s]=M(!1);return i?R(Av,{}):R(D,{children:[!o&&R(Av,{}),R(`img`,{class:Dv,style:o?void 0:{opacity:0},src:e,alt:``,onLoad:()=>s(!0),onError:()=>{t?t():(Mv(n,`degraded`,e,r),a(!0))}})]})}function Iv({url:e}){let t=L(Pr)?.telemetry,[n]=M(()=>performance.now()),[r,i]=M(!1),[a,o]=M(!1),s=Pv();return r?R(Av,{}):R(D,{children:[!a&&R(Av,{}),R(`video`,{class:Dv,style:a?void 0:{opacity:0},src:s?kv(e):e,muted:!0,loop:!s,autoplay:!s,playsinline:!0,preload:s?`metadata`:void 0,controls:!1,onLoadedData:()=>o(!0),onError:()=>{Mv(t,`degraded`,e,n),i(!0)}})]})}function Lv({url:e}){let[t,n]=M(!1);return t?R(Iv,{url:e}):R(Fv,{url:e,onError:()=>n(!0)})}function Rv({url:e}){switch(Cv(e)){case`video`:return R(Iv,{url:e});case`image`:return R(Fv,{url:e});case`unknown`:return R(Lv,{url:e})}}function zv({variant:e,replica:t}){return e.type===`replica`&&t?R(Nv,{replica:t,fallback:R(Av,{})}):e.type===`custom-image`&&e.url?R(Rv,{url:e.url},e.url):R(Av,{})}function Bv({className:e=``}){let{config:t}=jh(),n=Tv(t.value),r=wv(t.value);return R(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:R(zv,{variant:n.background,replica:r})})}var Vv=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function Hv({title:e,description:t,media:n,children:r,overlay:i}){return R(`div`,{class:Vv,children:[n===void 0?R(Bv,{}):n,(e||t)&&R(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&R(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&R(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&R(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}function Uv({loading:e=!1,disabled:t,class:n,children:r,...i}){return R(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[R(`span`,{children:r}),e&&R(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:R(`span`,{class:`loading loading-spinner loading-sm`})})]})}var Wv={daily_limit:{title:`PAL is at today's limit`,description:`This PAL can take more conversations tomorrow.`},total_limit:{title:`PAL is unavailable`,description:`This PAL isn't available right now. Please check back later.`},busy:{title:`PAL is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this PAL`,description:`This PAL couldn't be loaded. Please try again later.`},captcha_unsupported:{title:`This PAL isn't available on this device`,description:`The security check couldn't run in this browser. Please try another device.`},insecure_context:{title:`PAL is unavailable`,description:`This PAL isn't available on this page.`},browser_unsupported:{title:`This PAL isn't available in this browser`,description:`Please try a different browser or device.`}};function Gv(e,t){let n=t?.[e];return{title:n?.title||Wv[e].title,description:n?.description||Wv[e].description}}var Kv={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`,insecure_context:`error`,browser_unsupported:`error`},qv={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`,insecure_context:`never`,browser_unsupported:`never`};function Jv({cause:e}){return R(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:R(hv,{name:Kv[e],size:`2rem`})})}function Yv({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=jh(),o=a.value.customization?.unavailable_screen,s=Gv(e,o),c=o?.cta??[],l=qv[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return R(Hv,{media:R(Jv,{cause:e}),title:s.title,description:s.description,children:d&&R(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[u&&R(Uv,{class:`btn-neutral rounded-box`,disabled:!t,loading:i,onClick:n,children:`Try again`}),c.map(e=>R(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&R(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function Xv(){let e=L(Sm);return{state:e.flowSignal.value,isStarting:e.isStarting,permissionRequest:e.permissionRequest,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var Zv={start_button:`Start the conversation`,ready_to_start:``};function Qv(){let{config:e}=jh(),{preview:t}=e.value.customization;return F(()=>({start_button:t.btn_title??Zv.start_button,ready_to_start:t.description??Zv.ready_to_start}),[t])}function $v(){return L(_t)?.layout??`inline`}function ey({kind:e,status:t}){if(e===`camera`)return`Allow camera access to use video. Camera is optional.`;switch(t){case`blocked`:return`Microphone is blocked. Allow access in your browser settings to continue.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;default:return`Allow microphone access to start the conversation.`}}function ty({message:e,class:t}){return R(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[R(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),R(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:R(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var ny=`text-preview-title @max-mobile:text-preview-title-narrow`,ry=`text-preview-title-full-screen`,iy=`text-sm @max-mobile:text-xs`,ay=`text-preview-description-full-screen`;function oy({title:e,description:t,fullScreen:n}){return!e&&!t?null:R(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&R(`h2`,{class:`${n?ry:ny} font-medium leading-tight`,children:e}),t&&R(`p`,{class:`${n?ay:iy} text-white/80 leading-snug`,children:t})]})}var sy=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,cy=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,ly=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,uy=`absolute inset-0 bg-black/45`,dy=`absolute inset-0 overflow-y-auto p-8 @max-mobile:p-5 text-white [text-shadow:0_1px_3px_rgb(0_0_0/0.45)]`;function fy({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=jh(),l=Tv(c.value),u=wv(c.value),d=$v()===`full-screen`,f=!!i;return R(`div`,{class:a?`${sy} ${a}`:sy,role:o,"aria-live":s,children:[R(zv,{variant:l.background,replica:u}),r===`center`?R(D,{children:[R(`div`,{class:uy}),R(`div`,{class:`${dy} flex flex-col items-center justify-center gap-3`,inert:f,children:n})]}):R(D,{children:[(e||t)&&(d?R(`div`,{class:cy}):R(D,{children:[R(`div`,{class:`${cy} hidden @max-mobile:block`}),R(`div`,{class:ly})]})),d?R(`div`,{class:dy,inert:f,children:[R(oy,{title:e,description:t,fullScreen:!0}),R(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):R(`div`,{class:`${dy} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,inert:f,children:[R(`div`,{class:`col-start-1 row-start-2 self-center @max-mobile:col-span-2 @max-mobile:row-start-1 @max-mobile:self-start`,children:R(oy,{title:e,description:t})}),R(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}var py={video:`cam`,audio:`mic`,chat:`chat`},my={"full-screen":`btn-lg px-16 @max-3xl:px-10 @max-md:btn-md @max-md:px-5`,inline:`px-8 @max-mobile:px-5`};function hy({children:e,loading:t=!1,...n}){let{config:r}=jh(),i=$v(),a=py[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return R(Uv,{class:`btn-preview-action rounded-box ${my[i]}`,loading:t,...n,children:o?R(`span`,{class:`flex items-center justify-center gap-2`,children:[R(hv,{name:a,"aria-hidden":!0}),e]}):e})}var gy=`Thanks for joining`,_y=`You can start a new conversation whenever you're ready.`,vy=`Start a new conversation`;function yy(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function by({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=jh(),a=$v()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>yy(e.url)),c=o.title||e?.title||gy,l=o.description||e?.description||_y,u=e?.restart||vy;return R(fy,{title:c,description:l,children:[R(`div`,{class:`relative`,children:[r&&R(ty,{message:ey(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),R(hy,{onClick:t,loading:n,children:u})]}),s.length>0&&R(`div`,{class:`flex flex-wrap items-center gap-2 ${a?`justify-center`:`justify-end`}`,children:s.map(e=>R(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn rounded-box border-white/50 bg-black/35 text-white backdrop-blur-xs hover:bg-black/50`,children:e.title},e.url))})]})}function xy(){let e=L(Pr)?.telemetry,t=P(!1);return{report:I(n=>{t.current||(t.current=!0,e?.record({stage:`media`,outcome:`failed`,operation:`media.playback`,component:`media`,code:`playback_error`,handled:!0,error_type:n&&Pn.has(n)?n:void 0}))},[e]),recover:I(()=>{t.current&&(t.current=!1,e?.record({stage:`media`,outcome:`recovered`,operation:`media.playback`,component:`media`}))},[e])}}var Sy=hp((e,t)=>{let{report:n,recover:r}=xy();return R(zp,{...e,ref:t,onPlayFailed:t=>{n(t instanceof Error?t.name:void 0),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})}),Cy=hp((e,t)=>{let{report:n,recover:r}=xy();return R(Bp,{...e,ref:t,onPlayFailed:t=>{n(t.name),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})});function wy(){let e=Xf(),t=Qf(),{isOff:n}=ip(t),{camState:r}=sp();return{isCamReady:F(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:I(()=>{e?.setLocalVideo(n)},[e,n])}}function Ty(){let e=Xf(),t=Qf(),{isOff:n}=ap(t),{micState:r}=sp();return{isMicReady:F(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:I(()=>{e?.setLocalAudio(n)},[e,n])}}function Ey(){let e=Xf(),t=Qf(),{isOff:n}=op(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:I(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var Dy={microphone:`microphone`,camera:`camera`};function Oy({class:e}){return R(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[R(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function ky(){return R(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[R(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),R(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),R(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),R(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),R(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:R(Oy,{})}),R(`g`,{transform:`translate(34 78)`,children:[R(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),R(`g`,{transform:`translate(40 120)`,children:[R(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),R(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),R(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var Ay=fp(({device:e,onClose:t})=>{let n=Dy[e];return N(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),R(`div`,{class:`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tavus-blocked-title`,onClick:t,children:R(`div`,{class:`relative w-full max-w-md rounded-box bg-base-100 text-base-content shadow-xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[R(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:R(hv,{name:`close`,size:`1.1rem`})}),R(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[R(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:R(ky,{})}),R(`div`,{class:`flex flex-col gap-4`,children:[R(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),R(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[R(`li`,{class:`flex items-start gap-2`,children:[R(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),R(`span`,{class:`leading-snug`,children:[`Click the `,R(Oy,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),R(`li`,{class:`flex items-start gap-2`,children:[R(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),R(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),R(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),jy=xe({open:()=>{},close:()=>{}});function My(){return L(jy)}function Ny({children:e}){let[t,n]=M(null),r=I(e=>n(e),[]),i=I(()=>n(null),[]),a=F(()=>({open:r,close:i}),[r,i]);return R(jy.Provider,{value:a,children:[e,t&&R(Ay,{device:t,onClose:i})]})}var Py=fp(()=>R(`span`,{"aria-hidden":`true`,class:`absolute -top-0.5 -right-0.5 z-20 flex h-4 w-4 items-center justify-center rounded-full bg-warning text-warning-content text-[0.6rem] font-bold leading-none ring-2 ring-base-100 pointer-events-none`,children:`!`})),Fy=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,Iy=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,Ly=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,Ry=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,zy=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function By(){return R(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:R(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function Vy(){let e=Qf(),t=P(null),n=P(void 0);return cp(e??``,I(e=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let n=Math.max(0,Math.min(1,e**.6));t.current?.style.setProperty(`--mic-level`,String(n))})},[])),R(`span`,{ref:t,"aria-hidden":`true`,class:`pointer-events-none absolute inset-x-0 bottom-0 z-0 bg-success/70`,style:{"--mic-level":`0`,height:`calc(var(--mic-level, 0) * 100%)`,transition:`height 100ms ease-out`}})}function Hy({value:e,devices:t,disabled:n,onChange:r,label:i}){return R(D,{children:[R(`select`,{class:Iy,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>R(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),R(`span`,{class:Ly,children:R(By,{})})]})}function Uy(e){return R(`div`,{class:Fy,children:R(Hy,{...e})})}function Wy({iconName:e,...t}){return R(`div`,{class:Fy,children:[R(`span`,{class:Ry,"aria-hidden":`true`,children:R(hv,{name:e})}),R(Hy,{...t})]})}var Gy=fp(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=Ty(),{microphones:i,currentMic:a,setMicrophone:o}=sp();if(!a||(i?.length??0)<=1)return R(Jy,{level:e});let s=e&&n&&!r;return R(`div`,{class:`relative inline-flex items-center`,children:[R(Uy,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),R(`button`,{type:`button`,onClick:t,disabled:!n,class:`${zy} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&R(Vy,{}),R(`span`,{class:`relative z-10 inline-flex`,children:R(hv,{name:r||!n?`mic-off`:`mic`})})]})]})});function Ky(){let{onToggleCamera:e,isCamMuted:t}=wy(),{camera:n,requestCamera:r}=Gh(),{open:i}=My(),a=n.isGranted&&!t;return{isOn:a,onClick:()=>{if(n.isBlocked)return i(`camera`);if(a)return e();r()},label:a?`Turn camera off`:n.isGranted?`Turn camera on`:`Enable camera`,needsAttention:n.needsAttention}}var qy=fp(()=>{let{isCamReady:e}=wy(),{currentCam:t,cameras:n,setCamera:r}=sp(),i=Ky();return!t||(n?.length??0)<=1?R(Yy,{}):R(`div`,{class:`relative inline-flex items-center`,children:[R(Uy,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),R(`button`,{type:`button`,onClick:i.onClick,class:zy,"aria-label":i.label,"aria-pressed":!i.isOn,children:R(hv,{name:i.isOn?`cam`:`cam-off`})})]})}),Jy=fp(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=Ty(),{mic:r,requestMic:i}=Gh(),{open:a}=My(),o=()=>{if(r.isGranted)return t();if(r.isBlocked)return a(`microphone`);i()},s=r.isGranted?n?`Unmute microphone`:`Mute microphone`:`Allow microphone access`,c=e&&r.isGranted&&!n;return R(`span`,{class:`relative inline-flex`,children:[R(`button`,{type:`button`,onClick:o,class:`btn btn-control btn-neutral relative overflow-hidden`,"aria-label":s,"aria-pressed":r.isGranted?n:void 0,children:[c&&R(Vy,{}),R(`span`,{class:`relative z-10 inline-flex`,children:R(hv,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&R(Py,{})]})}),Yy=fp(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Ky();return R(`span`,{class:`relative inline-flex`,children:[R(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:R(hv,{name:e?`cam`:`cam-off`})}),r&&R(Py,{})]})});fp(({compact:e=!1}={})=>{let{isMicReady:t}=Ty(),{microphones:n,currentMic:r,setMicrophone:i}=sp();return(n?.length??0)<=1?null:R(Wy,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),fp(({compact:e=!1}={})=>{let{isCamReady:t}=wy(),{currentCam:n,cameras:r,setCamera:i}=sp();return(r?.length??0)<=1?null:R(Wy,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Xy=fp((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=Ey();return R(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:R(hv,{name:`screen-share`})})});function Zy(e){let t=L(ah);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return N(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Qy=xe(null);function $y({children:e,defaultEnabled:t=!1}){let[n,r]=M(t),i=I(()=>r(e=>!e),[]),a=F(()=>({isEnabled:n,toggle:i}),[n,i]);return R(Qy.Provider,{value:a,children:e})}function eb(){let e=L(Qy);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var tb=fp(()=>{let{isEnabled:e,toggle:t}=eb();return R(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:R(hv,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),nb=fp(()=>{let{isEnabled:e}=eb(),{captionText:t,captionRole:n}=Zy(),r=t.value,i=n.value;return!e||!r?null:R(`div`,{class:`cvi-strip-lift pointer-events-none absolute bottom-[calc(6rem_+_var(--cvi-status-strip,0px))] left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white z-40`,role:`status`,"aria-live":`polite`,children:R(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:R(`div`,{children:[R(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),rb=xe(null);function ib({children:e,defaultOpen:t=!1}){let[n,r]=M(t),i=I(()=>r(e=>!e),[]),a=I(()=>r(!1),[]),o=F(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return R(rb.Provider,{value:o,children:e})}function ab(){let e=L(rb);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var ob=fp((e={})=>{let{isOpen:t,toggle:n}=ab();return R(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:R(hv,{name:`chat`})})}),sb=fp(({message:e})=>{let t=e.sender===`user`;return R(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[R(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),R(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),cb=fp(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=ab(),{chatMessages:i,sendChat:a,session:o}=Zy(),s=o.value?.conversationId??null,c=i.value,[l,u]=M(``),d=P(null);N(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=I(()=>{let e=l.trim();e&&s&&(a(e),u(``))},[l,a,s]),p=I(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return R(`aside`,{class:e?`absolute inset-0 w-full h-full bg-base-100 flex flex-col z-30`:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${n?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e&&!n,inert:!e&&!n,children:[R(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[R(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:R(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:R(hv,{name:`close`,size:20})})]}),R(`ul`,{ref:d,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:c.length===0?R(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>R(sb,{message:e},e.id))}),R(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[R(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:s?`Type a message…`:`Connecting…`,disabled:!s,rows:1,"aria-label":`Message`}),R(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:R(hv,{name:`send`,size:18})})]})]})});function lb({label:e}){return R(fy,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:R(`div`,{class:`flex items-center gap-2`,children:[R(`span`,{class:`loading loading-spinner loading-sm`}),R(`span`,{class:`text-base font-medium`,children:e})]})})}var ub=fp(()=>R(lb,{label:`Connecting…`})),db=fp(()=>R(lb,{label:`Leaving…`}));function fb({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return R(`div`,{class:`flex items-center gap-2`,children:[r&&R(`span`,{class:`rounded-field bg-base-100 px-2 py-1 text-xs font-medium whitespace-nowrap text-base-content shadow-md motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,children:`Expand for a better view`}),R(`button`,{type:`button`,onClick:t,class:`btn btn-xs btn-control ${r?`btn-primary`:e?`btn-info`:`btn-neutral`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:R(hv,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var pb=fp(({id:e})=>{let t=$f()===e,n=P(null),r=P(null),i=P(null),a=P(void 0);cp(e,I(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return R(`div`,{class:`flex items-center justify-center w-6 h-6`,children:R(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[R(`div`,{ref:n,class:o,style:{height:`20%`}}),R(`div`,{ref:r,class:o,style:{height:`20%`}}),R(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),mb=[0,1,2],hb=.05,gb=450;function _b({sessionId:e,className:t=``}){let{config:n}=jh(),r=Tv(n.value),i=wv(n.value),a=P(null),o=P(void 0),s=P(void 0),[c,l]=M(!1),u=P(!1);return cp(e??``,I(t=>{e&&(o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));a.current?.style.setProperty(`--audio-level`,String(e)),e>hb?(s.current&&=(clearTimeout(s.current),void 0),u.current||(u.current=!0,l(!0))):u.current&&s.current===void 0&&(s.current=setTimeout(()=>{s.current=void 0,u.current=!1,l(!1)},gb))}))},[e])),N(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),R(`div`,{ref:a,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[mb.map(e=>R(`div`,{class:`absolute inset-[16%] rounded-full will-change-transform`,style:{border:`2px solid var(--color-primary)`,opacity:0,animation:c?`tavusAudioWave 2.4s ease-out ${e*.8}s infinite`:`none`,"--wave-peak":`calc(0.18 + var(--audio-level, 0) * 0.5)`}},e)),R(`div`,{class:`absolute inset-[16%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 60%, transparent), transparent 70%)`,filter:`blur(20px)`,scale:`calc(1 + var(--audio-level, 0) * 0.25)`,opacity:`calc(0.35 + var(--audio-level, 0) * 0.5)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),R(`div`,{class:`absolute inset-[20%] rounded-full overflow-hidden bg-base-300 ring-2 ring-base-100/20 shadow-xl will-change-transform`,style:{scale:`calc(1 + var(--audio-level, 0) * 0.06)`,transition:`scale 100ms ease-out`},children:R(zv,{variant:r.background,replica:i})})]})}function vb({children:e,class:t,className:n,...r}){return R(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),R(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),R(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var yb=e=>!!e.user_id?.includes(`tavus-replica`);function bb(){return np({filter:yb})}function xb(e){let t=bb()[0],n=ip(t??``),r=Zf(),[i,a]=M(!1);return N(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var Sb=fp(({isAudioOnly:e})=>{let t=xb(e);return t.phase===`left`?R(db,{}):t.phase===`connecting`?R(ub,{}):e?R(vb,{class:`flex items-center justify-center`,children:R(_b,{sessionId:t.replicaId})}):R(`div`,{class:`relative w-full h-full`,children:R(Sy,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`})})}),Cb=fp(({onLeave:e})=>{let{config:t}=jh(),n=t.value.customization.conversation.modality===`audio`;return R(`div`,{class:`@container/pip w-full h-full`,children:R(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[R(`div`,{class:`relative w-full h-full z-5`,children:R(Sb,{isAudioOnly:n})}),R(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[R(Jy,{}),!n&&R(Yy,{}),R(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:R(hv,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function wb(e,t){return e<=0||t<=0?!1:e/t<.75}var Tb=fp(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=P(null),o=i??a,[s,c]=M(0),[l,u]=M(0),d=I(({aspectRatio:e})=>c(e),[]);N(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[e.length-1].contentRect;u(n>0?t/n:0)});return t.observe(e),()=>t.disconnect()},[o]);let f=n?t??``:e,p=!n&&r,m=!n&&wb(s,l),h=n||m;return R(D,{children:[m&&R(Sy,{sessionId:e,type:`video`,fit:`cover`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 w-full h-full object-cover scale-110 blur-xl brightness-[0.55] ${p?`hidden`:``}`}),R(Sy,{ref:o,automirror:!0,sessionId:f,type:n?`screenVideo`:`video`,fit:h?`contain`:`cover`,onResize:n?void 0:d,className:`absolute inset-0 w-full h-full transition-all ${h?`object-contain`:`object-cover`} ${p?`hidden`:``}`})]})}),Eb=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),Db=new Set([`tavusapi.com`]);function Ob(e){let t;try{t=new URL(e)}catch{return!1}return Mb(t)?!0:t.protocol===`https:`&&Eb.has(t.hostname)}function kb(e){return Ob(e)}function Ab(e){try{return Mb(new URL(e))}catch{return!1}}function jb(e){let t;try{t=new URL(e)}catch{return!1}return Nb(t)?!0:t.protocol===`https:`&&Db.has(t.hostname)}function Mb(e){return Nb(e)}function Nb(e){return!Pb()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function Pb(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}function Fb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ib(e){if(typeof e!=`object`||!e||Object.isFrozen(e))return e;for(let t of Reflect.ownKeys(e))Ib(e[t]);return Object.freeze(e)}var Lb=new Set([`canvas.question`,`canvas.input`,`canvas.calendar`,`canvas.scheduling_embed`]);[...new Set([`direct_user`,`autonomous`,`system`])];var Rb=new Set([`clear`,`replacement`]);function zb(e,t,n){return t===`submit`&&n===`direct_user`&&Lb.has(e)}function Bb(e,t,n,r){if(r!==void 0&&(!r||n===void 0||!zb(e,t,n)))throw Error(`Canvas response text is allowed only for a supported direct-user submit.`)}function Vb(e,t){if(t===`system`||Rb.has(e))throw Error(`Canvas producer interactions cannot mint host-only system actions.`)}async function Hb(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var Ub=`conversation.canvas.live_state.v1`,Wb=3e3,Gb=[`user`,`pal`,`start`],Kb=1e4,qb=4e3,Jb=/^[a-z][a-z0-9_]{0,39}$/,Yb=[120,80,40,0],Xb=-32601,Zb=`No live card with that id is on screen.`,Qb=`card is still loading`,$b=`the card does not offer it right now`,ex=`the card left the screen`,tx={now:()=>Date.now()};function nx(e){return typeof e==`string`&&Jb.test(e)}function rx(e){return Gb.includes(e)}function ix(e,t){if(t===void 0)return`${e}()`;if(!Fb(t)||t.type!==void 0&&t.type!==`object`)return null;let n=t.properties??{};if(!Fb(n))return null;let r=Array.isArray(t.required)?t.required:[],i=[];for(let[e,t]of Object.entries(n)){let n=vx(t);if(n===null)return null;i.push(`${e}${r.includes(e)?``:`?`}: ${n}`)}return`${e}(${i.join(`, `)})`}function ax(e){let t=[],n=[];for(let r of e){if(!Fb(r))continue;let e=typeof r.name==`string`?r.name:``;if(!nx(e)){n.push({name:e,reason:`invalid_name`});continue}let i=ix(e,r.inputSchema);if(i===null){n.push({name:e,reason:`not_flat`});continue}let a=typeof r.description==`string`?r.description:typeof r.title==`string`?r.title:``;t.push({name:e,signature:i,description:a})}return{actions:t,skipped:n}}function ox(e,t){if(t.status===`timeout`)return gx(e,`failed`,`timed out`);if(t.status===`rejected`)return gx(e,`failed`,t.reason instanceof Error?t.reason.message:String(t.reason));let n=Fb(t.value)?t.value:{};return gx(e,n.isError===!0?`failed`:`ran`,Ox(n.content))}function sx(e){let t=kx(e.title??``,60);return dx(e.conversation_id,{tool_call_id:e.tool_call_id,component:e.component,session:e.session,session_started_at:e.session_started_at,seq:e.seq,phase:`state`,...t?{title:t}:{},state:kx(e.state,600),...rx(e.source)?{source:e.source}:{},actions:e.actions.filter(e=>nx(e.name)).slice(0,8).map(e=>({name:e.name,signature:e.signature,description:kx(e.description,160)})),..._x(e.last_action),host:Ax(e.host),core_version:Ax(e.core_version??`0.4.0`)})}function cx(e){return dx(e.conversation_id,{tool_call_id:e.tool_call_id,...e.component?{component:e.component}:{},session:e.session,session_started_at:e.session_started_at,seq:e.seq,phase:`removed`,..._x(e.last_action),host:Ax(e.host),core_version:Ax(e.core_version??`0.4.0`)})}var lx=class{sessionId=Tx();startedAt;conversationId;toolCallId;component;options;clock;earlierNotificationHandler;notificationHandler;actionWatchers=new Set;activeCalls=new Set;currentActions=[];publishedActions=[];report={state:``};lastAction;lastSnapshot;sequence=-1;listing=!1;relist=!1;isDisposed=!1;throttleTimer;keepaliveTimer;callQueue=Promise.resolve();constructor(e){this.options=e,this.clock=e.clock??tx,this.startedAt=this.clock.now(),this.conversationId=e.instance.conversation_id,this.toolCallId=e.instance.tool_call_id,this.component=e.instance.canvas_config.component;let t=e.bridge.fallbackNotificationHandler;this.earlierNotificationHandler=t,this.notificationHandler=async e=>{e.method===`notifications/tools/list_changed`?this.onToolListChanged():await t?.(e)},e.bridge.fallbackNotificationHandler=this.notificationHandler}get seq(){return this.sequence}get actions(){return this.currentActions}get disposed(){return this.isDisposed}offers(e){return!this.isDisposed&&this.publishedActions.includes(e)}watchActions(e){return this.actionWatchers.add(e),()=>{this.actionWatchers.delete(e)}}onInitialized(){this.isDisposed||this.options.bridge.getAppCapabilities()?.tools&&this.listTools()}onToolListChanged(){this.isDisposed||this.listTools()}onModelContext(e){if(this.isDisposed)return;let t=Fb(e.structuredContent)?e.structuredContent:{};this.report={state:Dx(e.content),...typeof t.title==`string`?{title:t.title}:{},...rx(t.source)?{source:t.source}:{}},this.throttleTimer??=setTimeout(()=>{this.throttleTimer=void 0,this.sendSnapshot()},500)}call(e,t=this.clock.now()+qb){let n=this.callQueue.then(()=>this.runCall(e,t));return this.callQueue=n.catch(()=>void 0),n}reportOutcome(e){this.isDisposed||(this.lastAction=e,this.sendSnapshotNow())}dispose(){if(this.isDisposed)return;this.isDisposed=!0,clearTimeout(this.throttleTimer),clearTimeout(this.keepaliveTimer),this.throttleTimer=void 0,this.keepaliveTimer=void 0;for(let e of[...this.activeCalls])e();this.actionWatchers.clear();let e=this.options.bridge;e.fallbackNotificationHandler===this.notificationHandler&&(e.fallbackNotificationHandler=this.earlierNotificationHandler)}async runCall(e,t){let n=ox(e,await this.settleCall(e,t));return this.reportOutcome(n),n}settleCall(e,t){if(this.isDisposed)return Promise.resolve({status:`rejected`,reason:Error(ex)});let n=t-this.clock.now();return n<=0?Promise.resolve({status:`timeout`}):new Promise(t=>{let r=new AbortController,i=e=>{this.activeCalls.delete(o)&&(clearTimeout(s),t(e))},a=e=>{r.abort(),i(e)},o=()=>a({status:`rejected`,reason:Error(ex)}),s=setTimeout(()=>a({status:`timeout`}),n);this.activeCalls.add(o),Promise.resolve().then(()=>this.options.bridge.callTool({name:e.action,arguments:e.arguments},{signal:r.signal})).then(e=>i({status:`fulfilled`,value:e}),e=>i({status:`rejected`,reason:e}))})}listTools(){this.listing?this.relist=!0:(this.listing=!0,this.runListing())}async runListing(){do{this.relist=!1;let e=await this.fetchTools();if(this.isDisposed)return;e&&this.applyTools(e)}while(this.relist);this.listing=!1}async fetchTools(){try{let e=await this.options.bridge.listTools({});return Array.isArray(e?.tools)?e.tools:[]}catch(e){return Fb(e)&&e.code===Xb?[]:(this.options.onDebug?.({type:`list_tools_failed`,error:e}),null)}}applyTools(e){let{actions:t,skipped:n}=ax(e);n.length>0&&this.options.onDebug?.({type:`actions_skipped`,skipped:n}),JSON.stringify(t)!==JSON.stringify(this.currentActions)&&(this.currentActions=t,this.sendSnapshotNow())}sendSnapshotNow(){clearTimeout(this.throttleTimer),this.throttleTimer=void 0,this.sendSnapshot()}sendSnapshot(){if(this.isDisposed)return;this.sequence+=1;let e=sx({conversation_id:this.conversationId,tool_call_id:this.toolCallId,component:this.component,session:this.sessionId,session_started_at:this.startedAt,seq:this.sequence,...this.report,actions:this.currentActions,...this.lastAction?{last_action:this.lastAction}:{},host:this.options.host});this.lastSnapshot=e,this.transmit(e),this.publishActions(e.properties.actions)}publishActions(e){let t=e.map(e=>e.name);if(t.join()!==this.publishedActions.join()){this.publishedActions=t;for(let e of[...this.actionWatchers])e()}}transmit(e){Sx(this.options,e),clearTimeout(this.keepaliveTimer),this.keepaliveTimer=setTimeout(()=>{this.lastSnapshot&&this.transmit(this.lastSnapshot)},Kb)}},ux=class{options;clock;sessions=new Map;knownSessions=new Map;stopWatching=new Map;pending=new Set;instances=[];constructor(e){this.options=e,this.clock=e.clock??tx}register(e){let t=Cx(e.conversationId,e.toolCallId);return this.stopWatching.get(e)?.(),this.sessions.set(t,e),this.knownSessions.set(t,e),this.stopWatching.set(e,e.watchActions(()=>this.drain(t))),this.drain(t),()=>this.unregister(e)}unregister(e){this.stopWatching.get(e)?.(),this.stopWatching.delete(e);let t=Cx(e.conversationId,e.toolCallId);this.sessions.get(t)===e&&this.sessions.delete(t)}route(e){let t=Cx(e.conversation_id,e.target);if(!this.sessions.has(t)&&!this.hasLiveInstance(t))return Promise.resolve(this.replyRemoved(e));let n=this.clock.now()+qb;return new Promise(r=>{let i={command:e,key:t,deadlineAt:n,resolve:r,timer:setTimeout(()=>this.expire(i),qb)};this.pending.add(i),this.drain(t)})}instancesChanged(e,t){this.instances=t;let n=new Set(t.map(e=>Cx(e.conversation_id,e.tool_call_id)));for(let t of e){let e=Cx(t.conversation_id,t.tool_call_id);wx(t)&&!n.has(e)&&(n.add(e),this.sendRemoved(t,e))}}hasLiveInstance(e){return this.instances.some(t=>wx(t)&&Cx(t.conversation_id,t.tool_call_id)===e)}drain(e){let t=this.sessions.get(e);if(t)for(let n of[...this.pending])n.key===e&&t.offers(n.command.action)&&(this.pending.delete(n),clearTimeout(n.timer),t.call(n.command,n.deadlineAt).then(n.resolve))}expire(e){if(!this.pending.delete(e))return;let t=this.sessions.get(e.key),n=gx(e.command,`failed`,t&&!t.disposed&&t.actions.length>0?$b:Qb);t?.reportOutcome(n),e.resolve(n)}replyRemoved(e){let t=this.noCardOutcome(e);return Sx(this.options,cx({conversation_id:e.conversation_id,tool_call_id:e.target,...this.freshIdentity(),last_action:t,host:this.options.host})),t}sendRemoved(e,t){let n=this.knownSessions.get(t);n&&(this.unregister(n),n.dispose()),this.knownSessions.delete(t);let r;for(let e of[...this.pending])e.key===t&&(this.pending.delete(e),clearTimeout(e.timer),r=this.noCardOutcome(e.command),e.resolve(r));Sx(this.options,cx({conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:e.canvas_config.component,...n?{session:n.sessionId,session_started_at:n.startedAt,seq:n.seq+1}:this.freshIdentity(),...r?{last_action:r}:{},host:this.options.host}))}noCardOutcome(e){return gx(e,`failed`,Zb)}freshIdentity(){return{session:Tx(),session_started_at:this.clock.now(),seq:0}}};function dx(e,t){let n={message_type:`conversation`,event_type:Ub,conversation_id:e,properties:t};return fx(n),Ib(n)}function fx(e){let t=e.properties;if(t.phase===`state`){for(let n of Yb){if(mx(e))return;t.actions=t.actions.map(e=>({...e,description:kx(e.description,n)}))}for(;t.actions.length>0&&!mx(e);)t.actions=t.actions.slice(0,-1)}let n=t.last_action;n&&px(e,n.detail,e=>{n.detail=e}),t.phase===`state`&&px(e,t.state,e=>{t.state=e})}function px(e,t,n){let r=t;for(;r.length>0;){let t=hx(e)-Wb;if(t<=0)return;r=kx(r,Math.max(0,Array.from(r).length-t-3)),n(r)}}function mx(e){return hx(e)<=Wb}function hx(e){return new TextEncoder().encode(JSON.stringify(e)).length}function gx(e,t,n){return{call_id:e.call_id,action:e.action,outcome:t,detail:kx(n,200)}}function _x(e){return e?{last_action:gx(e,e.outcome,e.detail)}:{}}function vx(e){return Fb(e)?Array.isArray(e.enum)?e.enum.length===0||!e.enum.every(yx)?null:e.enum.map(String).join(` | `):e.type===`string`||e.type===`boolean`?e.type:e.type===`number`||e.type===`integer`?`${e.type}${bx(e.minimum,e.maximum)}`:null:null}function yx(e){return typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e)}function bx(e,t){let n=xx(e),r=xx(t);return n!==void 0&&r!==void 0?n<0?` ${n} to ${r}`:` ${n}-${r}`:n===void 0?r===void 0?``:` <= ${r}`:` >= ${n}`}function xx(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<2**53-1?e:void 0}function Sx(e,t){try{e.send(t)}catch(t){e.onDebug?.({type:`send_failed`,error:t})}}function Cx(e,t){return JSON.stringify([e,t])}function wx(e){return e.canvas_config.live_protocol!==void 0}function Tx(){return`lcs_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,12)}`}function Ex(e){return Array.isArray(e)?e.flatMap(e=>Fb(e)&&e.type===`text`&&typeof e.text==`string`?[e.text]:[]):[]}function Dx(e){return Ex(e).filter(Boolean).join(`
|
|
56
|
+
`)}function Ox(e){return Ex(e)[0]??``}function kx(e,t){let n=Array.from(e.replace(/\p{Cc}+/gu,` `).replace(/\s+/g,` `).trim());return n.length<=t?n.join(``):t<=0?``:`${n.slice(0,t-1).join(``)}…`}function Ax(e){return e.replace(/[^A-Za-z0-9._-]/g,``).slice(0,40)}var jx=`tavus.canvas.interaction`,Mx=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],Nx=`safe-area-right`,Px={x:275/1280,y:111/720,width:730/1280,height:609/720},Fx={type:`snapshot_mirror`};function Ix(e){return dS(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&dS(e.properties):!1}function Lx(e){if(!dS(e))return null;let t=ES(e,`component`),n=ES(e,`component_version`),r=ES(e,`sandbox_url`),i=kS(e,`mcp_server_url`,kb),a=kS(e,`api_base_url`,jb),o=kS(e,`interaction_url`,jb),s=hS(e.layout),c=jS(e),l=e.version;return l!==1||!t||!n||!r||!Ob(r)||!zx(r,t,n)||i===null||a===null||o===null||s===null||c===null?null:{version:l,component:t,component_version:n,resource_uri:ES(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:ES(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,...c,layout:s,host_context:dS(e.host_context)?e.host_context:void 0,...wS(e.live_protocol)}}var Rx=/^\/canvas\/([^/]+)\/([^/]+)(?:\/|$)/;function zx(e,t,n){let r;try{r=new URL(e)}catch{return!1}let i=Rx.exec(r.pathname);return i?t===`canvas.${i[1]}`&&n===i[2]:Ab(e)}function Bx(e){if(e===void 0)return{ok:!0,value:{}};if(dS(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return dS(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:fS(e)}}}function Vx(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=Bx(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!dS(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}function Hx(e){if(e.properties.name!==`canvas_action`)return null;let t=e.properties.tool_call_id,n=Bx(e.properties.arguments);if(!n.ok||typeof t!=`string`||!t)return null;let r=ES(n.value,`tool_call_id`),i=ES(n.value,`action`),a=Bx(n.value.arguments);return!r||!i||!a.ok?null:{conversation_id:e.conversation_id,target:r,call_id:t,action:i,arguments:a.value}}var Ux=[`safe-area-left`,`safe-area-right`];function Wx(e){let t=Ux.includes(e.preferred_slot)?e.preferred_slot:Nx;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function Gx(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function Kx(e,t){return[t]}function qx(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return Kx(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=sS(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:Wx({preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop}),revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&Gx(o.layout)===Gx(i.layout)?a:Kx(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>e.conversation_id!==t.conversation_id||e.tool_call_id!==t.tool_call_id):e.filter(e=>e.conversation_id!==t.conversation_id)}}var Jx=`canvas.task_status`;function Yx(e){return e.canvas_config.component===Jx}function Xx(e,t){return t.kind===`show`?Yx(t.instance):e!==null&&t.tool_call_id!==void 0&&t.tool_call_id===e.tool_call_id&&t.conversation_id===e.conversation_id}function Zx(e,t){return Xx(e,t)?{strip:qx(e?[e]:[],t)[0]??null,consumed:!0}:{strip:e,consumed:!1}}function Qx(e){if(!dS(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!dS(t))continue;let e=(dS(t._meta)?t._meta:null)?.[jx];if(dS(e))return AS(e)}return null}function $x(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);if(e.canvas_config.protocol_mode===`v1`&&!t.interaction_id)throw Error(`Magic Canvas v1 interaction requires a producer-supplied interaction_id.`);if(e.canvas_config.protocol_mode===`v1`&&(t.protocol_version!==1||!t.initiation_source||!t.initiated_at||!Number.isSafeInteger(t.producer_revision)||(t.producer_revision??-1)<0||!t.payload_digest))throw Error(`Magic Canvas v1 interaction causal envelope is incomplete.`);if(e.canvas_config.protocol_mode===`v1`&&t.producer_revision!==e.revision)throw Error(`Magic Canvas v1 interaction does not match the mounted card revision.`);return Vb(n,t.initiation_source),Bb(e.canvas_config.component,n,t.initiation_source,t.response_text),{interaction_id:t.interaction_id??uS(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:e.canvas_config.component,component_version:e.canvas_config.component_version,type:n,value:r,metadata:dS(t.metadata)?t.metadata:{},protocol_mode:e.canvas_config.protocol_mode,protocol_version:t.protocol_version,initiation_source:t.initiation_source,initiated_at:t.initiated_at,producer_revision:t.producer_revision,payload_digest:t.payload_digest,response_text:t.response_text,issued_card_capability:e.canvas_config.issued_card_capability}}function eS(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function tS(e,t){if(!dS(e)||!Array.isArray(e.content))return``;let n=e.content.map(e=>dS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
57
|
+
`).trim();if(!t){if(n)throw Error(`Magic Canvas response text requires a validated interaction.`);return``}if(t.protocol_mode===void 0&&t.response_text===void 0)return n?(Bb(t.component,t.type,`direct_user`,n),n):``;if(t.response_text===void 0){if(n)throw Error(`Magic Canvas silent interaction included raw text.`);return``}if(n!==t.response_text)throw Error(`Magic Canvas raw text does not match the validated response text.`);return t.response_text}function nS(e,t){let n=dS(t.structuredContent)?t.structuredContent:void 0,r=pS(t.content),i=typeof n?.state==`string`?n.state:`updated`,a=typeof n?.summary==`string`?n.summary:r,o=[`Magic Canvas state update for ${e.canvas_config.component} (${e.tool_call_id}).`,`State: ${i}.`];return a&&o.push(`Summary: ${a}`),n&&o.push(`Structured state: ${mS(n)}`),r&&r!==a&&o.push(r),o.join(`
|
|
58
|
+
`)}function rS({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=sS(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:Wx({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??cS(r.component),display_mode:i.displayMode??`inline`,avoid_safe_area:i.avoidSafeArea??r.layout?.avoid_safe_area??!0,safe_area:i.safeArea??r.layout?.safe_area??Px,backdrop:i.backdrop??r.layout?.backdrop??Fx}),revision:0}}function iS(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:oS(e.layout.preferred_slot,t)}}function aS(e,t){let n=e.filter(e=>!e.avoid_safe_area||e.display_mode===`fullscreen`?!1:e.viable_slot===`safe-area-left`||e.viable_slot===`safe-area-right`),r=n.some(e=>e.viable_slot===`safe-area-left`),i=n.some(e=>e.viable_slot===`safe-area-right`);if(r&&i)return{active:!1,video_shift_x:0,backdrop:Fx};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:Fx};let o=Math.min(448,Math.max(0,t.width-32)),s=a.safe_area,c=s.x*t.width,l=(s.x+s.width)*t.width,u=Math.min(360,t.width*.3),d=0;return d=a.viable_slot===`safe-area-left`?OS(16+o+24-c,0,u):-OS(l-(t.width-16-o-24),0,u),{active:!0,side:a.viable_slot===`safe-area-left`?`left`:`right`,video_shift_x:Math.round(d),safe_area:s,backdrop:a.backdrop}}function oS(e,t){return e===`full`||e===`safe-area-bottom`&&t.visualViewportHeight!==void 0&&t.visualViewportHeight<t.height*.75?`full`:(e===`safe-area-left`||e===`safe-area-right`)&&t.width<768&&t.height>=t.width?`safe-area-bottom`:e}function sS(e){let t={};for(let[n,r]of Object.entries(e))n!==`layout`&&n!==`preferred_slot`&&n!==`preferredSlot`&&n!==`display_mode`&&n!==`displayMode`&&n!==`presentation`&&n!==`fullscreen`&&n!==`avoid_safe_area`&&n!==`avoidSafeArea`&&n!==`safe_area`&&n!==`safeArea`&&n!==`backdrop`&&(t[n]=r);return{componentArguments:t,preferredSlot:gS(e.layout)??gS(e.preferred_slot)??gS(e.preferredSlot),displayMode:_S(e),avoidSafeArea:vS(e),safeArea:yS(e),backdrop:bS(e)}}function cS(e){switch(e){case`canvas.alert`:case`canvas.task_status`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return Nx}}function lS(e,t){let n=t?.displayScale??1;if(e.display_mode===`fullscreen`||e.viable_slot===`full`)return{maxWidth:void 0,maxHeight:void 0,displayScale:n};let r=t?.maxHeight??720;return e.viable_slot===`safe-area-bottom`?{maxWidth:720,maxHeight:r,displayScale:n}:{width:384,maxHeight:r,displayScale:n}}function uS(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}var dS=Fb;function fS(e){return e instanceof Error?e:Error(String(e))}function pS(e){return Array.isArray(e)?e.map(e=>dS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
59
|
+
`).trim():``}function mS(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function hS(e){if(e===void 0)return;if(!dS(e))return null;let t=gS(e),n=xS(e.safe_area??e.safeArea),r=SS(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...CS(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function gS(e){if(typeof e==`string`&&TS(e))return e;if(!dS(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&TS(t)?t:void 0}function _S(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function vS(e){let t=dS(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function yS(e){let t=dS(e.layout)?e.layout:void 0;return xS(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function bS(e){let t=dS(e.layout)?e.layout:void 0;return SS(e.backdrop??t?.backdrop)??void 0}function xS(e){if(e===void 0)return;if(!dS(e))return null;let t=DS(e,`x`),n=DS(e,`y`),r=DS(e,`width`),i=DS(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:OS(t,0,1),y:OS(n,0,1),width:OS(r,0,1),height:OS(i,0,1)}}function SS(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!dS(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function CS(e,t){return typeof e==`boolean`?{[t]:e}:{}}function wS(e){return e===1?{live_protocol:1}:{}}function TS(e){return Mx.includes(e)}function ES(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function DS(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function OS(e,t,n){return Math.min(Math.max(e,t),n)}function kS(e,t,n){let r=ES(e,t);if(r)return n(r)?r:null}function AS(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!dS(e.metadata)||e.protocol_version!==void 0&&typeof e.protocol_version!=`number`||e.initiation_source!==void 0&&e.initiation_source!==`direct_user`&&e.initiation_source!==`autonomous`&&e.initiation_source!==`system`&&e.initiation_source!==`unknown`||e.initiated_at!==void 0&&typeof e.initiated_at!=`string`||e.producer_revision!==void 0&&typeof e.producer_revision!=`number`||e.payload_digest!==void 0&&typeof e.payload_digest!=`string`||e.response_text!==void 0&&typeof e.response_text!=`string`?null:e}function jS(e){let t=Object.hasOwn(e,`protocol_mode`),n=Object.hasOwn(e,`protocol_version`),r=Object.hasOwn(e,`issued_card_capability`);if(!t&&!n&&!r)return{};if(e.protocol_mode===`legacy`)return n&&e.protocol_version!==null||r?null:{protocol_mode:`legacy`,protocol_version:null};if(e.protocol_mode!==`v1`||e.protocol_version!==1)return null;let i=ES(e,`issued_card_capability`);return i?{protocol_mode:`v1`,protocol_version:1,issued_card_capability:i}:null}var MS=`tavus-deployment magic-canvas/0.0.0`;function NS(e){if(!Ix(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=Lx(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=Bx(e.properties.arguments);if(!r.ok)throw r.error;return rS({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function PS(e){if(!Ix(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=NS(e);return t?{kind:`show`,instance:t}:null}return Vx(e)}function FS(e){return Ix(e)?Hx(e):null}function IS(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function LS(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:lS(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:MS,styles:{variables:RS(e.cssVars)}}}function RS(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...e[`--font-mono`]?{"--font-mono":e[`--font-mono`]}:{},...zS(e)}}function zS(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o=e[`--color-primary`],s=e[`--tavus-magic-canvas-accent`],c={},l=(e,t)=>{t&&(c[e]=t)},u=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return l(`--color-background-primary`,n),l(`--color-background-secondary`,r),l(`--color-border-secondary`,i),l(`--color-border-primary`,u(t,28,n)),l(`--color-text-primary`,t),l(`--color-text-secondary`,u(t,62,n)),l(`--color-text-danger`,a),l(`--color-border-danger`,a),l(`--color-ring-primary`,s||o),c}var BS=96;function VS(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function HS(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function US(e){if(!e)return null;let t=e.getBoundingClientRect();return t.width<=0||t.height<=0?null:{left:t.left,right:t.right,top:t.top,bottom:t.bottom}}function WS(e,t,n,r){if(!t)return!1;let i=r?r.left:0,a=r?r.top:0,o=r?r.right-r.left:globalThis.innerWidth,s=r?r.bottom-r.top:globalThis.innerHeight,c=e?.safe_area??Px,l=i+c.x*o+n,u=i+(c.x+c.width)*o+n,d=a+c.y*s,f=a+(c.y+c.height)*s;return l<t.right&&u>t.left&&d<t.bottom&&f>t.top}function GS(e,t,n){let[r,i]=M(()=>e?VS(HS(n?.current)):null);return Xe(()=>{if(!e){i(null);return}let t=HS(n?.current),r=()=>i(VS(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function KS(e,t,n){let[r,i]=M(()=>t?US(e.current):null);return Xe(()=>{if(!t){i(null);return}let n=()=>i(US(e.current)),r=new ResizeObserver(n);n(),e.current&&r.observe(e.current),r.observe(document.documentElement);let a=globalThis.requestAnimationFrame(n);return globalThis.addEventListener(`resize`,n),()=>{r.disconnect(),globalThis.removeEventListener(`resize`,n),globalThis.cancelAnimationFrame(a)}},[t,n,e]),t?r:null}function qS(e,t,n,r,i,a){let o=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:o!=null&&(t===`pip`||t===`auto`&&WS(e,r,i,a)),side:o}}function JS(e,t=document,n){let r=n?n.left:0,i=n?n.right:globalThis.innerWidth,a=n?n.top:0,o=n?n.bottom:globalThis.innerHeight,s=i-r,c=o-a,l=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),u,d,f,p;if(l.length>0){let t=Math.min(...l.map(e=>e.left)),n=Math.max(...l.map(e=>e.right));f=Math.min(...l.map(e=>e.top)),p=Math.max(...l.map(e=>e.bottom)),[u,d]=e===`right`?[r,t]:[n,i]}else{let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let m=d-u>=144&&p-f>=BS&&u>=r&&d<=i;if(l.length>0&&!m){let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let h=Math.max(0,d-u-48),g=Math.max(BS,Math.min(h,c-48));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var YS=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function XS(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function ZS(e,t,n){let[r,i]=M(()=>e&&t?JS(t,HS(n?.current),US(n?.current)):null);return Xe(()=>{if(!e||!t){i(null);return}let r=HS(n?.current),a=()=>i(JS(t,r,US(n?.current))),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),n?.current&&o.observe(n.current),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function QS(e,t){let[n,r]=M(null);return Xe(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var $S=1;function eC(e,t,n){return Math.min(Math.max(e,t),n)}function tC(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??Px,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:eC(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:eC(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var nC=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function rC(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=tC(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function iC(e,t,n){let r=P(null),i=P(e),a=P(n),o=P(0),s=P(0);i.current=e,a.current=n,N(()=>{let e=i.current;if(!e)return;if(!r.current||aC()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of nC){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?nC.map(t=>Math.round(e[t]*100)).join():``,t]),N(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function aC(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function oC({geom:e,visible:t}){return R(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function sC(e,t){let n=t>=0?`left`:`right`,r=P({side:n,shift:t});N(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:XS(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function cC(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function lC({snapshotUrl:e,transformOrigin:t}){return R(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function uC({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return R(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:R(lC,{snapshotUrl:e,transformOrigin:r})})}function dC({ambient:e,usePip:t,transition:n}){return e===`none`?null:R(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function fC({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return R(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:R(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&R(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${$S}px)`}:{right:`calc(100% - ${$S}px)`},children:R(lC,{snapshotUrl:t,transformOrigin:`center`})})]})})}function pC({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=YS,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=P(null),[f,p]=M(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=P(null),_=cC(e,h,c),{usePip:v,side:y}=qS(e,s,c,GS(s!==`shift`,_,g),h,KS(g,s!==`shift`,_)),b=ZS(s!==`shift`,y,g),x=sC(m,h);N(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);t?p(t):(r+=1,r<8&&(n=globalThis.setTimeout(a,150)))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),N(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=QS(g,C),T=f!==null&&!C,E=C&&y!=null,D=P(null),ee=P(null),[O,k]=M(!0),A=P(!0),te=I((e,t)=>{let n=D.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=ee.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),A.current!==t&&(A.current=t,k(t))},[]);return iC(C?rC(b,S,w,h,e):null,o,te),R(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&R(uC,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&R(dC,{ambient:l,usePip:v,transition:a}),R(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:R(fC,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:D,videoWrapRef:ee,fill:r,videoRef:d})}),C&&b&&R(oC,{geom:b,visible:S&&O}),u]})}var mC=480,hC=fp(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return R(`div`,{class:`absolute inset-0 overflow-hidden`,children:R(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${mC}px`:`0px`,right:o<0?`${mC}px`:`0px`,transition:`left ${YS}, right ${YS}`},children:[R(Sy,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),R(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:a?R(`div`,{class:`flex w-full h-full items-center justify-center`,children:R(_b,{sessionId:e})}):R(Sy,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})})});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function gC(e){return e&&Object.assign(bC,e),bC}var _C,vC,yC,bC,xC=n((()=>{vC=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},yC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(_C=globalThis).__zod_globalConfig??(_C.__zod_globalConfig={}),bC=globalThis.__zod_globalConfig}));function SC(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function CC(e,t){return typeof t==`bigint`?t.toString():t}function wC(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function TC(e){return e==null}function EC(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function DC(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function OC(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==$C)return r===void 0&&(r=$C,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function kC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function AC(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function jC(e){return JSON.stringify(e)}function MC(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function NC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function PC(e){if(NC(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return NC(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function FC(e){return PC(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function IC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function LC(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function RC(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function zC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return LC(e,AC(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return kC(this,`shape`,e),e},checks:[]}))}function BC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return LC(e,AC(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return kC(this,`shape`,r),r},checks:[]}))}function VC(e,t){if(!PC(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return LC(e,AC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return kC(this,`shape`,n),n}}))}function HC(e,t){if(!PC(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return LC(e,AC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return kC(this,`shape`,n),n}}))}function UC(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return LC(e,AC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return kC(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function WC(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return LC(t,AC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return kC(this,`shape`,i),i},checks:[]}))}function GC(e,t,n){return LC(t,AC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return kC(this,`shape`,i),i}}))}function KC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function qC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function JC(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function YC(e){return typeof e==`string`?e:e?.message}function XC(e,t,n){let r=e.message?e.message:YC(e.inst?._zod.def?.error?.(e))??YC(t?.error?.(e))??YC(n.customError?.(e))??YC(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ZC(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function QC(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var $C,ew,tw,nw,rw,iw=n((()=>{xC(),$C=Symbol(`evaluating`),ew=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},tw=wC(()=>{if(bC.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),nw=new Set([`string`,`number`,`symbol`]),rw={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function aw(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ow(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var sw,cw,lw,uw=n((()=>{xC(),iw(),sw=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,CC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cw=K(`$ZodError`,sw),lw=K(`$ZodError`,sw,{Parent:Error})})),dw,fw,pw,mw,hw,gw,_w,vw,yw,bw,xw,Sw,Cw,ww,Tw=n((()=>{xC(),uw(),iw(),dw=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new vC;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>XC(e,a,gC())));throw ew(t,i?.callee),t}return o.value},fw=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>XC(e,a,gC())));throw ew(t,i?.callee),t}return o.value},pw=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new vC;return a.issues.length?{success:!1,error:new(e??cw)(a.issues.map(e=>XC(e,i,gC())))}:{success:!0,data:a.value}},mw=pw(lw),hw=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>XC(e,i,gC())))}:{success:!0,data:a.value}},gw=hw(lw),_w=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return dw(e)(t,n,i)},vw=e=>(t,n,r)=>dw(e)(t,n,r),yw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return fw(e)(t,n,i)},bw=e=>async(t,n,r)=>fw(e)(t,n,r),xw=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pw(e)(t,n,i)},Sw=e=>(t,n,r)=>pw(e)(t,n,r),Cw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return hw(e)(t,n,i)},ww=e=>async(t,n,r)=>hw(e)(t,n,r)}));function Ew(){return new RegExp(Bw,`u`)}function Dw(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ow(e){return RegExp(`^${Dw(e)}$`)}function kw(e){let t=Dw({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Yw}T(?:${r})$`)}var Aw,jw,Mw,Nw,Pw,Fw,Iw,Lw,Rw,zw,Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw,Zw,Qw,$w,eT,tT,nT,rT,iT,aT=n((()=>{Aw=/^[cC][0-9a-z]{6,}$/,jw=/^[0-9a-z]+$/,Mw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Nw=/^[0-9a-vA-V]{20}$/,Pw=/^[A-Za-z0-9]{27}$/,Fw=/^[a-zA-Z0-9_-]{21}$/,Iw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Lw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Rw=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Vw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Uw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ww=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Gw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kw=/^[A-Za-z0-9_-]*$/,qw=/^https?$/,Jw=/^\+[1-9]\d{6,14}$/,Yw=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Xw=RegExp(`^${Yw}$`),Zw=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qw=/^-?\d+$/,$w=/^-?\d+(?:\.\d+)?$/,eT=/^(?:true|false)$/i,tT=/^null$/i,nT=/^undefined$/i,rT=/^[^A-Z]*$/,iT=/^[^a-z]*$/})),oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT,xT,ST,CT=n((()=>{xC(),aT(),iw(),oT=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sT={number:`number`,bigint:`bigint`,object:`date`},cT=K(`$ZodCheckLessThan`,(e,t)=>{oT.init(e,t);let n=sT[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lT=K(`$ZodCheckGreaterThan`,(e,t)=>{oT.init(e,t);let n=sT[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uT=K(`$ZodCheckMultipleOf`,(e,t)=>{oT.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):DC(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dT=K(`$ZodCheckNumberFormat`,(e,t)=>{oT.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=rw[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Qw)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),fT=K(`$ZodCheckMaxLength`,(e,t)=>{var n;oT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!TC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ZC(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pT=K(`$ZodCheckMinLength`,(e,t)=>{var n;oT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!TC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ZC(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mT=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;oT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!TC(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ZC(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hT=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;oT.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gT=K(`$ZodCheckRegex`,(e,t)=>{hT.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_T=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=rT,hT.init(e,t)}),vT=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=iT,hT.init(e,t)}),yT=K(`$ZodCheckIncludes`,(e,t)=>{oT.init(e,t);let n=IC(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),bT=K(`$ZodCheckStartsWith`,(e,t)=>{oT.init(e,t);let n=RegExp(`^${IC(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),xT=K(`$ZodCheckEndsWith`,(e,t)=>{oT.init(e,t);let n=RegExp(`.*${IC(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ST=K(`$ZodCheckOverwrite`,(e,t)=>{oT.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),wT,TT=n((()=>{wT=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
59
60
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
60
|
-
`))}}})),Pw,Fw=n((()=>{Pw={major:4,minor:4,patch:3}}));function Iw(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Lw(e){if(!ew.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Iw(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Rw(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function zw(e,t,n){e.issues.length&&t.issues.push(...nC(n,e.issues)),t.value[n]=e.value}function Bw(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...nC(n,e.issues))}!o&&!i?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Vw(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=KS(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Hw(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Bw(e,n,i,t,u,d))):Bw(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function Uw(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!eC(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>iC(e,r,wS())))}),t)}function Ww(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(HS(e)&&HS(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Ww(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Ww(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Gw(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),eC(e))return e;let o=Ww(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function Kw(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function qw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Jw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Yw(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function Xw(e){return e.value=Object.freeze(e.value),e}function Zw(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(oC(e))}}var Qw,$w,eT,tT,nT,rT,iT,aT,oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT,xT,ST,CT,wT,TT,ET,DT,OT,kT,AT,jT,MT,NT,PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT=n((()=>{jw(),kS(),Nw(),NC(),pw(),fC(),Fw(),Qw=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pw;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=eC(e),i;for(let a of t){if(a._zod.def.when){if(tC(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new ES;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=eC(e,t))});else{if(e.issues.length===t)continue;r||=eC(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(eC(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new ES;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new ES;return o.then(e=>t(e,r,a))}return t(o,r,a)}}IS(e,`~standard`,()=>({validate:t=>{try{let n=SC(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return wC(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),$w=K(`$ZodString`,(e,t)=>{Qw.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??aw(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),eT=K(`$ZodStringFormat`,(e,t)=>{Cw.init(e,t),$w.init(e,t)}),tT=K(`$ZodGUID`,(e,t)=>{t.pattern??=GC,eT.init(e,t)}),nT=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=KC(e)}else t.pattern??=KC();eT.init(e,t)}),rT=K(`$ZodEmail`,(e,t)=>{t.pattern??=qC,eT.init(e,t)}),iT=K(`$ZodURL`,(e,t)=>{eT.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===tw.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),aT=K(`$ZodEmoji`,(e,t)=>{t.pattern??=PC(),eT.init(e,t)}),oT=K(`$ZodNanoID`,(e,t)=>{t.pattern??=UC,eT.init(e,t)}),sT=K(`$ZodCUID`,(e,t)=>{t.pattern??=RC,eT.init(e,t)}),cT=K(`$ZodCUID2`,(e,t)=>{t.pattern??=zC,eT.init(e,t)}),lT=K(`$ZodULID`,(e,t)=>{t.pattern??=BC,eT.init(e,t)}),uT=K(`$ZodXID`,(e,t)=>{t.pattern??=VC,eT.init(e,t)}),dT=K(`$ZodKSUID`,(e,t)=>{t.pattern??=HC,eT.init(e,t)}),fT=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=LC(t),eT.init(e,t)}),pT=K(`$ZodISODate`,(e,t)=>{t.pattern??=iw,eT.init(e,t)}),mT=K(`$ZodISOTime`,(e,t)=>{t.pattern??=IC(t),eT.init(e,t)}),hT=K(`$ZodISODuration`,(e,t)=>{t.pattern??=WC,eT.init(e,t)}),gT=K(`$ZodIPv4`,(e,t)=>{t.pattern??=YC,eT.init(e,t),e._zod.bag.format=`ipv4`}),_T=K(`$ZodIPv6`,(e,t)=>{t.pattern??=XC,eT.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),vT=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ZC,eT.init(e,t)}),yT=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=QC,eT.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),bT=K(`$ZodBase64`,(e,t)=>{t.pattern??=$C,eT.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Iw(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),xT=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=ew,eT.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Lw(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ST=K(`$ZodE164`,(e,t)=>{t.pattern??=nw,eT.init(e,t)}),CT=K(`$ZodJWT`,(e,t)=>{eT.init(e,t),e._zod.check=n=>{Rw(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),wT=K(`$ZodNumber`,(e,t)=>{Qw.init(e,t),e._zod.pattern=e._zod.bag.pattern??sw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),TT=K(`$ZodNumberFormat`,(e,t)=>{yw.init(e,t),wT.init(e,t)}),ET=K(`$ZodBoolean`,(e,t)=>{Qw.init(e,t),e._zod.pattern=cw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),DT=K(`$ZodUndefined`,(e,t)=>{Qw.init(e,t),e._zod.pattern=uw,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),OT=K(`$ZodNull`,(e,t)=>{Qw.init(e,t),e._zod.pattern=lw,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),kT=K(`$ZodUnknown`,(e,t)=>{Qw.init(e,t),e._zod.parse=e=>e}),AT=K(`$ZodNever`,(e,t)=>{Qw.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),jT=K(`$ZodArray`,(e,t)=>{Qw.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>zw(t,n,e))):zw(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),MT=K(`$ZodObject`,(e,t)=>{if(Qw.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=MS(()=>Vw(t));IS(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=VS,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Bw(n,t,e,s,r,i))):Bw(a,t,e,s,r,i)}return i?Hw(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),NT=K(`$ZodObjectJIT`,(e,t)=>{MT.init(e,t);let n=e._zod.parse,r=MS(()=>Vw(t)),i=e=>{let t=new Mw([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=zS(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=zS(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
61
|
+
`))}}})),ET,DT=n((()=>{ET={major:4,minor:4,patch:3}}));function OT(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function kT(e){if(!Kw.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return OT(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function AT(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function jT(e,t,n){e.issues.length&&t.issues.push(...JC(n,e.issues)),t.value[n]=e.value}function MT(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...JC(n,e.issues))}!o&&!i?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function NT(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=RC(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function PT(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>MT(e,n,i,t,u,d))):MT(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function FT(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!KC(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>XC(e,r,gC())))}),t)}function IT(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(PC(e)&&PC(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=IT(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=IT(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function LT(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),KC(e))return e;let o=IT(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function RT(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function zT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function BT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function VT(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function HT(e){return e.value=Object.freeze(e.value),e}function UT(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(QC(e))}}var WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,DE,OE,kE,AE,jE,ME,NE,PE,FE,IE,LE,RE,zE,BE,VE,HE,UE,WE=n((()=>{CT(),xC(),TT(),Tw(),aT(),iw(),DT(),WT=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ET;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=KC(e),i;for(let a of t){if(a._zod.def.when){if(qC(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new vC;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=KC(e,t))});else{if(e.issues.length===t)continue;r||=KC(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(KC(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new vC;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new vC;return o.then(e=>t(e,r,a))}return t(o,r,a)}}OC(e,`~standard`,()=>({validate:t=>{try{let n=mw(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return gw(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),GT=K(`$ZodString`,(e,t)=>{WT.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zw(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),KT=K(`$ZodStringFormat`,(e,t)=>{hT.init(e,t),GT.init(e,t)}),qT=K(`$ZodGUID`,(e,t)=>{t.pattern??=Lw,KT.init(e,t)}),JT=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Rw(e)}else t.pattern??=Rw();KT.init(e,t)}),YT=K(`$ZodEmail`,(e,t)=>{t.pattern??=zw,KT.init(e,t)}),XT=K(`$ZodURL`,(e,t)=>{KT.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===qw.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ZT=K(`$ZodEmoji`,(e,t)=>{t.pattern??=Ew(),KT.init(e,t)}),QT=K(`$ZodNanoID`,(e,t)=>{t.pattern??=Fw,KT.init(e,t)}),$T=K(`$ZodCUID`,(e,t)=>{t.pattern??=Aw,KT.init(e,t)}),eE=K(`$ZodCUID2`,(e,t)=>{t.pattern??=jw,KT.init(e,t)}),tE=K(`$ZodULID`,(e,t)=>{t.pattern??=Mw,KT.init(e,t)}),nE=K(`$ZodXID`,(e,t)=>{t.pattern??=Nw,KT.init(e,t)}),rE=K(`$ZodKSUID`,(e,t)=>{t.pattern??=Pw,KT.init(e,t)}),iE=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=kw(t),KT.init(e,t)}),aE=K(`$ZodISODate`,(e,t)=>{t.pattern??=Xw,KT.init(e,t)}),oE=K(`$ZodISOTime`,(e,t)=>{t.pattern??=Ow(t),KT.init(e,t)}),sE=K(`$ZodISODuration`,(e,t)=>{t.pattern??=Iw,KT.init(e,t)}),cE=K(`$ZodIPv4`,(e,t)=>{t.pattern??=Vw,KT.init(e,t),e._zod.bag.format=`ipv4`}),lE=K(`$ZodIPv6`,(e,t)=>{t.pattern??=Hw,KT.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),uE=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Uw,KT.init(e,t)}),dE=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ww,KT.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),fE=K(`$ZodBase64`,(e,t)=>{t.pattern??=Gw,KT.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{OT(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),pE=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=Kw,KT.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{kT(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),mE=K(`$ZodE164`,(e,t)=>{t.pattern??=Jw,KT.init(e,t)}),hE=K(`$ZodJWT`,(e,t)=>{KT.init(e,t),e._zod.check=n=>{AT(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),gE=K(`$ZodNumber`,(e,t)=>{WT.init(e,t),e._zod.pattern=e._zod.bag.pattern??$w,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),_E=K(`$ZodNumberFormat`,(e,t)=>{dT.init(e,t),gE.init(e,t)}),vE=K(`$ZodBoolean`,(e,t)=>{WT.init(e,t),e._zod.pattern=eT,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),yE=K(`$ZodUndefined`,(e,t)=>{WT.init(e,t),e._zod.pattern=nT,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),bE=K(`$ZodNull`,(e,t)=>{WT.init(e,t),e._zod.pattern=tT,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),xE=K(`$ZodUnknown`,(e,t)=>{WT.init(e,t),e._zod.parse=e=>e}),SE=K(`$ZodNever`,(e,t)=>{WT.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),CE=K(`$ZodArray`,(e,t)=>{WT.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>jT(t,n,e))):jT(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),wE=K(`$ZodObject`,(e,t)=>{if(WT.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=wC(()=>NT(t));OC(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=NC,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>MT(n,t,e,s,r,i))):MT(a,t,e,s,r,i)}return i?PT(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),TE=K(`$ZodObjectJIT`,(e,t)=>{wE.init(e,t);let n=e._zod.parse,r=wC(()=>NT(t)),i=e=>{let t=new wT([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=jC(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=jC(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
61
62
|
if (${n}.issues.length) {
|
|
62
63
|
if (${o} in input) {
|
|
63
64
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -116,15 +117,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=VS,s=!OS.jitless,c=s&&lC.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Hw([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),PT=K(`$ZodUnion`,(e,t)=>{Qw.init(e,t),IS(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),IS(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),IS(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),IS(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>PS(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Uw(t,r,e,i)):Uw(o,r,e,i)}}),FT=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,PT.init(e,t);let n=e._zod.parse;IS(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=MS(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!VS(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),IT=K(`$ZodIntersection`,(e,t)=>{Qw.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Gw(e,t,n)):Gw(e,i,a)}}),LT=K(`$ZodRecord`,(e,t)=>{Qw.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!HS(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>iC(e,r,wS())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...nC(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...nC(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&sw.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>iC(e,r,wS())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...nC(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...nC(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),RT=K(`$ZodEnum`,(e,t)=>{Qw.init(e,t);let n=AS(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>uC.has(typeof e)).map(e=>typeof e==`string`?WS(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),zT=K(`$ZodLiteral`,(e,t)=>{if(Qw.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?WS(e):e?WS(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),BT=K(`$ZodTransform`,(e,t)=>{Qw.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new DS(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new ES;return n.value=i,n.fallback=!0,n}}),VT=K(`$ZodOptional`,(e,t)=>{Qw.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,IS(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),IS(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${PS(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Kw(e,r)):Kw(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),HT=K(`$ZodExactOptional`,(e,t)=>{VT.init(e,t),IS(e._zod,`values`,()=>t.innerType._zod.values),IS(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),UT=K(`$ZodNullable`,(e,t)=>{Qw.init(e,t),IS(e._zod,`optin`,()=>t.innerType._zod.optin),IS(e._zod,`optout`,()=>t.innerType._zod.optout),IS(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${PS(e.source)}|null)$`):void 0}),IS(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),WT=K(`$ZodDefault`,(e,t)=>{Qw.init(e,t),e._zod.optin=`optional`,IS(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>qw(e,t)):qw(r,t)}}),GT=K(`$ZodPrefault`,(e,t)=>{Qw.init(e,t),e._zod.optin=`optional`,IS(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),KT=K(`$ZodNonOptional`,(e,t)=>{Qw.init(e,t),IS(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Jw(t,e)):Jw(i,e)}}),qT=K(`$ZodCatch`,(e,t)=>{Qw.init(e,t),e._zod.optin=`optional`,IS(e._zod,`optout`,()=>t.innerType._zod.optout),IS(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>iC(e,n,wS()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>iC(e,n,wS()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),JT=K(`$ZodPipe`,(e,t)=>{Qw.init(e,t),IS(e._zod,`values`,()=>t.in._zod.values),IS(e._zod,`optin`,()=>t.in._zod.optin),IS(e._zod,`optout`,()=>t.out._zod.optout),IS(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Yw(e,t.in,n)):Yw(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yw(e,t.out,n)):Yw(r,t.out,n)}}),YT=K(`$ZodPreprocess`,(e,t)=>{JT.init(e,t)}),XT=K(`$ZodReadonly`,(e,t)=>{Qw.init(e,t),IS(e._zod,`propValues`,()=>t.innerType._zod.propValues),IS(e._zod,`values`,()=>t.innerType._zod.values),IS(e._zod,`optin`,()=>t.innerType?._zod?.optin),IS(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Xw):Xw(r)}}),ZT=K(`$ZodCustom`,(e,t)=>{mw.init(e,t),Qw.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Zw(t,n,r,e));Zw(i,n,r,e)}})}));function $T(){return new tE}var eE,tE,nE,rE=n((()=>{tE=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(eE=globalThis).__zod_globalRegistry??(eE.__zod_globalRegistry=$T()),nE=globalThis.__zod_globalRegistry}));function iE(e,t){return new e({type:`string`,...q(t)})}function aE(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function oE(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function sE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function cE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function lE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function uE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function dE(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function fE(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function pE(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function mE(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function hE(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function gE(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function _E(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function vE(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function yE(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function bE(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function xE(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function SE(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function CE(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function wE(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function TE(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function EE(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function DE(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function OE(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function kE(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function AE(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function jE(e,t){return new e({type:`number`,checks:[],...q(t)})}function ME(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function NE(e,t){return new e({type:`boolean`,...q(t)})}function PE(e,t){return new e({type:`undefined`,...q(t)})}function FE(e,t){return new e({type:`null`,...q(t)})}function IE(e){return new e({type:`unknown`})}function LE(e,t){return new e({type:`never`,...q(t)})}function RE(e,t){return new gw({check:`less_than`,...q(t),value:e,inclusive:!1})}function zE(e,t){return new gw({check:`less_than`,...q(t),value:e,inclusive:!0})}function BE(e,t){return new _w({check:`greater_than`,...q(t),value:e,inclusive:!1})}function VE(e,t){return new _w({check:`greater_than`,...q(t),value:e,inclusive:!0})}function HE(e,t){return new vw({check:`multiple_of`,...q(t),value:e})}function UE(e,t){return new bw({check:`max_length`,...q(t),maximum:e})}function WE(e,t){return new xw({check:`min_length`,...q(t),minimum:e})}function GE(e,t){return new Sw({check:`length_equals`,...q(t),length:e})}function KE(e,t){return new ww({check:`string_format`,format:`regex`,...q(t),pattern:e})}function qE(e){return new Tw({check:`string_format`,format:`lowercase`,...q(e)})}function JE(e){return new Ew({check:`string_format`,format:`uppercase`,...q(e)})}function YE(e,t){return new Dw({check:`string_format`,format:`includes`,...q(t),includes:e})}function XE(e,t){return new Ow({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function ZE(e,t){return new kw({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function QE(e){return new Aw({check:`overwrite`,tx:e})}function $E(e){return QE(t=>t.normalize(e))}function eD(){return QE(e=>e.trim())}function tD(){return QE(e=>e.toLowerCase())}function nD(){return QE(e=>e.toUpperCase())}function rD(){return QE(e=>BS(e))}function iD(e,t,n){return new e({type:`array`,element:t,...q(n)})}function aD(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function oD(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function sD(e,t){let n=cD(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(oC(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(oC(r))}},e(t.value,t)),t);return n}function cD(e,t){let n=new mw({check:`custom`,...q(t)});return n._zod.check=e,n}var lD=n((()=>{jw(),fC()}));function uD(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??nE,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function dD(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,dD(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&mD(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fD(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
120
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=NC,s=!bC.jitless,c=s&&tw.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?PT([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),EE=K(`$ZodUnion`,(e,t)=>{WT.init(e,t),OC(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),OC(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),OC(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),OC(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>EC(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>FT(t,r,e,i)):FT(o,r,e,i)}}),DE=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,EE.init(e,t);let n=e._zod.parse;OC(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=wC(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!NC(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),OE=K(`$ZodIntersection`,(e,t)=>{WT.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>LT(e,t,n)):LT(e,i,a)}}),kE=K(`$ZodRecord`,(e,t)=>{WT.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!PC(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>XC(e,r,gC())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...JC(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...JC(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&$w.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>XC(e,r,gC())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...JC(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...JC(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),AE=K(`$ZodEnum`,(e,t)=>{WT.init(e,t);let n=SC(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>nw.has(typeof e)).map(e=>typeof e==`string`?IC(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),jE=K(`$ZodLiteral`,(e,t)=>{if(WT.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?IC(e):e?IC(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ME=K(`$ZodTransform`,(e,t)=>{WT.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new yC(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new vC;return n.value=i,n.fallback=!0,n}}),NE=K(`$ZodOptional`,(e,t)=>{WT.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,OC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),OC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${EC(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>RT(e,r)):RT(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),PE=K(`$ZodExactOptional`,(e,t)=>{NE.init(e,t),OC(e._zod,`values`,()=>t.innerType._zod.values),OC(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),FE=K(`$ZodNullable`,(e,t)=>{WT.init(e,t),OC(e._zod,`optin`,()=>t.innerType._zod.optin),OC(e._zod,`optout`,()=>t.innerType._zod.optout),OC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${EC(e.source)}|null)$`):void 0}),OC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),IE=K(`$ZodDefault`,(e,t)=>{WT.init(e,t),e._zod.optin=`optional`,OC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>zT(e,t)):zT(r,t)}}),LE=K(`$ZodPrefault`,(e,t)=>{WT.init(e,t),e._zod.optin=`optional`,OC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),RE=K(`$ZodNonOptional`,(e,t)=>{WT.init(e,t),OC(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>BT(t,e)):BT(i,e)}}),zE=K(`$ZodCatch`,(e,t)=>{WT.init(e,t),e._zod.optin=`optional`,OC(e._zod,`optout`,()=>t.innerType._zod.optout),OC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>XC(e,n,gC()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>XC(e,n,gC()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),BE=K(`$ZodPipe`,(e,t)=>{WT.init(e,t),OC(e._zod,`values`,()=>t.in._zod.values),OC(e._zod,`optin`,()=>t.in._zod.optin),OC(e._zod,`optout`,()=>t.out._zod.optout),OC(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>VT(e,t.in,n)):VT(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>VT(e,t.out,n)):VT(r,t.out,n)}}),VE=K(`$ZodPreprocess`,(e,t)=>{BE.init(e,t)}),HE=K(`$ZodReadonly`,(e,t)=>{WT.init(e,t),OC(e._zod,`propValues`,()=>t.innerType._zod.propValues),OC(e._zod,`values`,()=>t.innerType._zod.values),OC(e._zod,`optin`,()=>t.innerType?._zod?.optin),OC(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(HT):HT(r)}}),UE=K(`$ZodCustom`,(e,t)=>{oT.init(e,t),WT.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>UT(t,n,r,e));UT(i,n,r,e)}})}));function GE(){return new qE}var KE,qE,JE,YE=n((()=>{qE=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(KE=globalThis).__zod_globalRegistry??(KE.__zod_globalRegistry=GE()),JE=globalThis.__zod_globalRegistry}));function XE(e,t){return new e({type:`string`,...q(t)})}function ZE(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function QE(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function $E(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function eD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function tD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function nD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function rD(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function iD(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function aD(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function oD(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function sD(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function cD(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function lD(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function uD(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function dD(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function fD(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function pD(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function mD(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function hD(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function gD(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function _D(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function vD(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function yD(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function bD(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function xD(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function SD(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function CD(e,t){return new e({type:`number`,checks:[],...q(t)})}function wD(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function TD(e,t){return new e({type:`boolean`,...q(t)})}function ED(e,t){return new e({type:`undefined`,...q(t)})}function DD(e,t){return new e({type:`null`,...q(t)})}function OD(e){return new e({type:`unknown`})}function kD(e,t){return new e({type:`never`,...q(t)})}function AD(e,t){return new cT({check:`less_than`,...q(t),value:e,inclusive:!1})}function jD(e,t){return new cT({check:`less_than`,...q(t),value:e,inclusive:!0})}function MD(e,t){return new lT({check:`greater_than`,...q(t),value:e,inclusive:!1})}function ND(e,t){return new lT({check:`greater_than`,...q(t),value:e,inclusive:!0})}function PD(e,t){return new uT({check:`multiple_of`,...q(t),value:e})}function FD(e,t){return new fT({check:`max_length`,...q(t),maximum:e})}function ID(e,t){return new pT({check:`min_length`,...q(t),minimum:e})}function LD(e,t){return new mT({check:`length_equals`,...q(t),length:e})}function RD(e,t){return new gT({check:`string_format`,format:`regex`,...q(t),pattern:e})}function zD(e){return new _T({check:`string_format`,format:`lowercase`,...q(e)})}function BD(e){return new vT({check:`string_format`,format:`uppercase`,...q(e)})}function VD(e,t){return new yT({check:`string_format`,format:`includes`,...q(t),includes:e})}function HD(e,t){return new bT({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function UD(e,t){return new xT({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function WD(e){return new ST({check:`overwrite`,tx:e})}function GD(e){return WD(t=>t.normalize(e))}function KD(){return WD(e=>e.trim())}function qD(){return WD(e=>e.toLowerCase())}function JD(){return WD(e=>e.toUpperCase())}function YD(){return WD(e=>MC(e))}function XD(e,t,n){return new e({type:`array`,element:t,...q(n)})}function ZD(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function QD(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function $D(e,t){let n=eO(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(QC(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(QC(r))}},e(t.value,t)),t);return n}function eO(e,t){let n=new oT({check:`custom`,...q(t)});return n._zod.check=e,n}var tO=n((()=>{CT(),iw()}));function nO(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??JE,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function rO(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,rO(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&oO(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function iO(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
120
121
|
|
|
121
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}}function pD(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:gD(t,`input`,e.processors),output:gD(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function mD(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return mD(r.element,n);if(r.type===`set`)return mD(r.valueType,n);if(r.type===`lazy`)return mD(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return mD(r.innerType,n);if(r.type===`intersection`)return mD(r.left,n)||mD(r.right,n);if(r.type===`record`||r.type===`map`)return mD(r.keyType,n)||mD(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:mD(r.in,n)||mD(r.out,n);if(r.type===`object`){for(let e in r.shape)if(mD(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(mD(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(mD(e,n))return!0;return!!(r.rest&&mD(r.rest,n))}return!1}var hD,gD,_D=n((()=>{rE(),hD=(e,t={})=>n=>{let r=uD({...n,processors:t});return dD(e,r),fD(r,e),pD(r,e)},gD=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=uD({...i??{},target:a,io:t,processors:n});return dD(e,o),fD(o,e),pD(o,e)}})),vD,yD,bD,xD,SD,CD,wD,TD,ED,DD,OD,kD,AD,jD,MD,ND,PD,FD,ID,LD,RD,zD,BD,VD,HD,UD=n((()=>{_D(),fC(),vD={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},yD=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=vD[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},bD=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},xD=(e,t,n,r)=>{n.type=`boolean`},SD=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},CD=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},wD=(e,t,n,r)=>{n.not={}},TD=(e,t,n,r)=>{},ED=(e,t,n,r)=>{let i=e._zod.def,a=AS(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},DD=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},OD=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},kD=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},AD=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=dD(a.element,t,{...r,path:[...r.path,`items`]})},jD=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=dD(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=dD(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},MD=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>dD(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ND=(e,t,n,r)=>{let i=e._zod.def,a=dD(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=dD(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},PD=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=dD(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=dD(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=dD(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},FD=(e,t,n,r)=>{let i=e._zod.def,a=dD(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ID=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},LD=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},RD=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},zD=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},BD=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;dD(o,t,r);let s=t.seen.get(e);s.ref=o},VD=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},HD=(e,t,n,r)=>{let i=e._zod.def;dD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),WD=n((()=>{kS(),NC(),vC(),QT(),jw(),Fw(),fC(),pw(),rE(),Nw(),lD(),_D(),UD(),_D()})),GD=n((()=>{WD()}));function KD(e){return DE(XD,e)}function qD(e){return OE(ZD,e)}function JD(e){return kE(QD,e)}function YD(e){return AE($D,e)}var XD,ZD,QD,$D,eO=n((()=>{WD(),Hk(),XD=K(`ZodISODateTime`,(e,t)=>{fT.init(e,t),YO.init(e,t)}),ZD=K(`ZodISODate`,(e,t)=>{pT.init(e,t),YO.init(e,t)}),QD=K(`ZodISOTime`,(e,t)=>{mT.init(e,t),YO.init(e,t)}),$D=K(`ZodISODuration`,(e,t)=>{hT.init(e,t),YO.init(e,t)})})),tO,nO,rO=n((()=>{WD(),fC(),tO=(e,t)=>{gC.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>mC(e,t)},flatten:{value:t=>pC(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,jS,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,jS,2)}},isEmpty:{get(){return e.issues.length===0}}})},nO=K(`ZodError`,tO,{Parent:Error})})),iO,aO,oO,sO,cO,lO,uO,dO,fO,pO,mO,hO,gO=n((()=>{WD(),rO(),iO=yC(nO),aO=bC(nO),oO=xC(nO),sO=CC(nO),cO=TC(nO),lO=EC(nO),uO=DC(nO),dO=OC(nO),fO=kC(nO),pO=AC(nO),mO=jC(nO),hO=MC(nO)}));function _O(e,t,n){let r=Object.getPrototypeOf(e),i=GO.get(r);if(i||(i=new Set,GO.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function J(e){return iE(JO,e)}function vO(e){return jE(hk,e)}function yO(e){return ME(gk,e)}function bO(e){return NE(_k,e)}function xO(e){return PE(vk,e)}function SO(e){return FE(yk,e)}function CO(){return IE(bk)}function wO(e){return LE(xk,e)}function Y(e,t){return iD(Sk,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...q(t)};return new Ck(n)}function TO(e,t){return new Ck({type:`object`,shape:e,catchall:CO(),...q(t)})}function EO(e,t){return new wk({type:`union`,options:e,...q(t)})}function DO(e,t,n){return new Tk({type:`union`,options:t,discriminator:e,...q(n)})}function OO(e,t){return new Ek({type:`intersection`,left:e,right:t})}function kO(e,t,n){return!t||!t._zod?new Dk({type:`record`,keyType:J(),valueType:e,...q(t)}):new Dk({type:`record`,keyType:e,valueType:t,...q(n)})}function AO(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ok({type:`enum`,entries:n,...q(t)})}function Z(e,t){return new kk({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function jO(e){return new Ak({type:`transform`,transform:e})}function MO(e){return new jk({type:`optional`,innerType:e})}function NO(e){return new Mk({type:`optional`,innerType:e})}function PO(e){return new Nk({type:`nullable`,innerType:e})}function FO(e,t){return new Pk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():US(t)}})}function IO(e,t){return new Fk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():US(t)}})}function LO(e,t){return new Ik({type:`nonoptional`,innerType:e,...q(t)})}function RO(e,t){return new Lk({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function zO(e,t){return new Rk({type:`pipe`,in:e,out:t})}function BO(e){return new Bk({type:`readonly`,innerType:e})}function VO(e,t){return aD(Vk,e??(()=>!0),t)}function HO(e,t={}){return oD(Vk,e,t)}function UO(e,t){return sD(e,t)}function WO(e,t){return new zk({type:`pipe`,in:jO(e),out:t})}var GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk=n((()=>{WD(),UD(),_D(),GD(),eO(),gO(),GO=new WeakMap,KO=K(`ZodType`,(e,t)=>(Qw.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:gD(e,`input`),output:gD(e,`output`)}}),e.toJSONSchema=hD(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>iO(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>oO(e,t,n),e.parseAsync=async(t,n)=>aO(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>sO(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>cO(e,t,n),e.decode=(t,n)=>lO(e,t,n),e.encodeAsync=async(t,n)=>uO(e,t,n),e.decodeAsync=async(t,n)=>dO(e,t,n),e.safeEncode=(t,n)=>fO(e,t,n),e.safeDecode=(t,n)=>pO(e,t,n),e.safeEncodeAsync=async(t,n)=>mO(e,t,n),e.safeDecodeAsync=async(t,n)=>hO(e,t,n),_O(e,`ZodType`,{check(...e){let t=this.def;return this.clone(RS(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return GS(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(HO(e,t))},superRefine(e,t){return this.check(UO(e,t))},overwrite(e){return this.check(QE(e))},optional(){return MO(this)},exactOptional(){return NO(this)},nullable(){return PO(this)},nullish(){return MO(PO(this))},nonoptional(e){return LO(this,e)},array(){return Y(this)},or(e){return EO([this,e])},and(e){return OO(this,e)},transform(e){return zO(this,jO(e))},default(e){return FO(this,e)},prefault(e){return IO(this,e)},catch(e){return RO(this,e)},pipe(e){return zO(this,e)},readonly(){return BO(this)},describe(e){let t=this.clone();return nE.add(t,{description:e}),t},meta(...e){if(e.length===0)return nE.get(this);let t=this.clone();return nE.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return nE.get(e)?.description},configurable:!0}),e)),qO=K(`_ZodString`,(e,t)=>{$w.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yD(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_O(e,`_ZodString`,{regex(...e){return this.check(KE(...e))},includes(...e){return this.check(YE(...e))},startsWith(...e){return this.check(XE(...e))},endsWith(...e){return this.check(ZE(...e))},min(...e){return this.check(WE(...e))},max(...e){return this.check(UE(...e))},length(...e){return this.check(GE(...e))},nonempty(...e){return this.check(WE(1,...e))},lowercase(e){return this.check(qE(e))},uppercase(e){return this.check(JE(e))},trim(){return this.check(eD())},normalize(...e){return this.check($E(...e))},toLowerCase(){return this.check(tD())},toUpperCase(){return this.check(nD())},slugify(){return this.check(rD())}})}),JO=K(`ZodString`,(e,t)=>{$w.init(e,t),qO.init(e,t),e.email=t=>e.check(aE(XO,t)),e.url=t=>e.check(dE($O,t)),e.jwt=t=>e.check(EE(mk,t)),e.emoji=t=>e.check(fE(ek,t)),e.guid=t=>e.check(oE(ZO,t)),e.uuid=t=>e.check(sE(QO,t)),e.uuidv4=t=>e.check(cE(QO,t)),e.uuidv6=t=>e.check(lE(QO,t)),e.uuidv7=t=>e.check(uE(QO,t)),e.nanoid=t=>e.check(pE(tk,t)),e.guid=t=>e.check(oE(ZO,t)),e.cuid=t=>e.check(mE(nk,t)),e.cuid2=t=>e.check(hE(rk,t)),e.ulid=t=>e.check(gE(ik,t)),e.base64=t=>e.check(CE(dk,t)),e.base64url=t=>e.check(wE(fk,t)),e.xid=t=>e.check(_E(ak,t)),e.ksuid=t=>e.check(vE(ok,t)),e.ipv4=t=>e.check(yE(sk,t)),e.ipv6=t=>e.check(bE(ck,t)),e.cidrv4=t=>e.check(xE(lk,t)),e.cidrv6=t=>e.check(SE(uk,t)),e.e164=t=>e.check(TE(pk,t)),e.datetime=t=>e.check(KD(t)),e.date=t=>e.check(qD(t)),e.time=t=>e.check(JD(t)),e.duration=t=>e.check(YD(t))}),YO=K(`ZodStringFormat`,(e,t)=>{eT.init(e,t),qO.init(e,t)}),XO=K(`ZodEmail`,(e,t)=>{rT.init(e,t),YO.init(e,t)}),ZO=K(`ZodGUID`,(e,t)=>{tT.init(e,t),YO.init(e,t)}),QO=K(`ZodUUID`,(e,t)=>{nT.init(e,t),YO.init(e,t)}),$O=K(`ZodURL`,(e,t)=>{iT.init(e,t),YO.init(e,t)}),ek=K(`ZodEmoji`,(e,t)=>{aT.init(e,t),YO.init(e,t)}),tk=K(`ZodNanoID`,(e,t)=>{oT.init(e,t),YO.init(e,t)}),nk=K(`ZodCUID`,(e,t)=>{sT.init(e,t),YO.init(e,t)}),rk=K(`ZodCUID2`,(e,t)=>{cT.init(e,t),YO.init(e,t)}),ik=K(`ZodULID`,(e,t)=>{lT.init(e,t),YO.init(e,t)}),ak=K(`ZodXID`,(e,t)=>{uT.init(e,t),YO.init(e,t)}),ok=K(`ZodKSUID`,(e,t)=>{dT.init(e,t),YO.init(e,t)}),sk=K(`ZodIPv4`,(e,t)=>{gT.init(e,t),YO.init(e,t)}),ck=K(`ZodIPv6`,(e,t)=>{_T.init(e,t),YO.init(e,t)}),lk=K(`ZodCIDRv4`,(e,t)=>{vT.init(e,t),YO.init(e,t)}),uk=K(`ZodCIDRv6`,(e,t)=>{yT.init(e,t),YO.init(e,t)}),dk=K(`ZodBase64`,(e,t)=>{bT.init(e,t),YO.init(e,t)}),fk=K(`ZodBase64URL`,(e,t)=>{xT.init(e,t),YO.init(e,t)}),pk=K(`ZodE164`,(e,t)=>{ST.init(e,t),YO.init(e,t)}),mk=K(`ZodJWT`,(e,t)=>{CT.init(e,t),YO.init(e,t)}),hk=K(`ZodNumber`,(e,t)=>{wT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bD(e,t,n,r),_O(e,`ZodNumber`,{gt(e,t){return this.check(BE(e,t))},gte(e,t){return this.check(VE(e,t))},min(e,t){return this.check(VE(e,t))},lt(e,t){return this.check(RE(e,t))},lte(e,t){return this.check(zE(e,t))},max(e,t){return this.check(zE(e,t))},int(e){return this.check(yO(e))},safe(e){return this.check(yO(e))},positive(e){return this.check(BE(0,e))},nonnegative(e){return this.check(VE(0,e))},negative(e){return this.check(RE(0,e))},nonpositive(e){return this.check(zE(0,e))},multipleOf(e,t){return this.check(HE(e,t))},step(e,t){return this.check(HE(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),gk=K(`ZodNumberFormat`,(e,t)=>{TT.init(e,t),hk.init(e,t)}),_k=K(`ZodBoolean`,(e,t)=>{ET.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xD(e,t,n,r)}),vk=K(`ZodUndefined`,(e,t)=>{DT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CD(e,t,n,r)}),yk=K(`ZodNull`,(e,t)=>{OT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SD(e,t,n,r)}),bk=K(`ZodUnknown`,(e,t)=>{kT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TD(e,t,n,r)}),xk=K(`ZodNever`,(e,t)=>{AT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wD(e,t,n,r)}),Sk=K(`ZodArray`,(e,t)=>{jT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AD(e,t,n,r),e.element=t.element,_O(e,`ZodArray`,{min(e,t){return this.check(WE(e,t))},nonempty(e){return this.check(WE(1,e))},max(e,t){return this.check(UE(e,t))},length(e,t){return this.check(GE(e,t))},unwrap(){return this.element}})}),Ck=K(`ZodObject`,(e,t)=>{NT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jD(e,t,n,r),IS(e,`shape`,()=>t.shape),_O(e,`ZodObject`,{keyof(){return AO(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:CO()})},loose(){return this.clone({...this._zod.def,catchall:CO()})},strict(){return this.clone({...this._zod.def,catchall:wO()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return YS(this,e)},safeExtend(e){return XS(this,e)},merge(e){return ZS(this,e)},pick(e){return qS(this,e)},omit(e){return JS(this,e)},partial(...e){return QS(jk,this,e[0])},required(...e){return $S(Ik,this,e[0])}})}),wk=K(`ZodUnion`,(e,t)=>{PT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MD(e,t,n,r),e.options=t.options}),Tk=K(`ZodDiscriminatedUnion`,(e,t)=>{wk.init(e,t),FT.init(e,t)}),Ek=K(`ZodIntersection`,(e,t)=>{IT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ND(e,t,n,r)}),Dk=K(`ZodRecord`,(e,t)=>{LT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PD(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),Ok=K(`ZodEnum`,(e,t)=>{RT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ED(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ok({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ok({...t,checks:[],...q(r),entries:i})}}),kk=K(`ZodLiteral`,(e,t)=>{zT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DD(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Ak=K(`ZodTransform`,(e,t)=>{BT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kD(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new DS(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oC(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(oC(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),jk=K(`ZodOptional`,(e,t)=>{VT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Mk=K(`ZodExactOptional`,(e,t)=>{HT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Nk=K(`ZodNullable`,(e,t)=>{UT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Pk=K(`ZodDefault`,(e,t)=>{WT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Fk=K(`ZodPrefault`,(e,t)=>{GT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ik=K(`ZodNonOptional`,(e,t)=>{KT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ID(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Lk=K(`ZodCatch`,(e,t)=>{qT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Rk=K(`ZodPipe`,(e,t)=>{JT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BD(e,t,n,r),e.in=t.in,e.out=t.out}),zk=K(`ZodPreprocess`,(e,t)=>{Rk.init(e,t),YT.init(e,t)}),Bk=K(`ZodReadonly`,(e,t)=>{XT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Vk=K(`ZodCustom`,(e,t)=>{ZT.init(e,t),KO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OD(e,t,n,r)})})),Uk=n((()=>{WD()})),Wk=n((()=>{WD(),Hk(),GD(),rO(),gO(),Uk(),UD(),rE(),GD(),eO(),Hk(),fC()})),Gk=n((()=>{Wk(),Wk()})),Kk=n((()=>{Gk()}));Kk();var qk=`io.modelcontextprotocol/related-task`,Jk=VO(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Yk=EO([J(),vO().int()]),Xk=J();TO({ttl:vO().optional(),pollInterval:vO().optional()});var Zk=X({ttl:vO().optional()}),Qk=X({taskId:J()}),$k=TO({progressToken:Yk.optional(),[qk]:Qk.optional()}),eA=X({_meta:$k.optional()}),tA=eA.extend({task:Zk.optional()}),nA=e=>tA.safeParse(e).success,rA=X({method:J(),params:eA.loose().optional()}),iA=X({_meta:$k.optional()}),aA=X({method:J(),params:iA.loose().optional()}),oA=TO({_meta:$k.optional()}),sA=EO([J(),vO().int()]),cA=X({jsonrpc:Z(`2.0`),id:sA,...rA.shape}).strict(),lA=e=>cA.safeParse(e).success,uA=X({jsonrpc:Z(`2.0`),...aA.shape}).strict(),dA=e=>uA.safeParse(e).success,fA=X({jsonrpc:Z(`2.0`),id:sA,result:oA}).strict(),pA=e=>fA.safeParse(e).success,mA;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(mA||={});var hA=X({jsonrpc:Z(`2.0`),id:sA.optional(),error:X({code:vO().int(),message:J(),data:CO().optional()})}).strict(),gA=e=>hA.safeParse(e).success;EO([cA,uA,fA,hA]),EO([fA,hA]);var _A=oA.strict(),vA=iA.extend({requestId:sA.optional(),reason:J().optional()}),yA=aA.extend({method:Z(`notifications/cancelled`),params:vA}),bA=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:AO([`light`,`dark`]).optional()})).optional()}),xA=X({name:J(),title:J().optional()}),SA=xA.extend({...xA.shape,...bA.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),CA=WO(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,OO(X({form:OO(X({applyDefaults:bO().optional()}),kO(J(),CO())).optional(),url:Jk.optional()}),kO(J(),CO()).optional())),wA=TO({list:Jk.optional(),cancel:Jk.optional(),requests:TO({sampling:TO({createMessage:Jk.optional()}).optional(),elicitation:TO({create:Jk.optional()}).optional()}).optional()}),TA=TO({list:Jk.optional(),cancel:Jk.optional(),requests:TO({tools:TO({call:Jk.optional()}).optional()}).optional()}),EA=X({experimental:kO(J(),Jk).optional(),sampling:X({context:Jk.optional(),tools:Jk.optional()}).optional(),elicitation:CA.optional(),roots:X({listChanged:bO().optional()}).optional(),tasks:wA.optional(),extensions:kO(J(),Jk).optional()}),DA=eA.extend({protocolVersion:J(),capabilities:EA,clientInfo:SA}),OA=rA.extend({method:Z(`initialize`),params:DA}),kA=X({experimental:kO(J(),Jk).optional(),logging:Jk.optional(),completions:Jk.optional(),prompts:X({listChanged:bO().optional()}).optional(),resources:X({subscribe:bO().optional(),listChanged:bO().optional()}).optional(),tools:X({listChanged:bO().optional()}).optional(),tasks:TA.optional(),extensions:kO(J(),Jk).optional()}),AA=oA.extend({protocolVersion:J(),capabilities:kA,serverInfo:SA,instructions:J().optional()}),jA=aA.extend({method:Z(`notifications/initialized`),params:iA.optional()}),MA=rA.extend({method:Z(`ping`),params:eA.optional()}),NA=X({progress:vO(),total:MO(vO()),message:MO(J())}),PA=X({...iA.shape,...NA.shape,progressToken:Yk}),FA=aA.extend({method:Z(`notifications/progress`),params:PA}),IA=eA.extend({cursor:Xk.optional()}),LA=rA.extend({params:IA.optional()}),RA=oA.extend({nextCursor:Xk.optional()}),zA=AO([`working`,`input_required`,`completed`,`failed`,`cancelled`]),BA=X({taskId:J(),status:zA,ttl:EO([vO(),SO()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:MO(vO()),statusMessage:MO(J())}),VA=oA.extend({task:BA}),HA=iA.merge(BA),UA=aA.extend({method:Z(`notifications/tasks/status`),params:HA}),WA=rA.extend({method:Z(`tasks/get`),params:eA.extend({taskId:J()})}),GA=oA.merge(BA),KA=rA.extend({method:Z(`tasks/result`),params:eA.extend({taskId:J()})});oA.loose();var qA=LA.extend({method:Z(`tasks/list`)}),JA=RA.extend({tasks:Y(BA)}),YA=rA.extend({method:Z(`tasks/cancel`),params:eA.extend({taskId:J()})}),XA=oA.merge(BA),ZA=X({uri:J(),mimeType:MO(J()),_meta:kO(J(),CO()).optional()}),QA=ZA.extend({text:J()}),$A=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ej=ZA.extend({blob:$A}),tj=AO([`user`,`assistant`]),nj=X({audience:Y(tj).optional(),priority:vO().min(0).max(1).optional(),lastModified:KD({offset:!0}).optional()}),rj=X({...xA.shape,...bA.shape,uri:J(),description:MO(J()),mimeType:MO(J()),size:MO(vO()),annotations:nj.optional(),_meta:MO(TO({}))}),ij=X({...xA.shape,...bA.shape,uriTemplate:J(),description:MO(J()),mimeType:MO(J()),annotations:nj.optional(),_meta:MO(TO({}))}),aj=LA.extend({method:Z(`resources/list`)}),oj=RA.extend({resources:Y(rj)}),sj=LA.extend({method:Z(`resources/templates/list`)}),cj=RA.extend({resourceTemplates:Y(ij)}),lj=eA.extend({uri:J()}),uj=lj,dj=rA.extend({method:Z(`resources/read`),params:uj}),fj=oA.extend({contents:Y(EO([QA,ej]))}),pj=aA.extend({method:Z(`notifications/resources/list_changed`),params:iA.optional()}),mj=lj,hj=rA.extend({method:Z(`resources/subscribe`),params:mj}),gj=lj,_j=rA.extend({method:Z(`resources/unsubscribe`),params:gj}),vj=iA.extend({uri:J()}),yj=aA.extend({method:Z(`notifications/resources/updated`),params:vj}),bj=X({name:J(),description:MO(J()),required:MO(bO())}),xj=X({...xA.shape,...bA.shape,description:MO(J()),arguments:MO(Y(bj)),_meta:MO(TO({}))}),Sj=LA.extend({method:Z(`prompts/list`)}),Cj=RA.extend({prompts:Y(xj)}),wj=eA.extend({name:J(),arguments:kO(J(),J()).optional()}),Tj=rA.extend({method:Z(`prompts/get`),params:wj}),Ej=X({type:Z(`text`),text:J(),annotations:nj.optional(),_meta:kO(J(),CO()).optional()}),Dj=X({type:Z(`image`),data:$A,mimeType:J(),annotations:nj.optional(),_meta:kO(J(),CO()).optional()}),Oj=X({type:Z(`audio`),data:$A,mimeType:J(),annotations:nj.optional(),_meta:kO(J(),CO()).optional()}),kj=X({type:Z(`tool_use`),name:J(),id:J(),input:kO(J(),CO()),_meta:kO(J(),CO()).optional()}),Aj=X({type:Z(`resource`),resource:EO([QA,ej]),annotations:nj.optional(),_meta:kO(J(),CO()).optional()}),jj=rj.extend({type:Z(`resource_link`)}),Mj=EO([Ej,Dj,Oj,jj,Aj]),Nj=X({role:tj,content:Mj}),Pj=oA.extend({description:J().optional(),messages:Y(Nj)}),Fj=aA.extend({method:Z(`notifications/prompts/list_changed`),params:iA.optional()}),Ij=X({title:J().optional(),readOnlyHint:bO().optional(),destructiveHint:bO().optional(),idempotentHint:bO().optional(),openWorldHint:bO().optional()}),Lj=X({taskSupport:AO([`required`,`optional`,`forbidden`]).optional()}),Rj=X({...xA.shape,...bA.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:kO(J(),Jk).optional(),required:Y(J()).optional()}).catchall(CO()),outputSchema:X({type:Z(`object`),properties:kO(J(),Jk).optional(),required:Y(J()).optional()}).catchall(CO()).optional(),annotations:Ij.optional(),execution:Lj.optional(),_meta:kO(J(),CO()).optional()}),zj=LA.extend({method:Z(`tools/list`)}),Bj=RA.extend({tools:Y(Rj)}),Vj=oA.extend({content:Y(Mj).default([]),structuredContent:kO(J(),CO()).optional(),isError:bO().optional()});Vj.or(oA.extend({toolResult:CO()}));var Hj=tA.extend({name:J(),arguments:kO(J(),CO()).optional()}),Uj=rA.extend({method:Z(`tools/call`),params:Hj}),Wj=aA.extend({method:Z(`notifications/tools/list_changed`),params:iA.optional()});X({autoRefresh:bO().default(!0),debounceMs:vO().int().nonnegative().default(300)});var Gj=AO([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Kj=eA.extend({level:Gj}),qj=rA.extend({method:Z(`logging/setLevel`),params:Kj}),Jj=iA.extend({level:Gj,logger:J().optional(),data:CO()}),Yj=aA.extend({method:Z(`notifications/message`),params:Jj}),Xj=X({hints:Y(X({name:J().optional()})).optional(),costPriority:vO().min(0).max(1).optional(),speedPriority:vO().min(0).max(1).optional(),intelligencePriority:vO().min(0).max(1).optional()}),Zj=X({mode:AO([`auto`,`required`,`none`]).optional()}),Qj=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(Mj).default([]),structuredContent:X({}).loose().optional(),isError:bO().optional(),_meta:kO(J(),CO()).optional()}),$j=DO(`type`,[Ej,Dj,Oj]),eM=DO(`type`,[Ej,Dj,Oj,kj,Qj]),tM=X({role:tj,content:EO([eM,Y(eM)]),_meta:kO(J(),CO()).optional()}),nM=tA.extend({messages:Y(tM),modelPreferences:Xj.optional(),systemPrompt:J().optional(),includeContext:AO([`none`,`thisServer`,`allServers`]).optional(),temperature:vO().optional(),maxTokens:vO().int(),stopSequences:Y(J()).optional(),metadata:Jk.optional(),tools:Y(Rj).optional(),toolChoice:Zj.optional()}),rM=rA.extend({method:Z(`sampling/createMessage`),params:nM}),iM=oA.extend({model:J(),stopReason:MO(AO([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:tj,content:$j}),aM=oA.extend({model:J(),stopReason:MO(AO([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:tj,content:EO([eM,Y(eM)])}),oM=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:bO().optional()}),sM=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:vO().optional(),maxLength:vO().optional(),format:AO([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),cM=X({type:AO([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:vO().optional(),maximum:vO().optional(),default:vO().optional()}),lM=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),uM=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),dM=EO([EO([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),EO([lM,uM]),EO([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:vO().optional(),maxItems:vO().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:vO().optional(),maxItems:vO().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),oM,sM,cM]),fM=EO([tA.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:kO(J(),dM),required:Y(J()).optional()})}),tA.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),pM=rA.extend({method:Z(`elicitation/create`),params:fM}),mM=iA.extend({elicitationId:J()}),hM=aA.extend({method:Z(`notifications/elicitation/complete`),params:mM}),gM=oA.extend({action:AO([`accept`,`decline`,`cancel`]),content:WO(e=>e===null?void 0:e,kO(J(),EO([J(),vO(),bO(),Y(J())])).optional())}),_M=X({type:Z(`ref/resource`),uri:J()}),vM=X({type:Z(`ref/prompt`),name:J()}),yM=eA.extend({ref:EO([vM,_M]),argument:X({name:J(),value:J()}),context:X({arguments:kO(J(),J()).optional()}).optional()}),bM=rA.extend({method:Z(`completion/complete`),params:yM}),xM=oA.extend({completion:TO({values:Y(J()).max(100),total:MO(vO().int()),hasMore:MO(bO())})}),SM=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:kO(J(),CO()).optional()}),CM=rA.extend({method:Z(`roots/list`),params:eA.optional()}),wM=oA.extend({roots:Y(SM)}),TM=aA.extend({method:Z(`notifications/roots/list_changed`),params:iA.optional()});EO([MA,OA,bM,qj,Tj,Sj,aj,sj,dj,hj,_j,Uj,zj,WA,KA,qA,YA]),EO([yA,FA,jA,TM,UA]),EO([_A,iM,aM,gM,wM,GA,JA,VA]),EO([MA,rM,pM,CM,WA,KA,qA,YA]),EO([yA,FA,Yj,yj,pj,Wj,Fj,UA,hM]),EO([_A,AA,xM,Pj,Cj,oj,cj,fj,Vj,Bj,GA,JA,VA]);var EM=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===mA.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new DM(e.elicitations,n)}return new e(t,n,r)}},DM=class extends EM{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(mA.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};NC();function OM(e){return!!e._zod}function kM(e,t){return OM(e)?SC(e,t):e.safeParse(t)}function AM(e){if(!e)return;let t;if(t=OM(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function jM(e){if(OM(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function MM(e){return e===`completed`||e===`failed`||e===`cancelled`}function NM(e){let t=AM(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=jM(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function PM(e,t){let n=kM(e,t);if(!n.success)throw n.error;return n.data}var FM=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(yA,e=>{this._oncancel(e)}),this.setNotificationHandler(FA,e=>{this._onprogress(e)}),this.setRequestHandler(MA,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(WA,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new EM(mA.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(KA,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(!await this._taskStore.getTask(r,t.sessionId))throw new EM(mA.InvalidParams,`Task not found: ${r}`);if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);)if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new EM(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}}else await this._transport?.send(e.message,{relatedRequestId:t.requestId})}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new EM(mA.InvalidParams,`Task not found: ${r}`);if(!MM(i.status))return await this._waitForTaskUpdate(r,t.signal,t.sessionId),await n();if(MM(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r,t.sessionId),{...e,_meta:{...e._meta,[qk]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(qA,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new EM(mA.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(YA,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new EM(mA.InvalidParams,`Task not found: ${e.params.taskId}`);if(MM(n.status))throw new EM(mA.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId,t.sessionId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new EM(mA.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof EM?e:new EM(mA.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),EM.fromError(mA.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),pA(e)||gA(e)?this._onresponse(e):lA(e)?this._onrequest(e,t):dA(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=EM.fromError(mA.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[qk]?.taskId,a=r?.sessionId,o=this._taskStore,s=!0,c;if(i&&o&&this._taskMessageQueue&&a!==void 0&&(s=!1,c=(async()=>{if(!await o.getTask(i,a))throw new EM(mA.InvalidParams,`Task not found: ${i}`);s=!0})()),n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:mA.MethodNotFound,message:`Method not found`}};if(i&&c){let e={type:`error`,message:t,timestamp:Date.now()};c.then(()=>this._enqueueTaskMessage(i,e,a),()=>r?.send(t)).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))}else i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);let u=nA(e.params)?e.params.task:void 0,d=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,f={signal:l.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(l.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(l.signal.aborted)throw new EM(mA.ConnectionClosed,`Request was cancelled`);let a={...r,relatedRequestId:e.id};i&&!a.relatedTask&&(a.relatedTask={taskId:i});let o=a.relatedTask?.taskId??i;return o&&d&&await d.updateTaskStatus(o,`input_required`),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};(c??Promise.resolve()).then(()=>{if(c&&l.signal.aborted)throw new EM(mA.ConnectionClosed,`Request was cancelled`);u&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,f)).then(async t=>{if(l.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(l.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:mA.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue&&s?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===l&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),pA(e)?n(e):n(new EM(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(pA(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),pA(e)?r(e):r(EM.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof EM?e:new EM(mA.InternalError,String(e))}}return}let i;try{let r=await this.request(e,VA,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new EM(mA.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},MM(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new EM(mA.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new EM(mA.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof EM?e:new EM(mA.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[qk]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof EM?e:new EM(mA.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=kM(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(EM.fromError(mA.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},GA,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},JA,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},XA,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[qk]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[qk]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[qk]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=NM(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=PM(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=NM(e);this._notificationHandlers.set(n,n=>{let r=PM(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n??this._transport?.sessionId,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&lA(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new EM(mA.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e,n);t?.pollInterval&&(r=t.pollInterval)}catch{}return new Promise((e,n)=>{if(t.aborted){n(new EM(mA.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,r);t.addEventListener(`abort`,()=>{clearTimeout(i),n(new EM(mA.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new EM(mA.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=UA.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),MM(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new EM(mA.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(MM(a.status))throw new EM(mA.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=UA.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),MM(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};Kk(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var IM=class extends FM{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},LM=`2026-01-26`,RM=EO([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),zM=EO([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),BM=kO(EO([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
122
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}}function aO(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:cO(t,`input`,e.processors),output:cO(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function oO(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return oO(r.element,n);if(r.type===`set`)return oO(r.valueType,n);if(r.type===`lazy`)return oO(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return oO(r.innerType,n);if(r.type===`intersection`)return oO(r.left,n)||oO(r.right,n);if(r.type===`record`||r.type===`map`)return oO(r.keyType,n)||oO(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:oO(r.in,n)||oO(r.out,n);if(r.type===`object`){for(let e in r.shape)if(oO(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(oO(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(oO(e,n))return!0;return!!(r.rest&&oO(r.rest,n))}return!1}var sO,cO,lO=n((()=>{YE(),sO=(e,t={})=>n=>{let r=nO({...n,processors:t});return rO(e,r),iO(r,e),aO(r,e)},cO=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=nO({...i??{},target:a,io:t,processors:n});return rO(e,o),iO(o,e),aO(o,e)}})),uO,dO,fO,pO,mO,hO,gO,_O,vO,yO,bO,xO,SO,CO,wO,TO,EO,DO,OO,kO,AO,jO,MO,NO,PO,FO=n((()=>{lO(),iw(),uO={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},dO=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=uO[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},fO=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},pO=(e,t,n,r)=>{n.type=`boolean`},mO=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},hO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},gO=(e,t,n,r)=>{n.not={}},_O=(e,t,n,r)=>{},vO=(e,t,n,r)=>{let i=e._zod.def,a=SC(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yO=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},bO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},xO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},SO=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=rO(a.element,t,{...r,path:[...r.path,`items`]})},CO=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=rO(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=rO(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wO=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>rO(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},TO=(e,t,n,r)=>{let i=e._zod.def,a=rO(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=rO(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},EO=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=rO(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=rO(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=rO(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},DO=(e,t,n,r)=>{let i=e._zod.def,a=rO(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},OO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},kO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},AO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},jO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},MO=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;rO(o,t,r);let s=t.seen.get(e);s.ref=o},NO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},PO=(e,t,n,r)=>{let i=e._zod.def;rO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),IO=n((()=>{xC(),Tw(),uw(),WE(),CT(),DT(),iw(),aT(),YE(),TT(),tO(),lO(),FO(),lO()})),LO=n((()=>{IO()}));function RO(e){return yD(HO,e)}function zO(e){return bD(UO,e)}function BO(e){return xD(WO,e)}function VO(e){return SD(GO,e)}var HO,UO,WO,GO,KO=n((()=>{IO(),PA(),HO=K(`ZodISODateTime`,(e,t)=>{iE.init(e,t),Vk.init(e,t)}),UO=K(`ZodISODate`,(e,t)=>{aE.init(e,t),Vk.init(e,t)}),WO=K(`ZodISOTime`,(e,t)=>{oE.init(e,t),Vk.init(e,t)}),GO=K(`ZodISODuration`,(e,t)=>{sE.init(e,t),Vk.init(e,t)})})),qO,JO,YO=n((()=>{IO(),iw(),qO=(e,t)=>{cw.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ow(e,t)},flatten:{value:t=>aw(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,CC,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,CC,2)}},isEmpty:{get(){return e.issues.length===0}}})},JO=K(`ZodError`,qO,{Parent:Error})})),XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck=n((()=>{IO(),YO(),XO=dw(JO),ZO=fw(JO),QO=pw(JO),$O=hw(JO),ek=_w(JO),tk=vw(JO),nk=yw(JO),rk=bw(JO),ik=xw(JO),ak=Sw(JO),ok=Cw(JO),sk=ww(JO)}));function lk(e,t,n){let r=Object.getPrototypeOf(e),i=Lk.get(r);if(i||(i=new Set,Lk.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function J(e){return XE(Bk,e)}function uk(e){return CD(sA,e)}function dk(e){return wD(cA,e)}function fk(e){return TD(lA,e)}function pk(e){return ED(uA,e)}function mk(e){return DD(dA,e)}function hk(){return OD(fA)}function gk(e){return kD(pA,e)}function Y(e,t){return XD(mA,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...q(t)};return new hA(n)}function _k(e,t){return new hA({type:`object`,shape:e,catchall:hk(),...q(t)})}function vk(e,t){return new gA({type:`union`,options:e,...q(t)})}function yk(e,t,n){return new _A({type:`union`,options:t,discriminator:e,...q(n)})}function bk(e,t){return new vA({type:`intersection`,left:e,right:t})}function xk(e,t,n){return!t||!t._zod?new yA({type:`record`,keyType:J(),valueType:e,...q(t)}):new yA({type:`record`,keyType:e,valueType:t,...q(n)})}function Sk(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new bA({type:`enum`,entries:n,...q(t)})}function Z(e,t){return new xA({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function Ck(e){return new SA({type:`transform`,transform:e})}function wk(e){return new CA({type:`optional`,innerType:e})}function Tk(e){return new wA({type:`optional`,innerType:e})}function Ek(e){return new TA({type:`nullable`,innerType:e})}function Dk(e,t){return new EA({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():FC(t)}})}function Ok(e,t){return new DA({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():FC(t)}})}function kk(e,t){return new OA({type:`nonoptional`,innerType:e,...q(t)})}function Ak(e,t){return new kA({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function jk(e,t){return new AA({type:`pipe`,in:e,out:t})}function Mk(e){return new MA({type:`readonly`,innerType:e})}function Nk(e,t){return ZD(NA,e??(()=>!0),t)}function Pk(e,t={}){return QD(NA,e,t)}function Fk(e,t){return $D(e,t)}function Ik(e,t){return new jA({type:`pipe`,in:Ck(e),out:t})}var Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA,rA,iA,aA,oA,sA,cA,lA,uA,dA,fA,pA,mA,hA,gA,_A,vA,yA,bA,xA,SA,CA,wA,TA,EA,DA,OA,kA,AA,jA,MA,NA,PA=n((()=>{IO(),FO(),lO(),LO(),KO(),ck(),Lk=new WeakMap,Rk=K(`ZodType`,(e,t)=>(WT.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:cO(e,`input`),output:cO(e,`output`)}}),e.toJSONSchema=sO(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>XO(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>QO(e,t,n),e.parseAsync=async(t,n)=>ZO(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>$O(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ek(e,t,n),e.decode=(t,n)=>tk(e,t,n),e.encodeAsync=async(t,n)=>nk(e,t,n),e.decodeAsync=async(t,n)=>rk(e,t,n),e.safeEncode=(t,n)=>ik(e,t,n),e.safeDecode=(t,n)=>ak(e,t,n),e.safeEncodeAsync=async(t,n)=>ok(e,t,n),e.safeDecodeAsync=async(t,n)=>sk(e,t,n),lk(e,`ZodType`,{check(...e){let t=this.def;return this.clone(AC(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return LC(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Pk(e,t))},superRefine(e,t){return this.check(Fk(e,t))},overwrite(e){return this.check(WD(e))},optional(){return wk(this)},exactOptional(){return Tk(this)},nullable(){return Ek(this)},nullish(){return wk(Ek(this))},nonoptional(e){return kk(this,e)},array(){return Y(this)},or(e){return vk([this,e])},and(e){return bk(this,e)},transform(e){return jk(this,Ck(e))},default(e){return Dk(this,e)},prefault(e){return Ok(this,e)},catch(e){return Ak(this,e)},pipe(e){return jk(this,e)},readonly(){return Mk(this)},describe(e){let t=this.clone();return JE.add(t,{description:e}),t},meta(...e){if(e.length===0)return JE.get(this);let t=this.clone();return JE.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return JE.get(e)?.description},configurable:!0}),e)),zk=K(`_ZodString`,(e,t)=>{GT.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dO(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,lk(e,`_ZodString`,{regex(...e){return this.check(RD(...e))},includes(...e){return this.check(VD(...e))},startsWith(...e){return this.check(HD(...e))},endsWith(...e){return this.check(UD(...e))},min(...e){return this.check(ID(...e))},max(...e){return this.check(FD(...e))},length(...e){return this.check(LD(...e))},nonempty(...e){return this.check(ID(1,...e))},lowercase(e){return this.check(zD(e))},uppercase(e){return this.check(BD(e))},trim(){return this.check(KD())},normalize(...e){return this.check(GD(...e))},toLowerCase(){return this.check(qD())},toUpperCase(){return this.check(JD())},slugify(){return this.check(YD())}})}),Bk=K(`ZodString`,(e,t)=>{GT.init(e,t),zk.init(e,t),e.email=t=>e.check(ZE(Hk,t)),e.url=t=>e.check(rD(Gk,t)),e.jwt=t=>e.check(vD(oA,t)),e.emoji=t=>e.check(iD(Kk,t)),e.guid=t=>e.check(QE(Uk,t)),e.uuid=t=>e.check($E(Wk,t)),e.uuidv4=t=>e.check(eD(Wk,t)),e.uuidv6=t=>e.check(tD(Wk,t)),e.uuidv7=t=>e.check(nD(Wk,t)),e.nanoid=t=>e.check(aD(qk,t)),e.guid=t=>e.check(QE(Uk,t)),e.cuid=t=>e.check(oD(Jk,t)),e.cuid2=t=>e.check(sD(Yk,t)),e.ulid=t=>e.check(cD(Xk,t)),e.base64=t=>e.check(hD(rA,t)),e.base64url=t=>e.check(gD(iA,t)),e.xid=t=>e.check(lD(Zk,t)),e.ksuid=t=>e.check(uD(Qk,t)),e.ipv4=t=>e.check(dD($k,t)),e.ipv6=t=>e.check(fD(eA,t)),e.cidrv4=t=>e.check(pD(tA,t)),e.cidrv6=t=>e.check(mD(nA,t)),e.e164=t=>e.check(_D(aA,t)),e.datetime=t=>e.check(RO(t)),e.date=t=>e.check(zO(t)),e.time=t=>e.check(BO(t)),e.duration=t=>e.check(VO(t))}),Vk=K(`ZodStringFormat`,(e,t)=>{KT.init(e,t),zk.init(e,t)}),Hk=K(`ZodEmail`,(e,t)=>{YT.init(e,t),Vk.init(e,t)}),Uk=K(`ZodGUID`,(e,t)=>{qT.init(e,t),Vk.init(e,t)}),Wk=K(`ZodUUID`,(e,t)=>{JT.init(e,t),Vk.init(e,t)}),Gk=K(`ZodURL`,(e,t)=>{XT.init(e,t),Vk.init(e,t)}),Kk=K(`ZodEmoji`,(e,t)=>{ZT.init(e,t),Vk.init(e,t)}),qk=K(`ZodNanoID`,(e,t)=>{QT.init(e,t),Vk.init(e,t)}),Jk=K(`ZodCUID`,(e,t)=>{$T.init(e,t),Vk.init(e,t)}),Yk=K(`ZodCUID2`,(e,t)=>{eE.init(e,t),Vk.init(e,t)}),Xk=K(`ZodULID`,(e,t)=>{tE.init(e,t),Vk.init(e,t)}),Zk=K(`ZodXID`,(e,t)=>{nE.init(e,t),Vk.init(e,t)}),Qk=K(`ZodKSUID`,(e,t)=>{rE.init(e,t),Vk.init(e,t)}),$k=K(`ZodIPv4`,(e,t)=>{cE.init(e,t),Vk.init(e,t)}),eA=K(`ZodIPv6`,(e,t)=>{lE.init(e,t),Vk.init(e,t)}),tA=K(`ZodCIDRv4`,(e,t)=>{uE.init(e,t),Vk.init(e,t)}),nA=K(`ZodCIDRv6`,(e,t)=>{dE.init(e,t),Vk.init(e,t)}),rA=K(`ZodBase64`,(e,t)=>{fE.init(e,t),Vk.init(e,t)}),iA=K(`ZodBase64URL`,(e,t)=>{pE.init(e,t),Vk.init(e,t)}),aA=K(`ZodE164`,(e,t)=>{mE.init(e,t),Vk.init(e,t)}),oA=K(`ZodJWT`,(e,t)=>{hE.init(e,t),Vk.init(e,t)}),sA=K(`ZodNumber`,(e,t)=>{gE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fO(e,t,n,r),lk(e,`ZodNumber`,{gt(e,t){return this.check(MD(e,t))},gte(e,t){return this.check(ND(e,t))},min(e,t){return this.check(ND(e,t))},lt(e,t){return this.check(AD(e,t))},lte(e,t){return this.check(jD(e,t))},max(e,t){return this.check(jD(e,t))},int(e){return this.check(dk(e))},safe(e){return this.check(dk(e))},positive(e){return this.check(MD(0,e))},nonnegative(e){return this.check(ND(0,e))},negative(e){return this.check(AD(0,e))},nonpositive(e){return this.check(jD(0,e))},multipleOf(e,t){return this.check(PD(e,t))},step(e,t){return this.check(PD(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),cA=K(`ZodNumberFormat`,(e,t)=>{_E.init(e,t),sA.init(e,t)}),lA=K(`ZodBoolean`,(e,t)=>{vE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pO(e,t,n,r)}),uA=K(`ZodUndefined`,(e,t)=>{yE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hO(e,t,n,r)}),dA=K(`ZodNull`,(e,t)=>{bE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mO(e,t,n,r)}),fA=K(`ZodUnknown`,(e,t)=>{xE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_O(e,t,n,r)}),pA=K(`ZodNever`,(e,t)=>{SE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gO(e,t,n,r)}),mA=K(`ZodArray`,(e,t)=>{CE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SO(e,t,n,r),e.element=t.element,lk(e,`ZodArray`,{min(e,t){return this.check(ID(e,t))},nonempty(e){return this.check(ID(1,e))},max(e,t){return this.check(FD(e,t))},length(e,t){return this.check(LD(e,t))},unwrap(){return this.element}})}),hA=K(`ZodObject`,(e,t)=>{TE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CO(e,t,n,r),OC(e,`shape`,()=>t.shape),lk(e,`ZodObject`,{keyof(){return Sk(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:hk()})},loose(){return this.clone({...this._zod.def,catchall:hk()})},strict(){return this.clone({...this._zod.def,catchall:gk()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return VC(this,e)},safeExtend(e){return HC(this,e)},merge(e){return UC(this,e)},pick(e){return zC(this,e)},omit(e){return BC(this,e)},partial(...e){return WC(CA,this,e[0])},required(...e){return GC(OA,this,e[0])}})}),gA=K(`ZodUnion`,(e,t)=>{EE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wO(e,t,n,r),e.options=t.options}),_A=K(`ZodDiscriminatedUnion`,(e,t)=>{gA.init(e,t),DE.init(e,t)}),vA=K(`ZodIntersection`,(e,t)=>{OE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TO(e,t,n,r)}),yA=K(`ZodRecord`,(e,t)=>{kE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EO(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),bA=K(`ZodEnum`,(e,t)=>{AE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vO(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new bA({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new bA({...t,checks:[],...q(r),entries:i})}}),xA=K(`ZodLiteral`,(e,t)=>{jE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yO(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),SA=K(`ZodTransform`,(e,t)=>{ME.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xO(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new yC(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(QC(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(QC(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),CA=K(`ZodOptional`,(e,t)=>{NE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),wA=K(`ZodExactOptional`,(e,t)=>{PE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),TA=K(`ZodNullable`,(e,t)=>{FE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),EA=K(`ZodDefault`,(e,t)=>{IE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),DA=K(`ZodPrefault`,(e,t)=>{LE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),OA=K(`ZodNonOptional`,(e,t)=>{RE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),kA=K(`ZodCatch`,(e,t)=>{zE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),AA=K(`ZodPipe`,(e,t)=>{BE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MO(e,t,n,r),e.in=t.in,e.out=t.out}),jA=K(`ZodPreprocess`,(e,t)=>{AA.init(e,t),VE.init(e,t)}),MA=K(`ZodReadonly`,(e,t)=>{HE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),NA=K(`ZodCustom`,(e,t)=>{UE.init(e,t),Rk.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bO(e,t,n,r)})})),FA=n((()=>{IO()})),IA=n((()=>{IO(),PA(),LO(),YO(),ck(),FA(),FO(),YE(),LO(),KO(),PA(),iw()})),LA=n((()=>{IA(),IA()})),RA=n((()=>{LA()}));RA();var zA=`io.modelcontextprotocol/related-task`,BA=Nk(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),VA=vk([J(),uk().int()]),HA=J();_k({ttl:uk().optional(),pollInterval:uk().optional()});var UA=X({ttl:uk().optional()}),WA=X({taskId:J()}),GA=_k({progressToken:VA.optional(),[zA]:WA.optional()}),KA=X({_meta:GA.optional()}),qA=KA.extend({task:UA.optional()}),JA=e=>qA.safeParse(e).success,YA=X({method:J(),params:KA.loose().optional()}),XA=X({_meta:GA.optional()}),ZA=X({method:J(),params:XA.loose().optional()}),QA=_k({_meta:GA.optional()}),$A=vk([J(),uk().int()]),ej=X({jsonrpc:Z(`2.0`),id:$A,...YA.shape}).strict(),tj=e=>ej.safeParse(e).success,nj=X({jsonrpc:Z(`2.0`),...ZA.shape}).strict(),rj=e=>nj.safeParse(e).success,ij=X({jsonrpc:Z(`2.0`),id:$A,result:QA}).strict(),aj=e=>ij.safeParse(e).success,oj;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(oj||={});var sj=X({jsonrpc:Z(`2.0`),id:$A.optional(),error:X({code:uk().int(),message:J(),data:hk().optional()})}).strict(),cj=e=>sj.safeParse(e).success;vk([ej,nj,ij,sj]),vk([ij,sj]);var lj=QA.strict(),uj=XA.extend({requestId:$A.optional(),reason:J().optional()}),dj=ZA.extend({method:Z(`notifications/cancelled`),params:uj}),fj=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:Sk([`light`,`dark`]).optional()})).optional()}),pj=X({name:J(),title:J().optional()}),mj=pj.extend({...pj.shape,...fj.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),hj=Ik(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,bk(X({form:bk(X({applyDefaults:fk().optional()}),xk(J(),hk())).optional(),url:BA.optional()}),xk(J(),hk()).optional())),gj=_k({list:BA.optional(),cancel:BA.optional(),requests:_k({sampling:_k({createMessage:BA.optional()}).optional(),elicitation:_k({create:BA.optional()}).optional()}).optional()}),_j=_k({list:BA.optional(),cancel:BA.optional(),requests:_k({tools:_k({call:BA.optional()}).optional()}).optional()}),vj=X({experimental:xk(J(),BA).optional(),sampling:X({context:BA.optional(),tools:BA.optional()}).optional(),elicitation:hj.optional(),roots:X({listChanged:fk().optional()}).optional(),tasks:gj.optional(),extensions:xk(J(),BA).optional()}),yj=KA.extend({protocolVersion:J(),capabilities:vj,clientInfo:mj}),bj=YA.extend({method:Z(`initialize`),params:yj}),xj=X({experimental:xk(J(),BA).optional(),logging:BA.optional(),completions:BA.optional(),prompts:X({listChanged:fk().optional()}).optional(),resources:X({subscribe:fk().optional(),listChanged:fk().optional()}).optional(),tools:X({listChanged:fk().optional()}).optional(),tasks:_j.optional(),extensions:xk(J(),BA).optional()}),Sj=QA.extend({protocolVersion:J(),capabilities:xj,serverInfo:mj,instructions:J().optional()}),Cj=ZA.extend({method:Z(`notifications/initialized`),params:XA.optional()}),wj=YA.extend({method:Z(`ping`),params:KA.optional()}),Tj=X({progress:uk(),total:wk(uk()),message:wk(J())}),Ej=X({...XA.shape,...Tj.shape,progressToken:VA}),Dj=ZA.extend({method:Z(`notifications/progress`),params:Ej}),Oj=KA.extend({cursor:HA.optional()}),kj=YA.extend({params:Oj.optional()}),Aj=QA.extend({nextCursor:HA.optional()}),jj=Sk([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Mj=X({taskId:J(),status:jj,ttl:vk([uk(),mk()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:wk(uk()),statusMessage:wk(J())}),Nj=QA.extend({task:Mj}),Pj=XA.merge(Mj),Fj=ZA.extend({method:Z(`notifications/tasks/status`),params:Pj}),Ij=YA.extend({method:Z(`tasks/get`),params:KA.extend({taskId:J()})}),Lj=QA.merge(Mj),Rj=YA.extend({method:Z(`tasks/result`),params:KA.extend({taskId:J()})});QA.loose();var zj=kj.extend({method:Z(`tasks/list`)}),Bj=Aj.extend({tasks:Y(Mj)}),Vj=YA.extend({method:Z(`tasks/cancel`),params:KA.extend({taskId:J()})}),Hj=QA.merge(Mj),Uj=X({uri:J(),mimeType:wk(J()),_meta:xk(J(),hk()).optional()}),Wj=Uj.extend({text:J()}),Gj=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Kj=Uj.extend({blob:Gj}),qj=Sk([`user`,`assistant`]),Jj=X({audience:Y(qj).optional(),priority:uk().min(0).max(1).optional(),lastModified:RO({offset:!0}).optional()}),Yj=X({...pj.shape,...fj.shape,uri:J(),description:wk(J()),mimeType:wk(J()),size:wk(uk()),annotations:Jj.optional(),_meta:wk(_k({}))}),Xj=X({...pj.shape,...fj.shape,uriTemplate:J(),description:wk(J()),mimeType:wk(J()),annotations:Jj.optional(),_meta:wk(_k({}))}),Zj=kj.extend({method:Z(`resources/list`)}),Qj=Aj.extend({resources:Y(Yj)}),$j=kj.extend({method:Z(`resources/templates/list`)}),eM=Aj.extend({resourceTemplates:Y(Xj)}),tM=KA.extend({uri:J()}),nM=tM,rM=YA.extend({method:Z(`resources/read`),params:nM}),iM=QA.extend({contents:Y(vk([Wj,Kj]))}),aM=ZA.extend({method:Z(`notifications/resources/list_changed`),params:XA.optional()}),oM=tM,sM=YA.extend({method:Z(`resources/subscribe`),params:oM}),cM=tM,lM=YA.extend({method:Z(`resources/unsubscribe`),params:cM}),uM=XA.extend({uri:J()}),dM=ZA.extend({method:Z(`notifications/resources/updated`),params:uM}),fM=X({name:J(),description:wk(J()),required:wk(fk())}),pM=X({...pj.shape,...fj.shape,description:wk(J()),arguments:wk(Y(fM)),_meta:wk(_k({}))}),mM=kj.extend({method:Z(`prompts/list`)}),hM=Aj.extend({prompts:Y(pM)}),gM=KA.extend({name:J(),arguments:xk(J(),J()).optional()}),_M=YA.extend({method:Z(`prompts/get`),params:gM}),vM=X({type:Z(`text`),text:J(),annotations:Jj.optional(),_meta:xk(J(),hk()).optional()}),yM=X({type:Z(`image`),data:Gj,mimeType:J(),annotations:Jj.optional(),_meta:xk(J(),hk()).optional()}),bM=X({type:Z(`audio`),data:Gj,mimeType:J(),annotations:Jj.optional(),_meta:xk(J(),hk()).optional()}),xM=X({type:Z(`tool_use`),name:J(),id:J(),input:xk(J(),hk()),_meta:xk(J(),hk()).optional()}),SM=X({type:Z(`resource`),resource:vk([Wj,Kj]),annotations:Jj.optional(),_meta:xk(J(),hk()).optional()}),CM=Yj.extend({type:Z(`resource_link`)}),wM=vk([vM,yM,bM,CM,SM]),TM=X({role:qj,content:wM}),EM=QA.extend({description:J().optional(),messages:Y(TM)}),DM=ZA.extend({method:Z(`notifications/prompts/list_changed`),params:XA.optional()}),OM=X({title:J().optional(),readOnlyHint:fk().optional(),destructiveHint:fk().optional(),idempotentHint:fk().optional(),openWorldHint:fk().optional()}),kM=X({taskSupport:Sk([`required`,`optional`,`forbidden`]).optional()}),AM=X({...pj.shape,...fj.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:xk(J(),BA).optional(),required:Y(J()).optional()}).catchall(hk()),outputSchema:X({type:Z(`object`),properties:xk(J(),BA).optional(),required:Y(J()).optional()}).catchall(hk()).optional(),annotations:OM.optional(),execution:kM.optional(),_meta:xk(J(),hk()).optional()}),jM=kj.extend({method:Z(`tools/list`)}),MM=Aj.extend({tools:Y(AM)}),NM=QA.extend({content:Y(wM).default([]),structuredContent:xk(J(),hk()).optional(),isError:fk().optional()});NM.or(QA.extend({toolResult:hk()}));var PM=qA.extend({name:J(),arguments:xk(J(),hk()).optional()}),FM=YA.extend({method:Z(`tools/call`),params:PM}),IM=ZA.extend({method:Z(`notifications/tools/list_changed`),params:XA.optional()});X({autoRefresh:fk().default(!0),debounceMs:uk().int().nonnegative().default(300)});var LM=Sk([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),RM=KA.extend({level:LM}),zM=YA.extend({method:Z(`logging/setLevel`),params:RM}),BM=XA.extend({level:LM,logger:J().optional(),data:hk()}),VM=ZA.extend({method:Z(`notifications/message`),params:BM}),HM=X({hints:Y(X({name:J().optional()})).optional(),costPriority:uk().min(0).max(1).optional(),speedPriority:uk().min(0).max(1).optional(),intelligencePriority:uk().min(0).max(1).optional()}),UM=X({mode:Sk([`auto`,`required`,`none`]).optional()}),WM=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(wM).default([]),structuredContent:X({}).loose().optional(),isError:fk().optional(),_meta:xk(J(),hk()).optional()}),GM=yk(`type`,[vM,yM,bM]),KM=yk(`type`,[vM,yM,bM,xM,WM]),qM=X({role:qj,content:vk([KM,Y(KM)]),_meta:xk(J(),hk()).optional()}),JM=qA.extend({messages:Y(qM),modelPreferences:HM.optional(),systemPrompt:J().optional(),includeContext:Sk([`none`,`thisServer`,`allServers`]).optional(),temperature:uk().optional(),maxTokens:uk().int(),stopSequences:Y(J()).optional(),metadata:BA.optional(),tools:Y(AM).optional(),toolChoice:UM.optional()}),YM=YA.extend({method:Z(`sampling/createMessage`),params:JM}),XM=QA.extend({model:J(),stopReason:wk(Sk([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:qj,content:GM}),ZM=QA.extend({model:J(),stopReason:wk(Sk([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:qj,content:vk([KM,Y(KM)])}),QM=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:fk().optional()}),$M=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:uk().optional(),maxLength:uk().optional(),format:Sk([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),eN=X({type:Sk([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:uk().optional(),maximum:uk().optional(),default:uk().optional()}),tN=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),nN=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),rN=vk([vk([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),vk([tN,nN]),vk([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:uk().optional(),maxItems:uk().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:uk().optional(),maxItems:uk().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),QM,$M,eN]),iN=vk([qA.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:xk(J(),rN),required:Y(J()).optional()})}),qA.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),aN=YA.extend({method:Z(`elicitation/create`),params:iN}),oN=XA.extend({elicitationId:J()}),sN=ZA.extend({method:Z(`notifications/elicitation/complete`),params:oN}),cN=QA.extend({action:Sk([`accept`,`decline`,`cancel`]),content:Ik(e=>e===null?void 0:e,xk(J(),vk([J(),uk(),fk(),Y(J())])).optional())}),lN=X({type:Z(`ref/resource`),uri:J()}),uN=X({type:Z(`ref/prompt`),name:J()}),dN=KA.extend({ref:vk([uN,lN]),argument:X({name:J(),value:J()}),context:X({arguments:xk(J(),J()).optional()}).optional()}),fN=YA.extend({method:Z(`completion/complete`),params:dN}),pN=QA.extend({completion:_k({values:Y(J()).max(100),total:wk(uk().int()),hasMore:wk(fk())})}),mN=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:xk(J(),hk()).optional()}),hN=YA.extend({method:Z(`roots/list`),params:KA.optional()}),gN=QA.extend({roots:Y(mN)}),_N=ZA.extend({method:Z(`notifications/roots/list_changed`),params:XA.optional()});vk([wj,bj,fN,zM,_M,mM,Zj,$j,rM,sM,lM,FM,jM,Ij,Rj,zj,Vj]),vk([dj,Dj,Cj,_N,Fj]),vk([lj,XM,ZM,cN,gN,Lj,Bj,Nj]),vk([wj,YM,aN,hN,Ij,Rj,zj,Vj]),vk([dj,Dj,VM,dM,aM,IM,DM,Fj,sN]),vk([lj,Sj,pN,EM,hM,Qj,eM,iM,NM,MM,Lj,Bj,Nj]);var vN=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===oj.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new yN(e.elicitations,n)}return new e(t,n,r)}},yN=class extends vN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(oj.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};Tw();function bN(e){return!!e._zod}function xN(e,t){return bN(e)?mw(e,t):e.safeParse(t)}function SN(e){if(!e)return;let t;if(t=bN(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function CN(e){if(bN(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function wN(e){return e===`completed`||e===`failed`||e===`cancelled`}function TN(e){let t=SN(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=CN(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function EN(e,t){let n=xN(e,t);if(!n.success)throw n.error;return n.data}var DN=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(dj,e=>{this._oncancel(e)}),this.setNotificationHandler(Dj,e=>{this._onprogress(e)}),this.setRequestHandler(wj,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ij,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new vN(oj.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Rj,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(!await this._taskStore.getTask(r,t.sessionId))throw new vN(oj.InvalidParams,`Task not found: ${r}`);if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);)if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new vN(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}}else await this._transport?.send(e.message,{relatedRequestId:t.requestId})}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new vN(oj.InvalidParams,`Task not found: ${r}`);if(!wN(i.status))return await this._waitForTaskUpdate(r,t.signal,t.sessionId),await n();if(wN(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r,t.sessionId),{...e,_meta:{...e._meta,[zA]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(zj,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new vN(oj.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Vj,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new vN(oj.InvalidParams,`Task not found: ${e.params.taskId}`);if(wN(n.status))throw new vN(oj.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId,t.sessionId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new vN(oj.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof vN?e:new vN(oj.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),vN.fromError(oj.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),aj(e)||cj(e)?this._onresponse(e):tj(e)?this._onrequest(e,t):rj(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=vN.fromError(oj.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[zA]?.taskId,a=r?.sessionId,o=this._taskStore,s=!0,c;if(i&&o&&this._taskMessageQueue&&a!==void 0&&(s=!1,c=(async()=>{if(!await o.getTask(i,a))throw new vN(oj.InvalidParams,`Task not found: ${i}`);s=!0})()),n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:oj.MethodNotFound,message:`Method not found`}};if(i&&c){let e={type:`error`,message:t,timestamp:Date.now()};c.then(()=>this._enqueueTaskMessage(i,e,a),()=>r?.send(t)).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))}else i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);let u=JA(e.params)?e.params.task:void 0,d=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,f={signal:l.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(l.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(l.signal.aborted)throw new vN(oj.ConnectionClosed,`Request was cancelled`);let a={...r,relatedRequestId:e.id};i&&!a.relatedTask&&(a.relatedTask={taskId:i});let o=a.relatedTask?.taskId??i;return o&&d&&await d.updateTaskStatus(o,`input_required`),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};(c??Promise.resolve()).then(()=>{if(c&&l.signal.aborted)throw new vN(oj.ConnectionClosed,`Request was cancelled`);u&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,f)).then(async t=>{if(l.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(l.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:oj.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue&&s?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===l&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),aj(e)?n(e):n(new vN(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(aj(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),aj(e)?r(e):r(vN.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof vN?e:new vN(oj.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Nj,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new vN(oj.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},wN(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new vN(oj.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new vN(oj.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof vN?e:new vN(oj.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[zA]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof vN?e:new vN(oj.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=xN(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(vN.fromError(oj.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Lj,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Bj,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Hj,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[zA]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[zA]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[zA]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=TN(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=EN(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=TN(e);this._notificationHandlers.set(n,n=>{let r=EN(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n??this._transport?.sessionId,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&tj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new vN(oj.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e,n);t?.pollInterval&&(r=t.pollInterval)}catch{}return new Promise((e,n)=>{if(t.aborted){n(new vN(oj.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,r);t.addEventListener(`abort`,()=>{clearTimeout(i),n(new vN(oj.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new vN(oj.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Fj.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),wN(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new vN(oj.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(wN(a.status))throw new vN(oj.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Fj.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),wN(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};RA(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var ON=class extends DN{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},kN=`2026-01-26`,AN=vk([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),jN=vk([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),MN=xk(vk([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
122
123
|
|
|
123
124
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
124
125
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
125
126
|
|
|
126
127
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
127
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
128
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),vk([J(),pk()]).describe(`Style variables for theming MCP apps.
|
|
128
129
|
|
|
129
130
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
130
131
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -136,10 +137,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
136
137
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
137
138
|
|
|
138
139
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
139
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
140
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),NN=X({method:Z(`ui/open-link`),params:X({url:J().describe(`URL to open in the host's browser`)})});X({isError:fk().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:fk().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:fk().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var PN=X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})}),FN=X({connectDomains:Y(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
140
141
|
|
|
141
142
|
- Maps to CSP \`connect-src\` directive
|
|
142
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),
|
|
143
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),IN=X({camera:X({}).optional().describe(`Request camera access.
|
|
143
144
|
|
|
144
145
|
Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access.
|
|
145
146
|
|
|
@@ -147,7 +148,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:X({}).optional()
|
|
|
147
148
|
|
|
148
149
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access.
|
|
149
150
|
|
|
150
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)}),
|
|
151
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)}),LN=X({method:Z(`ui/notifications/size-changed`),params:X({width:uk().optional().describe(`New width in pixels.`),height:uk().optional().describe(`New height in pixels.`)})});X({method:Z(`ui/notifications/tool-input`),params:X({arguments:xk(J(),hk().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:xk(J(),hk().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:J().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var RN=X({fonts:J().optional()}),zN=X({variables:MN.optional().describe(`CSS variables for theming the app.`),css:RN.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})});var BN=xk(J(),hk()),VN=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)}),HN=X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()}),UN=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:fk().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:fk().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:IN.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:FN.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:VN.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:VN.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),WN=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:fk().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(jN).optional().describe(`Display modes the app supports.`)}),GN=X({method:Z(`ui/notifications/initialized`),params:X({}).optional()});X({csp:FN.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:IN.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
|
|
151
152
|
|
|
152
153
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
153
154
|
|
|
@@ -155,16 +156,16 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
|
|
|
155
156
|
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
156
157
|
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
157
158
|
|
|
158
|
-
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:
|
|
159
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:fk().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
159
160
|
|
|
160
161
|
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
161
162
|
|
|
162
163
|
- \`true\`: request visible border + background
|
|
163
164
|
- \`false\`: request no visible border + background
|
|
164
|
-
- omitted: host decides border`)});var
|
|
165
|
+
- omitted: host decides border`)});var KN=X({method:Z(`ui/request-display-mode`),params:X({mode:jN.describe(`The display mode being requested.`)})});X({mode:jN.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var qN=vk([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:J().optional(),visibility:Y(qN).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
165
166
|
- "model": Tool visible to and callable by the agent
|
|
166
|
-
- "app": Tool callable by the app from this server only`),csp:
|
|
167
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:EO([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:bO().optional().describe(`Whether the device supports touch input.`),hover:bO().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:vO().describe(`Top safe area inset in pixels.`),right:vO().describe(`Right safe area inset in pixels.`),bottom:vO().describe(`Bottom safe area inset in pixels.`),left:vO().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();X({method:Z(`ui/notifications/host-context-changed`),params:iN.describe(`Partial context update containing only changed fields.`)});var aN=X({method:Z(`ui/update-model-context`),params:X({content:Y(Mj).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:kO(J(),CO().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),oN=X({method:Z(`ui/initialize`),params:X({appInfo:SA.describe(`App identification (name and version).`),appCapabilities:QM.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})});X({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:SA.describe(`Host application identification and version.`),hostCapabilities:ZM.describe(`Features and capabilities provided by the host.`),hostContext:iN.describe(`Rich context about the host environment.`)}).passthrough();var sN=[LM],cN=class extends IM{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:GM,sandboxready:HM,initialized:$M,requestteardown:XM,loggingmessage:Yj};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(oN,e=>this._oninitialize(e)),this.setRequestHandler(MA,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(eN,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(rN,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(VM,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(nN,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(eN,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(aN,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Uj,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(rM,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(aj,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(sj,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(dj,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Sj,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:sN.includes(t)?t:LM,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];lN(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},JM,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},Vj,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},Bj,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},Vj,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(Wj,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},oj,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},cj,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},fj,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(pj,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},Cj,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(Fj,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function lN(e,t){return JSON.stringify(e)===JSON.stringify(t)}function uN(){let e=L(dg);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var dN={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},fN={composition:{stackedMaxAspect:1},classes:{widthCompactMaxPx:767,widthMediumMaxPx:1023,heightShortMaxPx:479},hysteresis:{windowMs:250,decisiveJumpPxDelta:200},rail:{widthPx:448,insetPx:16,gutterPx:24},sidecar:{minViewportWidthPx:900,maxVideoShiftPx:360,maxVideoShiftFraction:.3},card:{maxHeightPx:720,reportedHeightFloorPx:48,coldDefaultHeightPx:320,minDisplayScale:.85,layoutDefaultMinHeightPx:240,stackBandMaxFraction:.6,stackMaxWidthPx:600,componentOverrides:{}},content:{stackedAspect:16/9},replica:{maxAspect:16/9,landscapeMinAspect:1},pip:{gapPaddingPx:24,minWidthPx:128,maxAreaRatio:.35},motion:{layoutTransitionMs:560},insets:{callControlsBottomPx:72,participantsPadPx:16,cardsPadPx:16,surfacePadPx:16,compactCardsPadPx:8,compactSurfacePadPx:8},eviction:{policy:`evict-oldest`,maxVisibleCards:2,compactTakeoverMaxCards:1},degradationLadder:[`evict-cards`,`drop-self-view`,`collapse-replica`]};function pN(e,t){let n=Math.round(e.widthPx),r=Math.round(e.heightPx);return{width:n<=t.classes.widthCompactMaxPx?`compact`:n<=t.classes.widthMediumMaxPx?`medium`:`expanded`,height:r<=t.classes.heightShortMaxPx?`short`:`regular`,composition:n<=r*t.composition.stackedMaxAspect?`stacked`:`side-by-side`}}var mN={idle:{id:`idle`,regions:[]},"conversation-full":{id:`conversation-full`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-rail":{id:`canvas-rail`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{px:0},y:{px:0},width:{fraction:.62},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.38},y:{fraction:.72},width:{fraction:.2},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-stack":{id:`canvas-stack`,soloVariant:`canvas-solo`,regions:[{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.38},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"canvas-kiosk-overlay":{id:`canvas-kiosk-overlay`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:.6},width:{fraction:1},height:{fraction:.4},accepts:[`card`],zBase:100,sheetAnchor:`bottom`},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:110}]},"canvas-sheet":{id:`canvas-sheet`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.55},accepts:[`replica`],zBase:0},{name:`canvasSheet`,x:{fraction:0},y:{fraction:.55},width:{fraction:1},height:{fraction:.45},accepts:[`card`],zBase:10},{name:`pip`,x:{fraction:.66},y:{fraction:.33},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-columns":{id:`content-columns`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.25},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.25},y:{fraction:0},width:{fraction:.75},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-columns-compact":{id:`content-columns-compact`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-sheet-columns":{id:`content-sheet-columns`,soloVariant:`content-sheet-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`content`],zBase:0},{name:`cardSheet`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:110}]},"content-stack":{id:`content-stack`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.74},width:{fraction:.24},height:{fraction:.22},accepts:[`selfView`],zBase:100}]},"content-stack-compact":{id:`content-stack-compact`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-sheet-compact":{id:`content-sheet-compact`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:110}]},"content-rail":{id:`content-rail`,soloVariant:`content-rail-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.22},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.22},y:{fraction:0},width:{fraction:.48},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-stack-canvas":{id:`content-stack-canvas`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.5},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.5},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.72},width:{fraction:1},height:{fraction:.28},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.52},width:{fraction:.24},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns":{id:`canvas-takeover-columns`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.24},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:.24},y:{fraction:0},width:{fraction:.76},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns-compact":{id:`canvas-takeover-columns-compact`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:.22},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.04},width:{fraction:.3},height:{fraction:.16},accepts:[`selfView`],zBase:100}]},"canvas-solo":{id:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-solo":{id:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0}]},"content-rail-solo":{id:`content-rail-solo`,regions:[{name:`contentStage`,x:{px:0},y:{px:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-sheet-solo":{id:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:10}]}},hN={idle:{compact:{short:`idle`,regular:`idle`},medium:{short:`idle`,regular:`idle`},expanded:{short:`idle`,regular:`idle`}},conversation:{compact:{short:`conversation-full`,regular:`conversation-full`},medium:{short:`conversation-full`,regular:`conversation-full`},expanded:{short:`conversation-full`,regular:`conversation-full`}},"conversation-canvas":{compact:{short:`canvas-sheet`,regular:`canvas-sheet`},medium:{short:`canvas-rail`,regular:`canvas-stack`},expanded:{short:`canvas-rail`,regular:`canvas-rail`}},"content-focus":{compact:{short:`content-stack-compact`,regular:`content-stack-compact`},medium:{short:`content-columns`,regular:`content-stack`},expanded:{short:`content-columns`,regular:`content-columns`}},"content-plus-canvas":{compact:{short:`content-sheet-compact`,regular:`content-sheet-compact`},medium:{short:`content-rail`,regular:`content-stack-canvas`},expanded:{short:`content-rail`,regular:`content-rail`}},"canvas-dominant":{compact:{short:`canvas-takeover-strip`,regular:`canvas-takeover-strip`},medium:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`},expanded:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`}}},gN={idle:{compact:{stacked:`idle`,"side-by-side":`idle`},medium:{stacked:`idle`,"side-by-side":`idle`},expanded:{stacked:`idle`,"side-by-side":`idle`}},conversation:{compact:{stacked:`conversation-full`,"side-by-side":`conversation-full`},medium:{stacked:`conversation-full`,"side-by-side":`conversation-full`},expanded:{stacked:`conversation-full`,"side-by-side":`conversation-full`}},"conversation-canvas":{compact:{stacked:`canvas-sheet`,"side-by-side":`canvas-sheet`},medium:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`},expanded:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`}},"content-focus":{compact:{stacked:`content-stack-compact`,"side-by-side":`content-columns-compact`},medium:{stacked:`content-stack`,"side-by-side":`content-columns`},expanded:{stacked:`content-stack`,"side-by-side":`content-columns`}},"content-plus-canvas":{compact:{stacked:`content-sheet-compact`,"side-by-side":`content-sheet-columns`},medium:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`},expanded:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`}},"canvas-dominant":{compact:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns-compact`},medium:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`},expanded:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`}}};function _N(e,t,n=mN,r=hN,i=!0,a=!1){let o=a&&r===hN&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===hN?gN[e][t.width][t.composition]:r[e][t.width][t.height],s=n[o];if(!s)throw Error(`Template matrix references missing template id: ${o}`);if(!i&&s.soloVariant!==void 0){let e=n[s.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${s.soloVariant}`);return e}return s}function vN(e,t,n){let r=[],{prefs:i}=e,a=e.userShare?`userShare`:e.presentation?`presentation`:null,o=e.cards.length>0,s=t.width===`compact`;return i.pipCorner!==void 0&&s&&r.push(`pipCorner`),a===null?(i.expandCanvas&&!o&&r.push(`expandCanvas`),o&&(i.expandCanvas||s)?{state:`canvas-dominant`,suppressedPrefs:r,contentKind:null}:o?{state:`conversation-canvas`,suppressedPrefs:r,contentKind:null}:e.replica||e.selfView?{state:`conversation`,suppressedPrefs:r,contentKind:null}:{state:`idle`,suppressedPrefs:r,contentKind:null}):(i.expandCanvas&&r.push(`expandCanvas`),{state:o?`content-plus-canvas`:`content-focus`,suppressedPrefs:r,contentKind:a})}var yN={alert:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:e=>e.charCount===void 0?120:Math.min(400,Math.round(90+e.charCount*.26))},input:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:()=>182},question:{minWidthPx:240,sizeClass:e=>{let t=e.optionCount??4;return t<=2?`S`:t>=10?`L`:`M`},estimateHeightPx:e=>{let t=e.optionCount??4;return 72+t*48+(t-1)*8+64}},text:{minWidthPx:220,sizeClass:e=>(e.charCount??400)>1500?`L`:`M`,estimateHeightPx:e=>{let t=e.charCount??400,n=Math.max(1,e.widthPx/8);return Math.max(100,Math.round(t/n*22+40))}},chart:{minWidthPx:260,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round(e.widthPx*(260/480))+90},calendar:{minWidthPx:320,sizeClass:e=>e.slotCount===void 0?`M`:`L`,estimateHeightPx:e=>e.slotCount===void 0?470:64+e.slotCount*48},image:{minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round((Math.min(e.widthPx,520)-36)*(9/16))+95+((e.imageCount??1)>1?44:0)},scheduling_embed:{minWidthPx:320,hardMinHeightPx:640,sizeClass:()=>`L`,estimateHeightPx:()=>640}},bN={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},xN=`canvas.`;function SN(e){return e.startsWith(xN)?e.slice(7):e}function CN(e,t){let n=SN(e),r=yN[n]??bN,i=t?.[n]??t?.[e];return i===void 0?r:{...r,minWidthPx:i.minWidthPx??r.minWidthPx,...i.hardMinHeightPx===void 0?r.hardMinHeightPx===void 0?{}:{hardMinHeightPx:r.hardMinHeightPx}:{hardMinHeightPx:i.hardMinHeightPx}}}Object.keys(yN);function wN(e,t,n){let r=CN(e,n),i=(t.naturalHeightPx!==void 0&&Number.isFinite(t.naturalHeightPx)?t.naturalHeightPx:void 0)??r.estimateHeightPx(t),a=r.hardMinHeightPx===void 0?i:Math.max(r.hardMinHeightPx,i);return{sizeClass:r.sizeClass(t),minWidthPx:r.minWidthPx,naturalHeightPx:Math.round(a),hardMinHeightPx:r.hardMinHeightPx}}function TN(e,t){let n=SN(e);return yN[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:CN(e,t).hardMinHeightPx}function EN(e,t){return CN(e,t).minWidthPx}function DN(e,t){let n=Number.isFinite(e)?e:t.card.coldDefaultHeightPx;return Math.min(t.card.maxHeightPx,Math.max(t.card.reportedHeightFloorPx,Math.round(n)))}function ON(e,t,n){if(t>=e)return{kind:`natural`};if(t<=0||e<=0)return{kind:`scroll`};let r=t/e;return r>=n.card.minDisplayScale?{kind:`scaled`,factor:r}:{kind:`scroll`}}function kN(e,t){return e.width>0&&e.height>0&&t.width>0&&t.height>0&&e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height}function AN(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function jN(e,t,n,r){let i=[],a=e.find(e=>e.kind===`replica`),o=e=>e.kind===`selfView`&&e.layer===`overlay`&&a!==void 0&&AN(a.rect,e.rect),s=e=>e.kind===`card`&&e.layer===`overlay`&&e.sheet===!0;for(let r of e){let e=r.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||i.push({kind:`bounds`,tileId:r.id,message:`${r.id} has non-integer coordinates`}),(e.x<0||e.y<0||e.width<0||e.height<0||e.x+e.width>t.width||e.y+e.height>t.height)&&i.push({kind:`bounds`,tileId:r.id,message:`${r.id} rect exceeds the container`}),r.layer===`overlay`&&r.kind!==`selfView`&&!s(r)&&i.push({kind:`overlay-legality`,tileId:r.id,message:`only selfView or a sheet card may ride the overlay layer, got ${r.kind}`}),r.kind===`selfView`&&r.layer===`overlay`&&a!==void 0&&!AN(a.rect,r.rect)&&i.push({kind:`overlay-legality`,tileId:r.id,message:`selfView escapes the replica rect`}),(r.kind===`content`||r.kind===`replica`)&&(e.width<48||e.height<48)&&i.push({kind:`degenerate-surface`,tileId:r.id,message:`${r.kind} tile ${r.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),r.kind===`card`){r.fit.kind===`scaled`&&(r.fit.factor<n.card.minDisplayScale||r.fit.factor>1)&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} scaled to ${r.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=r.component===void 0?void 0:TN(r.component,n.card.componentOverrides);t!==void 0&&e.height<t&&r.fit.kind!==`scroll`&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.height}px is below its ${t}px hard min without scroll`});let a=r.component===void 0?void 0:EN(r.component,n.card.componentOverrides);a!==void 0&&e.width<a&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.width}px is below its ${a}px min width`})}}for(let t of e)if(t.kind===`content`||t.kind===`card`)for(let n of e)n.id!==t.id&&kN(t.rect,n.rect)&&(!o(n)||s(t))&&(!s(n)||s(t))&&(s(t)&&n.layer===`grid`||i.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));if(r!=null)for(let t of e)(t.kind===`card`||t.kind===`content`)&&kN(t.rect,r)&&i.push({kind:`status-strip-clear`,tileId:t.id,message:`${t.kind} tile ${t.id} sits under the reserved status strip`});return i}var MN=(e,t,n)=>Math.min(n,Math.max(t,e));function NN(e,t){let n=t===`compact`;return{surfacePad:Math.round(n?e.insets.compactSurfacePadPx:e.insets.surfacePadPx),cardsPad:Math.round(n?e.insets.compactCardsPadPx:e.insets.cardsPadPx)}}function PN(e,t,n){let r=Math.round(e.rail.widthPx);return n>0?Math.max(0,r-NN(e,t).cardsPad):r}function FN(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function IN(e,t,n){let r=[...e].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),i=Math.floor(t);return r.length<=i?r:n===`evict-newest`?r.slice(0,i):r.slice(r.length-i)}function LN(e,t,n,r,i,a){let o=NN(n,r).cardsPad,{left:s,right:c}=i??{left:o,right:o},l=Math.round(a??n.rail.widthPx),u=Math.max(1,Math.min(t-s-c,l-s-c));return{innerW:u,entries:e.map(e=>{let t=wN(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:u,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:DN(t.naturalHeightPx,n)}})}}var RN=e=>e.accepts.includes(`replica`)&&e.accepts.includes(`selfView`);function zN(e,t,n,r,i){let a=(e,t)=>Math.abs(e-t)<=1,o=e.x+e.width,s=(e,r,i)=>n>0&&a(e,r)||t.some(t=>RN(t.region)&&a(i(t.rect),e));return{left:s(e.x,n,e=>e.x+e.width)?0:i,right:s(o,r-n,e=>e.x)?0:i}}function BN(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function VN(e,t,n,r){return e.name!==`rail`||`fraction`in t?t:r===`width`?{px:n.rail.widthPx}:{px:t.px<0?-n.rail.widthPx:t.px}}function HN(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>BN(n===`x`?e.x:e.y,o)-BN(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?VN(e,e.width,r,`width`):e.height),l=0,u=0;for(let e of c)`px`in e?l+=e.px:u+=e.fraction;let d=Math.max(0,o-l),f=c.map(e=>`px`in e?e.px:u>0?e.fraction/u*d:0);if(n===`y`&&i!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`card`)&&`fraction`in(c[t]??e.height));if(e!==-1){let t=f[e]??0,n=i.shrinkToContent?Math.min(i.neededPx,Math.max(t,i.capPx)):MN(i.neededPx,t,Math.max(t,i.capPx)),r=0,a=0;c.forEach((t,n)=>{n!==e&&(`px`in t?r+=t.px:a+=f[n]??0)});let s=Math.max(0,o-r-n);f=f.map((t,r)=>{if(r===e)return n;let i=c[r];return i!==void 0&&`px`in i?t:a>0?t/a*s:0})}}if(n===`y`&&a!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`content`)&&`fraction`in(c[t]??e.height)),t=s.findIndex((e,t)=>e.accepts.includes(`replica`)&&`fraction`in(c[t]??e.height));if(e!==-1&&t!==-1){let n=(f[e]??0)-a.maxPx;n>0&&(f[e]=a.maxPx,f[t]=(f[t]??0)+n)}}let p=s.map(e=>e.accepts.includes(`content`)||e.accepts.includes(`replica`)?48:0),m=p.reduce((e,t)=>e+t,0),h=m>o?o/m:1,g=f.map((e,t)=>Math.max(e,(p[t]??0)*h));if(g.reduce((e,t)=>e+t,0)>o){let e=g.map((e,t)=>e-(p[t]??0)*h),t=e.reduce((e,t)=>e+t,0),n=Math.max(0,o-m*h),r=t>0?n/t:0;f=g.map((t,n)=>(p[n]??0)*h+(e[n]??0)*r)}else f=g;let _=[0],v=0;for(let e of f)v+=e,_.push(MN(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,o=_[r+1]??i;if(n===`y`&&a!==void 0&&e.accepts.includes(`replica`)){let e=r>0?a.replicaGapPx:0,t=r<s.length-1?a.replicaGapPx:0;o-i-e-t>=48&&(i+=e,o-=t)}return{region:e,rect:n===`x`?{x:i,y:0,width:o-i,height:t.height}:{x:0,y:i,width:t.width,height:o-i}}})}function UN(e,t,n){let r=t.width,i=t.height,a=VN(e,e.width,n,`width`),o=VN(e,e.x,n,`x`),s=MN(Math.round(BN(o,r)),0,r),c=MN(Math.round(BN(e.y,i)),0,i);return{x:s,y:c,width:MN(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:MN(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function WN(e,t,n,r,i){let a=e.regions.filter(e=>e.zBase<100),o=e=>`fraction`in e&&e.fraction===1;return a.length>1&&a.every(e=>o(e.height))?HN(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?HN(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:UN(e,t,n)}))}function GN(e,t,n,r,i,a,o,s,c,l,u){if(n!==null)return;let d=e.regions.filter(e=>e.zBase<100);if(!(d.length>1&&d.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let f=d.find(e=>e.accepts.includes(`card`)&&`fraction`in e.height);if(f===void 0||r.cards.length===0)return;let{innerW:p,entries:m}=LN(IN(r.cards,u,c.eviction.policy),i.width,c,l,s>0?{left:0,right:0}:void 0,c.card.stackMaxWidthPx),h=m.reduce((e,t)=>t.constraints.minWidthPx>p?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:g}=NN(c,l),_=BN(f.y,i.height),v=d.every(e=>BN(e.y,i.height)<=_)?Math.max(0,o-s):0,y=h>0;return{neededPx:h+2*g+v,capPx:Math.round(c.card.stackBandMaxFraction*a.height),...y&&{shrinkToContent:y}}}function KN(e,t,n,r,i){if(t===null)return;let a=e.regions.filter(e=>e.zBase<100);if(!(a.length>1&&a.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let o=a.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),s=a.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!o||!s)return;let c=i.content.stackedAspect;if(!(!Number.isFinite(c)||c<=0))return{maxPx:Math.round(n.width/c),replicaGapPx:r}}var qN=`bottom-left`;function JN(e,t,n){let r=e.statusStrip;if(r===void 0)return null;let i=MN(Math.round(r.heightPx??48),0,160),a=e.callControlsRect,o=Math.min(Math.max(Math.round(a?.width??0),448),t.width-32);if(i<=0||o<=0)return null;let s=a===void 0?t.width/2:a.x+a.width/2;return{x:MN(Math.round(s-o/2),16,t.width-16-o),y:Math.round(Math.min(n,a?.y??n))-8-i,width:o,height:i}}function YN(e,t,n,r,i,a){return e.x<0||e.width<=0||e.height<=0||e.x+e.width>n.width||e.y+e.height>n.height||e.y<48?!1:t.every(e=>r&&e.region.accepts.includes(`content`)?e.rect.height>=48:i&&e.region.accepts.includes(`card`)?e.rect.height>=a.card.reportedHeightFloorPx:!0)}var XN=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x;function ZN(e,t,n){return t===null||!XN(e.rect,t)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,n-e.rect.y))}}}function QN(e,t,n,r,i){let a=t.endsWith(`right`)?e.x+e.width-n-r:e.x+n,o=t.startsWith(`bottom`)?e.y+e.height-n-i:e.y+n;return{x:Math.round(a),y:Math.round(o),width:r,height:i}}function $N(e,t,n){let{maxAspect:r,landscapeMinAspect:i}=n.replica;if(e.width-e.height*r>1){let t=Math.max(Math.min(48,e.width),Math.round(e.height*r));return{...e,x:e.x+Math.round((e.width-t)/2),width:t}}if(t&&e.height-e.width/i>1){let t=Math.max(Math.min(48,e.height),Math.round(e.width/i));return{...e,y:e.y+Math.round((e.height-t)/2),height:t}}return e}function eP(e,t,n,r){let i=Math.max(n.pip.minWidthPx,Math.round(e.width*.25)),a=r?e.height-t:Math.round((e.height-t)*16/9),o=Math.min(i,e.width-t,a),s=r?o:Math.round(o*9/16);return o<n.pip.minWidthPx||o<=0||s<=0?null:{w:o,h:s}}function tP(e,t,n){return t===null||!kN(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function nP(e){if(typeof e!=`object`||!e)return!1;let t=e;return[`x`,`y`,`width`,`height`].every(e=>typeof t[e]==`number`&&Number.isFinite(t[e]))}function rP(e,t,n){let r=e;for(let e of t.filter(nP).sort((e,t)=>t.y-e.y))r=tP(r,e,n);return r}function iP(e,t,n){if(t<=0)return e;let r=Math.min(t,e.length);return n===`evict-newest`?e.slice(0,e.length-r):e.slice(r)}function aP(e,t,n,r,i,a){let o=n.callControls===!0?Math.round(a.insets.callControlsBottomPx):0,s=i.height-o,c=n.selfView&&n.prefs.hideSelfView!==!0,l=n.replica||c,u=e.regions.some(e=>e.zBase<100&&e.accepts.includes(`card`)),d=+!!l+(t.contentKind===null?0:1)+(n.cards.length>0&&u?1:0)>=2?NN(a,r.width).surfacePad:0,f={width:Math.max(0,i.width-2*d),height:Math.max(0,i.height-2*d)},p=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null),m=GN(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,FN(t.state,r,a)),h=KN(e,t.contentKind,f,d,a),g=WN(e,f,{...a,rail:{...a.rail,widthPx:PN(a,r.width,d)}},m,h).map(e=>({...e,rect:{...e.rect,x:e.rect.x+d,y:e.rect.y+d}})),_=t.contentKind!==null,v=e=>g.map(t=>{let n=t.region.accepts.includes(`card`);if(!n&&!(_&&t.region.accepts.includes(`content`)))return t;let r=n?ZN(t,p,s):t;return e===null?r:ZN(r,e,e.y-8)}),y=JN(n,i,s),b=v(y);return y!==null&&!YN(y,b,i,_,n.cards.length>0,a)&&(y=null,b=v(null)),{regions:b,surfacePad:d,controlsInset:o,bandTopY:s,statusStrip:y}}function oP(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u,statusStrip:d}=aP(t,e,n,r,i,a),f=n.statusStrip!==void 0,p=s.find(e=>e.region.accepts.includes(`replica`)),m=s.find(e=>e.region.accepts.includes(`content`)),h=s.find(e=>e.region.accepts.includes(`card`)),g=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),_=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`card`)),v=Math.round(a.rail.gutterPx),y=Math.round(a.pip.gapPaddingPx),b=(r.composition??pN({widthPx:i.width,heightPx:i.height},a).composition)===`side-by-side`,x=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),S=FN(e.state,r,a),C=h?IN(n.cards,S,a.eviction.policy):_===void 0?[]:IN(n.cards,1,a.eviction.policy),w=S=>{let w={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1,...f&&{statusStripDropped:d===null}},T=[],E=null,D=!1,ee=p!==void 0&&p.region.accepts.includes(`selfView`);if(p&&ee&&(n.replica||o)){let e=p.rect,t=o&&!S.selfViewDropped;o&&S.selfViewDropped&&(w.selfViewDropped=!0);let r=+!!n.replica+ +!!t,s=Math.round(a.insets.participantsPadPx),l=e.x<=c+1?0:s,u=e.x+e.width>=i.width-c-1?0:s,d=Math.max(1,e.width-l-u),f=d,m=Math.round(f*9/16),h=e=>r*e+(r-1)*s;h(m)>e.height&&(m=Math.max(1,Math.floor((e.height-(r-1)*s)/r)),f=Math.min(d,Math.round(m*16/9))),m=Math.max(m,Math.min(48,e.height)),f=Math.max(f,Math.min(48,e.width));let g=e.x+l+Math.round((d-f)/2),_=e.y+Math.round((e.height-h(m))/2);if(n.replica){let e={x:g,y:_,width:f,height:m};if(S.replicaCollapsed){let t=Math.min(m,Math.max(64,Math.round(m*.25)));e={...e,height:t},w.replicaCollapsed=!0}e=$N(e,b,a),E={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name},T.push(E),_+=m+s}t&&(T.push({id:`selfView`,kind:`selfView`,rect:{x:g,y:_,width:f,height:m},layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name}),D=!0)}else if(p&&(n.replica||o)){let e=!n.replica,t=p.rect;if(!e&&S.replicaCollapsed){let e=Math.min(t.height,Math.max(64,Math.round(t.height*.25)));t={...t,height:e},w.replicaCollapsed=!0}e||(t=$N(t,b,a));let r={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:t,layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name};T.push(r),e?D=!0:E=r}e.contentKind!==null&&m&&T.push({id:`content`,kind:`content`,rect:m.rect,layer:`grid`,order:m.region.zBase,fit:{kind:`natural`},region:m.region.name});let O=iP(C,S.extraEvictions,a.eviction.policy),k=new Set(O.map(e=>e.id));if(w.evictedCardIds=x.filter(e=>!k.has(e.id)).map(e=>e.id),h&&O.length>0){let n=h.rect,o=t.regions.filter(e=>e.zBase<100),l=o.length>1&&o.every(e=>`fraction`in e.width&&e.width.fraction===1),u=zN(n,s,c,i.width,NN(a,r.width).cardsPad),{innerW:d,entries:f}=LN(O,n.width,a,r.width,u,l||e.state===`canvas-dominant`&&o.length>1?a.card.stackMaxWidthPx:PN(a,r.width,c)),p=n.x+u.left+Math.round((n.width-u.left-u.right-d)/2),m=n.height-v*(f.length-1),g=f.reduce((e,t)=>e+t.clampedHeightPx,0),_;if(g<=m)_=f.map(e=>e.clampedHeightPx);else{let e=m>0?m/g:0;_=f.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=_.reduce((e,t)=>e+t,0)-Math.max(0,m);for(;t>0;){let e=-1;for(let t=0;t<_.length;t++){let n=_[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(_[e]??0))&&(e=t)}if(e===-1)break;_[e]=(_[e]??0)-1,--t}}let y=_.reduce((e,t)=>e+t,0)+v*(f.length-1),b=n.y+Math.max(0,Math.round((n.height-y)/2));f.forEach((e,t)=>{let r=Math.min(b,n.y+n.height),i=Math.max(0,Math.min(_[t]??0,n.y+n.height-r)),o=ON(e.clampedHeightPx,i,a),s=e.constraints.hardMinHeightPx;s!==void 0&&i<s&&o.kind!==`scroll`&&(o={kind:`scroll`}),T.push({id:e.card.id,kind:`card`,component:e.card.component,cardSizeClass:e.constraints.sizeClass,rect:{x:p,y:r,width:d,height:i},layer:`grid`,order:h.region.zBase+t,fit:o,region:h.region.name}),b=r+i+v})}let A=null;if(h===void 0&&_!==void 0&&O.length>0){let e={width:Math.max(0,i.width-2*c),height:Math.max(0,i.height-2*c)},t=UN(_,e,a),o=_.sheetAnchor===`bottom`,s=NN(a,r.width).cardsPad,l=o?Math.min(u,n.callControlsRect?.y??u)-s:u,f=t.x+c,p=d!==null&&XN({...t,x:f},d)?d.y-8:l,m=Math.min(l,p),h={x:f,y:t.y+c,width:t.width,height:Math.max(0,Math.min(t.height,m-(t.y+c)))},{innerW:g,entries:v}=LN(O,h.width,a,r.width,o?{left:s,right:s}:{left:0,right:0},a.card.stackMaxWidthPx),y=v[0];if(y!==void 0){let e=h.x+Math.round((h.width-g)/2),t=Math.max(0,Math.min(y.clampedHeightPx,h.height)),n=ON(y.clampedHeightPx,t,a);o&&y.constraints.naturalHeightPx>t&&(n={kind:`scroll`});let r=y.constraints.hardMinHeightPx;r!==void 0&&t<r&&n.kind!==`scroll`&&(n={kind:`scroll`}),A={id:y.card.id,kind:`card`,component:y.card.component,cardSizeClass:y.constraints.sizeClass,rect:{x:e,y:o?h.y+h.height-t:h.y,width:g,height:t},layer:`overlay`,order:_.zBase,fit:n,region:_.name,sheet:!0,...o&&{sheetAnchor:`bottom`}},T.push(A)}}if(!D){if(o&&S.selfViewDropped)w.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?qN:n.prefs.pipCorner??`bottom-left`,o=n.callControlsVisible===!1?null:n.callControlsRect??(l>0?{x:0,y:u,width:i.width,height:l}:null),s=[...o===null?[]:[o],...A===null?[]:[A.rect],...d===null?[]:[d],...n.chromeObstacles??[]];if(E){let e=E.rect,n=eP(e,y,a,r.width===`compact`),i=n===null?null:QN(e,t,y,n.w,n.h),o=i===null?null:rP(i,s,y),c=n!==null&&o!==null&&o.y>=e.y&&n.w+y<=e.width&&n.h+y<=e.height,l=n!==null&&e.width>0&&e.height>0?n.w*n.h/(e.width*e.height):1/0;o!==null&&c&&l<=a.pip.maxAreaRatio?T.push({id:`selfView`,kind:`selfView`,rect:o,layer:`overlay`,order:g?.zBase??100,fit:{kind:`natural`},region:g?.name??`pip`}):w.selfViewDropped=!0}else{let e=a.pip.minWidthPx,n=r.width===`compact`?e:Math.round(e*9/16),o={x:0,y:0,width:i.width,height:i.height},c=rP(QN(o,t,y,e,n),s,y),l=c.y>=0&&e+y<=o.width&&n+y<=o.height,u=T.some(e=>(e.kind===`content`||e.kind===`card`)&&kN(e.rect,c));l&&!u?T.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:g?.zBase??100,fit:{kind:`natural`},region:g?.name??`pip`}):w.selfViewDropped=!0}}}return{tiles:T,degradations:w,statusStrip:d}},T={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},E=w(T),D=jN(E.tiles,i,a,d);for(let e of a.degradationLadder){if(D.length===0)break;if(e===`evict-cards`)for(;D.length>0&&T.extraEvictions<C.length;)T={...T,extraEvictions:T.extraEvictions+1},E=w(T),D=jN(E.tiles,i,a,d);else e===`drop-self-view`?E.tiles.some(e=>e.kind===`selfView`)&&(T={...T,selfViewDropped:!0},E=w(T),D=jN(E.tiles,i,a,d)):e===`collapse-replica`&&!T.replicaCollapsed&&E.tiles.some(e=>e.kind===`replica`)&&(T={...T,replicaCollapsed:!0},E=w(T),D=jN(E.tiles,i,a,d))}return E}function sP(e){if(e!==void 0&&e.length!==0)return{...mN,...Object.fromEntries(e.map(e=>[e.id,e]))}}function cP(e,t,n,r){let i=e.callControlsRect,a=i===void 0?e:{...e,callControlsRect:{x:Math.round(i.x),y:Math.round(i.y),width:Math.max(0,Math.round(i.width)),height:Math.max(0,Math.round(i.height))}},o={width:Math.max(0,Math.round(a.container.widthPx)),height:Math.max(0,Math.round(a.container.heightPx))},s=vN(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=_N(s.state,t,sP(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d,statusStrip:f}=oP(s,l,a,t,o,n);return{state:s.state,sizeClass:t,containerPx:o,templateId:l.id,tiles:u,...f!==null&&{statusStrip:f},degradations:d,suppressedPrefs:[...s.suppressedPrefs]}}var lP={compact:0,medium:1,expanded:2};function uP(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function dP(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(uP(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(lP[t.width]-lP[a.width]),s=e.lastResolution?.containerPx;return o>1||s===void 0||Math.max(Math.abs(Math.round(n.widthPx)-s.width),Math.abs(Math.round(n.heightPx)-s.height))>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&uP(e.pendingClass,t)?r-e.pendingSinceMs>=i.hysteresis.windowMs?{committedClass:t,pendingClass:null,pendingSinceMs:null}:{committedClass:a,pendingClass:e.pendingClass,pendingSinceMs:e.pendingSinceMs}:{committedClass:a,pendingClass:t,pendingSinceMs:r}}var fP=(e,t)=>e<t?-1:+(e>t);function pP(e,t){let n=new Map((e?.tiles??[]).map(e=>[e.id,e])),r=new Map(t.tiles.map(e=>[e.id,e])),i=[];for(let e of[...n.keys()].sort(fP))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(fP)){let t=n.get(e);if(t===void 0){a.push({type:`enter`,tileId:e});continue}let i=r.get(e);if(t.layer!==i.layer){o.push(i.layer===`overlay`?{type:`promote`,tileId:e,toLayer:i.layer}:{type:`demote`,tileId:e,toLayer:i.layer});continue}let c=t.rect.x!==i.rect.x||t.rect.y!==i.rect.y,l=t.rect.width!==i.rect.width||t.rect.height!==i.rect.height;c?s.push({type:`move`,tileId:e,from:t.rect,to:i.rect}):l&&s.push({type:`resize`,tileId:e,from:t.rect,to:i.rect})}return[...i,...a,...o,...s]}function mP(e,t,n,r,i){let a=dP(e,pN(t.container,r),t.container,n,r),o=cP(t,a.committedClass,r,i);return{resolution:o,transitions:pP(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var hP=`0.1.16`,gP=dN,_P=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),vP=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function yP(e,t){return _P||e===!0||t===!0}function bP(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function xP({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,reportedHeights:l}){return{kioskMode:e,container:{widthPx:n.width,heightPx:Math.round(Math.min(n.height,n.visualViewportHeight??n.height))},replica:r.hasPersonaVideo,selfView:r.hasSelfView,presentation:r.isPersonaPresenting?{}:null,userShare:r.isScreenSharing?{}:null,cards:t.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...l[e.id]===void 0?{}:{naturalHeightPx:l[e.id]}})),prefs:{},callControls:i>0,callControlsVisible:a??!0,...o===void 0?{}:{callControlsRect:o},...s===void 0?{}:{statusStrip:{id:s,...c===void 0?{}:{heightPx:c}}}}}var SP=16,CP=200,wP=Lt(null);function TP(e){wP.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),wP.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,CP))}function EP(){wP.peek()!==null&&(wP.value=null)}function DP({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,enabled:l}){let u=P(gP),d=P(null),[f,p]=M({}),[m,h]=M(null),g=I((e,t)=>{l&&p(n=>n[e]===t?n:{...n,[e]:t})},[l]);N(()=>{p(e=>{let n=new Set(t.map(e=>e.id)),r={};for(let[t,i]of Object.entries(e))n.has(t)&&(r[t]=i);return Object.keys(r).length===Object.keys(e).length?e:r})},[t]);let _=F(()=>xP({kioskMode:e,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,reportedHeights:f}),[e,t,n,r,i,a,o,s,c,f]);return N(()=>{if(!l||wP.peek()!==null)return;d.current===null&&(d.current=Date.now());let e=null,t=()=>{if(e=null,wP.peek()!==null)return;let n=Date.now()-(d.current??0),r;try{r=mP(u.current,_,n,fN)}catch(e){TP(e);return}if(u.current=r.nextState,h(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(SP,fN.hysteresis.windowMs-i+SP))}};return t(),()=>{e!==null&&clearTimeout(e)}},[l,_]),{resolution:l?m?.resolution??null:null,inputs:l?_:null,transitions:l?m?.transitions??[]:[],reportedHeights:f,recordNaturalHeight:g}}function OP(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function kP(e,t,n){return n?e===null?`no-presence`:t.hasPersonaVideo?e.degradations.evictedCardIds.length>0?`card-dropped`:e.tiles.some(e=>e.kind===`card`&&e.fit.kind===`scroll`&&!OP(e))?`card-overflow`:e.degradations.statusStripDropped===!0?`status-strip-dropped`:null:`no-persona-video`:`flag-off`}function AP(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!OP(e));return n===void 0?null:n.rect.y+n.rect.height}var jP={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function MP(e,t,n){if(e===null)return jP;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return jP;let i=t=>e.tiles.find(e=>e.kind===t)?.rect??null;return{driving:r,containerPx:e.containerPx,replica:r?i(`replica`):null,selfView:i(`selfView`),content:r?i(`content`):null,replicaCollapsed:r?e.degradations.replicaCollapsed:!1}}function NP(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function PP(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function FP(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var IP=`conversation.grid_status`,LP=6e4;function RP(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function zP(e,t){return{message_type:`conversation`,event_type:IP,conversation_id:e,properties:t}}function BP(e){let t=FP(e.sizeClass);return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,...t===void 0?{}:{composition:t},container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function VP(e){let{send:t,enabledVia:n,engineVersion:r=hP,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=LP}=e,s=i(),c=!1,l=!1,u,d=null,f=null,p=!1,m=null,h=0,g=0,_={},v=null,y=e=>{try{t(e)}catch{}},b=(e,t)=>({v:1,kind:e,engine_version:r,enabled_via:n,bail:t,...v}),x=e=>{f=null;let t=u;if(t!==void 0&&e===t)return;let n=i();t===null&&m!==null&&(h+=n-m,m=null),e===null?m=n:_[e]=(_[e]??0)+1,t!==void 0&&(g+=1),e===null&&!p?(p=!0,y({...b(`first_drive`,null),...t===void 0?{}:{prev_bail:t}})):t!==void 0&&y({...b(`transition`,e),prev_bail:t}),u=e},S=e=>{let t=i(),n=h+(m===null?0:t-m);y({...b(`summary`,u??d??null),driving_ms:Math.round(n),total_ms:Math.round(t-s),bail_counts:{..._},transitions:g,...e?{final:!0}:{}})},C=setInterval(()=>S(!1),o);return{update(e,t){if(c)return;t!==null&&(v=BP(t));let n=f===null?u:d;(n===void 0||e!==n)&&(d=e,f!==null&&clearTimeout(f),f=setTimeout(()=>x(e),a))},error(e){c||l||(l=!0,y({...b(`error`,`engine-error`),error:e}))},dispose(){c||(c=!0,clearInterval(C),f!==null&&(clearTimeout(f),x(d)),S(!0))}}}function HP({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=Xf(),o=Zf(),s=L(ah),c=P({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=P(null);N(()=>{if(!e)return;let n=VP({enabledVia:t,send:e=>{try{let t=c.current;if(!t.daily||t.meetingState!==`joined-meeting`)return;let n=t.conversation?.session.peek()?.conversationId;if(!n)return;t.daily.sendAppMessage(zP(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),N(()=>{l.current?.update(n,r)},[n,r]),N(()=>{i!==null&&l.current?.error(i)},[i])}var UP=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},WP=(e,t)=>({classGroupId:e,validator:t}),GP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),KP=`-`,qP=[],JP=`arbitrary..`,YP=e=>{let t=QP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ZP(e);let n=e.split(KP);return XP(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?UP(i,t):t:i||qP}return n[e]||qP}}},XP=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=XP(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(KP):e.slice(t).join(KP),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ZP=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?JP+r:void 0})(),QP=e=>{let{theme:t,classGroups:n}=e;return $P(n,t)},$P=(e,t)=>{let n=GP();for(let r in e){let i=e[r];eF(i,n,r,t)}return n},eF=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];tF(i,t,n,r)}},tF=(e,t,n,r)=>{typeof e==`string`?nF(e,t,n):typeof e==`function`?rF(e,t,n,r):iF(e,t,n,r)},nF=(e,t,n)=>{let r=e===``?t:aF(t,e);r.classGroupId=n},rF=(e,t,n,r)=>{oF(e)?eF(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(WP(n,e)))},iF=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];eF(o,aF(t,a),n,r)}},aF=(e,t)=>{let n=e,r=t.split(KP),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=GP(),n.nextPart.set(t,i)),n=i}return n},oF=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,sF=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},cF=`!`,lF=`:`,uF=[],dF=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fF=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===lF){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(cF)?(c=s.slice(0,-1),l=!0):s.startsWith(cF)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return dF(t,l,c,u)};if(t){let e=t+lF,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):dF(uF,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},pF=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},mF=e=>({cache:sF(e.cacheSize),parseClassName:fF(e),sortModifiers:pF(e),postfixLookupClassGroupIds:hF(e),...YP(e)}),hF=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},gF=/\s+/,_F=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(gF),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+cF:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},vF=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=yF(n))&&(i&&(i+=` `),i+=r);return i},yF=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=yF(e[r]))&&(n&&(n+=` `),n+=t);return n},bF=(e,...t)=>{let n,r,i,a,o=o=>(n=mF(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=_F(e,n);return i(e,a),a};return a=o,(...e)=>a(vF(...e))},xF=[],SF=e=>{let t=t=>t[e]||xF;return t.isThemeGetter=!0,t},CF=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wF=/^\((?:(\w[\w-]*):)?(.+)\)$/i,TF=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,EF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,OF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jF=e=>TF.test(e),MF=e=>!!e&&!Number.isNaN(Number(e)),NF=e=>!!e&&Number.isInteger(Number(e)),PF=e=>e.endsWith(`%`)&&MF(e.slice(0,-1)),FF=e=>EF.test(e),IF=()=>!0,LF=e=>DF.test(e)&&!OF.test(e),RF=()=>!1,zF=e=>kF.test(e),BF=e=>AF.test(e),VF=e=>!Q(e)&&!$(e),HF=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),UF=e=>iI(e,cI,RF),Q=e=>CF.test(e),WF=e=>iI(e,lI,LF),GF=e=>iI(e,uI,MF),KF=e=>iI(e,fI,IF),qF=e=>iI(e,dI,RF),JF=e=>iI(e,oI,RF),YF=e=>iI(e,sI,BF),XF=e=>iI(e,pI,zF),$=e=>wF.test(e),ZF=e=>aI(e,lI),QF=e=>aI(e,dI),$F=e=>aI(e,oI),eI=e=>aI(e,cI),tI=e=>aI(e,sI),nI=e=>aI(e,pI,!0),rI=e=>aI(e,fI,!0),iI=(e,t,n)=>{let r=CF.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},aI=(e,t,n=!1)=>{let r=wF.exec(e);return r?r[1]?t(r[1]):n:!1},oI=e=>e===`position`||e===`percentage`,sI=e=>e===`image`||e===`url`,cI=e=>e===`length`||e===`size`||e===`bg-size`,lI=e=>e===`length`,uI=e=>e===`number`,dI=e=>e===`family-name`,fI=e=>e===`number`||e===`weight`,pI=e=>e===`shadow`,mI=bF(()=>{let e=SF(`color`),t=SF(`font`),n=SF(`text`),r=SF(`font-weight`),i=SF(`tracking`),a=SF(`leading`),o=SF(`breakpoint`),s=SF(`container`),c=SF(`spacing`),l=SF(`radius`),u=SF(`shadow`),d=SF(`inset-shadow`),f=SF(`text-shadow`),p=SF(`drop-shadow`),m=SF(`blur`),h=SF(`perspective`),g=SF(`aspect`),_=SF(`ease`),v=SF(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[jF,`full`,`auto`,...w()],E=()=>[NF,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,NF,$,Q]},NF,$,Q],ee=()=>[NF,`auto`,$,Q],O=()=>[`auto`,`min`,`max`,`fr`,$,Q],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],te=()=>[`auto`,...w()],ne=()=>[jF,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[jF,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ie=()=>[jF,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,$,Q],ae=()=>[...b(),$F,JF,{position:[$,Q]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,eI,UF,{size:[$,Q]}],ce=()=>[PF,ZF,WF],le=()=>[``,`none`,`full`,l,$,Q],ue=()=>[``,MF,ZF,WF],de=()=>[`solid`,`dashed`,`dotted`,`double`],fe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],pe=()=>[MF,PF,$F,JF],me=()=>[``,`none`,m,$,Q],he=()=>[`none`,MF,$,Q],ge=()=>[`none`,MF,$,Q],_e=()=>[MF,$,Q],ve=()=>[jF,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[FF],breakpoint:[FF],color:[IF],container:[FF],"drop-shadow":[FF],ease:[`in`,`out`,`in-out`],font:[VF],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[FF],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[FF],shadow:[FF],spacing:[`px`,MF],text:[FF],"text-shadow":[FF],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,jF,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[HF],columns:[{columns:[MF,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[NF,`auto`,$,Q]}],basis:[{basis:[jF,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[MF,jF,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,MF,$,Q]}],shrink:[{shrink:[``,MF,$,Q]}],order:[{order:[NF,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ne()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...ie()]}],"min-block-size":[{"min-block":[`auto`,...ie()]}],"max-block-size":[{"max-block":[`none`,...ie()]}],w:[{w:[s,`screen`,...ne()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ne()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ne()]}],h:[{h:[`screen`,`lh`,...ne()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ne()]}],"max-h":[{"max-h":[`screen`,`lh`,...ne()]}],"font-size":[{text:[`base`,n,ZF,WF]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,rI,KF]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,PF,Q]}],"font-family":[{font:[QF,qF,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[MF,`none`,$,GF]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...de(),`wavy`]}],"text-decoration-thickness":[{decoration:[MF,`from-font`,`auto`,$,WF]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[MF,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[NF,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},NF,$,Q],radial:[``,$,Q],conic:[NF,$,Q]},tI,YF]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...de(),`hidden`,`none`]}],"divide-style":[{divide:[...de(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...de(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[MF,$,Q]}],"outline-w":[{outline:[``,MF,ZF,WF]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`none`,u,nI,XF]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,nI,XF]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:ue()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[MF,WF]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,nI,XF]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[MF,$,Q]}],"mix-blend":[{"mix-blend":[...fe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[MF]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[MF]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:me()}],brightness:[{brightness:[MF,$,Q]}],contrast:[{contrast:[MF,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,nI,XF]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,MF,$,Q]}],"hue-rotate":[{"hue-rotate":[MF,$,Q]}],invert:[{invert:[``,MF,$,Q]}],saturate:[{saturate:[MF,$,Q]}],sepia:[{sepia:[``,MF,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[MF,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[MF,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,MF,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[MF,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,MF,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[MF,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[MF,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,MF,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[MF,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[MF,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":[`scale-3d`],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],zoom:[{zoom:[NF,$,Q]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[MF,ZF,WF,GF]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function hI({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=mN[e.templateId];if(i===void 0)return null;let a=r!==null,o=a?`border-warning/70 bg-warning/5`:`border-info/80 bg-info/5`,s=a?`bg-warning/85 text-warning-content`:`bg-info/85 text-info-content`,c=a?`border-warning`:`border-success`,l=a?`bg-warning/85 text-warning-content`:`bg-success/85 text-success-content`,u=t.userShare?`userShare`:t.presentation?`presentation`:null,{regions:d}=aP(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return R(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&R(`span`,{class:`absolute top-1 left-1/2 -translate-x-1/2 rounded bg-warning/90 px-2 py-0.5 font-mono text-[10px] text-warning-content`,children:[`engine plan only · legacy: `,r]}),d.map(e=>R(`div`,{class:mI(`absolute rounded-box border border-dashed`,o),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:R(`span`,{class:mI(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[R(`span`,{children:e.region.name}),R(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>R(`div`,{class:mI(`absolute border`,c),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:R(`span`,{class:mI(`absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]`,l),children:[e.kind,` `,e.rect.width,`×`,e.rect.height]})},`tile-${e.id}`))]})}function gI(e){return{version:1,buildSha:hP,engineVersion:hP,config:fN,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{...e.kioskMode===!0?{kioskMode:!0}:{},replica:e.replica,selfView:e.selfView,presentation:e.presentation!==null,userShare:e.userShare!==null,callControls:e.callControls,callControlsVisible:e.callControlsVisible??!0,...e.callControlsRect===void 0?{}:{callControlsRect:e.callControlsRect},...e.statusStrip===void 0?{}:{statusStrip:e.statusStrip}},prefs:e.prefs,cards:e.cards}}}function _I({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=M(!1),s=P(null);if(N(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:R(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[R(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[R(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),R(`span`,{class:`text-warning`,children:`observing`})]}),R(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[R(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),R(`dd`,{class:`text-warning`,children:r}),R(`dt`,{class:`text-error opacity-80`,children:`error`}),R(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(gI(t),null,2);s.current!==null&&clearTimeout(s.current),navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current=setTimeout(()=>o(!1),1500)},()=>o(!1))},l=e.degradations.evictedCardIds,u=FP(e.sizeClass);return R(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[R(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[R(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),R(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),R(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[R(`dt`,{class:`opacity-60`,children:`state`}),R(`dd`,{children:e.state}),R(`dt`,{class:`opacity-60`,children:`template`}),R(`dd`,{children:e.templateId}),R(`dt`,{class:`opacity-60`,children:`class`}),R(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),u!==void 0&&R(D,{children:[R(`dt`,{class:`opacity-60`,children:`composition`}),R(`dd`,{children:u})]}),R(`dt`,{class:`opacity-60`,children:`container`}),R(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&R(D,{children:[R(`dt`,{class:`opacity-60`,children:`controls`}),R(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),R(`dt`,{class:`opacity-60`,children:`tiles`}),R(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&R(D,{children:[R(`dt`,{class:`text-error opacity-80`,children:`dropped`}),R(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&R(D,{children:[R(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),R(`dd`,{class:`text-warning`,children:r})]}),i!==null&&R(D,{children:[R(`dt`,{class:`text-error opacity-80`,children:`error`}),R(`dd`,{class:`text-error break-all`,children:i})]})]}),R(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var vI={effect:jP,animate:!1},yI=Lt(vI),bI={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function xI(e,t){return e===null||t===null?e===t:e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function SI(e,t){let n=e.containerPx===null||t.containerPx===null?e.containerPx===t.containerPx:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height;return e.driving===t.driving&&e.replicaCollapsed===t.replicaCollapsed&&n&&xI(e.replica,t.replica)&&xI(e.selfView,t.selfView)&&xI(e.content,t.content)}var CI=new Map,wI=new Set;function TI({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,statusStripId:o,statusStripHeightPx:s,gridConfigEnabled:c,gridStartEnabled:l}){let u=yP(c,l)&&r!==void 0,d=r??bI,f=globalThis.location?.search??``,p=DP({kioskMode:F(()=>bP(f),[f]),instances:e,viewport:t,presence:d,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,statusStripId:o,statusStripHeightPx:s,enabled:u}),m=u?wP.value:null,h=m===null?kP(p.resolution,d,u):`engine-error`;HP({enabled:u,enabledVia:RP(_P,c===!0,l===!0),bail:h,resolution:p.resolution,engineError:m});let g=P(!1);d.presence.phase===`ready`?d.hasPersonaVideo&&(g.current=!0):g.current=!1;let _=!g.current,v;try{v=MP(p.resolution,h,_)}catch(e){TP(e),v=jP}let y=P(jP),b=PP(y.current,v);N(()=>{y.current=v,SI(yI.peek().effect,v)||(yI.value={effect:v,animate:b})}),N(()=>()=>{EP(),yI.peek()!==vI&&(yI.value=vI)},[]);let x=p.resolution,S=F(()=>{if(h!==null||x===null)return CI;try{let e=new Map;for(let t of x.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e}catch(e){return TP(e),CI}},[h,x]),C=F(()=>h!==null||x===null?wI:new Set(x.tiles.filter(OP).map(e=>e.id)),[h,x]),w=vP?R(`div`,{class:`contents`,"data-grid-debug":!0,children:[R(hI,{resolution:p.resolution,inputs:p.inputs,config:fN,bailReason:h}),R(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:R(_I,{resolution:p.resolution,inputs:p.inputs,shadowing:h!==null,bailReason:h,engineError:m})})]}):null;return{cardRects:S,kioskCardIds:C,sheetBottomPx:AP(x,h),animate:b,recordNaturalHeight:p.recordNaturalHeight,debug:w}}var EI=[`left`,`top`,`width`,`height`].map(e=>`${e} ${rS}`).join(`, `);function DI(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!pS()?EI:`none`}}function OI({state:e}){return e.enabled?R(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[R(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),R(`dl`,{class:`mt-2 grid gap-2`,children:[R(kI,{label:`iframe`,value:e.iframeLifecycleState}),R(kI,{label:`post`,value:e.lastInteractionPostResult}),R(kI,{label:`context`,value:e.lastModelContextUpdate}),R(kI,{label:`error`,value:e.lastError}),R(AI,{label:`tool_call`,value:e.lastToolCall}),R(AI,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function kI({label:e,value:t}){return t?R(`div`,{children:[R(`dt`,{class:`font-semibold`,children:e}),R(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function AI({label:e,value:t}){return t===void 0?null:R(`div`,{children:[R(`dt`,{class:`font-semibold`,children:e}),R(`dd`,{children:R(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var jI={compact:32,regular:40,roomy:68},MI=6e3,NI=`ease-out`,PI={stiffness:2822,damping:84,mass:3.5},FI=.25,II=16;function LI(){if(typeof document>`u`||typeof getComputedStyle!=`function`)return II;let e=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)?e:II}function RI(e,t){return e===`widget`||t!==void 0&&t>0&&t<640?`compact`:`regular`}function zI(e){if(typeof e==`string`)try{let t=JSON.parse(e);return BI(t)?t:null}catch{return null}return BI(e)?e:null}function BI(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function VI(e){let t=zI(e)?.state;return t===`success`||t===`error`}function HI(e){return zI(e)?.state===`error`}function UI(e,t,n){let r=`${t+8}px`;if(n===void 0||!Number.isFinite(n)||n<=0)return{left:`1rem`,right:`1rem`,bottom:r};let i=Math.max(0,n-32),a=Math.min(i,448),o=e&&e.width>0?e.x+e.width/2:n/2,s=Math.min(Math.max(o-a/2,16),16+i-a);return{left:`${Math.round(s)}px`,width:`${Math.round(a)}px`,bottom:r}}function WI(e){let t=e?.trim();if(!t)return FI*LI();let n=Number.parseFloat(t);if(!Number.isFinite(n))return FI*LI();if(t.endsWith(`rem`))return n*LI();if(t.endsWith(`px`))return n}function GI(e,t){let n=e[`--color-neutral`],r=e[`--color-neutral-content`],i=WI(e[`--radius-field`]);return{...n?{"--activity-bg":n}:{},...r?{"--activity-fg":r}:{},"--activity-border":`transparent`,...i===void 0?{}:{"--activity-radius":`${i}px`},"--activity-height":`${jI[t.density]}px`,"--activity-align":t.align}}var KI=1e3,qI=5e3,JI=1200,YI=[2e3,6e3];async function XI(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),qI);try{await wn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function ZI(e){return e instanceof vn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function QI(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:ML(e).message},{error:e,operation:`canvas.bridge`})}function $I(e){return e.content.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.trim()!==``)}function eL(e,t,n,r){(async()=>{let i;for(let a of YI){await new Promise(e=>setTimeout(e,a));try{await XI(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,ZI(e))break}}QI(i,r)})()}var tL=2e3;function nL(e){return e.correct_answer===void 0?JI:tL}var rL=48,iL=24,aL=`ui-monospace, SFMono-Regular, Menlo, monospace`,oL=160,sL=()=>{},cL=`allow-scripts`,lL={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function uL(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var dL=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{uL(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function fL(e){for(let t of Ub)if(e.some(e=>OL(e)===t))return t;return null}function pL({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=kL(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s,onStatusStripChange:c}={}){let{client:l,telemetry:u}=jh(),{isDark:d,cssVars:f}=uN(),p=Xf(),m=Zf(),[h,g]=M([]),[_,v]=M(null),[y,b]=M(!1),x=P(null),S=P(null),C=P(null),[w,T]=wL(),E=L(_t)?.surface,D=RI(E,T.width),ee=jI[D],O=y?null:_,k=O?ee+8:0,A=I(()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)},[]),te=I(()=>{C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),ne=I(()=>{x.current&&(x.current=null,A(),te(),b(!0),S.current=setTimeout(()=>{S.current=null,b(!1),v(null)},300))},[A,te]),re=I(()=>{x.current&&(te(),C.current=setTimeout(()=>{C.current=null,ne()},MI))},[ne,te]);N(()=>()=>{A(),te()},[A,te]),N(()=>{c?.(O?ee:null)},[O,ee,c]),N(()=>()=>c?.(null),[c]);let[ie,j]=M(()=>({enabled:n,iframeLifecycleState:`idle`})),ae=TI({instances:h,viewport:T,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,statusStripId:O?.id,statusStripHeightPx:O?ee:void 0,gridConfigEnabled:o,gridStartEnabled:s}),oe=I((e,t)=>{if(e.lastError){let n={stage:`magic_canvas`,outcome:e.lastInteractionPostResult===`retrying`?`retry`:`failed`,operation:t?.operation??(e.lastInteractionPostResult?`canvas.bridge`:`canvas.load`),component:`magic_canvas`,code:`canvas_error`,handled:!0};t?Dr(u,t.error,n):u?.record(n)}e.lastInteractionPostResult===`recovered`&&u?.record({stage:`magic_canvas`,outcome:`recovered`,operation:`canvas.bridge`,component:`magic_canvas`}),j(t=>({...t,...e}))},[u]),se=I((e,t=`*`)=>{m===`joined-meeting`?p?.sendAppMessage(e,t):oe({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`})},[p,m,oe]),ce=F(()=>({theme:d.value?`dark`:`light`,cssVars:f.value}),[d.value,f.value]);N(()=>{j(e=>e.enabled===n?e:{...e,enabled:n})},[n]),tp({onAppMessage:I(e=>{if(m!==`joined-meeting`)oe({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});else if(Zm(e.data))C.current!==null&&ne();else try{let t=Ux(e.data);if(!t)return;let n=x.current,r=sx(n,t);if(r.consumed){let e=n!==null&&r.strip!==null&&n.tool_call_id===r.strip.tool_call_id&&n.conversation_id===r.strip.conversation_id,t=C.current!==null;r.strip?VI(r.strip.arguments)?e&&(HI(r.strip.arguments)&&!t&&(x.current=r.strip,v(r.strip)),re()):e&&t||(A(),te(),x.current=r.strip,b(!1),v(r.strip)):ne()}else g(e=>rx(e,t));oe({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){oe({iframeLifecycleState:`error`,lastError:ML(e).message},{error:e,operation:`canvas.validate`})}},[ne,re,A,te,m,oe])});let le=h.map(e=>{let t=mx(e,T),n=t.display_mode===`fullscreen`?null:ae.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),ue=hx(le.map(({layout:e})=>e),T),de=[...le].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;N(()=>{e?.(ue)},[e,ue.active,ue.side,ue.video_shift_x,ue.backdrop.type,ue.safe_area?.x,ue.safe_area?.y,ue.safe_area?.width,ue.safe_area?.height]);let fe=fL(le.map(({layout:e})=>e));N(()=>{t?.(fe)},[t,fe]);let pe=h.length>0||_!==null||ie.enabled;return R(`div`,{ref:w,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,style:`--mc-strip-band: ${k}px; --cvi-status-strip-drop: ${80-iL}px`,children:[pe&&de&&R(`div`,{class:`absolute inset-0 bg-black/45`}),pe&&!de&&ae.sheetBottomPx!==null&&R(`div`,{"data-grid-sheet-scrim":!0,class:`absolute inset-x-0 top-0`,style:{height:Math.min(ae.sheetBottomPx+64,T.height),backgroundImage:`linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))`}}),pe&&le.map(({instance:e,layout:t,gridRect:n})=>R(_L,{slot:OL(t),safeAreaTop:ue.safe_area?.y,frameWidth:T.width,...n?{gridRect:n,gridAnimate:ae.animate}:{},children:r=>R(vL,{availableHeight:r,client:l,gridDriven:n!==null,gridKioskCard:n!==null&&ae.kioskCardIds.has(e.id),hostTheme:ce,instance:e,layout:t,dimmed:!!(de&&de!==e.tool_call_id),onDebug:oe,onNaturalHeightChange:ae.recordNaturalHeight,onComplete:()=>{g(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{g(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:se})},e.id)),_&&R(mL,{client:l,controlsRect:a,density:D,exiting:y,frameWidth:T.width,hostTheme:ce,instance:_,onComplete:ne,onDebug:oe,sendAppMessage:se}),pe&&R(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:R(OI,{state:ie})}),ae.debug]})}function mL({client:e,controlsRect:t,density:n,exiting:r,frameWidth:i,hostTheme:a,instance:o,onComplete:s,onDebug:c,sendAppMessage:l}){let u=jI[n],d={...o.layout,preferred_slot:`safe-area-bottom`,display_mode:`inline`,viable_slot:`safe-area-bottom`},f=F(()=>({...a,cssVars:{...a.cssVars,"--font-mono":aL},activity:{density:n,align:`center`}}),[n,a]);return R(`div`,{class:`cvi-status-strip absolute flex justify-center`,style:UI(t,72,i),"data-canvas-status-strip":!0,children:R(hL,{exiting:r,instanceId:o.id,children:R(vL,{availableHeight:oL,client:e,fixedHeightPx:u,hostTheme:f,instance:o,layout:d,onComplete:s,onDebug:c,onDisplayModeChange:sL,onNaturalHeightChange:sL,sendAppMessage:l,variant:`strip`})})})}function hL({exiting:e,instanceId:t,children:n}){let r=P(null);return Xe(()=>{let t=r.current;if(!t||e)return;if(pS()){t.style.transition=`opacity 300ms ${NI}`,t.style.opacity=`0`;let e=globalThis.requestAnimationFrame(()=>{t.style.opacity=`1`});return()=>globalThis.cancelAnimationFrame(e)}let{stiffness:n,damping:i,mass:a}=PI,o=0,s=0,c=performance.now(),l=0,u=()=>{let e=(1-o)*40;t.style.transform=`translateY(${e.toFixed(2)}px)`,t.style.opacity=`${Math.min(Math.max(o,0),1)}`};t.style.transition=``,u();let d=e=>{let r=Math.min((e-c)/1e3,1/30);c=e,s+=(n*(1-o)-i*s)/a*r,o+=s*r,Math.abs(1-o)<.002&&Math.abs(s)<.02?(t.style.transform=``,t.style.opacity=``):(u(),l=globalThis.requestAnimationFrame(d))};return l=globalThis.requestAnimationFrame(d),()=>globalThis.cancelAnimationFrame(l)},[e,t]),N(()=>{let t=r.current;t&&e&&(t.style.transition=`opacity 300ms ${NI}`,t.style.opacity=`0`)},[e]),R(`div`,{ref:r,class:`w-full`,"data-strip-motion":e?`exiting`:`entering`,children:n})}var gL=16;function _L({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=TL(),c=a(r?r.height:e===`full`?void 0:s);if(r)return R(`div`,{ref:o,class:`pointer-events-auto absolute`,style:DI(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:R(`div`,{class:`flex h-full w-full flex-col gap-2`,children:c})});if(e===`safe-area-left`||e===`safe-area-right`){let r=t==null?`1rem`:`${t*100}%`,i=n!=null&&n>0?Math.max(0,n-32):void 0;return R(`div`,{ref:o,class:`cvi-strip-lift ${DL(e)}`,style:{top:r,bottom:`calc(72px + var(--mc-strip-band, 0px))`,maxWidth:i},"data-canvas-slot":e,children:R(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return e===`safe-area-bottom`?R(`div`,{ref:o,class:DL(e),style:{top:`${gL}px`},"data-canvas-slot":e,children:R(`div`,{class:`contents`,children:c})}):R(`div`,{ref:o,class:DL(e),"data-canvas-slot":e,children:R(`div`,{class:`contents`,children:c})})}function vL({availableHeight:e,client:t,gridDriven:n=!1,gridKioskCard:r=!1,hostTheme:i,instance:a,layout:o,dimmed:s,onDebug:c,onComplete:l,onDisplayModeChange:u,onNaturalHeightChange:d,sendAppMessage:f,variant:p=`card`,fixedHeightPx:m}){let h=p===`strip`,g=m??720,_=P(null),v=P(null),y=P(e),b=P(r),x=P(m??320),S=P({fixed:m,max:g}),C=P(i),w=P(a),T=P(o),E=P(-1),D=P(l),ee=P(u),O=P(d),k=P(f),[A,te]=M(m??720);N(()=>{S.current={fixed:m,max:g},m!==void 0&&te(m)},[m,g]),N(()=>{w.current=a},[a]),N(()=>{x.current=A,v.current?.setHostContext(SL(w.current,C.current,T.current,y.current,A,b.current))},[A]),N(()=>{y.current=e,b.current=r;let t=xL(i,_.current);C.current=t,v.current?.setHostContext(SL(w.current,t,T.current,e,x.current,r))},[e,i,r]),N(()=>{T.current=o,v.current?.setHostContext(SL(w.current,C.current,o,e,x.current,b.current))},[e,o]),N(()=>{D.current=l,ee.current=u,O.current=d,k.current=f},[l,u,d,f]),N(()=>{let e=_.current;if(!e)return;let n=!1,r=null,i=null,o=null,s=null,l=new URL(a.canvas_config.sandbox_url,globalThis.location.href).href,u=e=>{n||c({iframeLifecycleState:`error`,lastError:ML(e).message},{error:e,operation:`canvas.bridge`})},d=()=>{if(n||!i)return;let e=w.current,t=fx(e,i);i=null,k.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),c({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},f=()=>{if(r)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let f=new cN(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:SL(a,xL(C.current,e),T.current,y.current,x.current,b.current)});r=f,v.current=f,f.oninitialized=()=>{n||(c({iframeLifecycleState:`ready`}),E.current=w.current.revision,f.sendToolInput({arguments:w.current.arguments}).catch(u))},f.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let{fixed:t,max:n}=S.current,r=t===void 0?Math.min(Math.max(e,rL),n):e===t?t:Math.min(e,oL);te(r),O.current(w.current.id,r)}},f.onmessage=async e=>{let r=cx(e);if(!r){if($I(e)){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return c({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let i=w.current,a=(()=>{try{let e=lx(i,r);return{interaction:e,request:Wx(e)}}catch(e){return{error:e}}})();if(`error`in a){let e=ML(a.error).message;return c({lastInteractionPostResult:`error`,lastError:e},{error:a.error,operation:`canvas.validate`}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:o,request:l}=a,u=``;try{u=dx(e,o)}catch(e){c({lastError:ML(e).message}),o.type===`submit`&&console.warn(`Magic Canvas dropped the response text of a submitted card.`,e)}let d=!0;try{await XI(t,o.conversation_id,l.body)}catch(e){d=!1,ZI(e)?QI(e,c):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),c({lastInteractionPostResult:`failed_open`,lastError:ML(e).message},{error:e,operation:`canvas.bridge`}),eL(t,o.conversation_id,l.body,c))}if(n)return{};if(u)try{k.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:i.conversation_id,properties:{text:u}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),c({lastError:ML(e).message},{error:e,operation:`canvas.bridge`})}return d&&c({lastInteractionPostResult:`success`,lastError:void 0}),ux(o)&&(o.type===`submit`?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,n||D.current()},nL(i.arguments))):D.current()),{}},f.onupdatemodelcontext=async e=>(i=e,o||=setTimeout(()=>{o=null,d()},KI),{}),f.onrequestdisplaymode=async({mode:e})=>{if(h)return{mode:`inline`};let t=e===`fullscreen`?`fullscreen`:`inline`;return ee.current(t),T.current={...T.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:T.current.viable_slot},f.setHostContext(SL(w.current,C.current,T.current,y.current,x.current,b.current)),{mode:t}},f.connect(new dL(e)).then(()=>void 0).catch(u)};c({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),a.canvas_config.sandbox_url,e.src=a.canvas_config.sandbox_url;let p=()=>{f()};return e.addEventListener(`load`,p),f(),()=>{o&&=(clearTimeout(o),null),s&&=(clearTimeout(s),null),d(),n=!0,e.removeEventListener(`load`,p),v.current=null,c({iframeLifecycleState:`closed`}),r&&Vb(r)}},[t,a.id,a.canvas_config.sandbox_url,h,c]),N(()=>{a.revision!==0&&(a.revision<=E.current||(E.current=a.revision,v.current?.sendToolInput({arguments:a.arguments}).catch(e=>{c({iframeLifecycleState:`error`,lastError:ML(e).message},{error:e,operation:`canvas.bridge`})})))},[a.arguments,a.revision,c]);let ne=o.viable_slot===`full`||o.display_mode===`fullscreen`,re=ne?null:CL(A,e,r),ie=re?.placeholderStyle,j=re?.cardStyle,ae=ne?{height:`100%`}:re?.iframeStyle??{width:`100%`,height:`${A}px`},oe=h?`pointer-events-auto w-full overflow-hidden`:[`pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]`,r?``:`shadow-xl`,ne?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,s?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),se=lL[a.canvas_config.component]??cL,ce=R(`div`,{class:oe,style:j,...h?{"data-canvas-strip":o.viable_slot}:{"data-canvas-card":o.viable_slot},children:R(`iframe`,{ref:_,title:`${a.canvas_config.component} ${a.canvas_config.component_version}`,class:ne?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:se,scrolling:h?`no`:void 0,style:ae})});return ne?ce:R(`div`,{class:`block w-full`,style:ie,children:ce})}var yL=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`,`--color-neutral`,`--color-neutral-content`];function bL(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of yL){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function xL(e,t){let n=bL(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function SL(e,t,n,r,i,a=!1){let o=Gx(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:AL(r),l=t.activity?GI(t.cssVars,t.activity):{},u=s?1:CL(i??0,r,a)?.displayScale??1;return{...e.canvas_config.host_context,...o,...l,containerDimensions:{...jL(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:u}}}function CL(e,t,n=!1){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let r=Math.min(e,720);if(n)return{displayScale:1,placeholderStyle:{height:`${t}px`},cardStyle:{height:`100%`},iframeStyle:{width:`100%`,height:`100%`}};if(r<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${r}px`}};let i=t/r;return{displayScale:i,placeholderStyle:{height:`${r*i}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${r}px`,transform:`scale(${i})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${r}px`}}}function wL(){let e=P(null),[t,n]=M(()=>EL(null));return N(()=>{let t=()=>n(t=>{let n=EL(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function TL(){let e=P(null),[t,n]=M();return N(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function EL(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}function DL(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-right`:return`${t} right-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-bottom`:return`${t} cvi-strip-lift right-4 bottom-[calc(6rem_+_var(--mc-strip-band,0px))] left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-[calc(5rem_+_var(--mc-strip-band,0px))] @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function OL(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function kL(){return!1}function AL(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function jL(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ML(e){return e instanceof Error?e:Error(String(e))}var NL=class extends ee{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},PL=1e4;function FL(e,t=PL){let[n,r]=M(!1),i=P(!1);return N(()=>{if(!e){r(!1);return}if(i.current)return;i.current=!0,r(!0);let n=setTimeout(()=>r(!1),t);return()=>clearTimeout(n)},[e,t]),n}function IL(e){let t=Qf(),n=ip(t??``),r=!op(t??``).isOff,i=xb(e),a=i.phase===`ready`?i.replicaId:``,o=op(a),s=!r&&(o.state===`playable`||o.state===`loading`),c=i.phase===`ready`&&!e&&!i.videoState.isOff,l=!e&&t!==null&&!n.isOff,u=i.phase!==`ready`||i.videoState.isOff;return F(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function LL(e,t,n){let[r,i]=M(!0);return N(()=>{if(!t)return;let n=e.current;if(!n||typeof matchMedia!=`function`)return;let r=matchMedia(`(hover: hover) and (pointer: fine)`),a=()=>{try{return n.matches(`:has(:focus-visible)`)}catch{return!1}},o=n.matches(`:hover`),s=()=>{i(!r.matches||o||a())},c=()=>{o=!0,s()},l=()=>{o=!1,s()};return n.addEventListener(`pointerenter`,c),n.addEventListener(`pointerleave`,l),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,s),r.addEventListener(`change`,s),s(),()=>{n.removeEventListener(`pointerenter`,c),n.removeEventListener(`pointerleave`,l),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,s),r.removeEventListener(`change`,s)}},[t,e,n]),r}function RL(e,t,n,r,i){let[a,o]=M(void 0);return N(()=>{if(!r)return;let i=e.current,a=t.current;if(!i||!a||typeof ResizeObserver>`u`)return;let s=()=>{let e=i.getBoundingClientRect(),t=1/0,r=-1/0;for(let e of a.children){let n=e.getBoundingClientRect();n.width!==0&&(t=Math.min(t,n.left),r=Math.max(r,n.right))}if(e.width===0||!Number.isFinite(t)||r<=t)return;let s={x:Math.round(t-e.left),y:Math.round(e.height-n),width:Math.round(r-t),height:n};o(e=>e!==void 0&&e.x===s.x&&e.y===s.y&&e.width===s.width&&e.height===s.height?e:s)},c=new ResizeObserver(s);c.observe(i),c.observe(a);for(let e of a.children)c.observe(e);return s(),()=>c.disconnect()},[r,e,t,n,i]),a}var zL=1e4;function BL({onTimeout:e,timeoutMs:t=zL,active:n=!0}){let r=bb().length>0,[i,a]=M(!1),o=P(e);return N(()=>{o.current=e},[e]),N(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function VL(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function HL({onShutdown:e}){let t=P(e);N(()=>{t.current=e},[e]),tp({onAppMessage:I(e=>{VL(e?.data)&&t.current()},[])})}var UL=fn(`PiP`),WL=360,GL=280;function KL(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window&&!navigator.userAgent.includes(`Firefox/`)}function qL(e){let{enabled:t,active:n}=e,[r,i]=M(null),a=KL(),o=L(dg),s=I(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=I(async()=>{if(a&&t&&n&&(!r||r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:WL,height:GL}),t=Pe.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){UL.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return N(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=()=>s();globalThis.window.addEventListener(`focus`,r);let i=[],o=null,l=`none`,u=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;o=e.metadata,l=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,u=!0}catch(e){UL.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),i.push(t)}catch(e){UL.info(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),globalThis.window.removeEventListener(`focus`,r),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of i)try{e.setActionHandler(t,null)}catch{}if(u)try{e.metadata=o,e.playbackState=l}catch{}}}},[t,a,n,c,s]),N(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),N(()=>()=>{r&&!r.closed&&r.close()},[r]),N(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var JL=Lt(null),YL={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},XL=fp(({id:e,showAudioWave:t=!0})=>{let n=ip(e).isOff;return R(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[R(Sy,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&R(`div`,{class:`absolute bottom-2 right-2`,children:R(pb,{id:e})})]})}),ZL=fp(()=>{let e=Qf(),{isScreenSharing:t}=Ey(),n=bb()[0];return R(D,{children:[t&&n&&R(XL,{id:n}),e&&R(XL,{id:e,showAudioWave:!1})]})}),QL=fp(()=>R(`div`,{class:`cvi-strip-lift absolute bottom-4 @max-mobile:bottom-[calc(5rem_+_var(--cvi-status-strip,0px))] left-4 flex flex-col items-end gap-2 z-20`,children:R(ZL,{})})),$L=fp(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>R(D,{children:[R(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&R(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:DI(i.content,a),children:R(Sy,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&R(`div`,{class:mI(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:DI(i.replica,a),children:R(Tb,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),eR=fp(()=>{let{effect:e,animate:t}=yI.value,n=Qf();return n===null||e.selfView===null?null:R(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:DI(e.selfView,t),children:R(Sy,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),tR=fp(({canvasRenderedSlot:e})=>{let t=NP(yI.value.effect);return t===`hidden`?null:t===`engine`?R(NL,{onError:TP,children:R(eR,{})}):e===`safe-area-bottom`?null:R(QL,{})}),nR=fp(()=>{let e=bb()[0];return e?R(Cy,{sessionId:e}):null}),rR=fp(e=>R(D,{children:[R(nR,{}),R(iR,{...e})]})),iR=fp(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=yI.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?R(db,{}):i.phase===`connecting`?R(ub,{}):e&&!s?R(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:R(_b,{sessionId:i.replicaId})}):c.effect.driving?R(NL,{onError:TP,children:R($L,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?R(CS,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):R(aR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),aR=fp(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>R(xS,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:lR,personaMode:`auto`,renderedSlot:o,fill:i=>R(Tb,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),oR=fp(({items:e})=>{let[t,n]=M(!1),r=P(null);return N(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),R(`div`,{ref:r,class:`relative`,children:[R(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:R(hv,{name:`more`})}),t&&R(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),sR=fp(({items:e})=>e.length<=1?R(D,{children:e}):R(oR,{items:e})),cR=fp(({onLeave:e})=>{let t=Zf(),{config:n}=jh(),{session:r,state:i,end:a,endSession:o}=Zy(),s=Qf(),c=P(null),l=L(r_)?.frameRef??c,[u,d]=M(!1),f=$v()===`full-screen`,[p,m]=M(!1),[h,g]=M(YL),[_,v]=M(null),[y,b]=M(null),x=n.value.customization.conversation,S=FL(x.show_fullscreen_hint&&_!==null&&!u&&!f),C=P(null),w=P(null),T=r.value?.conversationUrl,E=r.value?.magicGrid===!0,D=LL(C,yP(x.magic_grid,E),T),ee=RL(C,w,72,!0,T),O=x.modality===`audio`,k=IL(O),A=x.modality===`chat`,te=x.modality===`video`,ne=x.enable_chat,re=x.enable_closed_captions,ie=x.enable_picture_in_picture,{pipWindow:j}=qL({enabled:ie&&!A,active:t===`joined-meeting`}),ae=P(null),oe=i.value===`connected`?r.value?.conversationId:void 0;N(()=>{oe&&(ae.current=oe)},[oe]);let se=I(()=>{let e=ae.current;return e?o(e):a()},[a,o]);N(()=>()=>{se()},[se]);let{camera:ce,requestCamera:le}=Gh(),{isCamMuted:ue}=wy(),de=ce.isGranted&&!ue;N(()=>{te&&t===`joined-meeting`&&(JL.value=de)},[te,t,de]);let fe=P(te&&!s&&JL.value===!0);N(()=>{t===`joined-meeting`&&fe.current&&(fe.current=!1,le())},[t,le]),N(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),N(()=>{let e=()=>{let e=l.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;d(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let pe=I(()=>{let e=l.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);I(()=>{m(e=>!e)},[]);let me=I(()=>{se()},[se]);if(BL({active:!A&&t===`joined-meeting`,onTimeout:me}),HL({onShutdown:me}),!T)return null;if(A)return R(ib,{defaultOpen:!0,children:R(`div`,{class:`cvi-call-surface absolute inset-0`,children:R(cb,{docked:!0,headerAction:R(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:me,"aria-label":`Leave conversation`,children:R(hv,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let he=[R(Xy,{compact:!0},`screen-share`)];ne&&he.push(R(ob,{compact:!0},`chat`));let ge=t===`left-meeting`;return R($y,{children:R(ib,{children:R(Ny,{children:[R(`div`,{class:`cvi-call-surface absolute inset-0${O?``:` cvi-video-surface`}`,style:`--cvi-status-strip: ${y===null?0:y+8}px`,ref:C,children:[R(`div`,{class:`relative w-full h-full z-[5]`,children:[R(rR,{isAudioOnly:O,presence:k,canvasLayoutEffect:h,canvasRenderedSlot:_}),!O&&R(tR,{canvasRenderedSlot:_}),R(pL,{debugEnabled:p,callPresence:k,callControlsVisible:D,callControlsRect:ee,gridConfigEnabled:x.magic_grid,gridStartEnabled:E,onLayoutEffectChange:g,onRenderedSlotChange:v,onStatusStripChange:b}),!f&&R(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":ge,"data-pinned":S,children:R(fb,{active:u,onToggle:pe,nudge:S,compact:!0})})]}),R(cb,{}),R(nb,{}),R(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":ge,"aria-hidden":ge,children:R(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":ge,ref:w,children:[R(Gy,{level:!0}),!O&&R(qy,{}),re&&R(tb,{}),R(sR,{items:he}),R(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:me,"aria-label":`Leave call`,children:R(hv,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),j&&Ep(R(Cb,{onLeave:me}),j.document.body)]})})})});function lR(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function uR(e,t,n){switch(t){case`granted`:return n?e?.cameraOptional??`Camera is optional — turn it on anytime.`:e?.ready??`You're all set — join whenever you're ready.`;case`blocked`:return e?.denied??`Microphone is blocked. Click the mic to see how to allow it.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;case`prompt`:return e?.prompt??`Allow microphone access to join.`;default:return e?.loading??`Getting your microphone ready...`}}var dR=fp(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=Xf(),{config:a}=jh(),{cameraOnStart:o}=L(_t),{localSessionId:s,isCamMuted:c}=wy(),{mic:l,camera:u,requestMic:d,requestCamera:f}=Gh(),p=a.value.customization.conversation.modality===`video`,m=Tv(a.value),h=wv(a.value);N(()=>{d()},[]);let g=l.isGranted,_=P(!1);N(()=>{p&&o!==`off`&&g&&!_.current&&(u.isGranted||u.isBlocked||(_.current=!0,f()))},[p,o,g,u.isGranted,u.isBlocked,f]);let v=p&&g&&!u.isGranted,y=uR(e,l.status,v);return R(Ny,{children:R(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[u.isGranted&&!c?R(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:R(Sy,{type:`video`,sessionId:s??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):R(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[R(zv,{variant:m.background,replica:h}),R(`div`,{class:`${uy} backdrop-blur-xs`})]}),R(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[y&&R(ty,{message:y,class:`relative`}),R(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[R(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[R(Gy,{level:!0}),p&&R(qy,{})]}),R(Uv,{class:`btn-accent `,loading:t,disabled:!g,onClick:n,children:e?.join??`Join`}),R(`button`,{type:`button`,class:`btn btn-control ${l.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:R(hv,{name:`cancel`})})]})]})]})})}),fR=`Password required`,pR=`Enter the password to start this conversation.`,mR=`Password`,hR=`Continue`;function gR(e){let[t,n]=M(Date.now);return N(()=>{if(e===void 0)return;let t=()=>{let t=Date.now();n(t),t>=e&&clearInterval(r)},r=setInterval(t,1e3);return t(),()=>clearInterval(r)},[e]),e===void 0?0:Math.max(0,Math.ceil((e-t)/1e3))}function _R(e){return`${Math.floor(e/60)}:${String(e%60).padStart(2,`0`)}`}function vR({onSubmit:e,onCancel:t,text:n,isSubmitting:r=!1,errorMessage:i,retryAt:a}){let[o,s]=M(``),c=Ze(),l=P(null);N(()=>l.current?.focus(),[]);let u=gR(a),d=u>0;return R(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${c}-title`,children:R(`form`,{onSubmit:t=>{t.preventDefault();let n=o.trim();!n||r||d||e(n)},onKeyDown:e=>{e.key===`Escape`&&t&&(e.preventDefault(),t())},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:R(`div`,{class:`card-body gap-3`,children:[R(`h3`,{id:`${c}-title`,class:`card-title text-base-content`,children:n?.title??fR}),R(`p`,{class:`text-sm text-base-content/70`,children:n?.description??pR}),R(`input`,{ref:l,id:c,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:n?.placeholder??mR,value:o,disabled:r,onInput:e=>s(e.target.value)}),i&&R(`p`,{class:`text-error text-xs`,role:`alert`,children:i}),R(Uv,{class:`btn-primary`,type:`submit`,disabled:!o.trim()||d,loading:r,children:d?`Try again in ${_R(u)}`:n?.submit??hR}),t&&R(`button`,{type:`button`,class:`btn btn-ghost`,onClick:t,children:`Cancel`})]})})})}function yR({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=jh(),o=$v()===`full-screen`,s=L(Sm),c=s?.passwordRequest??null,l=Tv(i.value),u=l.btn_title??e?.fallback_button??`Start the conversation`,d=i.value.customization.terms_content?.trim()??``,f=i.value.customization.terms_enabled===!0,p=d.length>0,m=p&&f,h=F(()=>m&&jm(a,d),[m,a,d]),g=m&&!h,_=Ze(),[v,y]=M(h),b=n||m&&!v;return R(fy,{title:l.title,description:l.description,overlay:c&&s?R(vR,{onSubmit:s.submitPassword,onCancel:s.dismissPasswordRequest,errorMessage:c.reason===`rejected`?`That password didn't work.`:void 0,retryAt:c.retryAt??void 0}):null,children:[R(`div`,{class:`relative`,children:[r&&R(ty,{message:ey(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),R(hy,{onClick:()=>{m&&v&&!h&&Pm(a,d),t()},disabled:b,loading:n,children:u})]}),p&&R(`div`,{class:`max-w-xs text-center`,children:g?R(`label`,{for:_,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[R(`input`,{id:_,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:v,onChange:e=>y(e.target.checked)}),R(`span`,{class:`leading-snug`,children:d})]}):R(`p`,{class:`text-xs leading-snug text-white/70`,children:d})})]})}function bR(...e){for(let t of e){let e=t?.trim();if(e)return e}}function xR(){let{config:e}=jh(),{haircheck:t}=e.value.customization;return F(()=>({prompt:bR(t.permission_request_description,t.permission_request_title),ready:bR(t.permission_granted_description,t.permission_granted_title),denied:bR(t.permission_denied_description,t.permission_denied_title),join:bR(t.join_button),cancel:bR(t.cancel_btn)}),[t])}function SR({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=xR();switch(e.state){case`idle`:return R(yR,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return R(dR,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return R(cR,{onLeave:()=>e.leave()});case`ended`:return R(by,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return R(Yv,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,isStarting:e.isStarting,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}function CR(){let{config:e,configError:t}=jh(),n=Qv(),r=Xv(),i=F(()=>({fallback_button:n.start_button}),[n.start_button]),a=e.value.is_available,o=e.value.unavailable_reason;return R(i_,{children:t.value?R(Yv,{cause:`error`,canRetry:!1,onRetry:()=>{}}):a===!1?R(Yv,{cause:o??`daily_limit`,canRetry:!1,onRetry:()=>{}}):R(SR,{flow:r,welcomeText:i})})}var wR=`:host {
|
|
167
|
+
- "app": Tool callable by the app from this server only`),csp:gk().optional(),permissions:gk().optional()}),X({mimeTypes:Y(J()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var JN=X({method:Z(`ui/download-file`),params:X({contents:Y(vk([SM,CM])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),YN=X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(wM).describe(`Message content blocks (text, image, etc.).`)})});X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:J().describe(`HTML content to load into the inner iframe.`),sandbox:J().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:FN.optional().describe(`CSP configuration from resource metadata.`),permissions:IN.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:NM.describe(`Standard MCP tool execution result.`)});var XN=X({toolInfo:X({id:$A.optional().describe(`JSON-RPC id of the tools/call request.`),tool:AM.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:AN.optional().describe(`Current color theme preference.`),styles:zN.optional().describe(`Style configuration for theming the app.`),displayMode:jN.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(jN).optional().describe(`Display modes the host supports.`),containerDimensions:vk([X({height:uk().describe(`Fixed container height in pixels.`)}),X({maxHeight:vk([uk(),pk()]).optional().describe(`Maximum container height in pixels.`)})]).and(vk([X({width:uk().describe(`Fixed container width in pixels.`)}),X({maxWidth:vk([uk(),pk()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
168
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:vk([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:fk().optional().describe(`Whether the device supports touch input.`),hover:fk().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:uk().describe(`Top safe area inset in pixels.`),right:uk().describe(`Right safe area inset in pixels.`),bottom:uk().describe(`Bottom safe area inset in pixels.`),left:uk().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();X({method:Z(`ui/notifications/host-context-changed`),params:XN.describe(`Partial context update containing only changed fields.`)});var ZN=X({method:Z(`ui/update-model-context`),params:X({content:Y(wM).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:xk(J(),hk().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),QN=X({method:Z(`ui/initialize`),params:X({appInfo:mj.describe(`App identification (name and version).`),appCapabilities:WN.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})});X({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:mj.describe(`Host application identification and version.`),hostCapabilities:UN.describe(`Features and capabilities provided by the host.`),hostContext:XN.describe(`Rich context about the host environment.`)}).passthrough();var $N=[kN],eP=class extends ON{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:LN,sandboxready:PN,initialized:GN,requestteardown:HN,loggingmessage:VM};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(QN,e=>this._oninitialize(e)),this.setRequestHandler(wj,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(KN,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(YN,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(NN,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(JN,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(KN,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(ZN,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(FM,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(YM,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(Zj,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler($j,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(rM,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(mM,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:$N.includes(t)?t:kN,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];tP(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},BN,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},NM,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},MM,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},NM,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(IM,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},Qj,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},eM,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},iM,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(aM,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},hM,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(DM,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function tP(e,t){return JSON.stringify(e)===JSON.stringify(t)}function nP(){let e=L(dg);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var rP={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},iP={composition:{stackedMaxAspect:1},classes:{widthCompactMaxPx:767,widthMediumMaxPx:1023,heightShortMaxPx:479},hysteresis:{windowMs:250,decisiveJumpPxDelta:200},rail:{widthPx:448,insetPx:16,gutterPx:24},sidecar:{minViewportWidthPx:900,maxVideoShiftPx:360,maxVideoShiftFraction:.3},card:{maxHeightPx:720,reportedHeightFloorPx:48,coldDefaultHeightPx:320,minDisplayScale:.85,layoutDefaultMinHeightPx:240,stackBandMaxFraction:.6,stackMaxWidthPx:600,componentOverrides:{}},content:{stackedAspect:16/9},replica:{maxAspect:16/9,landscapeMinAspect:1},pip:{gapPaddingPx:24,minWidthPx:128,maxAreaRatio:.35},motion:{layoutTransitionMs:560},insets:{callControlsBottomPx:72,participantsPadPx:16,cardsPadPx:16,surfacePadPx:16,compactCardsPadPx:8,compactSurfacePadPx:8},eviction:{policy:`evict-oldest`,maxVisibleCards:2,compactTakeoverMaxCards:1},degradationLadder:[`evict-cards`,`drop-self-view`,`collapse-replica`]};function aP(e,t){let n=Math.round(e.widthPx),r=Math.round(e.heightPx);return{width:n<=t.classes.widthCompactMaxPx?`compact`:n<=t.classes.widthMediumMaxPx?`medium`:`expanded`,height:r<=t.classes.heightShortMaxPx?`short`:`regular`,composition:n<=r*t.composition.stackedMaxAspect?`stacked`:`side-by-side`}}var oP={idle:{id:`idle`,regions:[]},"conversation-full":{id:`conversation-full`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-rail":{id:`canvas-rail`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{px:0},y:{px:0},width:{fraction:.62},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.38},y:{fraction:.72},width:{fraction:.2},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-stack":{id:`canvas-stack`,soloVariant:`canvas-solo`,regions:[{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.38},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"canvas-kiosk-overlay":{id:`canvas-kiosk-overlay`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:.6},width:{fraction:1},height:{fraction:.4},accepts:[`card`],zBase:100,sheetAnchor:`bottom`},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:110}]},"canvas-sheet":{id:`canvas-sheet`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.55},accepts:[`replica`],zBase:0},{name:`canvasSheet`,x:{fraction:0},y:{fraction:.55},width:{fraction:1},height:{fraction:.45},accepts:[`card`],zBase:10},{name:`pip`,x:{fraction:.66},y:{fraction:.33},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-columns":{id:`content-columns`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.25},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.25},y:{fraction:0},width:{fraction:.75},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-columns-compact":{id:`content-columns-compact`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-sheet-columns":{id:`content-sheet-columns`,soloVariant:`content-sheet-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`content`],zBase:0},{name:`cardSheet`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:110}]},"content-stack":{id:`content-stack`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.74},width:{fraction:.24},height:{fraction:.22},accepts:[`selfView`],zBase:100}]},"content-stack-compact":{id:`content-stack-compact`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-sheet-compact":{id:`content-sheet-compact`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:110}]},"content-rail":{id:`content-rail`,soloVariant:`content-rail-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.22},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.22},y:{fraction:0},width:{fraction:.48},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-stack-canvas":{id:`content-stack-canvas`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.5},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.5},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.72},width:{fraction:1},height:{fraction:.28},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.52},width:{fraction:.24},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns":{id:`canvas-takeover-columns`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.24},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:.24},y:{fraction:0},width:{fraction:.76},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns-compact":{id:`canvas-takeover-columns-compact`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:1/3},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:1/3},y:{fraction:0},width:{fraction:2/3},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:.22},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.04},width:{fraction:.3},height:{fraction:.16},accepts:[`selfView`],zBase:100}]},"canvas-solo":{id:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-solo":{id:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0}]},"content-rail-solo":{id:`content-rail-solo`,regions:[{name:`contentStage`,x:{px:0},y:{px:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-sheet-solo":{id:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:10}]}},sP={idle:{compact:{short:`idle`,regular:`idle`},medium:{short:`idle`,regular:`idle`},expanded:{short:`idle`,regular:`idle`}},conversation:{compact:{short:`conversation-full`,regular:`conversation-full`},medium:{short:`conversation-full`,regular:`conversation-full`},expanded:{short:`conversation-full`,regular:`conversation-full`}},"conversation-canvas":{compact:{short:`canvas-sheet`,regular:`canvas-sheet`},medium:{short:`canvas-rail`,regular:`canvas-stack`},expanded:{short:`canvas-rail`,regular:`canvas-rail`}},"content-focus":{compact:{short:`content-stack-compact`,regular:`content-stack-compact`},medium:{short:`content-columns`,regular:`content-stack`},expanded:{short:`content-columns`,regular:`content-columns`}},"content-plus-canvas":{compact:{short:`content-sheet-compact`,regular:`content-sheet-compact`},medium:{short:`content-rail`,regular:`content-stack-canvas`},expanded:{short:`content-rail`,regular:`content-rail`}},"canvas-dominant":{compact:{short:`canvas-takeover-strip`,regular:`canvas-takeover-strip`},medium:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`},expanded:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`}}},cP={idle:{compact:{stacked:`idle`,"side-by-side":`idle`},medium:{stacked:`idle`,"side-by-side":`idle`},expanded:{stacked:`idle`,"side-by-side":`idle`}},conversation:{compact:{stacked:`conversation-full`,"side-by-side":`conversation-full`},medium:{stacked:`conversation-full`,"side-by-side":`conversation-full`},expanded:{stacked:`conversation-full`,"side-by-side":`conversation-full`}},"conversation-canvas":{compact:{stacked:`canvas-sheet`,"side-by-side":`canvas-sheet`},medium:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`},expanded:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`}},"content-focus":{compact:{stacked:`content-stack-compact`,"side-by-side":`content-columns-compact`},medium:{stacked:`content-stack`,"side-by-side":`content-columns`},expanded:{stacked:`content-stack`,"side-by-side":`content-columns`}},"content-plus-canvas":{compact:{stacked:`content-sheet-compact`,"side-by-side":`content-sheet-columns`},medium:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`},expanded:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`}},"canvas-dominant":{compact:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns-compact`},medium:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`},expanded:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`}}};function lP(e,t,n=oP,r=sP,i=!0,a=!1){let o=a&&r===sP&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===sP?cP[e][t.width][t.composition]:r[e][t.width][t.height],s=n[o];if(!s)throw Error(`Template matrix references missing template id: ${o}`);if(!i&&s.soloVariant!==void 0){let e=n[s.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${s.soloVariant}`);return e}return s}function uP(e,t,n){let r=[],{prefs:i}=e,a=e.userShare?`userShare`:e.presentation?`presentation`:null,o=e.cards.length>0,s=t.width===`compact`;return i.pipCorner!==void 0&&s&&r.push(`pipCorner`),a===null?(i.expandCanvas&&!o&&r.push(`expandCanvas`),o&&(i.expandCanvas||s)?{state:`canvas-dominant`,suppressedPrefs:r,contentKind:null}:o?{state:`conversation-canvas`,suppressedPrefs:r,contentKind:null}:e.replica||e.selfView?{state:`conversation`,suppressedPrefs:r,contentKind:null}:{state:`idle`,suppressedPrefs:r,contentKind:null}):(i.expandCanvas&&r.push(`expandCanvas`),{state:o?`content-plus-canvas`:`content-focus`,suppressedPrefs:r,contentKind:a})}var dP={alert:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:e=>e.charCount===void 0?120:Math.min(400,Math.round(90+e.charCount*.26))},input:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:()=>182},question:{minWidthPx:240,sizeClass:e=>{let t=e.optionCount??4;return t<=2?`S`:t>=10?`L`:`M`},estimateHeightPx:e=>{let t=e.optionCount??4;return 72+t*48+(t-1)*8+64}},text:{minWidthPx:220,sizeClass:e=>(e.charCount??400)>1500?`L`:`M`,estimateHeightPx:e=>{let t=e.charCount??400,n=Math.max(1,e.widthPx/8);return Math.max(100,Math.round(t/n*22+40))}},chart:{minWidthPx:260,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round(e.widthPx*(260/480))+90},calendar:{minWidthPx:320,sizeClass:e=>e.slotCount===void 0?`M`:`L`,estimateHeightPx:e=>e.slotCount===void 0?470:64+e.slotCount*48},image:{minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round((Math.min(e.widthPx,520)-36)*(9/16))+95+((e.imageCount??1)>1?44:0)},scheduling_embed:{minWidthPx:320,hardMinHeightPx:640,sizeClass:()=>`L`,estimateHeightPx:()=>640}},fP={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},pP=`canvas.`;function mP(e){return e.startsWith(pP)?e.slice(7):e}function hP(e,t){let n=mP(e),r=dP[n]??fP,i=t?.[n]??t?.[e];return i===void 0?r:{...r,minWidthPx:i.minWidthPx??r.minWidthPx,...i.hardMinHeightPx===void 0?r.hardMinHeightPx===void 0?{}:{hardMinHeightPx:r.hardMinHeightPx}:{hardMinHeightPx:i.hardMinHeightPx}}}Object.keys(dP);function gP(e,t,n){let r=hP(e,n),i=(t.naturalHeightPx!==void 0&&Number.isFinite(t.naturalHeightPx)?t.naturalHeightPx:void 0)??r.estimateHeightPx(t),a=r.hardMinHeightPx===void 0?i:Math.max(r.hardMinHeightPx,i);return{sizeClass:r.sizeClass(t),minWidthPx:r.minWidthPx,naturalHeightPx:Math.round(a),hardMinHeightPx:r.hardMinHeightPx}}function _P(e,t){let n=mP(e);return dP[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:hP(e,t).hardMinHeightPx}function vP(e,t){return hP(e,t).minWidthPx}function yP(e,t){let n=Number.isFinite(e)?e:t.card.coldDefaultHeightPx;return Math.min(t.card.maxHeightPx,Math.max(t.card.reportedHeightFloorPx,Math.round(n)))}function bP(e,t,n){if(t>=e)return{kind:`natural`};if(t<=0||e<=0)return{kind:`scroll`};let r=t/e;return r>=n.card.minDisplayScale?{kind:`scaled`,factor:r}:{kind:`scroll`}}function xP(e,t){return e.width>0&&e.height>0&&t.width>0&&t.height>0&&e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height}function SP(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function CP(e,t,n,r){let i=[],a=e.find(e=>e.kind===`replica`),o=e=>e.kind===`selfView`&&e.layer===`overlay`&&a!==void 0&&SP(a.rect,e.rect),s=e=>e.kind===`card`&&e.layer===`overlay`&&e.sheet===!0;for(let r of e){let e=r.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||i.push({kind:`bounds`,tileId:r.id,message:`${r.id} has non-integer coordinates`}),(e.x<0||e.y<0||e.width<0||e.height<0||e.x+e.width>t.width||e.y+e.height>t.height)&&i.push({kind:`bounds`,tileId:r.id,message:`${r.id} rect exceeds the container`}),r.layer===`overlay`&&r.kind!==`selfView`&&!s(r)&&i.push({kind:`overlay-legality`,tileId:r.id,message:`only selfView or a sheet card may ride the overlay layer, got ${r.kind}`}),r.kind===`selfView`&&r.layer===`overlay`&&a!==void 0&&!SP(a.rect,r.rect)&&i.push({kind:`overlay-legality`,tileId:r.id,message:`selfView escapes the replica rect`}),(r.kind===`content`||r.kind===`replica`)&&(e.width<48||e.height<48)&&i.push({kind:`degenerate-surface`,tileId:r.id,message:`${r.kind} tile ${r.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),r.kind===`card`){r.fit.kind===`scaled`&&(r.fit.factor<n.card.minDisplayScale||r.fit.factor>1)&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} scaled to ${r.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=r.component===void 0?void 0:_P(r.component,n.card.componentOverrides);t!==void 0&&e.height<t&&r.fit.kind!==`scroll`&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.height}px is below its ${t}px hard min without scroll`});let a=r.component===void 0?void 0:vP(r.component,n.card.componentOverrides);a!==void 0&&e.width<a&&i.push({kind:`min-content`,tileId:r.id,message:`card ${r.id} box ${e.width}px is below its ${a}px min width`})}}for(let t of e)if(t.kind===`content`||t.kind===`card`)for(let n of e)n.id!==t.id&&xP(t.rect,n.rect)&&(!o(n)||s(t))&&(!s(n)||s(t))&&(s(t)&&n.layer===`grid`||i.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));if(r!=null)for(let t of e)(t.kind===`card`||t.kind===`content`)&&xP(t.rect,r)&&i.push({kind:`status-strip-clear`,tileId:t.id,message:`${t.kind} tile ${t.id} sits under the reserved status strip`});return i}var wP=(e,t,n)=>Math.min(n,Math.max(t,e));function TP(e,t){let n=t===`compact`;return{surfacePad:Math.round(n?e.insets.compactSurfacePadPx:e.insets.surfacePadPx),cardsPad:Math.round(n?e.insets.compactCardsPadPx:e.insets.cardsPadPx)}}function EP(e,t,n){let r=Math.round(e.rail.widthPx);return n>0?Math.max(0,r-TP(e,t).cardsPad):r}function DP(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function OP(e,t,n){let r=[...e].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),i=Math.floor(t);return r.length<=i?r:n===`evict-newest`?r.slice(0,i):r.slice(r.length-i)}function kP(e,t,n,r,i,a){let o=TP(n,r).cardsPad,{left:s,right:c}=i??{left:o,right:o},l=Math.round(a??n.rail.widthPx),u=Math.max(1,Math.min(t-s-c,l-s-c));return{innerW:u,entries:e.map(e=>{let t=gP(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:u,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:yP(t.naturalHeightPx,n)}})}}var AP=e=>e.accepts.includes(`replica`)&&e.accepts.includes(`selfView`);function jP(e,t,n,r,i){let a=(e,t)=>Math.abs(e-t)<=1,o=e.x+e.width,s=(e,r,i)=>n>0&&a(e,r)||t.some(t=>AP(t.region)&&a(i(t.rect),e));return{left:s(e.x,n,e=>e.x+e.width)?0:i,right:s(o,r-n,e=>e.x)?0:i}}function MP(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function NP(e,t,n,r){return e.name!==`rail`||`fraction`in t?t:r===`width`?{px:n.rail.widthPx}:{px:t.px<0?-n.rail.widthPx:t.px}}function PP(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>MP(n===`x`?e.x:e.y,o)-MP(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?NP(e,e.width,r,`width`):e.height),l=0,u=0;for(let e of c)`px`in e?l+=e.px:u+=e.fraction;let d=Math.max(0,o-l),f=c.map(e=>`px`in e?e.px:u>0?e.fraction/u*d:0);if(n===`y`&&i!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`card`)&&`fraction`in(c[t]??e.height));if(e!==-1){let t=f[e]??0,n=i.shrinkToContent?Math.min(i.neededPx,Math.max(t,i.capPx)):wP(i.neededPx,t,Math.max(t,i.capPx)),r=0,a=0;c.forEach((t,n)=>{n!==e&&(`px`in t?r+=t.px:a+=f[n]??0)});let s=Math.max(0,o-r-n);f=f.map((t,r)=>{if(r===e)return n;let i=c[r];return i!==void 0&&`px`in i?t:a>0?t/a*s:0})}}if(n===`y`&&a!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`content`)&&`fraction`in(c[t]??e.height)),t=s.findIndex((e,t)=>e.accepts.includes(`replica`)&&`fraction`in(c[t]??e.height));if(e!==-1&&t!==-1){let n=(f[e]??0)-a.maxPx;n>0&&(f[e]=a.maxPx,f[t]=(f[t]??0)+n)}}let p=s.map(e=>e.accepts.includes(`content`)||e.accepts.includes(`replica`)?48:0),m=p.reduce((e,t)=>e+t,0),h=m>o?o/m:1,g=f.map((e,t)=>Math.max(e,(p[t]??0)*h));if(g.reduce((e,t)=>e+t,0)>o){let e=g.map((e,t)=>e-(p[t]??0)*h),t=e.reduce((e,t)=>e+t,0),n=Math.max(0,o-m*h),r=t>0?n/t:0;f=g.map((t,n)=>(p[n]??0)*h+(e[n]??0)*r)}else f=g;let _=[0],v=0;for(let e of f)v+=e,_.push(wP(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,o=_[r+1]??i;if(n===`y`&&a!==void 0&&e.accepts.includes(`replica`)){let e=r>0?a.replicaGapPx:0,t=r<s.length-1?a.replicaGapPx:0;o-i-e-t>=48&&(i+=e,o-=t)}return{region:e,rect:n===`x`?{x:i,y:0,width:o-i,height:t.height}:{x:0,y:i,width:t.width,height:o-i}}})}function FP(e,t,n){let r=t.width,i=t.height,a=NP(e,e.width,n,`width`),o=NP(e,e.x,n,`x`),s=wP(Math.round(MP(o,r)),0,r),c=wP(Math.round(MP(e.y,i)),0,i);return{x:s,y:c,width:wP(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:wP(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function IP(e,t,n,r,i){let a=e.regions.filter(e=>e.zBase<100),o=e=>`fraction`in e&&e.fraction===1;return a.length>1&&a.every(e=>o(e.height))?PP(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?PP(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:FP(e,t,n)}))}function LP(e,t,n,r,i,a,o,s,c,l,u){if(n!==null)return;let d=e.regions.filter(e=>e.zBase<100);if(!(d.length>1&&d.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let f=d.find(e=>e.accepts.includes(`card`)&&`fraction`in e.height);if(f===void 0||r.cards.length===0)return;let{innerW:p,entries:m}=kP(OP(r.cards,u,c.eviction.policy),i.width,c,l,s>0?{left:0,right:0}:void 0,c.card.stackMaxWidthPx),h=m.reduce((e,t)=>t.constraints.minWidthPx>p?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:g}=TP(c,l),_=MP(f.y,i.height),v=d.every(e=>MP(e.y,i.height)<=_)?Math.max(0,o-s):0,y=h>0;return{neededPx:h+2*g+v,capPx:Math.round(c.card.stackBandMaxFraction*a.height),...y&&{shrinkToContent:y}}}function RP(e,t,n,r,i){if(t===null)return;let a=e.regions.filter(e=>e.zBase<100);if(!(a.length>1&&a.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let o=a.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),s=a.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!o||!s)return;let c=i.content.stackedAspect;if(!(!Number.isFinite(c)||c<=0))return{maxPx:Math.round(n.width/c),replicaGapPx:r}}var zP=`bottom-left`;function BP(e,t,n){let r=e.statusStrip;if(r===void 0)return null;let i=wP(Math.round(r.heightPx??48),0,160),a=e.callControlsRect,o=Math.min(Math.max(Math.round(a?.width??0),448),t.width-32);if(i<=0||o<=0)return null;let s=a===void 0?t.width/2:a.x+a.width/2;return{x:wP(Math.round(s-o/2),16,t.width-16-o),y:Math.round(Math.min(n,a?.y??n))-8-i,width:o,height:i}}function VP(e,t,n,r,i,a){return e.x<0||e.width<=0||e.height<=0||e.x+e.width>n.width||e.y+e.height>n.height||e.y<48?!1:t.every(e=>r&&e.region.accepts.includes(`content`)?e.rect.height>=48:i&&e.region.accepts.includes(`card`)?e.rect.height>=a.card.reportedHeightFloorPx:!0)}var HP=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x;function UP(e,t,n){return t===null||!HP(e.rect,t)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,n-e.rect.y))}}}function WP(e,t,n,r,i){let a=t.endsWith(`right`)?e.x+e.width-n-r:e.x+n,o=t.startsWith(`bottom`)?e.y+e.height-n-i:e.y+n;return{x:Math.round(a),y:Math.round(o),width:r,height:i}}function GP(e,t,n){let{maxAspect:r,landscapeMinAspect:i}=n.replica;if(e.width-e.height*r>1){let t=Math.max(Math.min(48,e.width),Math.round(e.height*r));return{...e,x:e.x+Math.round((e.width-t)/2),width:t}}if(t&&e.height-e.width/i>1){let t=Math.max(Math.min(48,e.height),Math.round(e.width/i));return{...e,y:e.y+Math.round((e.height-t)/2),height:t}}return e}function KP(e,t,n,r){let i=Math.max(n.pip.minWidthPx,Math.round(e.width*.25)),a=r?e.height-t:Math.round((e.height-t)*16/9),o=Math.min(i,e.width-t,a),s=r?o:Math.round(o*9/16);return o<n.pip.minWidthPx||o<=0||s<=0?null:{w:o,h:s}}function qP(e,t,n){return t===null||!xP(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function JP(e){if(typeof e!=`object`||!e)return!1;let t=e;return[`x`,`y`,`width`,`height`].every(e=>typeof t[e]==`number`&&Number.isFinite(t[e]))}function YP(e,t,n){let r=e;for(let e of t.filter(JP).sort((e,t)=>t.y-e.y))r=qP(r,e,n);return r}function XP(e,t,n){if(t<=0)return e;let r=Math.min(t,e.length);return n===`evict-newest`?e.slice(0,e.length-r):e.slice(r)}function ZP(e,t,n,r,i,a){let o=n.callControls===!0?Math.round(a.insets.callControlsBottomPx):0,s=i.height-o,c=n.selfView&&n.prefs.hideSelfView!==!0,l=n.replica||c,u=e.regions.some(e=>e.zBase<100&&e.accepts.includes(`card`)),d=+!!l+(t.contentKind===null?0:1)+(n.cards.length>0&&u?1:0)>=2?TP(a,r.width).surfacePad:0,f={width:Math.max(0,i.width-2*d),height:Math.max(0,i.height-2*d)},p=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null),m=LP(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,DP(t.state,r,a)),h=RP(e,t.contentKind,f,d,a),g=IP(e,f,{...a,rail:{...a.rail,widthPx:EP(a,r.width,d)}},m,h).map(e=>({...e,rect:{...e.rect,x:e.rect.x+d,y:e.rect.y+d}})),_=t.contentKind!==null,v=e=>g.map(t=>{let n=t.region.accepts.includes(`card`);if(!n&&!(_&&t.region.accepts.includes(`content`)))return t;let r=n?UP(t,p,s):t;return e===null?r:UP(r,e,e.y-8)}),y=BP(n,i,s),b=v(y);return y!==null&&!VP(y,b,i,_,n.cards.length>0,a)&&(y=null,b=v(null)),{regions:b,surfacePad:d,controlsInset:o,bandTopY:s,statusStrip:y}}function QP(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u,statusStrip:d}=ZP(t,e,n,r,i,a),f=n.statusStrip!==void 0,p=s.find(e=>e.region.accepts.includes(`replica`)),m=s.find(e=>e.region.accepts.includes(`content`)),h=s.find(e=>e.region.accepts.includes(`card`)),g=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),_=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`card`)),v=Math.round(a.rail.gutterPx),y=Math.round(a.pip.gapPaddingPx),b=(r.composition??aP({widthPx:i.width,heightPx:i.height},a).composition)===`side-by-side`,x=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),S=DP(e.state,r,a),C=h?OP(n.cards,S,a.eviction.policy):_===void 0?[]:OP(n.cards,1,a.eviction.policy),w=S=>{let w={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1,...f&&{statusStripDropped:d===null}},T=[],E=null,D=!1,ee=p!==void 0&&p.region.accepts.includes(`selfView`);if(p&&ee&&(n.replica||o)){let e=p.rect,t=o&&!S.selfViewDropped;o&&S.selfViewDropped&&(w.selfViewDropped=!0);let r=+!!n.replica+ +!!t,s=Math.round(a.insets.participantsPadPx),l=e.x<=c+1?0:s,u=e.x+e.width>=i.width-c-1?0:s,d=Math.max(1,e.width-l-u),f=d,m=Math.round(f*9/16),h=e=>r*e+(r-1)*s;h(m)>e.height&&(m=Math.max(1,Math.floor((e.height-(r-1)*s)/r)),f=Math.min(d,Math.round(m*16/9))),m=Math.max(m,Math.min(48,e.height)),f=Math.max(f,Math.min(48,e.width));let g=e.x+l+Math.round((d-f)/2),_=e.y+Math.round((e.height-h(m))/2);if(n.replica){let e={x:g,y:_,width:f,height:m};if(S.replicaCollapsed){let t=Math.min(m,Math.max(64,Math.round(m*.25)));e={...e,height:t},w.replicaCollapsed=!0}e=GP(e,b,a),E={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name},T.push(E),_+=m+s}t&&(T.push({id:`selfView`,kind:`selfView`,rect:{x:g,y:_,width:f,height:m},layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name}),D=!0)}else if(p&&(n.replica||o)){let e=!n.replica,t=p.rect;if(!e&&S.replicaCollapsed){let e=Math.min(t.height,Math.max(64,Math.round(t.height*.25)));t={...t,height:e},w.replicaCollapsed=!0}e||(t=GP(t,b,a));let r={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:t,layer:`grid`,order:p.region.zBase,fit:{kind:`natural`},region:p.region.name};T.push(r),e?D=!0:E=r}e.contentKind!==null&&m&&T.push({id:`content`,kind:`content`,rect:m.rect,layer:`grid`,order:m.region.zBase,fit:{kind:`natural`},region:m.region.name});let O=XP(C,S.extraEvictions,a.eviction.policy),k=new Set(O.map(e=>e.id));if(w.evictedCardIds=x.filter(e=>!k.has(e.id)).map(e=>e.id),h&&O.length>0){let n=h.rect,o=t.regions.filter(e=>e.zBase<100),l=o.length>1&&o.every(e=>`fraction`in e.width&&e.width.fraction===1),u=jP(n,s,c,i.width,TP(a,r.width).cardsPad),{innerW:d,entries:f}=kP(O,n.width,a,r.width,u,l||e.state===`canvas-dominant`&&o.length>1?a.card.stackMaxWidthPx:EP(a,r.width,c)),p=n.x+u.left+Math.round((n.width-u.left-u.right-d)/2),m=n.height-v*(f.length-1),g=f.reduce((e,t)=>e+t.clampedHeightPx,0),_;if(g<=m)_=f.map(e=>e.clampedHeightPx);else{let e=m>0?m/g:0;_=f.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=_.reduce((e,t)=>e+t,0)-Math.max(0,m);for(;t>0;){let e=-1;for(let t=0;t<_.length;t++){let n=_[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(_[e]??0))&&(e=t)}if(e===-1)break;_[e]=(_[e]??0)-1,--t}}let y=_.reduce((e,t)=>e+t,0)+v*(f.length-1),b=n.y+Math.max(0,Math.round((n.height-y)/2));f.forEach((e,t)=>{let r=Math.min(b,n.y+n.height),i=Math.max(0,Math.min(_[t]??0,n.y+n.height-r)),o=bP(e.clampedHeightPx,i,a),s=e.constraints.hardMinHeightPx;s!==void 0&&i<s&&o.kind!==`scroll`&&(o={kind:`scroll`}),T.push({id:e.card.id,kind:`card`,component:e.card.component,cardSizeClass:e.constraints.sizeClass,rect:{x:p,y:r,width:d,height:i},layer:`grid`,order:h.region.zBase+t,fit:o,region:h.region.name}),b=r+i+v})}let A=null;if(h===void 0&&_!==void 0&&O.length>0){let e={width:Math.max(0,i.width-2*c),height:Math.max(0,i.height-2*c)},t=FP(_,e,a),o=_.sheetAnchor===`bottom`,s=TP(a,r.width).cardsPad,l=o?Math.min(u,n.callControlsRect?.y??u)-s:u,f=t.x+c,p=d!==null&&HP({...t,x:f},d)?d.y-8:l,m=Math.min(l,p),h={x:f,y:t.y+c,width:t.width,height:Math.max(0,Math.min(t.height,m-(t.y+c)))},{innerW:g,entries:v}=kP(O,h.width,a,r.width,o?{left:s,right:s}:{left:0,right:0},a.card.stackMaxWidthPx),y=v[0];if(y!==void 0){let e=h.x+Math.round((h.width-g)/2),t=Math.max(0,Math.min(y.clampedHeightPx,h.height)),n=bP(y.clampedHeightPx,t,a);o&&y.constraints.naturalHeightPx>t&&(n={kind:`scroll`});let r=y.constraints.hardMinHeightPx;r!==void 0&&t<r&&n.kind!==`scroll`&&(n={kind:`scroll`}),A={id:y.card.id,kind:`card`,component:y.card.component,cardSizeClass:y.constraints.sizeClass,rect:{x:e,y:o?h.y+h.height-t:h.y,width:g,height:t},layer:`overlay`,order:_.zBase,fit:n,region:_.name,sheet:!0,...o&&{sheetAnchor:`bottom`}},T.push(A)}}if(!D){if(o&&S.selfViewDropped)w.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?zP:n.prefs.pipCorner??`bottom-left`,o=n.callControlsVisible===!1?null:n.callControlsRect??(l>0?{x:0,y:u,width:i.width,height:l}:null),s=[...o===null?[]:[o],...A===null?[]:[A.rect],...d===null?[]:[d],...n.chromeObstacles??[]];if(E){let e=E.rect,n=KP(e,y,a,r.width===`compact`),i=n===null?null:WP(e,t,y,n.w,n.h),o=i===null?null:YP(i,s,y),c=n!==null&&o!==null&&o.y>=e.y&&n.w+y<=e.width&&n.h+y<=e.height,l=n!==null&&e.width>0&&e.height>0?n.w*n.h/(e.width*e.height):1/0;o!==null&&c&&l<=a.pip.maxAreaRatio?T.push({id:`selfView`,kind:`selfView`,rect:o,layer:`overlay`,order:g?.zBase??100,fit:{kind:`natural`},region:g?.name??`pip`}):w.selfViewDropped=!0}else{let e=a.pip.minWidthPx,n=r.width===`compact`?e:Math.round(e*9/16),o={x:0,y:0,width:i.width,height:i.height},c=YP(WP(o,t,y,e,n),s,y),l=c.y>=0&&e+y<=o.width&&n+y<=o.height,u=T.some(e=>(e.kind===`content`||e.kind===`card`)&&xP(e.rect,c));l&&!u?T.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:g?.zBase??100,fit:{kind:`natural`},region:g?.name??`pip`}):w.selfViewDropped=!0}}}return{tiles:T,degradations:w,statusStrip:d}},T={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},E=w(T),D=CP(E.tiles,i,a,d);for(let e of a.degradationLadder){if(D.length===0)break;if(e===`evict-cards`)for(;D.length>0&&T.extraEvictions<C.length;)T={...T,extraEvictions:T.extraEvictions+1},E=w(T),D=CP(E.tiles,i,a,d);else e===`drop-self-view`?E.tiles.some(e=>e.kind===`selfView`)&&(T={...T,selfViewDropped:!0},E=w(T),D=CP(E.tiles,i,a,d)):e===`collapse-replica`&&!T.replicaCollapsed&&E.tiles.some(e=>e.kind===`replica`)&&(T={...T,replicaCollapsed:!0},E=w(T),D=CP(E.tiles,i,a,d))}return E}function $P(e){if(e!==void 0&&e.length!==0)return{...oP,...Object.fromEntries(e.map(e=>[e.id,e]))}}function eF(e,t,n,r){let i=e.callControlsRect,a=i===void 0?e:{...e,callControlsRect:{x:Math.round(i.x),y:Math.round(i.y),width:Math.max(0,Math.round(i.width)),height:Math.max(0,Math.round(i.height))}},o={width:Math.max(0,Math.round(a.container.widthPx)),height:Math.max(0,Math.round(a.container.heightPx))},s=uP(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=lP(s.state,t,$P(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d,statusStrip:f}=QP(s,l,a,t,o,n);return{state:s.state,sizeClass:t,containerPx:o,templateId:l.id,tiles:u,...f!==null&&{statusStrip:f},degradations:d,suppressedPrefs:[...s.suppressedPrefs]}}var tF={compact:0,medium:1,expanded:2};function nF(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function rF(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(nF(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(tF[t.width]-tF[a.width]),s=e.lastResolution?.containerPx;return o>1||s===void 0||Math.max(Math.abs(Math.round(n.widthPx)-s.width),Math.abs(Math.round(n.heightPx)-s.height))>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&nF(e.pendingClass,t)?r-e.pendingSinceMs>=i.hysteresis.windowMs?{committedClass:t,pendingClass:null,pendingSinceMs:null}:{committedClass:a,pendingClass:e.pendingClass,pendingSinceMs:e.pendingSinceMs}:{committedClass:a,pendingClass:t,pendingSinceMs:r}}var iF=(e,t)=>e<t?-1:+(e>t);function aF(e,t){let n=new Map((e?.tiles??[]).map(e=>[e.id,e])),r=new Map(t.tiles.map(e=>[e.id,e])),i=[];for(let e of[...n.keys()].sort(iF))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(iF)){let t=n.get(e);if(t===void 0){a.push({type:`enter`,tileId:e});continue}let i=r.get(e);if(t.layer!==i.layer){o.push(i.layer===`overlay`?{type:`promote`,tileId:e,toLayer:i.layer}:{type:`demote`,tileId:e,toLayer:i.layer});continue}let c=t.rect.x!==i.rect.x||t.rect.y!==i.rect.y,l=t.rect.width!==i.rect.width||t.rect.height!==i.rect.height;c?s.push({type:`move`,tileId:e,from:t.rect,to:i.rect}):l&&s.push({type:`resize`,tileId:e,from:t.rect,to:i.rect})}return[...i,...a,...o,...s]}function oF(e,t,n,r,i){let a=rF(e,aP(t.container,r),t.container,n,r),o=eF(t,a.committedClass,r,i);return{resolution:o,transitions:aF(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var sF=`0.1.16`,cF=rP,lF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),uF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function dF(e,t){return lF||e===!0||t===!0}function fF(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function pF({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,reportedHeights:l}){return{kioskMode:e,container:{widthPx:n.width,heightPx:Math.round(Math.min(n.height,n.visualViewportHeight??n.height))},replica:r.hasPersonaVideo,selfView:r.hasSelfView,presentation:r.isPersonaPresenting?{}:null,userShare:r.isScreenSharing?{}:null,cards:t.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...l[e.id]===void 0?{}:{naturalHeightPx:l[e.id]}})),prefs:{},callControls:i>0,callControlsVisible:a??!0,...o===void 0?{}:{callControlsRect:o},...s===void 0?{}:{statusStrip:{id:s,...c===void 0?{}:{heightPx:c}}}}}var mF=16,hF=200,gF=Lt(null);function _F(e){gF.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),gF.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,hF))}function vF(){gF.peek()!==null&&(gF.value=null)}function yF({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,enabled:l}){let u=P(cF),d=P(null),[f,p]=M({}),[m,h]=M(null),g=I((e,t)=>{l&&p(n=>n[e]===t?n:{...n,[e]:t})},[l]);N(()=>{p(e=>{let n=new Set(t.map(e=>e.id)),r={};for(let[t,i]of Object.entries(e))n.has(t)&&(r[t]=i);return Object.keys(r).length===Object.keys(e).length?e:r})},[t]);let _=F(()=>pF({kioskMode:e,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,statusStripId:s,statusStripHeightPx:c,reportedHeights:f}),[e,t,n,r,i,a,o,s,c,f]);return N(()=>{if(!l||gF.peek()!==null)return;d.current===null&&(d.current=Date.now());let e=null,t=()=>{if(e=null,gF.peek()!==null)return;let n=Date.now()-(d.current??0),r;try{r=oF(u.current,_,n,iP)}catch(e){_F(e);return}if(u.current=r.nextState,h(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(mF,iP.hysteresis.windowMs-i+mF))}};return t(),()=>{e!==null&&clearTimeout(e)}},[l,_]),{resolution:l?m?.resolution??null:null,inputs:l?_:null,transitions:l?m?.transitions??[]:[],reportedHeights:f,recordNaturalHeight:g}}function bF(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function xF(e,t,n){return n?e===null?`no-presence`:t.hasPersonaVideo?e.degradations.evictedCardIds.length>0?`card-dropped`:e.tiles.some(e=>e.kind===`card`&&e.fit.kind===`scroll`&&!bF(e))?`card-overflow`:e.degradations.statusStripDropped===!0?`status-strip-dropped`:null:`no-persona-video`:`flag-off`}function SF(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!bF(e));return n===void 0?null:n.rect.y+n.rect.height}var CF={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function wF(e,t,n){if(e===null)return CF;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return CF;let i=t=>e.tiles.find(e=>e.kind===t)?.rect??null;return{driving:r,containerPx:e.containerPx,replica:r?i(`replica`):null,selfView:i(`selfView`),content:r?i(`content`):null,replicaCollapsed:r?e.degradations.replicaCollapsed:!1}}function TF(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function EF(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function DF(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var OF=`conversation.grid_status`,kF=6e4;function AF(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function jF(e,t){return{message_type:`conversation`,event_type:OF,conversation_id:e,properties:t}}function MF(e){let t=DF(e.sizeClass);return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,...t===void 0?{}:{composition:t},container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function NF(e){let{send:t,enabledVia:n,engineVersion:r=sF,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=kF}=e,s=i(),c=!1,l=!1,u,d=null,f=null,p=!1,m=null,h=0,g=0,_={},v=null,y=e=>{try{t(e)}catch{}},b=(e,t)=>({v:1,kind:e,engine_version:r,enabled_via:n,bail:t,...v}),x=e=>{f=null;let t=u;if(t!==void 0&&e===t)return;let n=i();t===null&&m!==null&&(h+=n-m,m=null),e===null?m=n:_[e]=(_[e]??0)+1,t!==void 0&&(g+=1),e===null&&!p?(p=!0,y({...b(`first_drive`,null),...t===void 0?{}:{prev_bail:t}})):t!==void 0&&y({...b(`transition`,e),prev_bail:t}),u=e},S=e=>{let t=i(),n=h+(m===null?0:t-m);y({...b(`summary`,u??d??null),driving_ms:Math.round(n),total_ms:Math.round(t-s),bail_counts:{..._},transitions:g,...e?{final:!0}:{}})},C=setInterval(()=>S(!1),o);return{update(e,t){if(c)return;t!==null&&(v=MF(t));let n=f===null?u:d;(n===void 0||e!==n)&&(d=e,f!==null&&clearTimeout(f),f=setTimeout(()=>x(e),a))},error(e){c||l||(l=!0,y({...b(`error`,`engine-error`),error:e}))},dispose(){c||(c=!0,clearInterval(C),f!==null&&(clearTimeout(f),x(d)),S(!0))}}}function PF({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=Xf(),o=Zf(),s=L(ah),c=P({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=P(null);N(()=>{if(!e)return;let n=NF({enabledVia:t,send:e=>{try{let t=c.current;if(!t.daily||t.meetingState!==`joined-meeting`)return;let n=t.conversation?.session.peek()?.conversationId;if(!n)return;t.daily.sendAppMessage(jF(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),N(()=>{l.current?.update(n,r)},[n,r]),N(()=>{i!==null&&l.current?.error(i)},[i])}var FF=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},IF=(e,t)=>({classGroupId:e,validator:t}),LF=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),RF=`-`,zF=[],BF=`arbitrary..`,VF=e=>{let t=WF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return UF(e);let n=e.split(RF);return HF(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?FF(i,t):t:i||zF}return n[e]||zF}}},HF=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=HF(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(RF):e.slice(t).join(RF),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},UF=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?BF+r:void 0})(),WF=e=>{let{theme:t,classGroups:n}=e;return GF(n,t)},GF=(e,t)=>{let n=LF();for(let r in e){let i=e[r];KF(i,n,r,t)}return n},KF=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];qF(i,t,n,r)}},qF=(e,t,n,r)=>{typeof e==`string`?JF(e,t,n):typeof e==`function`?YF(e,t,n,r):XF(e,t,n,r)},JF=(e,t,n)=>{let r=e===``?t:ZF(t,e);r.classGroupId=n},YF=(e,t,n,r)=>{QF(e)?KF(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(IF(n,e)))},XF=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];KF(o,ZF(t,a),n,r)}},ZF=(e,t)=>{let n=e,r=t.split(RF),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=LF(),n.nextPart.set(t,i)),n=i}return n},QF=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,$F=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},eI=`!`,tI=`:`,nI=[],rI=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),iI=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===tI){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(eI)?(c=s.slice(0,-1),l=!0):s.startsWith(eI)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return rI(t,l,c,u)};if(t){let e=t+tI,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):rI(nI,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},aI=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},oI=e=>({cache:$F(e.cacheSize),parseClassName:iI(e),sortModifiers:aI(e),postfixLookupClassGroupIds:sI(e),...VF(e)}),sI=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},cI=/\s+/,lI=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(cI),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+eI:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},uI=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=dI(n))&&(i&&(i+=` `),i+=r);return i},dI=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=dI(e[r]))&&(n&&(n+=` `),n+=t);return n},fI=(e,...t)=>{let n,r,i,a,o=o=>(n=oI(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=lI(e,n);return i(e,a),a};return a=o,(...e)=>a(uI(...e))},pI=[],mI=e=>{let t=t=>t[e]||pI;return t.isThemeGetter=!0,t},hI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_I=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,CI=e=>_I.test(e),wI=e=>!!e&&!Number.isNaN(Number(e)),TI=e=>!!e&&Number.isInteger(Number(e)),EI=e=>e.endsWith(`%`)&&wI(e.slice(0,-1)),DI=e=>vI.test(e),OI=()=>!0,kI=e=>yI.test(e)&&!bI.test(e),AI=()=>!1,jI=e=>xI.test(e),MI=e=>SI.test(e),NI=e=>!Q(e)&&!$(e),PI=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),FI=e=>XI(e,eL,AI),Q=e=>hI.test(e),II=e=>XI(e,tL,kI),LI=e=>XI(e,nL,wI),RI=e=>XI(e,iL,OI),zI=e=>XI(e,rL,AI),BI=e=>XI(e,QI,AI),VI=e=>XI(e,$I,MI),HI=e=>XI(e,aL,jI),$=e=>gI.test(e),UI=e=>ZI(e,tL),WI=e=>ZI(e,rL),GI=e=>ZI(e,QI),KI=e=>ZI(e,eL),qI=e=>ZI(e,$I),JI=e=>ZI(e,aL,!0),YI=e=>ZI(e,iL,!0),XI=(e,t,n)=>{let r=hI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ZI=(e,t,n=!1)=>{let r=gI.exec(e);return r?r[1]?t(r[1]):n:!1},QI=e=>e===`position`||e===`percentage`,$I=e=>e===`image`||e===`url`,eL=e=>e===`length`||e===`size`||e===`bg-size`,tL=e=>e===`length`,nL=e=>e===`number`,rL=e=>e===`family-name`,iL=e=>e===`number`||e===`weight`,aL=e=>e===`shadow`,oL=fI(()=>{let e=mI(`color`),t=mI(`font`),n=mI(`text`),r=mI(`font-weight`),i=mI(`tracking`),a=mI(`leading`),o=mI(`breakpoint`),s=mI(`container`),c=mI(`spacing`),l=mI(`radius`),u=mI(`shadow`),d=mI(`inset-shadow`),f=mI(`text-shadow`),p=mI(`drop-shadow`),m=mI(`blur`),h=mI(`perspective`),g=mI(`aspect`),_=mI(`ease`),v=mI(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[CI,`full`,`auto`,...w()],E=()=>[TI,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,TI,$,Q]},TI,$,Q],ee=()=>[TI,`auto`,$,Q],O=()=>[`auto`,`min`,`max`,`fr`,$,Q],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],te=()=>[`auto`,...w()],ne=()=>[CI,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[CI,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ie=()=>[CI,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,$,Q],ae=()=>[...b(),GI,BI,{position:[$,Q]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,KI,FI,{size:[$,Q]}],ce=()=>[EI,UI,II],le=()=>[``,`none`,`full`,l,$,Q],ue=()=>[``,wI,UI,II],de=()=>[`solid`,`dashed`,`dotted`,`double`],fe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],pe=()=>[wI,EI,GI,BI],me=()=>[``,`none`,m,$,Q],he=()=>[`none`,wI,$,Q],ge=()=>[`none`,wI,$,Q],_e=()=>[wI,$,Q],ve=()=>[CI,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[DI],breakpoint:[DI],color:[OI],container:[DI],"drop-shadow":[DI],ease:[`in`,`out`,`in-out`],font:[NI],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[DI],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[DI],shadow:[DI],spacing:[`px`,wI],text:[DI],"text-shadow":[DI],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,CI,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[PI],columns:[{columns:[wI,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[TI,`auto`,$,Q]}],basis:[{basis:[CI,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[wI,CI,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,wI,$,Q]}],shrink:[{shrink:[``,wI,$,Q]}],order:[{order:[TI,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ne()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...ie()]}],"min-block-size":[{"min-block":[`auto`,...ie()]}],"max-block-size":[{"max-block":[`none`,...ie()]}],w:[{w:[s,`screen`,...ne()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ne()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ne()]}],h:[{h:[`screen`,`lh`,...ne()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ne()]}],"max-h":[{"max-h":[`screen`,`lh`,...ne()]}],"font-size":[{text:[`base`,n,UI,II]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,YI,RI]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,EI,Q]}],"font-family":[{font:[WI,zI,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[wI,`none`,$,LI]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...de(),`wavy`]}],"text-decoration-thickness":[{decoration:[wI,`from-font`,`auto`,$,II]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[wI,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[TI,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},TI,$,Q],radial:[``,$,Q],conic:[TI,$,Q]},qI,VI]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...de(),`hidden`,`none`]}],"divide-style":[{divide:[...de(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...de(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[wI,$,Q]}],"outline-w":[{outline:[``,wI,UI,II]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`none`,u,JI,HI]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,JI,HI]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:ue()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[wI,II]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,JI,HI]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[wI,$,Q]}],"mix-blend":[{"mix-blend":[...fe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[wI]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[wI]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:me()}],brightness:[{brightness:[wI,$,Q]}],contrast:[{contrast:[wI,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,JI,HI]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,wI,$,Q]}],"hue-rotate":[{"hue-rotate":[wI,$,Q]}],invert:[{invert:[``,wI,$,Q]}],saturate:[{saturate:[wI,$,Q]}],sepia:[{sepia:[``,wI,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[wI,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[wI,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,wI,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wI,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,wI,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[wI,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[wI,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,wI,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[wI,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[wI,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":[`scale-3d`],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":[`translate-none`],zoom:[{zoom:[TI,$,Q]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[wI,UI,II,LI]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function sL({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=oP[e.templateId];if(i===void 0)return null;let a=r!==null,o=a?`border-warning/70 bg-warning/5`:`border-info/80 bg-info/5`,s=a?`bg-warning/85 text-warning-content`:`bg-info/85 text-info-content`,c=a?`border-warning`:`border-success`,l=a?`bg-warning/85 text-warning-content`:`bg-success/85 text-success-content`,u=t.userShare?`userShare`:t.presentation?`presentation`:null,{regions:d}=ZP(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return R(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&R(`span`,{class:`absolute top-1 left-1/2 -translate-x-1/2 rounded bg-warning/90 px-2 py-0.5 font-mono text-[10px] text-warning-content`,children:[`engine plan only · legacy: `,r]}),d.map(e=>R(`div`,{class:oL(`absolute rounded-box border border-dashed`,o),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:R(`span`,{class:oL(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[R(`span`,{children:e.region.name}),R(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>R(`div`,{class:oL(`absolute border`,c),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:R(`span`,{class:oL(`absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]`,l),children:[e.kind,` `,e.rect.width,`×`,e.rect.height]})},`tile-${e.id}`))]})}function cL(e){return{version:1,buildSha:sF,engineVersion:sF,config:iP,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{...e.kioskMode===!0?{kioskMode:!0}:{},replica:e.replica,selfView:e.selfView,presentation:e.presentation!==null,userShare:e.userShare!==null,callControls:e.callControls,callControlsVisible:e.callControlsVisible??!0,...e.callControlsRect===void 0?{}:{callControlsRect:e.callControlsRect},...e.statusStrip===void 0?{}:{statusStrip:e.statusStrip}},prefs:e.prefs,cards:e.cards}}}function lL({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=M(!1),s=P(null);if(N(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:R(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[R(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[R(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),R(`span`,{class:`text-warning`,children:`observing`})]}),R(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[R(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),R(`dd`,{class:`text-warning`,children:r}),R(`dt`,{class:`text-error opacity-80`,children:`error`}),R(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(cL(t),null,2);s.current!==null&&clearTimeout(s.current),navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current=setTimeout(()=>o(!1),1500)},()=>o(!1))},l=e.degradations.evictedCardIds,u=DF(e.sizeClass);return R(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[R(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[R(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),R(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),R(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[R(`dt`,{class:`opacity-60`,children:`state`}),R(`dd`,{children:e.state}),R(`dt`,{class:`opacity-60`,children:`template`}),R(`dd`,{children:e.templateId}),R(`dt`,{class:`opacity-60`,children:`class`}),R(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),u!==void 0&&R(D,{children:[R(`dt`,{class:`opacity-60`,children:`composition`}),R(`dd`,{children:u})]}),R(`dt`,{class:`opacity-60`,children:`container`}),R(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&R(D,{children:[R(`dt`,{class:`opacity-60`,children:`controls`}),R(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),R(`dt`,{class:`opacity-60`,children:`tiles`}),R(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&R(D,{children:[R(`dt`,{class:`text-error opacity-80`,children:`dropped`}),R(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&R(D,{children:[R(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),R(`dd`,{class:`text-warning`,children:r})]}),i!==null&&R(D,{children:[R(`dt`,{class:`text-error opacity-80`,children:`error`}),R(`dd`,{class:`text-error break-all`,children:i})]})]}),R(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var uL={effect:CF,animate:!1},dL=Lt(uL),fL={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function pL(e,t){return e===null||t===null?e===t:e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mL(e,t){let n=e.containerPx===null||t.containerPx===null?e.containerPx===t.containerPx:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height;return e.driving===t.driving&&e.replicaCollapsed===t.replicaCollapsed&&n&&pL(e.replica,t.replica)&&pL(e.selfView,t.selfView)&&pL(e.content,t.content)}var hL=new Map,gL=new Set;function _L({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,statusStripId:o,statusStripHeightPx:s,gridConfigEnabled:c,gridStartEnabled:l}){let u=dF(c,l)&&r!==void 0,d=r??fL,f=globalThis.location?.search??``,p=yF({kioskMode:F(()=>fF(f),[f]),instances:e,viewport:t,presence:d,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,statusStripId:o,statusStripHeightPx:s,enabled:u}),m=u?gF.value:null,h=m===null?xF(p.resolution,d,u):`engine-error`;PF({enabled:u,enabledVia:AF(lF,c===!0,l===!0),bail:h,resolution:p.resolution,engineError:m});let g=P(!1);d.presence.phase===`ready`?d.hasPersonaVideo&&(g.current=!0):g.current=!1;let _=!g.current,v;try{v=wF(p.resolution,h,_)}catch(e){_F(e),v=CF}let y=P(CF),b=EF(y.current,v);N(()=>{y.current=v,mL(dL.peek().effect,v)||(dL.value={effect:v,animate:b})}),N(()=>()=>{vF(),dL.peek()!==uL&&(dL.value=uL)},[]);let x=p.resolution,S=F(()=>{if(h!==null||x===null)return hL;try{let e=new Map;for(let t of x.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e}catch(e){return _F(e),hL}},[h,x]),C=F(()=>h!==null||x===null?gL:new Set(x.tiles.filter(bF).map(e=>e.id)),[h,x]),w=uF?R(`div`,{class:`contents`,"data-grid-debug":!0,children:[R(sL,{resolution:p.resolution,inputs:p.inputs,config:iP,bailReason:h}),R(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:R(lL,{resolution:p.resolution,inputs:p.inputs,shadowing:h!==null,bailReason:h,engineError:m})})]}):null;return{cardRects:S,kioskCardIds:C,sheetBottomPx:SF(x,h),animate:b,recordNaturalHeight:p.recordNaturalHeight,debug:w}}var vL=[`left`,`top`,`width`,`height`].map(e=>`${e} ${YS}`).join(`, `);function yL(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!aC()?vL:`none`}}function bL({state:e}){return e.enabled?R(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[R(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),R(`dl`,{class:`mt-2 grid gap-2`,children:[R(xL,{label:`iframe`,value:e.iframeLifecycleState}),R(xL,{label:`post`,value:e.lastInteractionPostResult}),R(xL,{label:`context`,value:e.lastModelContextUpdate}),R(xL,{label:`error`,value:e.lastError}),R(SL,{label:`tool_call`,value:e.lastToolCall}),R(SL,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function xL({label:e,value:t}){return t?R(`div`,{children:[R(`dt`,{class:`font-semibold`,children:e}),R(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function SL({label:e,value:t}){return t===void 0?null:R(`div`,{children:[R(`dt`,{class:`font-semibold`,children:e}),R(`dd`,{children:R(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var CL={compact:32,regular:40,roomy:68},wL=6e3,TL=`ease-out`,EL={stiffness:2822,damping:84,mass:3.5},DL=.25,OL=16;function kL(){if(typeof document>`u`||typeof getComputedStyle!=`function`)return OL;let e=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)?e:OL}function AL(e,t){return e===`widget`||t!==void 0&&t>0&&t<640?`compact`:`regular`}function jL(e){if(typeof e==`string`)try{let t=JSON.parse(e);return ML(t)?t:null}catch{return null}return ML(e)?e:null}function ML(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function NL(e){let t=jL(e)?.state;return t===`success`||t===`error`}function PL(e){return jL(e)?.state===`error`}function FL(e,t,n){let r=`${t+8}px`;if(n===void 0||!Number.isFinite(n)||n<=0)return{left:`1rem`,right:`1rem`,bottom:r};let i=Math.max(0,n-32),a=Math.min(i,448),o=e&&e.width>0?e.x+e.width/2:n/2,s=Math.min(Math.max(o-a/2,16),16+i-a);return{left:`${Math.round(s)}px`,width:`${Math.round(a)}px`,bottom:r}}function IL(e){let t=e?.trim();if(!t)return DL*kL();let n=Number.parseFloat(t);if(!Number.isFinite(n))return DL*kL();if(t.endsWith(`rem`))return n*kL();if(t.endsWith(`px`))return n}function LL(e,t){let n=e[`--color-neutral`],r=e[`--color-neutral-content`],i=IL(e[`--radius-field`]);return{...n?{"--activity-bg":n}:{},...r?{"--activity-fg":r}:{},"--activity-border":`transparent`,...i===void 0?{}:{"--activity-radius":`${i}px`},"--activity-height":`${CL[t.density]}px`,"--activity-align":t.align}}var RL=1e3,zL=`tavus-deployment`,BL=5e3,VL=1200,HL=[2e3,6e3];async function UL(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),BL);try{await wn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function WL(e){return e instanceof vn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function GL(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:ER(e).message},{error:e,operation:`canvas.bridge`})}function KL(e){return e.content.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.trim()!==``)}function qL(e,t,n,r){(async()=>{let i;for(let a of HL){await new Promise(e=>setTimeout(e,a));try{await UL(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,WL(e))break}}GL(i,r)})()}var JL=2e3;function YL(e){return e.correct_answer===void 0?VL:JL}var XL=48,ZL=24,QL=`ui-monospace, SFMono-Regular, Menlo, monospace`,$L=160,eR=()=>{},tR=`allow-scripts`,nR={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function rR(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var iR=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{rR(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function aR(e){for(let t of Mx)if(e.some(e=>xR(e)===t))return t;return null}function oR({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=SR(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s,onStatusStripChange:c}={}){let{client:l,telemetry:u}=jh(),{isDark:d,cssVars:f}=nP(),p=Xf(),m=Zf(),[h,g]=M([]),[_,v]=M(null),[y,b]=M(!1),x=P(null),S=P(null),C=P(null),[w,T]=_R(),E=L(_t)?.surface,D=AL(E,T.width),ee=CL[D],O=y?null:_,k=O?ee+8:0,A=I(()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)},[]),te=I(()=>{C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),ne=I(()=>{x.current&&(x.current=null,A(),te(),b(!0),S.current=setTimeout(()=>{S.current=null,b(!1),v(null)},300))},[A,te]),re=I(()=>{x.current&&(te(),C.current=setTimeout(()=>{C.current=null,ne()},wL))},[ne,te]);N(()=>()=>{A(),te()},[A,te]),N(()=>{c?.(O?ee:null)},[O,ee,c]),N(()=>()=>c?.(null),[c]);let[ie,j]=M(()=>({enabled:n,iframeLifecycleState:`idle`})),ae=_L({instances:h,viewport:T,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,statusStripId:O?.id,statusStripHeightPx:O?ee:void 0,gridConfigEnabled:o,gridStartEnabled:s}),oe=I((e,t)=>{if(e.lastError){let n={stage:`magic_canvas`,outcome:e.lastInteractionPostResult===`retrying`?`retry`:`failed`,operation:t?.operation??(e.lastInteractionPostResult?`canvas.bridge`:`canvas.load`),component:`magic_canvas`,code:`canvas_error`,handled:!0};t?Dr(u,t.error,n):u?.record(n)}e.lastInteractionPostResult===`recovered`&&u?.record({stage:`magic_canvas`,outcome:`recovered`,operation:`canvas.bridge`,component:`magic_canvas`}),j(t=>({...t,...e}))},[u]),se=I((e,t=`*`)=>{m===`joined-meeting`?p?.sendAppMessage(e,t):oe({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`})},[p,m,oe]),ce=P(se),[le]=M(()=>new ux({host:zL,send:e=>ce.current(e)})),ue=P([]);N(()=>{ce.current=se},[se]),N(()=>{le.instancesChanged(ue.current,h),ue.current=h},[h,le]);let de=F(()=>({theme:d.value?`dark`:`light`,cssVars:f.value}),[d.value,f.value]);N(()=>{j(e=>e.enabled===n?e:{...e,enabled:n})},[n]),tp({onAppMessage:I(e=>{if(m!==`joined-meeting`)oe({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});else if(Zm(e.data))C.current!==null&&ne();else try{let t=FS(e.data);if(t){le.route(t),oe({lastToolCall:e.data});return}let n=PS(e.data);if(!n)return;let r=x.current,i=Zx(r,n);if(i.consumed){let e=r!==null&&i.strip!==null&&r.tool_call_id===i.strip.tool_call_id&&r.conversation_id===i.strip.conversation_id,t=C.current!==null;i.strip?NL(i.strip.arguments)?e&&(PL(i.strip.arguments)&&!t&&(x.current=i.strip,v(i.strip)),re()):e&&t||(A(),te(),x.current=i.strip,b(!1),v(i.strip)):ne()}else g(e=>qx(e,n));oe({lastToolCall:e.data,parsedCanvasConfig:n.kind===`show`?n.instance.canvas_config:void 0,iframeLifecycleState:n.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){oe({iframeLifecycleState:`error`,lastError:ER(e).message},{error:e,operation:`canvas.validate`})}},[ne,re,A,te,le,m,oe])});let fe=h.map(e=>{let t=iS(e,T),n=t.display_mode===`fullscreen`?null:ae.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),pe=aS(fe.map(({layout:e})=>e),T),me=[...fe].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;N(()=>{e?.(pe)},[e,pe.active,pe.side,pe.video_shift_x,pe.backdrop.type,pe.safe_area?.x,pe.safe_area?.y,pe.safe_area?.width,pe.safe_area?.height]);let he=aR(fe.map(({layout:e})=>e));N(()=>{t?.(he)},[t,he]);let ge=h.length>0||_!==null||ie.enabled;return R(`div`,{ref:w,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,style:`--mc-strip-band: ${k}px; --cvi-status-strip-drop: ${80-ZL}px`,children:[ge&&me&&R(`div`,{class:`absolute inset-0 bg-black/45`}),ge&&!me&&ae.sheetBottomPx!==null&&R(`div`,{"data-grid-sheet-scrim":!0,class:`absolute inset-x-0 top-0`,style:{height:Math.min(ae.sheetBottomPx+64,T.height),backgroundImage:`linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))`}}),ge&&fe.map(({instance:e,layout:t,gridRect:n})=>R(uR,{slot:xR(t),safeAreaTop:pe.safe_area?.y,frameWidth:T.width,...n?{gridRect:n,gridAnimate:ae.animate}:{},children:r=>R(dR,{availableHeight:r,client:l,gridDriven:n!==null,gridKioskCard:n!==null&&ae.kioskCardIds.has(e.id),hostTheme:de,instance:e,layout:t,liveCards:le,dimmed:!!(me&&me!==e.tool_call_id),onDebug:oe,onNaturalHeightChange:ae.recordNaturalHeight,onComplete:()=>{g(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{g(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:se})},e.id)),_&&R(sR,{client:l,controlsRect:a,density:D,exiting:y,frameWidth:T.width,hostTheme:de,instance:_,onComplete:ne,onDebug:oe,sendAppMessage:se}),ge&&R(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:R(bL,{state:ie})}),ae.debug]})}function sR({client:e,controlsRect:t,density:n,exiting:r,frameWidth:i,hostTheme:a,instance:o,onComplete:s,onDebug:c,sendAppMessage:l}){let u=CL[n],d={...o.layout,preferred_slot:`safe-area-bottom`,display_mode:`inline`,viable_slot:`safe-area-bottom`},f=F(()=>({...a,cssVars:{...a.cssVars,"--font-mono":QL},activity:{density:n,align:`center`}}),[n,a]);return R(`div`,{class:`cvi-status-strip absolute flex justify-center`,style:FL(t,72,i),"data-canvas-status-strip":!0,children:R(cR,{exiting:r,instanceId:o.id,children:R(dR,{availableHeight:$L,client:e,fixedHeightPx:u,hostTheme:f,instance:o,layout:d,onComplete:s,onDebug:c,onDisplayModeChange:eR,onNaturalHeightChange:eR,sendAppMessage:l,variant:`strip`})})})}function cR({exiting:e,instanceId:t,children:n}){let r=P(null);return Xe(()=>{let t=r.current;if(!t||e)return;if(aC()){t.style.transition=`opacity 300ms ${TL}`,t.style.opacity=`0`;let e=globalThis.requestAnimationFrame(()=>{t.style.opacity=`1`});return()=>globalThis.cancelAnimationFrame(e)}let{stiffness:n,damping:i,mass:a}=EL,o=0,s=0,c=performance.now(),l=0,u=()=>{let e=(1-o)*40;t.style.transform=`translateY(${e.toFixed(2)}px)`,t.style.opacity=`${Math.min(Math.max(o,0),1)}`};t.style.transition=``,u();let d=e=>{let r=Math.min((e-c)/1e3,1/30);c=e,s+=(n*(1-o)-i*s)/a*r,o+=s*r,Math.abs(1-o)<.002&&Math.abs(s)<.02?(t.style.transform=``,t.style.opacity=``):(u(),l=globalThis.requestAnimationFrame(d))};return l=globalThis.requestAnimationFrame(d),()=>globalThis.cancelAnimationFrame(l)},[e,t]),N(()=>{let t=r.current;t&&e&&(t.style.transition=`opacity 300ms ${TL}`,t.style.opacity=`0`)},[e]),R(`div`,{ref:r,class:`w-full`,"data-strip-motion":e?`exiting`:`entering`,children:n})}var lR=16;function uR({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=vR(),c=a(r?r.height:e===`full`?void 0:s);if(r)return R(`div`,{ref:o,class:`pointer-events-auto absolute`,style:yL(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:R(`div`,{class:`flex h-full w-full flex-col gap-2`,children:c})});if(e===`safe-area-left`||e===`safe-area-right`){let r=t==null?`1rem`:`${t*100}%`,i=n!=null&&n>0?Math.max(0,n-32):void 0;return R(`div`,{ref:o,class:`cvi-strip-lift ${bR(e)}`,style:{top:r,bottom:`calc(72px + var(--mc-strip-band, 0px))`,maxWidth:i},"data-canvas-slot":e,children:R(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return e===`safe-area-bottom`?R(`div`,{ref:o,class:bR(e),style:{top:`${lR}px`},"data-canvas-slot":e,children:R(`div`,{class:`contents`,children:c})}):R(`div`,{ref:o,class:bR(e),"data-canvas-slot":e,children:R(`div`,{class:`contents`,children:c})})}function dR({availableHeight:e,client:t,gridDriven:n=!1,gridKioskCard:r=!1,hostTheme:i,instance:a,layout:o,liveCards:s,dimmed:c,onDebug:l,onComplete:u,onDisplayModeChange:d,onNaturalHeightChange:f,sendAppMessage:p,variant:m=`card`,fixedHeightPx:h}){let g=m===`strip`,_=h??720,v=P(null),y=P(null),b=P(e),x=P(r),S=P(h??320),C=P({fixed:h,max:_}),w=P(i),T=P(a),E=P(o),D=P(-1),ee=P(u),O=P(d),k=P(f),A=P(p),[te,ne]=M(h??720);N(()=>{C.current={fixed:h,max:_},h!==void 0&&ne(h)},[h,_]),N(()=>{T.current=a},[a]),N(()=>{S.current=te,y.current?.setHostContext(hR(T.current,w.current,E.current,b.current,te,x.current))},[te]),N(()=>{b.current=e,x.current=r;let t=mR(i,v.current);w.current=t,y.current?.setHostContext(hR(T.current,t,E.current,e,S.current,r))},[e,i,r]),N(()=>{E.current=o,y.current?.setHostContext(hR(T.current,w.current,o,e,S.current,x.current))},[e,o]),N(()=>{ee.current=u,O.current=d,k.current=f,A.current=p},[u,d,f,p]),N(()=>{let e=v.current;if(!e)return;let n=!1,r=null,i=null,o=null,c=null,u=null,d=new URL(a.canvas_config.sandbox_url,globalThis.location.href).href,f=e=>{n||l({iframeLifecycleState:`error`,lastError:ER(e).message},{error:e,operation:`canvas.bridge`})},p=()=>{if(n||!o)return;let e=T.current,t=nS(e,o);o=null,A.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),l({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},m=()=>{if(r)return;if(e.src!==d){e.src;return}if(n||!e.contentWindow)return;let m=new eP(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:hR(a,mR(w.current,e),E.current,b.current,S.current,x.current)});r=m,y.current=m,s&&wR(a)&&(i=new lx({bridge:m,instance:a,host:zL,send:e=>A.current(e)}),s.register(i)),m.oninitialized=()=>{n||(l({iframeLifecycleState:`ready`}),D.current=T.current.revision,m.sendToolInput({arguments:T.current.arguments}).catch(f),i?.onInitialized())},m.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let{fixed:t,max:n}=C.current,r=t===void 0?Math.min(Math.max(e,XL),n):e===t?t:Math.min(e,$L);ne(r),k.current(T.current.id,r)}},m.onmessage=async e=>{let r=Qx(e);if(!r){if(KL(e)){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return l({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let i=T.current,a=(()=>{try{let e=$x(i,r);return{interaction:e,request:IS(e)}}catch(e){return{error:e}}})();if(`error`in a){let e=ER(a.error).message;return l({lastInteractionPostResult:`error`,lastError:e},{error:a.error,operation:`canvas.validate`}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:o,request:s}=a,c=``;try{c=tS(e,o)}catch(e){l({lastError:ER(e).message}),o.type===`submit`&&console.warn(`Magic Canvas dropped the response text of a submitted card.`,e)}let d=!0;try{await UL(t,o.conversation_id,s.body)}catch(e){d=!1,WL(e)?GL(e,l):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),l({lastInteractionPostResult:`failed_open`,lastError:ER(e).message},{error:e,operation:`canvas.bridge`}),qL(t,o.conversation_id,s.body,l))}if(n)return{};if(c)try{A.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:i.conversation_id,properties:{text:c}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),l({lastError:ER(e).message},{error:e,operation:`canvas.bridge`})}return d&&l({lastInteractionPostResult:`success`,lastError:void 0}),eS(o)&&(o.type===`submit`?(u&&clearTimeout(u),u=setTimeout(()=>{u=null,n||ee.current()},YL(i.arguments))):ee.current()),{}},m.onupdatemodelcontext=async e=>i?(i.onModelContext(e),{}):(o=e,c||=setTimeout(()=>{c=null,p()},RL),{}),m.onrequestdisplaymode=async({mode:e})=>{if(g)return{mode:`inline`};let t=e===`fullscreen`?`fullscreen`:`inline`;return O.current(t),E.current={...E.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:E.current.viable_slot},m.setHostContext(hR(T.current,w.current,E.current,b.current,S.current,x.current)),{mode:t}},m.connect(new iR(e)).then(()=>void 0).catch(f)};l({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),a.canvas_config.sandbox_url,e.src=a.canvas_config.sandbox_url;let h=()=>{m()};return e.addEventListener(`load`,h),m(),()=>{c&&=(clearTimeout(c),null),u&&=(clearTimeout(u),null),p(),n=!0,e.removeEventListener(`load`,h),y.current=null,i&&(i.dispose(),s?.unregister(i)),l({iframeLifecycleState:`closed`}),r&&Hb(r)}},[t,a.id,a.canvas_config.sandbox_url,g,s,l]),N(()=>{a.revision!==0&&(a.revision<=D.current||(D.current=a.revision,y.current?.sendToolInput({arguments:a.arguments}).catch(e=>{l({iframeLifecycleState:`error`,lastError:ER(e).message},{error:e,operation:`canvas.bridge`})})))},[a.arguments,a.revision,l]);let re=o.viable_slot===`full`||o.display_mode===`fullscreen`,ie=re?null:gR(te,e,r),j=ie?.placeholderStyle,ae=ie?.cardStyle,oe=re?{height:`100%`}:ie?.iframeStyle??{width:`100%`,height:`${te}px`},se=g?`pointer-events-auto w-full overflow-hidden`:[`pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]`,r?``:`shadow-xl`,re?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,c?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),ce=nR[a.canvas_config.component]??tR,le=R(`div`,{class:se,style:ae,...g?{"data-canvas-strip":o.viable_slot}:{"data-canvas-card":o.viable_slot},children:R(`iframe`,{ref:v,title:`${a.canvas_config.component} ${a.canvas_config.component_version}`,class:re?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:ce,scrolling:g?`no`:void 0,style:oe})});return re?le:R(`div`,{class:`block w-full`,style:j,children:le})}var fR=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`,`--color-neutral`,`--color-neutral-content`];function pR(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of fR){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function mR(e,t){let n=pR(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function hR(e,t,n,r,i,a=!1){let o=LS(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:CR(r),l=t.activity?LL(t.cssVars,t.activity):{},u=s?1:gR(i??0,r,a)?.displayScale??1,d={...e.canvas_config.host_context,...o,...l,containerDimensions:{...TR(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:u}};return wR(e)?d.live=!0:delete d.live,d}function gR(e,t,n=!1){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let r=Math.min(e,720);if(n)return{displayScale:1,placeholderStyle:{height:`${t}px`},cardStyle:{height:`100%`},iframeStyle:{width:`100%`,height:`100%`}};if(r<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${r}px`}};let i=t/r;return{displayScale:i,placeholderStyle:{height:`${r*i}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${r}px`,transform:`scale(${i})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${r}px`}}}function _R(){let e=P(null),[t,n]=M(()=>yR(null));return N(()=>{let t=()=>n(t=>{let n=yR(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function vR(){let e=P(null),[t,n]=M();return N(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function yR(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}function bR(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-right`:return`${t} right-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-bottom`:return`${t} cvi-strip-lift right-4 bottom-[calc(6rem_+_var(--mc-strip-band,0px))] left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-[calc(5rem_+_var(--mc-strip-band,0px))] @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function xR(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function SR(){return!1}function CR(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function wR(e){return e.canvas_config.live_protocol===1}function TR(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ER(e){return e instanceof Error?e:Error(String(e))}var DR=class extends ee{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},OR=1e4;function kR(e,t=OR){let[n,r]=M(!1),i=P(!1);return N(()=>{if(!e){r(!1);return}if(i.current)return;i.current=!0,r(!0);let n=setTimeout(()=>r(!1),t);return()=>clearTimeout(n)},[e,t]),n}function AR(e){let t=Qf(),n=ip(t??``),r=!op(t??``).isOff,i=xb(e),a=i.phase===`ready`?i.replicaId:``,o=op(a),s=!r&&(o.state===`playable`||o.state===`loading`),c=i.phase===`ready`&&!e&&!i.videoState.isOff,l=!e&&t!==null&&!n.isOff,u=i.phase!==`ready`||i.videoState.isOff;return F(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function jR(e,t,n){let[r,i]=M(!0);return N(()=>{if(!t)return;let n=e.current;if(!n||typeof matchMedia!=`function`)return;let r=matchMedia(`(hover: hover) and (pointer: fine)`),a=()=>{try{return n.matches(`:has(:focus-visible)`)}catch{return!1}},o=n.matches(`:hover`),s=()=>{i(!r.matches||o||a())},c=()=>{o=!0,s()},l=()=>{o=!1,s()};return n.addEventListener(`pointerenter`,c),n.addEventListener(`pointerleave`,l),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,s),r.addEventListener(`change`,s),s(),()=>{n.removeEventListener(`pointerenter`,c),n.removeEventListener(`pointerleave`,l),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,s),r.removeEventListener(`change`,s)}},[t,e,n]),r}function MR(e,t,n,r,i){let[a,o]=M(void 0);return N(()=>{if(!r)return;let i=e.current,a=t.current;if(!i||!a||typeof ResizeObserver>`u`)return;let s=()=>{let e=i.getBoundingClientRect(),t=1/0,r=-1/0;for(let e of a.children){let n=e.getBoundingClientRect();n.width!==0&&(t=Math.min(t,n.left),r=Math.max(r,n.right))}if(e.width===0||!Number.isFinite(t)||r<=t)return;let s={x:Math.round(t-e.left),y:Math.round(e.height-n),width:Math.round(r-t),height:n};o(e=>e!==void 0&&e.x===s.x&&e.y===s.y&&e.width===s.width&&e.height===s.height?e:s)},c=new ResizeObserver(s);c.observe(i),c.observe(a);for(let e of a.children)c.observe(e);return s(),()=>c.disconnect()},[r,e,t,n,i]),a}var NR=1e4;function PR({onTimeout:e,timeoutMs:t=NR,active:n=!0}){let r=bb().length>0,[i,a]=M(!1),o=P(e);return N(()=>{o.current=e},[e]),N(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function FR(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function IR({onShutdown:e}){let t=P(e);N(()=>{t.current=e},[e]),tp({onAppMessage:I(e=>{FR(e?.data)&&t.current()},[])})}var LR=fn(`PiP`),RR=360,zR=280;function BR(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window&&!navigator.userAgent.includes(`Firefox/`)}function VR(e){let{enabled:t,active:n}=e,[r,i]=M(null),a=BR(),o=L(dg),s=I(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=I(async()=>{if(a&&t&&n&&(!r||r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:RR,height:zR}),t=Pe.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){LR.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return N(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=()=>s();globalThis.window.addEventListener(`focus`,r);let i=[],o=null,l=`none`,u=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;o=e.metadata,l=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,u=!0}catch(e){LR.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),i.push(t)}catch(e){LR.info(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),globalThis.window.removeEventListener(`focus`,r),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of i)try{e.setActionHandler(t,null)}catch{}if(u)try{e.metadata=o,e.playbackState=l}catch{}}}},[t,a,n,c,s]),N(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),N(()=>()=>{r&&!r.closed&&r.close()},[r]),N(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var HR=Lt(null),UR={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},WR=fp(({id:e,showAudioWave:t=!0})=>{let n=ip(e).isOff;return R(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[R(Sy,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&R(`div`,{class:`absolute bottom-2 right-2`,children:R(pb,{id:e})})]})}),GR=fp(()=>{let e=Qf(),{isScreenSharing:t}=Ey(),n=bb()[0];return R(D,{children:[t&&n&&R(WR,{id:n}),e&&R(WR,{id:e,showAudioWave:!1})]})}),KR=fp(()=>R(`div`,{class:`cvi-strip-lift absolute bottom-4 @max-mobile:bottom-[calc(5rem_+_var(--cvi-status-strip,0px))] left-4 flex flex-col items-end gap-2 z-20`,children:R(GR,{})})),qR=fp(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>R(D,{children:[R(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&R(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:yL(i.content,a),children:R(Sy,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&R(`div`,{class:oL(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:yL(i.replica,a),children:R(Tb,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),JR=fp(()=>{let{effect:e,animate:t}=dL.value,n=Qf();return n===null||e.selfView===null?null:R(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:yL(e.selfView,t),children:R(Sy,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),YR=fp(({canvasRenderedSlot:e})=>{let t=TF(dL.value.effect);return t===`hidden`?null:t===`engine`?R(DR,{onError:_F,children:R(JR,{})}):e===`safe-area-bottom`?null:R(KR,{})}),XR=fp(()=>{let e=bb()[0];return e?R(Cy,{sessionId:e}):null}),ZR=fp(e=>R(D,{children:[R(XR,{}),R(QR,{...e})]})),QR=fp(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=dL.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?R(db,{}):i.phase===`connecting`?R(ub,{}):e&&!s?R(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:R(_b,{sessionId:i.replicaId})}):c.effect.driving?R(DR,{onError:_F,children:R(qR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?R(hC,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):R($R,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),$R=fp(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>R(pC,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:rz,personaMode:`auto`,renderedSlot:o,fill:i=>R(Tb,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),ez=fp(({items:e})=>{let[t,n]=M(!1),r=P(null);return N(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),R(`div`,{ref:r,class:`relative`,children:[R(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:R(hv,{name:`more`})}),t&&R(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),tz=fp(({items:e})=>e.length<=1?R(D,{children:e}):R(ez,{items:e})),nz=fp(({onLeave:e})=>{let t=Zf(),{config:n}=jh(),{session:r,state:i,end:a,endSession:o}=Zy(),s=Qf(),c=P(null),l=L(r_)?.frameRef??c,[u,d]=M(!1),f=$v()===`full-screen`,[p,m]=M(!1),[h,g]=M(UR),[_,v]=M(null),[y,b]=M(null),x=n.value.customization.conversation,S=kR(x.show_fullscreen_hint&&_!==null&&!u&&!f),C=P(null),w=P(null),T=r.value?.conversationUrl,E=r.value?.magicGrid===!0,D=jR(C,dF(x.magic_grid,E),T),ee=MR(C,w,72,!0,T),O=x.modality===`audio`,k=AR(O),A=x.modality===`chat`,te=x.modality===`video`,ne=x.enable_chat,re=x.enable_closed_captions,ie=x.enable_picture_in_picture,{pipWindow:j}=VR({enabled:ie&&!A,active:t===`joined-meeting`}),ae=P(null),oe=i.value===`connected`?r.value?.conversationId:void 0;N(()=>{oe&&(ae.current=oe)},[oe]);let se=I(()=>{let e=ae.current;return e?o(e):a()},[a,o]);N(()=>()=>{se()},[se]);let{camera:ce,requestCamera:le}=Gh(),{isCamMuted:ue}=wy(),de=ce.isGranted&&!ue;N(()=>{te&&t===`joined-meeting`&&(HR.value=de)},[te,t,de]);let fe=P(te&&!s&&HR.value===!0);N(()=>{t===`joined-meeting`&&fe.current&&(fe.current=!1,le())},[t,le]),N(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),N(()=>{let e=()=>{let e=l.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;d(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let pe=I(()=>{let e=l.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);I(()=>{m(e=>!e)},[]);let me=I(()=>{se()},[se]);if(PR({active:!A&&t===`joined-meeting`,onTimeout:me}),IR({onShutdown:me}),!T)return null;if(A)return R(ib,{defaultOpen:!0,children:R(`div`,{class:`cvi-call-surface absolute inset-0`,children:R(cb,{docked:!0,headerAction:R(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:me,"aria-label":`Leave conversation`,children:R(hv,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let he=[R(Xy,{compact:!0},`screen-share`)];ne&&he.push(R(ob,{compact:!0},`chat`));let ge=t===`left-meeting`;return R($y,{children:R(ib,{children:R(Ny,{children:[R(`div`,{class:`cvi-call-surface absolute inset-0${O?``:` cvi-video-surface`}`,style:`--cvi-status-strip: ${y===null?0:y+8}px`,ref:C,children:[R(`div`,{class:`relative w-full h-full z-[5]`,children:[R(ZR,{isAudioOnly:O,presence:k,canvasLayoutEffect:h,canvasRenderedSlot:_}),!O&&R(YR,{canvasRenderedSlot:_}),R(oR,{debugEnabled:p,callPresence:k,callControlsVisible:D,callControlsRect:ee,gridConfigEnabled:x.magic_grid,gridStartEnabled:E,onLayoutEffectChange:g,onRenderedSlotChange:v,onStatusStripChange:b}),!f&&R(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":ge,"data-pinned":S,children:R(fb,{active:u,onToggle:pe,nudge:S,compact:!0})})]}),R(cb,{}),R(nb,{}),R(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":ge,"aria-hidden":ge,children:R(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":ge,ref:w,children:[R(Gy,{level:!0}),!O&&R(qy,{}),re&&R(tb,{}),R(tz,{items:he}),R(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:me,"aria-label":`Leave call`,children:R(hv,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),j&&Ep(R(Cb,{onLeave:me}),j.document.body)]})})})});function rz(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function iz(e,t,n){switch(t){case`granted`:return n?e?.cameraOptional??`Camera is optional — turn it on anytime.`:e?.ready??`You're all set — join whenever you're ready.`;case`blocked`:return e?.denied??`Microphone is blocked. Click the mic to see how to allow it.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;case`prompt`:return e?.prompt??`Allow microphone access to join.`;default:return e?.loading??`Getting your microphone ready...`}}var az=fp(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=Xf(),{config:a}=jh(),{cameraOnStart:o}=L(_t),{localSessionId:s,isCamMuted:c}=wy(),{mic:l,camera:u,requestMic:d,requestCamera:f}=Gh(),p=a.value.customization.conversation.modality===`video`,m=Tv(a.value),h=wv(a.value);N(()=>{d()},[]);let g=l.isGranted,_=P(!1);N(()=>{p&&o!==`off`&&g&&!_.current&&(u.isGranted||u.isBlocked||(_.current=!0,f()))},[p,o,g,u.isGranted,u.isBlocked,f]);let v=p&&g&&!u.isGranted,y=iz(e,l.status,v);return R(Ny,{children:R(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[u.isGranted&&!c?R(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:R(Sy,{type:`video`,sessionId:s??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):R(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[R(zv,{variant:m.background,replica:h}),R(`div`,{class:`${uy} backdrop-blur-xs`})]}),R(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[y&&R(ty,{message:y,class:`relative`}),R(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[R(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[R(Gy,{level:!0}),p&&R(qy,{})]}),R(Uv,{class:`btn-accent `,loading:t,disabled:!g,onClick:n,children:e?.join??`Join`}),R(`button`,{type:`button`,class:`btn btn-control ${l.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:R(hv,{name:`cancel`})})]})]})]})})}),oz=`Password required`,sz=`Enter the password to start this conversation.`,cz=`Password`,lz=`Continue`;function uz(e){let[t,n]=M(Date.now);return N(()=>{if(e===void 0)return;let t=()=>{let t=Date.now();n(t),t>=e&&clearInterval(r)},r=setInterval(t,1e3);return t(),()=>clearInterval(r)},[e]),e===void 0?0:Math.max(0,Math.ceil((e-t)/1e3))}function dz(e){return`${Math.floor(e/60)}:${String(e%60).padStart(2,`0`)}`}function fz({onSubmit:e,onCancel:t,text:n,isSubmitting:r=!1,errorMessage:i,retryAt:a}){let[o,s]=M(``),c=Ze(),l=P(null);N(()=>l.current?.focus(),[]);let u=uz(a),d=u>0;return R(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${c}-title`,children:R(`form`,{onSubmit:t=>{t.preventDefault();let n=o.trim();!n||r||d||e(n)},onKeyDown:e=>{e.key===`Escape`&&t&&(e.preventDefault(),t())},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:R(`div`,{class:`card-body gap-3`,children:[R(`h3`,{id:`${c}-title`,class:`card-title text-base-content`,children:n?.title??oz}),R(`p`,{class:`text-sm text-base-content/70`,children:n?.description??sz}),R(`input`,{ref:l,id:c,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:n?.placeholder??cz,value:o,disabled:r,onInput:e=>s(e.target.value)}),i&&R(`p`,{class:`text-error text-xs`,role:`alert`,children:i}),R(Uv,{class:`btn-primary`,type:`submit`,disabled:!o.trim()||d,loading:r,children:d?`Try again in ${dz(u)}`:n?.submit??lz}),t&&R(`button`,{type:`button`,class:`btn btn-ghost`,onClick:t,children:`Cancel`})]})})})}function pz({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=jh(),o=$v()===`full-screen`,s=L(Sm),c=s?.passwordRequest??null,l=Tv(i.value),u=l.btn_title??e?.fallback_button??`Start the conversation`,d=i.value.customization.terms_content?.trim()??``,f=i.value.customization.terms_enabled===!0,p=d.length>0,m=p&&f,h=F(()=>m&&jm(a,d),[m,a,d]),g=m&&!h,_=Ze(),[v,y]=M(h),b=n||m&&!v;return R(fy,{title:l.title,description:l.description,overlay:c&&s?R(fz,{onSubmit:s.submitPassword,onCancel:s.dismissPasswordRequest,errorMessage:c.reason===`rejected`?`That password didn't work.`:void 0,retryAt:c.retryAt??void 0}):null,children:[R(`div`,{class:`relative`,children:[r&&R(ty,{message:ey(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),R(hy,{onClick:()=>{m&&v&&!h&&Pm(a,d),t()},disabled:b,loading:n,children:u})]}),p&&R(`div`,{class:`max-w-xs text-center`,children:g?R(`label`,{for:_,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[R(`input`,{id:_,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:v,onChange:e=>y(e.target.checked)}),R(`span`,{class:`leading-snug`,children:d})]}):R(`p`,{class:`text-xs leading-snug text-white/70`,children:d})})]})}function mz(...e){for(let t of e){let e=t?.trim();if(e)return e}}function hz(){let{config:e}=jh(),{haircheck:t}=e.value.customization;return F(()=>({prompt:mz(t.permission_request_description,t.permission_request_title),ready:mz(t.permission_granted_description,t.permission_granted_title),denied:mz(t.permission_denied_description,t.permission_denied_title),join:mz(t.join_button),cancel:mz(t.cancel_btn)}),[t])}function gz({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=hz();switch(e.state){case`idle`:return R(pz,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return R(az,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return R(nz,{onLeave:()=>e.leave()});case`ended`:return R(by,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return R(Yv,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,isStarting:e.isStarting,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}function _z(){let{config:e,configError:t}=jh(),n=Qv(),r=Xv(),i=F(()=>({fallback_button:n.start_button}),[n.start_button]),a=e.value.is_available,o=e.value.unavailable_reason;return R(i_,{children:t.value?R(Yv,{cause:`error`,canRetry:!1,onRetry:()=>{}}):a===!1?R(Yv,{cause:o??`daily_limit`,canRetry:!1,onRetry:()=>{}}):R(gz,{flow:r,welcomeText:i})})}var vz=`:host {
|
|
168
169
|
display: block;
|
|
169
170
|
/* Containing block for the captcha overlay, which is owned by a provider
|
|
170
171
|
above the shells and so has no positioned ancestor of its own. */
|
|
@@ -175,4 +176,4 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
175
176
|
overflow: hidden;
|
|
176
177
|
background: transparent;
|
|
177
178
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
178
|
-
}`;function
|
|
179
|
+
}`;function yz(e){return R(D,{children:[R(`style`,{dangerouslySetInnerHTML:{__html:Pe}}),R(`style`,{dangerouslySetInnerHTML:{__html:vz}}),R(yt,{surface:`embed`,layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token,children:R(Fr,{fallback:R(n_,{}),children:R(Lr,{children:R(oh,{children:R(Ah,{children:R(ag,{children:R(ug,{children:R(fg,{children:R(qg,{children:R(_z,{})})})})})})})})})})]})}var bz;function xz(){bz||=Ee(yz,`tavus-embed`,[`layout`,`camera-on-start`,`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`expand-options`,`token`],{shadow:!0,mode:`open`})}fn(`Widget`);var Sz=[`tavus:chat-message`,`tavus:conversation-created`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],Cz=class{element=null;tagName;constructor(e=`tavus-embed`){this.tagName=e,this.element=document.querySelector(this.tagName)}getElement(){if(this.element||=document.querySelector(this.tagName),!this.element)throw Error(`Element <${this.tagName}> not found in the DOM`);return this.element}open(){this.getElement().open?.()}close(){this.getElement().close?.()}createConversation(){let e=this.getElement();return e.createConversation?e.createConversation():Promise.reject(Error(`<${this.tagName}> is not ready yet — wait for tavus:ready`))}startConversation(e){this.getElement().startConversation?.(e)}endConversation(){this.getElement().endConversation?.()}sendMessage(e){let t=this.getElement();if(typeof e==`string`){let n={event_type:`conversation.respond`,properties:{text:e}};t.tavus?.sendMessage?.(n)}else t.tavus?.sendMessage?.(e)}updateConfig(e){this.getElement().updateConfig?.(e)}destroy(){this.getElement().destroy?.(),this.element=null}on(e,t){this.getElement().addEventListener(e,t)}off(e,t){this.getElement().removeEventListener(e,t)}};return typeof window<`u`&&xz(),e.TAVUS_EVENT_NAMES=Sz,e.TavusIntegration=Cz,e})({});
|