@tavus/widget 0.6.0 → 0.7.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.
@@ -1,5 +1,5 @@
1
1
  var TavusWidget=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=r(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(e,d)&&d!==o&&t(e,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=n(a,d))||s.enumerable});return e},l=e=>i.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e),u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E={},D=[],ee=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function re(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?u.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ie(e,o,r,i,null)}function ie(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++f,__i:-1,__u:0};return i==null&&d.vnode!=null&&d.vnode(a),a}function ae(){return{current:null}}function k(e){return e.children}function A(e,t){this.props=e,this.context=t}function oe(e,t){if(t==null)return e.__?oe(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`?oe(e):null}function se(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=ne({},t);a.__v=t.__v+1,d.vnode&&d.vnode(a),ye(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??oe(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,xe(r,a,i),t.__e=t.__=null,a.__e!=n&&ce(a)}}function ce(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}),ce(e)}function le(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!ue.__r++||h!=d.debounceRendering)&&((h=d.debounceRendering)||g)(ue)}function ue(){try{for(var e,t=1;m.length;)m.length>t&&m.sort(_),e=m.shift(),t=m.length,se(e)}finally{m.length=ue.__r=0}}function de(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||D,y=t.length;for(c=fe(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||E,p.__i=d,g=ye(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&we(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=pe(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 fe(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]=ie(null,o,null,null,null):te(o)?o=e.__k[a]=ie(k,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=ie(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=he(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=oe(s)),Te(s,s));return r}function pe(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=pe(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=oe(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function me(e,t){return t||=[],e==null||typeof e==`boolean`||(te(e)?e.some(function(e){me(e,t)}):t.push(e)),t}function he(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;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 ge(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||ee.test(t)?n:n+`px`}function _e(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||ge(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ge(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(x,`$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[b]=r[b]:(n[b]=S,e.addEventListener(t,a?w:C,a)):e.removeEventListener(t,a?w:C,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 ve(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[y]==null)t[y]=S++;else if(t[y]<n[b])return;return n(d.event?d.event(t):t)}}}function ye(e,t,n,r,i,a,o,s,c,l){var u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=d.__b)&&u(t);n:if(typeof ee==`function`){f=o.length;try{if(y=t.props,b=ee.prototype&&ee.prototype.render,x=(u=ee.contextType)&&r[u.__c],S=u?x?x.props.value:u.__:r,n.__c?v=(p=t.__c=n.__c).__=p.__E:(b?t.__c=p=new ee(y,S):(t.__c=p=new A(y,S),p.constructor=ee,p.render=Ee),x&&x.sub(p),p.state||={},p.__n=r,m=p.__d=!0,p.__h=[],p._sb=[]),b&&p.__s==null&&(p.__s=p.state),b&&ee.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=ne({},p.__s)),ne(p.__s,ee.getDerivedStateFromProps(y,p.__s))),h=p.props,g=p.state,p.__v=t,m)b&&ee.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),b&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(b&&ee.getDerivedStateFromProps==null&&y!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(y,S),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(y,p.__s,S)){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)}),D.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&o.push(p);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(y,p.__s,S),b&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,g,_)})}if(p.context=S,p.props=y,p.__P=e,p.__e=!1,C=d.__r,w=0,b)p.state=p.__s,p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),D.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++w<25);p.state=p.__s,p.getChildContext!=null&&(r=ne(ne({},r),p.getChildContext())),b&&!m&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(h,g)),T=u!=null&&u.type===k&&u.key==null?Se(u.props.children):u,s=de(e,te(T)?T:[T],t,n,r,i,a,o,s,c,l),p.base=t.__e,t.__u&=-161,p.__h.length&&o.push(p),v&&(p.__E=p.__=null)}catch(e){if(o.length=f,t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a!=null&&(a[a.indexOf(s)]=null),t.__e=s}else if(a!=null)for(E=a.length;E--;)re(a[E])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||be(t),d.__e(e,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Ce(n.__e,t,n,r,i,a,o,c,l);return(u=d.diffed)&&u(t),128&t.__u?void 0:s}function be(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(be))}function xe(e,t,n){for(var r=0;r<n.length;r++)we(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){d.__e(e,t.__v)}})}function Se(e){return typeof e!=`object`||!e||e.__b>0?e:te(e)?e.map(Se):e.constructor===void 0?ne({},e):null}function Ce(e,t,n,r,i,a,o,s,c){var l,f,p,m,h,g,_,v=n.props||E,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((h=a[l])&&`setAttribute`in h==!!b&&(b?h.localName==b:h.nodeType==3)){e=h,a[l]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&=(d.__m&&d.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=b==`textarea`&&y.defaultValue!=null?null:a&&u.call(e.childNodes),!s&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(h=e.attributes[l]).name]=h.value;for(l in v)h=v[l],l==`dangerouslySetInnerHTML`?p=h:l==`children`||l in y||l==`value`&&`defaultValue`in y||l==`checked`&&`defaultChecked`in y||_e(e,l,null,h,i);for(l in y)h=y[l],l==`children`?m=h:l==`dangerouslySetInnerHTML`?f=h:l==`value`?g=h:l==`checked`?_=h:s&&typeof h!=`function`||v[l]===h||_e(e,l,h,v[l],i);if(f)s||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),de(t.type==`template`?e.content:e,te(m)?m:[m],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&oe(n,0),s,c),a!=null)for(l=a.length;l--;)re(a[l]);s&&b!=`textarea`||(l=`value`,b==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[l]||b==`progress`&&!g||b==`option`&&g!=v[l])&&_e(e,l,g,v[l],i),l=`checked`,_!=null&&_!=e[l]&&_e(e,l,_,v[l],i))}return e}function we(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){d.__e(e,n)}}function Te(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||we(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Te(r[i],t,n||typeof e.type!=`function`);n||re(e.__e),e.__c=e.__=e.__e=void 0}function Ee(e,t,n){return this.constructor(e,n)}function De(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),d.__&&d.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],ye(t,e=(!r&&n||t).__k=O(k,null,[e]),i||E,E,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?u.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),xe(a,e,o),e.props.children=null}function Oe(e,t){De(e,t,Oe)}function ke(e,t,n){var r,i,a,o,s=ne({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==`key`?r=t[a]:a==`ref`?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?u.call(arguments,2):n),ie(e.type,s,r||e.key,i||e.ref,null)}function Ae(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,le(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`+T++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}u=D.slice,d={__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}},f=0,p=function(e){return e!=null&&e.constructor===void 0},A.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state);typeof e==`function`&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),le(this))},A.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),le(this))},A.prototype.render=k,m=[],g=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,t){return e.__v.__b-t.__v.__b},ue.__r=0,v=Math.random().toString(8),y=`__d`+v,b=`__a`+v,x=/(PointerCapture)$|Capture$/i,S=0,C=ve(!1),w=ve(!0),T=0;function je(){return je=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},je.apply(this,arguments)}function Me(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 Ne=[`context`,`children`],Pe=[`useFragment`];function Fe(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(){Le.call(this,r)},i.prototype.attributeChangedCallback=ze,i.prototype.disconnectedCallback=Be,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 Ie(e){this.getChildContext=function(){return e.context};var t=e.children;return ke(t,Me(e,Ne))}function Le(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=O(Ie,je({},this._props,{context:t.detail.context}),He(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?Oe:De)(this._vdom,this._root)}function Re(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function ze(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[Re(e)]=n,this._vdom=ke(this._vdom,r),De(this._vdom,this._root)}}function Be(){De(this._vdom=null,this._root)}function Ve(e,t){var n=this,r=e.useFragment,i=Me(e,Pe);return O(r?k:`slot`,je({},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 He(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[Re(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=He(s[a],null,n),l=s[a].slot;l?i[l]=O(Ve,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?O(Ve,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),O(t||e.nodeName.toLowerCase(),i,d)}var Ue=`/*! 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)}}@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}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}: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");--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}: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,[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)}: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}.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;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;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);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,: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{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)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.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;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,.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).menu-focus,.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).menu-focus,.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).menu-focus,.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:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.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>*{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>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;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,bottom) var(--anchor-h,span-right);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],.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover],.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[popover],.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}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.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)}.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{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{transition:grid-template-rows .2s}}.collapse>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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse: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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse: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:has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:is(details){width:100%}.collapse:is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse: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:is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:is(details)>summary{outline:none;display:block;position:relative}.collapse: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}.validator:user-valid{--input-color:var(--color-success)}.validator:user-valid:focus{--input-color:var(--color-success)}.validator:user-valid:checked{--input-color:var(--color-success)}.validator:user-valid[aria-checked=true]{--input-color:var(--color-success)}.validator:user-valid:focus-within{--input-color:var(--color-success)}.validator:has(:user-valid){--input-color:var(--color-success)}.validator:has(:user-valid):focus{--input-color:var(--color-success)}.validator:has(:user-valid):checked{--input-color:var(--color-success)}.validator:has(:user-valid)[aria-checked=true]{--input-color:var(--color-success)}.validator:has(:user-valid):focus-within{--input-color:var(--color-success)}.validator:user-invalid{--input-color:var(--color-error)}.validator:user-invalid:focus{--input-color:var(--color-error)}.validator:user-invalid:checked{--input-color:var(--color-error)}.validator:user-invalid[aria-checked=true]{--input-color:var(--color-error)}.validator:user-invalid:focus-within{--input-color:var(--color-error)}.validator:user-invalid~.validator-hint{visibility:visible;color:var(--color-error)}.validator:has(:user-invalid){--input-color:var(--color-error)}.validator:has(:user-invalid):focus{--input-color:var(--color-error)}.validator:has(:user-invalid):checked{--input-color:var(--color-error)}.validator:has(:user-invalid)[aria-checked=true]{--input-color:var(--color-error)}.validator:has(:user-invalid):focus-within{--input-color:var(--color-error)}.validator:has(:user-invalid)~.validator-hint{visibility:visible;color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))),:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):checked,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))[aria-checked=true],:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus-within{--input-color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{visibility:visible;color:var(--color-error)}.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}: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,.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.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));--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));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,.input input{display:inline-flex;position:relative}:is(input.input,.input input)[type=url],:is(input.input,.input input)[type=email]{text-align:left}:is(input.input,.input input)::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my))}:is(input.input,.input input)::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}:is(input.input,.input input)::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus,.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,.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled]){box-shadow:none}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder,:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),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::-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-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.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}.avatar{vertical-align:middle;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,.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))}:is(.checkbox:checked,.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){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{:is(.checkbox:checked,.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}.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}.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));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,.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,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.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:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled]){box-shadow:none}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder,:is(.textarea:has(>textarea[disabled]),.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%}.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}.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}.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}.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}.footer.footer-center{text-align:center;grid-auto-flow:column dense;place-items:center}.footer.footer-center>:not(script,style,template){place-items:center}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.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}.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}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.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: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: }:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:host:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-scroll-lock: }@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}.modal:popover-open{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%}.tooltip:after{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%}@media (prefers-reduced-motion:no-preference){.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse.collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse.collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.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}.input{--in-size-mul:10;--font-size-min:.875rem;--spin-my:-3}.floating-label:has(.input){--top-mul:5;--font-size:.875rem}.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}.textarea{--font-size-min:.875rem}.floating-label:has(.textarea){--top-mul:5;--font-size:.875rem}: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}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;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-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{.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}@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}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){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}.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)){.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}.validator:user-invalid~.validator-hint{display:revert-layer}.validator:has(:user-invalid)~.validator-hint{display:revert-layer}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{display:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}@layer daisyui.l1.l2.l3.l4{.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}.card-body p{flex-grow:1}}.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-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-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:1}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){isolation:isolate}}: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)}}.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:3.40282e38px}.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-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-12{padding-inline:calc(var(--spacing) * 12)}.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-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}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/40{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/40{color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.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\\: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-6{padding-inline:calc(var(--spacing) * 6)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}}@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}}@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 dropdown{0%{opacity:0}}@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 radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes progress{50%{background-position-x:-115%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@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 menu{0%{opacity:0}}@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}}`,We,Ge,Ke,qe,Je=0,Ye=[],Xe=d,Ze=Xe.__b,Qe=Xe.__r,$e=Xe.diffed,et=Xe.__c,tt=Xe.unmount,nt=Xe.__;function rt(e,t){Xe.__h&&Xe.__h(Ge,e,Je||t),Je=0;var n=Ge.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function j(e){return Je=1,it(ht,e)}function it(e,t,n){var r=rt(We++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ht(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=Ge,!Ge.__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};Ge.__f=!0;var a=Ge.shouldComponentUpdate,o=Ge.componentWillUpdate;Ge.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)},Ge.shouldComponentUpdate=i}return r.__N||r.__}function M(e,t){var n=rt(We++,3);!Xe.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,Ge.__H.__h.push(n))}function at(e,t){var n=rt(We++,4);!Xe.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,Ge.__h.push(n))}function N(e){return Je=5,P(function(){return{current:e}},[])}function ot(e,t,n){Je=6,at(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function P(e,t){var n=rt(We++,7);return mt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function F(e,t){return Je=8,P(function(){return e},t)}function I(e){var t=Ge.context[e.__c],n=rt(We++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ge)),t.props.value):e.__}function st(e,t){Xe.useDebugValue&&Xe.useDebugValue(t?t(e):e)}function ct(){var e=rt(We++,11);if(!e.__){for(var t=Ge.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function lt(){for(var e;e=Ye.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ft),t.__h.some(pt),t.__h=[]}catch(n){t.__h=[],Xe.__e(n,e.__v)}}}Xe.__b=function(e){Ge=null,Ze&&Ze(e)},Xe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nt&&nt(e,t)},Xe.__r=function(e){Qe&&Qe(e),We=0;var t=(Ge=e.__c).__H;t&&(Ke===Ge?(t.__h=[],Ge.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ft),t.__h.some(pt),t.__h=[],We=0)),Ke=Ge},Xe.diffed=function(e){$e&&$e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ye.push(t)!==1&&qe===Xe.requestAnimationFrame||((qe=Xe.requestAnimationFrame)||dt)(lt)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Ke=Ge=null},Xe.__c=function(e,t){t.some(function(e){try{e.__h.some(ft),e.__h=e.__h.filter(function(e){return!e.__||pt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Xe.__e(n,e.__v)}}),et&&et(e,t)},Xe.unmount=function(e){tt&&tt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{ft(e)}catch(e){t=e}}),n.__H=void 0,t&&Xe.__e(t,n.__v))};var ut=typeof requestAnimationFrame==`function`;function dt(e){var t,n=function(){clearTimeout(r),ut&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ut&&(t=requestAnimationFrame(n))}function ft(e){var t=Ge,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ge=t}function pt(e){var t=Ge;e.__c=e.__(),Ge=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ht(e,t){return typeof t==`function`?t(e):t}var gt=20;gt*2,gt*2;function _t(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}var vt=0;Array.isArray;function L(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vt,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return d.vnode&&d.vnode(l),l}var yt=Ae(null);function bt(e){let t;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{}let n=!!e.token;return{layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:St(e[`conversational-context`]),customGreeting:St(e[`custom-greeting`]),memoryStores:Ct(e[`memory-stores`]),overrideConfig:t,expandOptions:_t(e[`expand-options`]),mode:n?`preview`:`production`}}function xt(e){let t=P(()=>bt({layout:e.layout,"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.layout,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 L(yt.Provider,{value:t,children:e.children})}function St(e){return e?.trim()||void 0}function Ct(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var wt=Symbol.for(`preact-signals`);function Tt(){if(jt>1)jt--;else{var e,t=!1;for((function(){var e=Ft;for(Ft=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}})();At!==void 0;){var n=At;for(At=void 0,Mt++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Bt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Mt=0,jt--,t)throw e}}function Et(e){if(jt>0)return e();Pt=++Nt,jt++;try{return e()}finally{Tt()}}var Dt,Ot=void 0;function kt(e){var t=Ot,n=Dt;Ot=void 0,Dt=void 0;try{return e()}finally{Ot=t,Dt=n}}var At=void 0,jt=0,Mt=0,Nt=0,Pt=0,Ft=void 0,It=0;function Lt(e){if(Ot!==void 0){var t=e.n;if(t===void 0||t.t!==Ot)return t={i:0,S:e,p:Ot.s,n:void 0,t:Ot,e:void 0,x:void 0,r:t},Ot.s!==void 0&&(Ot.s.n=t),Ot.s=t,e.n=t,32&Ot.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=Ot.s,t.n=void 0,Ot.s.n=t,Ot.s=t),t}}function Rt(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}Rt.prototype.brand=wt,Rt.prototype.h=function(){return!0},Rt.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?kt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Rt.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&&kt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Rt.prototype.subscribe=function(e){var t=this;return Yt(function(){var n=t.value;kt(function(){return e(n)})},{name:`sub`})},Rt.prototype.valueOf=function(){return this.value},Rt.prototype.toString=function(){return this.value+``},Rt.prototype.toJSON=function(){return this.value},Rt.prototype.peek=function(){var e=this;return kt(function(){return e.value})},Object.defineProperty(Rt.prototype,"value",{get:function(){var e=Lt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Mt>100)throw Error(`Cycle detected`);(function(e){jt!==0&&Mt===0&&e.l!==Pt&&(e.l=Pt,Ft={S:e,v:e.v,i:e.i,o:Ft})})(this),this.v=e,this.i++,It++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Tt()}}}});function zt(e,t){return new Rt(e,t)}function Bt(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 Vt(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 Ht(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 Ut(e,t){Rt.call(this,void 0,t),this.x=e,this.s=void 0,this.g=It-1,this.f=4}Ut.prototype=new Rt,Ut.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===It))return!0;if(this.g=It,this.f|=1,this.i>0&&!Bt(this))return this.f&=-2,!0;var e=Ot;try{Vt(this),Ot=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 Ot=e,Ht(this),this.f&=-2,!0},Ut.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)}Rt.prototype.S.call(this,e)},Ut.prototype.U=function(e){if(this.t!==void 0&&(Rt.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)}},Ut.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(Ut.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Lt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Wt(e,t){return new Ut(e,t)}function Gt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){jt++;var n=Ot;Ot=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Kt(e),t}finally{Ot=n,Tt()}}}function Kt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Gt(e)}function qt(e){if(Ot!==this)throw Error(`Out-of-order effect`);Ht(this),Ot=e,this.f&=-2,8&this.f&&Kt(this),Tt()}function Jt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Dt&&Dt.push(this)}Jt.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()}},Jt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Gt(this),Vt(this),jt++;var e=Ot;return Ot=this,qt.bind(this,e)},Jt.prototype.N=function(){2&this.f||(this.f|=2,this.u=At,At=this)},Jt.prototype.d=function(){this.f|=8,1&this.f||Kt(this)},Jt.prototype.dispose=function(){this.d()};function Yt(e,t){var n=new Jt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Xt,Zt,Qt=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,$t=[],en=[];Yt(function(){Xt=this.N})();function tn(e,t){d[e]=t.bind(null,d[e]||function(){})}function nn(e){if(Zt){var t=Zt;Zt=void 0,t()}Zt=e&&e.S()}function rn(e){var t=this,n=e.data,r=on(n);r.value=n;var i=P(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Wt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Wt(function(){return!Array.isArray(i.value)&&!p(i.value)}),o=Yt(function(){if(this.N=fn,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.value}rn.displayName=`ReactiveTextNode`,Object.defineProperties(Rt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:rn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),tn(`__b`,function(e,t){if(typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Rt&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),tn(`__r`,function(e,t){if(e(t),t.type!==k){nn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return Yt(function(){n=this},{name:t}),n.c=e,n}(function(){var e;Qt&&((e=n.y)==null||e.call(n)),r.__$f|=1,r.setState({})},typeof t.type==`function`?t.type.displayName||t.type.name:``))),nn(n)}}),tn(`__e`,function(e,t,n,r){nn(),e(t,n,r)}),tn(`diffed`,function(e,t){nn();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=an(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function an(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=zt(n);return{o:function(e,t){a.value=e,r=t},d:Yt(function(){this.N=fn;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))})}}tn(`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)}),tn(`__h`,function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),A.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 on(e,t){return P(function(){return zt(e,t)},[])}var sn=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},cn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ln(){Et(function(){for(var e;e=$t.shift();)Xt.call(e)})}function un(){$t.push(this)===1&&(d.requestAnimationFrame||sn)(ln)}function dn(){Et(function(){for(var e;e=en.shift();)Xt.call(e)})}function fn(){en.push(this)===1&&(d.requestAnimationFrame||cn)(dn)}function pn(e,t){var n=N(e);n.current=e,M(function(){return Yt(function(){return this.N=un,n.current()},t)},[])}function mn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var hn=mn(`API`);function gn(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token;async function r(e,r,i,a){let o={};i!=null&&(o[`Content-Type`]=`application/json`),n&&(o.Authorization=`Bearer ${n}`);let s=`${t}${r}`;hn.info(e,s);let c=await fetch(s,{method:e,headers:o,body:i==null?void 0:JSON.stringify(i),signal:a?.signal,keepalive:a?.keepalive});if(!c.ok){let t=await c.text().catch(()=>``);throw hn.error(`${e} ${s} → ${c.status}`,t),new _n(c.status,t||c.statusText,c.headers)}if(c.headers.get(`content-type`)?.includes(`application/json`))return await c.json()}return{get:(e,t)=>r(`GET`,e,void 0,t),post:(e,t,n)=>r(`POST`,e,t,n)}}var _n=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 vn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function yn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function bn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function xn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Sn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cn(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(Sn(a)&&Sn(i)?n[r]=Cn(a,i):n[r]=i)}return n}var wn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Tn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=wn(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),En=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=wn(),n=Tn(),r=wn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Tn();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=te(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=te(this.rhs,e,n),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=te(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ne(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(re(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=te(this.condition,e,t),this}get names(){let e=super.names;return ee(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=te(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ee(ee(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=te(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
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}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}: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");--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}: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,[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)}: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}.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;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;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);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,: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{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)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.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;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,.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).menu-focus,.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).menu-focus,.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).menu-focus,.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:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.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>*{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>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;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,bottom) var(--anchor-h,span-right);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],.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover],.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[popover],.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}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.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)}.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{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{transition:grid-template-rows .2s}}.collapse>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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse: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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse: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:has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:is(details){width:100%}.collapse:is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse: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:is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:is(details)>summary{outline:none;display:block;position:relative}.collapse: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}.validator:user-valid{--input-color:var(--color-success)}.validator:user-valid:focus{--input-color:var(--color-success)}.validator:user-valid:checked{--input-color:var(--color-success)}.validator:user-valid[aria-checked=true]{--input-color:var(--color-success)}.validator:user-valid:focus-within{--input-color:var(--color-success)}.validator:has(:user-valid){--input-color:var(--color-success)}.validator:has(:user-valid):focus{--input-color:var(--color-success)}.validator:has(:user-valid):checked{--input-color:var(--color-success)}.validator:has(:user-valid)[aria-checked=true]{--input-color:var(--color-success)}.validator:has(:user-valid):focus-within{--input-color:var(--color-success)}.validator:user-invalid{--input-color:var(--color-error)}.validator:user-invalid:focus{--input-color:var(--color-error)}.validator:user-invalid:checked{--input-color:var(--color-error)}.validator:user-invalid[aria-checked=true]{--input-color:var(--color-error)}.validator:user-invalid:focus-within{--input-color:var(--color-error)}.validator:user-invalid~.validator-hint{visibility:visible;color:var(--color-error)}.validator:has(:user-invalid){--input-color:var(--color-error)}.validator:has(:user-invalid):focus{--input-color:var(--color-error)}.validator:has(:user-invalid):checked{--input-color:var(--color-error)}.validator:has(:user-invalid)[aria-checked=true]{--input-color:var(--color-error)}.validator:has(:user-invalid):focus-within{--input-color:var(--color-error)}.validator:has(:user-invalid)~.validator-hint{visibility:visible;color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))),:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):checked,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))[aria-checked=true],:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus-within{--input-color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{visibility:visible;color:var(--color-error)}.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}: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,.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.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));--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));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,.input input{display:inline-flex;position:relative}:is(input.input,.input input)[type=url],:is(input.input,.input input)[type=email]{text-align:left}:is(input.input,.input input)::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my))}:is(input.input,.input input)::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}:is(input.input,.input input)::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus,.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,.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled]){box-shadow:none}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder,:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),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::-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-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.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}.avatar{vertical-align:middle;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,.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))}:is(.checkbox:checked,.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){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{:is(.checkbox:checked,.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}.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}.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));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,.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,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.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:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled]){box-shadow:none}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder,:is(.textarea:has(>textarea[disabled]),.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%}.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}.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}.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}.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}.footer.footer-center{text-align:center;grid-auto-flow:column dense;place-items:center}.footer.footer-center>:not(script,style,template){place-items:center}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.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}.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}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.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: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: }:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:host:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-scroll-lock: }@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}.modal:popover-open{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%}.tooltip:after{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%}@media (prefers-reduced-motion:no-preference){.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse.collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse.collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.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}.input{--in-size-mul:10;--font-size-min:.875rem;--spin-my:-3}.floating-label:has(.input){--top-mul:5;--font-size:.875rem}.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}.textarea{--font-size-min:.875rem}.floating-label:has(.textarea){--top-mul:5;--font-size:.875rem}: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}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;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{.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}@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}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){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}.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)){.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}.validator:user-invalid~.validator-hint{display:revert-layer}.validator:has(:user-invalid)~.validator-hint{display:revert-layer}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{display:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}@layer daisyui.l1.l2.l3.l4{.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}.card-body p{flex-grow:1}}.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-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-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:1}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){isolation:isolate}}: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)}}.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:3.40282e38px}.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\\: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}}@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 dropdown{0%{opacity:0}}@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 radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes progress{50%{background-position-x:-115%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@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 menu{0%{opacity:0}}@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}}`,We,Ge,Ke,qe,Je=0,Ye=[],Xe=d,Ze=Xe.__b,Qe=Xe.__r,$e=Xe.diffed,et=Xe.__c,tt=Xe.unmount,nt=Xe.__;function rt(e,t){Xe.__h&&Xe.__h(Ge,e,Je||t),Je=0;var n=Ge.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function j(e){return Je=1,it(ht,e)}function it(e,t,n){var r=rt(We++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ht(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=Ge,!Ge.__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};Ge.__f=!0;var a=Ge.shouldComponentUpdate,o=Ge.componentWillUpdate;Ge.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)},Ge.shouldComponentUpdate=i}return r.__N||r.__}function M(e,t){var n=rt(We++,3);!Xe.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,Ge.__H.__h.push(n))}function at(e,t){var n=rt(We++,4);!Xe.__s&&mt(n.__H,t)&&(n.__=e,n.u=t,Ge.__h.push(n))}function N(e){return Je=5,P(function(){return{current:e}},[])}function ot(e,t,n){Je=6,at(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function P(e,t){var n=rt(We++,7);return mt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function F(e,t){return Je=8,P(function(){return e},t)}function I(e){var t=Ge.context[e.__c],n=rt(We++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ge)),t.props.value):e.__}function st(e,t){Xe.useDebugValue&&Xe.useDebugValue(t?t(e):e)}function ct(){var e=rt(We++,11);if(!e.__){for(var t=Ge.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function lt(){for(var e;e=Ye.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ft),t.__h.some(pt),t.__h=[]}catch(n){t.__h=[],Xe.__e(n,e.__v)}}}Xe.__b=function(e){Ge=null,Ze&&Ze(e)},Xe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nt&&nt(e,t)},Xe.__r=function(e){Qe&&Qe(e),We=0;var t=(Ge=e.__c).__H;t&&(Ke===Ge?(t.__h=[],Ge.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ft),t.__h.some(pt),t.__h=[],We=0)),Ke=Ge},Xe.diffed=function(e){$e&&$e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ye.push(t)!==1&&qe===Xe.requestAnimationFrame||((qe=Xe.requestAnimationFrame)||dt)(lt)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Ke=Ge=null},Xe.__c=function(e,t){t.some(function(e){try{e.__h.some(ft),e.__h=e.__h.filter(function(e){return!e.__||pt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Xe.__e(n,e.__v)}}),et&&et(e,t)},Xe.unmount=function(e){tt&&tt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{ft(e)}catch(e){t=e}}),n.__H=void 0,t&&Xe.__e(t,n.__v))};var ut=typeof requestAnimationFrame==`function`;function dt(e){var t,n=function(){clearTimeout(r),ut&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ut&&(t=requestAnimationFrame(n))}function ft(e){var t=Ge,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ge=t}function pt(e){var t=Ge;e.__c=e.__(),Ge=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ht(e,t){return typeof t==`function`?t(e):t}var gt=20;gt*2,gt*2;function _t(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}var vt=0;Array.isArray;function L(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vt,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return d.vnode&&d.vnode(l),l}var yt=Ae(null);function bt(e){let t;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{}let n=!!e.token;return{layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:St(e[`conversational-context`]),customGreeting:St(e[`custom-greeting`]),memoryStores:Ct(e[`memory-stores`]),overrideConfig:t,expandOptions:_t(e[`expand-options`]),mode:n?`preview`:`production`}}function xt(e){let t=P(()=>bt({layout:e.layout,"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.layout,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 L(yt.Provider,{value:t,children:e.children})}function St(e){return e?.trim()||void 0}function Ct(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var wt=Symbol.for(`preact-signals`);function Tt(){if(jt>1)jt--;else{var e,t=!1;for((function(){var e=Ft;for(Ft=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}})();At!==void 0;){var n=At;for(At=void 0,Mt++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Bt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Mt=0,jt--,t)throw e}}function Et(e){if(jt>0)return e();Pt=++Nt,jt++;try{return e()}finally{Tt()}}var Dt,Ot=void 0;function kt(e){var t=Ot,n=Dt;Ot=void 0,Dt=void 0;try{return e()}finally{Ot=t,Dt=n}}var At=void 0,jt=0,Mt=0,Nt=0,Pt=0,Ft=void 0,It=0;function Lt(e){if(Ot!==void 0){var t=e.n;if(t===void 0||t.t!==Ot)return t={i:0,S:e,p:Ot.s,n:void 0,t:Ot,e:void 0,x:void 0,r:t},Ot.s!==void 0&&(Ot.s.n=t),Ot.s=t,e.n=t,32&Ot.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=Ot.s,t.n=void 0,Ot.s.n=t,Ot.s=t),t}}function Rt(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}Rt.prototype.brand=wt,Rt.prototype.h=function(){return!0},Rt.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?kt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Rt.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&&kt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Rt.prototype.subscribe=function(e){var t=this;return Yt(function(){var n=t.value;kt(function(){return e(n)})},{name:`sub`})},Rt.prototype.valueOf=function(){return this.value},Rt.prototype.toString=function(){return this.value+``},Rt.prototype.toJSON=function(){return this.value},Rt.prototype.peek=function(){var e=this;return kt(function(){return e.value})},Object.defineProperty(Rt.prototype,"value",{get:function(){var e=Lt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Mt>100)throw Error(`Cycle detected`);(function(e){jt!==0&&Mt===0&&e.l!==Pt&&(e.l=Pt,Ft={S:e,v:e.v,i:e.i,o:Ft})})(this),this.v=e,this.i++,It++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Tt()}}}});function zt(e,t){return new Rt(e,t)}function Bt(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 Vt(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 Ht(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 Ut(e,t){Rt.call(this,void 0,t),this.x=e,this.s=void 0,this.g=It-1,this.f=4}Ut.prototype=new Rt,Ut.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===It))return!0;if(this.g=It,this.f|=1,this.i>0&&!Bt(this))return this.f&=-2,!0;var e=Ot;try{Vt(this),Ot=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 Ot=e,Ht(this),this.f&=-2,!0},Ut.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)}Rt.prototype.S.call(this,e)},Ut.prototype.U=function(e){if(this.t!==void 0&&(Rt.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)}},Ut.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(Ut.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Lt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Wt(e,t){return new Ut(e,t)}function Gt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){jt++;var n=Ot;Ot=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Kt(e),t}finally{Ot=n,Tt()}}}function Kt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Gt(e)}function qt(e){if(Ot!==this)throw Error(`Out-of-order effect`);Ht(this),Ot=e,this.f&=-2,8&this.f&&Kt(this),Tt()}function Jt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Dt&&Dt.push(this)}Jt.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()}},Jt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Gt(this),Vt(this),jt++;var e=Ot;return Ot=this,qt.bind(this,e)},Jt.prototype.N=function(){2&this.f||(this.f|=2,this.u=At,At=this)},Jt.prototype.d=function(){this.f|=8,1&this.f||Kt(this)},Jt.prototype.dispose=function(){this.d()};function Yt(e,t){var n=new Jt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Xt,Zt,Qt=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,$t=[],en=[];Yt(function(){Xt=this.N})();function tn(e,t){d[e]=t.bind(null,d[e]||function(){})}function nn(e){if(Zt){var t=Zt;Zt=void 0,t()}Zt=e&&e.S()}function rn(e){var t=this,n=e.data,r=on(n);r.value=n;var i=P(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Wt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Wt(function(){return!Array.isArray(i.value)&&!p(i.value)}),o=Yt(function(){if(this.N=fn,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.value}rn.displayName=`ReactiveTextNode`,Object.defineProperties(Rt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:rn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),tn(`__b`,function(e,t){if(typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Rt&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),tn(`__r`,function(e,t){if(e(t),t.type!==k){nn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return Yt(function(){n=this},{name:t}),n.c=e,n}(function(){var e;Qt&&((e=n.y)==null||e.call(n)),r.__$f|=1,r.setState({})},typeof t.type==`function`?t.type.displayName||t.type.name:``))),nn(n)}}),tn(`__e`,function(e,t,n,r){nn(),e(t,n,r)}),tn(`diffed`,function(e,t){nn();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=an(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function an(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=zt(n);return{o:function(e,t){a.value=e,r=t},d:Yt(function(){this.N=fn;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))})}}tn(`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)}),tn(`__h`,function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),A.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 on(e,t){return P(function(){return zt(e,t)},[])}var sn=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},cn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ln(){Et(function(){for(var e;e=$t.shift();)Xt.call(e)})}function un(){$t.push(this)===1&&(d.requestAnimationFrame||sn)(ln)}function dn(){Et(function(){for(var e;e=en.shift();)Xt.call(e)})}function fn(){en.push(this)===1&&(d.requestAnimationFrame||cn)(dn)}function pn(e,t){var n=N(e);n.current=e,M(function(){return Yt(function(){return this.N=un,n.current()},t)},[])}function mn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var hn=mn(`API`);function gn(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token;async function r(e,r,i,a){let o={};i!=null&&(o[`Content-Type`]=`application/json`),n&&(o.Authorization=`Bearer ${n}`);let s=`${t}${r}`;hn.info(e,s);let c=await fetch(s,{method:e,headers:o,body:i==null?void 0:JSON.stringify(i),signal:a?.signal,keepalive:a?.keepalive});if(!c.ok){let t=await c.text().catch(()=>``);throw hn.error(`${e} ${s} → ${c.status}`,t),new _n(c.status,t||c.statusText,c.headers)}if(c.headers.get(`content-type`)?.includes(`application/json`))return await c.json()}return{get:(e,t)=>r(`GET`,e,void 0,t),post:(e,t,n)=>r(`POST`,e,t,n)}}var _n=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 vn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function yn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function bn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function xn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Sn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cn(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(Sn(a)&&Sn(i)?n[r]=Cn(a,i):n[r]=i)}return n}var wn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Tn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=wn(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),En=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=wn(),n=Tn(),r=wn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Tn();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=te(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=te(this.rhs,e,n),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=te(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ne(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(re(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=te(this.condition,e,t),this}get names(){let e=super.names;return ee(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=te(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ee(ee(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=te(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
3
3
  `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function ee(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function te(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ne(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function re(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${oe(e)}`}e.not=re;var O=A(e.operators.AND);function ie(...e){return e.reduce(O)}e.and=ie;var ae=A(e.operators.OR);function k(...e){return e.reduce(ae)}e.or=k;function A(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${oe(n)} ${e} ${oe(r)}`}function oe(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),Dn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=En(),n=wn();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),On=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=En();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=En(),n=Dn(),r=On();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),An=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=kn(),n=En(),r=On(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),jn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Mn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Nn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=jn(),n=Mn(),r=kn(),i=En(),a=Dn(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
4
4
  || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
5
5
  || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
@@ -48,12 +48,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
48
48
  pointer-events: none;
49
49
  `,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?_m[e]:Object.values(_m)[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,te,ne,re,O,ie,ae,k,A,oe,se}();function Nm(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 Pm(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]=jf;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 Fm(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 Im(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function Lm(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(Im(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function Rm(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 zm(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 Bm(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 Vm(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 Hm(){if(Hf())throw Error(`This daily-js method is not currently supported in React Native`)}function Um(){if(!Hf())throw Error(`This daily-js method is only supported in React Native`)}function Wm(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),Ro(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 Gm(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=Ao(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function Km(e){if(vo(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Ao(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(vo(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Ao(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!Ym(u))return!1;break;case`settings`:if(!Xm(u))return!1;break;default:return!1}}break;case`audio`:if(vo(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Ao(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!Jm(h))return!1;break;case`settings`:if(!Xm(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function qm(e,t,n){var r,i=[];e.video&&e.video.processor&&(Xf((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(Zf()||(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:jf}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:jf}):delete n.videoTrack)}function Jm(e){if(Hf())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&vo(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(Nf).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function Ym(e){if(Hf())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||vo(e)!==`object`||!function(e){return typeof e==`string`?Object.values(Mf).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(vo(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 Mf.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 Mf.BGIMAGE:return!(t.source!==void 0&&!function(e){if(e.source==="default")return e.type=`default`,!0;if(e.source instanceof ArrayBuffer)return!0;if(as(e.source))return 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 Lf.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return Lf.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${Lf.join(`, `)}]`),!1);return 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 Xm(e){return vo(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Zm(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(Mf).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Nf).join(` | `)} ] } } }`}function Qm(e){return`receiveSettings must be of the form { [<remote participant id> | ${Td}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function $m(){return`customIntegrations should be an object of type ${JSON.stringify(Dm)}.`}function eh(e){if(e&&vo(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(Em)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Ao(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Ao(a[i],2),s=o[0],c=o[1],l=Em.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!as(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(vo(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function th(e){if(!e||e&&vo(e)!==`object`||Array.isArray(e))return console.error($m()),!1;for(var t=function(e){return`${e} should be ${Dm.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Ao(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=Ao(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(!as(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(!as(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(!Dm.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function nh(e,t){if(t===void 0)return!1;switch(vo(t)){case`string`:return vo(e)===t;case`object`:if(vo(e)!==`object`)return!1;for(var n in e)if(!nh(e[n],t[n]))return!1;return!0;default:return!1}}function rh(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 ih(e){if(vo(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(Pf).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(Pf));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 ah(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function oh(e,t){return e&&!t&&delete e.data,e}function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}var W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)};function ch(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function lh(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function uh(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function dh(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function fh(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ph(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mh=Ae(null),hh=function(){var e=I(mh);return st(e),e},gh=Ae({on:function(){},off:function(){}}),_h=-1,vh=function(){return _h--},yh=1,bh=function(){return yh++},G=function(e,t,n){n===void 0&&(n=!1);var r=I(gh),i=r.off,a=r.on,o=fh(j(!1),2),s=o[0],c=o[1],l=N(0),u=P(function(){return n?vh():bh()},[n]);M(function(){if(!(!e||s)){if(l.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
50
50
  Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
51
- Passed callback for '${e}' event is NOT registered.`,t),c(!0);return}l.current++;var n=setTimeout(function(){l.current=0},50);return a(e,t,u),function(){clearTimeout(n),i(e,u)}}},[t,e,u,s,i,a]),st({event:e,eventId:u,isBlocked:s,callback:t})};function xh(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!xh(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return xh(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(e,t){return xh(e,o[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=dh(e.entries()),c=s.next();!c.done;c=s.next()){var l=fh(c.value,2),u=l[0],d=l[1];if(!t.has(u)||!xh(d,t.get(u)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(sh(e)!==`object`||e===null||sh(t)!==`object`||t===null)return!1;var f=Object.keys(e),p=Object.keys(t);if(f.length!==p.length)return!1;for(var i=0;i<f.length;i++){var u=f[i];if(!Object.prototype.hasOwnProperty.call(t,u)||!xh(e[u],t[u]))return!1}return!0}function Sh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],a=r!==null&&sh(r)===`object`,o=i!==null&&sh(i)===`object`;if(a||o){if(!xh(r,i))return!1}else if(r!==i)return!1}return!0}function Ch(e){return`daily-react-`+e}function wh(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ea(function(t){var i=e.get(r)(t),a=n.get(r);return a!=null&&e.equals(i,a)?a:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var Th=`::`,Eh=`;`,Dh=function(e,t){return e+Th+t},Oh=function(e,t){return e+Th+t.join(Eh)},kh=function(e,t){return jh(Dh(e,t))},Ah=ho(function(e){var t=ea([]);return t.debugLabel=Ch(`participant-property-paths-${e}`),t}),jh=ho(function(e){var t=ea(null);return t.debugLabel=Ch(`participant-property-${e}`),t}),Mh=wh({equals:Sh,get:function(e){return function(t){var n=fh(e.split(Th),2),r=n[0];return n[1].split(Eh).map(function(e){return t(kh(r,e))})}}}),Nh=function(e,t){var n,r=fo(Array.isArray(t)?Mh(Oh(e,t)):jh(Dh(e,t)));return st(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):(n={},n[t]=r,n)),r},Ph=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function Fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1;var e=`Expected a function`,t=NaN,n=`[object Symbol]`,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=sh(Ph)==`object`&&Ph&&Ph.Object===Object&&Ph,l=(typeof self>`u`?`undefined`:sh(self))==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,g=!0;if(typeof t!=`function`)throw TypeError(e);n=b(n)||0,_(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(b(r.maxWait)||0,n):o,g=`trailing`in r?!!r.trailing:g);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,g&&i?v(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(m())}function D(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return y(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return D.cancel=T,D.flush=E,D}function g(t,n,r){var i=!0,a=!0;if(typeof t!=`function`)throw TypeError(e);return _(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),h(t,n,{leading:i,maxWait:n,trailing:a})}function _(e){var t=sh(e);return!!e&&(t==`object`||t==`function`)}function v(e){return!!e&&sh(e)==`object`}function y(e){return sh(e)==`symbol`||v(e)&&d.call(e)==n}function b(e){if(typeof e==`number`)return e;if(y(e))return t;if(_(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=_(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return Ih=g,Ih}var zh=Fh(Rh()),Bh=function(e,t,n,r){n===void 0&&(n=500),r===void 0&&(r=!1);var i=I(gh),a=i.off,o=i.on,s=P(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?vh():bh(),e},{}):(t={},t[e]=r?vh():bh(),t)},[e,r]),c=N([]);G(`call-instance-destroyed`,F(function(){c.current.length=0},[]));var l=P(function(){return zh(function(){c.current.length!==0&&(t(c.current),c.current.length=0)},n,{trailing:!0})},[t,n]);M(function(){if(e){var t=function(e){c.current.push(e),l()};return Array.isArray(e)?e.forEach(function(e){return o(e,t,s[e])}):o(e,t,s[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,s[e])}):a(e,s[e])}}},[l,e,s,a,o]),st({event:e,eventId:s})},Vh=function(e,t,n){if(t===void 0&&(t=``),n===void 0&&(n=new Set),sh(e)!==`object`||e===null||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=t?`${t}.${i}`:i;r.push.apply(r,ph([a],fh(Vh(e[i],a,n)),!1))}return n.delete(e),r},Hh=function(e){return Vh(e)},Uh=function(e,t){return String(t).split(`.`).filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)},Wh=function(e,t){return t.map(function(t){return Uh(e,t)})},Gh=ea(null);Gh.debugLabel=Ch(`active-id`);var Kh=ea(``);Kh.debugLabel=Ch(`local-id`);var qh=ea(null);qh.debugLabel=Ch(`local-join-date`);var Jh=ea([]);Jh.debugLabel=Ch(`participant-ids`);var Yh=ho(function(e){var t=ea(null);return t.debugLabel=Ch(`participant-${e}`),t}),Xh=ea([]);Xh.debugLabel=Ch(`waiting-participants`);var Zh=ho(function(e){var t=ea({awaitingAccess:{level:`full`},id:e,name:``});return t.debugLabel=Ch(`waiting-participant-${e}`),t}),Qh=function(e){var t=e.children,n=hh(),r=fh(j(!1),2),i=r[0],a=r[1],o=mo(F(function(e,t,n){t(Kh,n.local.session_id);var r=Object.values(n);t(Jh,r.map(function(e){return e.session_id})),r.forEach(function(e){t(Yh(e.session_id),e);var n=Hh(e);t(Ah(e.session_id),n),n.forEach(function(n){var r=fh(Wh(e,[n]),1)[0];t(kh(e.session_id,n),r)})}),a(!0)},[]));M(function(){if(!(!n||i)){var e=setInterval(function(){var t=n.participants();`local`in t&&(o(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,i,o]);var s=F(function(){if(n){var e=n?.participants();e.local&&o(e)}},[n,o]);G(`started-camera`,s,!0),G(`access-state-updated`,s,!0),G(`joining-meeting`,mo(F(function(e,t){t(qh,new Date),s()},[s])),!0),G(`joined-meeting`,F(function(e){o(e.participants)},[o]),!0);var c=mo(F(function(e,t){t(Kh,``),t(Gh,null),e(Jh).forEach(function(e){return Yh.remove(e)}),t(Jh,[])},[]));return G(`call-instance-destroyed`,c,!0),G(`left-meeting`,c,!0),Bh([`active-speaker-change`,`participant-joined`,`participant-updated`,`participant-left`],mo(F(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case`active-speaker-change`:t(Gh,n.activeSpeaker.peerId),t(Yh(n.activeSpeaker.peerId),function(e){return e?W(W({},e),{last_active:new Date}):null});break;case`participant-joined`:t(Jh,function(e){return e.includes(n.participant.session_id)?e:ph(ph([],fh(e),!1),[n.participant.session_id],!1)}),t(Yh(n.participant.session_id),n.participant);var r=Hh(n.participant);t(Ah(n.participant.session_id),r),r.forEach(function(e){var r=fh(Wh(n.participant,[e]),1)[0];t(kh(n.participant.session_id,e),r)});break;case`participant-updated`:t(Yh(n.participant.session_id),n.participant),n.participant.local&&t(Kh,n.participant.session_id);var r=Hh(n.participant),i=e(Ah(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(Ah(n.participant.session_id),r);var a=new Set(i),o=Wh(n.participant,r);r.forEach(function(e,r){var i=o[r];a.delete(e),t(kh(n.participant.session_id,e),function(e){return xh(e,i)?e:i})}),a.forEach(function(e){t(kh(n.participant.session_id,e),null)});break;case`participant-left`:t(Jh,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),Yh.remove(n.participant.session_id),e(Ah(n.participant.session_id)).forEach(function(e){jh.remove(Dh(n.participant.session_id,e))}),Ah.remove(n.participant.session_id);break}})},[])),100,!0),Bh([`waiting-participant-added`,`waiting-participant-updated`,`waiting-participant-removed`],mo(F(function(e,t,n){n.forEach(function(e){switch(e.action){case`waiting-participant-added`:t(Xh,function(t){return t.includes(e.participant.id)?t:ph(ph([],fh(t),!1),[e.participant.id],!1)}),t(Zh(e.participant.id),e.participant);break;case`waiting-participant-updated`:t(Zh(e.participant.id),e.participant);break;case`waiting-participant-removed`:t(Xh,function(t){return t.filter(function(t){return t!==e.participant.id})}),Zh.remove(e.participant.id);break}})},[])),100,!0),no.createElement(no.Fragment,null,t)},$h=function(){var e=fo(Kh);return st(e),e},eg=function(){return!0},tg=function(e){var t=e===void 0?{}:e,n=t.filter,r=n===void 0?eg:n,i=t.ignoreLocal,a=i===void 0?!1:i,o=$h(),s=fo(Gh),c=a&&s===o,l=!r?.(s),u=fh(j(!c&&!l?s:null),2),d=u[0],f=u[1];return M(function(){c||l||f(s)},[l,c,s]),st(d),d},ng=function(e){return[`blocked`,`off`].includes(e)},rg=`;`,ig=function(e,t){return`${e}${rg}${t}`},ag=wh({equals:xh,get:function(e){return function(t){var n=fh(e.split(rg),2),r=n[0],i=n[1];return t(Jh).filter(function(e){switch(r){case`local`:case`owner`:case`record`:return t(kh(e,r));case`remote`:return!t(kh(e,`local`));case`screen`:var n=t(kh(e,`tracks.screenAudio.state`)),i=t(kh(e,`tracks.screenVideo.state`));return!ng(n)||!ng(i);default:return!0}}).sort(function(e,n){switch(i){case`joined_at`:case`session_id`:case`user_id`:case`user_name`:var r=t(kh(e,i)),a=t(kh(n,i));if(r!==void 0||a!==void 0){if(r===void 0)return-1;if(a===void 0||r>a)return 1;if(r<a)return-1}return 0;default:return 0}})}}}),og=function(e){var t=e===void 0?{}:e,n=t.filter,r=t.onActiveSpeakerChange,i=t.onParticipantJoined,a=t.onParticipantLeft,o=t.onParticipantUpdated,s=t.sort,c=fo(ag(ig(typeof n==`string`?n:null,typeof s==`string`?s:null))),l=typeof n==`function`||typeof s==`function`,u=F(function(e){return typeof n!=`function`&&typeof s!=`function`?[]:c.map(function(t){return e(Yh(t))}).filter(function(e){return!!e}).filter(typeof n==`function`?n:function(){return!0}).sort(typeof s==`function`?s:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,c,s]),d=fh(j([]),2),f=d[0],p=d[1],m=mo(F(function(e){if(l){var t=u(e);xh(t,f)||p(t)}},[f,u,l]));M(function(){m()},[m]),Bh([`participant-joined`,`participant-updated`,`active-speaker-change`,`participant-left`],F(function(e){e.length&&(e.forEach(function(e){switch(e.action){case`participant-joined`:i?.(e);break;case`participant-updated`:o?.(e);break;case`active-speaker-change`:r?.(e);break;case`participant-left`:a?.(e);break}}),m())},[m,r,i,a,o]));var h=typeof n==`function`||typeof s==`function`?f:c;return st(h),h},sg=wh({equals:Sh,get:function(){return function(e){return e(ag(ig(`screen`,null))).map(function(t){return{local:e(kh(t,`local`)),screenAudio:e(kh(t,`tracks.screenAudio`)),screenVideo:e(kh(t,`tracks.screenVideo`)),screenId:`${t}-screen`,session_id:t}})}}}),cg=function(e){var t=e===void 0?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,i=t.onLocalScreenShareStopped,a=hh(),o=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.startScreenShare.apply(a,ph([],fh(e),!1))},[a]),s=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.stopScreenShare.apply(a,ph([],fh(e),!1))},[a]);G(`local-screen-share-started`,F(function(){return r?.()},[r])),G(`local-screen-share-stopped`,F(function(){return i?.()},[i])),G(`nonfatal-error`,F(function(e){e.type===`screen-share-error`&&n?.(e)},[n]));var c=fo(sg(void 0)),l={isSharingScreen:c.some(function(e){return e.local}),screens:c,startScreenShare:o,stopScreenShare:s};return st(l),l},lg=function(e,t){t===void 0&&(t=`video`);var n=Nh(e,`tracks.${t}`),r=n?W(W({},n),{isOff:ng(n.state)}):{isOff:!0,persistentTrack:void 0,state:`off`,subscribed:!1};return st(r),r};function ug(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return F(function(t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):r&&sh(r)===`object`&&(r.current=t)}},e)}var dg=ga(ya(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?`audio`:i,o=ch(e,[`onPlayFailed`,`sessionId`,`type`]),s=N(null),c=lg(r,a),l=ug(s,t),u=c?.subscribed;return M(function(){var e=s.current;if(!(!e||!c?.persistentTrack)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${a} for ${r}`),n?.({sessionId:r,target:e,type:a,message:`MediaStream API not available`,name:`MediaStream API not available`});return}var t=function(){e.play().catch(function(t){n?.({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener(`loadedmetadata`,t),e.srcObject=new MediaStream([c.persistentTrack]),e.load(),function(){e.removeEventListener(`loadedmetadata`,t)}}},[c?.persistentTrack,n,r,a]),G(`participant-left`,F(function(e){var t=s.current;e.participant.session_id!==r||!t||(t.srcObject=null)},[r])),G(`left-meeting`,F(function(){var e=s.current;e&&(e.pause(),e.srcObject=null)},[])),no.createElement(`audio`,W({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":u}))}));dg.displayName=`DailyAudioTrack`;var fg=ga(ya(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,a=i===void 0?5:i,o=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=hh(),u=fh(j(Array(a).fill(``)),2),d=u[0],f=u[1],p=cg().screens,m=$h(),h=tg({ignoreLocal:!0}),g=N(null);ot(t,function(){return{getActiveSpeakerAudio:function(){return g.current?.querySelector(`audio[data-session-id="${h}"][data-audio-type="audio"]`)??null},getAllAudio:function(){return Array.from(g.current?.querySelectorAll(`audio`)??[])},getAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="audio"]`)??null},getRmpAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="rmpAudio"]`)??[])},getScreenAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="screenAudio"]`)??[])},getRmpAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="rmpAudio"]`)??null},getScreenAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="screenAudio"]`)??null}}},[h]);var _=mo(F(function(e,t,n){return lh(void 0,void 0,void 0,function(){var t,i;return uh(this,function(a){if(t=Object.values(l?.participants()??{}).filter(function(e){return!e.local&&!!e.tracks.audio.subscribed}),i=function(e){return t.some(function(t){return t.session_id===e})},!i(n))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(n,{setSubscribedTracks:{audio:!0}});else return[2];return f(function(r){if(r.includes(n))return r;var a=function(e){return!e||!i(e)};if(r.some(a)){var o=r.findIndex(a);return r[o]=n,ph([],fh(r),!1)}var s=r.findIndex(function(e){return t.some(function(t){return t.session_id===e&&ng(t.tracks.audio.state)})});if(s>=0)return r[s]=n,ph([],fh(r),!1);var c=t.filter(function(e){return r.includes(e.session_id)&&e.session_id!==h}).sort(function(t,n){var r=e(kh(t.session_id,`last_active`))??new Date(`1970-01-01`),i=e(kh(n.session_id,`last_active`))??new Date(`1970-01-01`);return r>i?1:r<i?-1:0});if(!c.length){var l=r.findIndex(function(e){return e!==h});return r[l]=n,ph([],fh(r),!1)}var u=r.indexOf(c[0]?.session_id);return r[u]=n,ph([],fh(r),!1)}),[2]})})},[h,r,l])),v=F(function(e){f(function(t){if(!t.includes(e))return t;var n=ph([],fh(t),!1),r=n.indexOf(e);return n[r]=``,n})},[]);Bh([`active-speaker-change`,`track-started`,`participant-left`],F(function(e){e.forEach(function(e){switch(e.action){case`active-speaker-change`:if(e.activeSpeaker.peerId===m)return;_(e.activeSpeaker.peerId);break;case`track-started`:e.track.kind===`audio`&&e.participant&&!e.participant.local&&_(e.participant.session_id);break;case`participant-left`:v(e.participant.session_id);break}})},[_,m,v]),200);var y=og({filter:F(function(e){return!!e?.tracks?.rmpAudio},[])});return no.createElement(`div`,{ref:g},d.map(function(e,t){return no.createElement(dg,{key:`speaker-slot-${t}`,onPlayFailed:o,sessionId:e,type:`audio`})}),p.filter(function(e){return c?!0:!e.local}).map(function(e){return no.createElement(dg,{key:e.screenId,onPlayFailed:o,sessionId:e.session_id,type:`screenAudio`})}),y.map(function(e){return no.createElement(dg,{key:`${e}-rmp`,onPlayFailed:o,sessionId:e,type:`rmpAudio`})}))}));fg.displayName=`DailyAudio`;var pg=ya(function(e,t){var n=e.automirror,r=e.fit,i=r===void 0?`contain`:r,a=e.mirror,o=e.onResize,s=e.playableStyle,c=s===void 0?{}:s,l=e.sessionId,u=e.style,d=u===void 0?{}:u,f=e.type,p=f===void 0?`video`:f,m=ch(e,[`automirror`,`fit`,`mirror`,`onResize`,`playableStyle`,`sessionId`,`style`,`type`]),h=$h()===l,g=p===`screenVideo`,_=h&&!g,v=N(null),y=ug(v,t),b=lg(l,p),x=b.persistentTrack,S=_||g||!b.isOff,C=Nh(l,`tracks.${p}`)?.subscribed,w=P(function(){if(typeof a==`boolean`)return a;if(!n)return!1;if(!x)return _;var e=x.getSettings();return`facingMode`in e?_&&e.facingMode===`user`:_},[n,_,a,x]);return M(function(){var e=v.current;if(e){var t=function(){var t=e.play();t!==void 0&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn(`Failed to play video`,t)})},n=function(){e.paused&&t()},r=function(){e.style.transform=`scale(1)`},i=function(){e.style.transform=``,setTimeout(function(){e.paused&&t()},100)},a=function(){document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),function(){e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}}},[]),M(function(){var e=v.current;if(!(!e||!x)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${p} for ${l}`);return}return e.srcObject=new MediaStream([x]),e.load(),function(){e.srcObject=null,e.load()}}},[l,p,x,x?.id]),M(function(){var e=v.current;if(!o||!e)return;var t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=v.current;if(!(!e||document.hidden)){var t=e.videoWidth,n=e.videoHeight;t&&n&&o?.({aspectRatio:t/n,height:n,width:t})}})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),function(){t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[o]),no.createElement(`video`,W({autoPlay:!0,muted:!0,playsInline:!0,ref:y,"data-local":h,"data-mirrored":w||void 0,"data-playable":S||void 0,"data-session-id":l,"data-subscribed":C,"data-video-type":p,style:W(W({objectFit:i,transform:w?`scale(-1, 1)`:``},d),S?c:{})},m))});pg.displayName=`DailyVideo`;var mg=Ae({refreshDevices:function(){return Promise.resolve()}}),hg=ea(`idle`);hg.debugLabel=Ch(`camera-state`);var gg=ea(`idle`);gg.debugLabel=Ch(`microphone-state`);var _g=ea([]);_g.debugLabel=Ch(`camera-devices`);var vg=ea([]);vg.debugLabel=Ch(`microphone-devices`);var yg=ea([]);yg.debugLabel=Ch(`speaker-devices`);var bg=ea(null);bg.debugLabel=Ch(`last-camera-error`);var xg=function(e){var t=e.children,n=hh(),r=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e,r,i,a,o,s,c,l,u,d;return uh(this,function(f){switch(f.label){case 0:if((navigator==null?void 0:navigator.mediaDevices)?.getUserMedia===void 0||(navigator==null?void 0:navigator.mediaDevices)?.enumerateDevices===void 0)return t(hg,`not-supported`),t(gg,`not-supported`),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return e.kind===`videoinput`&&e.deviceId!==``}),i=e.filter(function(e){return e.kind===`audioinput`&&e.deviceId!==``}),a=e.filter(function(e){return e.kind===`audiooutput`&&e.deviceId!==``}),[4,n.getInputDevices()];case 3:return o=f.sent(),s=o.camera,c=o.mic,l=o.speaker,u=function(e,t,n){var r=n.find(function(e){return e.device.deviceId===t.deviceId}),i=`deviceId`in e&&t.deviceId===e.deviceId,a=!(`deviceId`in e)&&r?.selected;return{device:t,selected:i||!!a,state:r?.state??`granted`}},d=function(e,t){return e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label)},t(_g,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(vg,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}),t(yg,function(e){return a.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(hg,`not-supported`),t(gg,`not-supported`),[3,5];case 5:return[2]}})})},[n])),i=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var i,a,o,s,c,l,u,d,f,p,m,h;return uh(this,function(g){switch(g.label){case 0:if(!n||(i=e(hg),a=e(gg),o=n.participants(),!o.local))return[2];if(s=o.local.tracks,c=`prompt`,l=`prompt`,!navigator.permissions)return[3,5];g.label=1;case 1:return g.trys.push([1,4,,5]),[4,navigator.permissions.query({name:`camera`})];case 2:return u=g.sent(),c=u.state,[4,navigator.permissions.query({name:`microphone`})];case 3:return d=g.sent(),l=d.state,[3,5];case 4:return g.sent(),[3,5];case 5:return f=c===`prompt`&&[`idle`,`pending`].includes(i)&&s.video.state===`interrupted`&&!s.video.persistentTrack,p=[`idle`,`pending`].includes(i)&&!s.video.persistentTrack&&!!s.video.off?.byUser,m=l===`prompt`&&[`idle`,`pending`].includes(a)&&s.audio.state===`interrupted`&&!s.audio.persistentTrack,h=[`idle`,`pending`].includes(a)&&!s.audio.persistentTrack&&!!s.audio.off?.byUser,s.audio?.blocked?.byDeviceInUse?(t(gg,`in-use`),t(vg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.audio?.blocked?.byDeviceMissing?t(gg,`not-found`):s.audio?.blocked?.byPermissions||l===`denied`?t(gg,`blocked`):m?t(gg,`pending`):h?t(gg,`idle`):(t(gg,`granted`),t(vg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),s.video?.blocked?.byDeviceInUse?(t(hg,`in-use`),t(_g,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.video?.blocked?.byDeviceMissing?t(hg,`not-found`):s.video?.blocked?.byPermissions||c===`denied`?t(hg,`blocked`):f?t(hg,`pending`):p?t(hg,`idle`):(t(hg,`granted`),t(_g,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),r(),[2]}})})},[n,r]));return G(`participant-updated`,F(function(e){e.participant.local&&i()},[i])),G(`available-devices-updated`,r),G(`selected-devices-updated`,r),G(`camera-error`,mo(F(function(e,t,n){switch(t(bg,n.error),n.error?.type){case`cam-in-use`:t(hg,`in-use`);break;case`mic-in-use`:t(gg,`in-use`);break;case`cam-mic-in-use`:t(hg,`in-use`),t(gg,`in-use`);break;case`not-found`:n.error?.missingMedia.includes(`video`)&&t(hg,`not-found`),n.error?.missingMedia.includes(`audio`)&&t(gg,`not-found`);break;case`permissions`:n.error?.blockedMedia.includes(`video`)&&t(hg,`blocked`),n.error?.blockedMedia.includes(`audio`)&&t(gg,`blocked`);break;case`constraints`:n.error?.reason===`invalid`?(t(hg,`constraints-invalid`),t(gg,`constraints-invalid`)):n.error?.reason===`none-specified`&&(t(hg,`constraints-none-specified`),t(gg,`constraints-none-specified`));break;case`undefined-mediadevices`:t(hg,`undefined-mediadevices`),t(gg,`undefined-mediadevices`);break;default:t(hg,`unknown`),t(gg,`unknown`);break}},[]))),G(`started-camera`,mo(F(function(e,t){t(hg,`granted`),t(gg,`granted`),i()},[i]))),no.createElement(mg.Provider,{value:{refreshDevices:r}},t)};function Sg(e){return e.instanceId??`__default__`}var Cg=ea({});Cg.debugLabel=Ch(`live-streaming-instances`);var wg=ea(function(e){var t=e(Cg),n=Object.values(t),r=n.filter(function(e){return e.isLiveStreaming}),i=r[0]??n[n.length-1];return{errorMsg:n.find(function(e){return e.errorMsg})?.errorMsg,isLiveStreaming:r.length>0,layout:i?.layout}});wg.debugLabel=Ch(`live-streaming`);var Tg=function(e){var t=e.children;return G(`live-streaming-started`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return W(W({},e),(t={},t[r]={instanceId:r,isLiveStreaming:!0,layout:n?.layout},t))})},[]))),G(`live-streaming-stopped`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),G(`live-streaming-error`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return W(W({},e),(t={},t[r]=W(W({},e[r]??{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),G(`left-meeting`,mo(F(function(e,t){t(Cg,{})},[]))),no.createElement(no.Fragment,null,t)},Eg=ea(`new`);Eg.debugLabel=Ch(`meeting-state`);var Dg=ea(null);Dg.debugLabel=Ch(`meeting-error`);var Og=ea(null);Og.debugLabel=Ch(`non-fatal-error`);var kg=ea({data:void 0,topology:`none`});kg.debugLabel=Ch(`meeting-session-data`);var Ag=function(e){var t=e.children,n=hh(),r=mo(F(function(e,t){if(n){var r=n.meetingState();return t(Eg,r),r}},[n]));return G(`loading`,r),G(`loaded`,r),G(`joining-meeting`,r),G(`joined-meeting`,r),G(`left-meeting`,r),G(`error`,mo(F(function(e,t,n){t(Dg,n),r()},[r]))),G(`nonfatal-error`,mo(F(function(e,t,n){t(Og,n)},[]))),G(`joined-meeting`,mo(F(function(e,t){n&&t(kg,n.meetingSessionState())},[n]))),G(`meeting-session-state-updated`,mo(F(function(e,t,n){t(kg,n.meetingSessionState)},[]))),G(`left-meeting`,mo(F(function(e,t){t(kg,{data:void 0,topology:`none`})},[]))),G(`call-instance-destroyed`,mo(F(function(e,t){t(Eg,`new`),t(Dg,null),t(Og,null),t(kg,{data:void 0,topology:`none`})},[]))),no.createElement(no.Fragment,null,t)},jg=ea(`none`);jg.debugLabel=Ch(`topology`);var Mg=ea(`unknown`),Ng=ea([]),Pg=ea(`interrupted`),Fg=ea(100);Fg.debugLabel=Ch(`network-quality`);var Ig=ea(`good`);Ig.debugLabel=Ch(`network-threshold`);var Lg=function(e){var t=e.children,n=hh(),r=fo(jg),i=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e;return uh(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return e=r.sent(),!e||e?.topology===`none`||t(jg,e.topology),[2]}})})},[n]));return G(`joined-meeting`,i),G(`network-connection`,mo(F(function(e,t,n){switch(t(Pg,n.event),n.event){case`connected`:n.type===`peer-to-peer`&&t(jg,`peer`),n.type===`sfu`&&t(jg,`sfu`);break}},[]))),G(`network-quality-change`,mo(F(function(e,t,n){t(Mg,function(e){return e===n.networkState?e:n.networkState}),t(Ng,function(e){var t=n.networkStateReasons??[];return Sh(e,t)?e:t}),t(Fg,function(e){return e===n.quality?e:n.quality}),t(Ig,function(e){return e===n.threshold?e:n.threshold})},[]))),G(`left-meeting`,mo(F(function(e,t){t(jg,`none`),t(Mg,`unknown`),t(Ng,[]),t(Pg,`interrupted`),t(Fg,100),t(Ig,`good`)},[]))),M(function(){!n||r!==`none`||i()},[n,i,r]),no.createElement(no.Fragment,null,t)};function Rg(e){return e.instanceId?e.instanceId:e.type===`local`||e.local?`__local__`:`__default__`}var zg=ea({});zg.debugLabel=Ch(`recording-instances`);var Bg=ea(function(e){var t=e(zg),n=Object.values(t),r=n.filter(function(e){return e.isRecording}),i=r[0]??n[n.length-1];return{error:n.some(function(e){return e.error}),isLocalParticipantRecorded:n.some(function(e){return e.isLocalParticipantRecorded}),isRecording:r.length>0,layout:i?.layout,local:i?.local,recordingId:i?.recordingId,recordingStartedDate:i?.recordingStartedDate,startedBy:i?.startedBy,type:i?.type}});Bg.debugLabel=Ch(`recording-state`);var Vg=function(e){var t=e.children,n=$h(),r=og({filter:`record`}),i=mo(F(function(e,t,n,r){var i=e(zg).__local__,a=W(W({},i),{instanceId:`__local__`,isLocalParticipantRecorded:n,isRecording:n,local:n?r:i?.local,type:n?`local`:i?.type});i&&xh(i,a)||!n&&!i||(n?t(zg,function(e){return W(W({},e),{__local__:a})}):i&&t(zg,function(e){return W(W({},e),{__local__:W(W({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return M(function(){i(r.length>0,r.includes(n||`local`))},[n,i,r]),G(`recording-started`,mo(F(function(e,t,r){var i=Rg(r),a=!0;switch(r.type){case`cloud-audio-only`:case`cloud-beta`:case`cloud`:n&&r.layout?.preset===`single-participant`&&r.layout.session_id!==n&&(a=!1);break}t(zg,function(e){var t;return W(W({},e),(t={},t[i]={error:!1,instanceId:i,isLocalParticipantRecorded:a,isRecording:!0,layout:r?.layout,local:r?.local,recordingId:r?.recordingId,recordingStartedDate:new Date,startedBy:r?.startedBy,type:r?.type},t))})},[n]))),G(`recording-stopped`,mo(F(function(e,t,n){var r=Rg(n);t(zg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),G(`recording-error`,mo(F(function(e,t,n){var r=Rg(n);t(zg,function(e){var t,i=e[r];return W(W({},e),(t={},t[r]=W(W({},i??{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),G(`left-meeting`,mo(F(function(e,t){t(zg,{})},[]))),no.createElement(no.Fragment,null,t)},Hg=function(){var e=fo(Eg);return st(e),e},Ug=ea(null);Ug.debugLabel=Ch(`room-state`);var Wg=function(e){var t=e.children,n=hh(),r=Hg();return G(`access-state-updated`,mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e;return uh(this,function(i){switch(i.label){case 0:return!n||r===`left-meeting`?[2]:[4,n.room()];case 1:return e=i.sent(),e&&`id`in e&&t(Ug,e),[2,e]}})})},[n,r]))),G(`left-meeting`,mo(F(function(e,t){return function(){t(Ug,null)}},[]))),no.createElement(no.Fragment,null,t)},Gg=ea({isTranscribing:!1,model:`general`,language:`en`,transcriptions:[]});Gg.debugLabel=Ch(`transcription-state`);var Kg=function(e){var t=e.children;return G(`transcription-started`,mo(F(function(e,t,n){t(Gg,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),G(`transcription-stopped`,mo(F(function(e,t,n){t(Gg,function(e){return W(W({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),G(`transcription-error`,mo(F(function(e,t){t(Gg,function(e){return W(W({},e),{error:!0,isTranscribing:!1})})},[]))),G(`left-meeting`,mo(F(function(e,t){t(Gg,function(e){return W(W({},e),{isTranscribing:!1})})},[]))),G(`app-message`,mo(F(function(e,t,n){n?.fromId===`transcription`&&t(Gg,function(e){return W(W({},e),{isTranscribing:!0,transcriptions:ph(ph([],fh(e.transcriptions),!1),[n.data],!1)})})},[]))),no.createElement(no.Fragment,null,t)},qg=`0.25.3`,Jg={strictMode:!0},Yg=function(){return!0},Xg={options:Jg,shouldCreateInstance:Yg},Zg=function(e,t){var n=t===void 0?Xg:t,r=n.parentElRef,i=n.options,a=i===void 0?Jg:i,o=n.shouldCreateInstance,s=o===void 0?Yg:o,c=fh(j(null),2),l=c[0],u=c[1],d=N();return M(function(){if(e===`callFrame`&&r?.current===null||!s())return;function t(e){return lh(this,void 0,void 0,function(){return uh(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}var n=function(){setTimeout(function(){return u(null)},0)},i=Mm.getCallInstance();if(!l&&i&&!i.isDestroyed()){i.once(`call-instance-destroyed`,n),u(i);return}if(l){xh(d.current,a)||t(l);return}if(!i||i.isDestroyed())try{var o=W(W({},a),{aboutClient:W(W({},a.aboutClient??{}),{"daily-react":qg})});switch(e){case`callFrame`:i=r?.current?Mm.createFrame(r.current,o):Mm.createFrame(o);break;case`callObject`:i=Mm.createCallObject(o);break}d.current=a,u(i),i.once(`call-instance-destroyed`,n)}catch(e){if(console.error(`Error creating call instance:`,e),a.strictMode)throw e}},[l,a,r,s,e]),l},Qg=function(e){return Zg(`callObject`,e)},$g=function(e){var t=e.children,n=e.jotaiStore,r=ch(e,[`children`,`jotaiStore`]),i=N({}),a=F(function(e){var t,n;if(`action`in e){var r=e.action,a=Array.from(i.current?.[r]??[]),o=a.filter(function(e){return fh(e,1)[0]<0}),s=a.filter(function(e){return fh(e,1)[0]>0}),c=ph(ph([],fh(o),!1),fh(s),!1);try{for(var l=dh(c),u=l.next();!u.done;u=l.next()){var d=fh(u.value,2)[1];d(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}},[]),o=F(function(e){e&&Object.keys(i.current).forEach(function(t){e.off(t,a),e.isDestroyed()||e.on(t,a)})},[a]),s=`callObject`in r?r.callObject:null,c=Qg({options:P(function(){return`callObject`in r?{}:r},[r]),shouldCreateInstance:F(function(){return!(`callObject`in r)},[r])}),l=s??c;M(function(){l&&o(l)},[l,o]);var u=F(function(e,t,n){var r;i.current[e]||(i.current[e]=new Map,l&&(l.off(e,a),l.isDestroyed()||l.on(e,a))),i.current[e]?.has(n)||(r=i.current[e])==null||r.set(n,t)},[l,a]),d=F(function(e,t){var n;(n=i.current[e])==null||n.delete(t),i.current[e]?.size===0&&(l?.off(e,a),delete i.current[e])},[l,a]);return no.createElement(ao,{store:n},no.createElement(mh.Provider,{value:l},no.createElement(gh.Provider,{value:{on:u,off:d}},no.createElement(Wg,null,no.createElement(Ag,null,no.createElement(Lg,null,no.createElement(Qh,null,no.createElement(Vg,null,no.createElement(Tg,null,no.createElement(Kg,null,no.createElement(xg,null,t)))))))))))},e_=function(e){var t=(e===void 0?{}:e).onAppMessage,n=hh(),r=F(function(e,t){t===void 0&&(t=`*`),n&&n.sendAppMessage(e,t)},[n]);return G(`app-message`,F(function(e){t?.(e,r)},[t,r])),r},t_=function(e,t,n,r){var i=hh(),a=e===$h();G(`local-audio-level`,F(function(e){a&&t(e.audioLevel)},[t,a])),G(`remote-participants-audio-level`,F(function(n){a||t(n.participantsAudioLevel[e])},[t,e,a])),M(function(){if(!(!i||i.isDestroyed()||!a)&&!i.isLocalAudioLevelObserverRunning())try{i.startLocalAudioLevelObserver(r)}catch{n?.(`Local audio level observer not supported in this browser`)}},[i,n,r,a]),M(function(){!i||i.isDestroyed()||a||i.isRemoteParticipantsAudioLevelObserverRunning()||i.startRemoteParticipantsAudioLevelObserver(r)},[i,r,a])},n_=function(e){return lg(e,`audio`)},r_,i_;function a_(){return i_?r_:(i_=1,r_=function e(t,n){if(t===n)return!0;if(t&&n&&sh(t)==`object`&&sh(n)==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},r_)}a_();var o_=ea({state:`low`,reason:`none`});o_.debugLabel=Ch(`cpu-load`);var s_=function(){var e=hh(),t=fo(hg),n=fo(gg),r=fo(_g),i=fo(vg),a=fo(yg),o=fo(bg),s=I(mg).refreshDevices,c=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),l=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),u=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=[`blocked`,`in-use`,`not-found`,`constraints-invalid`,`constraints-none-specified`,`undefined-mediadevices`,`unknown`],f={cameraError:o,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:i.find(function(e){return e.selected}),currentSpeaker:a.find(function(e){return e.selected}),hasCamError:d.includes(t),hasMicError:d.includes(n),microphones:i,micState:n,refreshDevices:s,setCamera:c,setMicrophone:l,setSpeaker:u,speakers:a};return st(f),f},c_=ea(null);c_.debugLabel=Ch(`input-settings`);var l_=ea({hidden:0,present:0});l_.debugLabel=Ch(`participant-counts`);var u_=ho(function(e){var t=ea({},function(t,n,r){n(u_(e),r)});return t.debugLabel=Ch(`participant-receive-settings-${e}`),t}),d_=function(e){return lg(e,`screenVideo`)},f_=ea(null);f_.debugLabel=Ch(`send-settings`);var p_=function(e){return lg(e,`video`)};function m_({children:e}){return L($g,{children:e})}var h_=Ae(null),g_=`tavus:memory-user-id:`,__=new Map;function v_(e){return`${g_}${e}`}function y_(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function b_(e){if(!e)return``;let t=v_(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=y_();return window.localStorage.setItem(t,n),n}catch{}let n=__.get(t);if(n)return n;let r=y_();return __.set(t,r),r}var x_=`tavus:terms-accepted:`;function S_(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function C_(e,t){return`${x_}${e}:${S_(t)}`}function w_(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(C_(e,t))===`1`}catch{return!1}}function T_(e,t){if(!(!e||!t))try{globalThis.localStorage?.setItem(C_(e,t),`1`)}catch{}}var E_=null;function D_(e,t){!e||!t||(E_={deploymentId:e,content:t})}function O_(){E_&&=(T_(E_.deploymentId,E_.content),null)}function k_(e){return e===`user`?`user`:e===`pal`?`replica`:null}function A_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function j_(e){if(!A_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!A_(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=k_(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=k_(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 M_(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function N_(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function P_(e){let t=k_(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...N_(e,`seq`),...N_(e,`turn_idx`)}}}function F_(e){let t=k_(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}:{},...N_(e,`seq`)}}}function I_(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,...N_(e,`seq`),...N_(e,`turn_idx`)}}}function L_(e){if(typeof e.name!=`string`||typeof e.arguments!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;return t?{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:e.arguments,modality:t}}:null}function R_(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function z_(e,t){return{kind:`speaking`,event_type:t,properties:{...N_(e,`seq`),...N_(e,`turn_idx`)}}}var B_={"conversation.utterance":P_,"conversation.utterance.streaming":F_,"conversation.tool_call":I_,"conversation.perception_tool_call":L_,"conversation.perception_analysis":R_,"conversation.replica_started_speaking":z_,"conversation.replica_stopped_speaking":z_,"conversation.user_started_speaking":z_,"conversation.user_stopped_speaking":z_};function V_(e){if(!A_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!A_(e.properties))return null;let t=B_[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function H_(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function U_(e,t){let n=j_(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 W_(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?!1:(t.splice(r,1),!0)}}}var G_=mn(`Conversation`),K_=1500;function q_(e,t){if(!t)return e;let n=()=>t.reason??new DOMException(`The operation was aborted`,`AbortError`);return t.aborted?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 J_=Ae(null);function Y_({children:e}){return L(m_,{children:L(iv,{children:e})})}function X_(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 Z_(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function Q_(e,t){for(let n of t)n.onPerception?.(e)}function $_(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 ev(e,t){for(let n of t)n.onMessage?.(e)}function tv(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:X_(e,t,n);return;case`tool_call`:Z_(e,t);return;case`perception_tool_call`:case`perception_analysis`:Q_(e,t);return;case`speaking`:$_(e,t);return;case`unknown`:ev(e,t);return}}function nv(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 rv(e,t){return t?e instanceof _n&&e.status===401:!1}function iv({children:e}){let{deploymentId:t,client:n,config:r}=I(_i),{memoryStores:i,conversationalContext:a,customGreeting:o}=I(yt),s=hh(),c=Hg(),l=I(h_),u=P(()=>zt(`idle`),[]),d=P(()=>zt(null),[]),f=P(()=>zt([]),[]),p=P(()=>zt(``),[]),m=P(()=>zt(null),[]),h=P(()=>zt(null),[]),g=P(()=>zt(null),[]),_=P(()=>zt(null),[]),v=N(null),y=N(null),b=P(()=>W_(),[]),x=P(()=>new Set,[]),S=P(()=>zt(`idle`),[]),C=l?.flowSignal??S,w=F(e=>{g.value=e},[g]),T=F(e=>{_.value=e},[_]),[,E]=j(c);M(()=>{E(c),c===`joined-meeting`?(u.value=`connected`,G_.info(`Connected to meeting`)):c===`left-meeting`?(u.value=`ended`,O_(),G_.info(`Left meeting`)):c===`error`&&(h.value=`Meeting error`,u.value=`error`)},[c,u,h]),pn(()=>{let e=u.value;if(e===`connected`)for(let e of x)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of x)e.onDisconnect?.();else if(e===`error`){let e=h.peek()??`Unknown error`;for(let t of x)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),pn(()=>{let e=C.value;for(let t of x)t.onModeChange?.(e)}),e_({onAppMessage:F(e=>{U_(e?.data,{appendChatMessage(e,t){e===`user`&&b.consumeMatch(t)||(f.value=[...f.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){p.value=e,m.value=n,v.current!==null&&(clearTimeout(v.current),v.current=null),t&&(v.current=setTimeout(()=>{p.value=``,m.value=null,v.current=null},K_))}});let t=V_(e?.data);t&&tv(t,x,b)},[f,p,m,b,x])}),M(()=>()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);let D=F(()=>{y.current=null,d.value=null,f.value=[],p.value=``,m.value=null,v.current!==null&&(clearTimeout(v.current),v.current=null),(u.peek()===`ended`||u.peek()===`error`)&&(u.value=`idle`)},[d,u,f,p,m]),ee=F(()=>{let e=d.peek()?.conversationId??null,r=y.current;if(r?.conversationId===e)return r.promise;u.value=`disconnecting`;let i=!1,a=e?bn(n,t,e,{keepalive:!0}).catch(e=>{i=!0,G_.error(`End conversation API failed`,e)}):Promise.resolve(),o;try{o=s?.leave()}catch(e){i=!0,G_.error(`Daily leave failed`,e)}let c=Promise.resolve(o).catch(e=>{i=!0,G_.error(`Daily leave failed`,e)}),l=Promise.all([a,c]).then(()=>{u.value=`ended`,i&&y.current?.promise===l&&(y.current=null)});return y.current={conversationId:e,promise:l},l},[n,t,s,d,u]),te=F(async(e,c)=>{let l=null;try{D(),u.value=`connecting`,h.value=null;let f=e,p=g.peek();p&&f?.password==null&&(f={...f,password:p});let m=r.value.customization.conversation.unique_memory_tag===!0;if(!f?.memory_stores){let e=i??(m?[b_(t)]:[]);e.length&&(f={...f,memory_stores:e})}f=nv(f,a,o);let v=_.peek();_.value=null,v&&f?.captcha_token==null&&(f={...f,captcha_token:v});let y=await yn(n,t,f,c);if(l=y.conversation_id,d.value={conversationId:y.conversation_id,conversationName:y.conversation_name,conversationUrl:y.conversation_url,callbackUrl:y.callback_url,createdAt:y.created_at,magicGrid:y.magic_grid===!0},console.info(`[Tavus:Conversation] Conversation created:`,y.conversation_id),c?.signal?.aborted)throw c.signal.reason??new DOMException(`The operation was aborted`,`AbortError`);let b=r.value.customization.conversation.modality===`chat`;await q_(Promise.resolve(s?.join({url:y.conversation_url,...b?{startAudioOff:!0,startVideoOff:!0}:{}})),c?.signal)}catch(e){throw await ee(),l&&(d.value=null),rv(e,r.value.has_password===!0)&&(g.value=null),G_.error(`Start failed`,e),h.value=String(e),u.value=`error`,e}},[n,t,s,u,h,d,g,_,r,i,a,o,D,ee]),ne=F(e=>{if(!s)return;let t=d.peek();if(!t){G_.warn(`sendChat called before session was established; dropping message`);return}b.markSent(e),s.sendAppMessage(M_(t.conversationId,e),`*`),f.value=[...f.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[s,f,d,b]),re=F(e=>{if(!s){G_.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=d.peek();if(!t){G_.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&b.markSent(e.properties.text),s.sendAppMessage(H_(t.conversationId,e),`*`)},[s,d,b]),O=F(e=>{x.add(e)},[x]),ie=F(e=>{x.delete(e)},[x]),ae=P(()=>({state:u,session:d,chatMessages:f,captionText:p,captionRole:m,error:h,password:g,setPassword:w,captchaToken:_,setCaptchaToken:T,mode:C,start:te,end:ee,sendChat:ne,sendMessage:re,conversation:{start:te,end:ee,sendMessage:re},__registerSubscriber:O,__unregisterSubscriber:ie,__beginAttempt:D}),[u,d,f,p,m,h,g,w,_,T,C,te,ee,ne,re,O,ie,D]);return L(J_.Provider,{value:ae,children:e})}var av=mn(`CaptchaChallenge`),ov=1;function sv(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function cv(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function lv({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=(I(yt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),s=new URL(o).origin,[c,l]=j(0),[u,d]=j(0),[f,p]=j(!1),[m,h]=j(!1),g=cv(o,e.challenge_path,t,e.action,window.location.origin),_=F(()=>{h(!1),l(e=>e+1)},[]);if(M(()=>{function e(e){if(f||e.origin!==s)return;let a=e.data;if(sv(a)&&a.deployment_uuid===t){if(a.type===`interactive`){h(!0),i?.(!0);return}if(a.type===`token`&&a.token){av.info(`Captcha token received`),h(!1),i?.(!1),n(a.token);return}if(a.type===`expired`){av.info(`Captcha token expired, reloading iframe`),_();return}a.type===`error`&&(av.warn(`Captcha error received`,a.code),u<ov?(d(e=>e+1),_()):(av.warn(`Captcha error retries exhausted, falling back to no-token mode`),p(!0),r()))}}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[s,t,u,f,n,r,i,_]),f)return null;let v=m&&a;return L(`div`,{class:v?`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":!v,children:L(`iframe`,{src:g,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},c)})}var uv=mn(`Captcha`),dv=15e3,fv=Ae(null);function pv({children:e}){let{config:t,deploymentId:n}=I(_i),r=I(J_),i=on(!0),a=on(null),o=on(!1),s=on(0),c=on(!1),l=on(!1),u=N([]),d=t.value.captcha??null,f=r?.state.value??`idle`,p=f===`connecting`||f===`connected`,m=d!==null&&!c.value&&!p&&o.value,h=F(e=>{let t=u.current;u.current=[];for(let n of t)n(e)},[]),g=F(e=>{r?.setCaptchaToken(e),l.value=!1},[r,l]);pn(()=>{(r?.captchaToken.value??null)!==null&&(o.value=!1)});let _=F(()=>{uv.warn(`Captcha challenge unavailable; not attempting /start without a token`),c.value=!0,o.value=!1,h({kind:`unavailable`})},[o,c,h]),v=F(e=>{l.value=e},[l]),y=F(async()=>(t.peek().captcha??null)===null?{kind:`not-required`}:(r?.captchaToken.peek()??null)===null?(c.peek()&&(c.value=!1,s.value=s.peek()+1),o.value=!0,new Promise(e=>{let t=!1,n,i=r=>{t||(t=!0,clearTimeout(a),n?.(),e(r))},a=setTimeout(()=>{l.peek()||(uv.warn(`Captcha mint timed out`),h({kind:`unavailable`}))},dv);n=r?.captchaToken.subscribe(e=>{e!==null&&i({kind:`token`})}),u.current.push(i)})):{kind:`token`},[o,t,r,s,c,l,h]),b=P(()=>({ensureToken:y,hostVisible:i,promptSlot:a}),[y,i,a]),x=l.value&&i.value?a.value:null,S=m&&d?L(lv,{captcha:d,deploymentId:n,presented:i.value,onToken:g,onFallback:_,onInteractive:v},s.value):null;return L(fv.Provider,{value:b,children:[e,x&&S?Na(S,x):S]})}function mv(){let e=I(_i);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var hv=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function gv(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 _v(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 vv(e){if(e instanceof _n){let t=gv(e.status);return{kind:t,status:e.status,raw:e.body,retryable:hv.has(t),retryAfterSec:_v(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var yv=new Set([`Captcha token required`,`Captcha verification failed`]);function bv(e){if(!(e instanceof _n)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function xv(e){let t=bv(e);return t!==null&&yv.has(t)}var Sv=`Origin not allowed`;function Cv(e){return bv(e)===Sv}function wv(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var Tv=`tavus_pudl_`,Ev=3600*48,Dv=new Map;function Ov(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function kv(e){return`${Tv}${e}`}function Av(e){try{let t=`${kv(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!==Ov())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function jv(e,t){try{let n=encodeURIComponent(`${Ov()}.${t}`);document.cookie=`${kv(e)}=${n}; max-age=${Ev}; path=/; SameSite=Lax`}catch{return}}function Mv(e){let t=Dv.get(e);return t||(t=zt(e?Av(e):0),Dv.set(e,t)),t}function Nv(e){if(!e)return;jv(e,Av(e)+1);let t=Av(e),n=Dv.get(e);n?n.value=t:Dv.set(e,zt(t))}function Pv(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 Fv(e,t,n,r){return e===`granted`&&r?`granted`:Pv(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function Iv(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 Lv(e){let[t,n]=j(null);return M(()=>{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 Rv(){let e=hh(),t=Hg(),n=$h(),{micState:r,camState:i,currentMic:a,currentCam:o}=s_(),s=Lv(`microphone`),c=Lv(`camera`),l=t===`joined-meeting`||!!n,[u,d]=j(!1),[f,p]=j(!1),m=F(()=>{e&&(d(!0),l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{}))},[e,l]),h=F(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:P(()=>Iv(Fv(r,s,u,!!a),s),[r,s,u,a]),camera:P(()=>Iv(Fv(i,c,f,!!o),c),[i,c,f,o]),requestMic:m,requestCamera:h}}var zv=mn(`Flow`),Bv=[`idle`,`unavailable`,`ended`];function Vv({children:e}){let{config:t}=mv(),{start:n,end:r,session:i,state:a,__beginAttempt:o}=I(J_),s=t.value.deployment_id??``,c=Mv(s),l=F(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),u=I(fv),[d,f]=j(`idle`),[p,m]=j(!1),[h,g]=j(null),[_,v]=j(null),[y,b]=j(!1),{mic:x,camera:S,requestMic:C,requestCamera:w}=Rv(),T=P(()=>zt(`idle`),[]);M(()=>{T.value=d},[d,T]),pn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel!==`widget`&&e.channel!==`embed`||T.value===`idle`&&c.value>=n&&(v(`daily_limit`),b(!1),f(`unavailable`)))});let E=t.value.customization.show_haircheck,D=t.value.customization.conversation.modality,ee=E&&D!==`chat`,te=!E&&D!==`chat`,ne=N(!1),re=N(!1),O=N(null),ie=N(null),ae=F(async(e=new AbortController)=>{ie.current=e;let{signal:r}=e;m(!0);try{let e=await u?.ensureToken()??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){v(`error`),b(!0),f(`unavailable`);return}if(await n(void 0,{signal:r}),r.aborted)return;ne.current=!1,l()!=null&&Nv(s),f(`call`)}catch(e){if(r.aborted)return;let n=vv(e);if(xv(e)&&!ne.current){ne.current=!0,m(!1),f(`idle`);return}if(ne.current=!1,Cv(e)){zv.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),v(`error`),b(!1),f(`unavailable`);return}if(n.status===401&&t.value.has_password===!0){f(`idle`);return}let i=wv(n.kind)??`busy`;v(i),b(n.retryable),f(`unavailable`)}finally{ie.current===e&&(ie.current=null),m(!1)}},[n,t,l,s]),k=F(async()=>{let e=O.current;if(e){g(null);try{await ae(e.controller)}finally{O.current===e&&(O.current=null),e.resolve()}}},[ae]),A=F(()=>{let e=O.current;if(!(!e||e.proceeding)){if(e.proceeding=!0,D===`video`&&!S.isGranted&&!S.isBlocked){g({kind:`camera`,status:S.status}),w().finally(()=>{k()});return}k()}},[D,S,w,k]);M(()=>{if(!(!O.current||h?.kind!==`microphone`)){if(h.status!==x.status&&g({kind:`microphone`,status:x.status}),x.isGranted){A();return}if(x.isBlocked){let e=O.current;O.current=null,m(!1),e.resolve()}}},[h,x,A]);let oe=F(()=>{if(O.current)return O.current.promise;let e,t=new Promise(t=>{e=t});return O.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},m(!0),x.isGranted?A():x.isBlocked?(g({kind:`microphone`,status:x.status}),O.current=null,m(!1),e()):(g({kind:`microphone`,status:x.status}),C()),t},[x,C,A]),se=F(async()=>{if(!Bv.includes(d))return;let e=l();if(e!=null&&c.value>=e){v(`daily_limit`),b(!1),f(`unavailable`);return}if(v(null),b(!1),o(),ee&&!re.current){f(`haircheck`);return}return te?oe():ae()},[d,ee,te,oe,ae,l,c,o]),ce=F(async()=>{d===`haircheck`&&(re.current=!0,await ae())},[d,ae]),le=F(()=>{let e=O.current,t=e?.controller??ie.current;e&&(O.current=null,e.resolve(),g(null)),t?.abort(),t&&m(!1),d===`haircheck`&&f(`idle`)},[d]),ue=F(()=>{d===`call`&&f(`ended`)},[d]);M(()=>{let e=()=>{let e=O.current!==null||ie.current!==null,t=d===`haircheck`||d===`call`,n=i.peek()!==null,o=n&&a.peek()!==`ended`;!e&&!t&&!n||(le(),(d===`call`||o)&&f(`ended`),r())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d,i,a,le,r]);let de=F(()=>{v(null),b(!1),f(`idle`)},[]),fe=P(()=>({flowSignal:T,setFlowState:f,isStarting:p,permissionRequest:h,unavailableCause:_,canRetry:y,start:se,join:ce,cancel:le,leave:ue,restart:de}),[T,p,h,_,y,se,ce,le,ue,de]);return L(h_.Provider,{value:fe,children:e})}var Hv=mn(`HostBridge`),Uv=Ae(null);function Wv(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function Gv({children:e}){let t=I(J_),n=I(_i),r=I(h_),i=I(yt),a=on(null),o=i?.overrideConfig,s=F(e=>{a.value=Wv(e)},[a]),c=F((e,t)=>{let n=a.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),Hv.info(`Event:`,e,t)},[a]);M(()=>{let e=a.value;if(!e)return;let n={tavus:{start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},startConversation:async()=>{try{r?await r.start():await t.start()}catch(e){Hv.error(`startConversation failed`,e)}},endConversation:async()=>{try{let e=r?.flowSignal.peek();e===`call`?r?.leave():e===`haircheck`?r?.cancel():t.session.peek()&&await t.end()}catch(e){Hv.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let n=Cn(o??{},t);e.setAttribute(`override-config`,JSON.stringify(n))},destroy:()=>{t.session.peek()&&t.end(),e.remove()}};return Object.assign(e,n),()=>{for(let t of Object.keys(n))delete e[t]}},[a.value,t,r,o]);let l=N(!1);M(()=>{l.current||!a.value||!n||(l.current=!0,c(`tavus:ready`,{deploymentId:n.deploymentId}))},[a.value,n,c]);let u=N(null);M(()=>t.state.subscribe(e=>{if(e!==u.current)switch(u.current=e,e){case`connected`:c(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`ended`:c(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`error`:c(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),c(`tavus:state-change`,{state:e});break;default:c(`tavus:state-change`,{state:e})}}),[t,c]),pn(()=>{if(!r)return;let e=r.flowSignal.value;c(`tavus:mode-change`,{mode:e})}),M(()=>{let e={onUtterance(e){c(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){c(`tavus:tool-call`,e),c(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){c(`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}};c(`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){c(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,c]);let d=P(()=>({shadowHost:a,dispatchEvent:c}),[a,c]);return L(Uv.Provider,{value:d,children:[L(`div`,{ref:s,style:`display:contents`}),e]})}var Kv=Ae(null);function qv({children:e}){let{config:t}=I(_i),n=P(()=>Wt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=P(()=>Wt(()=>{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=P(()=>Wt(()=>Zv(t.value.customization.style)),[t]),a=P(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return L(Kv.Provider,{value:a,children:L(`div`,{"data-theme":r.value,style:Qv(i.value),class:`contents`,children:e})})}var Jv=[0,.125,.25,.5,.75],Yv=[0,1,2,3,4],Xv=[0,.2,.25,.3];function Zv(e){return{"--radius-box":`${Jv[e.boxes_radius]??.5}rem`,"--radius-field":`${Jv[e.field_radius]??.25}rem`,"--radius-selector":`${Jv[e.selectors_radius]??.5}rem`,"--border":`${Yv[e.border_width]??1}px`,"--size-field":`${Xv[e.fields_size]??.25}rem`,"--size-selector":`${Xv[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function Qv(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Ae(null);var $v=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`;`${$v}`,`${$v}`;var ey=41/2,ty=23/2,ny=Math.hypot(ey,ty);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-ey,r-ty)/ny*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var ry=Ae(null);function iy({children:e}){let t=N(null);return L(ry.Provider,{value:{frameRef:t},children:L(`div`,{class:`@container/conversation w-full h-full`,children:L(`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 ay=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),oy=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),sy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),cy=e=>{let t=sy(e);return t.charAt(0).toUpperCase()+t.slice(1)},ly={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`},uy=Ae({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),dy=()=>I(uy),fy=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},py=({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,children:i,iconNode:a,class:o=``,...s})=>{let{size:c=24,strokeWidth:l=2,absoluteStrokeWidth:u=!1,color:d=`currentColor`,class:f=``}=dy()??{},p=r??u?Number(n??l)*24/Number(t??c):n??l;return O(`svg`,{...ly,width:t??c??24,height:t??c??24,stroke:e??d,"stroke-width":p,class:ay(`lucide`,f,o),...!i&&!fy(s)&&{"aria-hidden":`true`},...s},[...a.map(([e,t])=>O(e,t)),...me(i)])},my=(e,t)=>{let n=({class:n=``,className:r=``,children:i,...a})=>O(py,{...a,iconNode:t,class:ay(`lucide-${oy(cy(e))}`,`lucide-${oy(e)}`,n,r)},i);return n.displayName=cy(e),n},hy=my(`camera-off`,[[`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`}]]),gy=my(`camera`,[[`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=my(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),vy=my(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),yy=my(`ellipsis`,[[`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`}]]),by=my(`expand`,[[`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`}]]),xy=my(`external-link`,[[`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`}]]),Sy=my(`maximize-2`,[[`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`}]]),Cy=my(`message-circle`,[[`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`}]]),wy=my(`mic-off`,[[`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`}]]),Ty=my(`mic`,[[`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`}]]),Ey=my(`minimize-2`,[[`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`}]]),Dy=my(`monitor-up`,[[`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`}]]),Oy=my(`moon`,[[`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`}]]),ky=my(`phone-off`,[[`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`}]]),Ay=my(`picture-in-picture-2`,[[`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`}]]),jy=my(`send`,[[`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`}]]),My=my(`shrink`,[[`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`}]]),Ny=my(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Py=my(`triangle-alert`,[[`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`}]]),Fy=my(`user`,[[`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`}]]),Iy=my(`users`,[[`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`}]]),Ly=my(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Ry(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>L(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:L(e,{size:n})})}var zy={close:Ry(Ly,`Close`),cancel:Ry(Ly,`Cancel`),leave:Ry(ky,`Leave call`),more:Ry(yy,`More`),error:Ry(Py,`Error`),mic:Ry(Ty,`Microphone`),"mic-off":Ry(wy,`Microphone muted`),cam:Ry(gy,`Camera`),"cam-off":Ry(hy,`Camera off`),"screen-share":Ry(Dy,`Screen share`),pip:Ry(Ay,`Picture in picture`),user:Ry(Fy,`User`),"face-smile":Ry(Ny,`Camera off`),captions:Ry(_y,`Closed captions`),chat:Ry(Cy,`Chat`),fullscreen:Ry(Sy,`Enter fullscreen`),"fullscreen-exit":Ry(Ey,`Exit fullscreen`),expand:Ry(by,`Expand`),collapse:Ry(My,`Collapse`),send:Ry(jy,`Send`),"external-link":Ry(xy,`External link`),clock:Ry(vy,`Clock`),moon:Ry(Oy,`Unavailable`),users:Ry(Iy,`Busy`)},By=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 19H4v-2h12v2ZM4 17H2V7h2v10Zm14-8h2V7h2v10h-2v-2h-2v2h-2V7h2v2Zm-2-2H4V5h12v2Z"/></svg>`,Vy=`<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>`,Hy=`<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>`,Uy=`<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>`,Wy=`<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>`,Gy=`<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>`,Ky=`<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>`,qy=`<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>`,Jy=`<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>`,Yy=`<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>`,Xy=`<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>`,Zy=`<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>`,Qy=`<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>`,$y=`<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>`,eb=`<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>`,tb=`<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>`,nb=`<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>`,rb=`<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>`,ib=`<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>`,ab=`<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>`,ob=`<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>`,sb=`<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>`,cb=`<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>`;function lb(e){return e.replace(/\s(width|height)="\d+"/g,``)}function ub(e,t){let n=lb(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>L(`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 db={pixelarticons:{close:ub(Gy,`Close`),cancel:ub(Ky,`Cancel`),leave:ub(Zy,`Leave call`),more:ub(tb,`More`),error:ub(Jy,`Error`),mic:ub(Qy,`Microphone`),"mic-off":ub($y,`Microphone muted`),cam:ub(By,`Camera`),"cam-off":ub(Vy,`Camera off`),"screen-share":ub(rb,`Screen share`),pip:ub(nb,`Picture in picture`),user:ub(ab,`User`),"face-smile":ub(sb,`Camera off`),captions:ub(Hy,`Closed captions`),chat:ub(Uy,`Chat`),fullscreen:ub(Xy,`Enter fullscreen`),"fullscreen-exit":ub(qy,`Exit fullscreen`),expand:ub(Yy,`Expand`),collapse:ub(qy,`Collapse`),send:ub(ib,`Send`),"external-link":ub(cb,`External link`),clock:ub(Wy,`Clock`),moon:ub(eb,`Unavailable`),users:ub(ob,`Busy`)},lucide:zy};function fb({name:e,...t}){let{config:n}=mv(),r=(db[n.value.customization.style.icon_library]??db.pixelarticons)[e];return L(r,{...t})}var pb=`Ready when you are`,mb=`Start the conversation`;function hb(e){return typeof e==`string`&&e.length>0?e:``}function gb(e){let t=hb(e.replica_thumbnail_image_url)||null,n=hb(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function _b(e){let{preview:t}=e.customization,{background:n}=t,r=gb(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=hb(n.url);return{title:t.title||pb,description:t.description||``,btn_title:t.btn_title||mb,background:{type:i,url:a}}}var vb={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},yb=`#t=0.1`;function bb(e){return e.includes(`#`)?e:`${e}${yb}`}function xb({replica:e,fallback:t=null}){let[n,r]=j(!1);M(()=>{r(!1)},[e.imageUrl]);let i=`absolute inset-0 w-full h-full object-cover`;return e.imageUrl&&!n?L(`img`,{class:i,src:e.imageUrl,loading:`lazy`,alt:``,onError:()=>r(!0)}):e.videoUrl?L(`video`,{class:i,src:bb(e.videoUrl),muted:!0,playsinline:!0,preload:`metadata`,controls:!1}):L(k,{children:t})}function Sb({variant:e,replica:t}){let[n,r]=j(!1);return M(()=>{r(!1)},[e.url]),e.type===`replica`&&t?L(xb,{replica:t,fallback:L(`div`,{class:`absolute inset-0`,style:vb})}):e.type===`custom-image`&&e.url&&!n?L(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):L(`div`,{class:`absolute inset-0`,style:vb})}function Cb({className:e=``}){let{config:t}=mv(),n=_b(t.value),r=gb(t.value);return L(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:L(Sb,{variant:n.background,replica:r})})}var wb=`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 Tb({title:e,description:t,media:n,children:r,overlay:i}){return L(`div`,{class:wb,children:[n===void 0?L(Cb,{}):n,(e||t)&&L(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&L(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&L(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&L(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}var Eb={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.`}};function Db(e,t){let n=t?.[e];return{title:n?.title||Eb[e].title,description:n?.description||Eb[e].description}}var Ob={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`};function kb({cause:e}){return L(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:L(fb,{name:Ob[e],size:`2rem`})})}function Ab({cause:e,canRetry:t,onRetry:n,onCancel:r}){let{config:i}=mv(),a=i.value.customization?.unavailable_screen,o=Db(e,a),s=a?.cta??[],c=e===`busy`||s.length>0||!!r;return L(Tb,{media:L(kb,{cause:e}),title:o.title,description:o.description,children:c&&L(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[e===`busy`&&L(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,disabled:!t,onClick:n,children:`Try again`}),s.map(e=>L(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&L(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function jb(){let e=I(h_);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}}function Mb(){return I(yt)?.layout??`inline`}var Nb=`text-preview-title @max-mobile:text-preview-title-narrow`,Pb=`text-preview-title-full-screen`;function Fb({title:e,description:t,fullScreen:n}){return!e&&!t?null:L(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&L(`h2`,{class:`${n?Pb:Nb} font-medium leading-tight`,children:e}),t&&L(`p`,{class:`text-sm @max-mobile:text-xs text-white/80 leading-snug`,children:t})]})}var Ib=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,Lb=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,Rb=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,zb=`absolute inset-0 bg-black/45`,Bb=`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 Vb({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=mv(),l=_b(c.value),u=gb(c.value),d=Mb()===`full-screen`;return L(`div`,{class:a?`${Ib} ${a}`:Ib,role:o,"aria-live":s,children:[L(Sb,{variant:l.background,replica:u}),r===`center`?L(k,{children:[L(`div`,{class:zb}),L(`div`,{class:`${Bb} flex flex-col items-center justify-center gap-3`,children:n})]}):L(k,{children:[(e||t)&&(d?L(`div`,{class:Lb}):L(k,{children:[L(`div`,{class:`${Lb} hidden @max-mobile:block`}),L(`div`,{class:Rb})]})),d?L(`div`,{class:Bb,children:[L(Fb,{title:e,description:t,fullScreen:!0}),L(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):L(`div`,{class:`${Bb} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,children:[L(`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:L(Fb,{title:e,description:t})}),L(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}function Hb({loading:e=!1,disabled:t,class:n,children:r,...i}){return L(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[L(`span`,{children:r}),e&&L(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:L(`span`,{class:`loading loading-spinner loading-sm`})})]})}var Ub={video:`cam`,audio:`mic`,chat:`chat`},Wb={"full-screen":`px-12 @max-3xl:px-6`,inline:`px-8 @max-mobile:px-5`};function Gb({children:e,loading:t=!1,...n}){let{config:r}=mv(),i=Mb(),a=Ub[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return L(Hb,{class:`btn-preview-action rounded-box ${Wb[i]}`,loading:t,...n,children:o?L(`span`,{class:`flex items-center justify-center gap-2`,children:[L(fb,{name:a,size:`1.15rem`,"aria-hidden":!0}),e]}):e})}var Kb=`Thanks for joining`,qb=`You can start a new conversation whenever you're ready.`,Jb=`Start a new conversation`;function Yb(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function Xb({text:e,onRestart:t,isStarting:n=!1}){let{config:r}=mv(),i=Mb()===`full-screen`,a=r.value.customization.after_call,o=a.cta.filter(e=>Yb(e.url));return L(Vb,{title:a.title||e?.title||Kb,description:a.description||e?.description||qb,children:[L(Gb,{onClick:t,loading:n,children:e?.restart||Jb}),o.length>0&&L(`div`,{class:`flex flex-wrap items-center gap-2 ${i?`justify-center`:`justify-end`}`,children:o.map(e=>L(`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 Zb(){let e=hh(),t=$h(),{isOff:n}=p_(t),{camState:r}=s_();return{isCamReady:P(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:F(()=>{e?.setLocalVideo(n)},[e,n])}}function Qb(){let e=hh(),t=$h(),{isOff:n}=n_(t),{micState:r}=s_();return{isMicReady:P(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:F(()=>{e?.setLocalAudio(n)},[e,n])}}function $b(){let e=hh(),t=$h(),{isOff:n}=d_(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:F(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var ex={microphone:`microphone`,camera:`camera`};function tx({class:e}){return L(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[L(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function nx(){return L(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[L(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),L(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),L(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),L(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:L(tx,{})}),L(`g`,{transform:`translate(34 78)`,children:[L(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),L(`g`,{transform:`translate(40 120)`,children:[L(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),L(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var rx=ga(({device:e,onClose:t})=>{let n=ex[e];return M(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),L(`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:L(`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:[L(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:L(fb,{name:`close`,size:`1.1rem`})}),L(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[L(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:L(nx,{})}),L(`div`,{class:`flex flex-col gap-4`,children:[L(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),L(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[L(`li`,{class:`flex items-start gap-2`,children:[L(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),L(`span`,{class:`leading-snug`,children:[`Click the `,L(tx,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),L(`li`,{class:`flex items-start gap-2`,children:[L(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),L(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),L(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),ix=Ae({open:()=>{},close:()=>{}});function ax(){return I(ix)}function ox({children:e}){let[t,n]=j(null),r=F(e=>n(e),[]),i=F(()=>n(null),[]),a=P(()=>({open:r,close:i}),[r,i]);return L(ix.Provider,{value:a,children:[e,t&&L(rx,{device:t,onClose:i})]})}var sx=ga(()=>L(`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:`!`})),cx=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,lx=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,ux=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,dx=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,fx=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function px(){return L(`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:L(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function mx(){let e=$h(),t=N(null),n=N(void 0);return t_(e??``,F(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))})},[])),L(`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 hx({value:e,devices:t,disabled:n,onChange:r,label:i}){return L(k,{children:[L(`select`,{class:lx,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>L(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),L(`span`,{class:ux,children:L(px,{})})]})}function gx(e){return L(`div`,{class:cx,children:L(hx,{...e})})}function _x({iconName:e,...t}){return L(`div`,{class:cx,children:[L(`span`,{class:dx,"aria-hidden":`true`,children:L(fb,{name:e})}),L(hx,{...t})]})}var vx=ga(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=Qb(),{microphones:i,currentMic:a,setMicrophone:o}=s_();if(!a||(i?.length??0)<=1)return L(xx,{level:e});let s=e&&n&&!r;return L(`div`,{class:`relative inline-flex items-center`,children:[L(gx,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),L(`button`,{type:`button`,onClick:t,disabled:!n,class:`${fx} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&L(mx,{}),L(`span`,{class:`relative z-10 inline-flex`,children:L(fb,{name:r||!n?`mic-off`:`mic`})})]})]})});function yx(){let{onToggleCamera:e,isCamMuted:t}=Zb(),{camera:n,requestCamera:r}=Rv(),{open:i}=ax(),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 bx=ga(()=>{let{isCamReady:e}=Zb(),{currentCam:t,cameras:n,setCamera:r}=s_(),i=yx();return!t||(n?.length??0)<=1?L(Sx,{}):L(`div`,{class:`relative inline-flex items-center`,children:[L(gx,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),L(`button`,{type:`button`,onClick:i.onClick,class:fx,"aria-label":i.label,"aria-pressed":!i.isOn,children:L(fb,{name:i.isOn?`cam`:`cam-off`})})]})}),xx=ga(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=Qb(),{mic:r,requestMic:i}=Rv(),{open:a}=ax(),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 L(`span`,{class:`relative inline-flex`,children:[L(`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&&L(mx,{}),L(`span`,{class:`relative z-10 inline-flex`,children:L(fb,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&L(sx,{})]})}),Sx=ga(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=yx();return L(`span`,{class:`relative inline-flex`,children:[L(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:L(fb,{name:e?`cam`:`cam-off`})}),r&&L(sx,{})]})});ga(({compact:e=!1}={})=>{let{isMicReady:t}=Qb(),{microphones:n,currentMic:r,setMicrophone:i}=s_();return(n?.length??0)<=1?null:L(_x,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),ga(({compact:e=!1}={})=>{let{isCamReady:t}=Zb(),{currentCam:n,cameras:r,setCamera:i}=s_();return(r?.length??0)<=1?null:L(_x,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Cx=ga((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=$b();return L(`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:L(fb,{name:`screen-share`})})});function wx(e){let t=I(J_);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return M(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Tx=Ae(null);function Ex({children:e,defaultEnabled:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=P(()=>({isEnabled:n,toggle:i}),[n,i]);return L(Tx.Provider,{value:a,children:e})}function Dx(){let e=I(Tx);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Ox=ga(()=>{let{isEnabled:e,toggle:t}=Dx();return L(`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:L(fb,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),kx=ga(()=>{let{isEnabled:e}=Dx(),{captionText:t,captionRole:n}=wx(),r=t.value,i=n.value;return!e||!r?null:L(`div`,{class:`pointer-events-none absolute bottom-24 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:L(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:L(`div`,{children:[L(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),Ax=Ae(null);function jx({children:e,defaultOpen:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=F(()=>r(!1),[]),o=P(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return L(Ax.Provider,{value:o,children:e})}function Mx(){let e=I(Ax);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var Nx=ga((e={})=>{let{isOpen:t,toggle:n}=Mx();return L(`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:L(fb,{name:`chat`})})}),Px=ga(({message:e})=>{let t=e.sender===`user`;return L(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[L(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),L(`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})]})}),Fx=ga(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=Mx(),{chatMessages:i,sendChat:a,session:o}=wx(),s=o.value?.conversationId??null,c=i.value,[l,u]=j(``),d=N(null);M(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=F(()=>{let e=l.trim();!e||!s||(a(e),u(``))},[l,a,s]),p=F(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return L(`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?!1:!n,inert:e?!1:!n,children:[L(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[L(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:L(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:L(fb,{name:`close`,size:20})})]}),L(`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?L(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>L(Px,{message:e},e.id))}),L(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[L(`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`}),L(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:L(fb,{name:`send`,size:18})})]})]})});function Ix({label:e}){return L(Vb,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:L(`div`,{class:`flex items-center gap-2`,children:[L(`span`,{class:`loading loading-spinner loading-sm`}),L(`span`,{class:`text-base font-medium`,children:e})]})})}var Lx=ga(()=>L(Ix,{label:`Connecting…`})),Rx=ga(()=>L(Ix,{label:`Leaving…`}));function zx({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return L(`div`,{class:`flex items-center gap-2`,children:[r&&L(`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`}),L(`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:L(fb,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var Bx=ga(({id:e})=>{let t=tg()===e,n=N(null),r=N(null),i=N(null),a=N(void 0);t_(e,F(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 L(`div`,{class:`flex items-center justify-center w-6 h-6`,children:L(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[L(`div`,{ref:n,class:o,style:{height:`20%`}}),L(`div`,{ref:r,class:o,style:{height:`20%`}}),L(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),Vx=[0,1,2],Hx=.05,Ux=450;function Wx({sessionId:e,className:t=``}){let{config:n}=mv(),r=_b(n.value),i=gb(n.value),a=N(null),o=N(void 0),s=N(void 0),[c,l]=j(!1),u=N(!1);return t_(e??``,F(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>Hx?(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)},Ux))}))},[e])),M(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),L(`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:[Vx.map(e=>L(`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)),L(`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`}}),L(`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:L(Sb,{variant:r.background,replica:i})})]})}function Gx({children:e,class:t,className:n,...r}){return L(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),L(`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 Kx=e=>!!e.user_id?.includes(`tavus-replica`);function qx(){return og({filter:Kx})}function Jx(e){let t=qx()[0],n=p_(t??``),r=Hg(),[i,a]=j(!1);return M(()=>{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 Yx=ga(({isAudioOnly:e})=>{let t=Jx(e);return t.phase===`left`?L(Rx,{}):t.phase===`connecting`?L(Lx,{}):e?L(Gx,{class:`flex items-center justify-center`,children:[L(Wx,{sessionId:t.replicaId}),L(dg,{sessionId:t.replicaId})]}):L(`div`,{class:`relative w-full h-full`,children:[L(pg,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),L(dg,{sessionId:t.replicaId})]})}),Xx=ga(({onLeave:e})=>{let{config:t}=mv(),n=t.value.customization.conversation.modality===`audio`;return L(`div`,{class:`@container/pip w-full h-full`,children:L(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[L(`div`,{class:`relative w-full h-full z-5`,children:L(Yx,{isAudioOnly:n})}),L(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[L(xx,{}),!n&&L(Sx,{}),L(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:L(fb,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function Zx(e,t){return e<=0||t<=0?!1:e/t<.75}var Qx=ga(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=N(null),o=i??a,[s,c]=j(0),[l,u]=j(0),d=F(({aspectRatio:e})=>c(e),[]);M(()=>{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&&Zx(s,l),h=n||m;return L(k,{children:[m&&L(pg,{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`:``}`}),L(pg,{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`:``}`})]})}),$x=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),eS=[`.sandbox-tavus.io`],tS=new Set([`tavusapi.com`]);function nS(e){let t;try{t=new URL(e)}catch{return!1}return aS(t)?!0:t.protocol===`https:`?$x.has(t.hostname)?!0:eS.some(e=>t.hostname.endsWith(e)):!1}function rS(e){return nS(e)}function iS(e){let t;try{t=new URL(e)}catch{return!1}return oS(t)?!0:t.protocol===`https:`&&tS.has(t.hostname)}function aS(e){return oS(e)}function oS(e){return!sS()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function sS(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}async function cS(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var lS=`tavus.canvas.interaction`,uS=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],dS=`safe-area-right`,fS={x:275/1280,y:111/720,width:730/1280,height:609/720},pS={type:`snapshot_mirror`};function mS(e){return IS(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&IS(e.properties):!1}function hS(e){if(!IS(e))return null;let t=XS(e,`component`),n=XS(e,`component_version`),r=XS(e,`sandbox_url`),i=$S(e,`mcp_server_url`,rS),a=$S(e,`api_base_url`,iS),o=$S(e,`interaction_url`,iS),s=BS(e.layout),c=e.version;return c!==1||!t||!n||!r||!nS(r)||i===null||a===null||o===null||s===null?null:{version:c,component:t,component_version:n,resource_uri:XS(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:XS(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,layout:s,host_context:IS(e.host_context)?e.host_context:void 0}}function gS(e){if(e===void 0)return{ok:!0,value:{}};if(IS(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 IS(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:LS(e)}}}function _S(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=gS(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(!IS(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 vS=[`safe-area-left`,`safe-area-right`];function yS(e){let t=vS.includes(e.preferred_slot)?e.preferred_slot:dS;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function bS(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function xS(e,t){return[t]}function SS(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 xS(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=MS(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:yS({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&&bS(o.layout)===bS(i.layout)?a:xS(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)}}function CS(e){if(!IS(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!IS(t))continue;let e=(IS(t._meta)?t._meta:null)?.[lS];if(IS(e))return eC(e)}return null}function wS(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.`);return{interaction_id:t.interaction_id??FS(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:t.component??e.canvas_config.component,component_version:t.component_version??e.canvas_config.component_version,type:n,value:r,metadata:IS(t.metadata)?t.metadata:{}}}function TS(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 ES(e){return!IS(e)||!Array.isArray(e.content)?``:e.content.map(e=>IS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
52
- `).trim()}function DS(e,t){let n=IS(t.structuredContent)?t.structuredContent:void 0,r=RS(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: ${zS(n)}`),r&&r!==a&&o.push(r),o.join(`
53
- `)}function OS({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=MS(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:yS({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??NS(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??fS,backdrop:i.backdrop??r.layout?.backdrop??pS}),revision:0}}function kS(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:jS(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:pS};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:pS};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`?QS(16+o+24-c,0,u):-QS(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 jS(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 MS(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:VS(e.layout)??VS(e.preferred_slot)??VS(e.preferredSlot),displayMode:HS(e),avoidSafeArea:US(e),safeArea:WS(e),backdrop:GS(e)}}function NS(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return dS}}function PS(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 FS(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}function IS(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function LS(e){return e instanceof Error?e:Error(String(e))}function RS(e){return Array.isArray(e)?e.map(e=>IS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
54
- `).trim():``}function zS(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function BS(e){if(e===void 0)return;if(!IS(e))return null;let t=VS(e),n=KS(e.safe_area??e.safeArea),r=qS(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...JS(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function VS(e){if(typeof e==`string`&&YS(e))return e;if(!IS(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&YS(t)?t:void 0}function HS(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 US(e){let t=IS(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 WS(e){let t=IS(e.layout)?e.layout:void 0;return KS(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function GS(e){let t=IS(e.layout)?e.layout:void 0;return qS(e.backdrop??t?.backdrop)??void 0}function KS(e){if(e===void 0)return;if(!IS(e))return null;let t=ZS(e,`x`),n=ZS(e,`y`),r=ZS(e,`width`),i=ZS(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:QS(t,0,1),y:QS(n,0,1),width:QS(r,0,1),height:QS(i,0,1)}}function qS(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!IS(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function JS(e,t){return typeof e==`boolean`?{[t]:e}:{}}function YS(e){return uS.includes(e)}function XS(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function ZS(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function QS(e,t,n){return Math.min(Math.max(e,t),n)}function $S(e,t,n){let r=XS(e,t);if(r)return n(r)?r:null}function eC(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&&!IS(e.metadata)?null:e}var tC=`tavus-deployment magic-canvas/0.0.0`;function nC(e){if(!mS(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=hS(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=gS(e.properties.arguments);if(!r.ok)throw r.error;return OS({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function rC(e){if(!mS(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=nC(e);return t?{kind:`show`,instance:t}:null}return _S(e)}function iC(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 aC(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:PS(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:tC,styles:{variables:oC(e.cssVars)}}}function oC(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`,...sC(e)}}function sC(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={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var cC=24,lC=96;function uC(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 dC(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function fC(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 pC(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??fS,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 mC(e,t,n){let[r,i]=j(()=>e?uC(dC(n?.current)):null);return at(()=>{if(!e){i(null);return}let t=dC(n?.current),r=()=>i(uC(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 hC(e,t,n){let[r,i]=j(()=>t?fC(e.current):null);return at(()=>{if(!t){i(null);return}let n=()=>i(fC(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 gC(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`&&pC(e,r,i,a)),side:o}}function _C(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>=lC&&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-cC*2),g=Math.max(lC,Math.min(h,c-cC*2));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var vC=`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 yC(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function bC(e,t,n){let[r,i]=j(()=>e&&t?_C(t,dC(n?.current),fC(n?.current)):null);return at(()=>{if(!e||!t){i(null);return}let r=dC(n?.current),a=()=>i(_C(t,r,fC(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 xC(e,t){let[n,r]=j(null);return at(()=>{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 SC=1;function CC(e,t,n){return Math.min(Math.max(e,t),n)}function wC(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??fS,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:CC(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:CC(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var TC=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function EC(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=wC(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 DC(e,t,n){let r=N(null),i=N(e),a=N(n),o=N(0),s=N(0);i.current=e,a.current=n,M(()=>{let e=i.current;if(!e)return;if(!r.current||OC()){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 TC){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?TC.map(t=>Math.round(e[t]*100)).join():``,t]),M(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function OC(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function kC({geom:e,visible:t}){return L(`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 AC(e,t){let n=t>=0?`left`:`right`,r=N({side:n,shift:t});M(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:yC(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function jC(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function MC({snapshotUrl:e,transformOrigin:t}){return L(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function NC({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return L(`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:L(MC,{snapshotUrl:e,transformOrigin:r})})}function PC({ambient:e,usePip:t,transition:n}){return e===`none`?null:L(`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 L(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:L(`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&&L(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${SC}px)`}:{right:`calc(100% - ${SC}px)`},children:L(MC,{snapshotUrl:t,transformOrigin:`center`})})]})})}function IC({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=vC,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=N(null),[f,p]=j(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=N(null),_=jC(e,h,c),{usePip:v,side:y}=gC(e,s,c,mC(s!==`shift`,_,g),h,hC(g,s!==`shift`,_)),b=bC(s!==`shift`,y,g),x=AC(m,h);M(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}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]),M(()=>{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=xC(g,C),T=f!==null&&!C,E=C&&y!=null,D=N(null),ee=N(null),[te,ne]=j(!0),re=N(!0),O=F((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)`),re.current!==t&&(re.current=t,ne(t))},[]);return DC(C?EC(b,S,w,h,e):null,o,O),L(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&L(NC,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&L(PC,{ambient:l,usePip:v,transition:a}),L(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:L(FC,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:D,videoWrapRef:ee,fill:r,videoRef:d})}),C&&b&&L(kC,{geom:b,visible:S&&te}),u]})}var LC=480,RC=ga(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return L(`div`,{class:`absolute inset-0 overflow-hidden`,children:L(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${LC}px`:`0px`,right:o<0?`${LC}px`:`0px`,transition:`left ${vC}, right ${vC}`},children:[L(pg,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),L(`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?L(`div`,{class:`flex w-full h-full items-center justify-center`,children:L(Wx,{sessionId:e})}):L(pg,{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 zC(e){return e&&Object.assign(UC,e),UC}var BC,VC,HC,UC,WC=a((()=>{VC=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},HC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(BC=globalThis).__zod_globalConfig??(BC.__zod_globalConfig={}),UC=globalThis.__zod_globalConfig}));function GC(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 KC(e,t=`|`){return e.map(e=>cw(e)).join(t)}function qC(e,t){return typeof t==`bigint`?t.toString():t}function JC(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function YC(e){return e==null}function XC(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ZC(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 QC(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Tw)return r===void 0&&(r=Tw,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function $C(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ew(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function tw(e){return JSON.stringify(e)}function nw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function rw(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function iw(e){if(rw(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(rw(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function aw(e){return iw(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ow(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function sw(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 cw(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function lw(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function uw(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 sw(e,ew(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 $C(this,`shape`,e),e},checks:[]}))}function dw(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 sw(e,ew(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 $C(this,`shape`,r),r},checks:[]}))}function fw(e,t){if(!iw(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 sw(e,ew(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return $C(this,`shape`,n),n}}))}function pw(e,t){if(!iw(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return sw(e,ew(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return $C(this,`shape`,n),n}}))}function mw(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return sw(e,ew(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return $C(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function hw(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 sw(t,ew(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 $C(this,`shape`,i),i},checks:[]}))}function gw(e,t,n){return sw(t,ew(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 $C(this,`shape`,i),i}}))}function _w(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 vw(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 yw(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function bw(e){return typeof e==`string`?e:e?.message}function xw(e,t,n){let r=e.message?e.message:bw(e.inst?._zod.def?.error?.(e))??bw(t?.error?.(e))??bw(n.customError?.(e))??bw(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 Sw(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Cw(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function ww(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Tw,Ew,Dw,Ow,kw,Aw=a((()=>{WC(),Tw=Symbol(`evaluating`),Ew=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Dw=JC(()=>{if(UC.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Ow=new Set([`string`,`number`,`symbol`]),kw={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function jw(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 Mw(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 Nw,Pw,Fw,Iw=a((()=>{WC(),Aw(),Nw=(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,qC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pw=K(`$ZodError`,Nw),Fw=K(`$ZodError`,Nw,{Parent:Error})})),Lw,Rw,zw,Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw,Zw=a((()=>{WC(),Iw(),Aw(),Lw=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=>xw(e,a,zC())));throw Ew(t,i?.callee),t}return o.value},Rw=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=>xw(e,a,zC())));throw Ew(t,i?.callee),t}return o.value},zw=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??Pw)(a.issues.map(e=>xw(e,i,zC())))}:{success:!0,data:a.value}},Bw=zw(Fw),Vw=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=>xw(e,i,zC())))}:{success:!0,data:a.value}},Hw=Vw(Fw),Uw=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Lw(e)(t,n,i)},Ww=e=>(t,n,r)=>Lw(e)(t,n,r),Gw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Rw(e)(t,n,i)},Kw=e=>async(t,n,r)=>Rw(e)(t,n,r),qw=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return zw(e)(t,n,i)},Jw=e=>(t,n,r)=>zw(e)(t,n,r),Yw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Vw(e)(t,n,i)},Xw=e=>async(t,n,r)=>Vw(e)(t,n,r)}));function Qw(){return new RegExp(fT,`u`)}function $w(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 eT(e){return RegExp(`^${$w(e)}$`)}function tT(e){let t=$w({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(`^${xT}T(?:${r})$`)}var 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=a((()=>{nT=/^[cC][0-9a-z]{6,}$/,rT=/^[0-9a-z]+$/,iT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,aT=/^[0-9a-vA-V]{20}$/,oT=/^[A-Za-z0-9]{27}$/,sT=/^[a-zA-Z0-9_-]{21}$/,cT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lT=/^([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})$/,uT=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)$/,dT=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fT=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,pT=/^(?:(?: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])$/,mT=/^(([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}|:))$/,hT=/^((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])$/,gT=/^(([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])$/,_T=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vT=/^[A-Za-z0-9_-]*$/,yT=/^https?$/,bT=/^\+[1-9]\d{6,14}$/,xT=`(?:(?:\\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])))`,ST=RegExp(`^${xT}$`),CT=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},wT=/^-?\d+$/,TT=/^-?\d+(?:\.\d+)?$/,ET=/^(?:true|false)$/i,DT=/^null$/i,OT=/^undefined$/i,kT=/^[^A-Z]*$/,AT=/^[^a-z]*$/})),MT,NT,PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT=a((()=>{WC(),jT(),Aw(),MT=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),NT={number:`number`,bigint:`bigint`,object:`date`},PT=K(`$ZodCheckLessThan`,(e,t)=>{MT.init(e,t);let n=NT[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})}}),FT=K(`$ZodCheckGreaterThan`,(e,t)=>{MT.init(e,t);let n=NT[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})}}),IT=K(`$ZodCheckMultipleOf`,(e,t)=>{MT.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):ZC(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})}}),LT=K(`$ZodCheckNumberFormat`,(e,t)=>{MT.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=kw[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=wT)}),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})}}),RT=K(`$ZodCheckMaxLength`,(e,t)=>{var n;MT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!YC(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=Sw(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zT=K(`$ZodCheckMinLength`,(e,t)=>{var n;MT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!YC(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=Sw(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),BT=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;MT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!YC(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=Sw(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})}}),VT=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;MT.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=()=>{})}),HT=K(`$ZodCheckRegex`,(e,t)=>{VT.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})}}),UT=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kT,VT.init(e,t)}),WT=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=AT,VT.init(e,t)}),GT=K(`$ZodCheckIncludes`,(e,t)=>{MT.init(e,t);let n=ow(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})}}),KT=K(`$ZodCheckStartsWith`,(e,t)=>{MT.init(e,t);let n=RegExp(`^${ow(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})}}),qT=K(`$ZodCheckEndsWith`,(e,t)=>{MT.init(e,t);let n=RegExp(`.*${ow(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})}}),JT=K(`$ZodCheckOverwrite`,(e,t)=>{MT.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),XT,ZT=a((()=>{XT=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(`
51
+ Passed callback for '${e}' event is NOT registered.`,t),c(!0);return}l.current++;var n=setTimeout(function(){l.current=0},50);return a(e,t,u),function(){clearTimeout(n),i(e,u)}}},[t,e,u,s,i,a]),st({event:e,eventId:u,isBlocked:s,callback:t})};function xh(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!xh(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return xh(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(e,t){return xh(e,o[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=dh(e.entries()),c=s.next();!c.done;c=s.next()){var l=fh(c.value,2),u=l[0],d=l[1];if(!t.has(u)||!xh(d,t.get(u)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(sh(e)!==`object`||e===null||sh(t)!==`object`||t===null)return!1;var f=Object.keys(e),p=Object.keys(t);if(f.length!==p.length)return!1;for(var i=0;i<f.length;i++){var u=f[i];if(!Object.prototype.hasOwnProperty.call(t,u)||!xh(e[u],t[u]))return!1}return!0}function Sh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],a=r!==null&&sh(r)===`object`,o=i!==null&&sh(i)===`object`;if(a||o){if(!xh(r,i))return!1}else if(r!==i)return!1}return!0}function Ch(e){return`daily-react-`+e}function wh(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ea(function(t){var i=e.get(r)(t),a=n.get(r);return a!=null&&e.equals(i,a)?a:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var Th=`::`,Eh=`;`,Dh=function(e,t){return e+Th+t},Oh=function(e,t){return e+Th+t.join(Eh)},kh=function(e,t){return jh(Dh(e,t))},Ah=ho(function(e){var t=ea([]);return t.debugLabel=Ch(`participant-property-paths-${e}`),t}),jh=ho(function(e){var t=ea(null);return t.debugLabel=Ch(`participant-property-${e}`),t}),Mh=wh({equals:Sh,get:function(e){return function(t){var n=fh(e.split(Th),2),r=n[0];return n[1].split(Eh).map(function(e){return t(kh(r,e))})}}}),Nh=function(e,t){var n,r=fo(Array.isArray(t)?Mh(Oh(e,t)):jh(Dh(e,t)));return st(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):(n={},n[t]=r,n)),r},Ph=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function Fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1;var e=`Expected a function`,t=NaN,n=`[object Symbol]`,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=sh(Ph)==`object`&&Ph&&Ph.Object===Object&&Ph,l=(typeof self>`u`?`undefined`:sh(self))==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,g=!0;if(typeof t!=`function`)throw TypeError(e);n=b(n)||0,_(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(b(r.maxWait)||0,n):o,g=`trailing`in r?!!r.trailing:g);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,g&&i?v(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(m())}function D(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return y(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return D.cancel=T,D.flush=E,D}function g(t,n,r){var i=!0,a=!0;if(typeof t!=`function`)throw TypeError(e);return _(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),h(t,n,{leading:i,maxWait:n,trailing:a})}function _(e){var t=sh(e);return!!e&&(t==`object`||t==`function`)}function v(e){return!!e&&sh(e)==`object`}function y(e){return sh(e)==`symbol`||v(e)&&d.call(e)==n}function b(e){if(typeof e==`number`)return e;if(y(e))return t;if(_(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=_(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return Ih=g,Ih}var zh=Fh(Rh()),Bh=function(e,t,n,r){n===void 0&&(n=500),r===void 0&&(r=!1);var i=I(gh),a=i.off,o=i.on,s=P(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?vh():bh(),e},{}):(t={},t[e]=r?vh():bh(),t)},[e,r]),c=N([]);G(`call-instance-destroyed`,F(function(){c.current.length=0},[]));var l=P(function(){return zh(function(){c.current.length!==0&&(t(c.current),c.current.length=0)},n,{trailing:!0})},[t,n]);M(function(){if(e){var t=function(e){c.current.push(e),l()};return Array.isArray(e)?e.forEach(function(e){return o(e,t,s[e])}):o(e,t,s[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,s[e])}):a(e,s[e])}}},[l,e,s,a,o]),st({event:e,eventId:s})},Vh=function(e,t,n){if(t===void 0&&(t=``),n===void 0&&(n=new Set),sh(e)!==`object`||e===null||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=t?`${t}.${i}`:i;r.push.apply(r,ph([a],fh(Vh(e[i],a,n)),!1))}return n.delete(e),r},Hh=function(e){return Vh(e)},Uh=function(e,t){return String(t).split(`.`).filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)},Wh=function(e,t){return t.map(function(t){return Uh(e,t)})},Gh=ea(null);Gh.debugLabel=Ch(`active-id`);var Kh=ea(``);Kh.debugLabel=Ch(`local-id`);var qh=ea(null);qh.debugLabel=Ch(`local-join-date`);var Jh=ea([]);Jh.debugLabel=Ch(`participant-ids`);var Yh=ho(function(e){var t=ea(null);return t.debugLabel=Ch(`participant-${e}`),t}),Xh=ea([]);Xh.debugLabel=Ch(`waiting-participants`);var Zh=ho(function(e){var t=ea({awaitingAccess:{level:`full`},id:e,name:``});return t.debugLabel=Ch(`waiting-participant-${e}`),t}),Qh=function(e){var t=e.children,n=hh(),r=fh(j(!1),2),i=r[0],a=r[1],o=mo(F(function(e,t,n){t(Kh,n.local.session_id);var r=Object.values(n);t(Jh,r.map(function(e){return e.session_id})),r.forEach(function(e){t(Yh(e.session_id),e);var n=Hh(e);t(Ah(e.session_id),n),n.forEach(function(n){var r=fh(Wh(e,[n]),1)[0];t(kh(e.session_id,n),r)})}),a(!0)},[]));M(function(){if(!(!n||i)){var e=setInterval(function(){var t=n.participants();`local`in t&&(o(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,i,o]);var s=F(function(){if(n){var e=n?.participants();e.local&&o(e)}},[n,o]);G(`started-camera`,s,!0),G(`access-state-updated`,s,!0),G(`joining-meeting`,mo(F(function(e,t){t(qh,new Date),s()},[s])),!0),G(`joined-meeting`,F(function(e){o(e.participants)},[o]),!0);var c=mo(F(function(e,t){t(Kh,``),t(Gh,null),e(Jh).forEach(function(e){return Yh.remove(e)}),t(Jh,[])},[]));return G(`call-instance-destroyed`,c,!0),G(`left-meeting`,c,!0),Bh([`active-speaker-change`,`participant-joined`,`participant-updated`,`participant-left`],mo(F(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case`active-speaker-change`:t(Gh,n.activeSpeaker.peerId),t(Yh(n.activeSpeaker.peerId),function(e){return e?W(W({},e),{last_active:new Date}):null});break;case`participant-joined`:t(Jh,function(e){return e.includes(n.participant.session_id)?e:ph(ph([],fh(e),!1),[n.participant.session_id],!1)}),t(Yh(n.participant.session_id),n.participant);var r=Hh(n.participant);t(Ah(n.participant.session_id),r),r.forEach(function(e){var r=fh(Wh(n.participant,[e]),1)[0];t(kh(n.participant.session_id,e),r)});break;case`participant-updated`:t(Yh(n.participant.session_id),n.participant),n.participant.local&&t(Kh,n.participant.session_id);var r=Hh(n.participant),i=e(Ah(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(Ah(n.participant.session_id),r);var a=new Set(i),o=Wh(n.participant,r);r.forEach(function(e,r){var i=o[r];a.delete(e),t(kh(n.participant.session_id,e),function(e){return xh(e,i)?e:i})}),a.forEach(function(e){t(kh(n.participant.session_id,e),null)});break;case`participant-left`:t(Jh,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),Yh.remove(n.participant.session_id),e(Ah(n.participant.session_id)).forEach(function(e){jh.remove(Dh(n.participant.session_id,e))}),Ah.remove(n.participant.session_id);break}})},[])),100,!0),Bh([`waiting-participant-added`,`waiting-participant-updated`,`waiting-participant-removed`],mo(F(function(e,t,n){n.forEach(function(e){switch(e.action){case`waiting-participant-added`:t(Xh,function(t){return t.includes(e.participant.id)?t:ph(ph([],fh(t),!1),[e.participant.id],!1)}),t(Zh(e.participant.id),e.participant);break;case`waiting-participant-updated`:t(Zh(e.participant.id),e.participant);break;case`waiting-participant-removed`:t(Xh,function(t){return t.filter(function(t){return t!==e.participant.id})}),Zh.remove(e.participant.id);break}})},[])),100,!0),no.createElement(no.Fragment,null,t)},$h=function(){var e=fo(Kh);return st(e),e},eg=function(){return!0},tg=function(e){var t=e===void 0?{}:e,n=t.filter,r=n===void 0?eg:n,i=t.ignoreLocal,a=i===void 0?!1:i,o=$h(),s=fo(Gh),c=a&&s===o,l=!r?.(s),u=fh(j(!c&&!l?s:null),2),d=u[0],f=u[1];return M(function(){c||l||f(s)},[l,c,s]),st(d),d},ng=function(e){return[`blocked`,`off`].includes(e)},rg=`;`,ig=function(e,t){return`${e}${rg}${t}`},ag=wh({equals:xh,get:function(e){return function(t){var n=fh(e.split(rg),2),r=n[0],i=n[1];return t(Jh).filter(function(e){switch(r){case`local`:case`owner`:case`record`:return t(kh(e,r));case`remote`:return!t(kh(e,`local`));case`screen`:var n=t(kh(e,`tracks.screenAudio.state`)),i=t(kh(e,`tracks.screenVideo.state`));return!ng(n)||!ng(i);default:return!0}}).sort(function(e,n){switch(i){case`joined_at`:case`session_id`:case`user_id`:case`user_name`:var r=t(kh(e,i)),a=t(kh(n,i));if(r!==void 0||a!==void 0){if(r===void 0)return-1;if(a===void 0||r>a)return 1;if(r<a)return-1}return 0;default:return 0}})}}}),og=function(e){var t=e===void 0?{}:e,n=t.filter,r=t.onActiveSpeakerChange,i=t.onParticipantJoined,a=t.onParticipantLeft,o=t.onParticipantUpdated,s=t.sort,c=fo(ag(ig(typeof n==`string`?n:null,typeof s==`string`?s:null))),l=typeof n==`function`||typeof s==`function`,u=F(function(e){return typeof n!=`function`&&typeof s!=`function`?[]:c.map(function(t){return e(Yh(t))}).filter(function(e){return!!e}).filter(typeof n==`function`?n:function(){return!0}).sort(typeof s==`function`?s:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,c,s]),d=fh(j([]),2),f=d[0],p=d[1],m=mo(F(function(e){if(l){var t=u(e);xh(t,f)||p(t)}},[f,u,l]));M(function(){m()},[m]),Bh([`participant-joined`,`participant-updated`,`active-speaker-change`,`participant-left`],F(function(e){e.length&&(e.forEach(function(e){switch(e.action){case`participant-joined`:i?.(e);break;case`participant-updated`:o?.(e);break;case`active-speaker-change`:r?.(e);break;case`participant-left`:a?.(e);break}}),m())},[m,r,i,a,o]));var h=typeof n==`function`||typeof s==`function`?f:c;return st(h),h},sg=wh({equals:Sh,get:function(){return function(e){return e(ag(ig(`screen`,null))).map(function(t){return{local:e(kh(t,`local`)),screenAudio:e(kh(t,`tracks.screenAudio`)),screenVideo:e(kh(t,`tracks.screenVideo`)),screenId:`${t}-screen`,session_id:t}})}}}),cg=function(e){var t=e===void 0?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,i=t.onLocalScreenShareStopped,a=hh(),o=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.startScreenShare.apply(a,ph([],fh(e),!1))},[a]),s=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.stopScreenShare.apply(a,ph([],fh(e),!1))},[a]);G(`local-screen-share-started`,F(function(){return r?.()},[r])),G(`local-screen-share-stopped`,F(function(){return i?.()},[i])),G(`nonfatal-error`,F(function(e){e.type===`screen-share-error`&&n?.(e)},[n]));var c=fo(sg(void 0)),l={isSharingScreen:c.some(function(e){return e.local}),screens:c,startScreenShare:o,stopScreenShare:s};return st(l),l},lg=function(e,t){t===void 0&&(t=`video`);var n=Nh(e,`tracks.${t}`),r=n?W(W({},n),{isOff:ng(n.state)}):{isOff:!0,persistentTrack:void 0,state:`off`,subscribed:!1};return st(r),r};function ug(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return F(function(t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):r&&sh(r)===`object`&&(r.current=t)}},e)}var dg=ga(ya(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?`audio`:i,o=ch(e,[`onPlayFailed`,`sessionId`,`type`]),s=N(null),c=lg(r,a),l=ug(s,t),u=c?.subscribed;return M(function(){var e=s.current;if(!(!e||!c?.persistentTrack)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${a} for ${r}`),n?.({sessionId:r,target:e,type:a,message:`MediaStream API not available`,name:`MediaStream API not available`});return}var t=function(){e.play().catch(function(t){n?.({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener(`loadedmetadata`,t),e.srcObject=new MediaStream([c.persistentTrack]),e.load(),function(){e.removeEventListener(`loadedmetadata`,t)}}},[c?.persistentTrack,n,r,a]),G(`participant-left`,F(function(e){var t=s.current;e.participant.session_id!==r||!t||(t.srcObject=null)},[r])),G(`left-meeting`,F(function(){var e=s.current;e&&(e.pause(),e.srcObject=null)},[])),no.createElement(`audio`,W({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":u}))}));dg.displayName=`DailyAudioTrack`;var fg=ga(ya(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,a=i===void 0?5:i,o=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=hh(),u=fh(j(Array(a).fill(``)),2),d=u[0],f=u[1],p=cg().screens,m=$h(),h=tg({ignoreLocal:!0}),g=N(null);ot(t,function(){return{getActiveSpeakerAudio:function(){return g.current?.querySelector(`audio[data-session-id="${h}"][data-audio-type="audio"]`)??null},getAllAudio:function(){return Array.from(g.current?.querySelectorAll(`audio`)??[])},getAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="audio"]`)??null},getRmpAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="rmpAudio"]`)??[])},getScreenAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="screenAudio"]`)??[])},getRmpAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="rmpAudio"]`)??null},getScreenAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="screenAudio"]`)??null}}},[h]);var _=mo(F(function(e,t,n){return lh(void 0,void 0,void 0,function(){var t,i;return uh(this,function(a){if(t=Object.values(l?.participants()??{}).filter(function(e){return!e.local&&!!e.tracks.audio.subscribed}),i=function(e){return t.some(function(t){return t.session_id===e})},!i(n))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(n,{setSubscribedTracks:{audio:!0}});else return[2];return f(function(r){if(r.includes(n))return r;var a=function(e){return!e||!i(e)};if(r.some(a)){var o=r.findIndex(a);return r[o]=n,ph([],fh(r),!1)}var s=r.findIndex(function(e){return t.some(function(t){return t.session_id===e&&ng(t.tracks.audio.state)})});if(s>=0)return r[s]=n,ph([],fh(r),!1);var c=t.filter(function(e){return r.includes(e.session_id)&&e.session_id!==h}).sort(function(t,n){var r=e(kh(t.session_id,`last_active`))??new Date(`1970-01-01`),i=e(kh(n.session_id,`last_active`))??new Date(`1970-01-01`);return r>i?1:r<i?-1:0});if(!c.length){var l=r.findIndex(function(e){return e!==h});return r[l]=n,ph([],fh(r),!1)}var u=r.indexOf(c[0]?.session_id);return r[u]=n,ph([],fh(r),!1)}),[2]})})},[h,r,l])),v=F(function(e){f(function(t){if(!t.includes(e))return t;var n=ph([],fh(t),!1),r=n.indexOf(e);return n[r]=``,n})},[]);Bh([`active-speaker-change`,`track-started`,`participant-left`],F(function(e){e.forEach(function(e){switch(e.action){case`active-speaker-change`:if(e.activeSpeaker.peerId===m)return;_(e.activeSpeaker.peerId);break;case`track-started`:e.track.kind===`audio`&&e.participant&&!e.participant.local&&_(e.participant.session_id);break;case`participant-left`:v(e.participant.session_id);break}})},[_,m,v]),200);var y=og({filter:F(function(e){return!!e?.tracks?.rmpAudio},[])});return no.createElement(`div`,{ref:g},d.map(function(e,t){return no.createElement(dg,{key:`speaker-slot-${t}`,onPlayFailed:o,sessionId:e,type:`audio`})}),p.filter(function(e){return c?!0:!e.local}).map(function(e){return no.createElement(dg,{key:e.screenId,onPlayFailed:o,sessionId:e.session_id,type:`screenAudio`})}),y.map(function(e){return no.createElement(dg,{key:`${e}-rmp`,onPlayFailed:o,sessionId:e,type:`rmpAudio`})}))}));fg.displayName=`DailyAudio`;var pg=ya(function(e,t){var n=e.automirror,r=e.fit,i=r===void 0?`contain`:r,a=e.mirror,o=e.onResize,s=e.playableStyle,c=s===void 0?{}:s,l=e.sessionId,u=e.style,d=u===void 0?{}:u,f=e.type,p=f===void 0?`video`:f,m=ch(e,[`automirror`,`fit`,`mirror`,`onResize`,`playableStyle`,`sessionId`,`style`,`type`]),h=$h()===l,g=p===`screenVideo`,_=h&&!g,v=N(null),y=ug(v,t),b=lg(l,p),x=b.persistentTrack,S=_||g||!b.isOff,C=Nh(l,`tracks.${p}`)?.subscribed,w=P(function(){if(typeof a==`boolean`)return a;if(!n)return!1;if(!x)return _;var e=x.getSettings();return`facingMode`in e?_&&e.facingMode===`user`:_},[n,_,a,x]);return M(function(){var e=v.current;if(e){var t=function(){var t=e.play();t!==void 0&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn(`Failed to play video`,t)})},n=function(){e.paused&&t()},r=function(){e.style.transform=`scale(1)`},i=function(){e.style.transform=``,setTimeout(function(){e.paused&&t()},100)},a=function(){document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),function(){e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}}},[]),M(function(){var e=v.current;if(!(!e||!x)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${p} for ${l}`);return}return e.srcObject=new MediaStream([x]),e.load(),function(){e.srcObject=null,e.load()}}},[l,p,x,x?.id]),M(function(){var e=v.current;if(!o||!e)return;var t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=v.current;if(!(!e||document.hidden)){var t=e.videoWidth,n=e.videoHeight;t&&n&&o?.({aspectRatio:t/n,height:n,width:t})}})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),function(){t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[o]),no.createElement(`video`,W({autoPlay:!0,muted:!0,playsInline:!0,ref:y,"data-local":h,"data-mirrored":w||void 0,"data-playable":S||void 0,"data-session-id":l,"data-subscribed":C,"data-video-type":p,style:W(W({objectFit:i,transform:w?`scale(-1, 1)`:``},d),S?c:{})},m))});pg.displayName=`DailyVideo`;var mg=Ae({refreshDevices:function(){return Promise.resolve()}}),hg=ea(`idle`);hg.debugLabel=Ch(`camera-state`);var gg=ea(`idle`);gg.debugLabel=Ch(`microphone-state`);var _g=ea([]);_g.debugLabel=Ch(`camera-devices`);var vg=ea([]);vg.debugLabel=Ch(`microphone-devices`);var yg=ea([]);yg.debugLabel=Ch(`speaker-devices`);var bg=ea(null);bg.debugLabel=Ch(`last-camera-error`);var xg=function(e){var t=e.children,n=hh(),r=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e,r,i,a,o,s,c,l,u,d;return uh(this,function(f){switch(f.label){case 0:if((navigator==null?void 0:navigator.mediaDevices)?.getUserMedia===void 0||(navigator==null?void 0:navigator.mediaDevices)?.enumerateDevices===void 0)return t(hg,`not-supported`),t(gg,`not-supported`),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return e.kind===`videoinput`&&e.deviceId!==``}),i=e.filter(function(e){return e.kind===`audioinput`&&e.deviceId!==``}),a=e.filter(function(e){return e.kind===`audiooutput`&&e.deviceId!==``}),[4,n.getInputDevices()];case 3:return o=f.sent(),s=o.camera,c=o.mic,l=o.speaker,u=function(e,t,n){var r=n.find(function(e){return e.device.deviceId===t.deviceId}),i=`deviceId`in e&&t.deviceId===e.deviceId,a=!(`deviceId`in e)&&r?.selected;return{device:t,selected:i||!!a,state:r?.state??`granted`}},d=function(e,t){return e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label)},t(_g,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(vg,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}),t(yg,function(e){return a.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(hg,`not-supported`),t(gg,`not-supported`),[3,5];case 5:return[2]}})})},[n])),i=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var i,a,o,s,c,l,u,d,f,p,m,h;return uh(this,function(g){switch(g.label){case 0:if(!n||(i=e(hg),a=e(gg),o=n.participants(),!o.local))return[2];if(s=o.local.tracks,c=`prompt`,l=`prompt`,!navigator.permissions)return[3,5];g.label=1;case 1:return g.trys.push([1,4,,5]),[4,navigator.permissions.query({name:`camera`})];case 2:return u=g.sent(),c=u.state,[4,navigator.permissions.query({name:`microphone`})];case 3:return d=g.sent(),l=d.state,[3,5];case 4:return g.sent(),[3,5];case 5:return f=c===`prompt`&&[`idle`,`pending`].includes(i)&&s.video.state===`interrupted`&&!s.video.persistentTrack,p=[`idle`,`pending`].includes(i)&&!s.video.persistentTrack&&!!s.video.off?.byUser,m=l===`prompt`&&[`idle`,`pending`].includes(a)&&s.audio.state===`interrupted`&&!s.audio.persistentTrack,h=[`idle`,`pending`].includes(a)&&!s.audio.persistentTrack&&!!s.audio.off?.byUser,s.audio?.blocked?.byDeviceInUse?(t(gg,`in-use`),t(vg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.audio?.blocked?.byDeviceMissing?t(gg,`not-found`):s.audio?.blocked?.byPermissions||l===`denied`?t(gg,`blocked`):m?t(gg,`pending`):h?t(gg,`idle`):(t(gg,`granted`),t(vg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),s.video?.blocked?.byDeviceInUse?(t(hg,`in-use`),t(_g,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.video?.blocked?.byDeviceMissing?t(hg,`not-found`):s.video?.blocked?.byPermissions||c===`denied`?t(hg,`blocked`):f?t(hg,`pending`):p?t(hg,`idle`):(t(hg,`granted`),t(_g,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),r(),[2]}})})},[n,r]));return G(`participant-updated`,F(function(e){e.participant.local&&i()},[i])),G(`available-devices-updated`,r),G(`selected-devices-updated`,r),G(`camera-error`,mo(F(function(e,t,n){switch(t(bg,n.error),n.error?.type){case`cam-in-use`:t(hg,`in-use`);break;case`mic-in-use`:t(gg,`in-use`);break;case`cam-mic-in-use`:t(hg,`in-use`),t(gg,`in-use`);break;case`not-found`:n.error?.missingMedia.includes(`video`)&&t(hg,`not-found`),n.error?.missingMedia.includes(`audio`)&&t(gg,`not-found`);break;case`permissions`:n.error?.blockedMedia.includes(`video`)&&t(hg,`blocked`),n.error?.blockedMedia.includes(`audio`)&&t(gg,`blocked`);break;case`constraints`:n.error?.reason===`invalid`?(t(hg,`constraints-invalid`),t(gg,`constraints-invalid`)):n.error?.reason===`none-specified`&&(t(hg,`constraints-none-specified`),t(gg,`constraints-none-specified`));break;case`undefined-mediadevices`:t(hg,`undefined-mediadevices`),t(gg,`undefined-mediadevices`);break;default:t(hg,`unknown`),t(gg,`unknown`);break}},[]))),G(`started-camera`,mo(F(function(e,t){t(hg,`granted`),t(gg,`granted`),i()},[i]))),no.createElement(mg.Provider,{value:{refreshDevices:r}},t)};function Sg(e){return e.instanceId??`__default__`}var Cg=ea({});Cg.debugLabel=Ch(`live-streaming-instances`);var wg=ea(function(e){var t=e(Cg),n=Object.values(t),r=n.filter(function(e){return e.isLiveStreaming}),i=r[0]??n[n.length-1];return{errorMsg:n.find(function(e){return e.errorMsg})?.errorMsg,isLiveStreaming:r.length>0,layout:i?.layout}});wg.debugLabel=Ch(`live-streaming`);var Tg=function(e){var t=e.children;return G(`live-streaming-started`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return W(W({},e),(t={},t[r]={instanceId:r,isLiveStreaming:!0,layout:n?.layout},t))})},[]))),G(`live-streaming-stopped`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),G(`live-streaming-error`,mo(F(function(e,t,n){var r=Sg(n);t(Cg,function(e){var t;return W(W({},e),(t={},t[r]=W(W({},e[r]??{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),G(`left-meeting`,mo(F(function(e,t){t(Cg,{})},[]))),no.createElement(no.Fragment,null,t)},Eg=ea(`new`);Eg.debugLabel=Ch(`meeting-state`);var Dg=ea(null);Dg.debugLabel=Ch(`meeting-error`);var Og=ea(null);Og.debugLabel=Ch(`non-fatal-error`);var kg=ea({data:void 0,topology:`none`});kg.debugLabel=Ch(`meeting-session-data`);var Ag=function(e){var t=e.children,n=hh(),r=mo(F(function(e,t){if(n){var r=n.meetingState();return t(Eg,r),r}},[n]));return G(`loading`,r),G(`loaded`,r),G(`joining-meeting`,r),G(`joined-meeting`,r),G(`left-meeting`,r),G(`error`,mo(F(function(e,t,n){t(Dg,n),r()},[r]))),G(`nonfatal-error`,mo(F(function(e,t,n){t(Og,n)},[]))),G(`joined-meeting`,mo(F(function(e,t){n&&t(kg,n.meetingSessionState())},[n]))),G(`meeting-session-state-updated`,mo(F(function(e,t,n){t(kg,n.meetingSessionState)},[]))),G(`left-meeting`,mo(F(function(e,t){t(kg,{data:void 0,topology:`none`})},[]))),G(`call-instance-destroyed`,mo(F(function(e,t){t(Eg,`new`),t(Dg,null),t(Og,null),t(kg,{data:void 0,topology:`none`})},[]))),no.createElement(no.Fragment,null,t)},jg=ea(`none`);jg.debugLabel=Ch(`topology`);var Mg=ea(`unknown`),Ng=ea([]),Pg=ea(`interrupted`),Fg=ea(100);Fg.debugLabel=Ch(`network-quality`);var Ig=ea(`good`);Ig.debugLabel=Ch(`network-threshold`);var Lg=function(e){var t=e.children,n=hh(),r=fo(jg),i=mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e;return uh(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return e=r.sent(),!e||e?.topology===`none`||t(jg,e.topology),[2]}})})},[n]));return G(`joined-meeting`,i),G(`network-connection`,mo(F(function(e,t,n){switch(t(Pg,n.event),n.event){case`connected`:n.type===`peer-to-peer`&&t(jg,`peer`),n.type===`sfu`&&t(jg,`sfu`);break}},[]))),G(`network-quality-change`,mo(F(function(e,t,n){t(Mg,function(e){return e===n.networkState?e:n.networkState}),t(Ng,function(e){var t=n.networkStateReasons??[];return Sh(e,t)?e:t}),t(Fg,function(e){return e===n.quality?e:n.quality}),t(Ig,function(e){return e===n.threshold?e:n.threshold})},[]))),G(`left-meeting`,mo(F(function(e,t){t(jg,`none`),t(Mg,`unknown`),t(Ng,[]),t(Pg,`interrupted`),t(Fg,100),t(Ig,`good`)},[]))),M(function(){!n||r!==`none`||i()},[n,i,r]),no.createElement(no.Fragment,null,t)};function Rg(e){return e.instanceId?e.instanceId:e.type===`local`||e.local?`__local__`:`__default__`}var zg=ea({});zg.debugLabel=Ch(`recording-instances`);var Bg=ea(function(e){var t=e(zg),n=Object.values(t),r=n.filter(function(e){return e.isRecording}),i=r[0]??n[n.length-1];return{error:n.some(function(e){return e.error}),isLocalParticipantRecorded:n.some(function(e){return e.isLocalParticipantRecorded}),isRecording:r.length>0,layout:i?.layout,local:i?.local,recordingId:i?.recordingId,recordingStartedDate:i?.recordingStartedDate,startedBy:i?.startedBy,type:i?.type}});Bg.debugLabel=Ch(`recording-state`);var Vg=function(e){var t=e.children,n=$h(),r=og({filter:`record`}),i=mo(F(function(e,t,n,r){var i=e(zg).__local__,a=W(W({},i),{instanceId:`__local__`,isLocalParticipantRecorded:n,isRecording:n,local:n?r:i?.local,type:n?`local`:i?.type});i&&xh(i,a)||!n&&!i||(n?t(zg,function(e){return W(W({},e),{__local__:a})}):i&&t(zg,function(e){return W(W({},e),{__local__:W(W({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return M(function(){i(r.length>0,r.includes(n||`local`))},[n,i,r]),G(`recording-started`,mo(F(function(e,t,r){var i=Rg(r),a=!0;switch(r.type){case`cloud-audio-only`:case`cloud-beta`:case`cloud`:n&&r.layout?.preset===`single-participant`&&r.layout.session_id!==n&&(a=!1);break}t(zg,function(e){var t;return W(W({},e),(t={},t[i]={error:!1,instanceId:i,isLocalParticipantRecorded:a,isRecording:!0,layout:r?.layout,local:r?.local,recordingId:r?.recordingId,recordingStartedDate:new Date,startedBy:r?.startedBy,type:r?.type},t))})},[n]))),G(`recording-stopped`,mo(F(function(e,t,n){var r=Rg(n);t(zg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),G(`recording-error`,mo(F(function(e,t,n){var r=Rg(n);t(zg,function(e){var t,i=e[r];return W(W({},e),(t={},t[r]=W(W({},i??{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),G(`left-meeting`,mo(F(function(e,t){t(zg,{})},[]))),no.createElement(no.Fragment,null,t)},Hg=function(){var e=fo(Eg);return st(e),e},Ug=ea(null);Ug.debugLabel=Ch(`room-state`);var Wg=function(e){var t=e.children,n=hh(),r=Hg();return G(`access-state-updated`,mo(F(function(e,t){return lh(void 0,void 0,void 0,function(){var e;return uh(this,function(i){switch(i.label){case 0:return!n||r===`left-meeting`?[2]:[4,n.room()];case 1:return e=i.sent(),e&&`id`in e&&t(Ug,e),[2,e]}})})},[n,r]))),G(`left-meeting`,mo(F(function(e,t){return function(){t(Ug,null)}},[]))),no.createElement(no.Fragment,null,t)},Gg=ea({isTranscribing:!1,model:`general`,language:`en`,transcriptions:[]});Gg.debugLabel=Ch(`transcription-state`);var Kg=function(e){var t=e.children;return G(`transcription-started`,mo(F(function(e,t,n){t(Gg,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),G(`transcription-stopped`,mo(F(function(e,t,n){t(Gg,function(e){return W(W({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),G(`transcription-error`,mo(F(function(e,t){t(Gg,function(e){return W(W({},e),{error:!0,isTranscribing:!1})})},[]))),G(`left-meeting`,mo(F(function(e,t){t(Gg,function(e){return W(W({},e),{isTranscribing:!1})})},[]))),G(`app-message`,mo(F(function(e,t,n){n?.fromId===`transcription`&&t(Gg,function(e){return W(W({},e),{isTranscribing:!0,transcriptions:ph(ph([],fh(e.transcriptions),!1),[n.data],!1)})})},[]))),no.createElement(no.Fragment,null,t)},qg=`0.25.3`,Jg={strictMode:!0},Yg=function(){return!0},Xg={options:Jg,shouldCreateInstance:Yg},Zg=function(e,t){var n=t===void 0?Xg:t,r=n.parentElRef,i=n.options,a=i===void 0?Jg:i,o=n.shouldCreateInstance,s=o===void 0?Yg:o,c=fh(j(null),2),l=c[0],u=c[1],d=N();return M(function(){if(e===`callFrame`&&r?.current===null||!s())return;function t(e){return lh(this,void 0,void 0,function(){return uh(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}var n=function(){setTimeout(function(){return u(null)},0)},i=Mm.getCallInstance();if(!l&&i&&!i.isDestroyed()){i.once(`call-instance-destroyed`,n),u(i);return}if(l){xh(d.current,a)||t(l);return}if(!i||i.isDestroyed())try{var o=W(W({},a),{aboutClient:W(W({},a.aboutClient??{}),{"daily-react":qg})});switch(e){case`callFrame`:i=r?.current?Mm.createFrame(r.current,o):Mm.createFrame(o);break;case`callObject`:i=Mm.createCallObject(o);break}d.current=a,u(i),i.once(`call-instance-destroyed`,n)}catch(e){if(console.error(`Error creating call instance:`,e),a.strictMode)throw e}},[l,a,r,s,e]),l},Qg=function(e){return Zg(`callObject`,e)},$g=function(e){var t=e.children,n=e.jotaiStore,r=ch(e,[`children`,`jotaiStore`]),i=N({}),a=F(function(e){var t,n;if(`action`in e){var r=e.action,a=Array.from(i.current?.[r]??[]),o=a.filter(function(e){return fh(e,1)[0]<0}),s=a.filter(function(e){return fh(e,1)[0]>0}),c=ph(ph([],fh(o),!1),fh(s),!1);try{for(var l=dh(c),u=l.next();!u.done;u=l.next()){var d=fh(u.value,2)[1];d(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}},[]),o=F(function(e){e&&Object.keys(i.current).forEach(function(t){e.off(t,a),e.isDestroyed()||e.on(t,a)})},[a]),s=`callObject`in r?r.callObject:null,c=Qg({options:P(function(){return`callObject`in r?{}:r},[r]),shouldCreateInstance:F(function(){return!(`callObject`in r)},[r])}),l=s??c;M(function(){l&&o(l)},[l,o]);var u=F(function(e,t,n){var r;i.current[e]||(i.current[e]=new Map,l&&(l.off(e,a),l.isDestroyed()||l.on(e,a))),i.current[e]?.has(n)||(r=i.current[e])==null||r.set(n,t)},[l,a]),d=F(function(e,t){var n;(n=i.current[e])==null||n.delete(t),i.current[e]?.size===0&&(l?.off(e,a),delete i.current[e])},[l,a]);return no.createElement(ao,{store:n},no.createElement(mh.Provider,{value:l},no.createElement(gh.Provider,{value:{on:u,off:d}},no.createElement(Wg,null,no.createElement(Ag,null,no.createElement(Lg,null,no.createElement(Qh,null,no.createElement(Vg,null,no.createElement(Tg,null,no.createElement(Kg,null,no.createElement(xg,null,t)))))))))))},e_=function(e){var t=(e===void 0?{}:e).onAppMessage,n=hh(),r=F(function(e,t){t===void 0&&(t=`*`),n&&n.sendAppMessage(e,t)},[n]);return G(`app-message`,F(function(e){t?.(e,r)},[t,r])),r},t_=function(e,t,n,r){var i=hh(),a=e===$h();G(`local-audio-level`,F(function(e){a&&t(e.audioLevel)},[t,a])),G(`remote-participants-audio-level`,F(function(n){a||t(n.participantsAudioLevel[e])},[t,e,a])),M(function(){if(!(!i||i.isDestroyed()||!a)&&!i.isLocalAudioLevelObserverRunning())try{i.startLocalAudioLevelObserver(r)}catch{n?.(`Local audio level observer not supported in this browser`)}},[i,n,r,a]),M(function(){!i||i.isDestroyed()||a||i.isRemoteParticipantsAudioLevelObserverRunning()||i.startRemoteParticipantsAudioLevelObserver(r)},[i,r,a])},n_=function(e){return lg(e,`audio`)},r_,i_;function a_(){return i_?r_:(i_=1,r_=function e(t,n){if(t===n)return!0;if(t&&n&&sh(t)==`object`&&sh(n)==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},r_)}a_();var o_=ea({state:`low`,reason:`none`});o_.debugLabel=Ch(`cpu-load`);var s_=function(){var e=hh(),t=fo(hg),n=fo(gg),r=fo(_g),i=fo(vg),a=fo(yg),o=fo(bg),s=I(mg).refreshDevices,c=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),l=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),u=F(function(t){return lh(void 0,void 0,void 0,function(){return uh(this,function(n){switch(n.label){case 0:return[4,e?.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=[`blocked`,`in-use`,`not-found`,`constraints-invalid`,`constraints-none-specified`,`undefined-mediadevices`,`unknown`],f={cameraError:o,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:i.find(function(e){return e.selected}),currentSpeaker:a.find(function(e){return e.selected}),hasCamError:d.includes(t),hasMicError:d.includes(n),microphones:i,micState:n,refreshDevices:s,setCamera:c,setMicrophone:l,setSpeaker:u,speakers:a};return st(f),f},c_=ea(null);c_.debugLabel=Ch(`input-settings`);var l_=ea({hidden:0,present:0});l_.debugLabel=Ch(`participant-counts`);var u_=ho(function(e){var t=ea({},function(t,n,r){n(u_(e),r)});return t.debugLabel=Ch(`participant-receive-settings-${e}`),t}),d_=function(e){return lg(e,`screenVideo`)},f_=ea(null);f_.debugLabel=Ch(`send-settings`);var p_=function(e){return lg(e,`video`)};function m_({children:e}){return L($g,{children:e})}var h_=Ae(null),g_=`tavus:memory-user-id:`,__=new Map;function v_(e){return`${g_}${e}`}function y_(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function b_(e){if(!e)return``;let t=v_(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=y_();return window.localStorage.setItem(t,n),n}catch{}let n=__.get(t);if(n)return n;let r=y_();return __.set(t,r),r}var x_=`tavus:terms-accepted:`;function S_(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function C_(e,t){return`${x_}${e}:${S_(t)}`}function w_(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(C_(e,t))===`1`}catch{return!1}}function T_(e,t){if(!(!e||!t))try{globalThis.localStorage?.setItem(C_(e,t),`1`)}catch{}}var E_=null;function D_(e,t){!e||!t||(E_={deploymentId:e,content:t})}function O_(){E_&&=(T_(E_.deploymentId,E_.content),null)}function k_(e){return e===`user`?`user`:e===`pal`?`replica`:null}function A_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function j_(e){if(!A_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!A_(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=k_(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=k_(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 M_(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function N_(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function P_(e){let t=k_(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...N_(e,`seq`),...N_(e,`turn_idx`)}}}function F_(e){let t=k_(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}:{},...N_(e,`seq`)}}}function I_(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,...N_(e,`seq`),...N_(e,`turn_idx`)}}}function L_(e){if(typeof e.name!=`string`||typeof e.arguments!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;return t?{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:e.arguments,modality:t}}:null}function R_(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function z_(e,t){return{kind:`speaking`,event_type:t,properties:{...N_(e,`seq`),...N_(e,`turn_idx`)}}}var B_={"conversation.utterance":P_,"conversation.utterance.streaming":F_,"conversation.tool_call":I_,"conversation.perception_tool_call":L_,"conversation.perception_analysis":R_,"conversation.replica_started_speaking":z_,"conversation.replica_stopped_speaking":z_,"conversation.user_started_speaking":z_,"conversation.user_stopped_speaking":z_};function V_(e){if(!A_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!A_(e.properties))return null;let t=B_[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function H_(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function U_(e,t){let n=j_(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 W_(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?!1:(t.splice(r,1),!0)}}}var G_=mn(`Conversation`),K_=1500;function q_(e,t){if(!t)return e;let n=()=>t.reason??new DOMException(`The operation was aborted`,`AbortError`);return t.aborted?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 J_=Ae(null);function Y_({children:e}){return L(m_,{children:L(iv,{children:e})})}function X_(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 Z_(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function Q_(e,t){for(let n of t)n.onPerception?.(e)}function $_(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 ev(e,t){for(let n of t)n.onMessage?.(e)}function tv(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:X_(e,t,n);return;case`tool_call`:Z_(e,t);return;case`perception_tool_call`:case`perception_analysis`:Q_(e,t);return;case`speaking`:$_(e,t);return;case`unknown`:ev(e,t);return}}function nv(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 rv(e,t){return t?e instanceof _n&&e.status===401:!1}function iv({children:e}){let{deploymentId:t,client:n,config:r}=I(_i),{memoryStores:i,conversationalContext:a,customGreeting:o}=I(yt),s=hh(),c=Hg(),l=I(h_),u=P(()=>zt(`idle`),[]),d=P(()=>zt(null),[]),f=P(()=>zt([]),[]),p=P(()=>zt(``),[]),m=P(()=>zt(null),[]),h=P(()=>zt(null),[]),g=P(()=>zt(null),[]),_=P(()=>zt(null),[]),v=N(null),y=N(null),b=P(()=>W_(),[]),x=P(()=>new Set,[]),S=P(()=>zt(`idle`),[]),C=l?.flowSignal??S,w=F(e=>{g.value=e},[g]),T=F(e=>{_.value=e},[_]),[,E]=j(c);M(()=>{E(c),c===`joined-meeting`?(u.value=`connected`,G_.info(`Connected to meeting`)):c===`left-meeting`?(u.value=`ended`,O_(),G_.info(`Left meeting`)):c===`error`&&(h.value=`Meeting error`,u.value=`error`)},[c,u,h]),pn(()=>{let e=u.value;if(e===`connected`)for(let e of x)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of x)e.onDisconnect?.();else if(e===`error`){let e=h.peek()??`Unknown error`;for(let t of x)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),pn(()=>{let e=C.value;for(let t of x)t.onModeChange?.(e)}),e_({onAppMessage:F(e=>{U_(e?.data,{appendChatMessage(e,t){e===`user`&&b.consumeMatch(t)||(f.value=[...f.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){p.value=e,m.value=n,v.current!==null&&(clearTimeout(v.current),v.current=null),t&&(v.current=setTimeout(()=>{p.value=``,m.value=null,v.current=null},K_))}});let t=V_(e?.data);t&&tv(t,x,b)},[f,p,m,b,x])}),M(()=>()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);let D=F(()=>{y.current=null,d.value=null,f.value=[],p.value=``,m.value=null,v.current!==null&&(clearTimeout(v.current),v.current=null),(u.peek()===`ended`||u.peek()===`error`)&&(u.value=`idle`)},[d,u,f,p,m]),ee=F(()=>{let e=d.peek()?.conversationId??null,r=y.current;if(r?.conversationId===e)return r.promise;u.value=`disconnecting`;let i=!1,a=e?bn(n,t,e,{keepalive:!0}).catch(e=>{i=!0,G_.error(`End conversation API failed`,e)}):Promise.resolve(),o;try{o=s?.leave()}catch(e){i=!0,G_.error(`Daily leave failed`,e)}let c=Promise.resolve(o).catch(e=>{i=!0,G_.error(`Daily leave failed`,e)}),l=Promise.all([a,c]).then(()=>{u.value=`ended`,i&&y.current?.promise===l&&(y.current=null)});return y.current={conversationId:e,promise:l},l},[n,t,s,d,u]),te=F(async(e,c)=>{let l=null;try{D(),u.value=`connecting`,h.value=null;let f=e,p=g.peek();p&&f?.password==null&&(f={...f,password:p});let m=r.value.customization.conversation.unique_memory_tag===!0;if(!f?.memory_stores){let e=i??(m?[b_(t)]:[]);e.length&&(f={...f,memory_stores:e})}f=nv(f,a,o);let v=_.peek();_.value=null,v&&f?.captcha_token==null&&(f={...f,captcha_token:v});let y=await yn(n,t,f,c);if(l=y.conversation_id,d.value={conversationId:y.conversation_id,conversationName:y.conversation_name,conversationUrl:y.conversation_url,callbackUrl:y.callback_url,createdAt:y.created_at,magicGrid:y.magic_grid===!0},console.info(`[Tavus:Conversation] Conversation created:`,y.conversation_id),c?.signal?.aborted)throw c.signal.reason??new DOMException(`The operation was aborted`,`AbortError`);let b=r.value.customization.conversation.modality===`chat`;await q_(Promise.resolve(s?.join({url:y.conversation_url,...b?{startAudioOff:!0,startVideoOff:!0}:{}})),c?.signal)}catch(e){throw await ee(),l&&(d.value=null),rv(e,r.value.has_password===!0)&&(g.value=null),G_.error(`Start failed`,e),h.value=String(e),u.value=`error`,e}},[n,t,s,u,h,d,g,_,r,i,a,o,D,ee]),ne=F(e=>{if(!s)return;let t=d.peek();if(!t){G_.warn(`sendChat called before session was established; dropping message`);return}b.markSent(e),s.sendAppMessage(M_(t.conversationId,e),`*`),f.value=[...f.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[s,f,d,b]),re=F(e=>{if(!s){G_.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=d.peek();if(!t){G_.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&b.markSent(e.properties.text),s.sendAppMessage(H_(t.conversationId,e),`*`)},[s,d,b]),O=F(e=>{x.add(e)},[x]),ie=F(e=>{x.delete(e)},[x]),ae=P(()=>({state:u,session:d,chatMessages:f,captionText:p,captionRole:m,error:h,password:g,setPassword:w,captchaToken:_,setCaptchaToken:T,mode:C,start:te,end:ee,sendChat:ne,sendMessage:re,conversation:{start:te,end:ee,sendMessage:re},__registerSubscriber:O,__unregisterSubscriber:ie,__beginAttempt:D}),[u,d,f,p,m,h,g,w,_,T,C,te,ee,ne,re,O,ie,D]);return L(J_.Provider,{value:ae,children:e})}var av=mn(`CaptchaChallenge`),ov=1;function sv(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function cv(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function lv({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=(I(yt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),s=new URL(o).origin,[c,l]=j(0),[u,d]=j(0),[f,p]=j(!1),[m,h]=j(!1),g=cv(o,e.challenge_path,t,e.action,window.location.origin),_=F(()=>{h(!1),l(e=>e+1)},[]);if(M(()=>{function e(e){if(f||e.origin!==s)return;let a=e.data;if(sv(a)&&a.deployment_uuid===t){if(a.type===`interactive`){h(!0),i?.(!0);return}if(a.type===`token`&&a.token){av.info(`Captcha token received`),h(!1),i?.(!1),n(a.token);return}if(a.type===`expired`){av.info(`Captcha token expired, reloading iframe`),_();return}a.type===`error`&&(av.warn(`Captcha error received`,a.code),u<ov?(d(e=>e+1),_()):(av.warn(`Captcha error retries exhausted, falling back to no-token mode`),p(!0),r()))}}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[s,t,u,f,n,r,i,_]),f)return null;let v=m&&a;return L(`div`,{class:v?`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":!v,children:L(`iframe`,{src:g,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},c)})}var uv=mn(`Captcha`),dv=15e3,fv=Ae(null);function pv({children:e}){let{config:t,deploymentId:n}=I(_i),r=I(J_),i=on(!0),a=on(null),o=on(!1),s=on(0),c=on(!1),l=on(!1),u=N([]),d=t.value.captcha??null,f=r?.state.value??`idle`,p=f===`connecting`||f===`connected`,m=d!==null&&!c.value&&!p&&o.value,h=F(e=>{let t=u.current;u.current=[];for(let n of t)n(e)},[]),g=F(e=>{r?.setCaptchaToken(e),l.value=!1},[r,l]);pn(()=>{(r?.captchaToken.value??null)!==null&&(o.value=!1)});let _=F(()=>{uv.warn(`Captcha challenge unavailable; not attempting /start without a token`),c.value=!0,o.value=!1,h({kind:`unavailable`})},[o,c,h]),v=F(e=>{l.value=e},[l]),y=F(async()=>(t.peek().captcha??null)===null?{kind:`not-required`}:(r?.captchaToken.peek()??null)===null?(c.peek()&&(c.value=!1,s.value=s.peek()+1),o.value=!0,new Promise(e=>{let t=!1,n,i=r=>{t||(t=!0,clearTimeout(a),n?.(),e(r))},a=setTimeout(()=>{l.peek()||(uv.warn(`Captcha mint timed out`),h({kind:`unavailable`}))},dv);n=r?.captchaToken.subscribe(e=>{e!==null&&i({kind:`token`})}),u.current.push(i)})):{kind:`token`},[o,t,r,s,c,l,h]),b=P(()=>({ensureToken:y,hostVisible:i,promptSlot:a}),[y,i,a]),x=l.value&&i.value?a.value:null,S=m&&d?L(lv,{captcha:d,deploymentId:n,presented:i.value,onToken:g,onFallback:_,onInteractive:v},s.value):null;return L(fv.Provider,{value:b,children:[e,x&&S?Na(S,x):S]})}function mv(){let e=I(_i);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var hv=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function gv(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 _v(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 vv(e){if(e instanceof _n){let t=gv(e.status);return{kind:t,status:e.status,raw:e.body,retryable:hv.has(t),retryAfterSec:_v(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var yv=new Set([`Captcha token required`,`Captcha verification failed`]);function bv(e){if(!(e instanceof _n)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function xv(e){let t=bv(e);return t!==null&&yv.has(t)}var Sv=`Origin not allowed`;function Cv(e){return bv(e)===Sv}function wv(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var Tv=`tavus_pudl_`,Ev=3600*48,Dv=new Map;function Ov(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function kv(e){return`${Tv}${e}`}function Av(e){try{let t=`${kv(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!==Ov())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function jv(e,t){try{let n=encodeURIComponent(`${Ov()}.${t}`);document.cookie=`${kv(e)}=${n}; max-age=${Ev}; path=/; SameSite=Lax`}catch{return}}function Mv(e){let t=Dv.get(e);return t||(t=zt(e?Av(e):0),Dv.set(e,t)),t}function Nv(e){if(!e)return;jv(e,Av(e)+1);let t=Av(e),n=Dv.get(e);n?n.value=t:Dv.set(e,zt(t))}function Pv(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 Fv(e,t,n,r){return e===`granted`&&r?`granted`:Pv(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function Iv(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 Lv(e){let[t,n]=j(null);return M(()=>{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 Rv(){let e=hh(),t=Hg(),n=$h(),{micState:r,camState:i,currentMic:a,currentCam:o}=s_(),s=Lv(`microphone`),c=Lv(`camera`),l=t===`joined-meeting`||!!n,[u,d]=j(!1),[f,p]=j(!1),m=F(()=>{e&&(d(!0),l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{}))},[e,l]),h=F(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:P(()=>Iv(Fv(r,s,u,!!a),s),[r,s,u,a]),camera:P(()=>Iv(Fv(i,c,f,!!o),c),[i,c,f,o]),requestMic:m,requestCamera:h}}var zv=mn(`Flow`),Bv=[`idle`,`unavailable`,`ended`];function Vv({children:e}){let{config:t}=mv(),{start:n,end:r,session:i,state:a,__beginAttempt:o}=I(J_),s=t.value.deployment_id??``,c=Mv(s),l=F(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),u=I(fv),[d,f]=j(`idle`),[p,m]=j(!1),[h,g]=j(null),[_,v]=j(null),[y,b]=j(!1),{mic:x,camera:S,requestMic:C,requestCamera:w}=Rv(),T=P(()=>zt(`idle`),[]);M(()=>{T.value=d},[d,T]),pn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel!==`widget`&&e.channel!==`embed`||T.value===`idle`&&c.value>=n&&(v(`daily_limit`),b(!1),f(`unavailable`)))});let E=t.value.customization.show_haircheck,D=t.value.customization.conversation.modality,ee=E&&D!==`chat`,te=!E&&D!==`chat`,ne=N(!1),re=N(!1),O=N(null),ie=N(null),ae=F(async(e=new AbortController)=>{ie.current=e;let{signal:r}=e;m(!0);try{let e=await u?.ensureToken()??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){v(`error`),b(!0),f(`unavailable`);return}if(await n(void 0,{signal:r}),r.aborted)return;ne.current=!1,l()!=null&&Nv(s),f(`call`)}catch(e){if(r.aborted)return;let n=vv(e);if(xv(e)&&!ne.current){ne.current=!0,m(!1),f(`idle`);return}if(ne.current=!1,Cv(e)){zv.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),v(`error`),b(!1),f(`unavailable`);return}if(n.status===401&&t.value.has_password===!0){f(`idle`);return}let i=wv(n.kind)??`busy`;v(i),b(n.retryable),f(`unavailable`)}finally{ie.current===e&&(ie.current=null),m(!1)}},[n,t,l,s]),k=F(async()=>{let e=O.current;if(e){g(null);try{await ae(e.controller)}finally{O.current===e&&(O.current=null),e.resolve()}}},[ae]),A=F(()=>{let e=O.current;if(!(!e||e.proceeding)){if(e.proceeding=!0,D===`video`&&!S.isGranted&&!S.isBlocked){g({kind:`camera`,status:S.status}),w().finally(()=>{k()});return}k()}},[D,S,w,k]);M(()=>{if(!(!O.current||h?.kind!==`microphone`)){if(h.status!==x.status&&g({kind:`microphone`,status:x.status}),x.isGranted){A();return}if(x.isBlocked){let e=O.current;O.current=null,m(!1),e.resolve()}}},[h,x,A]);let oe=F(()=>{if(O.current)return O.current.promise;let e,t=new Promise(t=>{e=t});return O.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},m(!0),x.isGranted?A():x.isBlocked?(g({kind:`microphone`,status:x.status}),O.current=null,m(!1),e()):(g({kind:`microphone`,status:x.status}),C()),t},[x,C,A]),se=F(async()=>{if(!Bv.includes(d))return;let e=l();if(e!=null&&c.value>=e){v(`daily_limit`),b(!1),f(`unavailable`);return}if(v(null),b(!1),o(),ee&&!re.current){f(`haircheck`);return}return te?oe():ae()},[d,ee,te,oe,ae,l,c,o]),ce=F(async()=>{d===`haircheck`&&(re.current=!0,await ae())},[d,ae]),le=F(()=>{let e=O.current,t=e?.controller??ie.current;e&&(O.current=null,e.resolve(),g(null)),t?.abort(),t&&m(!1),d===`haircheck`&&f(`idle`)},[d]),ue=F(()=>{d===`call`&&f(`ended`)},[d]);M(()=>{let e=()=>{let e=O.current!==null||ie.current!==null,t=d===`haircheck`||d===`call`,n=i.peek()!==null,o=n&&a.peek()!==`ended`;!e&&!t&&!n||(le(),(d===`call`||o)&&f(`ended`),r())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[d,i,a,le,r]);let de=F(()=>{v(null),b(!1),f(`idle`)},[]),fe=P(()=>({flowSignal:T,setFlowState:f,isStarting:p,permissionRequest:h,unavailableCause:_,canRetry:y,start:se,join:ce,cancel:le,leave:ue,restart:de}),[T,p,h,_,y,se,ce,le,ue,de]);return L(h_.Provider,{value:fe,children:e})}var Hv=mn(`HostBridge`),Uv=Ae(null);function Wv(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function Gv({children:e}){let t=I(J_),n=I(_i),r=I(h_),i=I(yt),a=on(null),o=i?.overrideConfig,s=F(e=>{a.value=Wv(e)},[a]),c=F((e,t)=>{let n=a.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),Hv.info(`Event:`,e,t)},[a]);M(()=>{let e=a.value;if(!e)return;let n={tavus:{start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},startConversation:async()=>{try{r?await r.start():await t.start()}catch(e){Hv.error(`startConversation failed`,e)}},endConversation:async()=>{try{let e=r?.flowSignal.peek();e===`call`?r?.leave():e===`haircheck`?r?.cancel():t.session.peek()&&await t.end()}catch(e){Hv.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let n=Cn(o??{},t);e.setAttribute(`override-config`,JSON.stringify(n))},destroy:()=>{t.session.peek()&&t.end(),e.remove()}};return Object.assign(e,n),()=>{for(let t of Object.keys(n))delete e[t]}},[a.value,t,r,o]);let l=N(!1);M(()=>{l.current||!a.value||!n||(l.current=!0,c(`tavus:ready`,{deploymentId:n.deploymentId}))},[a.value,n,c]);let u=N(null);M(()=>t.state.subscribe(e=>{if(e!==u.current)switch(u.current=e,e){case`connected`:c(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`ended`:c(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`error`:c(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),c(`tavus:state-change`,{state:e});break;default:c(`tavus:state-change`,{state:e})}}),[t,c]),pn(()=>{if(!r)return;let e=r.flowSignal.value;c(`tavus:mode-change`,{mode:e})}),M(()=>{let e={onUtterance(e){c(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){c(`tavus:tool-call`,e),c(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){c(`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}};c(`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){c(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,c]);let d=P(()=>({shadowHost:a,dispatchEvent:c}),[a,c]);return L(Uv.Provider,{value:d,children:[L(`div`,{ref:s,style:`display:contents`}),e]})}var Kv=Ae(null);function qv({children:e}){let{config:t}=I(_i),n=P(()=>Wt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=P(()=>Wt(()=>{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=P(()=>Wt(()=>Zv(t.value.customization.style)),[t]),a=P(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return L(Kv.Provider,{value:a,children:L(`div`,{"data-theme":r.value,style:Qv(i.value),class:`contents`,children:e})})}var Jv=[0,.125,.25,.5,.75],Yv=[0,1,2,3,4],Xv=[0,.2,.25,.3];function Zv(e){return{"--radius-box":`${Jv[e.boxes_radius]??.5}rem`,"--radius-field":`${Jv[e.field_radius]??.25}rem`,"--radius-selector":`${Jv[e.selectors_radius]??.5}rem`,"--border":`${Yv[e.border_width]??1}px`,"--size-field":`${Xv[e.fields_size]??.25}rem`,"--size-selector":`${Xv[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function Qv(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Ae(null);var $v=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`;`${$v}`,`${$v}`;var ey=41/2,ty=23/2,ny=Math.hypot(ey,ty);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-ey,r-ty)/ny*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var ry=Ae(null);function iy({children:e}){let t=N(null);return L(ry.Provider,{value:{frameRef:t},children:L(`div`,{class:`@container/conversation w-full h-full`,children:L(`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 ay=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),oy=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),sy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),cy=e=>{let t=sy(e);return t.charAt(0).toUpperCase()+t.slice(1)},ly={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`},uy=Ae({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),dy=()=>I(uy),fy=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},py=({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,children:i,iconNode:a,class:o=``,...s})=>{let{size:c=24,strokeWidth:l=2,absoluteStrokeWidth:u=!1,color:d=`currentColor`,class:f=``}=dy()??{},p=r??u?Number(n??l)*24/Number(t??c):n??l;return O(`svg`,{...ly,width:t??c??24,height:t??c??24,stroke:e??d,"stroke-width":p,class:ay(`lucide`,f,o),...!i&&!fy(s)&&{"aria-hidden":`true`},...s},[...a.map(([e,t])=>O(e,t)),...me(i)])},my=(e,t)=>{let n=({class:n=``,className:r=``,children:i,...a})=>O(py,{...a,iconNode:t,class:ay(`lucide-${oy(cy(e))}`,`lucide-${oy(e)}`,n,r)},i);return n.displayName=cy(e),n},hy=my(`camera-off`,[[`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`}]]),gy=my(`camera`,[[`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=my(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),vy=my(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),yy=my(`ellipsis`,[[`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`}]]),by=my(`expand`,[[`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`}]]),xy=my(`external-link`,[[`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`}]]),Sy=my(`maximize-2`,[[`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`}]]),Cy=my(`message-circle`,[[`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`}]]),wy=my(`mic-off`,[[`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`}]]),Ty=my(`mic`,[[`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`}]]),Ey=my(`minimize-2`,[[`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`}]]),Dy=my(`monitor-up`,[[`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`}]]),Oy=my(`moon`,[[`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`}]]),ky=my(`phone-off`,[[`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`}]]),Ay=my(`picture-in-picture-2`,[[`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`}]]),jy=my(`send`,[[`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`}]]),My=my(`shrink`,[[`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`}]]),Ny=my(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Py=my(`triangle-alert`,[[`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`}]]),Fy=my(`user`,[[`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`}]]),Iy=my(`users`,[[`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`}]]),Ly=my(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Ry(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>L(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:L(e,{size:n})})}var zy={close:Ry(Ly,`Close`),cancel:Ry(Ly,`Cancel`),leave:Ry(ky,`Leave call`),more:Ry(yy,`More`),error:Ry(Py,`Error`),mic:Ry(Ty,`Microphone`),"mic-off":Ry(wy,`Microphone muted`),cam:Ry(gy,`Camera`),"cam-off":Ry(hy,`Camera off`),"screen-share":Ry(Dy,`Screen share`),pip:Ry(Ay,`Picture in picture`),user:Ry(Fy,`User`),"face-smile":Ry(Ny,`Camera off`),captions:Ry(_y,`Closed captions`),chat:Ry(Cy,`Chat`),fullscreen:Ry(Sy,`Enter fullscreen`),"fullscreen-exit":Ry(Ey,`Exit fullscreen`),expand:Ry(by,`Expand`),collapse:Ry(My,`Collapse`),send:Ry(jy,`Send`),"external-link":Ry(xy,`External link`),clock:Ry(vy,`Clock`),moon:Ry(Oy,`Unavailable`),users:Ry(Iy,`Busy`)},By=`<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>`,Vy=`<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>`,Hy=`<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>`,Uy=`<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>`,Wy=`<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>`,Gy=`<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>`,Ky=`<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>`,qy=`<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>`,Jy=`<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>`,Yy=`<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>`,Xy=`<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>`,Zy=`<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>`,Qy=`<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>`,$y=`<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>`,eb=`<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>`,tb=`<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>`,nb=`<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>`,rb=`<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>`,ib=`<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>`,ab=`<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>`,ob=`<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>`,sb=`<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>`,cb=`<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>
52
+ `;function lb(e){return e.replace(/\s(width|height)="\d+"/g,``)}function ub(e,t){let n=lb(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>L(`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 db={pixelarticons:{close:ub(Wy,`Close`),cancel:ub(Gy,`Cancel`),leave:ub(Xy,`Leave call`),more:ub(eb,`More`),error:ub(qy,`Error`),mic:ub(Zy,`Microphone`),"mic-off":ub(Qy,`Microphone muted`),cam:ub(cb,`Camera`),"cam-off":ub(By,`Camera off`),"screen-share":ub(nb,`Screen share`),pip:ub(tb,`Picture in picture`),user:ub(ib,`User`),"face-smile":ub(ob,`Camera off`),captions:ub(Vy,`Closed captions`),chat:ub(Hy,`Chat`),fullscreen:ub(Yy,`Enter fullscreen`),"fullscreen-exit":ub(Ky,`Exit fullscreen`),expand:ub(Jy,`Expand`),collapse:ub(Ky,`Collapse`),send:ub(rb,`Send`),"external-link":ub(sb,`External link`),clock:ub(Uy,`Clock`),moon:ub($y,`Unavailable`),users:ub(ab,`Busy`)},lucide:zy};function fb({name:e,...t}){let{config:n}=mv(),r=(db[n.value.customization.style.icon_library]??db.pixelarticons)[e];return L(r,{...t})}var pb=`Ready when you are`,mb=`Start the conversation`;function hb(e){return typeof e==`string`&&e.length>0?e:``}function gb(e){let t=hb(e.replica_thumbnail_image_url)||null,n=hb(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function _b(e){let{preview:t}=e.customization,{background:n}=t,r=gb(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=hb(n.url);return{title:t.title||pb,description:t.description||``,btn_title:t.btn_title||mb,background:{type:i,url:a}}}var vb={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},yb=`#t=0.1`;function bb(e){return e.includes(`#`)?e:`${e}${yb}`}function xb({replica:e,fallback:t=null}){let[n,r]=j(()=>new Set),i=e=>r(t=>new Set(t).add(e)),a=`absolute inset-0 w-full h-full object-cover`,{imageUrl:o,videoUrl:s}=e;return o&&!n.has(o)?L(`img`,{class:a,src:o,loading:`lazy`,alt:``,onError:()=>i(o)}):s&&!n.has(s)?L(`video`,{class:a,src:bb(s),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onError:()=>i(s)}):L(k,{children:t})}function Sb({variant:e,replica:t}){let[n,r]=j(!1);return M(()=>{r(!1)},[e.url]),e.type===`replica`&&t?L(xb,{replica:t,fallback:L(`div`,{class:`absolute inset-0`,style:vb})}):e.type===`custom-image`&&e.url&&!n?L(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):L(`div`,{class:`absolute inset-0`,style:vb})}function Cb({className:e=``}){let{config:t}=mv(),n=_b(t.value),r=gb(t.value);return L(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:L(Sb,{variant:n.background,replica:r})})}var wb=`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 Tb({title:e,description:t,media:n,children:r,overlay:i}){return L(`div`,{class:wb,children:[n===void 0?L(Cb,{}):n,(e||t)&&L(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&L(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&L(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&L(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}var Eb={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.`}};function Db(e,t){let n=t?.[e];return{title:n?.title||Eb[e].title,description:n?.description||Eb[e].description}}var Ob={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`};function kb({cause:e}){return L(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:L(fb,{name:Ob[e],size:`2rem`})})}function Ab({cause:e,canRetry:t,onRetry:n,onCancel:r}){let{config:i}=mv(),a=i.value.customization?.unavailable_screen,o=Db(e,a),s=a?.cta??[],c=e===`busy`||s.length>0||!!r;return L(Tb,{media:L(kb,{cause:e}),title:o.title,description:o.description,children:c&&L(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[e===`busy`&&L(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,disabled:!t,onClick:n,children:`Try again`}),s.map(e=>L(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&L(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function jb(){let e=I(h_);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}}function Mb(){return I(yt)?.layout??`inline`}var Nb=`text-preview-title @max-mobile:text-preview-title-narrow`,Pb=`text-preview-title-full-screen`,Fb=`text-sm @max-mobile:text-xs`,Ib=`text-preview-description-full-screen`;function Lb({title:e,description:t,fullScreen:n}){return!e&&!t?null:L(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&L(`h2`,{class:`${n?Pb:Nb} font-medium leading-tight`,children:e}),t&&L(`p`,{class:`${n?Ib:Fb} text-white/80 leading-snug`,children:t})]})}var Rb=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,zb=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,Bb=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,Vb=`absolute inset-0 bg-black/45`,Hb=`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 Ub({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=mv(),l=_b(c.value),u=gb(c.value),d=Mb()===`full-screen`;return L(`div`,{class:a?`${Rb} ${a}`:Rb,role:o,"aria-live":s,children:[L(Sb,{variant:l.background,replica:u}),r===`center`?L(k,{children:[L(`div`,{class:Vb}),L(`div`,{class:`${Hb} flex flex-col items-center justify-center gap-3`,children:n})]}):L(k,{children:[(e||t)&&(d?L(`div`,{class:zb}):L(k,{children:[L(`div`,{class:`${zb} hidden @max-mobile:block`}),L(`div`,{class:Bb})]})),d?L(`div`,{class:Hb,children:[L(Lb,{title:e,description:t,fullScreen:!0}),L(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):L(`div`,{class:`${Hb} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,children:[L(`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:L(Lb,{title:e,description:t})}),L(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}function Wb({loading:e=!1,disabled:t,class:n,children:r,...i}){return L(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[L(`span`,{children:r}),e&&L(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:L(`span`,{class:`loading loading-spinner loading-sm`})})]})}var Gb={video:`cam`,audio:`mic`,chat:`chat`},Kb={"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 qb({children:e,loading:t=!1,...n}){let{config:r}=mv(),i=Mb(),a=Gb[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return L(Wb,{class:`btn-preview-action rounded-box ${Kb[i]}`,loading:t,...n,children:o?L(`span`,{class:`flex items-center justify-center gap-2`,children:[L(fb,{name:a,"aria-hidden":!0}),e]}):e})}var Jb=`Thanks for joining`,Yb=`You can start a new conversation whenever you're ready.`,Xb=`Start a new conversation`;function Zb(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function Qb({text:e,onRestart:t,isStarting:n=!1}){let{config:r}=mv(),i=Mb()===`full-screen`,a=r.value.customization.after_call,o=a.cta.filter(e=>Zb(e.url));return L(Ub,{title:a.title||e?.title||Jb,description:a.description||e?.description||Yb,children:[L(qb,{onClick:t,loading:n,children:e?.restart||Xb}),o.length>0&&L(`div`,{class:`flex flex-wrap items-center gap-2 ${i?`justify-center`:`justify-end`}`,children:o.map(e=>L(`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 $b(){let e=hh(),t=$h(),{isOff:n}=p_(t),{camState:r}=s_();return{isCamReady:P(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:F(()=>{e?.setLocalVideo(n)},[e,n])}}function ex(){let e=hh(),t=$h(),{isOff:n}=n_(t),{micState:r}=s_();return{isMicReady:P(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:F(()=>{e?.setLocalAudio(n)},[e,n])}}function tx(){let e=hh(),t=$h(),{isOff:n}=d_(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:F(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var nx={microphone:`microphone`,camera:`camera`};function rx({class:e}){return L(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[L(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function ix(){return L(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[L(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),L(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),L(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),L(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),L(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:L(rx,{})}),L(`g`,{transform:`translate(34 78)`,children:[L(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),L(`g`,{transform:`translate(40 120)`,children:[L(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),L(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),L(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var ax=ga(({device:e,onClose:t})=>{let n=nx[e];return M(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),L(`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:L(`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:[L(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:L(fb,{name:`close`,size:`1.1rem`})}),L(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[L(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:L(ix,{})}),L(`div`,{class:`flex flex-col gap-4`,children:[L(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),L(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[L(`li`,{class:`flex items-start gap-2`,children:[L(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),L(`span`,{class:`leading-snug`,children:[`Click the `,L(rx,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),L(`li`,{class:`flex items-start gap-2`,children:[L(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),L(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),L(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),ox=Ae({open:()=>{},close:()=>{}});function sx(){return I(ox)}function cx({children:e}){let[t,n]=j(null),r=F(e=>n(e),[]),i=F(()=>n(null),[]),a=P(()=>({open:r,close:i}),[r,i]);return L(ox.Provider,{value:a,children:[e,t&&L(ax,{device:t,onClose:i})]})}var lx=ga(()=>L(`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:`!`})),ux=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,dx=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,fx=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,px=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,mx=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function hx(){return L(`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:L(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function gx(){let e=$h(),t=N(null),n=N(void 0);return t_(e??``,F(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))})},[])),L(`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 _x({value:e,devices:t,disabled:n,onChange:r,label:i}){return L(k,{children:[L(`select`,{class:dx,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>L(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),L(`span`,{class:fx,children:L(hx,{})})]})}function vx(e){return L(`div`,{class:ux,children:L(_x,{...e})})}function yx({iconName:e,...t}){return L(`div`,{class:ux,children:[L(`span`,{class:px,"aria-hidden":`true`,children:L(fb,{name:e})}),L(_x,{...t})]})}var bx=ga(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=ex(),{microphones:i,currentMic:a,setMicrophone:o}=s_();if(!a||(i?.length??0)<=1)return L(Cx,{level:e});let s=e&&n&&!r;return L(`div`,{class:`relative inline-flex items-center`,children:[L(vx,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),L(`button`,{type:`button`,onClick:t,disabled:!n,class:`${mx} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&L(gx,{}),L(`span`,{class:`relative z-10 inline-flex`,children:L(fb,{name:r||!n?`mic-off`:`mic`})})]})]})});function xx(){let{onToggleCamera:e,isCamMuted:t}=$b(),{camera:n,requestCamera:r}=Rv(),{open:i}=sx(),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 Sx=ga(()=>{let{isCamReady:e}=$b(),{currentCam:t,cameras:n,setCamera:r}=s_(),i=xx();return!t||(n?.length??0)<=1?L(wx,{}):L(`div`,{class:`relative inline-flex items-center`,children:[L(vx,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),L(`button`,{type:`button`,onClick:i.onClick,class:mx,"aria-label":i.label,"aria-pressed":!i.isOn,children:L(fb,{name:i.isOn?`cam`:`cam-off`})})]})}),Cx=ga(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=ex(),{mic:r,requestMic:i}=Rv(),{open:a}=sx(),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 L(`span`,{class:`relative inline-flex`,children:[L(`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&&L(gx,{}),L(`span`,{class:`relative z-10 inline-flex`,children:L(fb,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&L(lx,{})]})}),wx=ga(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=xx();return L(`span`,{class:`relative inline-flex`,children:[L(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:L(fb,{name:e?`cam`:`cam-off`})}),r&&L(lx,{})]})});ga(({compact:e=!1}={})=>{let{isMicReady:t}=ex(),{microphones:n,currentMic:r,setMicrophone:i}=s_();return(n?.length??0)<=1?null:L(yx,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),ga(({compact:e=!1}={})=>{let{isCamReady:t}=$b(),{currentCam:n,cameras:r,setCamera:i}=s_();return(r?.length??0)<=1?null:L(yx,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Tx=ga((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=tx();return L(`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:L(fb,{name:`screen-share`})})});function Ex(e){let t=I(J_);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return M(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Dx=Ae(null);function Ox({children:e,defaultEnabled:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=P(()=>({isEnabled:n,toggle:i}),[n,i]);return L(Dx.Provider,{value:a,children:e})}function kx(){let e=I(Dx);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Ax=ga(()=>{let{isEnabled:e,toggle:t}=kx();return L(`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:L(fb,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),jx=ga(()=>{let{isEnabled:e}=kx(),{captionText:t,captionRole:n}=Ex(),r=t.value,i=n.value;return!e||!r?null:L(`div`,{class:`pointer-events-none absolute bottom-24 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:L(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:L(`div`,{children:[L(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),Mx=Ae(null);function Nx({children:e,defaultOpen:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=F(()=>r(!1),[]),o=P(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return L(Mx.Provider,{value:o,children:e})}function Px(){let e=I(Mx);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var Fx=ga((e={})=>{let{isOpen:t,toggle:n}=Px();return L(`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:L(fb,{name:`chat`})})}),Ix=ga(({message:e})=>{let t=e.sender===`user`;return L(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[L(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),L(`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})]})}),Lx=ga(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=Px(),{chatMessages:i,sendChat:a,session:o}=Ex(),s=o.value?.conversationId??null,c=i.value,[l,u]=j(``),d=N(null);M(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=F(()=>{let e=l.trim();!e||!s||(a(e),u(``))},[l,a,s]),p=F(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return L(`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?!1:!n,inert:e?!1:!n,children:[L(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[L(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:L(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:L(fb,{name:`close`,size:20})})]}),L(`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?L(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>L(Ix,{message:e},e.id))}),L(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[L(`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`}),L(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:L(fb,{name:`send`,size:18})})]})]})});function Rx({label:e}){return L(Ub,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:L(`div`,{class:`flex items-center gap-2`,children:[L(`span`,{class:`loading loading-spinner loading-sm`}),L(`span`,{class:`text-base font-medium`,children:e})]})})}var zx=ga(()=>L(Rx,{label:`Connecting…`})),Bx=ga(()=>L(Rx,{label:`Leaving…`}));function Vx({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return L(`div`,{class:`flex items-center gap-2`,children:[r&&L(`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`}),L(`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:L(fb,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var Hx=ga(({id:e})=>{let t=tg()===e,n=N(null),r=N(null),i=N(null),a=N(void 0);t_(e,F(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 L(`div`,{class:`flex items-center justify-center w-6 h-6`,children:L(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[L(`div`,{ref:n,class:o,style:{height:`20%`}}),L(`div`,{ref:r,class:o,style:{height:`20%`}}),L(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),Ux=[0,1,2],Wx=.05,Gx=450;function Kx({sessionId:e,className:t=``}){let{config:n}=mv(),r=_b(n.value),i=gb(n.value),a=N(null),o=N(void 0),s=N(void 0),[c,l]=j(!1),u=N(!1);return t_(e??``,F(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>Wx?(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)},Gx))}))},[e])),M(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),L(`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:[Ux.map(e=>L(`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)),L(`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`}}),L(`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:L(Sb,{variant:r.background,replica:i})})]})}function qx({children:e,class:t,className:n,...r}){return L(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),L(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),L(`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 Jx=e=>!!e.user_id?.includes(`tavus-replica`);function Yx(){return og({filter:Jx})}function Xx(e){let t=Yx()[0],n=p_(t??``),r=Hg(),[i,a]=j(!1);return M(()=>{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 Zx=ga(({isAudioOnly:e})=>{let t=Xx(e);return t.phase===`left`?L(Bx,{}):t.phase===`connecting`?L(zx,{}):e?L(qx,{class:`flex items-center justify-center`,children:[L(Kx,{sessionId:t.replicaId}),L(dg,{sessionId:t.replicaId})]}):L(`div`,{class:`relative w-full h-full`,children:[L(pg,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),L(dg,{sessionId:t.replicaId})]})}),Qx=ga(({onLeave:e})=>{let{config:t}=mv(),n=t.value.customization.conversation.modality===`audio`;return L(`div`,{class:`@container/pip w-full h-full`,children:L(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[L(`div`,{class:`relative w-full h-full z-5`,children:L(Zx,{isAudioOnly:n})}),L(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[L(Cx,{}),!n&&L(wx,{}),L(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:L(fb,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function $x(e,t){return e<=0||t<=0?!1:e/t<.75}var eS=ga(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=N(null),o=i??a,[s,c]=j(0),[l,u]=j(0),d=F(({aspectRatio:e})=>c(e),[]);M(()=>{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&&$x(s,l),h=n||m;return L(k,{children:[m&&L(pg,{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`:``}`}),L(pg,{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`:``}`})]})}),tS=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),nS=[`.sandbox-tavus.io`],rS=new Set([`tavusapi.com`]);function iS(e){let t;try{t=new URL(e)}catch{return!1}return sS(t)?!0:t.protocol===`https:`?tS.has(t.hostname)?!0:nS.some(e=>t.hostname.endsWith(e)):!1}function aS(e){return iS(e)}function oS(e){let t;try{t=new URL(e)}catch{return!1}return cS(t)?!0:t.protocol===`https:`&&rS.has(t.hostname)}function sS(e){return cS(e)}function cS(e){return!lS()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function lS(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}async function uS(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var dS=`tavus.canvas.interaction`,fS=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],pS=`safe-area-right`,mS={x:275/1280,y:111/720,width:730/1280,height:609/720},hS={type:`snapshot_mirror`};function gS(e){return RS(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&RS(e.properties):!1}function _S(e){if(!RS(e))return null;let t=QS(e,`component`),n=QS(e,`component_version`),r=QS(e,`sandbox_url`),i=tC(e,`mcp_server_url`,aS),a=tC(e,`api_base_url`,oS),o=tC(e,`interaction_url`,oS),s=HS(e.layout),c=e.version;return c!==1||!t||!n||!r||!iS(r)||i===null||a===null||o===null||s===null?null:{version:c,component:t,component_version:n,resource_uri:QS(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:QS(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,layout:s,host_context:RS(e.host_context)?e.host_context:void 0}}function vS(e){if(e===void 0)return{ok:!0,value:{}};if(RS(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 RS(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:zS(e)}}}function yS(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=vS(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(!RS(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 bS=[`safe-area-left`,`safe-area-right`];function xS(e){let t=bS.includes(e.preferred_slot)?e.preferred_slot:pS;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function SS(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function CS(e,t){return[t]}function wS(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 CS(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=PS(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:xS({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&&SS(o.layout)===SS(i.layout)?a:CS(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)}}function TS(e){if(!RS(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!RS(t))continue;let e=(RS(t._meta)?t._meta:null)?.[dS];if(RS(e))return nC(e)}return null}function ES(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.`);return{interaction_id:t.interaction_id??LS(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:t.component??e.canvas_config.component,component_version:t.component_version??e.canvas_config.component_version,type:n,value:r,metadata:RS(t.metadata)?t.metadata:{}}}function DS(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 OS(e){return!RS(e)||!Array.isArray(e.content)?``:e.content.map(e=>RS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
53
+ `).trim()}function kS(e,t){let n=RS(t.structuredContent)?t.structuredContent:void 0,r=BS(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: ${VS(n)}`),r&&r!==a&&o.push(r),o.join(`
54
+ `)}function AS({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=PS(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:xS({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??FS(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??mS,backdrop:i.backdrop??r.layout?.backdrop??hS}),revision:0}}function jS(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:NS(e.layout.preferred_slot,t)}}function MS(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:hS};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:hS};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`?eC(16+o+24-c,0,u):-eC(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 NS(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 PS(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:US(e.layout)??US(e.preferred_slot)??US(e.preferredSlot),displayMode:WS(e),avoidSafeArea:GS(e),safeArea:KS(e),backdrop:qS(e)}}function FS(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return pS}}function IS(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 LS(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}function RS(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zS(e){return e instanceof Error?e:Error(String(e))}function BS(e){return Array.isArray(e)?e.map(e=>RS(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
55
+ `).trim():``}function VS(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(!RS(e))return null;let t=US(e),n=JS(e.safe_area??e.safeArea),r=YS(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...XS(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function US(e){if(typeof e==`string`&&ZS(e))return e;if(!RS(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&ZS(t)?t:void 0}function WS(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 GS(e){let t=RS(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 KS(e){let t=RS(e.layout)?e.layout:void 0;return JS(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function qS(e){let t=RS(e.layout)?e.layout:void 0;return YS(e.backdrop??t?.backdrop)??void 0}function JS(e){if(e===void 0)return;if(!RS(e))return null;let t=$S(e,`x`),n=$S(e,`y`),r=$S(e,`width`),i=$S(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:eC(t,0,1),y:eC(n,0,1),width:eC(r,0,1),height:eC(i,0,1)}}function YS(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!RS(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function XS(e,t){return typeof e==`boolean`?{[t]:e}:{}}function ZS(e){return fS.includes(e)}function QS(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function $S(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function eC(e,t,n){return Math.min(Math.max(e,t),n)}function tC(e,t,n){let r=QS(e,t);if(r)return n(r)?r:null}function nC(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&&!RS(e.metadata)?null:e}var rC=`tavus-deployment magic-canvas/0.0.0`;function iC(e){if(!gS(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=_S(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=vS(e.properties.arguments);if(!r.ok)throw r.error;return AS({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function aC(e){if(!gS(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=iC(e);return t?{kind:`show`,instance:t}:null}return yS(e)}function oC(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 sC(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:IS(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:rC,styles:{variables:cC(e.cssVars)}}}function cC(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`,...lC(e)}}function lC(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={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var uC=24,dC=96;function fC(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 pC(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function mC(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 hC(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??mS,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 gC(e,t,n){let[r,i]=j(()=>e?fC(pC(n?.current)):null);return at(()=>{if(!e){i(null);return}let t=pC(n?.current),r=()=>i(fC(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 _C(e,t,n){let[r,i]=j(()=>t?mC(e.current):null);return at(()=>{if(!t){i(null);return}let n=()=>i(mC(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 vC(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`&&hC(e,r,i,a)),side:o}}function yC(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>=dC&&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-uC*2),g=Math.max(dC,Math.min(h,c-uC*2));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var bC=`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 xC(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function SC(e,t,n){let[r,i]=j(()=>e&&t?yC(t,pC(n?.current),mC(n?.current)):null);return at(()=>{if(!e||!t){i(null);return}let r=pC(n?.current),a=()=>i(yC(t,r,mC(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 CC(e,t){let[n,r]=j(null);return at(()=>{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 wC=1;function TC(e,t,n){return Math.min(Math.max(e,t),n)}function EC(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??mS,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:TC(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:TC(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var DC=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function OC(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=EC(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 kC(e,t,n){let r=N(null),i=N(e),a=N(n),o=N(0),s=N(0);i.current=e,a.current=n,M(()=>{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 DC){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?DC.map(t=>Math.round(e[t]*100)).join():``,t]),M(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function AC(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function jC({geom:e,visible:t}){return L(`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 MC(e,t){let n=t>=0?`left`:`right`,r=N({side:n,shift:t});M(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:xC(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function NC(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function PC({snapshotUrl:e,transformOrigin:t}){return L(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function FC({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return L(`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:L(PC,{snapshotUrl:e,transformOrigin:r})})}function IC({ambient:e,usePip:t,transition:n}){return e===`none`?null:L(`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 LC({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return L(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:L(`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&&L(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${wC}px)`}:{right:`calc(100% - ${wC}px)`},children:L(PC,{snapshotUrl:t,transformOrigin:`center`})})]})})}function RC({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=bC,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=N(null),[f,p]=j(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=N(null),_=NC(e,h,c),{usePip:v,side:y}=vC(e,s,c,gC(s!==`shift`,_,g),h,_C(g,s!==`shift`,_)),b=SC(s!==`shift`,y,g),x=MC(m,h);M(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}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]),M(()=>{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=CC(g,C),T=f!==null&&!C,E=C&&y!=null,D=N(null),ee=N(null),[te,ne]=j(!0),re=N(!0),O=F((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)`),re.current!==t&&(re.current=t,ne(t))},[]);return kC(C?OC(b,S,w,h,e):null,o,O),L(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&L(FC,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&L(IC,{ambient:l,usePip:v,transition:a}),L(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:L(LC,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:D,videoWrapRef:ee,fill:r,videoRef:d})}),C&&b&&L(jC,{geom:b,visible:S&&te}),u]})}var zC=480,BC=ga(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return L(`div`,{class:`absolute inset-0 overflow-hidden`,children:L(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${zC}px`:`0px`,right:o<0?`${zC}px`:`0px`,transition:`left ${bC}, right ${bC}`},children:[L(pg,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),L(`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?L(`div`,{class:`flex w-full h-full items-center justify-center`,children:L(Kx,{sessionId:e})}):L(pg,{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 VC(e){return e&&Object.assign(GC,e),GC}var HC,UC,WC,GC,KC=a((()=>{UC=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},WC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(HC=globalThis).__zod_globalConfig??(HC.__zod_globalConfig={}),GC=globalThis.__zod_globalConfig}));function qC(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 JC(e,t=`|`){return e.map(e=>uw(e)).join(t)}function YC(e,t){return typeof t==`bigint`?t.toString():t}function XC(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ZC(e){return e==null}function QC(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function $C(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 ew(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Dw)return r===void 0&&(r=Dw,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function tw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nw(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function rw(e){return JSON.stringify(e)}function iw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function aw(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ow(e){if(aw(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(aw(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function sw(e){return ow(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function cw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function lw(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 uw(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function dw(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function fw(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 lw(e,nw(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 tw(this,`shape`,e),e},checks:[]}))}function pw(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 lw(e,nw(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 tw(this,`shape`,r),r},checks:[]}))}function mw(e,t){if(!ow(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 lw(e,nw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return tw(this,`shape`,n),n}}))}function hw(e,t){if(!ow(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return lw(e,nw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return tw(this,`shape`,n),n}}))}function gw(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return lw(e,nw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return tw(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _w(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 lw(t,nw(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 tw(this,`shape`,i),i},checks:[]}))}function vw(e,t,n){return lw(t,nw(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 tw(this,`shape`,i),i}}))}function yw(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 bw(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 xw(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Sw(e){return typeof e==`string`?e:e?.message}function Cw(e,t,n){let r=e.message?e.message:Sw(e.inst?._zod.def?.error?.(e))??Sw(t?.error?.(e))??Sw(n.customError?.(e))??Sw(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 ww(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Tw(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ew(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Dw,Ow,kw,Aw,jw,Mw=a((()=>{KC(),Dw=Symbol(`evaluating`),Ow=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},kw=XC(()=>{if(GC.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Aw=new Set([`string`,`number`,`symbol`]),jw={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function Nw(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 Pw(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 Fw,Iw,Lw,Rw=a((()=>{KC(),Mw(),Fw=(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,YC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Iw=K(`$ZodError`,Fw),Lw=K(`$ZodError`,Fw,{Parent:Error})})),zw,Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw,Zw,Qw,$w=a((()=>{KC(),Rw(),Mw(),zw=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 UC;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Cw(e,a,VC())));throw Ow(t,i?.callee),t}return o.value},Bw=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=>Cw(e,a,VC())));throw Ow(t,i?.callee),t}return o.value},Vw=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 UC;return a.issues.length?{success:!1,error:new(e??Iw)(a.issues.map(e=>Cw(e,i,VC())))}:{success:!0,data:a.value}},Hw=Vw(Lw),Uw=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=>Cw(e,i,VC())))}:{success:!0,data:a.value}},Ww=Uw(Lw),Gw=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return zw(e)(t,n,i)},Kw=e=>(t,n,r)=>zw(e)(t,n,r),qw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Bw(e)(t,n,i)},Jw=e=>async(t,n,r)=>Bw(e)(t,n,r),Yw=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Vw(e)(t,n,i)},Xw=e=>(t,n,r)=>Vw(e)(t,n,r),Zw=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Uw(e)(t,n,i)},Qw=e=>async(t,n,r)=>Uw(e)(t,n,r)}));function eT(){return new RegExp(mT,`u`)}function tT(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 nT(e){return RegExp(`^${tT(e)}$`)}function rT(e){let t=tT({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(`^${CT}T(?:${r})$`)}var 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=a((()=>{iT=/^[cC][0-9a-z]{6,}$/,aT=/^[0-9a-z]+$/,oT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sT=/^[0-9a-vA-V]{20}$/,cT=/^[A-Za-z0-9]{27}$/,lT=/^[a-zA-Z0-9_-]{21}$/,uT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dT=/^([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})$/,fT=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)$/,pT=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mT=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,hT=/^(?:(?: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])$/,gT=/^(([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}|:))$/,_T=/^((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])$/,vT=/^(([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])$/,yT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bT=/^[A-Za-z0-9_-]*$/,xT=/^https?$/,ST=/^\+[1-9]\d{6,14}$/,CT=`(?:(?:\\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])))`,wT=RegExp(`^${CT}$`),TT=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ET=/^-?\d+$/,DT=/^-?\d+(?:\.\d+)?$/,OT=/^(?:true|false)$/i,kT=/^null$/i,AT=/^undefined$/i,jT=/^[^A-Z]*$/,MT=/^[^a-z]*$/})),PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT=a((()=>{KC(),NT(),Mw(),PT=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),FT={number:`number`,bigint:`bigint`,object:`date`},IT=K(`$ZodCheckLessThan`,(e,t)=>{PT.init(e,t);let n=FT[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)=>{PT.init(e,t);let n=FT[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})}}),RT=K(`$ZodCheckMultipleOf`,(e,t)=>{PT.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):$C(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})}}),zT=K(`$ZodCheckNumberFormat`,(e,t)=>{PT.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=jw[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=ET)}),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})}}),BT=K(`$ZodCheckMaxLength`,(e,t)=>{var n;PT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ZC(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=ww(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),VT=K(`$ZodCheckMinLength`,(e,t)=>{var n;PT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ZC(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=ww(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),HT=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;PT.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ZC(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=ww(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})}}),UT=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;PT.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=()=>{})}),WT=K(`$ZodCheckRegex`,(e,t)=>{UT.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})}}),GT=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=jT,UT.init(e,t)}),KT=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=MT,UT.init(e,t)}),qT=K(`$ZodCheckIncludes`,(e,t)=>{PT.init(e,t);let n=cw(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})}}),JT=K(`$ZodCheckStartsWith`,(e,t)=>{PT.init(e,t);let n=RegExp(`^${cw(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})}}),YT=K(`$ZodCheckEndsWith`,(e,t)=>{PT.init(e,t);let n=RegExp(`.*${cw(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})}}),XT=K(`$ZodCheckOverwrite`,(e,t)=>{PT.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),QT,$T=a((()=>{QT=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
56
  `).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(`
56
- `))}}})),QT,$T=a((()=>{QT={major:4,minor:4,patch:3}}));function eE(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function tE(e){if(!vT.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return eE(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function nE(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 rE(e,t,n){e.issues.length&&t.issues.push(...yw(n,e.issues)),t.value[n]=e.value}function iE(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...yw(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function aE(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=lw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function oE(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=>iE(e,n,i,t,u,d))):iE(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 sE(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=>!_w(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=>xw(e,r,zC())))}),t)}function cE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(iw(e)&&iw(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=cE(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=cE(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 lE(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}),_w(e))return e;let o=cE(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function uE(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function dE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function fE(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 pE(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 mE(e){return e.value=Object.freeze(e.value),e}function hE(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(ww(e))}}var 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,GE,KE,qE,JE,YE,XE,ZE,QE,$E,eD,tD,nD,rD,iD,aD,oD,sD,cD,lD,uD,dD,fD,pD,mD,hD,gD=a((()=>{YT(),WC(),ZT(),Zw(),jT(),Aw(),$T(),gE=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=QT;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=_w(e),i;for(let a of t){if(a._zod.def.when){if(vw(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||=_w(e,t))});else{if(e.issues.length===t)continue;r||=_w(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(_w(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)}}QC(e,`~standard`,()=>({validate:t=>{try{let n=Bw(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Hw(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),_E=K(`$ZodString`,(e,t)=>{gE.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??CT(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}}),vE=K(`$ZodStringFormat`,(e,t)=>{VT.init(e,t),_E.init(e,t)}),yE=K(`$ZodGUID`,(e,t)=>{t.pattern??=lT,vE.init(e,t)}),bE=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??=uT(e)}else t.pattern??=uT();vE.init(e,t)}),xE=K(`$ZodEmail`,(e,t)=>{t.pattern??=dT,vE.init(e,t)}),SE=K(`$ZodURL`,(e,t)=>{vE.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===yT.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})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),CE=K(`$ZodEmoji`,(e,t)=>{t.pattern??=Qw(),vE.init(e,t)}),wE=K(`$ZodNanoID`,(e,t)=>{t.pattern??=sT,vE.init(e,t)}),TE=K(`$ZodCUID`,(e,t)=>{t.pattern??=nT,vE.init(e,t)}),EE=K(`$ZodCUID2`,(e,t)=>{t.pattern??=rT,vE.init(e,t)}),DE=K(`$ZodULID`,(e,t)=>{t.pattern??=iT,vE.init(e,t)}),OE=K(`$ZodXID`,(e,t)=>{t.pattern??=aT,vE.init(e,t)}),kE=K(`$ZodKSUID`,(e,t)=>{t.pattern??=oT,vE.init(e,t)}),AE=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=tT(t),vE.init(e,t)}),jE=K(`$ZodISODate`,(e,t)=>{t.pattern??=ST,vE.init(e,t)}),ME=K(`$ZodISOTime`,(e,t)=>{t.pattern??=eT(t),vE.init(e,t)}),NE=K(`$ZodISODuration`,(e,t)=>{t.pattern??=cT,vE.init(e,t)}),PE=K(`$ZodIPv4`,(e,t)=>{t.pattern??=pT,vE.init(e,t),e._zod.bag.format=`ipv4`}),FE=K(`$ZodIPv6`,(e,t)=>{t.pattern??=mT,vE.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})}}}),IE=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=hT,vE.init(e,t)}),LE=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=gT,vE.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})}}}),RE=K(`$ZodBase64`,(e,t)=>{t.pattern??=_T,vE.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{eE(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),zE=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=vT,vE.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tE(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),BE=K(`$ZodE164`,(e,t)=>{t.pattern??=bT,vE.init(e,t)}),VE=K(`$ZodJWT`,(e,t)=>{vE.init(e,t),e._zod.check=n=>{nE(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),HE=K(`$ZodNumber`,(e,t)=>{gE.init(e,t),e._zod.pattern=e._zod.bag.pattern??TT,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}}),UE=K(`$ZodNumberFormat`,(e,t)=>{LT.init(e,t),HE.init(e,t)}),WE=K(`$ZodBoolean`,(e,t)=>{gE.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}}),GE=K(`$ZodUndefined`,(e,t)=>{gE.init(e,t),e._zod.pattern=OT,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}}),KE=K(`$ZodNull`,(e,t)=>{gE.init(e,t),e._zod.pattern=DT,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}}),qE=K(`$ZodUnknown`,(e,t)=>{gE.init(e,t),e._zod.parse=e=>e}),JE=K(`$ZodNever`,(e,t)=>{gE.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),YE=K(`$ZodArray`,(e,t)=>{gE.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=>rE(t,n,e))):rE(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),XE=K(`$ZodObject`,(e,t)=>{if(gE.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=JC(()=>aE(t));QC(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=rw,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=>iE(n,t,e,s,r,i))):iE(a,t,e,s,r,i)}return i?oE(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),ZE=K(`$ZodObjectJIT`,(e,t)=>{XE.init(e,t);let n=e._zod.parse,r=JC(()=>aE(t)),i=e=>{let t=new XT([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=tw(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=tw(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
57
+ `))}}})),eE,tE=a((()=>{eE={major:4,minor:4,patch:3}}));function nE(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function rE(e){if(!bT.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return nE(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function iE(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 aE(e,t,n){e.issues.length&&t.issues.push(...xw(n,e.issues)),t.value[n]=e.value}function oE(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...xw(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function sE(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=dw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function cE(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=>oE(e,n,i,t,u,d))):oE(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 lE(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=>!yw(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=>Cw(e,r,VC())))}),t)}function uE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ow(e)&&ow(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=uE(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=uE(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 dE(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}),yw(e))return e;let o=uE(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function fE(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function pE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function mE(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 hE(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 gE(e){return e.value=Object.freeze(e.value),e}function _E(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(Ew(e))}}var 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,GE,KE,qE,JE,YE,XE,ZE,QE,$E,eD,tD,nD,rD,iD,aD,oD,sD,cD,lD,uD,dD,fD,pD,mD,hD,gD,_D,vD=a((()=>{ZT(),KC(),$T(),$w(),NT(),Mw(),tE(),vE=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eE;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=yw(e),i;for(let a of t){if(a._zod.def.when){if(bw(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 UC;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=yw(e,t))});else{if(e.issues.length===t)continue;r||=yw(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(yw(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new UC;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 UC;return o.then(e=>t(e,r,a))}return t(o,r,a)}}ew(e,`~standard`,()=>({validate:t=>{try{let n=Hw(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ww(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),yE=K(`$ZodString`,(e,t)=>{vE.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??TT(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}}),bE=K(`$ZodStringFormat`,(e,t)=>{UT.init(e,t),yE.init(e,t)}),xE=K(`$ZodGUID`,(e,t)=>{t.pattern??=dT,bE.init(e,t)}),SE=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??=fT(e)}else t.pattern??=fT();bE.init(e,t)}),CE=K(`$ZodEmail`,(e,t)=>{t.pattern??=pT,bE.init(e,t)}),wE=K(`$ZodURL`,(e,t)=>{bE.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===xT.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})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),TE=K(`$ZodEmoji`,(e,t)=>{t.pattern??=eT(),bE.init(e,t)}),EE=K(`$ZodNanoID`,(e,t)=>{t.pattern??=lT,bE.init(e,t)}),DE=K(`$ZodCUID`,(e,t)=>{t.pattern??=iT,bE.init(e,t)}),OE=K(`$ZodCUID2`,(e,t)=>{t.pattern??=aT,bE.init(e,t)}),kE=K(`$ZodULID`,(e,t)=>{t.pattern??=oT,bE.init(e,t)}),AE=K(`$ZodXID`,(e,t)=>{t.pattern??=sT,bE.init(e,t)}),jE=K(`$ZodKSUID`,(e,t)=>{t.pattern??=cT,bE.init(e,t)}),ME=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=rT(t),bE.init(e,t)}),NE=K(`$ZodISODate`,(e,t)=>{t.pattern??=wT,bE.init(e,t)}),PE=K(`$ZodISOTime`,(e,t)=>{t.pattern??=nT(t),bE.init(e,t)}),FE=K(`$ZodISODuration`,(e,t)=>{t.pattern??=uT,bE.init(e,t)}),IE=K(`$ZodIPv4`,(e,t)=>{t.pattern??=hT,bE.init(e,t),e._zod.bag.format=`ipv4`}),LE=K(`$ZodIPv6`,(e,t)=>{t.pattern??=gT,bE.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})}}}),RE=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=_T,bE.init(e,t)}),zE=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=vT,bE.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})}}}),BE=K(`$ZodBase64`,(e,t)=>{t.pattern??=yT,bE.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{nE(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),VE=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=bT,bE.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{rE(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),HE=K(`$ZodE164`,(e,t)=>{t.pattern??=ST,bE.init(e,t)}),UE=K(`$ZodJWT`,(e,t)=>{bE.init(e,t),e._zod.check=n=>{iE(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),WE=K(`$ZodNumber`,(e,t)=>{vE.init(e,t),e._zod.pattern=e._zod.bag.pattern??DT,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}}),GE=K(`$ZodNumberFormat`,(e,t)=>{zT.init(e,t),WE.init(e,t)}),KE=K(`$ZodBoolean`,(e,t)=>{vE.init(e,t),e._zod.pattern=OT,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}}),qE=K(`$ZodUndefined`,(e,t)=>{vE.init(e,t),e._zod.pattern=AT,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}}),JE=K(`$ZodNull`,(e,t)=>{vE.init(e,t),e._zod.pattern=kT,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}}),YE=K(`$ZodUnknown`,(e,t)=>{vE.init(e,t),e._zod.parse=e=>e}),XE=K(`$ZodNever`,(e,t)=>{vE.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),ZE=K(`$ZodArray`,(e,t)=>{vE.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=>aE(t,n,e))):aE(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),QE=K(`$ZodObject`,(e,t)=>{if(vE.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=XC(()=>sE(t));ew(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=aw,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=>oE(n,t,e,s,r,i))):oE(a,t,e,s,r,i)}return i?cE(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),$E=K(`$ZodObjectJIT`,(e,t)=>{QE.init(e,t);let n=e._zod.parse,r=XC(()=>sE(t)),i=e=>{let t=new QT([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=rw(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=rw(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
57
58
  if (${n}.issues.length) {
58
59
  if (${o} in input) {
59
60
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
@@ -112,15 +113,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
112
113
  }
113
114
  }
114
115
 
115
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=rw,s=!UC.jitless,c=s&&Dw.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?oE([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),QE=K(`$ZodUnion`,(e,t)=>{gE.init(e,t),QC(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),QC(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),QC(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),QC(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=>XC(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=>sE(t,r,e,i)):sE(o,r,e,i)}}),$E=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,QE.init(e,t);let n=e._zod.parse;QC(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=JC(()=>{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(!rw(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)}}),eD=K(`$ZodIntersection`,(e,t)=>{gE.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])=>lE(e,t,n)):lE(e,i,a)}}),tD=K(`$ZodRecord`,(e,t)=>{gE.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!iw(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=>xw(e,r,zC())),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(...yw(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...yw(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`&&TT.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=>xw(e,r,zC())),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(...yw(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...yw(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),nD=K(`$ZodEnum`,(e,t)=>{gE.init(e,t);let n=GC(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Ow.has(typeof e)).map(e=>typeof e==`string`?ow(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}}),rD=K(`$ZodLiteral`,(e,t)=>{if(gE.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`?ow(e):e?ow(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}}),iD=K(`$ZodTransform`,(e,t)=>{gE.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new HC(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}}),aD=K(`$ZodOptional`,(e,t)=>{gE.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,QC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),QC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${XC(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=>uE(e,r)):uE(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),oD=K(`$ZodExactOptional`,(e,t)=>{aD.init(e,t),QC(e._zod,`values`,()=>t.innerType._zod.values),QC(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),sD=K(`$ZodNullable`,(e,t)=>{gE.init(e,t),QC(e._zod,`optin`,()=>t.innerType._zod.optin),QC(e._zod,`optout`,()=>t.innerType._zod.optout),QC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${XC(e.source)}|null)$`):void 0}),QC(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)}),cD=K(`$ZodDefault`,(e,t)=>{gE.init(e,t),e._zod.optin=`optional`,QC(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=>dE(e,t)):dE(r,t)}}),lD=K(`$ZodPrefault`,(e,t)=>{gE.init(e,t),e._zod.optin=`optional`,QC(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))}),uD=K(`$ZodNonOptional`,(e,t)=>{gE.init(e,t),QC(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=>fE(t,e)):fE(i,e)}}),dD=K(`$ZodCatch`,(e,t)=>{gE.init(e,t),e._zod.optin=`optional`,QC(e._zod,`optout`,()=>t.innerType._zod.optout),QC(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=>xw(e,n,zC()))},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=>xw(e,n,zC()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),fD=K(`$ZodPipe`,(e,t)=>{gE.init(e,t),QC(e._zod,`values`,()=>t.in._zod.values),QC(e._zod,`optin`,()=>t.in._zod.optin),QC(e._zod,`optout`,()=>t.out._zod.optout),QC(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=>pE(e,t.in,n)):pE(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>pE(e,t.out,n)):pE(r,t.out,n)}}),pD=K(`$ZodPreprocess`,(e,t)=>{fD.init(e,t)}),mD=K(`$ZodReadonly`,(e,t)=>{gE.init(e,t),QC(e._zod,`propValues`,()=>t.innerType._zod.propValues),QC(e._zod,`values`,()=>t.innerType._zod.values),QC(e._zod,`optin`,()=>t.innerType?._zod?.optin),QC(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(mE):mE(r)}}),hD=K(`$ZodCustom`,(e,t)=>{MT.init(e,t),gE.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=>hE(t,n,r,e));hE(i,n,r,e)}})}));function _D(){return{localeError:vD()}}var vD,yD=a((()=>{Aw(),vD=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=Cw(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${cw(e.values[0])}`:`Invalid option: expected one of ${KC(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${KC(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function bD(){return new SD}var xD,SD,CD,wD=a((()=>{SD=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)}},(xD=globalThis).__zod_globalRegistry??(xD.__zod_globalRegistry=bD()),CD=globalThis.__zod_globalRegistry}));function TD(e,t){return new e({type:`string`,...q(t)})}function ED(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function DD(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function OD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function kD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function AD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function jD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function MD(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function ND(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function PD(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function FD(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function ID(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function LD(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function RD(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function zD(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function BD(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function VD(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function HD(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function UD(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function WD(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 KD(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function qD(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function JD(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function YD(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 ZD(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function QD(e,t){return new e({type:`number`,checks:[],...q(t)})}function $D(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function eO(e,t){return new e({type:`boolean`,...q(t)})}function tO(e,t){return new e({type:`undefined`,...q(t)})}function nO(e,t){return new e({type:`null`,...q(t)})}function rO(e){return new e({type:`unknown`})}function iO(e,t){return new e({type:`never`,...q(t)})}function aO(e,t){return new PT({check:`less_than`,...q(t),value:e,inclusive:!1})}function oO(e,t){return new PT({check:`less_than`,...q(t),value:e,inclusive:!0})}function sO(e,t){return new FT({check:`greater_than`,...q(t),value:e,inclusive:!1})}function cO(e,t){return new FT({check:`greater_than`,...q(t),value:e,inclusive:!0})}function lO(e,t){return new IT({check:`multiple_of`,...q(t),value:e})}function uO(e,t){return new RT({check:`max_length`,...q(t),maximum:e})}function dO(e,t){return new zT({check:`min_length`,...q(t),minimum:e})}function fO(e,t){return new BT({check:`length_equals`,...q(t),length:e})}function pO(e,t){return new HT({check:`string_format`,format:`regex`,...q(t),pattern:e})}function mO(e){return new UT({check:`string_format`,format:`lowercase`,...q(e)})}function hO(e){return new WT({check:`string_format`,format:`uppercase`,...q(e)})}function gO(e,t){return new GT({check:`string_format`,format:`includes`,...q(t),includes:e})}function _O(e,t){return new KT({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function vO(e,t){return new qT({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function yO(e){return new JT({check:`overwrite`,tx:e})}function bO(e){return yO(t=>t.normalize(e))}function xO(){return yO(e=>e.trim())}function SO(){return yO(e=>e.toLowerCase())}function CO(){return yO(e=>e.toUpperCase())}function wO(){return yO(e=>nw(e))}function TO(e,t,n){return new e({type:`array`,element:t,...q(n)})}function EO(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function DO(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function OO(e,t){let n=kO(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ww(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(ww(r))}},e(t.value,t)),t);return n}function kO(e,t){let n=new MT({check:`custom`,...q(t)});return n._zod.check=e,n}var AO=a((()=>{YT(),Aw()}));function jO(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??CD,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 MO(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,MO(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`&&FO(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 NO(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>
116
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=aw,s=!GC.jitless,c=s&&kw.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?cE([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),eD=K(`$ZodUnion`,(e,t)=>{vE.init(e,t),ew(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),ew(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),ew(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),ew(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=>QC(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=>lE(t,r,e,i)):lE(o,r,e,i)}}),tD=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,eD.init(e,t);let n=e._zod.parse;ew(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=XC(()=>{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(!aw(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)}}),nD=K(`$ZodIntersection`,(e,t)=>{vE.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])=>dE(e,t,n)):dE(e,i,a)}}),rD=K(`$ZodRecord`,(e,t)=>{vE.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!ow(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=>Cw(e,r,VC())),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(...xw(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...xw(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`&&DT.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=>Cw(e,r,VC())),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(...xw(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...xw(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),iD=K(`$ZodEnum`,(e,t)=>{vE.init(e,t);let n=qC(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Aw.has(typeof e)).map(e=>typeof e==`string`?cw(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}}),aD=K(`$ZodLiteral`,(e,t)=>{if(vE.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`?cw(e):e?cw(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}}),oD=K(`$ZodTransform`,(e,t)=>{vE.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new WC(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 UC;return n.value=i,n.fallback=!0,n}}),sD=K(`$ZodOptional`,(e,t)=>{vE.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,ew(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ew(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${QC(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=>fE(e,r)):fE(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),cD=K(`$ZodExactOptional`,(e,t)=>{sD.init(e,t),ew(e._zod,`values`,()=>t.innerType._zod.values),ew(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),lD=K(`$ZodNullable`,(e,t)=>{vE.init(e,t),ew(e._zod,`optin`,()=>t.innerType._zod.optin),ew(e._zod,`optout`,()=>t.innerType._zod.optout),ew(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${QC(e.source)}|null)$`):void 0}),ew(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)}),uD=K(`$ZodDefault`,(e,t)=>{vE.init(e,t),e._zod.optin=`optional`,ew(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=>pE(e,t)):pE(r,t)}}),dD=K(`$ZodPrefault`,(e,t)=>{vE.init(e,t),e._zod.optin=`optional`,ew(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))}),fD=K(`$ZodNonOptional`,(e,t)=>{vE.init(e,t),ew(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=>mE(t,e)):mE(i,e)}}),pD=K(`$ZodCatch`,(e,t)=>{vE.init(e,t),e._zod.optin=`optional`,ew(e._zod,`optout`,()=>t.innerType._zod.optout),ew(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=>Cw(e,n,VC()))},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=>Cw(e,n,VC()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),mD=K(`$ZodPipe`,(e,t)=>{vE.init(e,t),ew(e._zod,`values`,()=>t.in._zod.values),ew(e._zod,`optin`,()=>t.in._zod.optin),ew(e._zod,`optout`,()=>t.out._zod.optout),ew(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=>hE(e,t.in,n)):hE(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>hE(e,t.out,n)):hE(r,t.out,n)}}),hD=K(`$ZodPreprocess`,(e,t)=>{mD.init(e,t)}),gD=K(`$ZodReadonly`,(e,t)=>{vE.init(e,t),ew(e._zod,`propValues`,()=>t.innerType._zod.propValues),ew(e._zod,`values`,()=>t.innerType._zod.values),ew(e._zod,`optin`,()=>t.innerType?._zod?.optin),ew(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(gE):gE(r)}}),_D=K(`$ZodCustom`,(e,t)=>{PT.init(e,t),vE.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=>_E(t,n,r,e));_E(i,n,r,e)}})}));function yD(){return{localeError:bD()}}var bD,xD=a((()=>{Mw(),bD=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=Tw(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${uw(e.values[0])}`:`Invalid option: expected one of ${JC(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${JC(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function SD(){return new wD}var CD,wD,TD,ED=a((()=>{wD=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)}},(CD=globalThis).__zod_globalRegistry??(CD.__zod_globalRegistry=SD()),TD=globalThis.__zod_globalRegistry}));function DD(e,t){return new e({type:`string`,...q(t)})}function OD(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function kD(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function AD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function jD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function MD(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 PD(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function FD(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function ID(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function LD(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function RD(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function zD(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function BD(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function VD(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function HD(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function UD(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function WD(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function GD(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function KD(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function qD(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function JD(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function YD(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function XD(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function ZD(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function QD(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function $D(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function eO(e,t){return new e({type:`number`,checks:[],...q(t)})}function tO(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function nO(e,t){return new e({type:`boolean`,...q(t)})}function rO(e,t){return new e({type:`undefined`,...q(t)})}function iO(e,t){return new e({type:`null`,...q(t)})}function aO(e){return new e({type:`unknown`})}function oO(e,t){return new e({type:`never`,...q(t)})}function sO(e,t){return new IT({check:`less_than`,...q(t),value:e,inclusive:!1})}function cO(e,t){return new IT({check:`less_than`,...q(t),value:e,inclusive:!0})}function lO(e,t){return new LT({check:`greater_than`,...q(t),value:e,inclusive:!1})}function uO(e,t){return new LT({check:`greater_than`,...q(t),value:e,inclusive:!0})}function dO(e,t){return new RT({check:`multiple_of`,...q(t),value:e})}function fO(e,t){return new BT({check:`max_length`,...q(t),maximum:e})}function pO(e,t){return new VT({check:`min_length`,...q(t),minimum:e})}function mO(e,t){return new HT({check:`length_equals`,...q(t),length:e})}function hO(e,t){return new WT({check:`string_format`,format:`regex`,...q(t),pattern:e})}function gO(e){return new GT({check:`string_format`,format:`lowercase`,...q(e)})}function _O(e){return new KT({check:`string_format`,format:`uppercase`,...q(e)})}function vO(e,t){return new qT({check:`string_format`,format:`includes`,...q(t),includes:e})}function yO(e,t){return new JT({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function bO(e,t){return new YT({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function xO(e){return new XT({check:`overwrite`,tx:e})}function SO(e){return xO(t=>t.normalize(e))}function CO(){return xO(e=>e.trim())}function wO(){return xO(e=>e.toLowerCase())}function TO(){return xO(e=>e.toUpperCase())}function EO(){return xO(e=>iw(e))}function DO(e,t,n){return new e({type:`array`,element:t,...q(n)})}function OO(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function kO(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function AO(e,t){let n=jO(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ew(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(Ew(r))}},e(t.value,t)),t);return n}function jO(e,t){let n=new PT({check:`custom`,...q(t)});return n._zod.check=e,n}var MO=a((()=>{ZT(),Mw()}));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??TD,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 PO(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,PO(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`&&LO(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 FO(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>
116
117
 
117
- 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);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function PO(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:LO(t,`input`,e.processors),output:LO(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function FO(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 FO(r.element,n);if(r.type===`set`)return FO(r.valueType,n);if(r.type===`lazy`)return FO(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 FO(r.innerType,n);if(r.type===`intersection`)return FO(r.left,n)||FO(r.right,n);if(r.type===`record`||r.type===`map`)return FO(r.keyType,n)||FO(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:FO(r.in,n)||FO(r.out,n);if(r.type===`object`){for(let e in r.shape)if(FO(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(FO(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(FO(e,n))return!0;return!!(r.rest&&FO(r.rest,n))}return!1}var IO,LO,RO=a((()=>{wD(),IO=(e,t={})=>n=>{let r=jO({...n,processors:t});return MO(e,r),NO(r,e),PO(r,e)},LO=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=jO({...i??{},target:a,io:t,processors:n});return MO(e,o),NO(o,e),PO(o,e)}})),zO,BO,VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk=a((()=>{RO(),Aw(),zO={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},BO=(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=zO[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}))])}},VO=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`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)},HO=(e,t,n,r)=>{n.type=`boolean`},UO=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},WO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},GO=(e,t,n,r)=>{n.not={}},KO=(e,t,n,r)=>{},qO=(e,t,n,r)=>{let i=e._zod.def,a=GC(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},JO=(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},YO=(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`)},ZO=(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=MO(a.element,t,{...r,path:[...r.path,`items`]})},QO=(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]=MO(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=MO(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},$O=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>MO(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ek=(e,t,n,r)=>{let i=e._zod.def,a=MO(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=MO(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]]},tk=(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=MO(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=MO(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=MO(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)}},nk=(e,t,n,r)=>{let i=e._zod.def,a=MO(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`}]},rk=(e,t,n,r)=>{let i=e._zod.def;MO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ik=(e,t,n,r)=>{let i=e._zod.def;MO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ak=(e,t,n,r)=>{let i=e._zod.def;MO(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)))},ok=(e,t,n,r)=>{let i=e._zod.def;MO(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},sk=(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;MO(o,t,r);let s=t.seen.get(e);s.ref=o},ck=(e,t,n,r)=>{let i=e._zod.def;MO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lk=(e,t,n,r)=>{let i=e._zod.def;MO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),dk=a((()=>{WC(),Zw(),Iw(),gD(),YT(),$T(),Aw(),jT(),yD(),wD(),ZT(),AO(),RO(),uk(),RO()})),fk=a((()=>{dk()}));function pk(e){return JD(_k,e)}function mk(e){return YD(vk,e)}function hk(e){return XD(yk,e)}function gk(e){return ZD(bk,e)}var _k,vk,yk,bk,xk=a((()=>{dk(),lj(),_k=K(`ZodISODateTime`,(e,t)=>{AE.init(e,t),gA.init(e,t)}),vk=K(`ZodISODate`,(e,t)=>{jE.init(e,t),gA.init(e,t)}),yk=K(`ZodISOTime`,(e,t)=>{ME.init(e,t),gA.init(e,t)}),bk=K(`ZodISODuration`,(e,t)=>{NE.init(e,t),gA.init(e,t)})})),Sk,Ck,wk=a((()=>{dk(),Aw(),Sk=(e,t)=>{Pw.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Mw(e,t)},flatten:{value:t=>jw(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,qC,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,qC,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ck=K(`ZodError`,Sk,{Parent:Error})})),Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk=a((()=>{dk(),wk(),Tk=Lw(Ck),Ek=Rw(Ck),Dk=zw(Ck),Ok=Vw(Ck),kk=Uw(Ck),Ak=Ww(Ck),jk=Gw(Ck),Mk=Kw(Ck),Nk=qw(Ck),Pk=Jw(Ck),Fk=Yw(Ck),Ik=Xw(Ck)}));function Rk(e,t,n){let r=Object.getPrototypeOf(e),i=fA.get(r);if(i||(i=new Set,fA.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 TD(hA,e)}function zk(e){return QD(IA,e)}function Bk(e){return $D(LA,e)}function Vk(e){return eO(RA,e)}function Hk(e){return tO(zA,e)}function Uk(e){return nO(BA,e)}function Wk(){return rO(VA)}function Gk(e){return iO(HA,e)}function Y(e,t){return TO(UA,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...q(t)};return new WA(n)}function Kk(e,t){return new WA({type:`object`,shape:e,catchall:Wk(),...q(t)})}function qk(e,t){return new GA({type:`union`,options:e,...q(t)})}function Jk(e,t,n){return new KA({type:`union`,options:t,discriminator:e,...q(n)})}function Yk(e,t){return new qA({type:`intersection`,left:e,right:t})}function Xk(e,t,n){return!t||!t._zod?new JA({type:`record`,keyType:J(),valueType:e,...q(t)}):new JA({type:`record`,keyType:e,valueType:t,...q(n)})}function Zk(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new YA({type:`enum`,entries:n,...q(t)})}function Z(e,t){return new XA({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function Qk(e){return new ZA({type:`transform`,transform:e})}function $k(e){return new QA({type:`optional`,innerType:e})}function eA(e){return new $A({type:`optional`,innerType:e})}function tA(e){return new ej({type:`nullable`,innerType:e})}function nA(e,t){return new tj({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():aw(t)}})}function rA(e,t){return new nj({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():aw(t)}})}function iA(e,t){return new rj({type:`nonoptional`,innerType:e,...q(t)})}function aA(e,t){return new ij({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function oA(e,t){return new aj({type:`pipe`,in:e,out:t})}function sA(e){return new sj({type:`readonly`,innerType:e})}function cA(e,t){return EO(cj,e??(()=>!0),t)}function lA(e,t={}){return DO(cj,e,t)}function uA(e,t){return OO(e,t)}function dA(e,t){return new oj({type:`pipe`,in:Qk(e),out:t})}var fA,pA,mA,hA,gA,_A,vA,yA,bA,xA,SA,CA,wA,TA,EA,DA,OA,kA,AA,jA,MA,NA,PA,FA,IA,LA,RA,zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij,aj,oj,sj,cj,lj=a((()=>{dk(),uk(),RO(),fk(),xk(),Lk(),fA=new WeakMap,pA=K(`ZodType`,(e,t)=>(gE.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:LO(e,`input`),output:LO(e,`output`)}}),e.toJSONSchema=IO(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Tk(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Dk(e,t,n),e.parseAsync=async(t,n)=>Ek(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Ok(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>kk(e,t,n),e.decode=(t,n)=>Ak(e,t,n),e.encodeAsync=async(t,n)=>jk(e,t,n),e.decodeAsync=async(t,n)=>Mk(e,t,n),e.safeEncode=(t,n)=>Nk(e,t,n),e.safeDecode=(t,n)=>Pk(e,t,n),e.safeEncodeAsync=async(t,n)=>Fk(e,t,n),e.safeDecodeAsync=async(t,n)=>Ik(e,t,n),Rk(e,`ZodType`,{check(...e){let t=this.def;return this.clone(ew(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 sw(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(lA(e,t))},superRefine(e,t){return this.check(uA(e,t))},overwrite(e){return this.check(yO(e))},optional(){return $k(this)},exactOptional(){return eA(this)},nullable(){return tA(this)},nullish(){return $k(tA(this))},nonoptional(e){return iA(this,e)},array(){return Y(this)},or(e){return qk([this,e])},and(e){return Yk(this,e)},transform(e){return oA(this,Qk(e))},default(e){return nA(this,e)},prefault(e){return rA(this,e)},catch(e){return aA(this,e)},pipe(e){return oA(this,e)},readonly(){return sA(this)},describe(e){let t=this.clone();return CD.add(t,{description:e}),t},meta(...e){if(e.length===0)return CD.get(this);let t=this.clone();return CD.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 CD.get(e)?.description},configurable:!0}),e)),mA=K(`_ZodString`,(e,t)=>{_E.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BO(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Rk(e,`_ZodString`,{regex(...e){return this.check(pO(...e))},includes(...e){return this.check(gO(...e))},startsWith(...e){return this.check(_O(...e))},endsWith(...e){return this.check(vO(...e))},min(...e){return this.check(dO(...e))},max(...e){return this.check(uO(...e))},length(...e){return this.check(fO(...e))},nonempty(...e){return this.check(dO(1,...e))},lowercase(e){return this.check(mO(e))},uppercase(e){return this.check(hO(e))},trim(){return this.check(xO())},normalize(...e){return this.check(bO(...e))},toLowerCase(){return this.check(SO())},toUpperCase(){return this.check(CO())},slugify(){return this.check(wO())}})}),hA=K(`ZodString`,(e,t)=>{_E.init(e,t),mA.init(e,t),e.email=t=>e.check(ED(_A,t)),e.url=t=>e.check(MD(bA,t)),e.jwt=t=>e.check(qD(FA,t)),e.emoji=t=>e.check(ND(xA,t)),e.guid=t=>e.check(DD(vA,t)),e.uuid=t=>e.check(OD(yA,t)),e.uuidv4=t=>e.check(kD(yA,t)),e.uuidv6=t=>e.check(AD(yA,t)),e.uuidv7=t=>e.check(jD(yA,t)),e.nanoid=t=>e.check(PD(SA,t)),e.guid=t=>e.check(DD(vA,t)),e.cuid=t=>e.check(FD(CA,t)),e.cuid2=t=>e.check(ID(wA,t)),e.ulid=t=>e.check(LD(TA,t)),e.base64=t=>e.check(WD(MA,t)),e.base64url=t=>e.check(GD(NA,t)),e.xid=t=>e.check(RD(EA,t)),e.ksuid=t=>e.check(zD(DA,t)),e.ipv4=t=>e.check(BD(OA,t)),e.ipv6=t=>e.check(VD(kA,t)),e.cidrv4=t=>e.check(HD(AA,t)),e.cidrv6=t=>e.check(UD(jA,t)),e.e164=t=>e.check(KD(PA,t)),e.datetime=t=>e.check(pk(t)),e.date=t=>e.check(mk(t)),e.time=t=>e.check(hk(t)),e.duration=t=>e.check(gk(t))}),gA=K(`ZodStringFormat`,(e,t)=>{vE.init(e,t),mA.init(e,t)}),_A=K(`ZodEmail`,(e,t)=>{xE.init(e,t),gA.init(e,t)}),vA=K(`ZodGUID`,(e,t)=>{yE.init(e,t),gA.init(e,t)}),yA=K(`ZodUUID`,(e,t)=>{bE.init(e,t),gA.init(e,t)}),bA=K(`ZodURL`,(e,t)=>{SE.init(e,t),gA.init(e,t)}),xA=K(`ZodEmoji`,(e,t)=>{CE.init(e,t),gA.init(e,t)}),SA=K(`ZodNanoID`,(e,t)=>{wE.init(e,t),gA.init(e,t)}),CA=K(`ZodCUID`,(e,t)=>{TE.init(e,t),gA.init(e,t)}),wA=K(`ZodCUID2`,(e,t)=>{EE.init(e,t),gA.init(e,t)}),TA=K(`ZodULID`,(e,t)=>{DE.init(e,t),gA.init(e,t)}),EA=K(`ZodXID`,(e,t)=>{OE.init(e,t),gA.init(e,t)}),DA=K(`ZodKSUID`,(e,t)=>{kE.init(e,t),gA.init(e,t)}),OA=K(`ZodIPv4`,(e,t)=>{PE.init(e,t),gA.init(e,t)}),kA=K(`ZodIPv6`,(e,t)=>{FE.init(e,t),gA.init(e,t)}),AA=K(`ZodCIDRv4`,(e,t)=>{IE.init(e,t),gA.init(e,t)}),jA=K(`ZodCIDRv6`,(e,t)=>{LE.init(e,t),gA.init(e,t)}),MA=K(`ZodBase64`,(e,t)=>{RE.init(e,t),gA.init(e,t)}),NA=K(`ZodBase64URL`,(e,t)=>{zE.init(e,t),gA.init(e,t)}),PA=K(`ZodE164`,(e,t)=>{BE.init(e,t),gA.init(e,t)}),FA=K(`ZodJWT`,(e,t)=>{VE.init(e,t),gA.init(e,t)}),IA=K(`ZodNumber`,(e,t)=>{HE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VO(e,t,n,r),Rk(e,`ZodNumber`,{gt(e,t){return this.check(sO(e,t))},gte(e,t){return this.check(cO(e,t))},min(e,t){return this.check(cO(e,t))},lt(e,t){return this.check(aO(e,t))},lte(e,t){return this.check(oO(e,t))},max(e,t){return this.check(oO(e,t))},int(e){return this.check(Bk(e))},safe(e){return this.check(Bk(e))},positive(e){return this.check(sO(0,e))},nonnegative(e){return this.check(cO(0,e))},negative(e){return this.check(aO(0,e))},nonpositive(e){return this.check(oO(0,e))},multipleOf(e,t){return this.check(lO(e,t))},step(e,t){return this.check(lO(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}),LA=K(`ZodNumberFormat`,(e,t)=>{UE.init(e,t),IA.init(e,t)}),RA=K(`ZodBoolean`,(e,t)=>{WE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r)}),zA=K(`ZodUndefined`,(e,t)=>{GE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WO(e,t,n,r)}),BA=K(`ZodNull`,(e,t)=>{KE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UO(e,t,n,r)}),VA=K(`ZodUnknown`,(e,t)=>{qE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KO(e,t,n,r)}),HA=K(`ZodNever`,(e,t)=>{JE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GO(e,t,n,r)}),UA=K(`ZodArray`,(e,t)=>{YE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZO(e,t,n,r),e.element=t.element,Rk(e,`ZodArray`,{min(e,t){return this.check(dO(e,t))},nonempty(e){return this.check(dO(1,e))},max(e,t){return this.check(uO(e,t))},length(e,t){return this.check(fO(e,t))},unwrap(){return this.element}})}),WA=K(`ZodObject`,(e,t)=>{ZE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QO(e,t,n,r),QC(e,`shape`,()=>t.shape),Rk(e,`ZodObject`,{keyof(){return Zk(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Wk()})},loose(){return this.clone({...this._zod.def,catchall:Wk()})},strict(){return this.clone({...this._zod.def,catchall:Gk()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return fw(this,e)},safeExtend(e){return pw(this,e)},merge(e){return mw(this,e)},pick(e){return uw(this,e)},omit(e){return dw(this,e)},partial(...e){return hw(QA,this,e[0])},required(...e){return gw(rj,this,e[0])}})}),GA=K(`ZodUnion`,(e,t)=>{QE.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$O(e,t,n,r),e.options=t.options}),KA=K(`ZodDiscriminatedUnion`,(e,t)=>{GA.init(e,t),$E.init(e,t)}),qA=K(`ZodIntersection`,(e,t)=>{eD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ek(e,t,n,r)}),JA=K(`ZodRecord`,(e,t)=>{tD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tk(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),YA=K(`ZodEnum`,(e,t)=>{nD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qO(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 YA({...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 YA({...t,checks:[],...q(r),entries:i})}}),XA=K(`ZodLiteral`,(e,t)=>{rD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JO(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]}})}),ZA=K(`ZodTransform`,(e,t)=>{iD.init(e,t),pA.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 HC(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ww(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(ww(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)}}),QA=K(`ZodOptional`,(e,t)=>{aD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),$A=K(`ZodExactOptional`,(e,t)=>{oD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ej=K(`ZodNullable`,(e,t)=>{sD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),tj=K(`ZodDefault`,(e,t)=>{cD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ik(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),nj=K(`ZodPrefault`,(e,t)=>{lD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ak(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rj=K(`ZodNonOptional`,(e,t)=>{uD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ij=K(`ZodCatch`,(e,t)=>{dD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ok(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),aj=K(`ZodPipe`,(e,t)=>{fD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sk(e,t,n,r),e.in=t.in,e.out=t.out}),oj=K(`ZodPreprocess`,(e,t)=>{aj.init(e,t),pD.init(e,t)}),sj=K(`ZodReadonly`,(e,t)=>{mD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ck(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),cj=K(`ZodCustom`,(e,t)=>{hD.init(e,t),pA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YO(e,t,n,r)})})),uj,dj=a((()=>{dk(),uj||={}})),fj=a((()=>{dk(),lj(),fk(),wk(),Lk(),dj(),yD(),uk(),wD(),fk(),xk(),lj(),Aw(),zC(_D())})),pj=a((()=>{fj(),fj()})),mj=a((()=>{pj()}));mj();var hj=`io.modelcontextprotocol/related-task`,gj=cA(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),_j=qk([J(),zk().int()]),vj=J();Kk({ttl:zk().optional(),pollInterval:zk().optional()});var yj=X({ttl:zk().optional()}),bj=X({taskId:J()}),xj=Kk({progressToken:_j.optional(),[hj]:bj.optional()}),Sj=X({_meta:xj.optional()}),Cj=Sj.extend({task:yj.optional()}),wj=e=>Cj.safeParse(e).success,Tj=X({method:J(),params:Sj.loose().optional()}),Ej=X({_meta:xj.optional()}),Dj=X({method:J(),params:Ej.loose().optional()}),Oj=Kk({_meta:xj.optional()}),kj=qk([J(),zk().int()]),Aj=X({jsonrpc:Z(`2.0`),id:kj,...Tj.shape}).strict(),jj=e=>Aj.safeParse(e).success,Mj=X({jsonrpc:Z(`2.0`),...Dj.shape}).strict(),Nj=e=>Mj.safeParse(e).success,Pj=X({jsonrpc:Z(`2.0`),id:kj,result:Oj}).strict(),Fj=e=>Pj.safeParse(e).success,Ij;(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`})(Ij||={});var Lj=X({jsonrpc:Z(`2.0`),id:kj.optional(),error:X({code:zk().int(),message:J(),data:Wk().optional()})}).strict(),Rj=e=>Lj.safeParse(e).success;qk([Aj,Mj,Pj,Lj]),qk([Pj,Lj]);var zj=Oj.strict(),Bj=Ej.extend({requestId:kj.optional(),reason:J().optional()}),Vj=Dj.extend({method:Z(`notifications/cancelled`),params:Bj}),Hj=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:Zk([`light`,`dark`]).optional()})).optional()}),Uj=X({name:J(),title:J().optional()}),Wj=Uj.extend({...Uj.shape,...Hj.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),Gj=dA(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Yk(X({form:Yk(X({applyDefaults:Vk().optional()}),Xk(J(),Wk())).optional(),url:gj.optional()}),Xk(J(),Wk()).optional())),Kj=Kk({list:gj.optional(),cancel:gj.optional(),requests:Kk({sampling:Kk({createMessage:gj.optional()}).optional(),elicitation:Kk({create:gj.optional()}).optional()}).optional()}),qj=Kk({list:gj.optional(),cancel:gj.optional(),requests:Kk({tools:Kk({call:gj.optional()}).optional()}).optional()}),Jj=X({experimental:Xk(J(),gj).optional(),sampling:X({context:gj.optional(),tools:gj.optional()}).optional(),elicitation:Gj.optional(),roots:X({listChanged:Vk().optional()}).optional(),tasks:Kj.optional(),extensions:Xk(J(),gj).optional()}),Yj=Sj.extend({protocolVersion:J(),capabilities:Jj,clientInfo:Wj}),Xj=Tj.extend({method:Z(`initialize`),params:Yj}),Zj=X({experimental:Xk(J(),gj).optional(),logging:gj.optional(),completions:gj.optional(),prompts:X({listChanged:Vk().optional()}).optional(),resources:X({subscribe:Vk().optional(),listChanged:Vk().optional()}).optional(),tools:X({listChanged:Vk().optional()}).optional(),tasks:qj.optional(),extensions:Xk(J(),gj).optional()}),Qj=Oj.extend({protocolVersion:J(),capabilities:Zj,serverInfo:Wj,instructions:J().optional()}),$j=Dj.extend({method:Z(`notifications/initialized`),params:Ej.optional()}),eM=Tj.extend({method:Z(`ping`),params:Sj.optional()}),tM=X({progress:zk(),total:$k(zk()),message:$k(J())}),nM=X({...Ej.shape,...tM.shape,progressToken:_j}),rM=Dj.extend({method:Z(`notifications/progress`),params:nM}),iM=Sj.extend({cursor:vj.optional()}),aM=Tj.extend({params:iM.optional()}),oM=Oj.extend({nextCursor:vj.optional()}),sM=Zk([`working`,`input_required`,`completed`,`failed`,`cancelled`]),cM=X({taskId:J(),status:sM,ttl:qk([zk(),Uk()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:$k(zk()),statusMessage:$k(J())}),lM=Oj.extend({task:cM}),uM=Ej.merge(cM),dM=Dj.extend({method:Z(`notifications/tasks/status`),params:uM}),fM=Tj.extend({method:Z(`tasks/get`),params:Sj.extend({taskId:J()})}),pM=Oj.merge(cM),mM=Tj.extend({method:Z(`tasks/result`),params:Sj.extend({taskId:J()})});Oj.loose();var hM=aM.extend({method:Z(`tasks/list`)}),gM=oM.extend({tasks:Y(cM)}),_M=Tj.extend({method:Z(`tasks/cancel`),params:Sj.extend({taskId:J()})}),vM=Oj.merge(cM),yM=X({uri:J(),mimeType:$k(J()),_meta:Xk(J(),Wk()).optional()}),bM=yM.extend({text:J()}),xM=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),SM=yM.extend({blob:xM}),CM=Zk([`user`,`assistant`]),wM=X({audience:Y(CM).optional(),priority:zk().min(0).max(1).optional(),lastModified:pk({offset:!0}).optional()}),TM=X({...Uj.shape,...Hj.shape,uri:J(),description:$k(J()),mimeType:$k(J()),size:$k(zk()),annotations:wM.optional(),_meta:$k(Kk({}))}),EM=X({...Uj.shape,...Hj.shape,uriTemplate:J(),description:$k(J()),mimeType:$k(J()),annotations:wM.optional(),_meta:$k(Kk({}))}),DM=aM.extend({method:Z(`resources/list`)}),OM=oM.extend({resources:Y(TM)}),kM=aM.extend({method:Z(`resources/templates/list`)}),AM=oM.extend({resourceTemplates:Y(EM)}),jM=Sj.extend({uri:J()}),MM=jM,NM=Tj.extend({method:Z(`resources/read`),params:MM}),PM=Oj.extend({contents:Y(qk([bM,SM]))}),FM=Dj.extend({method:Z(`notifications/resources/list_changed`),params:Ej.optional()}),IM=jM,LM=Tj.extend({method:Z(`resources/subscribe`),params:IM}),RM=jM,zM=Tj.extend({method:Z(`resources/unsubscribe`),params:RM}),BM=Ej.extend({uri:J()}),VM=Dj.extend({method:Z(`notifications/resources/updated`),params:BM}),HM=X({name:J(),description:$k(J()),required:$k(Vk())}),UM=X({...Uj.shape,...Hj.shape,description:$k(J()),arguments:$k(Y(HM)),_meta:$k(Kk({}))}),WM=aM.extend({method:Z(`prompts/list`)}),GM=oM.extend({prompts:Y(UM)}),KM=Sj.extend({name:J(),arguments:Xk(J(),J()).optional()}),qM=Tj.extend({method:Z(`prompts/get`),params:KM}),JM=X({type:Z(`text`),text:J(),annotations:wM.optional(),_meta:Xk(J(),Wk()).optional()}),YM=X({type:Z(`image`),data:xM,mimeType:J(),annotations:wM.optional(),_meta:Xk(J(),Wk()).optional()}),XM=X({type:Z(`audio`),data:xM,mimeType:J(),annotations:wM.optional(),_meta:Xk(J(),Wk()).optional()}),ZM=X({type:Z(`tool_use`),name:J(),id:J(),input:Xk(J(),Wk()),_meta:Xk(J(),Wk()).optional()}),QM=X({type:Z(`resource`),resource:qk([bM,SM]),annotations:wM.optional(),_meta:Xk(J(),Wk()).optional()}),$M=TM.extend({type:Z(`resource_link`)}),eN=qk([JM,YM,XM,$M,QM]),tN=X({role:CM,content:eN}),nN=Oj.extend({description:J().optional(),messages:Y(tN)}),rN=Dj.extend({method:Z(`notifications/prompts/list_changed`),params:Ej.optional()}),iN=X({title:J().optional(),readOnlyHint:Vk().optional(),destructiveHint:Vk().optional(),idempotentHint:Vk().optional(),openWorldHint:Vk().optional()}),aN=X({taskSupport:Zk([`required`,`optional`,`forbidden`]).optional()}),oN=X({...Uj.shape,...Hj.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:Xk(J(),gj).optional(),required:Y(J()).optional()}).catchall(Wk()),outputSchema:X({type:Z(`object`),properties:Xk(J(),gj).optional(),required:Y(J()).optional()}).catchall(Wk()).optional(),annotations:iN.optional(),execution:aN.optional(),_meta:Xk(J(),Wk()).optional()}),sN=aM.extend({method:Z(`tools/list`)}),cN=oM.extend({tools:Y(oN)}),lN=Oj.extend({content:Y(eN).default([]),structuredContent:Xk(J(),Wk()).optional(),isError:Vk().optional()});lN.or(Oj.extend({toolResult:Wk()}));var uN=Cj.extend({name:J(),arguments:Xk(J(),Wk()).optional()}),dN=Tj.extend({method:Z(`tools/call`),params:uN}),fN=Dj.extend({method:Z(`notifications/tools/list_changed`),params:Ej.optional()});X({autoRefresh:Vk().default(!0),debounceMs:zk().int().nonnegative().default(300)});var pN=Zk([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),mN=Sj.extend({level:pN}),hN=Tj.extend({method:Z(`logging/setLevel`),params:mN}),gN=Ej.extend({level:pN,logger:J().optional(),data:Wk()}),_N=Dj.extend({method:Z(`notifications/message`),params:gN}),vN=X({hints:Y(X({name:J().optional()})).optional(),costPriority:zk().min(0).max(1).optional(),speedPriority:zk().min(0).max(1).optional(),intelligencePriority:zk().min(0).max(1).optional()}),yN=X({mode:Zk([`auto`,`required`,`none`]).optional()}),bN=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(eN).default([]),structuredContent:X({}).loose().optional(),isError:Vk().optional(),_meta:Xk(J(),Wk()).optional()}),xN=Jk(`type`,[JM,YM,XM]),SN=Jk(`type`,[JM,YM,XM,ZM,bN]),CN=X({role:CM,content:qk([SN,Y(SN)]),_meta:Xk(J(),Wk()).optional()}),wN=Cj.extend({messages:Y(CN),modelPreferences:vN.optional(),systemPrompt:J().optional(),includeContext:Zk([`none`,`thisServer`,`allServers`]).optional(),temperature:zk().optional(),maxTokens:zk().int(),stopSequences:Y(J()).optional(),metadata:gj.optional(),tools:Y(oN).optional(),toolChoice:yN.optional()}),TN=Tj.extend({method:Z(`sampling/createMessage`),params:wN}),EN=Oj.extend({model:J(),stopReason:$k(Zk([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:CM,content:xN}),DN=Oj.extend({model:J(),stopReason:$k(Zk([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:CM,content:qk([SN,Y(SN)])}),ON=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:Vk().optional()}),kN=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:zk().optional(),maxLength:zk().optional(),format:Zk([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),AN=X({type:Zk([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:zk().optional(),maximum:zk().optional(),default:zk().optional()}),jN=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),MN=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),NN=qk([qk([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),qk([jN,MN]),qk([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:zk().optional(),maxItems:zk().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:zk().optional(),maxItems:zk().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),ON,kN,AN]),PN=qk([Cj.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:Xk(J(),NN),required:Y(J()).optional()})}),Cj.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),FN=Tj.extend({method:Z(`elicitation/create`),params:PN}),IN=Ej.extend({elicitationId:J()}),LN=Dj.extend({method:Z(`notifications/elicitation/complete`),params:IN}),RN=Oj.extend({action:Zk([`accept`,`decline`,`cancel`]),content:dA(e=>e===null?void 0:e,Xk(J(),qk([J(),zk(),Vk(),Y(J())])).optional())}),zN=X({type:Z(`ref/resource`),uri:J()}),BN=X({type:Z(`ref/prompt`),name:J()}),VN=Sj.extend({ref:qk([BN,zN]),argument:X({name:J(),value:J()}),context:X({arguments:Xk(J(),J()).optional()}).optional()}),HN=Tj.extend({method:Z(`completion/complete`),params:VN}),UN=Oj.extend({completion:Kk({values:Y(J()).max(100),total:$k(zk().int()),hasMore:$k(Vk())})}),WN=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:Xk(J(),Wk()).optional()}),GN=Tj.extend({method:Z(`roots/list`),params:Sj.optional()}),KN=Oj.extend({roots:Y(WN)}),qN=Dj.extend({method:Z(`notifications/roots/list_changed`),params:Ej.optional()});qk([eM,Xj,HN,hN,qM,WM,DM,kM,NM,LM,zM,dN,sN,fM,mM,hM,_M]),qk([Vj,rM,$j,qN,dM]),qk([zj,EN,DN,RN,KN,pM,gM,lM]),qk([eM,TN,FN,GN,fM,mM,hM,_M]),qk([Vj,rM,_N,VM,FM,fN,rN,dM,LN]),qk([zj,Qj,UN,nN,GM,OM,AM,PM,lN,cN,pM,gM,lM]);var JN=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===Ij.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new YN(e.elicitations,n)}return new e(t,n,r)}},YN=class extends JN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Ij.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};AO(),Aw(),jT(),WC(),Zw(),uk(),Iw(),dk(),wD();function XN(e){return!!e._zod}function ZN(e,t){return XN(e)?Bw(e,t):e.safeParse(t)}function QN(e){if(!e)return;let t;if(t=XN(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function $N(e){if(XN(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 eP(e){return e===`completed`||e===`failed`||e===`cancelled`}function tP(e){let t=QN(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=$N(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function nP(e,t){let n=ZN(e,t);if(!n.success)throw n.error;return n.data}var rP=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(Vj,e=>{this._oncancel(e)}),this.setNotificationHandler(rM,e=>{this._onprogress(e)}),this.setRequestHandler(eM,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(fM,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new JN(Ij.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(mM,async(e,t)=>{let n=async()=>{let r=e.params.taskId;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 JN(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}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new JN(Ij.InvalidParams,`Task not found: ${r}`);if(!eP(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(eP(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[hj]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(hM,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 JN(Ij.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(_M,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new JN(Ij.InvalidParams,`Task not found: ${e.params.taskId}`);if(eP(n.status))throw new JN(Ij.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);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new JN(Ij.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof JN?e:new JN(Ij.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),JN.fromError(Ij.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),Fj(e)||Rj(e)?this._onresponse(e):jj(e)?this._onrequest(e,t):Nj(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=JN.fromError(Ij.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?.[hj]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Ij.MethodNotFound,message:`Method not found`}};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 a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=wj(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new JN(Ij.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.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(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Ij.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?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)===a&&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),Fj(e)?n(e):n(new JN(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(Fj(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),Fj(e)?r(e):r(JN.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 JN?e:new JN(Ij.InternalError,String(e))}}return}let i;try{let r=await this.request(e,lM,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new JN(Ij.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},eP(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new JN(Ij.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new JN(Ij.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 JN?e:new JN(Ij.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||{},[hj]: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 JN?e:new JN(Ij.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=ZN(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(JN.fromError(Ij.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},pM,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},gM,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},vM,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||{},[hj]: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||{},[hj]: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||{},[hj]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=tP(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=nP(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=tP(e);this._notificationHandlers.set(n,n=>{let r=nP(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,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`&&jj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new JN(Ij.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){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new JN(Ij.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new JN(Ij.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 JN(Ij.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=dM.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),eP(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 JN(Ij.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(eP(a.status))throw new JN(Ij.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=dM.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),eP(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};mj(),(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 iP=class extends rP{_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)}},aP=`2026-01-26`,oP=qk([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),sP=qk([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),cP=Xk(qk([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.
118
+ 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);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function IO(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:zO(t,`input`,e.processors),output:zO(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function LO(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 LO(r.element,n);if(r.type===`set`)return LO(r.valueType,n);if(r.type===`lazy`)return LO(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 LO(r.innerType,n);if(r.type===`intersection`)return LO(r.left,n)||LO(r.right,n);if(r.type===`record`||r.type===`map`)return LO(r.keyType,n)||LO(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:LO(r.in,n)||LO(r.out,n);if(r.type===`object`){for(let e in r.shape)if(LO(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(LO(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(LO(e,n))return!0;return!!(r.rest&&LO(r.rest,n))}return!1}var RO,zO,BO=a((()=>{ED(),RO=(e,t={})=>n=>{let r=NO({...n,processors:t});return PO(e,r),FO(r,e),IO(r,e)},zO=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=NO({...i??{},target:a,io:t,processors:n});return PO(e,o),FO(o,e),IO(o,e)}})),VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk=a((()=>{BO(),Mw(),VO={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},HO=(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=VO[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}))])}},UO=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`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)},WO=(e,t,n,r)=>{n.type=`boolean`},GO=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},KO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},qO=(e,t,n,r)=>{n.not={}},JO=(e,t,n,r)=>{},YO=(e,t,n,r)=>{let i=e._zod.def,a=qC(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},XO=(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},ZO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},QO=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},$O=(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=PO(a.element,t,{...r,path:[...r.path,`items`]})},ek=(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]=PO(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=PO(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},tk=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>PO(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},nk=(e,t,n,r)=>{let i=e._zod.def,a=PO(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=PO(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]]},rk=(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=PO(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=PO(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=PO(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)}},ik=(e,t,n,r)=>{let i=e._zod.def,a=PO(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`}]},ak=(e,t,n,r)=>{let i=e._zod.def;PO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ok=(e,t,n,r)=>{let i=e._zod.def;PO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},sk=(e,t,n,r)=>{let i=e._zod.def;PO(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)))},ck=(e,t,n,r)=>{let i=e._zod.def;PO(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},lk=(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;PO(o,t,r);let s=t.seen.get(e);s.ref=o},uk=(e,t,n,r)=>{let i=e._zod.def;PO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},dk=(e,t,n,r)=>{let i=e._zod.def;PO(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),pk=a((()=>{KC(),$w(),Rw(),vD(),ZT(),tE(),Mw(),NT(),xD(),ED(),$T(),MO(),BO(),fk(),BO()})),mk=a((()=>{pk()}));function hk(e){return XD(yk,e)}function gk(e){return ZD(bk,e)}function _k(e){return QD(xk,e)}function vk(e){return $D(Sk,e)}var yk,bk,xk,Sk,Ck=a((()=>{pk(),dj(),yk=K(`ZodISODateTime`,(e,t)=>{ME.init(e,t),vA.init(e,t)}),bk=K(`ZodISODate`,(e,t)=>{NE.init(e,t),vA.init(e,t)}),xk=K(`ZodISOTime`,(e,t)=>{PE.init(e,t),vA.init(e,t)}),Sk=K(`ZodISODuration`,(e,t)=>{FE.init(e,t),vA.init(e,t)})})),wk,Tk,Ek=a((()=>{pk(),Mw(),wk=(e,t)=>{Iw.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Pw(e,t)},flatten:{value:t=>Nw(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,YC,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,YC,2)}},isEmpty:{get(){return e.issues.length===0}}})},Tk=K(`ZodError`,wk,{Parent:Error})})),Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk=a((()=>{pk(),Ek(),Dk=zw(Tk),Ok=Bw(Tk),kk=Vw(Tk),Ak=Uw(Tk),jk=Gw(Tk),Mk=Kw(Tk),Nk=qw(Tk),Pk=Jw(Tk),Fk=Yw(Tk),Ik=Xw(Tk),Lk=Zw(Tk),Rk=Qw(Tk)}));function Bk(e,t,n){let r=Object.getPrototypeOf(e),i=mA.get(r);if(i||(i=new Set,mA.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 DD(_A,e)}function Vk(e){return eO(RA,e)}function Hk(e){return tO(zA,e)}function Uk(e){return nO(BA,e)}function Wk(e){return rO(VA,e)}function Gk(e){return iO(HA,e)}function Kk(){return aO(UA)}function qk(e){return oO(WA,e)}function Y(e,t){return DO(GA,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...q(t)};return new KA(n)}function Jk(e,t){return new KA({type:`object`,shape:e,catchall:Kk(),...q(t)})}function Yk(e,t){return new qA({type:`union`,options:e,...q(t)})}function Xk(e,t,n){return new JA({type:`union`,options:t,discriminator:e,...q(n)})}function Zk(e,t){return new YA({type:`intersection`,left:e,right:t})}function Qk(e,t,n){return!t||!t._zod?new XA({type:`record`,keyType:J(),valueType:e,...q(t)}):new XA({type:`record`,keyType:e,valueType:t,...q(n)})}function $k(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new ZA({type:`enum`,entries:n,...q(t)})}function Z(e,t){return new QA({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function eA(e){return new $A({type:`transform`,transform:e})}function tA(e){return new ej({type:`optional`,innerType:e})}function nA(e){return new tj({type:`optional`,innerType:e})}function rA(e){return new nj({type:`nullable`,innerType:e})}function iA(e,t){return new rj({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():sw(t)}})}function aA(e,t){return new ij({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():sw(t)}})}function oA(e,t){return new aj({type:`nonoptional`,innerType:e,...q(t)})}function sA(e,t){return new oj({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function cA(e,t){return new sj({type:`pipe`,in:e,out:t})}function lA(e){return new lj({type:`readonly`,innerType:e})}function uA(e,t){return OO(uj,e??(()=>!0),t)}function dA(e,t={}){return kO(uj,e,t)}function fA(e,t){return AO(e,t)}function pA(e,t){return new cj({type:`pipe`,in:eA(e),out:t})}var mA,hA,gA,_A,vA,yA,bA,xA,SA,CA,wA,TA,EA,DA,OA,kA,AA,jA,MA,NA,PA,FA,IA,LA,RA,zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij,aj,oj,sj,cj,lj,uj,dj=a((()=>{pk(),fk(),BO(),mk(),Ck(),zk(),mA=new WeakMap,hA=K(`ZodType`,(e,t)=>(vE.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:zO(e,`input`),output:zO(e,`output`)}}),e.toJSONSchema=RO(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Dk(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>kk(e,t,n),e.parseAsync=async(t,n)=>Ok(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Ak(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>jk(e,t,n),e.decode=(t,n)=>Mk(e,t,n),e.encodeAsync=async(t,n)=>Nk(e,t,n),e.decodeAsync=async(t,n)=>Pk(e,t,n),e.safeEncode=(t,n)=>Fk(e,t,n),e.safeDecode=(t,n)=>Ik(e,t,n),e.safeEncodeAsync=async(t,n)=>Lk(e,t,n),e.safeDecodeAsync=async(t,n)=>Rk(e,t,n),Bk(e,`ZodType`,{check(...e){let t=this.def;return this.clone(nw(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 lw(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(dA(e,t))},superRefine(e,t){return this.check(fA(e,t))},overwrite(e){return this.check(xO(e))},optional(){return tA(this)},exactOptional(){return nA(this)},nullable(){return rA(this)},nullish(){return tA(rA(this))},nonoptional(e){return oA(this,e)},array(){return Y(this)},or(e){return Yk([this,e])},and(e){return Zk(this,e)},transform(e){return cA(this,eA(e))},default(e){return iA(this,e)},prefault(e){return aA(this,e)},catch(e){return sA(this,e)},pipe(e){return cA(this,e)},readonly(){return lA(this)},describe(e){let t=this.clone();return TD.add(t,{description:e}),t},meta(...e){if(e.length===0)return TD.get(this);let t=this.clone();return TD.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 TD.get(e)?.description},configurable:!0}),e)),gA=K(`_ZodString`,(e,t)=>{yE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HO(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Bk(e,`_ZodString`,{regex(...e){return this.check(hO(...e))},includes(...e){return this.check(vO(...e))},startsWith(...e){return this.check(yO(...e))},endsWith(...e){return this.check(bO(...e))},min(...e){return this.check(pO(...e))},max(...e){return this.check(fO(...e))},length(...e){return this.check(mO(...e))},nonempty(...e){return this.check(pO(1,...e))},lowercase(e){return this.check(gO(e))},uppercase(e){return this.check(_O(e))},trim(){return this.check(CO())},normalize(...e){return this.check(SO(...e))},toLowerCase(){return this.check(wO())},toUpperCase(){return this.check(TO())},slugify(){return this.check(EO())}})}),_A=K(`ZodString`,(e,t)=>{yE.init(e,t),gA.init(e,t),e.email=t=>e.check(OD(yA,t)),e.url=t=>e.check(PD(SA,t)),e.jwt=t=>e.check(YD(LA,t)),e.emoji=t=>e.check(FD(CA,t)),e.guid=t=>e.check(kD(bA,t)),e.uuid=t=>e.check(AD(xA,t)),e.uuidv4=t=>e.check(jD(xA,t)),e.uuidv6=t=>e.check(MD(xA,t)),e.uuidv7=t=>e.check(ND(xA,t)),e.nanoid=t=>e.check(ID(wA,t)),e.guid=t=>e.check(kD(bA,t)),e.cuid=t=>e.check(LD(TA,t)),e.cuid2=t=>e.check(RD(EA,t)),e.ulid=t=>e.check(zD(DA,t)),e.base64=t=>e.check(KD(PA,t)),e.base64url=t=>e.check(qD(FA,t)),e.xid=t=>e.check(BD(OA,t)),e.ksuid=t=>e.check(VD(kA,t)),e.ipv4=t=>e.check(HD(AA,t)),e.ipv6=t=>e.check(UD(jA,t)),e.cidrv4=t=>e.check(WD(MA,t)),e.cidrv6=t=>e.check(GD(NA,t)),e.e164=t=>e.check(JD(IA,t)),e.datetime=t=>e.check(hk(t)),e.date=t=>e.check(gk(t)),e.time=t=>e.check(_k(t)),e.duration=t=>e.check(vk(t))}),vA=K(`ZodStringFormat`,(e,t)=>{bE.init(e,t),gA.init(e,t)}),yA=K(`ZodEmail`,(e,t)=>{CE.init(e,t),vA.init(e,t)}),bA=K(`ZodGUID`,(e,t)=>{xE.init(e,t),vA.init(e,t)}),xA=K(`ZodUUID`,(e,t)=>{SE.init(e,t),vA.init(e,t)}),SA=K(`ZodURL`,(e,t)=>{wE.init(e,t),vA.init(e,t)}),CA=K(`ZodEmoji`,(e,t)=>{TE.init(e,t),vA.init(e,t)}),wA=K(`ZodNanoID`,(e,t)=>{EE.init(e,t),vA.init(e,t)}),TA=K(`ZodCUID`,(e,t)=>{DE.init(e,t),vA.init(e,t)}),EA=K(`ZodCUID2`,(e,t)=>{OE.init(e,t),vA.init(e,t)}),DA=K(`ZodULID`,(e,t)=>{kE.init(e,t),vA.init(e,t)}),OA=K(`ZodXID`,(e,t)=>{AE.init(e,t),vA.init(e,t)}),kA=K(`ZodKSUID`,(e,t)=>{jE.init(e,t),vA.init(e,t)}),AA=K(`ZodIPv4`,(e,t)=>{IE.init(e,t),vA.init(e,t)}),jA=K(`ZodIPv6`,(e,t)=>{LE.init(e,t),vA.init(e,t)}),MA=K(`ZodCIDRv4`,(e,t)=>{RE.init(e,t),vA.init(e,t)}),NA=K(`ZodCIDRv6`,(e,t)=>{zE.init(e,t),vA.init(e,t)}),PA=K(`ZodBase64`,(e,t)=>{BE.init(e,t),vA.init(e,t)}),FA=K(`ZodBase64URL`,(e,t)=>{VE.init(e,t),vA.init(e,t)}),IA=K(`ZodE164`,(e,t)=>{HE.init(e,t),vA.init(e,t)}),LA=K(`ZodJWT`,(e,t)=>{UE.init(e,t),vA.init(e,t)}),RA=K(`ZodNumber`,(e,t)=>{WE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UO(e,t,n,r),Bk(e,`ZodNumber`,{gt(e,t){return this.check(lO(e,t))},gte(e,t){return this.check(uO(e,t))},min(e,t){return this.check(uO(e,t))},lt(e,t){return this.check(sO(e,t))},lte(e,t){return this.check(cO(e,t))},max(e,t){return this.check(cO(e,t))},int(e){return this.check(Hk(e))},safe(e){return this.check(Hk(e))},positive(e){return this.check(lO(0,e))},nonnegative(e){return this.check(uO(0,e))},negative(e){return this.check(sO(0,e))},nonpositive(e){return this.check(cO(0,e))},multipleOf(e,t){return this.check(dO(e,t))},step(e,t){return this.check(dO(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}),zA=K(`ZodNumberFormat`,(e,t)=>{GE.init(e,t),RA.init(e,t)}),BA=K(`ZodBoolean`,(e,t)=>{KE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WO(e,t,n,r)}),VA=K(`ZodUndefined`,(e,t)=>{qE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KO(e,t,n,r)}),HA=K(`ZodNull`,(e,t)=>{JE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GO(e,t,n,r)}),UA=K(`ZodUnknown`,(e,t)=>{YE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JO(e,t,n,r)}),WA=K(`ZodNever`,(e,t)=>{XE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qO(e,t,n,r)}),GA=K(`ZodArray`,(e,t)=>{ZE.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$O(e,t,n,r),e.element=t.element,Bk(e,`ZodArray`,{min(e,t){return this.check(pO(e,t))},nonempty(e){return this.check(pO(1,e))},max(e,t){return this.check(fO(e,t))},length(e,t){return this.check(mO(e,t))},unwrap(){return this.element}})}),KA=K(`ZodObject`,(e,t)=>{$E.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ek(e,t,n,r),ew(e,`shape`,()=>t.shape),Bk(e,`ZodObject`,{keyof(){return $k(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Kk()})},loose(){return this.clone({...this._zod.def,catchall:Kk()})},strict(){return this.clone({...this._zod.def,catchall:qk()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return mw(this,e)},safeExtend(e){return hw(this,e)},merge(e){return gw(this,e)},pick(e){return fw(this,e)},omit(e){return pw(this,e)},partial(...e){return _w(ej,this,e[0])},required(...e){return vw(aj,this,e[0])}})}),qA=K(`ZodUnion`,(e,t)=>{eD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tk(e,t,n,r),e.options=t.options}),JA=K(`ZodDiscriminatedUnion`,(e,t)=>{qA.init(e,t),tD.init(e,t)}),YA=K(`ZodIntersection`,(e,t)=>{nD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nk(e,t,n,r)}),XA=K(`ZodRecord`,(e,t)=>{rD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rk(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),ZA=K(`ZodEnum`,(e,t)=>{iD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YO(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 ZA({...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 ZA({...t,checks:[],...q(r),entries:i})}}),QA=K(`ZodLiteral`,(e,t)=>{aD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XO(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]}})}),$A=K(`ZodTransform`,(e,t)=>{oD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QO(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new WC(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ew(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(Ew(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)}}),ej=K(`ZodOptional`,(e,t)=>{sD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),tj=K(`ZodExactOptional`,(e,t)=>{cD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),nj=K(`ZodNullable`,(e,t)=>{lD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ik(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rj=K(`ZodDefault`,(e,t)=>{uD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ok(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),ij=K(`ZodPrefault`,(e,t)=>{dD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),aj=K(`ZodNonOptional`,(e,t)=>{fD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ak(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),oj=K(`ZodCatch`,(e,t)=>{pD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ck(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),sj=K(`ZodPipe`,(e,t)=>{mD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lk(e,t,n,r),e.in=t.in,e.out=t.out}),cj=K(`ZodPreprocess`,(e,t)=>{sj.init(e,t),hD.init(e,t)}),lj=K(`ZodReadonly`,(e,t)=>{gD.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),uj=K(`ZodCustom`,(e,t)=>{_D.init(e,t),hA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZO(e,t,n,r)})})),fj,pj=a((()=>{pk(),fj||={}})),mj=a((()=>{pk(),dj(),mk(),Ek(),zk(),pj(),xD(),fk(),ED(),mk(),Ck(),dj(),Mw(),VC(yD())})),hj=a((()=>{mj(),mj()})),gj=a((()=>{hj()}));gj();var _j=`io.modelcontextprotocol/related-task`,vj=uA(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),yj=Yk([J(),Vk().int()]),bj=J();Jk({ttl:Vk().optional(),pollInterval:Vk().optional()});var xj=X({ttl:Vk().optional()}),Sj=X({taskId:J()}),Cj=Jk({progressToken:yj.optional(),[_j]:Sj.optional()}),wj=X({_meta:Cj.optional()}),Tj=wj.extend({task:xj.optional()}),Ej=e=>Tj.safeParse(e).success,Dj=X({method:J(),params:wj.loose().optional()}),Oj=X({_meta:Cj.optional()}),kj=X({method:J(),params:Oj.loose().optional()}),Aj=Jk({_meta:Cj.optional()}),jj=Yk([J(),Vk().int()]),Mj=X({jsonrpc:Z(`2.0`),id:jj,...Dj.shape}).strict(),Nj=e=>Mj.safeParse(e).success,Pj=X({jsonrpc:Z(`2.0`),...kj.shape}).strict(),Fj=e=>Pj.safeParse(e).success,Ij=X({jsonrpc:Z(`2.0`),id:jj,result:Aj}).strict(),Lj=e=>Ij.safeParse(e).success,Rj;(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`})(Rj||={});var zj=X({jsonrpc:Z(`2.0`),id:jj.optional(),error:X({code:Vk().int(),message:J(),data:Kk().optional()})}).strict(),Bj=e=>zj.safeParse(e).success;Yk([Mj,Pj,Ij,zj]),Yk([Ij,zj]);var Vj=Aj.strict(),Hj=Oj.extend({requestId:jj.optional(),reason:J().optional()}),Uj=kj.extend({method:Z(`notifications/cancelled`),params:Hj}),Wj=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:$k([`light`,`dark`]).optional()})).optional()}),Gj=X({name:J(),title:J().optional()}),Kj=Gj.extend({...Gj.shape,...Wj.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),qj=pA(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Zk(X({form:Zk(X({applyDefaults:Uk().optional()}),Qk(J(),Kk())).optional(),url:vj.optional()}),Qk(J(),Kk()).optional())),Jj=Jk({list:vj.optional(),cancel:vj.optional(),requests:Jk({sampling:Jk({createMessage:vj.optional()}).optional(),elicitation:Jk({create:vj.optional()}).optional()}).optional()}),Yj=Jk({list:vj.optional(),cancel:vj.optional(),requests:Jk({tools:Jk({call:vj.optional()}).optional()}).optional()}),Xj=X({experimental:Qk(J(),vj).optional(),sampling:X({context:vj.optional(),tools:vj.optional()}).optional(),elicitation:qj.optional(),roots:X({listChanged:Uk().optional()}).optional(),tasks:Jj.optional(),extensions:Qk(J(),vj).optional()}),Zj=wj.extend({protocolVersion:J(),capabilities:Xj,clientInfo:Kj}),Qj=Dj.extend({method:Z(`initialize`),params:Zj}),$j=X({experimental:Qk(J(),vj).optional(),logging:vj.optional(),completions:vj.optional(),prompts:X({listChanged:Uk().optional()}).optional(),resources:X({subscribe:Uk().optional(),listChanged:Uk().optional()}).optional(),tools:X({listChanged:Uk().optional()}).optional(),tasks:Yj.optional(),extensions:Qk(J(),vj).optional()}),eM=Aj.extend({protocolVersion:J(),capabilities:$j,serverInfo:Kj,instructions:J().optional()}),tM=kj.extend({method:Z(`notifications/initialized`),params:Oj.optional()}),nM=Dj.extend({method:Z(`ping`),params:wj.optional()}),rM=X({progress:Vk(),total:tA(Vk()),message:tA(J())}),iM=X({...Oj.shape,...rM.shape,progressToken:yj}),aM=kj.extend({method:Z(`notifications/progress`),params:iM}),oM=wj.extend({cursor:bj.optional()}),sM=Dj.extend({params:oM.optional()}),cM=Aj.extend({nextCursor:bj.optional()}),lM=$k([`working`,`input_required`,`completed`,`failed`,`cancelled`]),uM=X({taskId:J(),status:lM,ttl:Yk([Vk(),Gk()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:tA(Vk()),statusMessage:tA(J())}),dM=Aj.extend({task:uM}),fM=Oj.merge(uM),pM=kj.extend({method:Z(`notifications/tasks/status`),params:fM}),mM=Dj.extend({method:Z(`tasks/get`),params:wj.extend({taskId:J()})}),hM=Aj.merge(uM),gM=Dj.extend({method:Z(`tasks/result`),params:wj.extend({taskId:J()})});Aj.loose();var _M=sM.extend({method:Z(`tasks/list`)}),vM=cM.extend({tasks:Y(uM)}),yM=Dj.extend({method:Z(`tasks/cancel`),params:wj.extend({taskId:J()})}),bM=Aj.merge(uM),xM=X({uri:J(),mimeType:tA(J()),_meta:Qk(J(),Kk()).optional()}),SM=xM.extend({text:J()}),CM=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),wM=xM.extend({blob:CM}),TM=$k([`user`,`assistant`]),EM=X({audience:Y(TM).optional(),priority:Vk().min(0).max(1).optional(),lastModified:hk({offset:!0}).optional()}),DM=X({...Gj.shape,...Wj.shape,uri:J(),description:tA(J()),mimeType:tA(J()),size:tA(Vk()),annotations:EM.optional(),_meta:tA(Jk({}))}),OM=X({...Gj.shape,...Wj.shape,uriTemplate:J(),description:tA(J()),mimeType:tA(J()),annotations:EM.optional(),_meta:tA(Jk({}))}),kM=sM.extend({method:Z(`resources/list`)}),AM=cM.extend({resources:Y(DM)}),jM=sM.extend({method:Z(`resources/templates/list`)}),MM=cM.extend({resourceTemplates:Y(OM)}),NM=wj.extend({uri:J()}),PM=NM,FM=Dj.extend({method:Z(`resources/read`),params:PM}),IM=Aj.extend({contents:Y(Yk([SM,wM]))}),LM=kj.extend({method:Z(`notifications/resources/list_changed`),params:Oj.optional()}),RM=NM,zM=Dj.extend({method:Z(`resources/subscribe`),params:RM}),BM=NM,VM=Dj.extend({method:Z(`resources/unsubscribe`),params:BM}),HM=Oj.extend({uri:J()}),UM=kj.extend({method:Z(`notifications/resources/updated`),params:HM}),WM=X({name:J(),description:tA(J()),required:tA(Uk())}),GM=X({...Gj.shape,...Wj.shape,description:tA(J()),arguments:tA(Y(WM)),_meta:tA(Jk({}))}),KM=sM.extend({method:Z(`prompts/list`)}),qM=cM.extend({prompts:Y(GM)}),JM=wj.extend({name:J(),arguments:Qk(J(),J()).optional()}),YM=Dj.extend({method:Z(`prompts/get`),params:JM}),XM=X({type:Z(`text`),text:J(),annotations:EM.optional(),_meta:Qk(J(),Kk()).optional()}),ZM=X({type:Z(`image`),data:CM,mimeType:J(),annotations:EM.optional(),_meta:Qk(J(),Kk()).optional()}),QM=X({type:Z(`audio`),data:CM,mimeType:J(),annotations:EM.optional(),_meta:Qk(J(),Kk()).optional()}),$M=X({type:Z(`tool_use`),name:J(),id:J(),input:Qk(J(),Kk()),_meta:Qk(J(),Kk()).optional()}),eN=X({type:Z(`resource`),resource:Yk([SM,wM]),annotations:EM.optional(),_meta:Qk(J(),Kk()).optional()}),tN=DM.extend({type:Z(`resource_link`)}),nN=Yk([XM,ZM,QM,tN,eN]),rN=X({role:TM,content:nN}),iN=Aj.extend({description:J().optional(),messages:Y(rN)}),aN=kj.extend({method:Z(`notifications/prompts/list_changed`),params:Oj.optional()}),oN=X({title:J().optional(),readOnlyHint:Uk().optional(),destructiveHint:Uk().optional(),idempotentHint:Uk().optional(),openWorldHint:Uk().optional()}),sN=X({taskSupport:$k([`required`,`optional`,`forbidden`]).optional()}),cN=X({...Gj.shape,...Wj.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:Qk(J(),vj).optional(),required:Y(J()).optional()}).catchall(Kk()),outputSchema:X({type:Z(`object`),properties:Qk(J(),vj).optional(),required:Y(J()).optional()}).catchall(Kk()).optional(),annotations:oN.optional(),execution:sN.optional(),_meta:Qk(J(),Kk()).optional()}),lN=sM.extend({method:Z(`tools/list`)}),uN=cM.extend({tools:Y(cN)}),dN=Aj.extend({content:Y(nN).default([]),structuredContent:Qk(J(),Kk()).optional(),isError:Uk().optional()});dN.or(Aj.extend({toolResult:Kk()}));var fN=Tj.extend({name:J(),arguments:Qk(J(),Kk()).optional()}),pN=Dj.extend({method:Z(`tools/call`),params:fN}),mN=kj.extend({method:Z(`notifications/tools/list_changed`),params:Oj.optional()});X({autoRefresh:Uk().default(!0),debounceMs:Vk().int().nonnegative().default(300)});var hN=$k([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),gN=wj.extend({level:hN}),_N=Dj.extend({method:Z(`logging/setLevel`),params:gN}),vN=Oj.extend({level:hN,logger:J().optional(),data:Kk()}),yN=kj.extend({method:Z(`notifications/message`),params:vN}),bN=X({hints:Y(X({name:J().optional()})).optional(),costPriority:Vk().min(0).max(1).optional(),speedPriority:Vk().min(0).max(1).optional(),intelligencePriority:Vk().min(0).max(1).optional()}),xN=X({mode:$k([`auto`,`required`,`none`]).optional()}),SN=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(nN).default([]),structuredContent:X({}).loose().optional(),isError:Uk().optional(),_meta:Qk(J(),Kk()).optional()}),CN=Xk(`type`,[XM,ZM,QM]),wN=Xk(`type`,[XM,ZM,QM,$M,SN]),TN=X({role:TM,content:Yk([wN,Y(wN)]),_meta:Qk(J(),Kk()).optional()}),EN=Tj.extend({messages:Y(TN),modelPreferences:bN.optional(),systemPrompt:J().optional(),includeContext:$k([`none`,`thisServer`,`allServers`]).optional(),temperature:Vk().optional(),maxTokens:Vk().int(),stopSequences:Y(J()).optional(),metadata:vj.optional(),tools:Y(cN).optional(),toolChoice:xN.optional()}),DN=Dj.extend({method:Z(`sampling/createMessage`),params:EN}),ON=Aj.extend({model:J(),stopReason:tA($k([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:TM,content:CN}),kN=Aj.extend({model:J(),stopReason:tA($k([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:TM,content:Yk([wN,Y(wN)])}),AN=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:Uk().optional()}),jN=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:Vk().optional(),maxLength:Vk().optional(),format:$k([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),MN=X({type:$k([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:Vk().optional(),maximum:Vk().optional(),default:Vk().optional()}),NN=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),PN=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),FN=Yk([Yk([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),Yk([NN,PN]),Yk([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Vk().optional(),maxItems:Vk().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Vk().optional(),maxItems:Vk().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),AN,jN,MN]),IN=Yk([Tj.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:Qk(J(),FN),required:Y(J()).optional()})}),Tj.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),LN=Dj.extend({method:Z(`elicitation/create`),params:IN}),RN=Oj.extend({elicitationId:J()}),zN=kj.extend({method:Z(`notifications/elicitation/complete`),params:RN}),BN=Aj.extend({action:$k([`accept`,`decline`,`cancel`]),content:pA(e=>e===null?void 0:e,Qk(J(),Yk([J(),Vk(),Uk(),Y(J())])).optional())}),VN=X({type:Z(`ref/resource`),uri:J()}),HN=X({type:Z(`ref/prompt`),name:J()}),UN=wj.extend({ref:Yk([HN,VN]),argument:X({name:J(),value:J()}),context:X({arguments:Qk(J(),J()).optional()}).optional()}),WN=Dj.extend({method:Z(`completion/complete`),params:UN}),GN=Aj.extend({completion:Jk({values:Y(J()).max(100),total:tA(Vk().int()),hasMore:tA(Uk())})}),KN=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:Qk(J(),Kk()).optional()}),qN=Dj.extend({method:Z(`roots/list`),params:wj.optional()}),JN=Aj.extend({roots:Y(KN)}),YN=kj.extend({method:Z(`notifications/roots/list_changed`),params:Oj.optional()});Yk([nM,Qj,WN,_N,YM,KM,kM,jM,FM,zM,VM,pN,lN,mM,gM,_M,yM]),Yk([Uj,aM,tM,YN,pM]),Yk([Vj,ON,kN,BN,JN,hM,vM,dM]),Yk([nM,DN,LN,qN,mM,gM,_M,yM]),Yk([Uj,aM,yN,UM,LM,mN,aN,pM,zN]),Yk([Vj,eM,GN,iN,qM,AM,MM,IM,dN,uN,hM,vM,dM]);var XN=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===Rj.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ZN(e.elicitations,n)}return new e(t,n,r)}},ZN=class extends XN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Rj.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};MO(),Mw(),NT(),KC(),$w(),fk(),Rw(),pk(),ED();function QN(e){return!!e._zod}function $N(e,t){return QN(e)?Hw(e,t):e.safeParse(t)}function eP(e){if(!e)return;let t;if(t=QN(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function tP(e){if(QN(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 nP(e){return e===`completed`||e===`failed`||e===`cancelled`}function rP(e){let t=eP(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=tP(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function iP(e,t){let n=$N(e,t);if(!n.success)throw n.error;return n.data}var aP=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(Uj,e=>{this._oncancel(e)}),this.setNotificationHandler(aM,e=>{this._onprogress(e)}),this.setRequestHandler(nM,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(mM,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new XN(Rj.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(gM,async(e,t)=>{let n=async()=>{let r=e.params.taskId;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 XN(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}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new XN(Rj.InvalidParams,`Task not found: ${r}`);if(!nP(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(nP(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[_j]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(_M,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 XN(Rj.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(yM,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new XN(Rj.InvalidParams,`Task not found: ${e.params.taskId}`);if(nP(n.status))throw new XN(Rj.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);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new XN(Rj.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof XN?e:new XN(Rj.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),XN.fromError(Rj.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),Lj(e)||Bj(e)?this._onresponse(e):Nj(e)?this._onrequest(e,t):Fj(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=XN.fromError(Rj.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?.[_j]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Rj.MethodNotFound,message:`Method not found`}};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 a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Ej(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new XN(Rj.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.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(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Rj.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?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)===a&&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),Lj(e)?n(e):n(new XN(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(Lj(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),Lj(e)?r(e):r(XN.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 XN?e:new XN(Rj.InternalError,String(e))}}return}let i;try{let r=await this.request(e,dM,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new XN(Rj.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},nP(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new XN(Rj.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new XN(Rj.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 XN?e:new XN(Rj.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||{},[_j]: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 XN?e:new XN(Rj.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=$N(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(XN.fromError(Rj.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},hM,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},vM,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},bM,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||{},[_j]: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||{},[_j]: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||{},[_j]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=rP(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=iP(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=rP(e);this._notificationHandlers.set(n,n=>{let r=iP(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,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`&&Nj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new XN(Rj.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){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new XN(Rj.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new XN(Rj.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 XN(Rj.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=pM.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),nP(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 XN(Rj.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(nP(a.status))throw new XN(Rj.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=pM.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),nP(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};gj(),(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 oP=class extends aP{_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)}},sP=`2026-01-26`,cP=Yk([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),lP=Yk([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),uP=Qk(Yk([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.
118
119
 
119
120
  Individual style keys are optional - hosts may provide any subset of these values.
120
121
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
121
122
 
122
123
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
123
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),qk([J(),Hk()]).describe(`Style variables for theming MCP apps.
124
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Yk([J(),Wk()]).describe(`Style variables for theming MCP apps.
124
125
 
125
126
  Individual style keys are optional - hosts may provide any subset of these values.
126
127
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -132,10 +133,10 @@ Individual style keys are optional - hosts may provide any subset of these value
132
133
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
133
134
 
134
135
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
135
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),lP=X({method:Z(`ui/open-link`),params:X({url:J().describe(`URL to open in the host's browser`)})});X({isError:Vk().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:Vk().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:Vk().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var uP=X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})}),dP=X({connectDomains:Y(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
136
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),dP=X({method:Z(`ui/open-link`),params:X({url:J().describe(`URL to open in the host's browser`)})});X({isError:Uk().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:Uk().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:Uk().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var fP=X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})}),pP=X({connectDomains:Y(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
136
137
 
137
138
  - Maps to CSP \`connect-src\` directive
138
- - 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'`)")}),fP=X({camera:X({}).optional().describe(`Request camera access.
139
+ - 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'`)")}),mP=X({camera:X({}).optional().describe(`Request camera access.
139
140
 
140
141
  Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access.
141
142
 
@@ -143,7 +144,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:X({}).optional()
143
144
 
144
145
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access.
145
146
 
146
- Maps to Permission Policy \`clipboard-write\` feature.`)}),pP=X({method:Z(`ui/notifications/size-changed`),params:X({width:zk().optional().describe(`New width in pixels.`),height:zk().optional().describe(`New height in pixels.`)})});X({method:Z(`ui/notifications/tool-input`),params:X({arguments:Xk(J(),Wk().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(),Wk().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 mP=X({fonts:J().optional()}),hP=X({variables:cP.optional().describe(`CSS variables for theming the app.`),css:mP.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})});var gP=Xk(J(),Wk()),_P=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.`)}),vP=X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()}),yP=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:Vk().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:Vk().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:fP.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:dP.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:_P.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:_P.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.")}),bP=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:Vk().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(sP).optional().describe(`Display modes the app supports.`)}),xP=X({method:Z(`ui/notifications/initialized`),params:X({}).optional()});X({csp:dP.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:fP.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
147
+ Maps to Permission Policy \`clipboard-write\` feature.`)}),hP=X({method:Z(`ui/notifications/size-changed`),params:X({width:Vk().optional().describe(`New width in pixels.`),height:Vk().optional().describe(`New height in pixels.`)})});X({method:Z(`ui/notifications/tool-input`),params:X({arguments:Qk(J(),Kk().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:Qk(J(),Kk().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 gP=X({fonts:J().optional()}),_P=X({variables:uP.optional().describe(`CSS variables for theming the app.`),css:gP.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})});var vP=Qk(J(),Kk()),yP=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.`)}),bP=X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()}),xP=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:Uk().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:Uk().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:mP.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:pP.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:yP.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:yP.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.")}),SP=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:Uk().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(lP).optional().describe(`Display modes the app supports.`)}),CP=X({method:Z(`ui/notifications/initialized`),params:X({}).optional()});X({csp:pP.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:mP.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
147
148
 
148
149
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
149
150
 
@@ -151,19 +152,19 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
151
152
  - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
152
153
  - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
153
154
 
154
- If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Vk().optional().describe(`Visual boundary preference - true if view prefers a visible border.
155
+ If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Uk().optional().describe(`Visual boundary preference - true if view prefers a visible border.
155
156
 
156
157
  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.
157
158
 
158
159
  - \`true\`: request visible border + background
159
160
  - \`false\`: request no visible border + background
160
- - omitted: host decides border`)});var SP=X({method:Z(`ui/request-display-mode`),params:X({mode:sP.describe(`The display mode being requested.`)})});X({mode:sP.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var CP=qk([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:J().optional(),visibility:Y(CP).optional().describe(`Who can access this tool. Default: ["model", "app"]
161
+ - omitted: host decides border`)});var wP=X({method:Z(`ui/request-display-mode`),params:X({mode:lP.describe(`The display mode being requested.`)})});X({mode:lP.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var TP=Yk([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:J().optional(),visibility:Y(TP).optional().describe(`Who can access this tool. Default: ["model", "app"]
161
162
  - "model": Tool visible to and callable by the agent
162
- - "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 wP=X({method:Z(`ui/download-file`),params:X({contents:Y(qk([QM,$M])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),TP=X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(eN).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:dP.optional().describe(`CSP configuration from resource metadata.`),permissions:fP.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:lN.describe(`Standard MCP tool execution result.`)});var EP=X({toolInfo:X({id:kj.optional().describe(`JSON-RPC id of the tools/call request.`),tool:oN.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:oP.optional().describe(`Current color theme preference.`),styles:hP.optional().describe(`Style configuration for theming the app.`),displayMode:sP.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(sP).optional().describe(`Display modes the host supports.`),containerDimensions:qk([X({height:zk().describe(`Fixed container height in pixels.`)}),X({maxHeight:qk([zk(),Hk()]).optional().describe(`Maximum container height in pixels.`)})]).and(qk([X({width:zk().describe(`Fixed container width in pixels.`)}),X({maxWidth:qk([zk(),Hk()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
163
- 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:qk([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:Vk().optional().describe(`Whether the device supports touch input.`),hover:Vk().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:zk().describe(`Top safe area inset in pixels.`),right:zk().describe(`Right safe area inset in pixels.`),bottom:zk().describe(`Bottom safe area inset in pixels.`),left:zk().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:EP.describe(`Partial context update containing only changed fields.`)});var DP=X({method:Z(`ui/update-model-context`),params:X({content:Y(eN).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:Xk(J(),Wk().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),OP=X({method:Z(`ui/initialize`),params:X({appInfo:Wj.describe(`App identification (name and version).`),appCapabilities:bP.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:Wj.describe(`Host application identification and version.`),hostCapabilities:yP.describe(`Features and capabilities provided by the host.`),hostContext:EP.describe(`Rich context about the host environment.`)}).passthrough();var kP=[aP],AP=class extends iP{_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:pP,sandboxready:uP,initialized:xP,requestteardown:vP,loggingmessage:_N};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(OP,e=>this._oninitialize(e)),this.setRequestHandler(eM,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(SP,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(TP,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(lP,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(wP,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(SP,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(DP,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(dN,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(TN,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(DM,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(kM,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(NM,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(WM,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:kP.includes(t)?t:aP,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];jP(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},gP,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},lN,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},cN,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},lN,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(fN,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},OM,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},AM,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},PM,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(FM,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},GM,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(rN,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function jP(e,t){return JSON.stringify(e)===JSON.stringify(t)}function MP(){let e=I(Kv);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var NP={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},PP={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,componentOverrides:{}},content:{stackedAspect:16/9},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 FP(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`}}var IP={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:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.38},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"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-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-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-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.78},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.8},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}]}},LP={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-stack-canvas`,regular:`content-stack-canvas`},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`}}};function RP(e,t,n=IP,r=LP,i=!0){let a=r[e][t.width][t.height],o=n[a];if(!o)throw Error(`Template matrix references missing template id: ${a}`);if(!i&&o.soloVariant!==void 0){let e=n[o.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${o.soloVariant}`);return e}return o}function zP(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`),o&&s?{state:`content-focus`,suppressedPrefs:r,contentKind:a}:{state:o?`content-plus-canvas`:`content-focus`,suppressedPrefs:r,contentKind:a})}var BP={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}},VP={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},HP=`canvas.`;function UP(e){return e.startsWith(HP)?e.slice(7):e}function WP(e,t){let n=UP(e),r=BP[n]??VP,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(BP);function GP(e,t,n){let r=WP(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 KP(e,t){let n=UP(e);return BP[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:WP(e,t).hardMinHeightPx}function qP(e,t){return WP(e,t).minWidthPx}function JP(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 YP(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 ZP(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 QP(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&ZP(i.rect,e.rect);for(let a of e){let e=a.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||r.push({kind:`bounds`,tileId:a.id,message:`${a.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)&&r.push({kind:`bounds`,tileId:a.id,message:`${a.id} rect exceeds the container`}),a.layer===`overlay`&&a.kind!==`selfView`&&r.push({kind:`overlay-legality`,tileId:a.id,message:`only selfView may ride the overlay layer, got ${a.kind}`}),a.kind===`selfView`&&a.layer===`overlay`&&i!==void 0&&!ZP(i.rect,a.rect)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`selfView escapes the replica rect`}),(a.kind===`content`||a.kind===`replica`)&&(e.width<48||e.height<48)&&r.push({kind:`degenerate-surface`,tileId:a.id,message:`${a.kind} tile ${a.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),a.kind===`card`){a.fit.kind===`scaled`&&(a.fit.factor<n.card.minDisplayScale||a.fit.factor>1)&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} scaled to ${a.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=a.component===void 0?void 0:KP(a.component,n.card.componentOverrides);t!==void 0&&e.height<t&&a.fit.kind!==`scroll`&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below its ${t}px hard min without scroll`});let i=a.component===void 0?void 0:qP(a.component,n.card.componentOverrides);i!==void 0&&e.width<i&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.width}px is below its ${i}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)&&(a(n)||r.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));return r}var $P=(e,t,n)=>Math.min(n,Math.max(t,e));function eF(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 tF(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function nF(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 rF(e,t,n,r){let{cardsPad:i}=eF(n,r),a=Math.max(1,Math.min(t-2*i,Math.round(n.rail.widthPx)-2*i));return{innerW:a,entries:e.map(e=>{let t=GP(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:a,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:JP(t.naturalHeightPx,n)}})}}function iF(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function aF(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 oF(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>iF(n===`x`?e.x:e.y,o)-iF(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?aF(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)):$P(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($P(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,a=_[r+1]??i;return{region:e,rect:n===`x`?{x:i,y:0,width:a-i,height:t.height}:{x:0,y:i,width:t.width,height:a-i}}})}function sF(e,t,n){let r=t.width,i=t.height,a=aF(e,e.width,n,`width`),o=aF(e,e.x,n,`x`),s=$P(Math.round(iF(o,r)),0,r),c=$P(Math.round(iF(e.y,i)),0,i);return{x:s,y:c,width:$P(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:$P(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function cF(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))?oF(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?oF(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:sF(e,t,n)}))}function lF(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))||d.find(e=>e.accepts.includes(`card`)&&`fraction`in e.height)===void 0||r.cards.length===0)return;let{innerW:f,entries:p}=rF(nF(r.cards,u,c.eviction.policy),i.width,c,l),m=p.reduce((e,t)=>t.constraints.minWidthPx>f?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:h}=eF(c,l),g=Math.max(0,o-s),_=t===`canvas-dominant`&&m>0;return{neededPx:m+2*h+(_?0:g),capPx:Math.round(c.card.stackBandMaxFraction*a.height),..._&&{shrinkToContent:_}}}function uF(e,t,n,r){if(t===null)return;let i=e.regions.filter(e=>e.zBase<100);if(!(i.length>1&&i.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let a=i.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),o=i.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!a||!o)return;let s=r.content.stackedAspect;if(!(!Number.isFinite(s)||s<=0))return{maxPx:Math.round(n.width/s)}}function dF(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 fF(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 pF(e,t,n){return t===null||!XP(e,t)?e:{...e,y:t.y-n-e.height}}function mF(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 hF(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?1:0)+(t.contentKind===null?0:1)+ +(n.cards.length>0)>=2?eF(a,r.width).surfacePad:0,u={width:Math.max(0,i.width-2*l),height:Math.max(0,i.height-2*l)},d=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null);return{regions:cF(e,u,a,lF(e,t.state,t.contentKind,n,u,i,o,l,a,r.width,tF(t.state,r,a)),uF(e,t.contentKind,u,a)).map(e=>({...e,rect:{...e.rect,x:e.rect.x+l,y:e.rect.y+l}})).map(e=>d===null||!e.region.accepts.includes(`card`)||!(e.rect.x<d.x+d.width&&e.rect.x+e.rect.width>d.x)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,s-e.rect.y))}}),surfacePad:l,controlsInset:o,bandTopY:s}}function gF(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,controlsInset:c,bandTopY:l}=hF(t,e,n,r,i,a),u=s.find(e=>e.region.accepts.includes(`replica`)),d=s.find(e=>e.region.accepts.includes(`content`)),f=s.find(e=>e.region.accepts.includes(`card`)),p=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),m=Math.round(a.rail.gutterPx),h=Math.round(a.pip.gapPaddingPx),g=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),_=tF(e.state,r,a),v=f?nF(n.cards,_,a.eviction.policy):[],y=t=>{let s={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1},_=[],y=null,b=!1,x=u!==void 0&&u.region.accepts.includes(`selfView`);if(u&&x&&(n.replica||o)){let e=u.rect,r=o&&!t.selfViewDropped;o&&t.selfViewDropped&&(s.selfViewDropped=!0);let i=+!!n.replica+ +!!r,c=Math.round(a.insets.participantsPadPx),l=Math.max(1,e.width-2*c),d=Math.round(l*9/16),f=e=>i*e+(i-1)*c;f(d)>e.height&&(d=Math.max(1,Math.floor((e.height-(i-1)*c)/i)),l=Math.min(Math.max(1,e.width-2*c),Math.round(d*16/9))),d=Math.max(d,Math.min(48,e.height)),l=Math.max(l,Math.min(48,e.width));let p=e.x+Math.round((e.width-l)/2),m=e.y+Math.round((e.height-f(d))/2);if(n.replica){let e={x:p,y:m,width:l,height:d};if(t.replicaCollapsed){let t=Math.min(d,Math.max(64,Math.round(d*.25)));e={...e,height:t},s.replicaCollapsed=!0}y={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:u.region.zBase,fit:{kind:`natural`},region:u.region.name},_.push(y),m+=d+c}r&&(_.push({id:`selfView`,kind:`selfView`,rect:{x:p,y:m,width:l,height:d},layer:`grid`,order:u.region.zBase,fit:{kind:`natural`},region:u.region.name}),b=!0)}else if(u&&(n.replica||o)){let e=!n.replica,r=u.rect;if(!e&&t.replicaCollapsed){let e=Math.min(r.height,Math.max(64,Math.round(r.height*.25)));r={...r,height:e},s.replicaCollapsed=!0}let i={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:r,layer:`grid`,order:u.region.zBase,fit:{kind:`natural`},region:u.region.name};_.push(i),e?b=!0:y=i}e.contentKind!==null&&d&&_.push({id:`content`,kind:`content`,rect:d.rect,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name});let S=mF(v,t.extraEvictions,a.eviction.policy),C=new Set(S.map(e=>e.id));if(s.evictedCardIds=g.filter(e=>!C.has(e.id)).map(e=>e.id),f&&S.length>0){let e=f.rect,{innerW:t,entries:n}=rF(S,e.width,a,r.width),i=e.x+Math.round((e.width-t)/2),o=e.height-m*(n.length-1),s=n.reduce((e,t)=>e+t.clampedHeightPx,0),c;if(s<=o)c=n.map(e=>e.clampedHeightPx);else{let e=o>0?o/s:0;c=n.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=c.reduce((e,t)=>e+t,0)-Math.max(0,o);for(;t>0;){let e=-1;for(let t=0;t<c.length;t++){let n=c[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(c[e]??0))&&(e=t)}if(e===-1)break;c[e]=(c[e]??0)-1,--t}}let l=c.reduce((e,t)=>e+t,0)+m*(n.length-1),u=e.y+Math.max(0,Math.round((e.height-l)/2));n.forEach((n,r)=>{let o=Math.min(u,e.y+e.height),s=Math.max(0,Math.min(c[r]??0,e.y+e.height-o)),l=YP(n.clampedHeightPx,s,a),d=n.constraints.hardMinHeightPx;d!==void 0&&s<d&&l.kind!==`scroll`&&(l={kind:`scroll`}),_.push({id:n.card.id,kind:`card`,component:n.card.component,cardSizeClass:n.constraints.sizeClass,rect:{x:i,y:o,width:t,height:s},layer:`grid`,order:f.region.zBase+r,fit:l,region:f.region.name}),u=o+s+m})}if(!b){if(o&&t.selfViewDropped)s.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?`bottom-right`:n.prefs.pipCorner??`bottom-right`,o=n.callControlsVisible===!1?null:n.callControlsRect??(c>0?{x:0,y:l,width:i.width,height:c}:null);if(y){let e=y.rect,n=fF(e,h,a,r.width===`compact`),i=n===null?null:dF(e,t,h,n.w,n.h),c=i===null?null:pF(i,o,h),l=n!==null&&c!==null&&c.y>=e.y&&n.w+h<=e.width&&n.h+h<=e.height,u=n!==null&&e.width>0&&e.height>0?n.w*n.h/(e.width*e.height):1/0;c!==null&&l&&u<=a.pip.maxAreaRatio?_.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:p?.zBase??100,fit:{kind:`natural`},region:p?.name??`pip`}):s.selfViewDropped=!0}else{let e=a.pip.minWidthPx,n=r.width===`compact`?e:Math.round(e*9/16),c={x:0,y:0,width:i.width,height:i.height},l=pF(dF(c,t,h,e,n),o,h),u=l.y>=0&&e+h<=c.width&&n+h<=c.height,d=_.some(e=>(e.kind===`content`||e.kind===`card`)&&XP(e.rect,l));u&&!d?_.push({id:`selfView`,kind:`selfView`,rect:l,layer:`overlay`,order:p?.zBase??100,fit:{kind:`natural`},region:p?.name??`pip`}):s.selfViewDropped=!0}}}return{tiles:_,degradations:s}},b={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},x=y(b),S=QP(x.tiles,i,a);for(let e of a.degradationLadder){if(S.length===0)break;if(e===`evict-cards`)for(;S.length>0&&b.extraEvictions<v.length;)b={...b,extraEvictions:b.extraEvictions+1},x=y(b),S=QP(x.tiles,i,a);else e===`drop-self-view`?x.tiles.some(e=>e.kind===`selfView`)&&(b={...b,selfViewDropped:!0},x=y(b),S=QP(x.tiles,i,a)):e===`collapse-replica`&&!b.replicaCollapsed&&x.tiles.some(e=>e.kind===`replica`)&&(b={...b,replicaCollapsed:!0},x=y(b),S=QP(x.tiles,i,a))}return x}function _F(e){if(!(e===void 0||e.length===0))return{...IP,...Object.fromEntries(e.map(e=>[e.id,e]))}}function vF(e,t,n,r){let i={width:Math.max(0,Math.round(e.container.widthPx)),height:Math.max(0,Math.round(e.container.heightPx))},a=zP(e,t,n),o=e.replica||e.selfView&&e.prefs.hideSelfView!==!0,s=RP(a.state,t,_F(r?.templates),void 0,o),{tiles:c,degradations:l}=gF(a,s,e,t,i,n);return{state:a.state,sizeClass:t,containerPx:i,templateId:s.id,tiles:c,degradations:l,suppressedPrefs:[...a.suppressedPrefs]}}var yF={compact:0,medium:1,expanded:2};function bF(e,t){return e.width===t.width&&e.height===t.height}function xF(e,t,n,r,i){let a=e.committedClass;if(a===null)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(bF(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(yF[t.width]-yF[a.width]),s=e.lastResolution?.containerPx.width??null;return o>1||s===null||Math.abs(Math.round(n)-s)>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&bF(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 SF=(e,t)=>e<t?-1:+(e>t);function CF(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(SF))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(SF)){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 wF(e,t,n,r,i){let a=xF(e,FP(t.container,r),t.container.widthPx,n,r),o=vF(t,a.committedClass,r,i);return{resolution:o,transitions:CF(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var TF=`0.1.9`,EF=NP,DF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),OF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function kF(e,t){return DF||e===!0||t===!0}function AF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,reportedHeights:o}){return{container:{widthPx:t.width,heightPx:Math.round(Math.min(t.height,t.visualViewportHeight??t.height))},replica:n.hasPersonaVideo,selfView:n.hasSelfView,presentation:n.isPersonaPresenting?{}:null,userShare:n.isScreenSharing?{}:null,cards:e.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...o[e.id]===void 0?{}:{naturalHeightPx:o[e.id]}})),prefs:{},callControls:r>0,callControlsVisible:i??!0,...a===void 0?{}:{callControlsRect:a}}}var jF=16;function MF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,enabled:o}){let s=N(EF),c=N(null),[l,u]=j({}),[d,f]=j(null),p=F((e,t)=>{o&&u(n=>n[e]===t?n:{...n,[e]:t})},[o]);M(()=>{u(t=>{let n=new Set(e.map(e=>e.id)),r={};for(let[e,i]of Object.entries(t))n.has(e)&&(r[e]=i);return Object.keys(r).length===Object.keys(t).length?t:r})},[e]);let m=P(()=>AF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,reportedHeights:l}),[e,t,n,r,i,a,l]);return M(()=>{if(!o)return;c.current===null&&(c.current=Date.now());let e=null,t=()=>{e=null;let n=Date.now()-(c.current??0),r=wF(s.current,m,n,PP);if(s.current=r.nextState,f(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(jF,PP.hysteresis.windowMs-i+jF))}};return t(),()=>{e!==null&&clearTimeout(e)}},[o,m]),{resolution:o?d?.resolution??null:null,inputs:o?m:null,transitions:o?d?.transitions??[]:[],reportedHeights:l,recordNaturalHeight:p}}function NF(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`)?`card-overflow`:null:`no-persona-video`:`flag-off`}var PF={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function FF(e,t,n){if(e===null)return PF;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return PF;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 IF(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function LF(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}var RF=`conversation.grid_status`,zF=6e4;function BF(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function VF(e,t){return{message_type:`conversation`,event_type:RF,conversation_id:e,properties:t}}function HF(e){return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function UF(e){let{send:t,enabledVia:n,engineVersion:r=TF,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=zF}=e,s=i(),c=!1,l,u=null,d=null,f=!1,p=null,m=0,h=0,g={},_=null,v=e=>{try{t(e)}catch{}},y=(e,t)=>({v:1,kind:e,engine_version:r,enabled_via:n,bail:t,..._}),b=e=>{d=null;let t=l;if(t!==void 0&&e===t)return;let n=i();t===null&&p!==null&&(m+=n-p,p=null),e===null?p=n:g[e]=(g[e]??0)+1,t!==void 0&&(h+=1),e===null&&!f?(f=!0,v({...y(`first_drive`,null),...t===void 0?{}:{prev_bail:t}})):t!==void 0&&v({...y(`transition`,e),prev_bail:t}),l=e},x=e=>{let t=i(),n=m+(p===null?0:t-p);v({...y(`summary`,l??u??null),driving_ms:Math.round(n),total_ms:Math.round(t-s),bail_counts:{...g},transitions:h,...e?{final:!0}:{}})},S=setInterval(()=>x(!1),o);return{update(e,t){if(c)return;t!==null&&(_=HF(t));let n=d===null?l:u;n!==void 0&&e===n||(u=e,d!==null&&clearTimeout(d),d=setTimeout(()=>b(e),a))},dispose(){c||(c=!0,clearInterval(S),d!==null&&(clearTimeout(d),b(u)),x(!0))}}}function WF({enabled:e,enabledVia:t,bail:n,resolution:r}){let i=hh(),a=Hg(),o=I(J_),s=N({daily:i,meetingState:a,conversation:o});s.current={daily:i,meetingState:a,conversation:o};let c=N(null);M(()=>{if(!e)return;let n=UF({enabledVia:t,send:e=>{try{let t=s.current;if(!t.daily||t.meetingState!==`joined-meeting`)return;let n=t.conversation?.session.peek()?.conversationId;if(!n)return;t.daily.sendAppMessage(VF(n,e),`*`)}catch{}}});return c.current=n,()=>{c.current=null,n.dispose()}},[e,t]),M(()=>{c.current?.update(n,r)},[n,r])}var GF=(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},KF=(e,t)=>({classGroupId:e,validator:t}),qF=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),JF=`-`,YF=[],XF=`arbitrary..`,ZF=e=>{let t=eI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return $F(e);let n=e.split(JF);return QF(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?GF(i,t):t:i||YF}return n[e]||YF}}},QF=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=QF(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(JF):e.slice(t).join(JF),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},$F=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?XF+r:void 0})(),eI=e=>{let{theme:t,classGroups:n}=e;return tI(n,t)},tI=(e,t)=>{let n=qF();for(let r in e){let i=e[r];nI(i,n,r,t)}return n},nI=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];rI(i,t,n,r)}},rI=(e,t,n,r)=>{if(typeof e==`string`){iI(e,t,n);return}if(typeof e==`function`){aI(e,t,n,r);return}oI(e,t,n,r)},iI=(e,t,n)=>{let r=e===``?t:sI(t,e);r.classGroupId=n},aI=(e,t,n,r)=>{if(cI(e)){nI(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(KF(n,e))},oI=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];nI(o,sI(t,a),n,r)}},sI=(e,t)=>{let n=e,r=t.split(JF),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=qF(),n.nextPart.set(t,i)),n=i}return n},cI=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,lI=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)}}},uI=`!`,dI=`:`,fI=[],pI=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),mI=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===dI){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(uI)?(c=s.slice(0,-1),l=!0):s.startsWith(uI)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return pI(t,l,c,u)};if(t){let e=t+dI,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):pI(fI,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},hI=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}},gI=e=>({cache:lI(e.cacheSize),parseClassName:mI(e),sortModifiers:hI(e),postfixLookupClassGroupIds:_I(e),...ZF(e)}),_I=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},vI=/\s+/,yI=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(vI),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){l=t+(l.length>0?` `+l:l);continue}if(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?_+uI:_,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},bI=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=xI(n))&&(i&&(i+=` `),i+=r);return i},xI=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=xI(e[r]))&&(n&&(n+=` `),n+=t);return n},SI=(e,...t)=>{let n,r,i,a,o=o=>(n=gI(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=yI(e,n);return i(e,a),a};return a=o,(...e)=>a(bI(...e))},CI=[],wI=e=>{let t=t=>t[e]||CI;return t.isThemeGetter=!0,t},TI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,EI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,OI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kI=/\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$/,AI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,NI=e=>DI.test(e),PI=e=>!!e&&!Number.isNaN(Number(e)),FI=e=>!!e&&Number.isInteger(Number(e)),II=e=>e.endsWith(`%`)&&PI(e.slice(0,-1)),LI=e=>OI.test(e),RI=()=>!0,zI=e=>kI.test(e)&&!AI.test(e),BI=()=>!1,VI=e=>jI.test(e),HI=e=>MI.test(e),UI=e=>!Q(e)&&!$(e),WI=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)),GI=e=>oL(e,uL,BI),Q=e=>TI.test(e),KI=e=>oL(e,dL,zI),qI=e=>oL(e,fL,PI),JI=e=>oL(e,mL,RI),YI=e=>oL(e,pL,BI),XI=e=>oL(e,cL,BI),ZI=e=>oL(e,lL,HI),QI=e=>oL(e,hL,VI),$=e=>EI.test(e),$I=e=>sL(e,dL),eL=e=>sL(e,pL),tL=e=>sL(e,cL),nL=e=>sL(e,uL),rL=e=>sL(e,lL),iL=e=>sL(e,hL,!0),aL=e=>sL(e,mL,!0),oL=(e,t,n)=>{let r=TI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},sL=(e,t,n=!1)=>{let r=EI.exec(e);return r?r[1]?t(r[1]):n:!1},cL=e=>e===`position`||e===`percentage`,lL=e=>e===`image`||e===`url`,uL=e=>e===`length`||e===`size`||e===`bg-size`,dL=e=>e===`length`,fL=e=>e===`number`,pL=e=>e===`family-name`,mL=e=>e===`number`||e===`weight`,hL=e=>e===`shadow`,gL=SI(()=>{let e=wI(`color`),t=wI(`font`),n=wI(`text`),r=wI(`font-weight`),i=wI(`tracking`),a=wI(`leading`),o=wI(`breakpoint`),s=wI(`container`),c=wI(`spacing`),l=wI(`radius`),u=wI(`shadow`),d=wI(`inset-shadow`),f=wI(`text-shadow`),p=wI(`drop-shadow`),m=wI(`blur`),h=wI(`perspective`),g=wI(`aspect`),_=wI(`ease`),v=wI(`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=()=>[NI,`full`,`auto`,...w()],E=()=>[FI,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,FI,$,Q]},FI,$,Q],ee=()=>[FI,`auto`,$,Q],te=()=>[`auto`,`min`,`max`,`fr`,$,Q],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],ie=()=>[NI,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[NI,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],k=()=>[NI,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,$,Q],oe=()=>[...b(),tL,XI,{position:[$,Q]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,nL,GI,{size:[$,Q]}],le=()=>[II,$I,KI],ue=()=>[``,`none`,`full`,l,$,Q],de=()=>[``,PI,$I,KI],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[PI,II,tL,XI],he=()=>[``,`none`,m,$,Q],ge=()=>[`none`,PI,$,Q],_e=()=>[`none`,PI,$,Q],ve=()=>[PI,$,Q],ye=()=>[NI,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[LI],breakpoint:[LI],color:[RI],container:[LI],"drop-shadow":[LI],ease:[`in`,`out`,`in-out`],font:[UI],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[LI],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[LI],shadow:[LI],spacing:[`px`,PI],text:[LI],"text-shadow":[LI],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,NI,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[WI],columns:[{columns:[PI,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:[FI,`auto`,$,Q]}],basis:[{basis:[NI,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[PI,NI,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,PI,$,Q]}],shrink:[{shrink:[``,PI,$,Q]}],order:[{order:[FI,`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":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],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:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...k()]}],"min-block-size":[{"min-block":[`auto`,...k()]}],"max-block-size":[{"max-block":[`none`,...k()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,$I,KI]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,aL,JI]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,II,Q]}],"font-family":[{font:[eL,YI,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":[PI,`none`,$,qI]}],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:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[PI,`from-font`,`auto`,$,KI]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[PI,`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:[FI,$,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:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},FI,$,Q],radial:[``,$,Q],conic:[FI,$,Q]},rL,ZI]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[PI,$,Q]}],"outline-w":[{outline:[``,PI,$I,KI]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,iL,QI]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,iL,QI]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[PI,KI]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,iL,QI]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[PI,$,Q]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":[PI]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[PI]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:he()}],brightness:[{brightness:[PI,$,Q]}],contrast:[{contrast:[PI,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,iL,QI]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,PI,$,Q]}],"hue-rotate":[{"hue-rotate":[PI,$,Q]}],invert:[{invert:[``,PI,$,Q]}],saturate:[{saturate:[PI,$,Q]}],sepia:[{sepia:[``,PI,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[PI,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[PI,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,PI,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[PI,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,PI,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[PI,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[PI,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,PI,$,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:[PI,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[PI,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[FI,$,Q]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"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`,...A()]}],"stroke-w":[{stroke:[PI,$I,KI,qI]}],stroke:[{stroke:[`none`,...A()]}],"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 _L({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=IP[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}=hF(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return L(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&L(`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=>L(`div`,{class:gL(`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:L(`span`,{class:gL(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[L(`span`,{children:e.region.name}),L(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>L(`div`,{class:gL(`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:L(`span`,{class:gL(`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 vL(e){return{version:1,buildSha:TF,engineVersion:TF,config:PP,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{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}},prefs:e.prefs,cards:e.cards}}}function yL({resolution:e,inputs:t,shadowing:n,bailReason:r}){let[i,a]=j(!1),o=N(null);if(M(()=>()=>{o.current!==null&&clearTimeout(o.current)},[]),e===null||t===null)return null;let s=()=>{let e=JSON.stringify(vL(t),null,2);o.current!==null&&clearTimeout(o.current),navigator.clipboard?.writeText(e).then(()=>{a(!0),o.current=setTimeout(()=>a(!1),1500)},()=>a(!1))},c=e.degradations.evictedCardIds;return L(`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:[L(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[L(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),L(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),L(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[L(`dt`,{class:`opacity-60`,children:`state`}),L(`dd`,{children:e.state}),L(`dt`,{class:`opacity-60`,children:`template`}),L(`dd`,{children:e.templateId}),L(`dt`,{class:`opacity-60`,children:`class`}),L(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),L(`dt`,{class:`opacity-60`,children:`container`}),L(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&L(k,{children:[L(`dt`,{class:`opacity-60`,children:`controls`}),L(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),L(`dt`,{class:`opacity-60`,children:`tiles`}),L(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),c.length>0&&L(k,{children:[L(`dt`,{class:`text-error opacity-80`,children:`dropped`}),L(`dd`,{class:`text-error`,children:c.join(`, `)})]}),r!==null&&L(k,{children:[L(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),L(`dd`,{class:`text-warning`,children:r})]})]}),L(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:s,children:i?`copied`:`copy envelope for playground`})]})}var bL={effect:PF,animate:!1},xL=zt(bL),SL={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function CL(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 wL(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&&CL(e.replica,t.replica)&&CL(e.selfView,t.selfView)&&CL(e.content,t.content)}var TL=new Map;function EL({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=kF(o,s)&&r!==void 0,l=r??SL,u=MF({instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),d=NF(u.resolution,l,c);WF({enabled:c,enabledVia:BF(DF,o===!0,s===!0),bail:d,resolution:u.resolution});let f=N(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(f.current=!0):f.current=!1;let p=!f.current,m=FF(u.resolution,d,p),h=N(PF),g=LF(h.current,m);M(()=>{h.current=m,wL(xL.peek().effect,m)||(xL.value={effect:m,animate:g})}),M(()=>()=>{xL.peek()!==bL&&(xL.value=bL)},[]);let _=u.resolution,v=P(()=>{if(d!==null||_===null)return TL;let e=new Map;for(let t of _.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e},[d,_]),y=OF?L(`div`,{class:`contents`,"data-grid-debug":!0,children:[L(_L,{resolution:u.resolution,inputs:u.inputs,config:PP,bailReason:d}),L(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:L(yL,{resolution:u.resolution,inputs:u.inputs,shadowing:d!==null,bailReason:d})})]}):null;return{cardRects:v,animate:g,recordNaturalHeight:u.recordNaturalHeight,debug:y}}var DL=[`left`,`top`,`width`,`height`].map(e=>`${e} ${vC}`).join(`, `);function OL(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!OC()?DL:`none`}}function kL({state:e}){return e.enabled?L(`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:[L(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),L(`dl`,{class:`mt-2 grid gap-2`,children:[L(AL,{label:`iframe`,value:e.iframeLifecycleState}),L(AL,{label:`post`,value:e.lastInteractionPostResult}),L(AL,{label:`context`,value:e.lastModelContextUpdate}),L(AL,{label:`error`,value:e.lastError}),L(jL,{label:`tool_call`,value:e.lastToolCall}),L(jL,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function AL({label:e,value:t}){return t?L(`div`,{children:[L(`dt`,{class:`font-semibold`,children:e}),L(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function jL({label:e,value:t}){return t===void 0?null:L(`div`,{children:[L(`dt`,{class:`font-semibold`,children:e}),L(`dd`,{children:L(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var ML=1e3,NL=5e3,PL=1200,FL=[2e3,6e3];async function IL(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),NL);try{await xn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function LL(e){return e instanceof _n&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function RL(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:dR(e).message})}function zL(e,t,n,r){(async()=>{let i;for(let a of FL){await new Promise(e=>setTimeout(e,a));try{await IL(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,LL(e))break}}RL(i,r)})()}var BL=2e3;function VL(e){return e.correct_answer===void 0?PL:BL}var HL=48,UL=`allow-scripts`,WL={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function GL(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 KL=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{GL(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 qL(e){for(let t of uS)if(e.some(e=>sR(e)===t))return t;return null}function JL({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=cR(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c}=mv(),{dataTheme:l,cssVars:u}=MP(),d=hh(),f=Hg(),[p,m]=j([]),[h,g]=rR(),[_,v]=j(()=>({enabled:n,iframeLifecycleState:`idle`})),y=EL({instances:p,viewport:g,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),b=F(e=>{v(t=>({...t,...e}))},[]),x=F((e,t=`*`)=>{if(f!==`joined-meeting`){b({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}d?.sendAppMessage(e,t)},[d,f,b]),S=P(()=>({theme:l.value===`dark`?`dark`:`light`,cssVars:u.value}),[l.value,u.value]);M(()=>{v(e=>e.enabled===n?e:{...e,enabled:n})},[n]),e_({onAppMessage:F(e=>{if(f!==`joined-meeting`){b({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=rC(e.data);if(!t)return;m(e=>SS(e,t)),b({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){b({iframeLifecycleState:`error`,lastError:dR(e).message})}},[f,b])});let C=p.map(e=>{let t=kS(e,g),n=t.display_mode===`fullscreen`?null:y.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),w=AS(C.map(({layout:e})=>e),g),T=[...C].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;M(()=>{e?.(w)},[e,w.active,w.side,w.video_shift_x,w.backdrop.type,w.safe_area?.x,w.safe_area?.y,w.safe_area?.width,w.safe_area?.height]);let E=qL(C.map(({layout:e})=>e));M(()=>{t?.(E)},[t,E]);let D=p.length>0||_.enabled;return L(`div`,{ref:h,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[D&&T&&L(`div`,{class:`absolute inset-0 bg-black/45`}),D&&C.map(({instance:e,layout:t,gridRect:n})=>L(XL,{slot:sR(t),safeAreaTop:w.safe_area?.y,frameWidth:g.width,...n?{gridRect:n,gridAnimate:y.animate}:{},children:r=>L(ZL,{availableHeight:r,client:c,gridDriven:n!==null,hostTheme:S,instance:e,layout:t,dimmed:!!(T&&T!==e.tool_call_id),onDebug:b,onNaturalHeightChange:y.recordNaturalHeight,onComplete:()=>{m(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{m(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:x})},e.id)),D&&L(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:L(kL,{state:_})}),y.debug]})}var YL=16;function XL({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=iR(),c=a(r?r.height:e===`full`?void 0:s);if(r)return L(`div`,{ref:o,class:`pointer-events-auto absolute`,style:OL(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:L(`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-YL*2):void 0;return L(`div`,{ref:o,class:oR(e),style:{top:r,bottom:`72px`,maxWidth:i},"data-canvas-slot":e,children:L(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return L(`div`,{ref:o,class:oR(e),"data-canvas-slot":e,children:L(`div`,{class:`contents`,children:c})})}function ZL({availableHeight:e,client:t,gridDriven:n=!1,hostTheme:r,instance:i,layout:a,dimmed:o,onDebug:s,onComplete:c,onDisplayModeChange:l,onNaturalHeightChange:u,sendAppMessage:d}){let f=N(null),p=N(null),m=N(e),h=N(320),g=N(r),_=N(i),v=N(a),y=N(-1),b=N(c),x=N(l),S=N(u),C=N(d),[w,T]=j(720);M(()=>{_.current=i},[i]),M(()=>{h.current=w,p.current?.setHostContext(tR(_.current,g.current,v.current,m.current,w))},[w]),M(()=>{m.current=e;let t=eR(r,f.current);g.current=t,p.current?.setHostContext(tR(_.current,t,v.current,e,h.current))},[e,r]),M(()=>{v.current=a,p.current?.setHostContext(tR(_.current,g.current,a,e,h.current))},[e,a]),M(()=>{b.current=c,x.current=l,S.current=u,C.current=d},[c,l,u,d]),M(()=>{let e=f.current;if(!e)return;let n=!1,r=null,a=null,o=null,c=null,l=new URL(i.canvas_config.sandbox_url,globalThis.location.href).href,u=e=>{n||s({iframeLifecycleState:`error`,lastError:dR(e).message})},d=()=>{if(n||!a)return;let e=_.current,t=DS(e,a);a=null,C.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),s({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},w=()=>{if(r)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let f=new AP(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:tR(i,eR(g.current,e),v.current,m.current,h.current)});r=f,p.current=f,f.oninitialized=()=>{n||(s({iframeLifecycleState:`ready`}),y.current=_.current.revision,f.sendToolInput({arguments:_.current.arguments}).catch(u))},f.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let t=Math.min(Math.max(e,HL),720);T(t),S.current(_.current.id,t)}},f.onmessage=async e=>{let r=CS(e),i=ES(e);if(!r){if(i){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return s({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let a=_.current,o=(()=>{try{let e=wS(a,r);return{interaction:e,request:iC(e)}}catch(e){return{error:e}}})();if(`error`in o){let e=dR(o.error).message;return s({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:l,request:u}=o,d=!0;try{await IL(t,l.conversation_id,u.body)}catch(e){d=!1,LL(e)?RL(e,s):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),s({lastInteractionPostResult:`failed_open`,lastError:dR(e).message}),zL(t,l.conversation_id,u.body,s))}if(n)return{};if(i)try{C.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:a.conversation_id,properties:{text:i}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),s({lastError:dR(e).message})}return d&&s({lastInteractionPostResult:`success`,lastError:void 0}),TS(l)&&(l.type===`submit`?(c&&clearTimeout(c),c=setTimeout(()=>{c=null,n||b.current()},VL(a.arguments))):b.current()),{}},f.onupdatemodelcontext=async e=>(a=e,o||=setTimeout(()=>{o=null,d()},ML),{}),f.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return x.current(t),v.current={...v.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:v.current.viable_slot},f.setHostContext(tR(_.current,g.current,v.current,m.current,h.current)),{mode:t}},f.connect(new KL(e)).then(()=>void 0).catch(u)};s({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),i.canvas_config.sandbox_url,e.src=i.canvas_config.sandbox_url;let E=()=>{w()};return e.addEventListener(`load`,E),w(),()=>{o&&=(clearTimeout(o),null),c&&=(clearTimeout(c),null),d(),n=!0,e.removeEventListener(`load`,E),p.current=null,s({iframeLifecycleState:`closed`}),r&&cS(r)}},[t,i.id,i.canvas_config.sandbox_url,s]),M(()=>{i.revision!==0&&(i.revision<=y.current||(y.current=i.revision,p.current?.sendToolInput({arguments:i.arguments}).catch(e=>{s({iframeLifecycleState:`error`,lastError:dR(e).message})})))},[i.arguments,i.revision,s]);let E=a.viable_slot===`full`||a.display_mode===`fullscreen`,D=E?null:nR(w,e),ee=D?.placeholderStyle,te=D?.cardStyle,ne=E?{height:`100%`}:D?.iframeStyle??{height:`${w}px`},re=[`pointer-events-auto w-full overflow-hidden rounded-lg border border-base-300 bg-base-100 shadow-xl transition-[opacity,transform]`,E?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,o?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),O=WL[i.canvas_config.component]??UL,ie=L(`div`,{class:re,style:te,"data-canvas-card":a.viable_slot,children:L(`iframe`,{ref:f,title:`${i.canvas_config.component} ${i.canvas_config.component_version}`,class:E?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:O,style:ne})});return E?ie:L(`div`,{class:`block w-full`,style:ee,children:ie})}var QL=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function $L(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of QL){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function eR(e,t){let n=$L(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function tR(e,t,n,r,i){let a=aC(t,n),o=n.viable_slot===`full`||n.display_mode===`fullscreen`,s=o?void 0:lR(r),c=o?1:nR(i??0,r)?.displayScale??1;return{...e.canvas_config.host_context,...a,containerDimensions:{...uR(a.containerDimensions)?a.containerDimensions:{},...s===void 0?{}:{maxHeight:s},displayScale:c}}}function nR(e,t){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let n=Math.min(e,720);if(n<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${n}px`}};let r=t/n;return{displayScale:r,placeholderStyle:{height:`${n*r}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${n}px`,transform:`scale(${r})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${n}px`}}}function rR(){let e=N(null),[t,n]=j(()=>aR(null));return M(()=>{let t=()=>n(t=>{let n=aR(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 iR(){let e=N(null),[t,n]=j();return M(()=>{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 aR(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 oR(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} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function sR(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function cR(){return!1}function lR(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function uR(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dR(e){return e instanceof Error?e:Error(String(e))}var fR=1e4;function pR(e,t=fR){let[n,r]=j(!1),i=N(!1);return M(()=>{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 mR(e){let t=$h(),n=p_(t??``),r=!d_(t??``).isOff,i=Jx(e),a=i.phase===`ready`?i.replicaId:``,o=d_(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 P(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function hR(e,t,n){let[r,i]=j(!0);return M(()=>{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 gR(e,t,n,r,i){let[a,o]=j(void 0);return M(()=>{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 _R=1e4;function vR({onTimeout:e,timeoutMs:t=_R,active:n=!0}){let r=qx().length>0,[i,a]=j(!1),o=N(e);return M(()=>{o.current=e},[e]),M(()=>{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 yR(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function bR({onShutdown:e}){let t=N(e);M(()=>{t.current=e},[e]),e_({onAppMessage:F(e=>{yR(e?.data)&&t.current()},[])})}var xR=mn(`PiP`),SR=360,CR=280;function wR(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function TR(e){let{enabled:t,active:n}=e,[r,i]=j(null),a=wR(),o=I(Kv),s=F(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=F(async()=>{if(a&&!(!t||!n)&&!(r&&!r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:SR,height:CR}),t=Ue.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){xR.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return M(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){xR.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){xR.warn(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),M(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),M(()=>()=>{r&&!r.closed&&r.close()},[r]),M(()=>{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 ER=zt(null),DR={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},OR=ga(({id:e,showAudioWave:t=!0})=>{let n=p_(e).isOff;return L(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[L(pg,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&L(`div`,{class:`absolute bottom-2 right-2`,children:L(Bx,{id:e})})]})}),kR=ga(()=>{let e=$h(),{isScreenSharing:t}=$b(),n=qx()[0];return L(k,{children:[t&&n&&L(OR,{id:n}),e&&L(OR,{id:e,showAudioWave:!1})]})}),AR=ga(()=>L(`div`,{class:`absolute top-4 left-4 flex flex-col items-end gap-2 z-20`,children:L(kR,{})})),jR=ga(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>L(k,{children:[L(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&L(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:OL(i.content,a),children:L(pg,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&L(`div`,{class:gL(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:OL(i.replica,a),children:L(Qx,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),MR=ga(()=>{let{effect:e,animate:t}=xL.value,n=$h();return n===null||e.selfView===null?null:L(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:OL(e.selfView,t),children:L(pg,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),NR=ga(()=>{let e=IF(xL.value.effect);return e===`hidden`?null:L(e===`engine`?MR:AR,{})}),PR=ga(()=>{let e=qx()[0];return e?L(dg,{sessionId:e}):null}),FR=ga(e=>L(k,{children:[L(PR,{}),L(IR,{...e})]})),IR=ga(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=xL.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?L(Rx,{}):i.phase===`connecting`?L(Lx,{}):e&&!s?L(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:L(Wx,{sessionId:i.replicaId})}):c.effect.driving?L(jR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate}):s?L(RC,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):L(LR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),LR=ga(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>L(IC,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:VR,personaMode:`auto`,renderedSlot:o,fill:i=>L(Qx,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),RR=ga(({items:e})=>{let[t,n]=j(!1),r=N(null);return M(()=>{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]),L(`div`,{ref:r,class:`relative`,children:[L(`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:L(fb,{name:`more`})}),t&&L(`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})]})}),zR=ga(({items:e})=>e.length<=1?L(k,{children:e}):L(RR,{items:e})),BR=ga(({onLeave:e})=>{let t=Hg(),{config:n}=mv(),{session:r,end:i}=wx(),a=$h(),o=N(null),s=I(ry)?.frameRef??o,[c,l]=j(!1),u=Mb()===`full-screen`,[d,f]=j(!1),[p,m]=j(DR),[h,g]=j(null),_=pR(h!==null&&!c&&!u),v=N(null),y=N(null),b=r.value?.conversationUrl,x=n.value.customization.conversation,S=r.value?.magicGrid===!0,C=kF(x.magic_grid,S),w=hR(v,C,b),T=gR(v,y,72,C,b),E=x.modality===`audio`,D=mR(E),ee=x.modality===`chat`,te=x.modality===`video`,ne=x.enable_chat,re=x.enable_closed_captions,O=x.enable_picture_in_picture,{pipWindow:ie}=TR({enabled:O&&!ee,active:t===`joined-meeting`});M(()=>()=>{i()},[i]);let{camera:ae,requestCamera:k}=Rv(),{isCamMuted:A}=Zb(),oe=ae.isGranted&&!A;M(()=>{te&&t===`joined-meeting`&&(ER.value=oe)},[te,t,oe]);let se=N(te&&!a&&ER.value===!0);M(()=>{t===`joined-meeting`&&se.current&&(se.current=!1,k())},[t,k]),M(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),M(()=>{let e=()=>{let e=s.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;l(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ce=F(()=>{let e=s.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);F(()=>{f(e=>!e)},[]);let le=F(()=>{i()},[i]);if(vR({active:!ee&&t===`joined-meeting`,onTimeout:le}),bR({onShutdown:le}),!b)return null;if(ee)return L(jx,{defaultOpen:!0,children:L(`div`,{class:`cvi-call-surface absolute inset-0`,children:L(Fx,{docked:!0,headerAction:L(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:le,"aria-label":`Leave conversation`,children:L(fb,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let ue=[L(Cx,{compact:!0},`screen-share`)];ne&&ue.push(L(Nx,{compact:!0},`chat`));let de=t===`left-meeting`;return L(Ex,{children:L(jx,{children:L(ox,{children:[L(`div`,{class:`cvi-call-surface absolute inset-0${E?``:` cvi-video-surface`}`,ref:v,children:[L(`div`,{class:`relative w-full h-full z-[5]`,children:[L(FR,{isAudioOnly:E,presence:D,canvasLayoutEffect:p,canvasRenderedSlot:h}),!E&&L(NR,{}),L(JL,{debugEnabled:d,callPresence:D,callControlsVisible:w,callControlsRect:T,gridConfigEnabled:x.magic_grid,gridStartEnabled:S,onLayoutEffectChange:m,onRenderedSlotChange:g}),!u&&L(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":de,"data-pinned":_,children:L(zx,{active:c,onToggle:ce,nudge:_,compact:!0})})]}),L(Fx,{}),L(kx,{}),L(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":de,"aria-hidden":de,children:L(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":de,ref:y,children:[L(vx,{level:!0}),!E&&L(bx,{}),re&&L(Ox,{}),L(zR,{items:ue}),L(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:le,"aria-label":`Leave call`,children:L(fb,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),ie&&Na(L(Xx,{onLeave:le}),ie.document.body)]})})})});function VR(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 HR({message:e,class:t}){return L(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[L(`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}),L(`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:L(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}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 WR=ga(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=hh(),{config:a}=mv(),{localSessionId:o,isCamMuted:s}=Zb(),{mic:c,camera:l,requestMic:u,requestCamera:d}=Rv(),f=a.value.customization.conversation.modality===`video`;M(()=>{u()},[]);let p=c.isGranted,m=N(!1);M(()=>{!f||!p||m.current||l.isGranted||l.isBlocked||(m.current=!0,d())},[f,p,l.isGranted,l.isBlocked,d]);let h=f&&p&&!l.isGranted,g=UR(e,c.status,h);return L(ox,{children:L(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[l.isGranted&&!s?L(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:L(pg,{type:`video`,sessionId:o??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):L(`div`,{class:`absolute inset-0 flex items-center justify-center text-base-content/40`,children:L(fb,{name:`face-smile`,size:`7rem`,"aria-label":`Camera off`})}),L(`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:[g&&L(HR,{message:g,class:`relative`}),L(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[L(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[L(vx,{level:!0}),f&&L(bx,{})]}),L(Hb,{class:`btn-accent `,loading:t,disabled:!p,onClick:n,children:e?.join??`Join`}),L(`button`,{type:`button`,class:`btn btn-control ${c.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:L(fb,{name:`cancel`})})]})]})]})})}),GR=`Password required`,KR=`Enter the password to start this conversation.`,qR=`Password`,JR=`Continue`;function YR({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=j(``),o=ct();return L(`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":`${o}-title`,children:L(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();!r||n||e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:L(`div`,{class:`card-body gap-3`,children:[L(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??GR}),L(`p`,{class:`text-sm text-base-content/70`,children:t?.description??KR}),L(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??qR,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&L(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),L(Hb,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??JR})]})})})}function XR({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 ZR({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=mv(),o=Mb()===`full-screen`,s=I(J_),c=_b(i.value),l=c.btn_title??e?.fallback_button??`Start the conversation`,u=i.value.customization.terms_content?.trim()??``,d=i.value.customization.terms_enabled===!0,f=u.length>0,p=f&&d,m=P(()=>p&&w_(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=ct(),[b,x]=j(m),S=n||p&&!b||v;return L(Vb,{title:c.title,description:c.description,overlay:v&&s?L(YR,{onSubmit:s.setPassword}):null,children:[L(`div`,{class:`relative`,children:[r&&L(HR,{message:XR(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),L(Gb,{onClick:()=>{p&&b&&!m&&D_(a,u),t()},disabled:S,loading:n,children:l})]}),f&&L(`div`,{class:`max-w-xs text-center`,children:h?L(`label`,{for:y,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[L(`input`,{id:y,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:b,onChange:e=>x(e.target.checked)}),L(`span`,{class:`leading-snug`,children:u})]}):L(`p`,{class:`text-xs leading-snug text-white/70`,children:u})})]})}function QR(...e){for(let t of e){let e=t?.trim();if(e)return e}}function $R(){let{config:e}=mv(),{haircheck:t}=e.value.customization;return P(()=>({prompt:QR(t.permission_request_description,t.permission_request_title),ready:QR(t.permission_granted_description,t.permission_granted_title),denied:QR(t.permission_denied_description,t.permission_denied_title),join:QR(t.join_button),cancel:QR(t.cancel_btn)}),[t])}function ez({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=$R();switch(e.state){case`idle`:return L(ZR,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return L(WR,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return L(BR,{onLeave:()=>e.leave()});case`ended`:return L(Xb,{isStarting:e.isStarting,onRestart:()=>{e.start()}});case`unavailable`:return L(Ab,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}var tz=Ae(null);function nz({children:e}){let{config:t}=I(_i),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=on(r===`start-expanded`||r===`always`),a=on(n?.variant??`full`),o=on(n?.position??`bottom-right`),s=on(r),c=on(n?.avatar?.type??`orb`),l=N(r);pn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=F(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=F(()=>{i.value=!0},[i]),f=F(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=I(fv);pn(()=>{p&&(p.hostVisible.value=i.value)});let m=I(h_),h=m?.flowSignal.value??`idle`,g=m?.isStarting??!1;M(()=>{(g||h===`haircheck`||h===`call`)&&(i.value=!0)},[g,h,i]);let _=I(Uv)?.shadowHost.value??null;M(()=>{if(_)return Object.assign(_,{open:d,close:f}),()=>{delete _.open,delete _.close}},[_,d,f]);let v=P(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return L(tz.Provider,{value:v,children:e})}function rz(){let{config:e}=mv(),t=e.value.customization.branding;return e.value.show_tavus_branding!==!1&&!t?.hide_tavus_badge?L(iz,{}):t?.logo||t?.text?L(az,{logo:t.logo,text:t.text}):null}function iz(){let{isDark:e}=MP(),t=e.value?`white`:`#140206`;return L(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[L(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[L(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),L(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),L(`span`,{children:[`Powered by `,L(`span`,{class:`underline`,children:`Tavus`})]})]})}function az({logo:e,text:t}){return L(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?L(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?L(`span`,{children:t}):null]})}var oz={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function sz(){let{config:e}=mv(),t=e.value.customization.widget?.text;return P(()=>({title:t?.title||oz.title,btn_title:t?.btn_title||oz.btn_title}),[t])}function cz(){let e=I(tz);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var lz={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},uz={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function dz({size:e=`md`,className:t=``}){let{avatarType:n}=cz(),{config:r}=mv(),i=gb(r.value);return(_b(r.value).background.type===`replica`||n.value===`image`)&&i?L(`div`,{class:`relative ${lz[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:L(xb,{replica:i})}):L(`div`,{class:`relative ${lz[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:L(`span`,{class:`${uz[e]} rounded-full bg-primary animate-pulse`})})}function fz({variant:e}){let{toggle:t}=cz(),n=sz();return e===`tiny`?L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:L(dz,{size:`lg`})}):e===`compact`?L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[L(dz,{size:`md`}),L(`span`,{class:`flex flex-col gap-0.5`,children:[L(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),L(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[L(`div`,{class:`flex items-center gap-2.5`,children:[L(dz,{size:`md`}),L(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),L(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[L(fb,{name:`cam`,size:16}),L(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var pz=`tavus:widget:greeting-dismissed`;function mz({anchor:e}){let t=sz(),{variant:n,expand:r}=cz(),[i,a]=j(!1);M(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(pz)===`1`)return}catch{}a(!0)}},[n]);let o=F(e=>{e.stopPropagation();try{sessionStorage.setItem(pz,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return L(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[L(`p`,{class:`leading-snug pr-3`,children:t.title}),L(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),L(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function hz(){let e=I(Uv);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var gz=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,_z=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,vz=`p-1 flex-1 min-h-0`,yz=`p-1 flex-1 min-h-0`;function bz({variant:e,children:t,onClose:n,fullscreen:r}){let{expandable:i}=cz(),a=i.value!==`always`;return r?L(`div`,{class:_z,children:[L(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&L(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:L(fb,{name:`close`,size:14})})}),L(`div`,{class:yz,children:t}),L(`div`,{class:`flex justify-end px-2.5`,children:L(rz,{})})]}):L(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[L(`div`,{class:`${gz} flex-1 overflow-hidden`,children:[L(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&L(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:L(fb,{name:`close`,size:14})})}),L(`div`,{class:vz,children:t})]}),L(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:L(rz,{})})]})}var xz=mn(`Widget`),Sz=`1rem`,Cz=480;function wz(e,t,n){let r=e.state===`call`,i=r||e.state===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t(),n()}function Tz(){return typeof window>`u`?!1:window.innerWidth<=Cz}function Ez(e){switch(e){case`bottom-right`:return{bottom:Sz,right:Sz};case`bottom-left`:return{bottom:Sz,left:Sz};case`top-right`:return{top:Sz,right:Sz};case`top-left`:return{top:Sz,left:Sz};case`top`:return{top:Sz,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:Sz,left:`50%`,transform:`translateX(-50%)`}}}var Dz=[`top`,`bottom`,`left`,`right`,`transform`];function Oz(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function kz(){let{config:e,initError:t}=mv(),n=sz(),{expanded:r,position:i,variant:a,collapse:o}=cz(),{end:s}=wx(),{shadowHost:c}=hz(),l=jb(),u=on(Tz());M(()=>{if(typeof window>`u`)return;u.value=Tz();let e=()=>{u.value=Tz()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let d=P(()=>({fallback_button:n.btn_title}),[n.btn_title]),f=F(()=>{wz(l,s,o)},[l,s,o]);if(pn(()=>{let e=c.value,t=i.value,n=r.value,a=n&&u.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=Ez(t);for(let t of Dz)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=u.value?`true`:`false`}}),t.value)return xz.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return xz.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=Oz(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return L(`div`,{class:`flex flex-col`,children:[L(`div`,{class:t,children:[L(mz,{anchor:e}),L(fz,{variant:a.value})]}),L(`div`,{class:`flex ${n} pt-1.5`,children:L(rz,{})})]})}return e.value.is_available===!1?L(bz,{variant:a.value,fullscreen:u.value,onClose:f,children:L(iy,{children:L(Ab,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):L(bz,{variant:a.value,fullscreen:u.value,onClose:f,children:L(iy,{children:L(ez,{flow:l,welcomeText:d,onUnavailableCancel:()=>l.restart()})})})}var Az=`:host {
163
+ - "app": Tool callable by the app from this server only`),csp:qk().optional(),permissions:qk().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 EP=X({method:Z(`ui/download-file`),params:X({contents:Y(Yk([eN,tN])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),DP=X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(nN).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:pP.optional().describe(`CSP configuration from resource metadata.`),permissions:mP.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:dN.describe(`Standard MCP tool execution result.`)});var OP=X({toolInfo:X({id:jj.optional().describe(`JSON-RPC id of the tools/call request.`),tool:cN.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:cP.optional().describe(`Current color theme preference.`),styles:_P.optional().describe(`Style configuration for theming the app.`),displayMode:lP.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(lP).optional().describe(`Display modes the host supports.`),containerDimensions:Yk([X({height:Vk().describe(`Fixed container height in pixels.`)}),X({maxHeight:Yk([Vk(),Wk()]).optional().describe(`Maximum container height in pixels.`)})]).and(Yk([X({width:Vk().describe(`Fixed container width in pixels.`)}),X({maxWidth:Yk([Vk(),Wk()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
164
+ 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:Yk([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:Uk().optional().describe(`Whether the device supports touch input.`),hover:Uk().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:Vk().describe(`Top safe area inset in pixels.`),right:Vk().describe(`Right safe area inset in pixels.`),bottom:Vk().describe(`Bottom safe area inset in pixels.`),left:Vk().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:OP.describe(`Partial context update containing only changed fields.`)});var kP=X({method:Z(`ui/update-model-context`),params:X({content:Y(nN).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:Qk(J(),Kk().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),AP=X({method:Z(`ui/initialize`),params:X({appInfo:Kj.describe(`App identification (name and version).`),appCapabilities:SP.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:Kj.describe(`Host application identification and version.`),hostCapabilities:xP.describe(`Features and capabilities provided by the host.`),hostContext:OP.describe(`Rich context about the host environment.`)}).passthrough();var jP=[sP],MP=class extends oP{_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:hP,sandboxready:fP,initialized:CP,requestteardown:bP,loggingmessage:yN};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(AP,e=>this._oninitialize(e)),this.setRequestHandler(nM,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(wP,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(DP,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(dP,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(EP,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(wP,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(kP,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(pN,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(DN,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(kM,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(jM,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(FM,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(KM,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:jP.includes(t)?t:sP,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];NP(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},vP,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},dN,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},uN,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},dN,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(mN,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},AM,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},MM,{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(LM,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},qM,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(aN,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function NP(e,t){return JSON.stringify(e)===JSON.stringify(t)}function PP(){let e=I(Kv);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var FP={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},IP={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},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 LP(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`}}var RP={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:0},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`stage`,x:{fraction:0},y:{fraction:.38},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.76},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"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-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-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.78},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.8},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}]}},zP={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`}}};function BP(e,t,n=RP,r=zP,i=!0){let a=r[e][t.width][t.height],o=n[a];if(!o)throw Error(`Template matrix references missing template id: ${a}`);if(!i&&o.soloVariant!==void 0){let e=n[o.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${o.soloVariant}`);return e}return o}function VP(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 HP={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}},UP={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},WP=`canvas.`;function GP(e){return e.startsWith(WP)?e.slice(7):e}function KP(e,t){let n=GP(e),r=HP[n]??UP,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(HP);function qP(e,t,n){let r=KP(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 JP(e,t){let n=GP(e);return HP[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:KP(e,t).hardMinHeightPx}function YP(e,t){return KP(e,t).minWidthPx}function XP(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 ZP(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 QP(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 $P(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 eF(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&$P(i.rect,e.rect),o=e=>e.kind===`card`&&e.layer===`overlay`&&e.sheet===!0;for(let a of e){let e=a.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||r.push({kind:`bounds`,tileId:a.id,message:`${a.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)&&r.push({kind:`bounds`,tileId:a.id,message:`${a.id} rect exceeds the container`}),a.layer===`overlay`&&a.kind!==`selfView`&&!o(a)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`only selfView or a sheet card may ride the overlay layer, got ${a.kind}`}),a.kind===`selfView`&&a.layer===`overlay`&&i!==void 0&&!$P(i.rect,a.rect)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`selfView escapes the replica rect`}),(a.kind===`content`||a.kind===`replica`)&&(e.width<48||e.height<48)&&r.push({kind:`degenerate-surface`,tileId:a.id,message:`${a.kind} tile ${a.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),a.kind===`card`){a.fit.kind===`scaled`&&(a.fit.factor<n.card.minDisplayScale||a.fit.factor>1)&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} scaled to ${a.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=a.component===void 0?void 0:JP(a.component,n.card.componentOverrides);t!==void 0&&e.height<t&&a.fit.kind!==`scroll`&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below its ${t}px hard min without scroll`});let i=a.component===void 0?void 0:YP(a.component,n.card.componentOverrides);i!==void 0&&e.width<i&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.width}px is below its ${i}px min width`})}}for(let t of e)if(!(t.kind!==`content`&&t.kind!==`card`))for(let n of e)n.id!==t.id&&QP(t.rect,n.rect)&&(a(n)&&!o(t)||o(n)&&!o(t)||o(t)&&n.layer===`grid`||r.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));return r}var tF=(e,t,n)=>Math.min(n,Math.max(t,e));function nF(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 rF(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function iF(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 aF(e,t,n,r,i,a){let o=i??nF(n,r).cardsPad,s=Math.round(a??n.rail.widthPx),c=Math.max(1,Math.min(t-2*o,s-2*o));return{innerW:c,entries:e.map(e=>{let t=qP(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:c,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:XP(t.naturalHeightPx,n)}})}}function oF(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function sF(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 cF(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>oF(n===`x`?e.x:e.y,o)-oF(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?sF(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)):tF(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(tF(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,a=_[r+1]??i;return{region:e,rect:n===`x`?{x:i,y:0,width:a-i,height:t.height}:{x:0,y:i,width:t.width,height:a-i}}})}function lF(e,t,n){let r=t.width,i=t.height,a=sF(e,e.width,n,`width`),o=sF(e,e.x,n,`x`),s=tF(Math.round(oF(o,r)),0,r),c=tF(Math.round(oF(e.y,i)),0,i);return{x:s,y:c,width:tF(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:tF(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function uF(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))?cF(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?cF(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:lF(e,t,n)}))}function dF(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}=aF(iF(r.cards,u,c.eviction.policy),i.width,c,l,void 0,c.card.stackMaxWidthPx),h=m.reduce((e,t)=>t.constraints.minWidthPx>p?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:g}=nF(c,l),_=oF(f.y,i.height),v=d.every(e=>oF(e.y,i.height)<=_),y=v?Math.max(0,o-s):0,b=!v&&h>0;return{neededPx:h+2*g+(b?0:y),capPx:Math.round(c.card.stackBandMaxFraction*a.height),...b&&{shrinkToContent:b}}}function fF(e,t,n,r){if(t===null)return;let i=e.regions.filter(e=>e.zBase<100);if(!(i.length>1&&i.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let a=i.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),o=i.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!a||!o)return;let s=r.content.stackedAspect;if(!(!Number.isFinite(s)||s<=0))return{maxPx:Math.round(n.width/s)}}var pF=`bottom-left`;function mF(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 hF(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 gF(e,t,n){return t===null||!QP(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function _F(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 vF(e,t,n){let r=e;for(let e of t.filter(_F).sort((e,t)=>t.y-e.y))r=gF(r,e,n);return r}function yF(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 bF(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?1:0)+(t.contentKind===null?0:1)+ +(n.cards.length>0)>=2?nF(a,r.width).surfacePad:0,u={width:Math.max(0,i.width-2*l),height:Math.max(0,i.height-2*l)},d=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null);return{regions:uF(e,u,a,dF(e,t.state,t.contentKind,n,u,i,o,l,a,r.width,rF(t.state,r,a)),fF(e,t.contentKind,u,a)).map(e=>({...e,rect:{...e.rect,x:e.rect.x+l,y:e.rect.y+l}})).map(e=>d===null||!e.region.accepts.includes(`card`)||!(e.rect.x<d.x+d.width&&e.rect.x+e.rect.width>d.x)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,s-e.rect.y))}}),surfacePad:l,controlsInset:o,bandTopY:s}}function xF(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u}=bF(t,e,n,r,i,a),d=s.find(e=>e.region.accepts.includes(`replica`)),f=s.find(e=>e.region.accepts.includes(`content`)),p=s.find(e=>e.region.accepts.includes(`card`)),m=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),h=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`card`)),g=Math.round(a.rail.gutterPx),_=Math.round(a.pip.gapPaddingPx),v=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),y=rF(e.state,r,a),b=p?iF(n.cards,y,a.eviction.policy):h===void 0?[]:iF(n.cards,1,a.eviction.policy),x=s=>{let y={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1},x=[],S=null,C=!1,w=d!==void 0&&d.region.accepts.includes(`selfView`);if(d&&w&&(n.replica||o)){let e=d.rect,t=o&&!s.selfViewDropped;o&&s.selfViewDropped&&(y.selfViewDropped=!0);let r=+!!n.replica+ +!!t,i=Math.round(a.insets.participantsPadPx),c=Math.max(1,e.width-2*i),l=Math.round(c*9/16),u=e=>r*e+(r-1)*i;u(l)>e.height&&(l=Math.max(1,Math.floor((e.height-(r-1)*i)/r)),c=Math.min(Math.max(1,e.width-2*i),Math.round(l*16/9))),l=Math.max(l,Math.min(48,e.height)),c=Math.max(c,Math.min(48,e.width));let f=e.x+Math.round((e.width-c)/2),p=e.y+Math.round((e.height-u(l))/2);if(n.replica){let e={x:f,y:p,width:c,height:l};if(s.replicaCollapsed){let t=Math.min(l,Math.max(64,Math.round(l*.25)));e={...e,height:t},y.replicaCollapsed=!0}S={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name},x.push(S),p+=l+i}t&&(x.push({id:`selfView`,kind:`selfView`,rect:{x:f,y:p,width:c,height:l},layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name}),C=!0)}else if(d&&(n.replica||o)){let e=!n.replica,t=d.rect;if(!e&&s.replicaCollapsed){let e=Math.min(t.height,Math.max(64,Math.round(t.height*.25)));t={...t,height:e},y.replicaCollapsed=!0}let r={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:t,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name};x.push(r),e?C=!0:S=r}e.contentKind!==null&&f&&x.push({id:`content`,kind:`content`,rect:f.rect,layer:`grid`,order:f.region.zBase,fit:{kind:`natural`},region:f.region.name});let T=yF(b,s.extraEvictions,a.eviction.policy),E=new Set(T.map(e=>e.id));if(y.evictedCardIds=v.filter(e=>!E.has(e.id)).map(e=>e.id),p&&T.length>0){let e=p.rect,n=t.regions.filter(e=>e.zBase<100),i=n.length>1&&n.every(e=>`fraction`in e.width&&e.width.fraction===1),{innerW:o,entries:s}=aF(T,e.width,a,r.width,void 0,i?a.card.stackMaxWidthPx:void 0),c=e.x+Math.round((e.width-o)/2),l=e.height-g*(s.length-1),u=s.reduce((e,t)=>e+t.clampedHeightPx,0),d;if(u<=l)d=s.map(e=>e.clampedHeightPx);else{let e=l>0?l/u:0;d=s.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=d.reduce((e,t)=>e+t,0)-Math.max(0,l);for(;t>0;){let e=-1;for(let t=0;t<d.length;t++){let n=d[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(d[e]??0))&&(e=t)}if(e===-1)break;d[e]=(d[e]??0)-1,--t}}let f=d.reduce((e,t)=>e+t,0)+g*(s.length-1),m=e.y+Math.max(0,Math.round((e.height-f)/2));s.forEach((t,n)=>{let r=Math.min(m,e.y+e.height),i=Math.max(0,Math.min(d[n]??0,e.y+e.height-r)),s=ZP(t.clampedHeightPx,i,a),l=t.constraints.hardMinHeightPx;l!==void 0&&i<l&&s.kind!==`scroll`&&(s={kind:`scroll`}),x.push({id:t.card.id,kind:`card`,component:t.card.component,cardSizeClass:t.constraints.sizeClass,rect:{x:c,y:r,width:o,height:i},layer:`grid`,order:p.region.zBase+n,fit:s,region:p.region.name}),m=r+i+g})}let D=null;if(p===void 0&&h!==void 0&&T.length>0){let e={width:Math.max(0,i.width-2*c),height:Math.max(0,i.height-2*c)},t=lF(h,e,a),n={x:t.x+c,y:t.y+c,width:t.width,height:Math.max(0,Math.min(t.height,u-(t.y+c)))},{innerW:o,entries:s}=aF(T,n.width,a,r.width,0,a.card.stackMaxWidthPx),l=s[0];if(l!==void 0){let e=n.x+Math.round((n.width-o)/2),t=Math.max(0,Math.min(l.clampedHeightPx,n.height)),r=ZP(l.clampedHeightPx,t,a),i=l.constraints.hardMinHeightPx;i!==void 0&&t<i&&r.kind!==`scroll`&&(r={kind:`scroll`}),D={id:l.card.id,kind:`card`,component:l.card.component,cardSizeClass:l.constraints.sizeClass,rect:{x:e,y:n.y,width:o,height:t},layer:`overlay`,order:h.zBase,fit:r,region:h.name,sheet:!0},x.push(D)}}if(!C){if(o&&s.selfViewDropped)y.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?pF: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],...D===null?[]:[D.rect],...n.chromeObstacles??[]];if(S){let e=S.rect,n=hF(e,_,a,r.width===`compact`),i=n===null?null:mF(e,t,_,n.w,n.h),o=i===null?null:vF(i,s,_),c=n!==null&&o!==null&&o.y>=e.y&&n.w+_<=e.width&&n.h+_<=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?x.push({id:`selfView`,kind:`selfView`,rect:o,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.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=vF(mF(o,t,_,e,n),s,_),l=c.y>=0&&e+_<=o.width&&n+_<=o.height,u=x.some(e=>(e.kind===`content`||e.kind===`card`)&&QP(e.rect,c));l&&!u?x.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.selfViewDropped=!0}}}return{tiles:x,degradations:y}},S={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},C=x(S),w=eF(C.tiles,i,a);for(let e of a.degradationLadder){if(w.length===0)break;if(e===`evict-cards`)for(;w.length>0&&S.extraEvictions<b.length;)S={...S,extraEvictions:S.extraEvictions+1},C=x(S),w=eF(C.tiles,i,a);else e===`drop-self-view`?C.tiles.some(e=>e.kind===`selfView`)&&(S={...S,selfViewDropped:!0},C=x(S),w=eF(C.tiles,i,a)):e===`collapse-replica`&&!S.replicaCollapsed&&C.tiles.some(e=>e.kind===`replica`)&&(S={...S,replicaCollapsed:!0},C=x(S),w=eF(C.tiles,i,a))}return C}function SF(e){if(!(e===void 0||e.length===0))return{...RP,...Object.fromEntries(e.map(e=>[e.id,e]))}}function CF(e,t,n,r){let i={width:Math.max(0,Math.round(e.container.widthPx)),height:Math.max(0,Math.round(e.container.heightPx))},a=VP(e,t,n),o=e.replica||e.selfView&&e.prefs.hideSelfView!==!0,s=BP(a.state,t,SF(r?.templates),void 0,o),{tiles:c,degradations:l}=xF(a,s,e,t,i,n);return{state:a.state,sizeClass:t,containerPx:i,templateId:s.id,tiles:c,degradations:l,suppressedPrefs:[...a.suppressedPrefs]}}var wF={compact:0,medium:1,expanded:2};function TF(e,t){return e.width===t.width&&e.height===t.height}function EF(e,t,n,r,i){let a=e.committedClass;if(a===null)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(TF(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(wF[t.width]-wF[a.width]),s=e.lastResolution?.containerPx.width??null;return o>1||s===null||Math.abs(Math.round(n)-s)>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&TF(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 DF=(e,t)=>e<t?-1:+(e>t);function OF(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(DF))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(DF)){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 kF(e,t,n,r,i){let a=EF(e,LP(t.container,r),t.container.widthPx,n,r),o=CF(t,a.committedClass,r,i);return{resolution:o,transitions:OF(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var AF=`0.1.12`,jF=FP,MF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),NF=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function PF(e,t){return MF||e===!0||t===!0}function FF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,reportedHeights:o}){return{container:{widthPx:t.width,heightPx:Math.round(Math.min(t.height,t.visualViewportHeight??t.height))},replica:n.hasPersonaVideo,selfView:n.hasSelfView,presentation:n.isPersonaPresenting?{}:null,userShare:n.isScreenSharing?{}:null,cards:e.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...o[e.id]===void 0?{}:{naturalHeightPx:o[e.id]}})),prefs:{},callControls:r>0,callControlsVisible:i??!0,...a===void 0?{}:{callControlsRect:a}}}var IF=16,LF=200,RF=zt(null);function zF(e){RF.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),RF.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,LF))}function BF(){RF.peek()!==null&&(RF.value=null)}function VF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,enabled:o}){let s=N(jF),c=N(null),[l,u]=j({}),[d,f]=j(null),p=F((e,t)=>{o&&u(n=>n[e]===t?n:{...n,[e]:t})},[o]);M(()=>{u(t=>{let n=new Set(e.map(e=>e.id)),r={};for(let[e,i]of Object.entries(t))n.has(e)&&(r[e]=i);return Object.keys(r).length===Object.keys(t).length?t:r})},[e]);let m=P(()=>FF({instances:e,viewport:t,presence:n,callControlsBandPx:r,callControlsVisible:i,callControlsRect:a,reportedHeights:l}),[e,t,n,r,i,a,l]);return M(()=>{if(!o||RF.peek()!==null)return;c.current===null&&(c.current=Date.now());let e=null,t=()=>{if(e=null,RF.peek()!==null)return;let n=Date.now()-(c.current??0),r;try{r=kF(s.current,m,n,IP)}catch(e){zF(e);return}if(s.current=r.nextState,f(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(IF,IP.hysteresis.windowMs-i+IF))}};return t(),()=>{e!==null&&clearTimeout(e)}},[o,m]),{resolution:o?d?.resolution??null:null,inputs:o?m:null,transitions:o?d?.transitions??[]:[],reportedHeights:l,recordNaturalHeight:p}}function HF(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`)?`card-overflow`:null:`no-persona-video`:`flag-off`}function UF(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0);return n===void 0?null:n.rect.y+n.rect.height}var WF={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function GF(e,t,n){if(e===null)return WF;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return WF;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 KF(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function qF(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}var JF=`conversation.grid_status`,YF=6e4;function XF(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function ZF(e,t){return{message_type:`conversation`,event_type:JF,conversation_id:e,properties:t}}function QF(e){return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function $F(e){let{send:t,enabledVia:n,engineVersion:r=AF,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=YF}=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=QF(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 eI({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=hh(),o=Hg(),s=I(J_),c=N({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=N(null);M(()=>{if(!e)return;let n=$F({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(ZF(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),M(()=>{l.current?.update(n,r)},[n,r]),M(()=>{i!==null&&l.current?.error(i)},[i])}var tI=(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},nI=(e,t)=>({classGroupId:e,validator:t}),rI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),iI=`-`,aI=[],oI=`arbitrary..`,sI=e=>{let t=uI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return lI(e);let n=e.split(iI);return cI(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?tI(i,t):t:i||aI}return n[e]||aI}}},cI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=cI(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(iI):e.slice(t).join(iI),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},lI=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?oI+r:void 0})(),uI=e=>{let{theme:t,classGroups:n}=e;return dI(n,t)},dI=(e,t)=>{let n=rI();for(let r in e){let i=e[r];fI(i,n,r,t)}return n},fI=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];pI(i,t,n,r)}},pI=(e,t,n,r)=>{if(typeof e==`string`){mI(e,t,n);return}if(typeof e==`function`){hI(e,t,n,r);return}gI(e,t,n,r)},mI=(e,t,n)=>{let r=e===``?t:_I(t,e);r.classGroupId=n},hI=(e,t,n,r)=>{if(vI(e)){fI(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(nI(n,e))},gI=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];fI(o,_I(t,a),n,r)}},_I=(e,t)=>{let n=e,r=t.split(iI),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=rI(),n.nextPart.set(t,i)),n=i}return n},vI=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,yI=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)}}},bI=`!`,xI=`:`,SI=[],CI=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),wI=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===xI){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(bI)?(c=s.slice(0,-1),l=!0):s.startsWith(bI)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return CI(t,l,c,u)};if(t){let e=t+xI,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):CI(SI,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},TI=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}},EI=e=>({cache:yI(e.cacheSize),parseClassName:wI(e),sortModifiers:TI(e),postfixLookupClassGroupIds:DI(e),...sI(e)}),DI=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},OI=/\s+/,kI=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(OI),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){l=t+(l.length>0?` `+l:l);continue}if(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?_+bI:_,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},AI=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=jI(n))&&(i&&(i+=` `),i+=r);return i},jI=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=jI(e[r]))&&(n&&(n+=` `),n+=t);return n},MI=(e,...t)=>{let n,r,i,a,o=o=>(n=EI(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=kI(e,n);return i(e,a),a};return a=o,(...e)=>a(AI(...e))},NI=[],PI=e=>{let t=t=>t[e]||NI;return t.isThemeGetter=!0,t},FI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,II=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,RI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zI=/\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)\(.+\)$/,VI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,UI=e=>LI.test(e),WI=e=>!!e&&!Number.isNaN(Number(e)),GI=e=>!!e&&Number.isInteger(Number(e)),KI=e=>e.endsWith(`%`)&&WI(e.slice(0,-1)),qI=e=>RI.test(e),JI=()=>!0,YI=e=>zI.test(e)&&!BI.test(e),XI=()=>!1,ZI=e=>VI.test(e),QI=e=>HI.test(e),$I=e=>!Q(e)&&!$(e),eL=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)),tL=e=>gL(e,bL,XI),Q=e=>FI.test(e),nL=e=>gL(e,xL,YI),rL=e=>gL(e,SL,WI),iL=e=>gL(e,wL,JI),aL=e=>gL(e,CL,XI),oL=e=>gL(e,vL,XI),sL=e=>gL(e,yL,QI),cL=e=>gL(e,TL,ZI),$=e=>II.test(e),lL=e=>_L(e,xL),uL=e=>_L(e,CL),dL=e=>_L(e,vL),fL=e=>_L(e,bL),pL=e=>_L(e,yL),mL=e=>_L(e,TL,!0),hL=e=>_L(e,wL,!0),gL=(e,t,n)=>{let r=FI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_L=(e,t,n=!1)=>{let r=II.exec(e);return r?r[1]?t(r[1]):n:!1},vL=e=>e===`position`||e===`percentage`,yL=e=>e===`image`||e===`url`,bL=e=>e===`length`||e===`size`||e===`bg-size`,xL=e=>e===`length`,SL=e=>e===`number`,CL=e=>e===`family-name`,wL=e=>e===`number`||e===`weight`,TL=e=>e===`shadow`,EL=MI(()=>{let e=PI(`color`),t=PI(`font`),n=PI(`text`),r=PI(`font-weight`),i=PI(`tracking`),a=PI(`leading`),o=PI(`breakpoint`),s=PI(`container`),c=PI(`spacing`),l=PI(`radius`),u=PI(`shadow`),d=PI(`inset-shadow`),f=PI(`text-shadow`),p=PI(`drop-shadow`),m=PI(`blur`),h=PI(`perspective`),g=PI(`aspect`),_=PI(`ease`),v=PI(`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=()=>[UI,`full`,`auto`,...w()],E=()=>[GI,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,GI,$,Q]},GI,$,Q],ee=()=>[GI,`auto`,$,Q],te=()=>[`auto`,`min`,`max`,`fr`,$,Q],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],ie=()=>[UI,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[UI,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],k=()=>[UI,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,$,Q],oe=()=>[...b(),dL,oL,{position:[$,Q]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,fL,tL,{size:[$,Q]}],le=()=>[KI,lL,nL],ue=()=>[``,`none`,`full`,l,$,Q],de=()=>[``,WI,lL,nL],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[WI,KI,dL,oL],he=()=>[``,`none`,m,$,Q],ge=()=>[`none`,WI,$,Q],_e=()=>[`none`,WI,$,Q],ve=()=>[WI,$,Q],ye=()=>[UI,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[qI],breakpoint:[qI],color:[JI],container:[qI],"drop-shadow":[qI],ease:[`in`,`out`,`in-out`],font:[$I],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[qI],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[qI],shadow:[qI],spacing:[`px`,WI],text:[qI],"text-shadow":[qI],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,UI,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[eL],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:[GI,`auto`,$,Q]}],basis:[{basis:[UI,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[WI,UI,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,WI,$,Q]}],shrink:[{shrink:[``,WI,$,Q]}],order:[{order:[GI,`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":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],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:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...k()]}],"min-block-size":[{"min-block":[`auto`,...k()]}],"max-block-size":[{"max-block":[`none`,...k()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,lL,nL]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,hL,iL]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,KI,Q]}],"font-family":[{font:[uL,aL,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`,$,rL]}],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:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[WI,`from-font`,`auto`,$,nL]}],"text-decoration-color":[{decoration:A()}],"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:[GI,$,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:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},GI,$,Q],radial:[``,$,Q],conic:[GI,$,Q]},pL,sL]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[WI,$,Q]}],"outline-w":[{outline:[``,WI,lL,nL]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,mL,cL]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,mL,cL]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[WI,nL]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,mL,cL]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[WI,$,Q]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:he()}],brightness:[{brightness:[WI,$,Q]}],contrast:[{contrast:[WI,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,mL,cL]}],"drop-shadow-color":[{"drop-shadow":A()}],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":he()}],"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:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[GI,$,Q]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"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`,...A()]}],"stroke-w":[{stroke:[WI,lL,nL,rL]}],stroke:[{stroke:[`none`,...A()]}],"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 DL({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=RP[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}=bF(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return L(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&L(`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=>L(`div`,{class:EL(`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:L(`span`,{class:EL(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[L(`span`,{children:e.region.name}),L(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>L(`div`,{class:EL(`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:L(`span`,{class:EL(`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 OL(e){return{version:1,buildSha:AF,engineVersion:AF,config:IP,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{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}},prefs:e.prefs,cards:e.cards}}}function kL({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=j(!1),s=N(null);if(M(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:L(`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:[L(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[L(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),L(`span`,{class:`text-warning`,children:`observing`})]}),L(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[L(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),L(`dd`,{class:`text-warning`,children:r}),L(`dt`,{class:`text-error opacity-80`,children:`error`}),L(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(OL(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;return L(`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:[L(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[L(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),L(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),L(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[L(`dt`,{class:`opacity-60`,children:`state`}),L(`dd`,{children:e.state}),L(`dt`,{class:`opacity-60`,children:`template`}),L(`dd`,{children:e.templateId}),L(`dt`,{class:`opacity-60`,children:`class`}),L(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),L(`dt`,{class:`opacity-60`,children:`container`}),L(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&L(k,{children:[L(`dt`,{class:`opacity-60`,children:`controls`}),L(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),L(`dt`,{class:`opacity-60`,children:`tiles`}),L(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&L(k,{children:[L(`dt`,{class:`text-error opacity-80`,children:`dropped`}),L(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&L(k,{children:[L(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),L(`dd`,{class:`text-warning`,children:r})]}),i!==null&&L(k,{children:[L(`dt`,{class:`text-error opacity-80`,children:`error`}),L(`dd`,{class:`text-error break-all`,children:i})]})]}),L(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var AL={effect:WF,animate:!1},jL=zt(AL),ML={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function NL(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 PL(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&&NL(e.replica,t.replica)&&NL(e.selfView,t.selfView)&&NL(e.content,t.content)}var FL=new Map;function IL({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=PF(o,s)&&r!==void 0,l=r??ML,u=VF({instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),d=c?RF.value:null,f=d===null?HF(u.resolution,l,c):`engine-error`;eI({enabled:c,enabledVia:XF(MF,o===!0,s===!0),bail:f,resolution:u.resolution,engineError:d});let p=N(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(p.current=!0):p.current=!1;let m=!p.current,h;try{h=GF(u.resolution,f,m)}catch(e){zF(e),h=WF}let g=N(WF),_=qF(g.current,h);M(()=>{g.current=h,PL(jL.peek().effect,h)||(jL.value={effect:h,animate:_})}),M(()=>()=>{BF(),jL.peek()!==AL&&(jL.value=AL)},[]);let v=u.resolution,y=P(()=>{if(f!==null||v===null)return FL;try{let e=new Map;for(let t of v.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e}catch(e){return zF(e),FL}},[f,v]),b=NF?L(`div`,{class:`contents`,"data-grid-debug":!0,children:[L(DL,{resolution:u.resolution,inputs:u.inputs,config:IP,bailReason:f}),L(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:L(kL,{resolution:u.resolution,inputs:u.inputs,shadowing:f!==null,bailReason:f,engineError:d})})]}):null;return{cardRects:y,sheetBottomPx:UF(v,f),animate:_,recordNaturalHeight:u.recordNaturalHeight,debug:b}}var LL=[`left`,`top`,`width`,`height`].map(e=>`${e} ${bC}`).join(`, `);function RL(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!AC()?LL:`none`}}function zL({state:e}){return e.enabled?L(`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:[L(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),L(`dl`,{class:`mt-2 grid gap-2`,children:[L(BL,{label:`iframe`,value:e.iframeLifecycleState}),L(BL,{label:`post`,value:e.lastInteractionPostResult}),L(BL,{label:`context`,value:e.lastModelContextUpdate}),L(BL,{label:`error`,value:e.lastError}),L(VL,{label:`tool_call`,value:e.lastToolCall}),L(VL,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function BL({label:e,value:t}){return t?L(`div`,{children:[L(`dt`,{class:`font-semibold`,children:e}),L(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function VL({label:e,value:t}){return t===void 0?null:L(`div`,{children:[L(`dt`,{class:`font-semibold`,children:e}),L(`dd`,{children:L(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var HL=1e3,UL=5e3,WL=1200,GL=[2e3,6e3];async function KL(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),UL);try{await xn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function qL(e){return e instanceof _n&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function JL(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:xR(e).message})}function YL(e,t,n,r){(async()=>{let i;for(let a of GL){await new Promise(e=>setTimeout(e,a));try{await KL(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,qL(e))break}}JL(i,r)})()}var XL=2e3;function ZL(e){return e.correct_answer===void 0?WL:XL}var QL=48,$L=`allow-scripts`,eR={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function tR(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 nR=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{tR(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 rR(e){for(let t of fS)if(e.some(e=>_R(e)===t))return t;return null}function iR({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=vR(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c}=mv(),{dataTheme:l,cssVars:u}=PP(),d=hh(),f=Hg(),[p,m]=j([]),[h,g]=pR(),[_,v]=j(()=>({enabled:n,iframeLifecycleState:`idle`})),y=IL({instances:p,viewport:g,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),b=F(e=>{v(t=>({...t,...e}))},[]),x=F((e,t=`*`)=>{if(f!==`joined-meeting`){b({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}d?.sendAppMessage(e,t)},[d,f,b]),S=P(()=>({theme:l.value===`dark`?`dark`:`light`,cssVars:u.value}),[l.value,u.value]);M(()=>{v(e=>e.enabled===n?e:{...e,enabled:n})},[n]),e_({onAppMessage:F(e=>{if(f!==`joined-meeting`){b({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=aC(e.data);if(!t)return;m(e=>wS(e,t)),b({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){b({iframeLifecycleState:`error`,lastError:xR(e).message})}},[f,b])});let C=p.map(e=>{let t=jS(e,g),n=t.display_mode===`fullscreen`?null:y.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),w=MS(C.map(({layout:e})=>e),g),T=[...C].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;M(()=>{e?.(w)},[e,w.active,w.side,w.video_shift_x,w.backdrop.type,w.safe_area?.x,w.safe_area?.y,w.safe_area?.width,w.safe_area?.height]);let E=rR(C.map(({layout:e})=>e));M(()=>{t?.(E)},[t,E]);let D=p.length>0||_.enabled;return L(`div`,{ref:h,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[D&&T&&L(`div`,{class:`absolute inset-0 bg-black/45`}),D&&!T&&y.sheetBottomPx!==null&&L(`div`,{"data-grid-sheet-scrim":!0,class:`absolute inset-x-0 top-0`,style:{height:Math.min(y.sheetBottomPx+64,g.height),backgroundImage:`linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))`}}),D&&C.map(({instance:e,layout:t,gridRect:n})=>L(oR,{slot:_R(t),safeAreaTop:w.safe_area?.y,frameWidth:g.width,...n?{gridRect:n,gridAnimate:y.animate}:{},children:r=>L(sR,{availableHeight:r,client:c,gridDriven:n!==null,hostTheme:S,instance:e,layout:t,dimmed:!!(T&&T!==e.tool_call_id),onDebug:b,onNaturalHeightChange:y.recordNaturalHeight,onComplete:()=>{m(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{m(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:x})},e.id)),D&&L(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:L(zL,{state:_})}),y.debug]})}var aR=16;function oR({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=mR(),c=a(r?r.height:e===`full`?void 0:s);if(r)return L(`div`,{ref:o,class:`pointer-events-auto absolute`,style:RL(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:L(`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-aR*2):void 0;return L(`div`,{ref:o,class:gR(e),style:{top:r,bottom:`72px`,maxWidth:i},"data-canvas-slot":e,children:L(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return L(`div`,{ref:o,class:gR(e),"data-canvas-slot":e,children:L(`div`,{class:`contents`,children:c})})}function sR({availableHeight:e,client:t,gridDriven:n=!1,hostTheme:r,instance:i,layout:a,dimmed:o,onDebug:s,onComplete:c,onDisplayModeChange:l,onNaturalHeightChange:u,sendAppMessage:d}){let f=N(null),p=N(null),m=N(e),h=N(320),g=N(r),_=N(i),v=N(a),y=N(-1),b=N(c),x=N(l),S=N(u),C=N(d),[w,T]=j(720);M(()=>{_.current=i},[i]),M(()=>{h.current=w,p.current?.setHostContext(dR(_.current,g.current,v.current,m.current,w))},[w]),M(()=>{m.current=e;let t=uR(r,f.current);g.current=t,p.current?.setHostContext(dR(_.current,t,v.current,e,h.current))},[e,r]),M(()=>{v.current=a,p.current?.setHostContext(dR(_.current,g.current,a,e,h.current))},[e,a]),M(()=>{b.current=c,x.current=l,S.current=u,C.current=d},[c,l,u,d]),M(()=>{let e=f.current;if(!e)return;let n=!1,r=null,a=null,o=null,c=null,l=new URL(i.canvas_config.sandbox_url,globalThis.location.href).href,u=e=>{n||s({iframeLifecycleState:`error`,lastError:xR(e).message})},d=()=>{if(n||!a)return;let e=_.current,t=kS(e,a);a=null,C.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),s({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},w=()=>{if(r)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let f=new MP(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:dR(i,uR(g.current,e),v.current,m.current,h.current)});r=f,p.current=f,f.oninitialized=()=>{n||(s({iframeLifecycleState:`ready`}),y.current=_.current.revision,f.sendToolInput({arguments:_.current.arguments}).catch(u))},f.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let t=Math.min(Math.max(e,QL),720);T(t),S.current(_.current.id,t)}},f.onmessage=async e=>{let r=TS(e),i=OS(e);if(!r){if(i){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return s({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let a=_.current,o=(()=>{try{let e=ES(a,r);return{interaction:e,request:oC(e)}}catch(e){return{error:e}}})();if(`error`in o){let e=xR(o.error).message;return s({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:l,request:u}=o,d=!0;try{await KL(t,l.conversation_id,u.body)}catch(e){d=!1,qL(e)?JL(e,s):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),s({lastInteractionPostResult:`failed_open`,lastError:xR(e).message}),YL(t,l.conversation_id,u.body,s))}if(n)return{};if(i)try{C.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:a.conversation_id,properties:{text:i}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),s({lastError:xR(e).message})}return d&&s({lastInteractionPostResult:`success`,lastError:void 0}),DS(l)&&(l.type===`submit`?(c&&clearTimeout(c),c=setTimeout(()=>{c=null,n||b.current()},ZL(a.arguments))):b.current()),{}},f.onupdatemodelcontext=async e=>(a=e,o||=setTimeout(()=>{o=null,d()},HL),{}),f.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return x.current(t),v.current={...v.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:v.current.viable_slot},f.setHostContext(dR(_.current,g.current,v.current,m.current,h.current)),{mode:t}},f.connect(new nR(e)).then(()=>void 0).catch(u)};s({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),i.canvas_config.sandbox_url,e.src=i.canvas_config.sandbox_url;let E=()=>{w()};return e.addEventListener(`load`,E),w(),()=>{o&&=(clearTimeout(o),null),c&&=(clearTimeout(c),null),d(),n=!0,e.removeEventListener(`load`,E),p.current=null,s({iframeLifecycleState:`closed`}),r&&uS(r)}},[t,i.id,i.canvas_config.sandbox_url,s]),M(()=>{i.revision!==0&&(i.revision<=y.current||(y.current=i.revision,p.current?.sendToolInput({arguments:i.arguments}).catch(e=>{s({iframeLifecycleState:`error`,lastError:xR(e).message})})))},[i.arguments,i.revision,s]);let E=a.viable_slot===`full`||a.display_mode===`fullscreen`,D=E?null:fR(w,e),ee=D?.placeholderStyle,te=D?.cardStyle,ne=E?{height:`100%`}:D?.iframeStyle??{height:`${w}px`},re=[`pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 shadow-xl transition-[opacity,transform]`,E?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,o?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),O=eR[i.canvas_config.component]??$L,ie=L(`div`,{class:re,style:te,"data-canvas-card":a.viable_slot,children:L(`iframe`,{ref:f,title:`${i.canvas_config.component} ${i.canvas_config.component_version}`,class:E?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:O,style:ne})});return E?ie:L(`div`,{class:`block w-full`,style:ee,children:ie})}var cR=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function lR(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of cR){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function uR(e,t){let n=lR(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function dR(e,t,n,r,i){let a=sC(t,n),o=n.viable_slot===`full`||n.display_mode===`fullscreen`,s=o?void 0:yR(r),c=o?1:fR(i??0,r)?.displayScale??1;return{...e.canvas_config.host_context,...a,containerDimensions:{...bR(a.containerDimensions)?a.containerDimensions:{},...s===void 0?{}:{maxHeight:s},displayScale:c}}}function fR(e,t){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let n=Math.min(e,720);if(n<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${n}px`}};let r=t/n;return{displayScale:r,placeholderStyle:{height:`${n*r}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${n}px`,transform:`scale(${r})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${n}px`}}}function pR(){let e=N(null),[t,n]=j(()=>hR(null));return M(()=>{let t=()=>n(t=>{let n=hR(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 mR(){let e=N(null),[t,n]=j();return M(()=>{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 hR(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 gR(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} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function _R(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function vR(){return!1}function yR(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function bR(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xR(e){return e instanceof Error?e:Error(String(e))}var SR=class extends A{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},CR=1e4;function wR(e,t=CR){let[n,r]=j(!1),i=N(!1);return M(()=>{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 TR(e){let t=$h(),n=p_(t??``),r=!d_(t??``).isOff,i=Xx(e),a=i.phase===`ready`?i.replicaId:``,o=d_(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 P(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function ER(e,t,n){let[r,i]=j(!0);return M(()=>{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 DR(e,t,n,r,i){let[a,o]=j(void 0);return M(()=>{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 OR=1e4;function kR({onTimeout:e,timeoutMs:t=OR,active:n=!0}){let r=Yx().length>0,[i,a]=j(!1),o=N(e);return M(()=>{o.current=e},[e]),M(()=>{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 AR(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function jR({onShutdown:e}){let t=N(e);M(()=>{t.current=e},[e]),e_({onAppMessage:F(e=>{AR(e?.data)&&t.current()},[])})}var MR=mn(`PiP`),NR=360,PR=280;function FR(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function IR(e){let{enabled:t,active:n}=e,[r,i]=j(null),a=FR(),o=I(Kv),s=F(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=F(async()=>{if(a&&!(!t||!n)&&!(r&&!r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:NR,height:PR}),t=Ue.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){MR.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return M(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){MR.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){MR.warn(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),M(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),M(()=>()=>{r&&!r.closed&&r.close()},[r]),M(()=>{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 LR=zt(null),RR={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},zR=ga(({id:e,showAudioWave:t=!0})=>{let n=p_(e).isOff;return L(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[L(pg,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&L(`div`,{class:`absolute bottom-2 right-2`,children:L(Hx,{id:e})})]})}),BR=ga(()=>{let e=$h(),{isScreenSharing:t}=tx(),n=Yx()[0];return L(k,{children:[t&&n&&L(zR,{id:n}),e&&L(zR,{id:e,showAudioWave:!1})]})}),VR=ga(()=>L(`div`,{class:`absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20`,children:L(BR,{})})),HR=ga(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>L(k,{children:[L(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&L(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:RL(i.content,a),children:L(pg,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&L(`div`,{class:EL(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:RL(i.replica,a),children:L(eS,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),UR=ga(()=>{let{effect:e,animate:t}=jL.value,n=$h();return n===null||e.selfView===null?null:L(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:RL(e.selfView,t),children:L(pg,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),WR=ga(({canvasRenderedSlot:e})=>{let t=KF(jL.value.effect);return t===`hidden`?null:t===`engine`?L(SR,{onError:zF,children:L(UR,{})}):e===`safe-area-bottom`?null:L(VR,{})}),GR=ga(()=>{let e=Yx()[0];return e?L(dg,{sessionId:e}):null}),KR=ga(e=>L(k,{children:[L(GR,{}),L(qR,{...e})]})),qR=ga(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=jL.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?L(Bx,{}):i.phase===`connecting`?L(zx,{}):e&&!s?L(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:L(Kx,{sessionId:i.replicaId})}):c.effect.driving?L(SR,{onError:zF,children:L(HR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?L(BC,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):L(JR,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),JR=ga(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>L(RC,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:QR,personaMode:`auto`,renderedSlot:o,fill:i=>L(eS,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),YR=ga(({items:e})=>{let[t,n]=j(!1),r=N(null);return M(()=>{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]),L(`div`,{ref:r,class:`relative`,children:[L(`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:L(fb,{name:`more`})}),t&&L(`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})]})}),XR=ga(({items:e})=>e.length<=1?L(k,{children:e}):L(YR,{items:e})),ZR=ga(({onLeave:e})=>{let t=Hg(),{config:n}=mv(),{session:r,end:i}=Ex(),a=$h(),o=N(null),s=I(ry)?.frameRef??o,[c,l]=j(!1),u=Mb()===`full-screen`,[d,f]=j(!1),[p,m]=j(RR),[h,g]=j(null),_=wR(h!==null&&!c&&!u),v=N(null),y=N(null),b=r.value?.conversationUrl,x=n.value.customization.conversation,S=r.value?.magicGrid===!0,C=PF(x.magic_grid,S),w=ER(v,C,b),T=DR(v,y,72,C,b),E=x.modality===`audio`,D=TR(E),ee=x.modality===`chat`,te=x.modality===`video`,ne=x.enable_chat,re=x.enable_closed_captions,O=x.enable_picture_in_picture,{pipWindow:ie}=IR({enabled:O&&!ee,active:t===`joined-meeting`});M(()=>()=>{i()},[i]);let{camera:ae,requestCamera:k}=Rv(),{isCamMuted:A}=$b(),oe=ae.isGranted&&!A;M(()=>{te&&t===`joined-meeting`&&(LR.value=oe)},[te,t,oe]);let se=N(te&&!a&&LR.value===!0);M(()=>{t===`joined-meeting`&&se.current&&(se.current=!1,k())},[t,k]),M(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),M(()=>{let e=()=>{let e=s.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;l(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ce=F(()=>{let e=s.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);F(()=>{f(e=>!e)},[]);let le=F(()=>{i()},[i]);if(kR({active:!ee&&t===`joined-meeting`,onTimeout:le}),jR({onShutdown:le}),!b)return null;if(ee)return L(Nx,{defaultOpen:!0,children:L(`div`,{class:`cvi-call-surface absolute inset-0`,children:L(Lx,{docked:!0,headerAction:L(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:le,"aria-label":`Leave conversation`,children:L(fb,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let ue=[L(Tx,{compact:!0},`screen-share`)];ne&&ue.push(L(Fx,{compact:!0},`chat`));let de=t===`left-meeting`;return L(Ox,{children:L(Nx,{children:L(cx,{children:[L(`div`,{class:`cvi-call-surface absolute inset-0${E?``:` cvi-video-surface`}`,ref:v,children:[L(`div`,{class:`relative w-full h-full z-[5]`,children:[L(KR,{isAudioOnly:E,presence:D,canvasLayoutEffect:p,canvasRenderedSlot:h}),!E&&L(WR,{canvasRenderedSlot:h}),L(iR,{debugEnabled:d,callPresence:D,callControlsVisible:w,callControlsRect:T,gridConfigEnabled:x.magic_grid,gridStartEnabled:S,onLayoutEffectChange:m,onRenderedSlotChange:g}),!u&&L(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":de,"data-pinned":_,children:L(Vx,{active:c,onToggle:ce,nudge:_,compact:!0})})]}),L(Lx,{}),L(jx,{}),L(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":de,"aria-hidden":de,children:L(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":de,ref:y,children:[L(bx,{level:!0}),!E&&L(Sx,{}),re&&L(Ax,{}),L(XR,{items:ue}),L(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:le,"aria-label":`Leave call`,children:L(fb,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),ie&&Na(L(Qx,{onLeave:le}),ie.document.body)]})})})});function QR(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 $R({message:e,class:t}){return L(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[L(`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}),L(`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:L(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}function ez(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 tz=ga(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=hh(),{config:a}=mv(),{localSessionId:o,isCamMuted:s}=$b(),{mic:c,camera:l,requestMic:u,requestCamera:d}=Rv(),f=a.value.customization.conversation.modality===`video`,p=_b(a.value),m=gb(a.value);M(()=>{u()},[]);let h=c.isGranted,g=N(!1);M(()=>{!f||!h||g.current||l.isGranted||l.isBlocked||(g.current=!0,d())},[f,h,l.isGranted,l.isBlocked,d]);let _=f&&h&&!l.isGranted,v=ez(e,c.status,_);return L(cx,{children:L(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[l.isGranted&&!s?L(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:L(pg,{type:`video`,sessionId:o??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):L(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[L(Sb,{variant:p.background,replica:m}),L(`div`,{class:`${Vb} backdrop-blur-xs`})]}),L(`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:[v&&L($R,{message:v,class:`relative`}),L(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[L(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[L(bx,{level:!0}),f&&L(Sx,{})]}),L(Wb,{class:`btn-accent `,loading:t,disabled:!h,onClick:n,children:e?.join??`Join`}),L(`button`,{type:`button`,class:`btn btn-control ${c.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:L(fb,{name:`cancel`})})]})]})]})})}),nz=`Password required`,rz=`Enter the password to start this conversation.`,iz=`Password`,az=`Continue`;function oz({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=j(``),o=ct();return L(`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":`${o}-title`,children:L(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();!r||n||e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:L(`div`,{class:`card-body gap-3`,children:[L(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??nz}),L(`p`,{class:`text-sm text-base-content/70`,children:t?.description??rz}),L(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??iz,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&L(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),L(Wb,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??az})]})})})}function sz({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 cz({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=mv(),o=Mb()===`full-screen`,s=I(J_),c=_b(i.value),l=c.btn_title??e?.fallback_button??`Start the conversation`,u=i.value.customization.terms_content?.trim()??``,d=i.value.customization.terms_enabled===!0,f=u.length>0,p=f&&d,m=P(()=>p&&w_(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=ct(),[b,x]=j(m),S=n||p&&!b||v;return L(Ub,{title:c.title,description:c.description,overlay:v&&s?L(oz,{onSubmit:s.setPassword}):null,children:[L(`div`,{class:`relative`,children:[r&&L($R,{message:sz(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),L(qb,{onClick:()=>{p&&b&&!m&&D_(a,u),t()},disabled:S,loading:n,children:l})]}),f&&L(`div`,{class:`max-w-xs text-center`,children:h?L(`label`,{for:y,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[L(`input`,{id:y,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:b,onChange:e=>x(e.target.checked)}),L(`span`,{class:`leading-snug`,children:u})]}):L(`p`,{class:`text-xs leading-snug text-white/70`,children:u})})]})}function lz(...e){for(let t of e){let e=t?.trim();if(e)return e}}function uz(){let{config:e}=mv(),{haircheck:t}=e.value.customization;return P(()=>({prompt:lz(t.permission_request_description,t.permission_request_title),ready:lz(t.permission_granted_description,t.permission_granted_title),denied:lz(t.permission_denied_description,t.permission_denied_title),join:lz(t.join_button),cancel:lz(t.cancel_btn)}),[t])}function dz({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=uz();switch(e.state){case`idle`:return L(cz,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return L(tz,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return L(ZR,{onLeave:()=>e.leave()});case`ended`:return L(Qb,{isStarting:e.isStarting,onRestart:()=>{e.start()}});case`unavailable`:return L(Ab,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}var fz=Ae(null);function pz({children:e}){let{config:t}=I(_i),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=on(r===`start-expanded`||r===`always`),a=on(n?.variant??`full`),o=on(n?.position??`bottom-right`),s=on(r),c=on(n?.avatar?.type??`orb`),l=N(r);pn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=F(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=F(()=>{i.value=!0},[i]),f=F(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=I(fv);pn(()=>{p&&(p.hostVisible.value=i.value)});let m=I(h_),h=m?.flowSignal.value??`idle`,g=m?.isStarting??!1;M(()=>{(g||h===`haircheck`||h===`call`)&&(i.value=!0)},[g,h,i]);let _=I(Uv)?.shadowHost.value??null;M(()=>{if(_)return Object.assign(_,{open:d,close:f}),()=>{delete _.open,delete _.close}},[_,d,f]);let v=P(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return L(fz.Provider,{value:v,children:e})}function mz(){let{config:e}=mv(),t=e.value.customization.branding;return e.value.show_tavus_branding!==!1&&!t?.hide_tavus_badge?L(hz,{}):t?.logo||t?.text?L(gz,{logo:t.logo,text:t.text}):null}function hz(){let{isDark:e}=PP(),t=e.value?`white`:`#140206`;return L(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[L(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[L(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),L(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),L(`span`,{children:[`Powered by `,L(`span`,{class:`underline`,children:`Tavus`})]})]})}function gz({logo:e,text:t}){return L(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?L(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?L(`span`,{children:t}):null]})}var _z={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function vz(){let{config:e}=mv(),t=e.value.customization.widget?.text;return P(()=>({title:t?.title||_z.title,btn_title:t?.btn_title||_z.btn_title}),[t])}function yz(){let e=I(fz);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var bz={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},xz={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function Sz({size:e=`md`,className:t=``}){let{avatarType:n}=yz(),{config:r}=mv(),i=gb(r.value);return(_b(r.value).background.type===`replica`||n.value===`image`)&&i?L(`div`,{class:`relative ${bz[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:L(xb,{replica:i})}):L(`div`,{class:`relative ${bz[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:L(`span`,{class:`${xz[e]} rounded-full bg-primary animate-pulse`})})}function Cz({variant:e}){let{toggle:t}=yz(),n=vz();return e===`tiny`?L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:L(Sz,{size:`lg`})}):e===`compact`?L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[L(Sz,{size:`md`}),L(`span`,{class:`flex flex-col gap-0.5`,children:[L(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),L(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):L(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[L(`div`,{class:`flex items-center gap-2.5`,children:[L(Sz,{size:`md`}),L(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),L(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[L(fb,{name:`cam`,size:16}),L(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var wz=`tavus:widget:greeting-dismissed`;function Tz({anchor:e}){let t=vz(),{variant:n,expand:r}=yz(),[i,a]=j(!1);M(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(wz)===`1`)return}catch{}a(!0)}},[n]);let o=F(e=>{e.stopPropagation();try{sessionStorage.setItem(wz,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return L(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[L(`p`,{class:`leading-snug pr-3`,children:t.title}),L(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),L(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function Ez(){let e=I(Uv);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var Dz=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,Oz=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,kz=`p-1 flex-1 min-h-0`,Az=`p-1 flex-1 min-h-0`;function jz({variant:e,children:t,onClose:n,fullscreen:r}){let{expandable:i}=yz(),a=i.value!==`always`;return r?L(`div`,{class:Oz,children:[L(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&L(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:L(fb,{name:`close`,size:14})})}),L(`div`,{class:Az,children:t}),L(`div`,{class:`flex justify-end px-2.5`,children:L(mz,{})})]}):L(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[L(`div`,{class:`${Dz} flex-1 overflow-hidden`,children:[L(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&L(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:L(fb,{name:`close`,size:14})})}),L(`div`,{class:kz,children:t})]}),L(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:L(mz,{})})]})}var Mz=mn(`Widget`),Nz=`1rem`,Pz=480;function Fz(e,t,n){let r=e.state===`call`,i=r||e.state===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t(),n()}function Iz(){return typeof window>`u`?!1:window.innerWidth<=Pz}function Lz(e){switch(e){case`bottom-right`:return{bottom:Nz,right:Nz};case`bottom-left`:return{bottom:Nz,left:Nz};case`top-right`:return{top:Nz,right:Nz};case`top-left`:return{top:Nz,left:Nz};case`top`:return{top:Nz,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:Nz,left:`50%`,transform:`translateX(-50%)`}}}var Rz=[`top`,`bottom`,`left`,`right`,`transform`];function zz(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function Bz(){let{config:e,initError:t}=mv(),n=vz(),{expanded:r,position:i,variant:a,collapse:o}=yz(),{end:s}=Ex(),{shadowHost:c}=Ez(),l=jb(),u=on(Iz());M(()=>{if(typeof window>`u`)return;u.value=Iz();let e=()=>{u.value=Iz()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let d=P(()=>({fallback_button:n.btn_title}),[n.btn_title]),f=F(()=>{Fz(l,s,o)},[l,s,o]);if(pn(()=>{let e=c.value,t=i.value,n=r.value,a=n&&u.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=Lz(t);for(let t of Rz)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=u.value?`true`:`false`}}),t.value)return Mz.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return Mz.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=zz(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return L(`div`,{class:`flex flex-col`,children:[L(`div`,{class:t,children:[L(Tz,{anchor:e}),L(Cz,{variant:a.value})]}),L(`div`,{class:`flex ${n} pt-1.5`,children:L(mz,{})})]})}return e.value.is_available===!1?L(jz,{variant:a.value,fullscreen:u.value,onClose:f,children:L(iy,{children:L(Ab,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):L(jz,{variant:a.value,fullscreen:u.value,onClose:f,children:L(iy,{children:L(dz,{flow:l,welcomeText:d,onUnavailableCancel:()=>l.restart()})})})}var Vz=`:host {
164
165
  display: block;
165
166
  position: fixed;
166
167
  z-index: 50;
167
168
  background: transparent;
168
169
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
169
- }`;function jz(e){return L(k,{children:[L(`style`,{dangerouslySetInnerHTML:{__html:Ue}}),L(`style`,{dangerouslySetInnerHTML:{__html:Az}}),L(xt,{"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`],token:e.token,children:L(vi,{children:L(bi,{children:L(Y_,{children:L(pv,{children:L(Vv,{children:L(Gv,{children:L(qv,{children:L(nz,{children:L(kz,{})})})})})})})})})})]})}var Mz;function Nz(){Mz||=Fe(jz,`tavus-widget`,[`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`token`],{shadow:!0,mode:`open`})}var Pz=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],Fz=class{element=null;tagName;constructor(e=`tavus-widget`){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?.()}startConversation(){this.getElement().startConversation?.()}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`&&Nz(),e.TAVUS_EVENT_NAMES=Pz,e.TavusIntegration=Fz,e})({});
170
+ }`;function Hz(e){return L(k,{children:[L(`style`,{dangerouslySetInnerHTML:{__html:Ue}}),L(`style`,{dangerouslySetInnerHTML:{__html:Vz}}),L(xt,{"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`],token:e.token,children:L(vi,{children:L(bi,{children:L(Y_,{children:L(pv,{children:L(Vv,{children:L(Gv,{children:L(qv,{children:L(pz,{children:L(Bz,{})})})})})})})})})})]})}var Uz;function Wz(){Uz||=Fe(Hz,`tavus-widget`,[`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`token`],{shadow:!0,mode:`open`})}var Gz=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],Kz=class{element=null;tagName;constructor(e=`tavus-widget`){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?.()}startConversation(){this.getElement().startConversation?.()}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`&&Wz(),e.TAVUS_EVENT_NAMES=Gz,e.TavusIntegration=Kz,e})({});