@grigoriychernish/widget-chat-opti 1.0.0 → 1.0.1
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/{assets/ChatWidget-DeUjMXPI.css → widget.css} +1 -0
- package/dist/widget.js +2614 -0
- package/package.json +1 -1
- package/dist/assets/ChatWidget-Iys5dsmQ.js +0 -17
- package/dist/assets/demo-CSz-we4V.js +0 -1
- package/dist/assets/main-B59ynshn.css +0 -1
- package/dist/assets/main-ukqJyZq0.js +0 -14
- package/dist/demo.html +0 -85
- package/dist/index.html +0 -23
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){for(var t=0;t<e.length;t++)e[t]()}function p(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var m=1024,h=2048,g=4096,_=8192,v=16384,y=32768,b=1<<25,x=65536,S=1<<19,ee=1<<20,te=1<<25,C=65536,ne=1<<21,re=1<<22,ie=1<<23,ae=Symbol(`$state`),oe=Symbol(`legacy props`),se=Symbol(``),ce=Symbol(`attributes`),le=Symbol(`class`),ue=Symbol(`style`),de=Symbol(`text`),fe=Symbol(`form reset`),pe=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},me=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function he(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function ge(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function _e(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ve(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ye(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function be(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function xe(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Se(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ce(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function we(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Te(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ee(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var De={},w=Symbol(`uninitialized`),Oe=`http://www.w3.org/1999/xhtml`;function ke(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ae(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function je(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function Me(e){T=e}var E;function D(e){if(e===null)throw Ae(),De;return E=e}function Ne(){return D(rn(E))}function O(e){if(T){if(rn(E)!==null)throw Ae(),De;E=e}}function Pe(e=1){if(T){for(var t=e,n=E;t--;)n=rn(n);E=n}}function Fe(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=rn(n);e&&n.remove(),n=i}}function Ie(e){if(!e||e.nodeType!==8)throw Ae(),De;return e.data}function Le(e){return e===this.v}function Re(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function ze(e){return!Re(e,this.v)}var k=!1,Be=!1,A=null;function Ve(e){A=e}function He(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:G,l:Be&&!t?{s:null,u:null,$:[]}:null}}function Ue(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)xn(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,e??{}}function We(){return!Be||A!==null&&A.l===null}var Ge=[];function Ke(){var e=Ge;Ge=[],f(e)}function qe(e){if(Ge.length===0&&!ct){var t=Ge;queueMicrotask(()=>{t===Ge&&Ke()})}Ge.push(e)}function Je(){for(;Ge.length>0;)Ke()}function Ye(e){var t=G;if(t===null)return H.f|=ie,e;if(!(t.f&32768)&&!(t.f&4))throw e;Xe(e,t)}function Xe(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var Ze=~(h|g|m);function j(e,t){e.f=e.f&Ze|t}function Qe(e){e.f&512||e.deps===null?j(e,m):j(e,g)}function $e(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=C,$e(t.deps))}function et(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),$e(e.deps),j(e,m)}var tt=!1,nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}var it=null,at=null,M=null,ot=null,N=null,st=null,ct=!1,lt=!1,ut=null,dt=null,ft=0,pt=1,mt=class e{id=pt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){at===null?it=at=this:(at.#n=this,this.#t=at),at=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)j(r,h),t(r);for(r of n.m)j(r,g),t(r)}this.#p.add(e)}#g(){this.#e=!0,ft++>1e3&&(this.#S(),gt());for(let e of this.#u)this.#d.delete(e),j(e,h),this.schedule(e);for(let e of this.#d)j(e,g),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=ut=[],r=[],i=dt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Ct(e),this.#h()||this.discard(),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(ut=null,dt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)St(e,t);i.length>0&&M.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),ot=this,vt(r),vt(n),ot=null,this.#s?.resolve();var s=M;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),k&&(this.#x(),M=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=m;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=m:i&4?t.push(r):k&&i&16777224?n.push(r):Yn(r)&&(i&16&&this.#d.add(r),er(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),j(i,h),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)et(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==w&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),N?.set(e,t)),this.is_fork||(e.v=t)}activate(){M=this}deactivate(){M=null,N=null}flush(){try{lt=!0,M=this,this.#g()}finally{ft=0,st=null,ut=null,dt=null,lt=!1,M=null,N=null,Ut.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let l=it;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}if(l.#e){var r=[...l.current.keys()].filter(e=>!l.current.get(e)[1]&&!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#p)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#b([e])});l.activate();var i=new Set,a=new Map;for(var o of t)yt(o,r,i,a);a=new Map;var s=[...l.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(s.length>0)for(let e of this.#l)!(e.f&155648)&&bt(e,s,a)&&(e.f&4194320?(j(e,h),l.schedule(e)):l.#u.add(e));if(l.#c.length>0&&!l.#m){l.apply();for(var c of l.#c)l.#_(c,[],[]);l.#c=[]}l.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,qe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=p()).promise}static ensure(){if(M===null){let t=M=new e;!lt&&!ct&&qe(()=>{t.#e||t.flush()})}return M}apply(){if(!k||!this.is_fork&&this.#t===null&&this.#n===null){N=null;return}N=new Map;for(let[e,[t]]of this.current)N.set(e,t);for(let t=it;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)N.has(e)||N.set(e,n)}}schedule(e){if(st=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(ut!==null&&t===G&&(k||(H===null||!(H.f&2))&&!tt))return;if(n&96){if(!(n&1024))return;t.f^=m}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?it=t:e.#n=t,t===null?at=e:t.#t=e,this.linked=!1}}};function ht(e){var t=ct;ct=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if(Je(),M===null)return n;M.flush()}}finally{ct=t}}function gt(){try{xe()}catch(e){Xe(e,st)}}var _t=null;function vt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Yn(r)&&(_t=new Set,er(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Mn(r),_t?.size>0)){Ut.clear();for(let e of _t){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)_t.has(n)&&(_t.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||er(n)}}_t.clear()}}_t=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?yt(i,t,n,r):e&4194320&&!(e&2048)&&bt(i,t,r)&&(j(i,h),xt(i))}}function bt(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&bt(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function xt(e){M.schedule(e)}function St(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,m);for(var n=e.first;n!==null;)St(n,t),n=n.next}}function Ct(e){j(e,m);for(var t=e.first;t!==null;)Ct(t),t=t.next}function wt(e){let t=0,n=Gt(0),r;return()=>{vn()&&(Z(n),Tn(()=>(t===0&&(r=ir(()=>e(()=>Yt(n)))),t+=1,()=>{qe(()=>{--t,t===0&&(r?.(),r=void 0,Yt(n))})})))}}var Tt=x|S;function Et(e,t,n,r){new Dt(e,t,n,r)}var Dt=class{parent;is_pending=!1;transform_error;#e;#t=T?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=wt(()=>(this.#m=Gt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Dn(()=>{if(T){let e=this.#t;Ne();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Tt),T&&(this.#e=E)}#g(){try{this.#a=B(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=B(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=B(()=>e(this.#e)),qe(()=>{var e=this.#c=document.createDocumentFragment(),t=I();e.append(t),this.#a=this.#x(()=>B(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Nn(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=B(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Ln(this.#a,e);let t=this.#n.pending;this.#o=B(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){et(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=H,r=A;K(this.#i),W(this.#i),Ve(this.#i.ctx);try{return mt.ensure(),e()}catch(e){return Ye(e),null}finally{K(t),W(n),Ve(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Nn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,qe(()=>{this.#d=!1,this.#m&&qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),Z(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(V(this.#a),null),this.#o&&=(V(this.#o),null),this.#s&&=(V(this.#s),null),T&&(D(this.#t),Pe(),D(Fe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){je();return}r=!0,i&&Ee(),this.#s!==null&&Nn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Xe(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return B(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Xe(e,this.#i.parent),null}}))};qe(()=>{var t;try{t=this.transform_error(e)}catch(e){Xe(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Xe(e,this.#i&&this.#i.parent)):o(t)})}};function Ot(e,t,n,r){let i=We()?Mt:It;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=G,s=kt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){if(!(o.f&16384)){s();try{r(e)}catch(e){Xe(e,o)}At()}}var u=jt();if(n.length===0){c.then(()=>l(t.map(i))).finally(u);return}function d(){Promise.all(n.map(e=>Pt(e))).then(e=>l([...t.map(i),...e])).catch(e=>Xe(e,o)).finally(u)}c?c.then(()=>{s(),d(),At()}):d()}function kt(){var e=G,t=H,n=A,r=M;return function(i=!0){K(e),W(t),Ve(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function At(e=!0){K(null),W(null),Ve(null),e&&M?.deactivate()}function jt(){var e=G,t=e.b,n=M,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Mt(e){var t=2|h;return G!==null&&(G.f|=S),{ctx:A,deps:null,effects:null,equals:Le,f:t,fn:e,reactions:null,rv:0,v:w,wv:0,parent:G,ac:null}}var Nt=Symbol(`obsolete`);function Pt(e,t,n){let r=G;r===null&&ge();var i=void 0,a=Gt(w),o=!H,s=new Set;return wn(()=>{var t=G,n=p();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==pe&&n.reject(e)}).finally(At)}catch(e){n.reject(e),At()}var c=M;if(o){if(t.f&32768)var l=jt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Nt);else for(let e of s.values())e.reject(Nt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Nt&&(c.activate(),t?(a.f|=ie,qt(a,t)):(a.f&8388608&&(a.f^=ie),qt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),yn(()=>{for(let e of s)e.reject(Nt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function Ft(e){let t=Mt(e);return k||Hn(t),t}function It(e){let t=Mt(e);return t.equals=ze,t}function Lt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function Rt(e){var t,n=G,r=e.parent;if(!Bn&&r!==null&&e.v!==w&&r.f&24576)return ke(),e.v;K(r);try{e.f&=~C,Lt(e),t=Zn(e)}finally{K(n)}return t}function zt(e){var t=Rt(e);if(!e.equals(t)&&(e.wv=Jn(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),ot?.capture(e,t,!0)),e.deps===null))){j(e,m);return}Bn||(N===null?Qe(e):(vn()||M?.is_fork)&&N.set(e,t))}function Bt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(pe),t.fn!==null&&(t.teardown=d),t.ac=null,$n(t,0),kn(t))}function Vt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&er(t)}var Ht=new Set,Ut=new Map,Wt=!1;function Gt(e,t){return{f:0,v:e,reactions:null,equals:Le,rv:0,wv:0}}function P(e,t){let n=Gt(e,t);return Hn(n),n}function Kt(e,t=!1,n=!0){let r=Gt(e);return t||(r.equals=ze),Be&&n&&A!==null&&A.l!==null&&(A.l.s??=[]).push(r),r}function F(e,t,n=!1){return H!==null&&(!U||H.f&131072)&&We()&&H.f&4325394&&(q===null||!q.has(e))&&Te(),qt(e,n?Zt(t):t,dt)}function qt(e,t,n=null){if(!e.equals(t)){Ut.set(e,Bn?t:e.v);var r=mt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Rt(t),N===null&&Qe(t)}e.wv=Jn(),Xt(e,h,n),We()&&G!==null&&G.f&1024&&!(G.f&96)&&(X===null?Un([e]):X.push(e)),!r.is_fork&&Ht.size>0&&!Wt&&Jt()}return t}function Jt(){Wt=!1;for(let e of Ht){e.f&1024&&j(e,g);let t;try{t=Yn(e)}catch{t=!0}t&&er(e)}Ht.clear()}function Yt(e){F(e,e.v+1)}function Xt(e,t,n){var r=e.reactions;if(r!==null)for(var i=We(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&h)===0;if(l&&j(s,t),c&131072)Ht.add(s);else if(c&2){var u=s;N?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=C),Xt(u,g,n))}else if(l){var d=s;c&16&&_t!==null&&_t.add(d),n===null?xt(d):n.push(d)}}}}function Zt(t){if(typeof t!=`object`||!t||ae in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=P(0),u=null,d=Kn,f=e=>{if(Kn===d)return e();var t=H,n=Kn;W(null),qn(d);var r=e();return W(t),qn(n),r};return i&&r.set(`length`,P(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Ce();var i=r.get(t);return i===void 0?f(()=>{var e=P(n.value,u);return r.set(t,e),e}):F(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>P(w,u));r.set(t,e),Yt(o)}}else F(n,w),Yt(o);return!0},get(e,n,i){if(n===ae)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>P(Zt(s?e[n]:w),u)),r.set(n,o)),o!==void 0){var c=Z(o);return c===w?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=Z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==w)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===ae)return!0;var n=r.get(t),i=n!==void 0&&n.v!==w||Reflect.has(e,t);return(n!==void 0||G!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>P(i?Zt(e[t]):w,u)),r.set(t,n)),Z(n)===w)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>P(w,u)),r.set(d+``,p)):F(p,w)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>P(void 0,u)),F(c,Zt(n)),r.set(t,c));else{l=c.v!==w;var m=f(()=>Zt(n));F(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&F(g,_+1)}Yt(o)}return!0},ownKeys(e){Z(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==w});for(var[n,i]of r)i.v!==w&&!(n in e)&&t.push(n);return t},setPrototypeOf(){we()}})}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var Qt,$t,en,tn;function nn(){if(Qt===void 0){Qt=window,$t=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;en=a(t,`firstChild`).get,tn=a(t,`nextSibling`).get,u(e)&&(e[le]=void 0,e[ce]=null,e[ue]=void 0,e.__e=void 0),u(n)&&(n[de]=void 0)}}function I(e=``){return document.createTextNode(e)}function L(e){return en.call(e)}function rn(e){return tn.call(e)}function R(e,t){if(!T)return L(e);var n=L(E);if(n===null)n=E.appendChild(I());else if(t&&n.nodeType!==3){var r=I();return n?.before(r),D(r),r}return t&&ln(n),D(n),n}function an(e,t=!1){if(!T){var n=L(e);return n instanceof Comment&&n.data===``?rn(n):n}if(t){if(E?.nodeType!==3){var r=I();return E?.before(r),D(r),r}ln(E)}return E}function z(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=rn(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=I();return r===null?i?.after(a):r.before(a),D(a),a}ln(r)}return D(r),r}function on(e){e.textContent=``}function sn(){return!k||_t!==null?!1:(G.f&y)!==0}function cn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function ln(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function un(e){T&&L(e)!==null&&on(e)}var dn=!1;function fn(){dn||(dn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[fe]?.()})},{capture:!0}))}function pn(e){var t=H,n=G;W(null),K(null);try{return e()}finally{W(t),K(n)}}function mn(e,t,n,r=n){e.addEventListener(t,()=>pn(n));let i=e[fe];i?e[fe]=()=>{i(),r(!0)}:e[fe]=()=>r(!0),fn()}function hn(e){G===null&&(H===null&&be(e),ye()),Bn&&ve(e)}function gn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function _n(e,t){var n=G;n!==null&&n.f&8192&&(e|=_);var r={ctx:A,deps:null,nodes:null,f:e|h|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)ut===null?mt.ensure().schedule(r):ut.push(r);else if(t!==null){try{er(r)}catch(e){throw V(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=x))}if(i!==null&&(i.parent=n,n!==null&&gn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function vn(){return H!==null&&!U}function yn(e){let t=_n(8,null);return j(t,m),t.teardown=e,t}function bn(e){hn(`$effect`);var t=G.f;if(!H&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return xn(e)}function xn(e){return _n(4|ee,e)}function Sn(e){mt.ensure();let t=_n(64|S,e);return(e={})=>new Promise(n=>{e.outro?Nn(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function Cn(e){return _n(4,e)}function wn(e){return _n(re|S,e)}function Tn(e,t=0){return _n(8|t,e)}function En(e,t=[],n=[],r=[]){Ot(r,t,n,t=>{_n(8,()=>e(...t.map(Z)))})}function Dn(e,t=0){return _n(16|t,e)}function B(e){return _n(32|S,e)}function On(e){var t=e.teardown;if(t!==null){let e=Bn,n=H;Vn(!0),W(null);try{t.call(null)}finally{Vn(e),W(n)}}}function kn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&pn(()=>{e.abort(pe)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function An(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||V(t),t=n}}function V(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),j(e,b),kn(e,t&&!n),$n(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();On(e),e.f^=b,e.f|=v;var i=e.parent;i!==null&&i.first!==null&&Mn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function jn(e,t){for(;e!==null;){var n=e===t?null:rn(e);e.remove(),e=n}}function Mn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Nn(e,t,n=!0){var r=[];Pn(e,r,!0);var i=()=>{n&&V(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Pn(e,t,n){if(!(e.f&8192)){e.f^=_;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Pn(i,t,o?n:!1)}i=a}}}function Fn(e){In(e,!0)}function In(e,t){if(e.f&8192){e.f^=_,e.f&1024||(j(e,h),mt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;In(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Ln(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:rn(n);t.append(n),n=i}}var Rn=null,zn=!1,Bn=!1;function Vn(e){Bn=e}var H=null,U=!1;function W(e){H=e}var G=null;function K(e){G=e}var q=null;function Hn(e){H!==null&&(!k||H.f&2)&&(q??=new Set).add(e)}var J=null,Y=0,X=null;function Un(e){X=e}var Wn=1,Gn=0,Kn=Gn;function qn(e){Kn=e}function Jn(){return++Wn}function Yn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~C),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Yn(a)&&zt(a),a.wv>e.wv)return!0}t&512&&N===null&&j(e,m)}return!1}function Xn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!k&&q!==null&&q.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Xn(a,t,!1):t===a&&(n?j(a,h):a.f&1024&&j(a,g),xt(a))}}function Zn(e){var t=J,n=Y,r=X,i=H,a=q,o=A,s=U,c=Kn,l=e.f;J=null,Y=0,X=null,H=l&96?null:e,q=null,Ve(e.ctx),U=!1,Kn=++Gn,e.ac!==null&&(pn(()=>{e.ac.abort(pe)}),e.ac=null);try{e.f|=ne;var u=e.fn,d=u();e.f|=y;var f=e.deps,p=M?.is_fork;if(J!==null){var m;if(p||$n(e,Y),f!==null&&Y>0)for(f.length=Y+J.length,m=0;m<J.length;m++)f[Y+m]=J[m];else e.deps=f=J;if(vn()&&e.f&512)for(m=Y;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Y<f.length&&($n(e,Y),f.length=Y);if(We()&&X!==null&&!U&&f!==null&&!(e.f&6146))for(m=0;m<X.length;m++)Xn(X[m],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Gn;if(t!==null)for(let e of t)e.rv=Gn;X!==null&&(r===null?r=X:r.push(...X))}return e.f&8388608&&(e.f^=ie),d}catch(e){return Ye(e)}finally{e.f^=ne,J=t,Y=n,X=r,H=i,q=a,Ve(o),U=s,Kn=c}}function Qn(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(J===null||!n.call(J,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~C),s.v!==w&&Qe(s),Bt(s),$n(s,0)}}function $n(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Qn(e,n[r])}function er(e){var t=e.f;if(!(t&16384)){j(e,m);var n=G,r=zn;G=e,zn=!0;try{t&16777232?An(e):kn(e),On(e);var i=Zn(e);e.teardown=typeof i==`function`?i:null,e.wv=Wn}finally{zn=r,G=n}}}async function tr(){if(k)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),ht()}function Z(e){var t=(e.f&2)!=0;if(Rn?.add(e),H!==null&&!U&&!(G!==null&&G.f&16384)&&(q===null||!q.has(e))){var r=H.deps;if(H.f&2097152)e.rv<Gn&&(e.rv=Gn,J===null&&r!==null&&r[Y]===e?Y++:J===null?J=[e]:J.push(e));else{H.deps??=[],n.call(H.deps,e)||H.deps.push(e);var i=e.reactions;i===null?e.reactions=[H]:n.call(i,H)||i.push(H)}}if(Bn&&Ut.has(e))return Ut.get(e);if(t){var a=e;if(Bn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||rr(a))&&(o=Rt(a)),Ut.set(a,o),o}var s=(a.f&512)==0&&!U&&H!==null&&(zn||(H.f&512)!=0),c=(a.f&y)===0;Yn(a)&&(s&&(a.f|=512),zt(a)),s&&!c&&(Vt(a),nr(a))}if(N?.has(e))return N.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Vt(t),nr(t))}function rr(e){if(e.v===w)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ut.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=U;try{return U=!0,e()}finally{U=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var ar=[`touchstart`,`touchmove`];function or(e){return ar.includes(e)}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n){(t[sr]??={})[e]=n}function dr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var fr=null;function pr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;fr=e;var s=0,c=fr===e&&e[sr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[sr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=H,f=G;W(null),K(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[sr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[sr]=t,delete e.currentTarget,W(d),K(f)}}}var mr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function hr(e){return mr?.createHTML(e)??e}function gr(e){var t=cn(`template`);return t.innerHTML=hr(e.replaceAll(`<!>`,`<!---->`)),t.content}function _r(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return _r(E,null),E;i===void 0&&(i=gr(a?e:`<!>`+e),n||(i=L(i)));var t=r||$t?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;_r(o,s)}else _r(t,t);return t}}function vr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return _r(E,null),E;if(!o){var e=L(gr(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;_r(n,r)}else _r(t,t);return t}}function yr(e,t){return vr(e,t,`svg`)}function $(e,t){if(T){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),Ne();return}e!==null&&e.before(t)}function br(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[de]??=e.nodeValue)&&(e[de]=n,e.nodeValue=`${n}`)}function xr(e,t){return Cr(e,t)}var Sr=new Map;function Cr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){nn();var l=void 0,u=Sn(()=>{var s=n??t.appendChild(I());Et(s,{pending:()=>{}},t=>{He({});var n=A;if(o&&(n.c=o),a&&(i.$$events=a),T&&_r(t,null),l=e(t,i)||{},T&&(G.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw Ae(),De;Ue()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=or(r);for(let e of[t,document]){var a=Sr.get(e);a===void 0&&(a=new Map,Sr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,pr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(cr)),lr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=Sr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,pr),r.delete(e),r.size===0&&Sr.delete(n)):r.set(e,i)}lr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return wr.set(l,u),l}var wr=new WeakMap,Tr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Fn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Fn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(V(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Ln(r,t),t.append(I()),this.#n.set(e,{effect:r,fragment:t})}else V(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Nn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(V(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=sn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=I();i.append(a),this.#n.set(e,{effect:B(()=>t(a)),fragment:i})}else this.#t.set(e,B(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=E),this.#a(n)}};function Er(e,t,n=!1){var r;T&&(r=E,Ne());var i=new Tr(e),a=n?x:0;function o(e,t){if(T){var n=Ie(r);if(e!==parseInt(n.substring(1))){var a=Fe();D(a),i.anchor=a,Me(!1),i.ensure(e,t),Me(!0);return}}i.ensure(e,t)}Dn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Dr(e,t){return t}function Or(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];Nn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;kr(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else --s},!1)}if(s===0){var l=i.length===0&&n!==null;if(l){var u=n,d=u.parentNode;on(d),d.append(u),e.items.clear()}kr(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function kr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=te,Ln(a,document.createDocumentFragment())):V(t[i],n)}}var Ar;function jr(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=T?D(L(u)):u.appendChild(I())}T&&Ne();var d=null,f=It(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Nr(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=te,Fr(d,null,c)):Fn(d):Nn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Dn(()=>{p=Z(f);var e=p.length;let t=!1;T&&Ie(c)===`[!`!=(e===0)&&(c=Fe(),D(c),Me(!1),t=!0);for(var r=new Set,u=M,v=sn(),y=0;y<e;y+=1){T&&E.nodeType===8&&E.data===`]`&&(c=E,t=!0,Me(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&qt(S.v,b),S.i&&qt(S.i,y),v&&u.unskip_effect(S.e)):(S=Pr(l,h?c:Ar??=I(),b,x,y,o,n,i),h||(S.e.f|=te),l.set(x,S)),r.add(x)}if(e===0&&s&&!d&&(h?d=B(()=>s(c)):(d=B(()=>s(Ar??=I())),d.f|=te)),e>r.size&&_e(``,``,``),T&&e>0&&D(Fe()),!h)if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&Me(!0),Z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,T&&(c=E)}function Mr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Nr(e,t,n,i,a){var o=(i&8)!=0,s=t.length,c=e.items,l=Mr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Fn(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=te,_===l)Fr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ir(e,d,_),Ir(e,_,y),Fr(_,y,n),d=_,p=[],m=[],l=Mr(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Fr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ir(e,S.prev,ee.next),Ir(e,d,S),Ir(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Fr(_,l,n),Ir(e,_.prev,_.next),Ir(e,_,d===null?e.effect.first:d.next),Ir(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Mr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Mr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(kr(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Mr(l.next);var ne=C.length;if(ne>0){var re=i&4&&s===0?n:null;if(o){for(v=0;v<ne;v+=1)C[v].nodes?.a?.measure();for(v=0;v<ne;v+=1)C[v].nodes?.a?.fix()}Or(e,C,re)}}o&&qe(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Pr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Gt(n):Kt(n,!1,!1):null,l=o&2?Gt(i):null;return{v:c,i:l,e:B(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Fr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=rn(r);if(a.before(r),r===i)return;r=o}}function Ir(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var Lr=[...`
|
|
2
|
-
\r\f\xA0\v`];function Rr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Lr.includes(r[o-1]))&&(s===r.length||Lr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function zr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Br(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Vr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Br)),i&&c.push(...Object.keys(i).map(Br));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Br(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=zr(r)),i&&(n+=zr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Hr(e,t,n,r,i,a){var o=e[le];if(T||o!==n||o===void 0){var s=Rr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[le]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ur(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Wr(e,t,n,r){var i=e[ue];if(T||i!==t){var a=Vr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ue]=t}else r&&(Array.isArray(r)?(Ur(e,n?.[0],r[0]),Ur(e,n?.[1],r[1],`important`)):Ur(e,n,r));return r}var Gr=Symbol(`is custom element`),Kr=Symbol(`is html`),qr=me?`link`:`LINK`;function Jr(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Yr(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Yr(e,`checked`,null),e.checked=r}}};e[fe]=n,qe(n),fn()}}function Yr(e,t,n,r){var i=Xr(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===qr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[se]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Qr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Xr(e){return e[ce]??={[Gr]:e.nodeName.includes(`-`),[Kr]:e.namespaceURI===Oe}}var Zr=new Map;function Qr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Zr.get(t);if(n)return n;Zr.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.push(s);i=l(i)}return n}function $r(e,t,n=t){var r=new WeakSet;mn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=ei(e)?ti(a):a,n(a),M!==null&&r.add(M),await tr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(T&&e.defaultValue!==e.value||ir(t)==null&&e.value)&&(n(ei(e)?ti(e.value):e.value),M!==null&&r.add(M)),Tn(()=>{var n=t();if(e===document.activeElement){var i=k?ot:M;if(r.has(i))return}ei(e)&&n===ti(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function ei(e){var t=e.type;return t===`number`||t===`range`}function ti(e){return e===``?null:+e}function ni(e,t){return e===t||e?.[ae]===t}function ri(e={},t,n,r){var i=A.r,a=G;return Cn(()=>{var o,s;return Tn(()=>{o=s,s=r?.()||[],ir(()=>{ni(n(...s),e)||(t(e,...s),o&&ni(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ni(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function ii(e,t,n,r){var i=!Be||(n&2)!=0,o=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??=Mt(r),Z(u)):(l&&(l=!1,c=s?ir(r):r),c);let f;if(o){var p=ae in e||oe in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=rt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Se(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?Mt:It)(()=>(v=!1,g()));o&&Z(y);var b=G;return(function(e,t){if(arguments.length>0){let n=t?Z(y):i&&o?Zt(e):e;return F(y,n),v=!0,c!==void 0&&(c=n),e}return Bn&&v||b.f&16384?y.v:Z(y)})}function ai(e){A===null&&he(`onMount`),Be&&A.l!==null?si(A).m.push(e):bn(()=>{let t=ir(e);if(typeof t==`function`)return t})}function oi(e){A===null&&he(`onDestroy`),ai(()=>()=>ir(e))}function si(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var ci={uk:{online:`В мережі`,placeholder:`Введіть ваше запитання...`,send:`Надіслати повідомлення`,close:`Закрити чат`,open:`Відкрити чат`,defaultWelcome:`Привіт! Я ваш інтелектуальний асистент. Чим можу допомогти?`,error401:`Потрібна авторизація. Будь ласка, увійдіть у свій акаунт.`,error403:`Доступ обмежено. У вас немає дозволу на виконання цієї дії.`,error500:`Помилка сервера. Ми вже працюємо над її вирішенням. Спробуйте пізніше.`,errorNetwork:`Не вдалося з'єднатися із сервером. Перевірте підключення до Інтернету.`,retry:`Повторити спробу`,speechToText:`Голосове введення`},en:{online:`Online`,placeholder:`Type your question...`,send:`Send message`,close:`Close chat`,open:`Open chat`,defaultWelcome:`Hello! I am your AI assistant. How can I help you today?`,error401:`Authorization required. Please log in to your account.`,error403:`Access forbidden. You do not have permission to perform this action.`,error500:`Server error. We are working on resolving it. Please try again later.`,errorNetwork:`Failed to connect to the server. Please check your internet connection.`,retry:`Retry`,speechToText:`Voice input`}},li={uk:[`Це дуже хороше запитання! Я з радістю допоможу вам дізнатися більше.`,`Наш чат-віджет повністю створено на Svelte 5 з використанням рун для максимальної продуктивності.`,`Ви можете повністю налаштувати кольори, тему та привітання на інтерактивній панелі налаштувань.`,`Так, цей віджет підтримує анімації, ефект матового скла та адаптований під мобільні екрани.`,`Спробуйте надіслати мені ще одне повідомлення, щоб перевірити анімацію друку!`,`Чи знали ви, що Svelte 5 компілює цей код у чистий та дуже легкий JavaScript?`],en:[`That is a great question! I'm happy to help you learn more.`,`Our chat widget is fully built on Svelte 5 using runes for maximum performance.`,`You can fully customize the colors, theme, and welcome message in the interactive settings panel.`,`Yes, this widget supports animations, glassmorphism, and is optimized for mobile screens.`,`Try sending me another message to check the typing animation!`,`Did you know Svelte 5 compiles this code into clean, highly optimized JavaScript?`]},ui=Q(`<header class="ai-widget-header"><div class="ai-widget-header-info"><div class="ai-widget-avatar-container"><div class="ai-widget-avatar"><svg 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"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg></div> <span class="ai-widget-status-badge"></span></div> <div class="ai-widget-header-text"><h3 class="ai-widget-header-name"> </h3></div></div> <button class="ai-widget-header-close"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></header>`);function di(e,t){var n=ui(),r=R(n),i=z(R(r),2),a=R(i),o=R(a,!0);O(a),O(i),O(r);var s=z(r,2);O(n),En(()=>{br(o,t.aiName),Yr(s,`aria-label`,t.closeText)}),ur(`click`,s,function(...e){t.onClose?.apply(this,e)}),$(e,n)}dr([`click`]);var fi=Q(`<div class="ai-widget-message-avatar"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M12 8V4"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg></div>`),pi=Q(`<div class="ai-widget-error-card"><div class="ai-widget-error-header"><div class="ai-widget-error-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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-3Z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg></div> <span class="ai-widget-error-title"> </span></div> <p class="ai-widget-error-text"> </p> <button class="ai-widget-retry-btn"><svg class="ai-widget-retry-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.72 2.78L21.5 8"></path><polyline points="21.5 3 21.5 8 16.5 8"></polyline></svg> <span> </span></button></div>`),mi=Q(`<div class="ai-widget-message-bubble"> </div>`),hi=Q(`<div><!> <div class="ai-widget-message-content"><!> <span class="ai-widget-message-time"> </span></div></div>`);function gi(e,t){He(t,!0);let n=Ft(()=>{if(!t.msg.isError)return null;switch(t.msg.errorCode){case`401`:return{title:`401: Unauthorized`,text:t.t.error401};case`403`:return{title:`403: Forbidden`,text:t.t.error403};case`500`:return{title:`500: Server Error`,text:t.t.error500};default:return{title:`Connection Error`,text:t.t.errorNetwork}}});var r=hi(),i=R(r),a=e=>{$(e,fi())};Er(i,e=>{t.msg.sender===`ai`&&!t.msg.isError&&e(a)});var o=z(i,2),s=R(o),c=e=>{var r=pi(),i=R(r),a=z(R(i),2),o=R(a,!0);O(a),O(i);var s=z(i,2),c=R(s,!0);O(s);var l=z(s,2),u=z(R(l),2),d=R(u,!0);O(u),O(l),O(r),En(()=>{br(o,Z(n).title),br(c,Z(n).text),br(d,t.t.retry)}),ur(`click`,l,()=>t.onRetry(t.msg.id)),$(e,r)},l=e=>{var n=mi(),r=R(n,!0);O(n),En(()=>br(r,t.msg.text)),$(e,n)};Er(s,e=>{t.msg.isError&&Z(n)?e(c):e(l,-1)});var u=z(s,2),d=R(u,!0);O(u),O(o),O(r),En(()=>{Hr(r,1,`ai-widget-message-row ${t.msg.sender??``} ${t.msg.isError?`error`:``}`),br(d,t.msg.time)}),$(e,r),Ue()}dr([`click`]);var _i=Q(`<div class="ai-widget-message-row ai"><div class="ai-widget-message-avatar"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M12 8V4"></path></svg></div> <div class="ai-widget-message-content"><div class="ai-widget-message-bubble"><div class="ai-widget-typing"><span class="ai-widget-typing-dot"></span> <span class="ai-widget-typing-dot"></span> <span class="ai-widget-typing-dot"></span></div></div></div></div>`),vi=Q(`<div class="ai-widget-body"><!> <!></div>`);function yi(e,t){He(t,!0);let n=P(null);bn(()=>{if(t.messages.length||t.isTyping){let e=setTimeout(()=>{Z(n)&&Z(n).scrollTo({top:Z(n).scrollHeight,behavior:`smooth`})},50);return()=>clearTimeout(e)}});var r=vi(),i=R(r);jr(i,17,()=>t.messages,e=>e.id,(e,n)=>{gi(e,{get msg(){return Z(n)},get t(){return t.t},get onRetry(){return t.onRetry}})});var a=z(i,2),o=e=>{$(e,_i())};Er(a,e=>{t.isTyping&&e(o)}),O(r),ri(r,e=>F(n,e),()=>Z(n)),$(e,r),Ue()}var bi=1e3,xi=2e3,Si={uk:`uk-UA`,en:`en-US`};function Ci(e){return Si[e]||`en-US`}var wi=class{recognition=null;isRecordingState=!1;silenceTimer=null;static isSupported(){return typeof window>`u`?!1:!!(window.SpeechRecognition||window.webkitSpeechRecognition)}resetSilenceTimeout(e){this.clearSilenceTimeout(),this.silenceTimer=setTimeout(()=>{this.stop()},e)}clearSilenceTimeout(){this.silenceTimer&&=(clearTimeout(this.silenceTimer),null)}start(e){this.isRecordingState&&this.stop();let t=window.SpeechRecognition||window.webkitSpeechRecognition;if(t)try{this.recognition=new t,this.recognition.lang=e.lang,this.recognition.continuous=e.continuous??!0,this.recognition.interimResults=!0,this.recognition.maxAlternatives=1,this.recognition.onstart=()=>{this.isRecordingState=!0,e.onStart?.(),this.resetSilenceTimeout(xi)},this.recognition.onspeechstart=()=>{this.clearSilenceTimeout()},this.recognition.onspeechend=()=>{this.resetSilenceTimeout(bi)},this.recognition.onresult=t=>{let n=``,r=``;for(let e=0;e<t.results.length;e++){let i=t.results[e][0].transcript;t.results[e].isFinal?n+=i:r+=i}e.onResult?.(n,r),this.resetSilenceTimeout(bi)},this.recognition.onerror=t=>{this.clearSilenceTimeout(),e.onError?.(t.error),this.isRecordingState=!1},this.recognition.onend=()=>{this.clearSilenceTimeout(),this.isRecordingState=!1,e.onEnd?.()},this.recognition.start()}catch(t){console.error(`Failed to start speech recognition:`,t),this.clearSilenceTimeout(),this.isRecordingState=!1,e.onError?.(t)}}stop(){if(this.clearSilenceTimeout(),this.recognition)try{this.recognition.stop()}catch(e){console.error(`Error stopping recognition:`,e)}this.isRecordingState=!1}abort(){if(this.clearSilenceTimeout(),this.recognition)try{this.recognition.abort()}catch(e){console.error(`Error aborting recognition:`,e)}this.isRecordingState=!1}get isRecording(){return this.isRecordingState}},Ti=Q(`<button type="button"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg></button>`),Ei=Q(`<footer class="ai-widget-footer"><div class="ai-widget-input-container"><input id="chat-user-input" name="message" type="text" class="ai-widget-input" enterkeyhint="send" autocomplete="off" autocorrect="on"/> <!> <button class="ai-widget-send-btn"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg></button></div></footer>`);function Di(e,t){He(t,!0);let n=P(``),r=P(!1),i=P(!1),a=null,o=``,s=null;ai(()=>{F(i,wi.isSupported(),!0),Z(i)&&(a=new wi)});function c(){let e=Z(n).trim();!e||t.isTyping||(Z(r)&&a&&a.stop(),t.onSendMessage(e),F(n,``))}function l(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),c())}function u(){if(a){if(Z(r)){a.stop(),F(r,!1);return}o=Z(n),a.start({lang:Ci(t.lang),onStart:()=>{F(r,!0)},onResult:(e,t)=>{let r=o.trim(),i=(e+t).trim();i?F(n,r?r+` `+i:i,!0):F(n,o,!0),s&&setTimeout(()=>{s&&(s.scrollLeft=s.scrollWidth)},0)},onError:e=>{console.error(`Speech recognition error:`,e),F(r,!1)},onEnd:()=>{F(r,!1)}})}}oi(()=>{a&&a.abort()});var d=Ei(),f=R(d),p=R(f);Jr(p),ri(p,e=>s=e,()=>s);var m=z(p,2),h=e=>{var n=Ti();En(()=>{Hr(n,1,`ai-widget-mic-btn ${Z(r)?`recording`:``}`),n.disabled=t.isTyping,Yr(n,`title`,t.speechToTextText),Yr(n,`aria-label`,t.speechToTextText)}),ur(`click`,n,u),$(e,n)};Er(m,e=>{Z(i)&&e(h)});var g=z(m,2);O(f),O(d),En(e=>{Yr(p,`placeholder`,t.placeholder),g.disabled=e,Yr(g,`aria-label`,t.sendText)},[()=>!Z(n).trim()||t.isTyping]),ur(`keydown`,p,l),$r(p,()=>Z(n),e=>F(n,e)),ur(`click`,g,c),$(e,d),Ue()}dr([`keydown`,`click`]);var Oi=yr(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`),ki=yr(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>`),Ai=Q(`<div><div><!> <!> <!></div> <button class="ai-widget-launcher"><!></button></div>`);function ji(e,t){He(t,!0);let n=ii(t,`primaryColor`,3,`#6366f1`),r=ii(t,`aiName`,3,`Opti AI`),i=ii(t,`welcomeMessage`,3,``),a=ii(t,`position`,3,`bottom-right`),o=ii(t,`theme`,3,`glass`),s=ii(t,`lang`,3,`uk`),c=ii(t,`serverStatus`,3,`200`),l=P(!1),u=P(Zt([])),d=P(!1),f=Ft(()=>ci[s()]||ci.uk),p=Ft(()=>i()||Z(f).defaultWelcome);function m(e){let t=e.replace(`#`,``);t.length===3&&(t=t.split(``).map(e=>e+e).join(``));let n=parseInt(t,16);return`${n>>16&255}, ${n>>8&255}, ${n&255}`}let h=Ft(()=>m(n()));function g(){return new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}ai(()=>{F(u,[{id:`welcome`,text:Z(p),sender:`ai`,time:g()}],!0)}),bn(()=>{let e=Z(u).find(e=>e.id===`welcome`);e&&(e.text=Z(p))});let _=Ft(()=>li[s()]||li.uk),v=0;function y(e){F(u,[...Z(u),{id:Math.random().toString(36).substr(2,9),text:e,sender:`user`,time:g()}],!0),F(d,!0),setTimeout(()=>{if(F(d,!1),c()===`200`){let e=Z(_)[v];v=(v+1)%Z(_).length,F(u,[...Z(u),{id:Math.random().toString(36).substr(2,9),text:e,sender:`ai`,time:g()}],!0)}else F(u,[...Z(u),{id:Math.random().toString(36).substr(2,9),text:``,sender:`ai`,time:g(),isError:!0,errorCode:c()}],!0)},1500)}function b(e){Z(u).findIndex(t=>t.id===e)!==-1&&(F(u,Z(u).filter(t=>t.id!==e),!0),F(d,!0),setTimeout(()=>{if(F(d,!1),c()===`200`){let e=Z(_)[v];v=(v+1)%Z(_).length,F(u,[...Z(u),{id:Math.random().toString(36).substr(2,9),text:e,sender:`ai`,time:g()}],!0)}else F(u,[...Z(u),{id:Math.random().toString(36).substr(2,9),text:``,sender:`ai`,time:g(),isError:!0,errorCode:c()}],!0)},1500))}function x(){F(l,!Z(l))}var S=Ai(),ee=R(S),te=R(ee);di(te,{get aiName(){return r()},get onlineText(){return Z(f).online},get closeText(){return Z(f).close},onClose:x});var C=z(te,2);yi(C,{get messages(){return Z(u)},get isTyping(){return Z(d)},get t(){return Z(f)},onRetry:b}),Di(z(C,2),{get placeholder(){return Z(f).placeholder},get sendText(){return Z(f).send},get speechToTextText(){return Z(f).speechToText},get isTyping(){return Z(d)},get lang(){return s()},onSendMessage:y}),O(ee);var ne=z(ee,2),re=R(ne),ie=e=>{$(e,Oi())},ae=e=>{$(e,ki())};Er(re,e=>{Z(l)?e(ie):e(ae,-1)}),O(ne),O(S),En(()=>{Hr(S,1,`ai-widget-container ${a()??``}`),Wr(S,`
|
|
3
|
-
--chat-primary-color: ${n()??``};
|
|
4
|
-
--chat-primary-rgb: ${Z(h)??``};
|
|
5
|
-
--chat-bg-color: ${o()===`dark`?`#1e293b`:`#ffffff`};
|
|
6
|
-
--chat-bg-glass: ${o()===`dark`?`rgba(30, 41, 59, 0.8)`:`rgba(255, 255, 255, 0.75)`};
|
|
7
|
-
--chat-border-color: ${o()===`dark`?`rgba(51, 65, 85, 0.8)`:`rgba(226, 232, 240, 0.8)`};
|
|
8
|
-
--chat-text-main: ${o()===`dark`?`#f8fafc`:`#1e293b`};
|
|
9
|
-
--chat-text-muted: ${o()===`dark`?`#94a3b8`:`#64748b`};
|
|
10
|
-
--chat-header-bg: ${o()===`dark`?`#0f172a`:`#ffffff`};
|
|
11
|
-
--chat-body-bg: ${o()===`dark`?`#0f172a`:`#f8fafc`};
|
|
12
|
-
--chat-bubble-ai-bg: ${o()===`dark`?`#1e293b`:`#ffffff`};
|
|
13
|
-
--chat-hover-bg: ${o()===`dark`?`#334155`:`#f1f5f9`};
|
|
14
|
-
--chat-input-bg: ${o()===`dark`?`#0f172a`:`#f1f5f9`};
|
|
15
|
-
--chat-scroll-thumb: ${o()===`dark`?`#475569`:`#cbd5e1`};
|
|
16
|
-
--chat-scroll-thumb-hover: ${o()===`dark`?`#64748b`:`#94a3b8`};
|
|
17
|
-
`),Hr(ee,1,`ai-widget-window ${o()??``} ${Z(l)?`open`:``}`),Yr(ne,`aria-label`,Z(f).open)}),ur(`click`,ne,x),$(e,S),Ue()}dr([`click`]);export{F as C,He as D,Ue as E,Pe as O,z as S,Ft as T,Z as _,Wr as a,R as b,Dr as c,br as d,$ as f,ur as g,dr as h,Yr as i,O as k,Er as l,yr as m,$r as n,Hr as o,Q as p,Jr as r,jr as s,ji as t,xr as u,En as v,P as w,an as x,un as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,u as t}from"./ChatWidget-Iys5dsmQ.js";t(e,{target:document.body,props:{primaryColor:`#6366f1`,aiName:`Opti AI (Demo)`,welcomeMessage:`Вітаємо! Це емуляція вбудованого віджета чату на вашому сторонньому сайті. Чим я можу допомогти?`,position:`bottom-right`,theme:`glass`}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--font-sans:"Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;--font-heading:"Outfit", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;--bg-main:#0b0f19;--bg-card:#161c2db3;--bg-card-hover:#1a2236d9;--border-color:#ffffff14;--border-color-hover:#ffffff26;--text-primary:#f8fafc;--text-secondary:#94a3b8;--text-muted:#64748b;--accent-primary:#6366f1;--accent-gradient:linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--accent-gradient-glow:#6366f126;box-sizing:border-box}*,:before,:after{box-sizing:inherit}body{background-color:var(--bg-main);font-family:var(--font-sans);color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:radial-gradient(at 0 0,#6366f11f 0,#0000 50%),radial-gradient(at 100% 0,#a855f71a 0,#0000 50%),radial-gradient(at 50% 100%,#6366f10d 0,#0000 50%);min-height:100vh;margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-family:var(--font-heading);letter-spacing:-.02em;margin-top:0;font-weight:700}a{color:var(--accent-primary);text-decoration:none;transition:opacity .2s}a:hover{opacity:.9}#app{flex-direction:column;width:100%;min-height:100vh;display:flex}.app-container{flex-direction:column;flex:1;gap:32px;width:100%;max-width:1300px;margin:0 auto;padding:40px 24px;display:flex}.app-header{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;padding-bottom:24px;display:flex}.logo-group{align-items:center;gap:12px;display:flex}.logo-icon{background:var(--accent-gradient);color:#fff;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;font-weight:800;display:flex;box-shadow:0 4px 20px #6366f14d}.logo-text{font-family:var(--font-heading);letter-spacing:-.03em;background:linear-gradient(90deg,#fff,#cbd5e1);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-size:22px;font-weight:800}.badge-svelte{color:#ff3e00;background:#ff3e001a;border:1px solid #ff3e0033;border-radius:20px;align-items:center;gap:4px;padding:4px 10px;font-size:11px;font-weight:600;display:flex}.dashboard-layout{grid-template-columns:460px 1fr;align-items:start;gap:32px;display:grid}.glass-card{background:var(--bg-card);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border-color);border-radius:24px;padding:32px;transition:border-color .3s,box-shadow .3s,background .3s}.glass-card:hover{border-color:var(--border-color-hover);background:var(--bg-card-hover);box-shadow:0 10px 30px #0003}.settings-section{flex-direction:column;gap:24px;display:flex}.section-title{border-bottom:1px solid var(--border-color);align-items:center;gap:10px;margin-bottom:8px;padding-bottom:12px;font-size:20px;display:flex}.form-group{flex-direction:column;gap:8px;display:flex}.form-label{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.05em;font-size:13px;font-weight:600}.form-input{border:1px solid var(--border-color);color:var(--text-primary);background:#0f172a99;border-radius:12px;outline:none;padding:12px 16px;font-family:inherit;font-size:14px;transition:border-color .2s,box-shadow .2s}.form-input:focus{border-color:var(--accent-primary);box-shadow:0 0 0 3px #6366f133}.color-swatches{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.color-swatch{cursor:pointer;border:3px solid #0000;border-radius:50%;width:36px;height:36px;transition:transform .2s,border-color .2s}.color-swatch.active{border-color:#fff;transform:scale(1.1)}.color-picker-wrapper{border:2px solid var(--border-color);cursor:pointer;border-radius:50%;width:36px;height:36px;position:relative;overflow:hidden}.color-picker-input{cursor:pointer;border:none;width:60px;height:60px;position:absolute;top:-10px;left:-10px}.toggle-group{border:1px solid var(--border-color);background:#0f172a99;border-radius:12px;grid-template-columns:repeat(3,1fr);gap:8px;padding:4px;display:grid}.toggle-btn{color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;padding:8px 12px;font-family:inherit;font-size:13px;font-weight:500;transition:background .2s,color .2s}.toggle-btn.active{background:var(--accent-gradient);color:#fff;font-weight:600}.info-section{flex-direction:column;gap:24px;display:flex}.hero-banner{background:radial-gradient(circle at 100% 0,#6366f126 0%,#0000 40%);position:relative;overflow:hidden}.hero-banner:before{content:"";background:var(--accent-gradient);width:4px;height:100%;position:absolute;top:0;left:0}.hero-title{background:linear-gradient(135deg,#fff 0%,#cbd5e1 100%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;margin-bottom:12px;font-size:32px;line-height:1.25}.hero-description{color:var(--text-secondary);margin-bottom:24px;font-size:16px;line-height:1.6}.code-generator-card{flex-direction:column;gap:16px;display:flex}.code-header{justify-content:space-between;align-items:center;display:flex}.code-title{margin:0;font-size:16px;font-weight:600}.btn-copy{color:#a5b4fc;cursor:pointer;background:#6366f11a;border:1px solid #6366f133;border-radius:8px;align-items:center;gap:6px;padding:6px 14px;font-size:13px;font-weight:500;transition:background .2s,border-color .2s;display:flex}.btn-copy:hover{background:#6366f133;border-color:#6366f166}.code-block-wrapper{border:1px solid var(--border-color);background:#090d16;border-radius:12px;position:relative;overflow:hidden}.code-block{color:#e2e8f0;white-space:pre-wrap;margin:0;padding:16px 20px;font-family:Consolas,Courier New,Courier,monospace;font-size:13px;line-height:1.5;overflow-x:auto}@media (width<=1024px){.dashboard-layout{grid-template-columns:1fr}.app-container{gap:24px;padding:24px 16px}}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,O as r,S as i,T as ee,_ as a,a as te,b as o,c as ne,d as re,f as s,g as c,h as ie,i as l,k as u,l as ae,m as d,n as f,o as p,p as m,r as oe,s as se,t as ce,u as h,v as g,w as _,x as le,y as ue}from"./ChatWidget-Iys5dsmQ.js";var de=m(`<button></button>`),fe=d(`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> Скопійовано!`,1),pe=d(`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg> Копіювати код`,1),me=m(`<div class="app-container"><header class="app-header"><div class="logo-group"><div class="logo-icon">O</div> <span class="logo-text">Opti Chat</span> <span class="badge-svelte"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Svelte 5 v2.0</span></div> <div style="font-size: 13px; color: var(--text-secondary);">Проект: <strong>Віджет чату для AI (i18n)</strong></div></header> <main class="dashboard-layout"><section class="glass-card settings-section"><h2 class="section-title"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg> Налаштування віджета</h2> <div class="form-group"><span class="form-label">Мова віджета (i18n)</span> <div class="toggle-group"><button>Українська</button> <button>English</button></div></div> <div class="form-group"><label class="form-label" for="bot-name-input">Ім'я AI асистента</label> <input id="bot-name-input" type="text" class="form-input" placeholder="Введіть ім'я AI..."/></div> <div class="form-group"><label class="form-label" for="welcome-msg-input">Початкове привітання (опціонально)</label> <textarea id="welcome-msg-input" class="form-input" rows="2" style="resize: none;"></textarea></div> <div class="form-group"><span class="form-label">Основний колір бренду</span> <div class="color-swatches"><!> <div class="color-picker-wrapper" title="Кастомний колір"><input type="color" class="color-picker-input" aria-label="Вибрати власний колір"/></div></div></div> <div class="form-group"><span class="form-label">Тема інтерфейсу</span> <div class="toggle-group"><button>Світла</button> <button>Темна</button> <button>Матова</button></div></div> <div class="form-group"><span class="form-label">Розташування на екрані</span> <div class="toggle-group"><button>Зліва</button> <button>Справа</button></div></div> <div class="form-group" style="border-top: 1px solid var(--border-color); padding-top: 16px; margin-top: 16px;"><span class="form-label" style="display: flex; align-items: center; gap: 6px; color: #ef4444; font-weight: 600;"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg> Симуляція відповідей сервера</span> <div class="toggle-group" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; background: transparent; padding: 0; border: none;"><button style="font-size: 11px; padding: 8px 4px; border-radius: 8px;">200 OK (Успіх)</button> <button style="font-size: 11px; padding: 8px 4px; border-radius: 8px;">401 Auth</button> <button style="font-size: 11px; padding: 8px 4px; border-radius: 8px;">403 Forbidden</button> <button style="font-size: 11px; padding: 8px 4px; border-radius: 8px;">500 Server Err</button></div> <div style="margin-top: 8px;"><button style="width: 100%; font-size: 11px; padding: 8px 4px; border-radius: 8px;">Помилка мережі (Network Error)</button></div></div></section> <section class="info-section"><div class="glass-card hero-banner"><h1 class="hero-title">Інтерактивний AI віджет чату</h1> <p class="hero-description">Професійний чат-асистент для вашого сайту. Створено з фокусом на реактивність, високу швидкість завантаження та преміальну естетику. Спробуйте змінити налаштування зліва і подивіться на миттєві зміни віджета!</p> <div style="display: flex; gap: 16px; flex-wrap: wrap;"><div style="display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary);"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> Багатомовність (i18n)</div> <div style="display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary);"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> Svelte 5 Runes</div> <div style="display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary);"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> Нативний дизайн</div></div></div> <div class="glass-card code-generator-card"><div class="code-header"><h3 class="code-title">Код для інтеграції</h3> <button class="btn-copy" aria-label="Скопіювати код інтеграції"><!></button></div> <p style="font-size: 14px; color: var(--text-secondary); margin-bottom: 8px;">Скопіюйте цей код і вставте його перед закриваючим тегом <code></body></code> на вашому веб-сайті:</p> <div class="code-block-wrapper"><pre class="code-block"><code> </code></pre></div></div></section></main></div> <!>`,1);function v(ie,d){t(d,!0);let m=_(`#6366f1`),h=_(`Opti AI`),v=_(``),y=_(`bottom-right`),b=_(`glass`),x=_(`uk`),S=_(`200`),C=_(!1),he=[{name:`Indigo`,value:`#6366f1`},{name:`Emerald`,value:`#10b981`},{name:`Rose`,value:`#f43f5e`},{name:`Amber`,value:`#f59e0b`},{name:`Cyan`,value:`#06b6d4`}],ge=ee(()=>`<!-- Opti AI Chat Widget -->
|
|
2
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/opti-chat@1.0.0/dist/widget.css">
|
|
3
|
-
<script type="module">
|
|
4
|
-
import { initChatWidget } from 'https://cdn.jsdelivr.net/npm/opti-chat@1.0.0/dist/widget.js';
|
|
5
|
-
|
|
6
|
-
initChatWidget({
|
|
7
|
-
primaryColor: '${a(m)}',
|
|
8
|
-
aiName: '${a(h)}',
|
|
9
|
-
welcomeMessage: '${a(v)}',
|
|
10
|
-
position: '${a(y)}',
|
|
11
|
-
theme: '${a(b)}',
|
|
12
|
-
lang: '${a(x)}'
|
|
13
|
-
});
|
|
14
|
-
<\/script>`);function _e(){navigator.clipboard.writeText(a(ge)).then(()=>{e(C,!0),setTimeout(()=>{e(C,!1)},2e3)})}var ve=me(),w=le(ve),T=i(o(w),2),E=o(T),D=i(o(E),2),O=i(o(D),2),k=o(O),A=i(k,2);u(O),u(D);var j=i(D,2),M=i(o(j),2);oe(M),u(j);var N=i(j,2),P=i(o(N),2);ue(P),u(N);var F=i(N,2),I=i(o(F),2),L=o(I);se(L,17,()=>he,ne,(t,n)=>{var r=de();g(()=>{p(r,1,`color-swatch ${a(m)===a(n).value?`active`:``}`),te(r,`background-color: ${a(n).value??``};`),l(r,`title`,a(n).name),l(r,`aria-label`,`Обрати колір ${a(n).name??``}`)}),c(`click`,r,()=>e(m,a(n).value,!0)),s(t,r)});var R=i(L,2),z=o(R);oe(z),u(R),u(I),u(F);var B=i(F,2),V=i(o(B),2),H=o(V),U=i(H,2),W=i(U,2);u(V),u(B);var G=i(B,2),ye=i(o(G),2),K=o(ye),be=i(K,2);u(ye),u(G);var xe=i(G,2),q=i(o(xe),2),J=o(q),Y=i(J,2),X=i(Y,2),Se=i(X,2);u(q);var Ce=i(q,2),we=o(Ce);u(Ce),u(xe),u(E);var Te=i(E,2),Z=i(o(Te),2),Q=o(Z),$=i(o(Q),2),Ee=o($),De=e=>{var t=fe();r(),s(e,t)},Oe=e=>{var t=pe();r(),s(e,t)};ae(Ee,e=>{a(C)?e(De):e(Oe,-1)}),u($),u(Q);var ke=i(Q,4),Ae=o(ke),je=o(Ae),Me=o(je,!0);u(je),u(Ae),u(ke),u(Z),u(Te),u(T),u(w),ce(i(w,2),{get primaryColor(){return a(m)},get aiName(){return a(h)},get welcomeMessage(){return a(v)},get position(){return a(y)},get theme(){return a(b)},get lang(){return a(x)},get serverStatus(){return a(S)}}),g(()=>{p(k,1,`toggle-btn ${a(x)===`uk`?`active`:``}`),p(A,1,`toggle-btn ${a(x)===`en`?`active`:``}`),l(P,`placeholder`,a(x)===`uk`?`Використовувати дефолтне привітання...`:`Use default welcome message...`),p(H,1,`toggle-btn ${a(b)===`light`?`active`:``}`),p(U,1,`toggle-btn ${a(b)===`dark`?`active`:``}`),p(W,1,`toggle-btn ${a(b)===`glass`?`active`:``}`),p(K,1,`toggle-btn ${a(y)===`bottom-left`?`active`:``}`),p(be,1,`toggle-btn ${a(y)===`bottom-right`?`active`:``}`),p(J,1,`toggle-btn ${a(S)===`200`?`active`:``}`),p(Y,1,`toggle-btn ${a(S)===`401`?`active`:``}`),p(X,1,`toggle-btn ${a(S)===`403`?`active`:``}`),p(Se,1,`toggle-btn ${a(S)===`500`?`active`:``}`),p(we,1,`toggle-btn ${a(S)===`network`?`active`:``}`),re(Me,a(ge))}),c(`click`,k,()=>e(x,`uk`)),c(`click`,A,()=>e(x,`en`)),f(M,()=>a(h),t=>e(h,t)),f(P,()=>a(v),t=>e(v,t)),f(z,()=>a(m),t=>e(m,t)),c(`click`,H,()=>e(b,`light`)),c(`click`,U,()=>e(b,`dark`)),c(`click`,W,()=>e(b,`glass`)),c(`click`,K,()=>e(y,`bottom-left`)),c(`click`,be,()=>e(y,`bottom-right`)),c(`click`,J,()=>e(S,`200`)),c(`click`,Y,()=>e(S,`401`)),c(`click`,X,()=>e(S,`403`)),c(`click`,Se,()=>e(S,`500`)),c(`click`,we,()=>e(S,`network`)),c(`click`,$,_e),s(ie,ve),n()}ie([`click`]),h(v,{target:document.getElementById(`app`)});
|
package/dist/demo.html
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="uk">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Емуляція стороннього сайту — Opti Chat</title>
|
|
8
|
-
|
|
9
|
-
<!-- Google Fonts -->
|
|
10
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
11
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
12
|
-
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
13
|
-
|
|
14
|
-
<style>
|
|
15
|
-
body {
|
|
16
|
-
margin: 0;
|
|
17
|
-
font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
|
|
18
|
-
background-color: #f8fafc;
|
|
19
|
-
color: #0f172a;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
min-height: 100vh;
|
|
24
|
-
}
|
|
25
|
-
.container {
|
|
26
|
-
max-width: 600px;
|
|
27
|
-
background: #ffffff;
|
|
28
|
-
padding: 40px;
|
|
29
|
-
border-radius: 20px;
|
|
30
|
-
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
|
|
31
|
-
border: 1px solid #e2e8f0;
|
|
32
|
-
text-align: center;
|
|
33
|
-
}
|
|
34
|
-
.logo {
|
|
35
|
-
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
|
36
|
-
color: white;
|
|
37
|
-
width: 48px;
|
|
38
|
-
height: 48px;
|
|
39
|
-
border-radius: 12px;
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
font-weight: bold;
|
|
44
|
-
font-size: 24px;
|
|
45
|
-
margin: 0 auto 20px;
|
|
46
|
-
}
|
|
47
|
-
h1 {
|
|
48
|
-
font-size: 28px;
|
|
49
|
-
margin-bottom: 12px;
|
|
50
|
-
color: #1e293b;
|
|
51
|
-
}
|
|
52
|
-
p {
|
|
53
|
-
color: #64748b;
|
|
54
|
-
line-height: 1.6;
|
|
55
|
-
margin-bottom: 24px;
|
|
56
|
-
}
|
|
57
|
-
.btn {
|
|
58
|
-
background-color: #3b82f6;
|
|
59
|
-
color: white;
|
|
60
|
-
border: none;
|
|
61
|
-
padding: 12px 24px;
|
|
62
|
-
border-radius: 10px;
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
transition: background-color 0.2s;
|
|
66
|
-
}
|
|
67
|
-
.btn:hover {
|
|
68
|
-
background-color: #2563eb;
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
71
|
-
<script type="module" crossorigin src="/assets/demo-CSz-we4V.js"></script>
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/ChatWidget-Iys5dsmQ.js">
|
|
73
|
-
<link rel="stylesheet" crossorigin href="/assets/ChatWidget-DeUjMXPI.css">
|
|
74
|
-
</head>
|
|
75
|
-
<body>
|
|
76
|
-
<div class="container">
|
|
77
|
-
<div class="logo">A</div>
|
|
78
|
-
<h1>Ваш сторонній веб-сайт</h1>
|
|
79
|
-
<p>Це чиста сторінка для перевірки та емуляції інтеграції віджета чату. Зверніть увагу на правий нижній кут екрана — там знаходиться завантажений віджет, який функціонує повністю ізольовано від коду цього сайту.</p>
|
|
80
|
-
<button class="btn" onclick="alert('Інтерактивна дія на вашому сайті')">Дія користувача</button>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<!-- Завантаження та монтування віджета чату -->
|
|
84
|
-
</body>
|
|
85
|
-
</html>
|
package/dist/index.html
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="uk">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<meta name="description" content="Інтерактивний конструктор та віджет чату для штучного інтелекту на Svelte 5. Швидкий, легкий та повністю кастомізований віджет." />
|
|
8
|
-
<title>Opti Chat — Конструктор та віджет чату для AI</title>
|
|
9
|
-
|
|
10
|
-
<!-- Google Fonts -->
|
|
11
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
12
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
13
|
-
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
14
|
-
<script type="module" crossorigin src="/assets/main-ukqJyZq0.js"></script>
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/ChatWidget-Iys5dsmQ.js">
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/ChatWidget-DeUjMXPI.css">
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/main-B59ynshn.css">
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="app"></div>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
23
|
-
|