@salla.sa/ui-ai-kit-core 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ai-agent-error.cjs.entry.js +2 -2
- package/dist/cjs/ai-card.cjs.entry.js +3 -3
- package/dist/cjs/ai-chat-container.cjs.entry.js +29 -3
- package/dist/cjs/ai-chat-header.cjs.entry.js +73 -11
- package/dist/cjs/ai-chat-message.cjs.entry.js +1 -1
- package/dist/cjs/ai-conversation-list.cjs.entry.js +11 -5
- package/dist/cjs/ai-conversation-summary.cjs.entry.js +1 -1
- package/dist/cjs/ai-icon.cjs.entry.js +1 -1
- package/dist/cjs/ai-in-chat-browser.cjs.entry.js +5 -23
- package/dist/cjs/ai-link.cjs.entry.js +2 -2
- package/dist/cjs/ai-loading.cjs.entry.js +2 -2
- package/dist/cjs/ai-message-input.cjs.entry.js +1 -1
- package/dist/cjs/ai-rating.cjs.entry.js +1 -1
- package/dist/cjs/ai-route-decision.cjs.entry.js +2 -2
- package/dist/cjs/ai-suggestion.cjs.entry.js +3 -3
- package/dist/cjs/ai-voice-input.cjs.entry.js +2 -2
- package/dist/cjs/{index-BQ8Az7-D.js → index-Cc05u4ND.js} +15 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/ui-ai-kit.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ai-agent-error/ai-agent-error.js +1 -1
- package/dist/collection/components/ai-card/ai-card.js +2 -2
- package/dist/collection/components/ai-chat-container/ai-chat-container.js +110 -7
- package/dist/collection/components/ai-chat-header/ai-chat-header.js +204 -33
- package/dist/collection/components/ai-conversation-list/ai-conversation-list.css +20 -0
- package/dist/collection/components/ai-conversation-list/ai-conversation-list.js +29 -3
- package/dist/collection/components/ai-in-chat-browser/ai-in-chat-browser.css +0 -10
- package/dist/collection/components/ai-in-chat-browser/ai-in-chat-browser.js +5 -74
- package/dist/collection/components/ai-link/ai-link.js +1 -1
- package/dist/collection/components/ai-loading/ai-loading.js +1 -1
- package/dist/collection/components/ai-route-decision/ai-route-decision.js +1 -1
- package/dist/collection/components/ai-suggestion/ai-suggestion.js +2 -2
- package/dist/collection/components/ai-voice-input/ai-voice-input.js +1 -1
- package/dist/components/ai-agent-error.js +1 -1
- package/dist/components/ai-card.js +1 -1
- package/dist/components/ai-chat-container.js +1 -1
- package/dist/components/ai-chat-header.js +1 -1
- package/dist/components/ai-chat-message.js +2 -2
- package/dist/components/ai-conversation-list.js +1 -1
- package/dist/components/ai-conversation-summary.js +1 -1
- package/dist/components/ai-icon.js +1 -1
- package/dist/components/ai-in-chat-browser.js +1 -1
- package/dist/components/ai-link.js +1 -1
- package/dist/components/ai-loading.js +1 -1
- package/dist/components/ai-message-input.js +1 -1
- package/dist/components/ai-rating.js +1 -1
- package/dist/components/ai-route-decision.js +1 -1
- package/dist/components/ai-suggestion.js +1 -1
- package/dist/components/ai-voice-input.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CXJ3iEt8.js → p-BPkf7wZg.js} +1 -1
- package/dist/components/{p-B3gdcdCK.js → p-Ba0urr6Q.js} +1 -1
- package/dist/components/p-CFSr3KcL.js +1 -0
- package/dist/components/{p-C2LB8D3t.js → p-DZuBxUde.js} +1 -1
- package/dist/components/{p-NKAwri_g.js → p-bGFmyIp1.js} +1 -1
- package/dist/esm/ai-agent-error.entry.js +2 -2
- package/dist/esm/ai-card.entry.js +3 -3
- package/dist/esm/ai-chat-container.entry.js +29 -3
- package/dist/esm/ai-chat-header.entry.js +73 -11
- package/dist/esm/ai-chat-message.entry.js +1 -1
- package/dist/esm/ai-conversation-list.entry.js +11 -5
- package/dist/esm/ai-conversation-summary.entry.js +1 -1
- package/dist/esm/ai-icon.entry.js +1 -1
- package/dist/esm/ai-in-chat-browser.entry.js +5 -23
- package/dist/esm/ai-link.entry.js +2 -2
- package/dist/esm/ai-loading.entry.js +2 -2
- package/dist/esm/ai-message-input.entry.js +1 -1
- package/dist/esm/ai-rating.entry.js +1 -1
- package/dist/esm/ai-route-decision.entry.js +2 -2
- package/dist/esm/ai-suggestion.entry.js +3 -3
- package/dist/esm/ai-voice-input.entry.js +2 -2
- package/dist/esm/{index-BSQ0GkzI.js → index-VMEwYfaX.js} +15 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/ui-ai-kit.js +3 -3
- package/dist/types/components/ai-chat-container/ai-chat-container.d.ts +21 -1
- package/dist/types/components/ai-chat-header/ai-chat-header.d.ts +28 -3
- package/dist/types/components/ai-conversation-list/ai-conversation-list.d.ts +2 -0
- package/dist/types/components/ai-in-chat-browser/ai-in-chat-browser.d.ts +1 -10
- package/dist/types/components.d.ts +107 -53
- package/dist/types/index.d.ts +1 -0
- package/dist/ui-ai-kit/{p-1e8e6440.entry.js → p-062cad02.entry.js} +1 -1
- package/dist/ui-ai-kit/p-17e5d542.entry.js +1 -0
- package/dist/ui-ai-kit/{p-b88808a4.entry.js → p-187db371.entry.js} +1 -1
- package/dist/ui-ai-kit/p-1b247096.entry.js +1 -0
- package/dist/ui-ai-kit/p-278895fd.entry.js +1 -0
- package/dist/ui-ai-kit/{p-39a2d4c3.entry.js → p-338d55d3.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-dac67692.entry.js → p-4359a116.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-3a86919b.entry.js → p-5f005ec5.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-849cd7e2.entry.js → p-6a4b66ed.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-47797619.entry.js → p-6b644d32.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-658d8b24.entry.js → p-6bd54e29.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-eb40ffd0.entry.js → p-83f46030.entry.js} +2 -2
- package/dist/ui-ai-kit/{p-c9dca99e.entry.js → p-8fabdbe8.entry.js} +1 -1
- package/dist/ui-ai-kit/{p-BSQ0GkzI.js → p-VMEwYfaX.js} +2 -2
- package/dist/ui-ai-kit/{p-73cbb80b.entry.js → p-cae762e0.entry.js} +1 -1
- package/dist/ui-ai-kit/p-d02f2db5.entry.js +1 -0
- package/dist/ui-ai-kit/{p-78fb4ceb.entry.js → p-e6236df2.entry.js} +1 -1
- package/dist/ui-ai-kit/ui-ai-kit.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-D4mVoP6B.js +0 -1
- package/dist/components/p-DKsh1ZQX.js +0 -1
- package/dist/ui-ai-kit/p-29d84924.entry.js +0 -1
- package/dist/ui-ai-kit/p-77ef8015.entry.js +0 -1
- package/dist/ui-ai-kit/p-8cb807f3.entry.js +0 -1
- package/dist/ui-ai-kit/p-abd68089.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as a,c as i,h as n,d as t,t as d}from"./p-
|
|
1
|
+
import{p as e,H as a,c as i,h as n,d as t,t as d}from"./p-BPkf7wZg.js";import{i as s}from"./p-DlD8m3rf.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.routeExpand=i(this,"routeExpand")}selectedAgent="";agentIcon="";reason="";confidence=0;detectedLanguage="";expanded=!1;_expanded=!1;routeExpand;componentWillLoad(){this._expanded=this.expanded}renderIcon(e,a,i){const t=s[e];return t?n("span",{class:"icon-wrap",innerHTML:`<svg width="${a}" height="${i}" viewBox="${t.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${t.content}</svg>`}):null}handleToggle(){this._expanded=!this._expanded,this.expanded=this._expanded,this.routeExpand.emit(this._expanded)}render(){return n(t,{key:"fa9b966cf28225fa458fb00d1114fade995258c5"},n("div",{key:"5263c969fd1672e1d302f06173dcdbe4450b162e",class:"route-pill "+(this._expanded?"expanded":"")},n("button",{key:"bf7800e828b0b61174f75343fcf9bca3134dfb2a",class:"route-pill-main",onClick:()=>this.handleToggle()},n("span",{key:"8531aeab0872f59417a37294e780d46962b21ead",class:"route-icon"},this.renderIcon("route",14,14)),n("span",{key:"754529860d90a3ceb4f226ff85b1aecb40f4649e",class:"agent-label"},this.agentIcon&&n("span",{key:"39682d3a761d2cd6fae794fcb6036b0044f8f2dc",class:"agent-emoji","aria-hidden":"true"},this.agentIcon),this.selectedAgent),this.confidence>0&&n("span",{key:"36b3a921ab75c1faa0ece5f286703bf1b0aaca16",class:"confidence-badge"},this.confidence,"%"),n("span",{key:"c5199e986bf35d187cad16027f23e62addc45ecb",class:"expand-icon "+(this._expanded?"expanded":"")},this.renderIcon("arrow-right",12,12))),this._expanded&&n("div",{key:"2a18ae8297ad0d71b14d01d250e15cff452c4b07",class:"route-details"},this.reason&&n("p",{key:"55f5123399929c590fc5c2122fd7220209e5ecac",class:"reason-text"},this.reason),this.confidence>0&&n("div",{key:"fbc69e8cb7820c87764f46630af8f4a77d2d879b",class:"confidence-bar-wrap"},n("div",{key:"1db1d454ef64dcf9e4c673d0a26780bd55f563d2",class:"confidence-bar",style:{width:this.confidence+"%"}})),this.detectedLanguage&&n("div",{key:"8553d1a20678252b8d4f9a1e9f8b64ce3f509ae5",class:"meta-row"},this.renderIcon("list",12,12),n("span",{key:"ec104948a04498d06ed73be89778c5b6d84582a2",class:"lang-chip"},this.detectedLanguage)))))}static get style(){return":host{display:inline-block}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}.route-pill{display:inline-flex;flex-direction:column;background:var(--ai-bg-card);border:1px solid var(--ai-border-default);border-radius:9999px;box-shadow:var(--ai-shadow-sm);overflow:hidden;transition:border-radius 0.2s ease}.route-pill.expanded{border-radius:12px}.route-pill-main{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:none;border:none;cursor:pointer;color:var(--ai-text-primary);font-size:13px;font-weight:500;white-space:nowrap;width:100%}.route-icon{color:var(--ai-accent-dark);display:inline-flex;flex-shrink:0}.agent-label{display:inline-flex;align-items:center;gap:4px}.agent-emoji{font-size:14px;line-height:1}.confidence-badge{font-size:11px;font-weight:600;color:var(--ai-accent-dark);background:var(--ai-accent-bg);padding:1px 6px;border-radius:9999px}.expand-icon{display:inline-flex;margin-inline-start:auto;color:var(--ai-text-secondary);transition:transform 0.2s ease;transform:rotate(0deg)}.expand-icon.expanded{transform:rotate(90deg)}.route-details{display:flex;flex-direction:column;gap:8px;padding:8px 12px 12px;border-top:1px solid var(--ai-border-default);animation:fade-in 0.2s ease}@keyframes fade-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.reason-text{margin:0;font-size:12px;color:var(--ai-text-secondary);line-height:1.5}.confidence-bar-wrap{height:4px;border-radius:9999px;background:var(--ai-border-default);overflow:hidden}.confidence-bar{height:100%;border-radius:9999px;background:var(--ai-accent-dark);transition:width 0.4s ease}.meta-row{display:inline-flex;align-items:center;gap:4px;color:var(--ai-text-secondary)}.lang-chip{font-size:11px;color:var(--ai-text-secondary)}"}},[513,"ai-route-decision",{selectedAgent:[1,"selected-agent"],agentIcon:[1,"agent-icon"],reason:[1],confidence:[2],detectedLanguage:[1,"detected-language"],expanded:[1028],_expanded:[32]}]),o=r,c=function(){"undefined"!=typeof customElements&&["ai-route-decision"].forEach((e=>{"ai-route-decision"===e&&(customElements.get(d(e))||customElements.define(d(e),r))}))};export{o as AiRouteDecision,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i,H as e,c as s,h as a,d as t,t as n}from"./p-
|
|
1
|
+
import{p as i,H as e,c as s,h as a,d as t,t as n}from"./p-BPkf7wZg.js";const o=i(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.suggestionClick=s(this,"suggestionClick")}label="";disabled=!1;suggestionClick;handleClick(){this.disabled||this.suggestionClick.emit(this.label)}render(){return a(t,{key:"510e649f8778e2298270d320f0555c4d960fb056"},a("button",{key:"a4ee17cbd432596804279d8a852635608125452a",class:{chip:!0,"chip--disabled":this.disabled},disabled:this.disabled,onClick:()=>this.handleClick()},a("span",{key:"cb2d97459b0dd6effe83bbfb81a0af9144759477",class:"chip__label"},this.label,a("slot",{key:"ce84f07883f24c216c45da9266af5160baea9cdc"}))))}static get style(){return":host{--ai-suggestion-border:1px solid var(--ai-accent);--ai-suggestion-border-hover:1px solid var(--ai-accent);--ai-suggestion-radius:9999px;--ai-suggestion-padding:8px 12px;--ai-suggestion-gap:4px;--ai-suggestion-font-size:14px;--ai-suggestion-line-height:20px;display:inline-block}.chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--ai-suggestion-gap);background:var(--ai-bg-card);border:var(--ai-suggestion-border);border-radius:var(--ai-suggestion-radius);padding:var(--ai-suggestion-padding);color:var(--ai-accent-dark);font-size:var(--ai-suggestion-font-size);font-weight:400;line-height:var(--ai-suggestion-line-height);font-family:inherit;white-space:nowrap;cursor:pointer;transition:background 0.15s ease, border-color 0.15s ease;outline:none;text-align:start}.chip:hover:not(:disabled){background:var(--ai-accent-bg);border:var(--ai-suggestion-border-hover)}.chip:active:not(:disabled){background:var(--ai-accent-bg)}.chip:focus-visible{outline:2px solid var(--ai-accent);outline-offset:2px}.chip--disabled,.chip:disabled{opacity:0.45;cursor:not-allowed;pointer-events:none}.chip__label{display:inline-flex;align-items:center;gap:var(--ai-suggestion-gap)}"}},[769,"ai-suggestion",{label:[1],disabled:[4]}]),r=o,c=function(){"undefined"!=typeof customElements&&["ai-suggestion"].forEach((i=>{"ai-suggestion"===i&&(customElements.get(n(i))||customElements.define(n(i),o))}))};export{r as AiSuggestion,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as o,d as
|
|
1
|
+
import{V as o,d as p}from"./p-bGFmyIp1.js";const s=o,m=p;export{s as AiVoiceInput,m as defineCustomElement}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BPkf7wZg.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e='@import url("https://cdn.salla.network/fonts/pingarlt.css");:root{--ai-font-family:"PingARLT", sans-serif;font-family:var(--ai-font-family);--ai-bg-card:hsl(var(--white));--ai-bg-surface:hsl(var(--gray-300));--ai-bg-input:hsl(var(--white));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-100));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary));--ai-accent-text:hsl(var(--dark));--ai-user-bubble-bg:hsl(var(--gray-300));--ai-agent-bubble-bg:hsl(var(--white));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(0, 0, 0, 0.15);--ai-scrollbar-thumb-hover:rgba(0, 0, 0, 0.28);--ai-glow-gradient:linear-gradient(90deg, hsl(var(--dark-100)) 0%, hsl(var(--gray)) 50%, hsl(var(--dark-100)) 100%);--ai-shimmer-gradient:linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);--ai-input-glow:linear-gradient(90deg, #73F0EE 0%, #EBF1B1 10%, #A4FFE5 100%);--ai-shadow-sm:0px 1px 2px 0px hsl(var(--dark) / 0.05);--ai-shadow-inner:inset 0px 0px 3px 1px hsl(var(--dark) / 0.06);--ai-shadow-badge:0px 0px 2px 1px hsl(var(--dark) / 0.08);--ai-shadow-active:0px 4px 6px -1px hsl(var(--dark) / 0.08), 0px 2px 4px -1px hsl(var(--dark) / 0.06);--ai-shadow-float:0 8px 32px hsl(var(--dark) / 0.12), 0 2px 8px hsl(var(--dark) / 0.08);--ai-shadow-error:0 2px 8px hsl(var(--dark) / 0.15);--ai-hover-overlay:rgba(0, 0, 0, 0.06);--ai-watermark-circle:#FCFCFC;--ai-watermark-star:#FAFAFA;--ai-input-focus-glow:0 0 10px 4px hsl(var(--secondary) / 0.4);--ai-font-family-mono:monospace;--ai-spacing-2xl:var(--Spacing-Sizes-2xl, 16px)}.dark{--ai-bg-card:hsl(var(--gray-100));--ai-bg-surface:hsl(var(--white-300));--ai-bg-input:hsl(var(--gray-100));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-200));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary-500));--ai-accent-text:hsl(var(--primary-force));--ai-user-bubble-bg:hsl(var(--gray-400));--ai-agent-bubble-bg:hsl(var(--gray-100));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(255, 255, 255, 0.2);--ai-scrollbar-thumb-hover:rgba(255, 255, 255, 0.35);--ai-hover-overlay:rgba(255, 255, 255, 0.08);--ai-watermark-circle:#222222;--ai-watermark-star:#292B2C;--ai-glow-gradient:linear-gradient(90deg, hsl(var(--gray)) 0%, hsl(var(--dark-300)) 50%, hsl(var(--gray)) 100%);--ai-shimmer-gradient:linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 75%);--ai-input-glow:linear-gradient(to right, hsl(var(--secondary-400)), hsl(var(--secondary-100)) 10%, hsl(var(--secondary)))}';function t(e,t,n){const r="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;e&&e!==r;){const r=Object.getOwnPropertyDescriptor(e,t);if(r&&(!n||r.get))return r;e=Object.getPrototypeOf(e)}}var n,r=(e,n)=>{var r;Object.entries(null!=(r=n.l.t)?r:{}).map((([r,[a]])=>{if(31&a||32&a){const a=e[r],s=t(Object.getPrototypeOf(e),r,!0)||Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(e,r,{get(){return s.get.call(this)},set(e){s.set.call(this,e)},configurable:!0,enumerable:!0}),n.i.has(r)?e[r]=n.i.get(r):void 0!==a&&(e[r]=a)}}))},a=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},s=(e,t)=>t in e,l=(e,t)=>(0,console.error)(e,t),i=new Map,o="undefined"!=typeof window?window:{},c=o.HTMLElement||class{},u={o:0,u:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)},f=(()=>{var e;let t=!1;try{null==(e=o.document)||e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch(e){}return t})(),h=(()=>{try{return!!o.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(e){}return!1})(),d=!!h&&(()=>!!o.document&&Object.getOwnPropertyDescriptor(o.document.adoptedStyleSheets,"length").writable)(),g=!1,v=[],p=[],b=(e,t)=>n=>{e.push(n),g||(g=!0,t&&4&u.o?w(m):u.raf(m))},y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){l(e)}e.length=0},m=()=>{y(v),y(p),(g=v.length>0)&&u.raf(m)},w=e=>Promise.resolve(undefined).then(e),x=b(p,!0),$=e=>{const t=new URL(e,u.u);return t.origin!==o.location.origin?t.href:t.pathname},k=e=>u.u=e;function j(){var t;const r=this.attachShadow({mode:"open"});if(void 0===n&&(n=null!=(t=function(e){if(!h)return;const t=new CSSStyleSheet;return t.replaceSync(e),t}(e))?t:null),n)d?r.adoptedStyleSheets.push(n):r.adoptedStyleSheets=[...r.adoptedStyleSheets,n];else if(!h){const t=document.createElement("style");t.innerHTML=e,r.prepend(t)}}var O,S=new WeakMap,E=e=>"sc-"+e.h,A=e=>"object"==(e=typeof e)||"function"===e,C=(e,t,...n)=>{let r=null,a=null,s=!1,l=!1;const i=[],o=t=>{for(let n=0;n<t.length;n++)r=t[n],Array.isArray(r)?o(r):null!=r&&"boolean"!=typeof r&&((s="function"!=typeof e&&!A(r))&&(r=String(r)),s&&l?i[i.length-1].v+=r:i.push(s?F(null,r):r),l=s)};if(o(n),t){t.key&&(a=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const c=F(e,null);return c.p=t,i.length>0&&(c.m=i),c.$=a,c},F=(e,t)=>({o:0,k:e,v:null!=t?t:null,j:null,m:null,p:null,$:null}),M={},L=(e,t)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?String(e):e,N=(e,t)=>{const n=e;return{emit:e=>P(n,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},P=(e,t,n)=>{const r=u.ce(t,n);return e.dispatchEvent(r),r},R=(e,t,n,r,l,i)=>{if(n===r)return;let c=s(e,t),f=t.toLowerCase();if("class"===t){const t=e.classList,a=D(n);let s=D(r);t.remove(...a.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!a.includes(e))))}else if("style"===t){for(const t in n)r&&null!=r[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in r)n&&r[t]===n[t]||(t.includes("-")?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if("key"===t);else if("ref"===t)r&&Q(r,e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){if("a"===t[0]&&t.startsWith("attr:")){const n=t.slice(5);let s;{const t=a(e);if(t&&t.l&&t.l.t){const e=t.l.t[n];e&&e[1]&&(s=e[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==r||!1===r?!1===r&&""!==e.getAttribute(s)||e.removeAttribute(s):e.setAttribute(s,!0===r?"":r))}if("p"===t[0]&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=r}catch(e){}return}{const a=A(r);if((c||a&&null!==r)&&!l)try{if(e.tagName.includes("-"))e[t]!==r&&(e[t]=r);else{const a=null==r?"":r;"list"===t?c=!1:null!=n&&e[t]===a||("function"==typeof e.__lookupSetter__(t)?e[t]=a:e.setAttribute(t,a))}}catch(e){}null==r||!1===r?!1===r&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||l)&&!a&&1===e.nodeType&&e.setAttribute(t,r=!0===r?"":r)}}else if(t="-"===t[2]?t.slice(3):s(o,f)?f.slice(2):f[2]+t.slice(3),n||r){const a=t.endsWith(H);t=t.replace(U,""),n&&u.rel(e,t,n,a),r&&u.ael(e,t,r,a)}},_=/\s/,D=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(_):[]),H="Capture",U=new RegExp(H+"$"),W=(e,t,n)=>{const r=11===t.j.nodeType&&t.j.host?t.j.host:t.j,a=e&&e.p||{},s=t.p||{};for(const e of z(Object.keys(a)))e in s||R(r,e,a[e],void 0,n,t.o);for(const e of z(Object.keys(s)))R(r,e,a[e],s[e],n,t.o)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,T=!1,V=[],q=[],Y=(e,t,n)=>{const r=t.m[n];let a,s,l=0;if(null!=r.v)a=r.j=o.document.createTextNode(r.v);else{if(T||(T="svg"===r.k),!o.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(a=r.j=o.document.createElementNS(T?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",r.k),T&&"foreignObject"===r.k&&(T=!1),W(null,r,T),r.m){const t="template"===r.k?a.content:a;for(l=0;l<r.m.length;++l)s=Y(e,r,l),s&&t.appendChild(s)}"svg"===r.k?T=!1:"foreignObject"===a.tagName&&(T=!0)}return a["s-hn"]=O,a},Z=(e,t,n,r,a,s)=>{let l,i=e;for(i.shadowRoot&&i.tagName===O&&(i=i.shadowRoot),"template"===n.k&&(i=i.content);a<=s;++a)r[a]&&(l=Y(null,n,a),l&&(r[a].j=l,X(i,l,t)))},G=(e,t,n)=>{for(let r=t;r<=n;++r){const t=e[r];if(t){const e=t.j;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.k===t.k&&(n?(n&&!e.$&&t.$&&(e.$=t.$),!0):e.$===t.$),J=(e,t,n=!1)=>{const r=t.j=e.j,a=e.m,s=t.m,l=t.k,i=t.v;null==i?(T="svg"===l||"foreignObject"!==l&&T,"slot"!==l||B||e.O!==t.O&&(t.j["s-sn"]=t.O||"",(e=>{u.o|=1;const t=e.closest(O.toLowerCase());if(null!=t){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"])),r=Array.from(e.__childNodes||e.childNodes);for(const e of n?r.reverse():r)null!=e["s-sh"]&&(X(t,e,null!=n?n:null),e["s-sh"]=void 0)}u.o&=-2})(t.j.parentElement)),W(e,t,T),null!==a&&null!==s?((e,t,n,r,a=!1)=>{let s,l,i=0,o=0,c=0,u=0,f=t.length-1,h=t[0],d=t[f],g=r.length-1,v=r[0],p=r[g];const b="template"===n.k?e.content:e;for(;i<=f&&o<=g;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==v)v=r[++o];else if(null==p)p=r[--g];else if(I(h,v,a))J(h,v,a),h=t[++i],v=r[++o];else if(I(d,p,a))J(d,p,a),d=t[--f],p=r[--g];else if(I(h,p,a))J(h,p,a),X(b,h.j,d.j.nextSibling),h=t[++i],p=r[--g];else if(I(d,v,a))J(d,v,a),X(b,d.j,h.j),d=t[--f],v=r[++o];else{for(c=-1,u=i;u<=f;++u)if(t[u]&&null!==t[u].$&&t[u].$===v.$){c=u;break}c>=0?(l=t[c],l.k!==v.k?s=Y(t&&t[o],n,c):(J(l,v,a),t[c]=void 0,s=l.j),v=r[++o]):(s=Y(t&&t[o],n,o),v=r[++o]),s&&X(h.j.parentNode,s,h.j)}i>f?Z(e,null==r[g+1]?null:r[g+1].j,n,r,o,g):o>g&&G(t,i,f)})(r,a,t,s,n):null!==s?(null!==e.v&&(r.textContent=""),Z(r,null,t,s,0,s.length-1)):!n&&null!==a&&G(a,0,a.length-1),T&&"svg"===l&&(T=!1)):e.v!==i&&(r.data=i)},K=e=>{e.p&&e.p.ref&&V.push((()=>e.p.ref(null))),e.m&&e.m.map(K)},Q=(e,t)=>{q.push((()=>e(t)))},X=(e,t,n)=>e.__insertBefore?e.__insertBefore(t,n):null==e?void 0:e.insertBefore(t,n),ee=(e,t,n=!1)=>{const r=e.$hostElement$,a=e.l,s=e.S||F(null,null);var l;const i=(l=t)&&l.k===M?t:C(null,null,t);if(O=r.tagName,n&&i.p)for(const e of Object.keys(i.p))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.p[e]=r[e]);i.k=null,i.o|=4,e.S=i,i.j=s.j=r.shadowRoot||r,B=!(!(1&a.o)||128&a.o),J(s,i,n),V.forEach((e=>e())),V.length=0,q.forEach((e=>e())),q.length=0},te=(e,t)=>{if(t&&!e.A&&t["s-p"]){const n=t["s-p"].push(new Promise((r=>e.A=()=>{t["s-p"].splice(n-1,1),r()})))}},ne=(e,t)=>{if(e.o|=16,4&e.o)return void(e.o|=512);te(e,e.C);const n=()=>re(e,t);if(!t)return x(n);queueMicrotask((()=>{n()}))},re=(e,t)=>{const n=e.$hostElement$,r=n;if(!r)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let a;return a=ue(r,t?"componentWillLoad":"componentWillUpdate",void 0,n),a=ae(a,(()=>ue(r,"componentWillRender",void 0,n))),ae(a,(()=>le(e,r,t)))},ae=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var r;const a=e.$hostElement$,s=a["s-rc"];n&&(e=>{const t=e.l,n=e.$hostElement$,r=t.o,a=((e,t)=>{var n,r,a;const s=E(t),l=i.get(s);if(!o.document)return s;if(e=11===e.nodeType?e:o.document,l)if("string"==typeof l){let a,i=S.get(e=e.head||e);if(i||S.set(e,i=new Set),!i.has(s)){a=o.document.createElement("style"),a.textContent=l;const c=null!=(n=u.F)?n:function(){var e,t,n;return null!=(n=null==(t=null==(e=o.document.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:t.getAttribute("content"))?n:void 0}();if(null!=c&&a.setAttribute("nonce",c),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(a,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(h){const t=new(null!=(r=e.defaultView)?r:e.ownerDocument.defaultView).CSSStyleSheet;t.replaceSync(l),d?e.adoptedStyleSheets.unshift(t):e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.textContent=l+t.textContent:e.prepend(a)}else e.append(a);1&t.o&&e.insertBefore(a,null),4&t.o&&(a.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let t=S.get(e);if(t||S.set(e,t=new Set),!t.has(s)){const n=null!=(a=e.defaultView)?a:e.ownerDocument.defaultView;let r;if(l.constructor===n.CSSStyleSheet)r=l;else{r=new n.CSSStyleSheet;for(let e=0;e<l.cssRules.length;e++)r.insertRule(l.cssRules[e].cssText,e)}d?e.adoptedStyleSheets.push(r):e.adoptedStyleSheets=[...e.adoptedStyleSheets,r],t.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&r&&(n["s-sc"]=a,n.classList.add(a+"-h"))})(e);ie(e,t,a,n),s&&(s.map((e=>e())),a["s-rc"]=void 0);{const t=null!=(r=a["s-p"])?r:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n).catch(n),e.o|=4,t.length=0)}},ie=(e,t,n,r)=>{try{t=t.render(),e.o&=-17,e.o|=2,ee(e,t,r)}catch(t){l(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=t,r=e.C;ue(n,"componentDidRender",void 0,t),64&e.o?ue(n,"componentDidUpdate",void 0,t):(e.o|=64,fe(t),ue(n,"componentDidLoad",void 0,t),e.M(t),r||ce()),e.A&&(e.A(),e.A=void 0),512&e.o&&w((()=>ne(e,!1))),e.o&=-517},ce=()=>{w((()=>P(o,"appload",{detail:{namespace:"ui-ai-kit"}})))},ue=(e,t,n,r)=>{if(e&&e[t])try{return e[t](n)}catch(e){l(e,r)}},fe=e=>e.classList.add("hydrated"),he=(e,t,n,r)=>{const s=a(e);if(!s)return;const i=e,o=s.i.get(t),c=s.o,u=i;n=L(n,r.t[t][0]);const f=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!f){if(s.i.set(t,n),r.L){const e=r.L[t];e&&e.map((e=>{try{const[[r,a]]=Object.entries(e);(128&c||1&a)&&(u?u[r](n,o,t):s.N.push((()=>{s.P[r](n,o,t)})))}catch(e){l(e,i)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,o,t)&&!(16&c))return;16&c||ne(s,!1)}}},de=(e,n)=>{var r,s;const l=e.prototype;{e.watchers&&!n.L&&(n.L=e.watchers),e.deserializers&&!n.R&&(n.R=e.deserializers),e.serializers&&!n._&&(n._=e.serializers);const i=Object.entries(null!=(r=n.t)?r:{});i.map((([e,[r]])=>{if(31&r||32&r){const{get:s,set:i}=t(l,e)||{};s&&(n.t[e][0]|=2048),i&&(n.t[e][0]|=4096),Object.defineProperty(l,e,{get(){return s?s.apply(this):(t=e,a(this).i.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(l,e,{set(t){const s=a(this);if(s){if(i)return void 0===(32&r?this[e]:s.$hostElement$[e])&&s.i.get(e)&&(t=s.i.get(e)),i.apply(this,[L(t,r)]),void he(this,e,t=32&r?this[e]:s.$hostElement$[e],n);he(this,e,t,n)}}})}}));{const t=new Map;l.attributeChangedCallback=function(e,r,s){u.jmp((()=>{var o;const c=t.get(e),u=a(this);if(this.hasOwnProperty(c),l.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const t=null==u?void 0:u.o;if(u&&t&&!(8&t)&&s!==r){const a=this,l=null==(o=n.L)?void 0:o[e];null==l||l.forEach((n=>{const[[l,i]]=Object.entries(n);null!=a[l]&&(128&t||1&i)&&a[l].call(a,s,r,e)}))}return}const f=i.find((([e])=>e===c));f&&4&f[1][0]&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(l,c);s==this[c]||h.get&&!h.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.L)?s:{}),...i.filter((([e,t])=>31&t[0])).map((([e,n])=>{const r=n[1]||e;return t.set(r,e),r}))]))}}return e},ge=(e,t)=>{const n={o:t[0],h:t[1]};try{n.t=t[2],n.D=t[3],n.L=e.L,n.R=e.R,n._=e._;const s=e.prototype.connectedCallback,o=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,t)=>{const n={o:0,$hostElement$:e,l:t,i:new Map,H:new Map};n.U=new Promise((e=>n.M=e)),e["s-p"]=[],e["s-rc"]=[];const a=n;e.__stencil__getHostRef=()=>a,512&t.o&&r(e,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const e=a(this);if(!e)return;ve(this,e,n.D),this.__hasHostListenerAttached=!0}(e=>{if(!(1&u.o)){const t=a(e);if(!t)return;const n=t.l,r=()=>{};if(1&t.o)ve(e,t,n.D),(null==t?void 0:t.P)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.C=n);break}}n.t&&Object.entries(n.t).map((([t,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let r;try{if(!(32&t.o)&&(t.o|=32,r=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128)),r&&r.style)){let e;"string"==typeof r.style&&(e=r.style);const t=E(n);if(!i.has(t)){const r=()=>{};((e,t,n)=>{let r=i.get(e);h&&n?(r=r||new CSSStyleSheet,"string"==typeof r?r=t:r.replaceSync(t)):r=t,i.set(e,r)})(t,e,!!(1&n.o)),r()}}const a=t.C,s=()=>ne(t,!0);a&&a["s-rc"]?a["s-rc"].push(s):s()}catch(n){l(n,e),t.A&&(t.A(),t.A=void 0),t.M&&t.M(e)}})(e,t,n)}r()}})(this),s&&s.call(this)},disconnectedCallback(){(async e=>{if(!(1&u.o)){const t=a(e);(null==t?void 0:t.W)&&(t.W.map((e=>e())),t.W=void 0)}S.has(e)&&S.delete(e),e.shadowRoot&&S.has(e.shadowRoot)&&S.delete(e.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,n)}}),Object.defineProperty(e,"is",{value:n.h,configurable:!0}),de(e,n)}catch(t){return l(t),e}},ve=(e,t,n)=>{n&&o.document&&n.map((([n,r,a])=>{const s=be(o.document,e,n),l=pe(t,a),i=ye(n);u.ael(s,r,l,i),(t.W=t.W||[]).push((()=>u.rel(s,r,l,i)))}))},pe=(e,t)=>n=>{try{e.$hostElement$[t](n)}catch(t){l(t,e.$hostElement$)}},be=(e,t,n)=>4&n?e:t,ye=e=>f?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),me=e=>u.F=e,we=e=>Object.assign(u,e);function xe(e,t){ee({l:{o:0,h:t.tagName},$hostElement$:t},e)}function $e(e){return e}export{c as H,me as a,we as b,N as c,M as d,$ as g,C as h,ge as p,xe as r,k as s,$e as t}
|
|
1
|
+
const e='@import url("https://cdn.salla.network/fonts/pingarlt.css");:root{--ai-font-family:"PingARLT", sans-serif;font-family:var(--ai-font-family);--ai-bg-card:hsl(var(--white));--ai-bg-surface:hsl(var(--gray-300));--ai-bg-input:hsl(var(--white));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-100));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary));--ai-accent-text:hsl(var(--dark));--ai-user-bubble-bg:hsl(var(--gray-300));--ai-agent-bubble-bg:hsl(var(--white));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(0, 0, 0, 0.15);--ai-scrollbar-thumb-hover:rgba(0, 0, 0, 0.28);--ai-glow-gradient:linear-gradient(90deg, hsl(var(--dark-100)) 0%, hsl(var(--gray)) 50%, hsl(var(--dark-100)) 100%);--ai-shimmer-gradient:linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);--ai-input-glow:linear-gradient(90deg, #73F0EE 0%, #EBF1B1 10%, #A4FFE5 100%);--ai-shadow-sm:0px 1px 2px 0px hsl(var(--dark) / 0.05);--ai-shadow-inner:inset 0px 0px 3px 1px hsl(var(--dark) / 0.06);--ai-shadow-badge:0px 0px 2px 1px hsl(var(--dark) / 0.08);--ai-shadow-active:0px 4px 6px -1px hsl(var(--dark) / 0.08), 0px 2px 4px -1px hsl(var(--dark) / 0.06);--ai-shadow-float:0 8px 32px hsl(var(--dark) / 0.12), 0 2px 8px hsl(var(--dark) / 0.08);--ai-shadow-error:0 2px 8px hsl(var(--dark) / 0.15);--ai-hover-overlay:rgba(0, 0, 0, 0.06);--ai-watermark-circle:#FCFCFC;--ai-watermark-star:#FAFAFA;--ai-input-focus-glow:0 0 10px 4px hsl(var(--secondary) / 0.4);--ai-font-family-mono:monospace;--ai-spacing-2xl:var(--Spacing-Sizes-2xl, 16px)}.dark{--ai-bg-card:hsl(var(--gray-100));--ai-bg-surface:hsl(var(--white-300));--ai-bg-input:hsl(var(--gray-100));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-200));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary-500));--ai-accent-text:hsl(var(--primary-force));--ai-user-bubble-bg:hsl(var(--gray-400));--ai-agent-bubble-bg:hsl(var(--gray-100));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(255, 255, 255, 0.2);--ai-scrollbar-thumb-hover:rgba(255, 255, 255, 0.35);--ai-hover-overlay:rgba(255, 255, 255, 0.08);--ai-watermark-circle:#222222;--ai-watermark-star:#292B2C;--ai-glow-gradient:linear-gradient(90deg, hsl(var(--gray)) 0%, hsl(var(--dark-300)) 50%, hsl(var(--gray)) 100%);--ai-shimmer-gradient:linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 75%);--ai-input-glow:linear-gradient(to right, hsl(var(--secondary-400)), hsl(var(--secondary-100)) 10%, hsl(var(--secondary)))}';function t(e,t,n){const r="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;e&&e!==r;){const r=Object.getOwnPropertyDescriptor(e,t);if(r&&(!n||r.get))return r;e=Object.getPrototypeOf(e)}}var n,r=(e,n)=>{var r;Object.entries(null!=(r=n.l.t)?r:{}).map((([r,[a]])=>{if(31&a||32&a){const a=e[r],s=t(Object.getPrototypeOf(e),r,!0)||Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(e,r,{get(){return s.get.call(this)},set(e){s.set.call(this,e)},configurable:!0,enumerable:!0}),n.i.has(r)?e[r]=n.i.get(r):void 0!==a&&(e[r]=a)}}))},a=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},s=(e,t)=>t in e,l=(e,t)=>(0,console.error)(e,t),i=new Map,o="undefined"!=typeof window?window:{},c=o.HTMLElement||class{},u={o:0,u:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)},f=(()=>{var e;let t=!1;try{null==(e=o.document)||e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=!0}}))}catch(e){}return t})(),h=(()=>{try{return!!o.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(e){}return!1})(),d=!!h&&(()=>!!o.document&&Object.getOwnPropertyDescriptor(o.document.adoptedStyleSheets,"length").writable)(),g=!1,v=[],p=[],b=(e,t)=>n=>{e.push(n),g||(g=!0,t&&4&u.o?w(m):u.raf(m))},y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){l(e)}e.length=0},m=()=>{y(v),y(p),(g=v.length>0)&&u.raf(m)},w=e=>Promise.resolve(undefined).then(e),x=b(p,!0),$=e=>{const t=new URL(e,u.u);return t.origin!==o.location.origin?t.href:t.pathname},k=e=>u.u=e;function j(){var t;const r=this.attachShadow({mode:"open"});if(void 0===n&&(n=null!=(t=function(e){if(!h)return;const t=new CSSStyleSheet;return t.replaceSync(e),t}(e))?t:null),n)d?r.adoptedStyleSheets.push(n):r.adoptedStyleSheets=[...r.adoptedStyleSheets,n];else if(!h){const t=document.createElement("style");t.innerHTML=e,r.prepend(t)}}var O,S=new WeakMap,E=e=>"sc-"+e.h,A=e=>"object"==(e=typeof e)||"function"===e,C=(e,t,...n)=>{let r=null,a=null,s=!1,l=!1;const i=[],o=t=>{for(let n=0;n<t.length;n++)r=t[n],Array.isArray(r)?o(r):null!=r&&"boolean"!=typeof r&&((s="function"!=typeof e&&!A(r))&&(r=String(r)),s&&l?i[i.length-1].v+=r:i.push(s?F(null,r):r),l=s)};if(o(n),t){t.key&&(a=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const c=F(e,null);return c.p=t,i.length>0&&(c.m=i),c.$=a,c},F=(e,t)=>({o:0,k:e,v:null!=t?t:null,j:null,m:null,p:null,$:null}),M={},L=(e,t)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?String(e):e,N=(e,t)=>{const n=e;return{emit:e=>P(n,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},P=(e,t,n)=>{const r=u.ce(t,n);return e.dispatchEvent(r),r},R=(e,t,n,r,l,i)=>{if(n===r)return;let c=s(e,t),f=t.toLowerCase();if("class"===t){const t=e.classList,a=D(n);let s=D(r);t.remove(...a.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!a.includes(e))))}else if("style"===t){for(const t in n)r&&null!=r[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in r)n&&r[t]===n[t]||(t.includes("-")?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if("key"===t);else if("ref"===t)r&&Q(r,e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){if("a"===t[0]&&t.startsWith("attr:")){const n=t.slice(5);let s;{const t=a(e);if(t&&t.l&&t.l.t){const e=t.l.t[n];e&&e[1]&&(s=e[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==r||!1===r?!1===r&&""!==e.getAttribute(s)||e.removeAttribute(s):e.setAttribute(s,!0===r?"":r))}if("p"===t[0]&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=r}catch(e){}return}{const a=A(r);if((c||a&&null!==r)&&!l)try{if(e.tagName.includes("-"))e[t]!==r&&(e[t]=r);else{const a=null==r?"":r;"list"===t?c=!1:null!=n&&e[t]===a||("function"==typeof e.__lookupSetter__(t)?e[t]=a:e.setAttribute(t,a))}}catch(e){}null==r||!1===r?!1===r&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||l)&&!a&&1===e.nodeType&&e.setAttribute(t,r=!0===r?"":r)}}else if(t="-"===t[2]?t.slice(3):s(o,f)?f.slice(2):f[2]+t.slice(3),n||r){const a=t.endsWith(H);t=t.replace(U,""),n&&u.rel(e,t,n,a),r&&u.ael(e,t,r,a)}},_=/\s/,D=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(_):[]),H="Capture",U=new RegExp(H+"$"),W=(e,t,n)=>{const r=11===t.j.nodeType&&t.j.host?t.j.host:t.j,a=e&&e.p||{},s=t.p||{};for(const e of z(Object.keys(a)))e in s||R(r,e,a[e],void 0,n,t.o);for(const e of z(Object.keys(s)))R(r,e,a[e],s[e],n,t.o)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,T=!1,V=[],q=[],Y=(e,t,n)=>{const r=t.m[n];let a,s,l=0;if(null!=r.v)a=r.j=o.document.createTextNode(r.v);else{if(T||(T="svg"===r.k),!o.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(a=r.j=o.document.createElementNS(T?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",r.k),T&&"foreignObject"===r.k&&(T=!1),W(null,r,T),r.m){const t="template"===r.k?a.content:a;for(l=0;l<r.m.length;++l)s=Y(e,r,l),s&&t.appendChild(s)}"svg"===r.k?T=!1:"foreignObject"===a.tagName&&(T=!0)}return a["s-hn"]=O,a},Z=(e,t,n,r,a,s)=>{let l,i=e;for(i.shadowRoot&&i.tagName===O&&(i=i.shadowRoot),"template"===n.k&&(i=i.content);a<=s;++a)r[a]&&(l=Y(null,n,a),l&&(r[a].j=l,X(i,l,t)))},G=(e,t,n)=>{for(let r=t;r<=n;++r){const t=e[r];if(t){const e=t.j;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.k===t.k&&(n?(n&&!e.$&&t.$&&(e.$=t.$),!0):e.$===t.$),J=(e,t,n=!1)=>{const r=t.j=e.j,a=e.m,s=t.m,l=t.k,i=t.v;null==i?(T="svg"===l||"foreignObject"!==l&&T,"slot"!==l||B||e.O!==t.O&&(t.j["s-sn"]=t.O||"",(e=>{u.o|=1;const t=e.closest(O.toLowerCase());if(null!=t){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"])),r=Array.from(e.__childNodes||e.childNodes);for(const e of n?r.reverse():r)null!=e["s-sh"]&&(X(t,e,null!=n?n:null),e["s-sh"]=void 0)}u.o&=-2})(t.j.parentElement)),W(e,t,T),null!==a&&null!==s?((e,t,n,r,a=!1)=>{let s,l,i=0,o=0,c=0,u=0,f=t.length-1,h=t[0],d=t[f],g=r.length-1,v=r[0],p=r[g];const b="template"===n.k?e.content:e;for(;i<=f&&o<=g;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==v)v=r[++o];else if(null==p)p=r[--g];else if(I(h,v,a))J(h,v,a),h=t[++i],v=r[++o];else if(I(d,p,a))J(d,p,a),d=t[--f],p=r[--g];else if(I(h,p,a))J(h,p,a),X(b,h.j,d.j.nextSibling),h=t[++i],p=r[--g];else if(I(d,v,a))J(d,v,a),X(b,d.j,h.j),d=t[--f],v=r[++o];else{for(c=-1,u=i;u<=f;++u)if(t[u]&&null!==t[u].$&&t[u].$===v.$){c=u;break}c>=0?(l=t[c],l.k!==v.k?s=Y(t&&t[o],n,c):(J(l,v,a),t[c]=void 0,s=l.j),v=r[++o]):(s=Y(t&&t[o],n,o),v=r[++o]),s&&X(h.j.parentNode,s,h.j)}i>f?Z(e,null==r[g+1]?null:r[g+1].j,n,r,o,g):o>g&&G(t,i,f)})(r,a,t,s,n):null!==s?(null!==e.v&&(r.textContent=""),Z(r,null,t,s,0,s.length-1)):!n&&null!==a&&G(a,0,a.length-1),T&&"svg"===l&&(T=!1)):e.v!==i&&(r.data=i)},K=e=>{e.p&&e.p.ref&&V.push((()=>e.p.ref(null))),e.m&&e.m.map(K)},Q=(e,t)=>{q.push((()=>e(t)))},X=(e,t,n)=>e.__insertBefore?e.__insertBefore(t,n):null==e?void 0:e.insertBefore(t,n),ee=(e,t,n=!1)=>{const r=e.$hostElement$,a=e.l,s=e.S||F(null,null);var l;const i=(l=t)&&l.k===M?t:C(null,null,t);if(O=r.tagName,a.A&&(i.p=i.p||{},a.A.forEach((([e,t])=>{i.p[t]=r[e]}))),n&&i.p)for(const e of Object.keys(i.p))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.p[e]=r[e]);i.k=null,i.o|=4,e.S=i,i.j=s.j=r.shadowRoot||r,B=!(!(1&a.o)||128&a.o),J(s,i,n),V.forEach((e=>e())),V.length=0,q.forEach((e=>e())),q.length=0},te=(e,t)=>{if(t&&!e.C&&t["s-p"]){const n=t["s-p"].push(new Promise((r=>e.C=()=>{t["s-p"].splice(n-1,1),r()})))}},ne=(e,t)=>{if(e.o|=16,4&e.o)return void(e.o|=512);te(e,e.F);const n=()=>re(e,t);if(!t)return x(n);queueMicrotask((()=>{n()}))},re=(e,t)=>{const n=e.$hostElement$,r=n;if(!r)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let a;return a=ue(r,t?"componentWillLoad":"componentWillUpdate",void 0,n),a=ae(a,(()=>ue(r,"componentWillRender",void 0,n))),ae(a,(()=>le(e,r,t)))},ae=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var r;const a=e.$hostElement$,s=a["s-rc"];n&&(e=>{const t=e.l,n=e.$hostElement$,r=t.o,a=((e,t)=>{var n,r,a;const s=E(t),l=i.get(s);if(!o.document)return s;if(e=11===e.nodeType?e:o.document,l)if("string"==typeof l){let a,i=S.get(e=e.head||e);if(i||S.set(e,i=new Set),!i.has(s)){a=o.document.createElement("style"),a.textContent=l;const c=null!=(n=u.M)?n:function(){var e,t,n;return null!=(n=null==(t=null==(e=o.document.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:t.getAttribute("content"))?n:void 0}();if(null!=c&&a.setAttribute("nonce",c),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(a,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(h){const t=new(null!=(r=e.defaultView)?r:e.ownerDocument.defaultView).CSSStyleSheet;t.replaceSync(l),d?e.adoptedStyleSheets.unshift(t):e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.textContent=l+t.textContent:e.prepend(a)}else e.append(a);1&t.o&&e.insertBefore(a,null),4&t.o&&(a.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let t=S.get(e);if(t||S.set(e,t=new Set),!t.has(s)){const n=null!=(a=e.defaultView)?a:e.ownerDocument.defaultView;let r;if(l.constructor===n.CSSStyleSheet)r=l;else{r=new n.CSSStyleSheet;for(let e=0;e<l.cssRules.length;e++)r.insertRule(l.cssRules[e].cssText,e)}d?e.adoptedStyleSheets.push(r):e.adoptedStyleSheets=[...e.adoptedStyleSheets,r],t.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&r&&(n["s-sc"]=a,n.classList.add(a+"-h"))})(e);ie(e,t,a,n),s&&(s.map((e=>e())),a["s-rc"]=void 0);{const t=null!=(r=a["s-p"])?r:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n).catch(n),e.o|=4,t.length=0)}},ie=(e,t,n,r)=>{try{t=t.render(),e.o&=-17,e.o|=2,ee(e,t,r)}catch(t){l(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=t,r=e.F;ue(n,"componentDidRender",void 0,t),64&e.o?ue(n,"componentDidUpdate",void 0,t):(e.o|=64,fe(t),ue(n,"componentDidLoad",void 0,t),e.L(t),r||ce()),e.C&&(e.C(),e.C=void 0),512&e.o&&w((()=>ne(e,!1))),e.o&=-517},ce=()=>{w((()=>P(o,"appload",{detail:{namespace:"ui-ai-kit"}})))},ue=(e,t,n,r)=>{if(e&&e[t])try{return e[t](n)}catch(e){l(e,r)}},fe=e=>e.classList.add("hydrated"),he=(e,t,n,r)=>{const s=a(e);if(!s)return;const i=e,o=s.i.get(t),c=s.o,u=i;n=L(n,r.t[t][0]);const f=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!f){if(s.i.set(t,n),r.N){const e=r.N[t];e&&e.map((e=>{try{const[[r,a]]=Object.entries(e);(128&c||1&a)&&(u?u[r](n,o,t):s.P.push((()=>{s.R[r](n,o,t)})))}catch(e){l(e,i)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,o,t)&&!(16&c))return;16&c||ne(s,!1)}}},de=(e,n)=>{var r,s;const l=e.prototype;{e.watchers&&!n.N&&(n.N=e.watchers),e.deserializers&&!n._&&(n._=e.deserializers),e.serializers&&!n.D&&(n.D=e.serializers);const i=Object.entries(null!=(r=n.t)?r:{});i.map((([e,[r]])=>{if(31&r||32&r){const{get:s,set:i}=t(l,e)||{};s&&(n.t[e][0]|=2048),i&&(n.t[e][0]|=4096),Object.defineProperty(l,e,{get(){return s?s.apply(this):(t=e,a(this).i.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(l,e,{set(t){const s=a(this);if(s){if(i)return void 0===(32&r?this[e]:s.$hostElement$[e])&&s.i.get(e)&&(t=s.i.get(e)),i.apply(this,[L(t,r)]),void he(this,e,t=32&r?this[e]:s.$hostElement$[e],n);he(this,e,t,n)}}})}}));{const t=new Map;l.attributeChangedCallback=function(e,r,s){u.jmp((()=>{var o;const c=t.get(e),u=a(this);if(this.hasOwnProperty(c),l.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const t=null==u?void 0:u.o;if(u&&t&&!(8&t)&&s!==r){const a=this,l=null==(o=n.N)?void 0:o[e];null==l||l.forEach((n=>{const[[l,i]]=Object.entries(n);null!=a[l]&&(128&t||1&i)&&a[l].call(a,s,r,e)}))}return}const f=i.find((([e])=>e===c));f&&4&f[1][0]&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(l,c);s==this[c]||h.get&&!h.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.N)?s:{}),...i.filter((([e,t])=>31&t[0])).map((([e,r])=>{var a;const s=r[1]||e;return t.set(s,e),512&r[0]&&(null==(a=n.A)||a.push([e,s])),s}))]))}}return e},ge=(e,t)=>{const n={o:t[0],h:t[1]};try{n.t=t[2],n.H=t[3],n.N=e.N,n._=e._,n.D=e.D,n.A=[];const s=e.prototype.connectedCallback,o=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,t)=>{const n={o:0,$hostElement$:e,l:t,i:new Map,U:new Map};n.W=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[];const a=n;e.__stencil__getHostRef=()=>a,512&t.o&&r(e,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const e=a(this);if(!e)return;ve(this,e,n.H),this.__hasHostListenerAttached=!0}(e=>{if(!(1&u.o)){const t=a(e);if(!t)return;const n=t.l,r=()=>{};if(1&t.o)ve(e,t,n.H),(null==t?void 0:t.R)||(null==t?void 0:t.W)&&t.W.then((()=>{}));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.F=n);break}}n.t&&Object.entries(n.t).map((([t,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let r;try{if(!(32&t.o)&&(t.o|=32,r=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128)),r&&r.style)){let e;"string"==typeof r.style&&(e=r.style);const t=E(n);if(!i.has(t)){const r=()=>{};((e,t,n)=>{let r=i.get(e);h&&n?(r=r||new CSSStyleSheet,"string"==typeof r?r=t:r.replaceSync(t)):r=t,i.set(e,r)})(t,e,!!(1&n.o)),r()}}const a=t.F,s=()=>ne(t,!0);a&&a["s-rc"]?a["s-rc"].push(s):s()}catch(n){l(n,e),t.C&&(t.C(),t.C=void 0),t.L&&t.L(e)}})(e,t,n)}r()}})(this),s&&s.call(this)},disconnectedCallback(){(async e=>{if(!(1&u.o)){const t=a(e);(null==t?void 0:t.B)&&(t.B.map((e=>e())),t.B=void 0)}S.has(e)&&S.delete(e),e.shadowRoot&&S.has(e.shadowRoot)&&S.delete(e.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,n)}}),Object.defineProperty(e,"is",{value:n.h,configurable:!0}),de(e,n)}catch(t){return l(t),e}},ve=(e,t,n)=>{n&&o.document&&n.map((([n,r,a])=>{const s=be(o.document,e,n),l=pe(t,a),i=ye(n);u.ael(s,r,l,i),(t.B=t.B||[]).push((()=>u.rel(s,r,l,i)))}))},pe=(e,t)=>n=>{try{e.$hostElement$[t](n)}catch(t){l(t,e.$hostElement$)}},be=(e,t,n)=>4&n?e:t,ye=e=>f?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),me=e=>u.M=e,we=e=>Object.assign(u,e);function xe(e,t){ee({l:{o:0,h:t.tagName},$hostElement$:t},e)}function $e(e){return e}export{c as H,me as a,we as b,N as c,M as d,$ as g,C as h,ge as p,xe as r,k as s,$e as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,H as d,h as r,d as o,t as i}from"./p-
|
|
1
|
+
import{p as a,H as d,h as r,d as o,t as i}from"./p-BPkf7wZg.js";const s=a(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow()}noPadding=!1;noShadow=!1;render(){return r(o,{key:"849dbf8d8eac913c76e71a10cb9b30f9fda3c320"},r("div",{key:"5d9f75428e6d94cf2c3729698e87fd3185c20129",class:{card:!0,"card--no-padding":this.noPadding,"card--no-shadow":this.noShadow}},r("slot",{key:"f604568228c02514ff0f569cfa4fd706c247652e"})))}static get style(){return":host{--ai-card-border:1px solid var(--ai-border-default);--ai-card-radius:16px;--ai-card-padding:16px;--ai-card-gap:12px;--ai-card-shadow:var(--ai-shadow-sm);display:block}.card{background:var(--ai-bg-card);border:var(--ai-card-border);border-radius:var(--ai-card-radius);padding:var(--ai-card-padding);box-shadow:var(--ai-card-shadow);box-sizing:border-box;overflow:hidden;color:var(--ai-text-primary);width:100%;display:flex;flex-direction:column;gap:var(--ai-card-gap);text-align:start;font-size:14px;line-height:20px}.card--no-padding{padding:0}.card--no-shadow{box-shadow:none}"}},[769,"ai-card",{noPadding:[4,"no-padding"],noShadow:[4,"no-shadow"]}]);function c(){"undefined"!=typeof customElements&&["ai-card"].forEach((a=>{"ai-card"===a&&(customElements.get(i(a))||customElements.define(i(a),s))}))}export{s as A,c as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,c as i,h as r,d as a,t as n}from"./p-BPkf7wZg.js";import{i as s}from"./p-DlD8m3rf.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.conversationSelect=i(this,"conversationSelect"),this.conversationDelete=i(this,"conversationDelete"),this.retryClick=i(this,"retryClick")}items=[];activeId="";loading=!1;emptyText="لا توجد محادثات";error=!1;errorText="تعذّر تحميل المحادثات";retryLabel="إعادة المحاولة";deletingId="";conversationSelect;conversationDelete;retryClick;renderIcon(e,t,i){const a=s[e];return a?r("span",{class:"icon-wrap",innerHTML:`<svg width="${t}" height="${i}" viewBox="${a.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${a.content}</svg>`}):null}formatRelativeTime(e){if(!e)return"";try{const t=new Date(e);if(isNaN(t.getTime()))return e;const i=Date.now()-t.getTime(),r=Math.floor(i/6e4),a=Math.floor(r/60),n=Math.floor(a/24),s="undefined"!=typeof document&&document.documentElement.lang||"ar",o=new Intl.RelativeTimeFormat(s,{numeric:"auto"});return r<1?o.format(0,"second"):r<60?o.format(-r,"minute"):a<24?o.format(-a,"hour"):o.format(-n,"day")}catch{return e}}renderRatingDots(e){return r("div",{class:"rating-dots","aria-label":e?`تقييم ${e} من 5`:void 0},Array.from({length:5},((t,i)=>r("span",{class:"rating-dot "+(i<(e??0)?"rating-dot--filled":"")}))))}renderSkeleton(){return r("div",{class:"skeleton-list"},[1,2,3,4].map((e=>r("div",{key:e,class:"skeleton-item"},r("div",{class:"skeleton-line skeleton-line--title"}),r("div",{class:"skeleton-line skeleton-line--preview"}),r("div",{class:"skeleton-line skeleton-line--meta"})))))}renderEmpty(){return r("div",{class:"empty-state"},r("div",{class:"empty-state__icon"},this.renderIcon("list",24,24)),r("p",{class:"empty-state__text"},this.emptyText))}renderError(){return r("div",{class:"error-state"},r("div",{class:"error-state__icon"},this.renderIcon("wifi-off",24,24)),r("p",{class:"error-state__text"},this.errorText),r("button",{class:"error-state__retry",onClick:()=>this.retryClick.emit()},this.renderIcon("reload",14,14),r("span",null,this.retryLabel)))}render(){const e=!this.loading&&!this.error&&0===this.items.length;return r(a,{key:"8cf17cedd5c41f0d6ffd2d06e557dc370041d1aa"},r("div",{key:"50f5eeb57228f55d72acf517ed5eeb5d79e13a4b",class:"conversation-list"},r("div",{key:"763f7cb557fb9abea75e08379d0ea9090b00ac1e",class:"list-scroll",role:"list"},this.loading?this.renderSkeleton():this.error?this.renderError():e?this.renderEmpty():this.items.map((e=>{const t=e.id===this.activeId;return r("div",{key:e.id,class:{"conv-item":!0,"conv-item--active":t},role:"listitem","aria-current":t?"true":void 0,onClick:()=>this.conversationSelect.emit(e.id)},r("div",{class:"conv-item__body"},r("p",{class:"conv-item__title"},e.title),r("p",{class:"conv-item__preview"},e.preview),r("div",{class:"conv-item__meta"},r("span",{class:"conv-item__time"},this.formatRelativeTime(e.timestamp)),null!=e.rating&&this.renderRatingDots(e.rating))),r("button",{class:{"delete-btn":!0,"delete-btn--deleting":this.deletingId===e.id},"aria-label":"حذف المحادثة",disabled:this.deletingId===e.id,onClick:t=>{t.stopPropagation(),this.deletingId!==e.id&&this.conversationDelete.emit(e.id)}},this.deletingId===e.id?r("span",{class:"delete-spinner","aria-label":"جاري الحذف"}):this.renderIcon("cancel",14,14)))})))))}static get style(){return":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.conversation-list{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;background:var(--ai-bg-surface)}.list-scroll{flex:1;min-height:0;overflow-y:auto;padding:0 8px 12px;scrollbar-width:thin;scrollbar-color:var(--ai-scrollbar-thumb) transparent}.list-scroll::-webkit-scrollbar{width:3px}.list-scroll::-webkit-scrollbar-track{background:transparent}.list-scroll::-webkit-scrollbar-thumb{background:var(--ai-scrollbar-thumb);border-radius:99px}.list-scroll::-webkit-scrollbar-thumb:hover{background:var(--ai-scrollbar-thumb-hover)}.conv-item{display:flex;align-items:flex-start;gap:6px;margin-top:6px;padding:10px 10px 10px 6px;border-radius:10px;cursor:pointer;transition:background 0.15s;position:relative}.conv-item:hover{background:var(--ai-bg-card)}.conv-item--active{background:var(--ai-bg-card);box-shadow:var(--ai-shadow-sm)}.conv-item__body{flex:1;min-width:0}.conv-item__title{margin:0 0 3px;font-size:13px;font-weight:600;color:var(--ai-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conv-item__preview{margin:0 0 5px;font-size:12px;color:var(--ai-text-muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.conv-item__meta{display:flex;align-items:center;gap:8px}.conv-item__time{font-size:11px;color:var(--ai-text-muted);flex-shrink:0}.rating-dots{display:flex;align-items:center;gap:3px}.rating-dot{width:6px;height:6px;border-radius:50%;background:var(--ai-border-default);transition:background 0.15s}.rating-dot--filled{background:var(--ai-accent-warning, #ffaf44)}.delete-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;background:transparent;border:none;border-radius:6px;cursor:pointer;color:var(--ai-text-muted);opacity:0;transition:opacity 0.15s, background 0.15s, color 0.15s;margin-block-start:2px}.conv-item:hover .delete-btn,.conv-item--active .delete-btn{opacity:1}.delete-btn:hover{background:var(--ai-status-danger-bg, rgba(239, 68, 68, 0.1));color:var(--ai-status-danger, #ef4444)}.delete-btn .icon-wrap{display:inline-flex;align-items:center;line-height:0}.delete-btn--deleting{opacity:1;cursor:default;pointer-events:none}.delete-spinner{display:block;width:12px;height:12px;border:2px solid var(--ai-border-default);border-top-color:var(--ai-text-muted);border-radius:50%;animation:delete-spin 0.7s linear infinite}@keyframes delete-spin{to{transform:rotate(360deg)}}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 16px;text-align:center}.empty-state__icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--ai-bg-card);color:var(--ai-text-muted);line-height:0}.empty-state__icon .icon-wrap{display:inline-flex;align-items:center;line-height:0}.empty-state__text{margin:0;font-size:13px;color:var(--ai-text-muted);line-height:1.4}.error-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 16px;text-align:center}.error-state__icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--ai-status-danger-bg, rgba(239, 68, 68, 0.1));color:var(--ai-status-danger, #ef4444);line-height:0}.error-state__icon .icon-wrap{display:inline-flex;align-items:center;line-height:0}.error-state__text{margin:0;font-size:13px;color:var(--ai-text-muted);line-height:1.4}.error-state__retry{display:inline-flex;align-items:center;gap:4px;margin-top:4px;padding:6px 14px;font-size:12px;font-weight:600;color:var(--ai-text-primary);background:var(--ai-bg-card);border:1px solid var(--ai-border-default);border-radius:8px;cursor:pointer;transition:background 0.15s, box-shadow 0.15s}.error-state__retry:hover{box-shadow:var(--ai-shadow-sm)}.error-state__retry .icon-wrap{display:inline-flex;align-items:center;line-height:0}.skeleton-list{display:flex;flex-direction:column;gap:4px}.skeleton-item{padding:10px;border-radius:10px;display:flex;flex-direction:column;gap:6px}.skeleton-line{border-radius:6px;background:var(--ai-shimmer-gradient, linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%));background-size:200% 100%;animation:shimmer 2s linear infinite;height:12px}.skeleton-line--title{width:65%;height:13px}.skeleton-line--preview{width:100%}.skeleton-line--meta{width:35%;height:10px}@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}"}},[513,"ai-conversation-list",{items:[16],activeId:[1,"active-id"],loading:[4],emptyText:[1,"empty-text"],error:[4],errorText:[1,"error-text"],retryLabel:[1,"retry-label"],deletingId:[1,"deleting-id"]}]);function l(){"undefined"!=typeof customElements&&["ai-conversation-list"].forEach((e=>{"ai-conversation-list"===e&&(customElements.get(n(e))||customElements.define(n(e),o))}))}export{o as A,l as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as i,t as n}from"./p-
|
|
1
|
+
import{p as t,H as s,h as e,d as i,t as n}from"./p-BPkf7wZg.js";import{i as o}from"./p-DlD8m3rf.js";const r=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}name;size=16;render(){const t=o[this.name];return t?e(i,null,e("svg",{width:this.size,height:this.size,viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",ref:s=>s&&(s.innerHTML=t.content),"aria-hidden":"true"})):null}static get style(){return":host{display:inline-flex;align-items:center;justify-content:center}svg{display:block}"}},[513,"ai-icon",{name:[1],size:[2]}]);function a(){"undefined"!=typeof customElements&&["ai-icon"].forEach((t=>{"ai-icon"===t&&(customElements.get(n(t))||customElements.define(n(t),r))}))}export{r as A,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,c as e,h as r,d as a,t as o}from"./p-
|
|
1
|
+
import{p as t,H as i,c as e,h as r,d as a,t as o}from"./p-BPkf7wZg.js";import{d as s}from"./p-DZuBxUde.js";const n=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.audioRecorded=e(this,"audioRecorded"),this.recordingCancel=e(this,"recordingCancel")}get el(){return this}disabled=!1;showWaveform=!0;autoStart=!1;errorText="";waveformColor="";state="idle";error=null;recordingDuration=0;submitPulse=!1;audioRecorded;recordingCancel;streamRef=null;audioContextRef=null;analyserRef=null;mediaRecorderRef=null;audioChunks=[];recordingStartTime=0;recordingTimer=null;maxTimeoutRef=null;canvasRef;animationFrameId=0;prevHeights=[];componentDidLoad(){this.autoStart&&!this.disabled&&this.startRecording()}disconnectedCallback(){this.cleanup()}cleanup=()=>{this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.maxTimeoutRef&&(clearTimeout(this.maxTimeoutRef),this.maxTimeoutRef=null),this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.mediaRecorderRef&&"inactive"!==this.mediaRecorderRef.state&&(this.mediaRecorderRef.stop(),this.mediaRecorderRef=null),this.audioContextRef&&(this.audioContextRef.close(),this.audioContextRef=null),this.analyserRef&&(this.analyserRef=null),this.streamRef&&(this.streamRef.getTracks().forEach((t=>t.stop())),this.streamRef=null)};getErrorText(){return this.errorText?this.errorText:"en"===document.documentElement.lang?"Microphone access denied":"تعذّر الوصول للميكروفون"}startRecording=async()=>{try{this.error=null,this.audioChunks=[];const t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});this.streamRef=t;const i=new AudioContext;if(this.audioContextRef=i,this.showWaveform){const e=i.createAnalyser();e.fftSize=256,e.smoothingTimeConstant=.8,this.analyserRef=e,i.createMediaStreamSource(t).connect(e)}this.setupMediaRecorder(t),this.recordingStartTime=Date.now(),this.recordingDuration=0,this.prevHeights=[],this.state="recording",this.showWaveform&&requestAnimationFrame((()=>{this.drawWaveform()})),this.recordingTimer=window.setInterval((()=>{this.recordingDuration=Math.floor((Date.now()-this.recordingStartTime)/1e3)}),1e3),this.maxTimeoutRef=window.setTimeout((()=>{this.stopRecording()}),6e4)}catch(t){console.error("Error starting recording:",t),this.error=this.getErrorText(),this.state="idle"}};setupMediaRecorder=t=>{const i=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/ogg")?"audio/ogg":"",e=new MediaRecorder(t,i?{mimeType:i}:{});e.ondataavailable=t=>{t.data.size>0&&this.audioChunks.push(t.data)},e.onstop=()=>{const t=new Blob(this.audioChunks,{type:i||"audio/mp4"});this.audioRecorded.emit({blob:t,duration:this.recordingDuration})},this.mediaRecorderRef=e,e.start(100)};stopRecording=()=>{if(this.recordingDuration<1)return this.submitPulse=!0,void setTimeout((()=>{this.submitPulse=!1}),400);this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.maxTimeoutRef&&(clearTimeout(this.maxTimeoutRef),this.maxTimeoutRef=null),this.cleanup(),this.state="idle"};cancelRecording=()=>{this.mediaRecorderRef&&"inactive"!==this.mediaRecorderRef.state&&(this.mediaRecorderRef.ondataavailable=null,this.mediaRecorderRef.onstop=null),this.cleanup(),this.state="idle",this.recordingCancel.emit()};drawWaveform=()=>{if(!this.canvasRef||!this.analyserRef)return;const t=this.canvasRef,i=t.getContext("2d");if(!i)return;const e=this.analyserRef.frequencyBinCount,r=new Uint8Array(e),a=this.waveformColor||getComputedStyle(this.el).getPropertyValue("--ai-waveform-color").trim()||"#9ca3af",o=(t,e,r,a,o)=>{if(i.beginPath(),"function"==typeof i.roundRect)i.roundRect(t,e,r,a,o);else{const s=Math.min(o,r/2,a/2);i.moveTo(t+s,e),i.lineTo(t+r-s,e),i.arcTo(t+r,e,t+r,e+s,s),i.lineTo(t+r,e+a-s),i.arcTo(t+r,e+a,t+r-s,e+a,s),i.lineTo(t+s,e+a),i.arcTo(t,e+a,t,e+a-s,s),i.lineTo(t,e+s),i.arcTo(t,e,t+s,e,s),i.closePath()}},s=()=>{if("recording"!==this.state)return;this.animationFrameId=requestAnimationFrame(s);const n=t.offsetWidth;n>0&&t.width!==n&&(t.width=n);const c=Math.min(100,Math.floor(t.width/3)),d=Math.max(1,Math.floor(e/c));this.prevHeights.length!==c&&(this.prevHeights=new Array(c).fill(4)),this.analyserRef.getByteFrequencyData(r),i.clearRect(0,0,t.width,t.height);const l=t.height/2,h=(t.width-3*c)/2,u=t.height-4;for(let t=0;t<c;t++){let s=0;for(let i=0;i<d;i++){const a=t*d+i;a<e&&(s+=r[a])}const n=Math.min(1,s/d/255);this.prevHeights[t]=.7*this.prevHeights[t]+.3*(4+n*(u-4));const c=this.prevHeights[t],p=h+3*t,b=l-c/2;i.fillStyle=a,o(p,b,1,c,.5),i.fill()}};s()};formatDuration=t=>`${Math.floor(t/60)}:${(t%60).toString().padStart(2,"0")}`;render(){const t=60-this.recordingDuration;return r(a,{key:"93565ead1262f192811d4783ac4567b8eb7d59de"},r("div",{key:"9317e2a24533435e5ac967f3eddaad3d1f6c4613",class:"wrapper"},r("div",{key:"35631eb88e495be9b2bdabf1b8f15d237d327c4b",class:"glow"+("recording"===this.state?" visible":""),"aria-hidden":"true"}),r("div",{key:"c65050758e58402c5b341c8d24a0ca58f9f53361",class:"input-container"},"idle"===this.state?r("div",{class:"recording-row"},r("button",{type:"button",class:"submit-button",onClick:this.startRecording,disabled:this.disabled,"aria-label":"Start recording"},r("ai-icon",{name:"mic",size:16})),this.error&&r("div",{class:"error-message",role:"alert"},this.error)):r("div",{class:"recording-row"},r("button",{type:"button",class:"cancel-button",onClick:this.cancelRecording,"aria-label":"Cancel"},r("ai-icon",{name:"cancel",size:14})),r("div",{class:"timer"+(t<=5?" warning":"")},this.formatDuration(this.recordingDuration)),this.showWaveform&&r("canvas",{ref:t=>this.canvasRef=t,class:"waveform",height:"32"}),r("button",{type:"button",class:"submit-button"+(this.submitPulse?" pulse":""),onClick:this.stopRecording,"aria-label":"Send"},r("ai-icon",{name:"arrow-up",size:14}))))))}static get style(){return":host{display:block;width:100%}.wrapper{position:relative;padding:var(--Spacing-Sizes-lg, 12px)}.glow{position:absolute;bottom:20px;left:39px;right:39px;height:29px;border-radius:9999px;background:var(--ai-input-glow);filter:blur(20px);opacity:0;pointer-events:none;transition:opacity 0.2s ease}.glow.visible{opacity:0.9}.input-container{position:relative;background-color:var(--ai-bg-input);border-radius:var(--ai-input-border-radius, 9999px);border:1px solid var(--ai-border-default);box-shadow:var(--ai-shadow-sm);padding:var(--ai-input-padding, 12px);overflow:hidden}.recording-row{display:flex;align-items:center;gap:var(--ai-input-gap, 10px)}.cancel-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;max-height:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-border-default);background-color:var(--ai-border-default);color:var(--ai-text-secondary);cursor:pointer;flex-shrink:0;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.cancel-button:hover{background-color:var(--ai-bg-surface);border-color:var(--ai-bg-surface)}.submit-button{display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;min-width:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-send-button-active-border, var(--ai-accent));background-color:var(--ai-send-button-active-bg, var(--ai-accent));color:var(--ai-accent-text);cursor:pointer;flex-shrink:0;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.submit-button:hover{background-color:var(--ai-send-button-active-hover-bg, var(--ai-accent));border-color:var(--ai-send-button-active-hover-border, var(--ai-accent))}@keyframes pulse-once{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}.submit-button.pulse{animation:pulse-once 0.35s ease}.timer{font-size:13px;font-weight:500;color:var(--ai-text-secondary);min-width:36px;text-align:center;flex-shrink:0}.timer.warning{color:var(--ai-voice-timer-warning-color, var(--ai-danger-text))}.waveform{flex:1;min-width:0;height:32px}.error-message{position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);background:var(--ai-voice-error-bg, var(--ai-danger-bg));color:var(--ai-voice-error-color, var(--ai-danger-text));font-size:11px;padding:6px 12px;border-radius:6px;white-space:nowrap;box-shadow:var(--ai-shadow-error);border:1px solid var(--ai-voice-error-border, var(--ai-danger-border));z-index:10}"}},[513,"ai-voice-input",{disabled:[4],showWaveform:[4,"show-waveform"],autoStart:[4,"auto-start"],errorText:[1,"error-text"],waveformColor:[1,"waveform-color"],state:[32],error:[32],recordingDuration:[32],submitPulse:[32]}]);function c(){"undefined"!=typeof customElements&&["ai-voice-input","ai-icon"].forEach((t=>{switch(t){case"ai-voice-input":customElements.get(o(t))||customElements.define(o(t),n);break;case"ai-icon":customElements.get(o(t))||s()}}))}export{n as V,c as d}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-VMEwYfaX.js';
|
|
2
2
|
import { i as iconRegistry } from './icon-registry-DlD8m3rf.js';
|
|
3
3
|
|
|
4
4
|
const aiAgentErrorCss = () => `:host{display:block}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}@keyframes fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.error-card{background:var(--ai-danger-bg);border:1px solid var(--ai-danger-border);border-radius:16px;box-shadow:var(--ai-shadow-error);overflow:hidden;animation:fade-in 0.3s ease}.error-body{display:flex;align-items:flex-start;gap:12px;padding:16px}.error-icon-wrap{width:36px;height:36px;border-radius:9999px;background:var(--ai-bg-card);border:1px solid var(--ai-danger-border);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ai-danger-text)}.error-content{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}.error-headline-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.error-headline{font-size:14px;font-weight:600;color:var(--ai-danger-text);line-height:1.4}.error-code-badge{font-size:11px;font-weight:500;color:var(--ai-danger-text);background:var(--ai-bg-card);border:1px solid var(--ai-danger-border);padding:1px 7px;border-radius:9999px;white-space:nowrap;flex-shrink:0;opacity:0.85}.error-message{margin:0;font-size:13px;font-weight:400;color:var(--ai-text-secondary);line-height:1.5}.dismiss-btn{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:4px;cursor:pointer;color:var(--ai-danger-text);opacity:0.6;flex-shrink:0;border-radius:6px;transition:opacity 0.15s ease, background 0.15s ease}.dismiss-btn:hover{opacity:1;background:var(--ai-hover-overlay)}.error-footer{padding:0 16px 14px}.retry-btn{display:inline-flex;align-items:center;gap:6px;background:var(--ai-bg-card);border:1px solid var(--ai-danger-border);border-radius:9999px;padding:6px 14px;font-size:13px;font-weight:500;color:var(--ai-danger-text);cursor:pointer;transition:box-shadow 0.15s ease, opacity 0.15s ease;font-family:inherit}.retry-btn:hover{box-shadow:var(--ai-shadow-active);opacity:0.9}.retry-btn:active{opacity:0.75}`;
|
|
@@ -31,7 +31,7 @@ const AiAgentError = class {
|
|
|
31
31
|
return h("span", { class: "icon-wrap", innerHTML: svg });
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '5cab52b708c10b0cfec5fdd0dfdc85046a7426a2' }, h("div", { key: 'b4691b7dfd9cbb98e522af9ed5ad2d2b912471fb', class: "error-card" }, h("div", { key: 'e8f5fb9ca5fda7f4cedf09bb4dc9848303d4a339', class: "error-body" }, h("div", { key: 'b1f2e61a60fa4a3fba6a98dc67f3531f9164b662', class: "error-icon-wrap" }, this.renderIcon('warning', 20, 20)), h("div", { key: 'a1e2e6f6096ed6e593e60eadfd792b11b7b117cd', class: "error-content" }, h("div", { key: '5eea71440e7b817732c3aab465f2710a2b198b1a', class: "error-headline-row" }, h("span", { key: '61b90ef0186837770ce10642257ee2ea5f1f6c9d', class: "error-headline" }, this.headline), this.errorCode && (h("span", { key: '12305a917ae3b479340533335203455c48d1bb24', class: "error-code-badge" }, this.errorCode))), this.message && (h("p", { key: 'f400a76fbd2caac0b64799914b9938de3e9eb78c', class: "error-message" }, this.message))), this.dismissible && (h("button", { key: 'f2fa1b1fb86fad249404e5b66ba72f2937c4eb67', class: "dismiss-btn", "aria-label": "\u0625\u063A\u0644\u0627\u0642", onClick: () => this.dismissClick.emit() }, this.renderIcon('cancel', 16, 16)))), this.retryable && (h("div", { key: 'd2c1f2190383345c6101e70b1499e05d59092653', class: "error-footer" }, h("button", { key: '7f8b52b0ac1e2dd4dd4244949e0da9874077f284', class: "retry-btn", onClick: () => this.retryClick.emit() }, this.renderIcon('reload', 16, 16), h("span", { key: '321d51fd3b36f23b7e49b05af3ab85346f87f44f' }, this.retryLabel)))))));
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
AiAgentError.style = aiAgentErrorCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-VMEwYfaX.js';
|
|
2
2
|
|
|
3
3
|
const aiCardCss = () => `:host{--ai-card-border:1px solid var(--ai-border-default);--ai-card-radius:16px;--ai-card-padding:16px;--ai-card-gap:12px;--ai-card-shadow:var(--ai-shadow-sm);display:block}.card{background:var(--ai-bg-card);border:var(--ai-card-border);border-radius:var(--ai-card-radius);padding:var(--ai-card-padding);box-shadow:var(--ai-card-shadow);box-sizing:border-box;overflow:hidden;color:var(--ai-text-primary);width:100%;display:flex;flex-direction:column;gap:var(--ai-card-gap);text-align:start;font-size:14px;line-height:20px}.card--no-padding{padding:0}.card--no-shadow{box-shadow:none}`;
|
|
4
4
|
|
|
@@ -11,11 +11,11 @@ const AiCard = class {
|
|
|
11
11
|
/** Remove the shadow */
|
|
12
12
|
noShadow = false;
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '849dbf8d8eac913c76e71a10cb9b30f9fda3c320' }, h("div", { key: '5d9f75428e6d94cf2c3729698e87fd3185c20129', class: {
|
|
15
15
|
card: true,
|
|
16
16
|
'card--no-padding': this.noPadding,
|
|
17
17
|
'card--no-shadow': this.noShadow,
|
|
18
|
-
} }, h("slot", { key: '
|
|
18
|
+
} }, h("slot", { key: 'f604568228c02514ff0f569cfa4fd706c247652e' }))));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
AiCard.style = aiCardCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-VMEwYfaX.js';
|
|
2
2
|
|
|
3
3
|
const aiChatContainerCss = () => `:host{display:contents}.chat-container{font-family:var(--ai-font-family);display:flex;flex-direction:column;overflow:hidden;position:relative;background-color:var(--ai-container-bg, var(--ai-bg-card));border:1px solid var(--ai-border-default);z-index:50;box-sizing:border-box}.messages-area{flex:1;overflow-y:auto;min-height:0;scrollbar-width:thin;padding:var(--ai-spacing-2xl, 16px);scrollbar-color:var(--ai-scrollbar-thumb) transparent}.messages-area::-webkit-scrollbar{width:3px}.messages-area::-webkit-scrollbar-track{background:transparent}.messages-area::-webkit-scrollbar-thumb{background:var(--ai-scrollbar-thumb);border-radius:99px}.messages-area::-webkit-scrollbar-thumb:hover{background:var(--ai-scrollbar-thumb-hover)}.chat-container.left,.chat-container.right{position:fixed;top:0;bottom:0;transition:transform 300ms cubic-bezier(0.4, 0, 0.2, 1)}.chat-container.left{left:0;transform:translateX(-100%)}.chat-container.right{right:0;transform:translateX(100%)}.chat-container.left.open,.chat-container.right.open{transform:translateX(0)}.chat-container.float{position:fixed;border-radius:16px;box-shadow:var(--ai-shadow-float);opacity:0;pointer-events:none;transform:scale(0.95);transform-origin:bottom left;transition:opacity 200ms ease, transform 200ms ease}.chat-container.float.open{opacity:1;pointer-events:auto;transform:scale(1)}.watermark{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;width:133px;height:133px}.watermark .watermark-circle-svg{position:absolute;top:0;left:0}.watermark .watermark-star-svg{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.watermark .watermark-circle{fill:var(--ai-watermark-circle, #FCFCFC)}.watermark .watermark-star{fill:var(--ai-watermark-star, #FAFAFA)}:host(.dark) .watermark .watermark-circle{fill:var(--ai-watermark-circle, #222222)}:host(.dark) .watermark .watermark-star{fill:var(--ai-watermark-star, #292B2C)}.chat-container.mobile{width:100% !important}.chat-container.float.mobile{left:0 !important;right:0 !important;top:0 !important;bottom:0 !important;height:100% !important;border-radius:0 !important}@media (max-width: 767px){.chat-container{width:100% !important}.chat-container.float{left:0 !important;right:0 !important;top:0 !important;bottom:0 !important;height:100% !important;border-radius:0 !important}}@keyframes skeleton-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}.skeleton-messages{display:flex;flex-direction:column;gap:20px;padding:8px 0}.skeleton-row{display:flex;align-items:flex-start;gap:10px}.skeleton-row.agent{flex-direction:row}.skeleton-row.user{flex-direction:row-reverse}.skeleton-avatar{width:32px;height:32px;min-width:32px;border-radius:50%;background:var(--ai-shimmer-gradient, linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.06) 75%));background-size:200% 100%;animation:skeleton-shimmer 1.6s ease-in-out infinite}.skeleton-bubble{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:16px;background-color:var(--ai-bg-surface, #f9fafb);max-width:75%;min-width:120px}.skeleton-row.user .skeleton-bubble{background-color:var(--ai-user-bubble-bg, var(--ai-accent, #004956));border-radius:16px}.skeleton-line{height:12px;border-radius:6px;background:var(--ai-shimmer-gradient, linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.06) 75%));background-size:200% 100%;animation:skeleton-shimmer 1.6s ease-in-out infinite}.skeleton-row.user .skeleton-line{background:linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 75%);background-size:200% 100%;animation:skeleton-shimmer 1.6s ease-in-out infinite}:host(.dark) .skeleton-avatar{background:var(--ai-shimmer-gradient, linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%));background-size:200% 100%;animation:skeleton-shimmer 1.6s ease-in-out infinite}:host(.dark) .skeleton-bubble{background-color:var(--ai-bg-surface, #1f2937)}:host(.dark) .skeleton-line{background:var(--ai-shimmer-gradient, linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%));background-size:200% 100%;animation:skeleton-shimmer 1.6s ease-in-out infinite}.error-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:48px 24px;flex:1}.error-icon{color:var(--ai-text-muted, #9ca3af);opacity:0.7}.error-text{margin:0;font-size:14px;line-height:1.5;color:var(--ai-text-secondary, #6b7280)}.error-retry-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 20px;border-radius:9999px;border:1px solid var(--ai-border-default);background-color:var(--ai-bg-surface, #f9fafb);color:var(--ai-text-primary);font-size:13px;font-weight:500;font-family:inherit;cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease}.error-retry-btn:hover{background-color:var(--ai-hover-overlay, rgba(0, 0, 0, 0.04));border-color:var(--ai-accent, #004956)}.error-retry-btn:focus-visible{outline:2px solid var(--ai-focus-ring-color, var(--ai-focus-ring));outline-offset:2px}:host(.dark) .error-retry-btn{background-color:var(--ai-bg-surface, #1f2937);color:var(--ai-text-primary, #f9fafb)}:host(.dark) .error-retry-btn:hover{background-color:var(--ai-hover-overlay, rgba(255, 255, 255, 0.06))}`;
|
|
4
4
|
|
|
@@ -6,12 +6,13 @@ const ChatContainer = class {
|
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.retryClick = createEvent(this, "retryClick");
|
|
9
|
+
this.positionChange = createEvent(this, "positionChange");
|
|
9
10
|
}
|
|
10
11
|
get el() { return getElement(this); }
|
|
11
12
|
/** Controls visibility of the chat panel */
|
|
12
13
|
isOpen = false;
|
|
13
14
|
/** Position of the panel: 'left', 'right', or 'float' */
|
|
14
|
-
position = '
|
|
15
|
+
position = 'left';
|
|
15
16
|
/** Width of the panel (CSS value, e.g., '400px', '30%', '28rem') */
|
|
16
17
|
width = '28rem';
|
|
17
18
|
/** Enable/disable auto-scroll to latest message */
|
|
@@ -30,8 +31,16 @@ const ChatContainer = class {
|
|
|
30
31
|
errorText = 'تعذّر تحميل المحادثة';
|
|
31
32
|
/** Retry button label */
|
|
32
33
|
retryLabel = 'إعادة المحاولة';
|
|
34
|
+
/**
|
|
35
|
+
* Layout direction set by the host app.
|
|
36
|
+
* - `'rtl'` → valid docked position is `left`; cycle order: left ↔ float
|
|
37
|
+
* - `'ltr'` → valid docked position is `right`; cycle order: right ↔ float
|
|
38
|
+
*/
|
|
39
|
+
direction = 'rtl';
|
|
33
40
|
/** Event emitted when the retry button is clicked */
|
|
34
41
|
retryClick;
|
|
42
|
+
/** Fired when the position changes (via cyclePosition or the header button) */
|
|
43
|
+
positionChange;
|
|
35
44
|
isMobile = false;
|
|
36
45
|
floatLeft = '24px';
|
|
37
46
|
floatTop = '24px';
|
|
@@ -82,6 +91,13 @@ const ChatContainer = class {
|
|
|
82
91
|
document.addEventListener('pointermove', onMove);
|
|
83
92
|
document.addEventListener('pointerup', onUp);
|
|
84
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Listen for the composed headerPositionClick event fired by ai-chat-header.
|
|
96
|
+
* Automatically cycles the position so the host app doesn't need to wire it manually.
|
|
97
|
+
*/
|
|
98
|
+
handleHeaderPositionClick() {
|
|
99
|
+
this.cyclePosition();
|
|
100
|
+
}
|
|
85
101
|
componentWillLoad() {
|
|
86
102
|
this.checkMobile();
|
|
87
103
|
}
|
|
@@ -137,6 +153,16 @@ const ChatContainer = class {
|
|
|
137
153
|
this.messagesAreaRef.scrollTop = this.messagesAreaRef.scrollHeight;
|
|
138
154
|
}
|
|
139
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Cycle to the next valid position based on the current direction.
|
|
158
|
+
* - RTL: left ↔ float
|
|
159
|
+
* - LTR: right ↔ float
|
|
160
|
+
*/
|
|
161
|
+
async cyclePosition() {
|
|
162
|
+
const docked = this.direction === 'rtl' ? 'left' : 'right';
|
|
163
|
+
this.position = this.position === 'float' ? docked : 'float';
|
|
164
|
+
this.positionChange.emit(this.position);
|
|
165
|
+
}
|
|
140
166
|
handleWindowResize = () => {
|
|
141
167
|
this.checkMobile();
|
|
142
168
|
this.clampFloatPosition();
|
|
@@ -207,7 +233,7 @@ const ChatContainer = class {
|
|
|
207
233
|
return (h("div", { class: "error-state", role: "alert" }, h("svg", { class: "error-icon", width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "1.5" }), h("path", { d: "M12 7v6", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }), h("circle", { cx: "12", cy: "16.5", r: "0.75", fill: "currentColor" })), h("p", { class: "error-text" }, this.errorText), h("button", { class: "error-retry-btn", type: "button", onClick: () => this.retryClick.emit() }, this.retryLabel)));
|
|
208
234
|
}
|
|
209
235
|
render() {
|
|
210
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: '6290736307488f10a4ed441e2a8e0b3a2e89af05', class: { dark: this.isDark() } }, h("div", { key: '6d6a731d9941457b786c71625243a7dd1e9f11f8', class: this.getContainerClasses(), style: this.getContainerStyle(), ref: el => (this.containerRef = el) }, this.showWatermark && !this.loading && !this.error && (h("div", { key: '0c2ae5b52f8c30bdf356a3c356d52305451cb19e', class: "watermark" }, h("svg", { key: '36076d8dd514f5736050228d22b9a03d5d48ce28', class: "watermark-circle-svg", width: "133", height: "133", viewBox: "0 0 133 133", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '737a3f3d8b7a0f91120258c292d047f9dc90871c', filter: "url(#wm_circle_shadow)" }, h("circle", { key: 'a59549c879ddaa2a0007c4fd9645c4382b14e73f', cx: "66.415", cy: "66.415", r: "66.415", class: "watermark-circle" })), h("defs", { key: '58d5edc4e05f3dd8a60f7a829b70f154ba85bfc1' }, h("filter", { key: 'd2cb7cb5a84bdf1496b56ec5a0c0c79001040670', id: "wm_circle_shadow", x: "0", y: "0", width: "132.83", height: "135.83", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB" }, h("feFlood", { key: 'e90404f557fba552a21bd3748ad728470172040f', "flood-opacity": "0", result: "BackgroundImageFix" }), h("feBlend", { key: 'ef5aee167a4973c35f8ffaa8ae4a0487de8266ee', mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), h("feColorMatrix", { key: 'e0869202bc43610b91abce92e85e8e5264cda999', in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), h("feOffset", { key: '7bef38d885b93711fce4c0efbb719a83417eeefb', dy: "3" }), h("feGaussianBlur", { key: '053de38388f049be8db7867b99b53d403de934ca', stdDeviation: "3" }), h("feComposite", { key: 'e5f68fbcf0923174a177545bf3364d066a122347', in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }), h("feColorMatrix", { key: '62dc924cbdc92ce4adc0ec81be851c1d40e7a5b0', type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" }), h("feBlend", { key: '908299725f9e553c636bd18eab6541c6a7c69fe5', mode: "normal", in2: "shape", result: "effect1_innerShadow" })))), h("svg", { key: '2a6ce2364bfd667c4eba56d859a1326f70a82901', class: "watermark-star-svg", width: "78", height: "78", viewBox: "0 0 78 78", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: 'e2c431ac6bee320c817a7283e6e356edc4667146', filter: "url(#wm_star_shadow)" }, h("path", { key: 'd87d0313e649527f5909ac1b08f7af2979760d79', d: "M38.7421 0C39.5691 0 40.2689 0.286272 40.8414 0.858815C41.414 1.43136 41.7002 2.13113 41.7002 2.95814C41.7002 8.87442 43.1952 14.3772 46.1851 19.4665C49.1115 24.4285 53.0557 28.3727 58.0177 31.299C63.107 34.289 68.6097 35.7839 74.526 35.7839C75.353 35.7839 76.0528 36.0702 76.6254 36.6428C77.1979 37.2153 77.4842 37.9151 77.4842 38.7421C77.4842 39.5691 77.1979 40.2689 76.6254 40.8414C76.0528 41.414 75.353 41.7002 74.526 41.7002C68.6097 41.7002 63.107 43.1952 58.0177 46.1851C53.0557 49.1115 49.1115 53.0557 46.1851 58.0177C43.1952 63.107 41.7002 68.6097 41.7002 74.526C41.7002 75.353 41.414 76.0528 40.8414 76.6254C40.2689 77.1979 39.5691 77.4842 38.7421 77.4842C37.9151 77.4842 37.2153 77.1979 36.6428 76.6254C36.0702 76.0528 35.7839 75.353 35.7839 74.526C35.7839 68.6097 34.289 63.107 31.299 58.0177C28.3727 53.0557 24.4285 49.1115 19.4665 46.1851C14.3772 43.1952 8.87442 41.7002 2.95814 41.7002C2.13113 41.7002 1.43136 41.414 0.858815 40.8414C0.286272 40.2689 0 39.5691 0 38.7421C0 37.9151 0.286272 37.2153 0.858815 36.6428C1.43136 36.0702 2.13113 35.7839 2.95814 35.7839C8.87442 35.7839 14.3772 34.289 19.4665 31.299C24.4285 28.3727 28.3727 24.4285 31.299 19.4665C34.289 14.3772 35.7839 8.87442 35.7839 2.95814C35.7839 2.13113 36.0702 1.43136 36.6428 0.858815C37.2153 0.286272 37.9151 0 38.7421 0Z", class: "watermark-star" })), h("defs", { key: '51e7ef185399e3a10d0b19eb399500be3e5384f8' }, h("filter", { key: '09f52cd1b7084a8af9488bbce05c277fe07012f9', id: "wm_star_shadow", x: "0", y: "0", width: "77.4844", height: "79.4841", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB" }, h("feFlood", { key: '1b055616d714f824dd38a895a5c1a635fefc4a66', "flood-opacity": "0", result: "BackgroundImageFix" }), h("feBlend", { key: '044cba9d32d0a1d56fc39d318dfc1cdd0fdc0ae7', mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), h("feColorMatrix", { key: '4bf50b36bd6b1ae90d29a95290762ef52dbfff7a', in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), h("feOffset", { key: '0988514af2fda03cb2ff43e95c1423137351186f', dy: "2" }), h("feGaussianBlur", { key: 'c96fb451b890e9bda84043dcd699c2a3f59c195c', stdDeviation: "2" }), h("feComposite", { key: '77b2bb3e01eefb08cac5f60a494c2cd15e97db4a', in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }), h("feColorMatrix", { key: 'aef785066c732cc5cbc16689f2e57a7df7d18bc5', type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" }), h("feBlend", { key: '292a1d370d268312514f1c8fcee2167159c2d4e9', mode: "normal", in2: "shape", result: "effect1_innerShadow" })))))), h("slot", { key: '009fd561884a5a70e559d865dc1b1d55937d923c', name: "header" }), h("div", { key: 'fde5090720cd70c2b5fe72bcaec95007e7792f4e', class: "messages-area", ref: el => (this.messagesAreaRef = el) }, this.loading ? this.renderSkeleton() : this.error ? this.renderError() : h("slot", null)), h("slot", { key: '838ea2de9f788af2af70568a7882a08645c6b2ac', name: "footer" }))));
|
|
211
237
|
}
|
|
212
238
|
static get watchers() { return {
|
|
213
239
|
"isOpen": [{
|