@liip/liipgpt 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/chat/liipgpt-chat.iife.js +2 -2
- package/lib/liipgpt-client.js +66 -67
- package/lib/liipgpt-client.umd.cjs +13 -13
- package/lib/types.d.ts +52 -65
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package provides two main features:
|
|
|
27
27
|
<head>
|
|
28
28
|
<script
|
|
29
29
|
async
|
|
30
|
-
src="https://cdn.jsdelivr.net/npm/@liip/liipgpt@0.0.
|
|
30
|
+
src="https://cdn.jsdelivr.net/npm/@liip/liipgpt@0.0.25/chat/liipgpt-chat.iife.js"
|
|
31
31
|
></script>
|
|
32
32
|
</head>
|
|
33
33
|
<body>
|
|
@@ -937,7 +937,7 @@ ${e}</tr>
|
|
|
937
937
|
`}tablecell(e){const r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
938
938
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Hr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){const o=this.parser.parseInline(n),a=Ed(e);if(a===null)return o;e=a;let i='<a href="'+e+'"';return r&&(i+=' title="'+Hr(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n}){const o=Ed(e);if(o===null)return Hr(n);e=o;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${Hr(r)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Hr(e.text)}}class Xl{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class gr{constructor(e){$(this,"options");$(this,"renderer");$(this,"textRenderer");this.options=e||Hn,this.options.renderer=this.options.renderer||new Yi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xl}static parse(e,r){return new gr(r).parse(e)}static parseInline(e,r){return new gr(r).parseInline(e)}parse(e,r=!0){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const l=s,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=u||"";continue}}const c=s;switch(c.type){case"space":{n+=this.renderer.space(c);continue}case"hr":{n+=this.renderer.hr(c);continue}case"heading":{n+=this.renderer.heading(c);continue}case"code":{n+=this.renderer.code(c);continue}case"table":{n+=this.renderer.table(c);continue}case"blockquote":{n+=this.renderer.blockquote(c);continue}case"list":{n+=this.renderer.list(c);continue}case"html":{n+=this.renderer.html(c);continue}case"paragraph":{n+=this.renderer.paragraph(c);continue}case"text":{let l=c,u=this.renderer.text(l);for(;i+1<e.length&&e[i+1].type==="text";)l=e[++i],u+=`
|
|
939
939
|
`+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,r=this.renderer){var o,a;let n="";for(let i=0;i<e.length;i++){const s=e[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}const c=s;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{const l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}}class Ia{constructor(e){$(this,"options");$(this,"block");this.options=e||Hn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?pr.lex:pr.lexInline}provideParser(){return this.block?gr.parse:gr.parseInline}}$(Ia,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Id{constructor(...e){$(this,"defaults",Zl());$(this,"options",this.setOptions);$(this,"parse",this.parseMarkdown(!0));$(this,"parseInline",this.parseMarkdown(!1));$(this,"Parser",gr);$(this,"Renderer",Yi);$(this,"TextRenderer",Xl);$(this,"Lexer",pr);$(this,"Tokenizer",Ki);$(this,"Hooks",Ia);this.use(...e)}walkTokens(e,r){var o,a;let n=[];for(const i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":{const s=i;for(const c of s.header)n=n.concat(this.walkTokens(c.tokens,r));for(const c of s.rows)for(const l of c)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{const s=i;n=n.concat(this.walkTokens(s.items,r));break}default:{const s=i;(a=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{const l=s[c].flat(1/0);n=n.concat(this.walkTokens(l,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...e){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=r.renderers[a.name];i?r.renderers[a.name]=function(...s){let c=a.renderer.apply(this,s);return c===!1&&(c=i.apply(this,s)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=r[a.level];i?i.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),o.extensions=r),n.renderer){const a=this.defaults.renderer||new Yi(this.defaults);for(const i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const s=i,c=n.renderer[s],l=a[s];a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f||""}}o.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new Ki(this.defaults);for(const i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const s=i,c=n.tokenizer[s],l=a[s];a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f}}o.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Ia;for(const i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const s=i,c=n.hooks[s],l=a[s];Ia.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(c.call(a,u)).then(d=>l.call(a,d));const f=c.call(a,u);return l.call(a,f)}:a[s]=(...u)=>{let f=c.apply(a,u);return f===!1&&(f=l.apply(a,u)),f}}o.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(s){let c=[];return c.push(i.call(this,s)),a&&(c=c.concat(a.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return pr.lex(e,r??this.defaults)}parser(e,r){return gr.parse(e,r??this.defaults)}parseMarkdown(e){return(n,o)=>{const a={...o},i={...this.defaults,...a},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const c=i.hooks?i.hooks.provideLexer():e?pr.lex:pr.lexInline,l=i.hooks?i.hooks.provideParser():e?gr.parse:gr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(s);try{i.hooks&&(n=i.hooks.preprocess(n));let u=c(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let f=l(u,i);return i.hooks&&(f=i.hooks.postprocess(f)),f}catch(u){return s(u)}}}onError(e,r){return n=>{if(n.message+=`
|
|
940
|
-
Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Hr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const Gn=new Id;function ot(t,e){return Gn.parse(t,e)}ot.options=ot.setOptions=function(t){return Gn.setOptions(t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.getDefaults=Zl,ot.defaults=Hn,ot.use=function(...t){return Gn.use(...t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.walkTokens=function(t,e){return Gn.walkTokens(t,e)},ot.parseInline=Gn.parseInline,ot.Parser=gr,ot.parser=gr.parse,ot.Renderer=Yi,ot.TextRenderer=Xl,ot.Lexer=pr,ot.lexer=pr.lex,ot.Tokenizer=Ki,ot.Hooks=Ia,ot.parse=ot,ot.options,ot.setOptions,ot.use,ot.walkTokens,ot.parseInline,gr.parse,pr.lex;const n0=t=>({extensions:[{name:"footnote",level:"inline",start(e){var r;return(r=e.match(/\[\^(\d+)\]/))==null?void 0:r.index},tokenizer(e){const n=/^\[\^(\d+)\]/.exec(e);if(n){const[o,a]=n;return{type:"footnote",raw:o,refNumber:a}}},renderer(e){if(e.type==="footnote"){const r=parseInt(e.refNumber),n=t.sources.all.find(a=>a.referenceNumber==r);n||console.error("Could not find ref with number",r);let o;return n!=null&&n.usedNumber?o=n.usedNumber:(o=t.sources.used.push(n),n.usedNumber=o),` <liipgpt-reference-number data-ref-number="${e.refNumber}" data-used-number="${o}" data-source="${JSON.stringify(n).replace(/"/g,""")}"></liipgpt-reference-number>`}}}]}),o0={hr(){return""}},Od=(t,e)=>new Id().use(n0(e)).use({renderer:o0}).parse(t),Nd=R.object({label:R.string(),options:R.array(R.object({label:R.string(),value:R.number()}))}),Pd=R.object({
|
|
940
|
+
Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An error occurred:</p><pre>"+Hr(n.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(n);throw n}}}const Gn=new Id;function ot(t,e){return Gn.parse(t,e)}ot.options=ot.setOptions=function(t){return Gn.setOptions(t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.getDefaults=Zl,ot.defaults=Hn,ot.use=function(...t){return Gn.use(...t),ot.defaults=Gn.defaults,pd(ot.defaults),ot},ot.walkTokens=function(t,e){return Gn.walkTokens(t,e)},ot.parseInline=Gn.parseInline,ot.Parser=gr,ot.parser=gr.parse,ot.Renderer=Yi,ot.TextRenderer=Xl,ot.Lexer=pr,ot.lexer=pr.lex,ot.Tokenizer=Ki,ot.Hooks=Ia,ot.parse=ot,ot.options,ot.setOptions,ot.use,ot.walkTokens,ot.parseInline,gr.parse,pr.lex;const n0=t=>({extensions:[{name:"footnote",level:"inline",start(e){var r;return(r=e.match(/\[\^(\d+)\]/))==null?void 0:r.index},tokenizer(e){const n=/^\[\^(\d+)\]/.exec(e);if(n){const[o,a]=n;return{type:"footnote",raw:o,refNumber:a}}},renderer(e){if(e.type==="footnote"){const r=parseInt(e.refNumber),n=t.sources.all.find(a=>a.referenceNumber==r);n||console.error("Could not find ref with number",r);let o;return n!=null&&n.usedNumber?o=n.usedNumber:(o=t.sources.used.push(n),n.usedNumber=o),` <liipgpt-reference-number data-ref-number="${e.refNumber}" data-used-number="${o}" data-source="${JSON.stringify(n).replace(/"/g,""")}"></liipgpt-reference-number>`}}}]}),o0={hr(){return""}},Od=(t,e)=>new Id().use(n0(e)).use({renderer:o0}).parse(t),Nd=R.object({label:R.string(),options:R.array(R.object({label:R.string(),value:R.number()}))}),Pd=R.object({impact:Nd.optional(),quality:Nd.optional()}),a0=R.object({classification:Pd.optional()}),i0=R.object({label:R.string(),icon:R.string(),url:R.string(),target:R.string()}),s0=R.object({menu:R.record(R.array(i0)).optional(),supportedLanguages:R.array(R.enum(["en","de","fr","it"])).optional(),classification:Pd.optional()}),l0=R.object({label:R.string().nullable(),question:R.string()}),c0=R.object({predefinedQuestions:R.array(l0)}),u0=R.union([R.object({maintenance:R.literal(!0)}),R.object({id:R.string(),cID:R.string()})]);var ec={exports:{}};/** @license
|
|
941
941
|
* eventsource.js
|
|
942
942
|
* Available under MIT License (MIT)
|
|
943
943
|
* https://github.com/Yaffle/EventSource/
|
|
@@ -1087,7 +1087,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const o="<p>An err
|
|
|
1087
1087
|
|
|
1088
1088
|
${this.chatState.config.customCSS??""}`,e)});$(this,"onLanguageChange",e=>{_v(e),this.loadInitialState(this.props.org),Il("?")});this.props=e,this.client=new p0({apiUrl:e.apiUrl,apiKey:e.apiKey,strict:!0})}get chatState(){return p(x(this,Ma))}set chatState(e){A(x(this,Ma),e,!0)}get pageState(){return p(x(this,Ba))}set pageState(e){A(x(this,Ba),e,!0)}}Ma=new WeakMap,Ba=new WeakMap;var Q0=V('<div aria-hidden="true"><!></div>');function Ht(t,e){Ee(e,!0);const[r,n]=Xt(),o=()=>gt(So,"$config",r);let a=k(e,"name",7),i=k(e,"class",7);var s=Q0(),c=D(s);uo(c,()=>o().theme.svgs[a()]),N(s),le(()=>At(s,1,`svg svg--${a()??""} ${i()??""}`)),C(t,s);var l=Ae({get name(){return a()},set name(u){a(u),_()},get class(){return i()},set class(u){i(u),_()}});return n(),l}Ie(Ht,{name:{},class:{}},[],[],!0);const ic=Math.min,Eo=Math.max,Ji=Math.round,Gr=t=>({x:t,y:t}),J0={left:"right",right:"left",bottom:"top",top:"bottom"},X0={start:"end",end:"start"};function nf(t,e,r){return Eo(t,ic(e,r))}function Xi(t,e){return typeof t=="function"?t(e):t}function Vn(t){return t.split("-")[0]}function es(t){return t.split("-")[1]}function of(t){return t==="x"?"y":"x"}function af(t){return t==="y"?"height":"width"}function Ao(t){return["top","bottom"].includes(Vn(t))?"y":"x"}function sf(t){return of(Ao(t))}function eb(t,e,r){r===void 0&&(r=!1);const n=es(t),o=sf(t),a=af(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=ts(i)),[i,ts(i)]}function tb(t){const e=ts(t);return[sc(t),e,sc(e)]}function sc(t){return t.replace(/start|end/g,e=>X0[e])}function rb(t,e,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?a:i;default:return[]}}function nb(t,e,r,n){const o=es(t);let a=rb(Vn(t),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),e&&(a=a.concat(a.map(sc)))),a}function ts(t){return t.replace(/left|right|bottom|top/g,e=>J0[e])}function ob(t){return{top:0,right:0,bottom:0,left:0,...t}}function ab(t){return typeof t!="number"?ob(t):{top:t,right:t,bottom:t,left:t}}function rs(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function lf(t,e,r){let{reference:n,floating:o}=t;const a=Ao(e),i=sf(e),s=af(i),c=Vn(e),l=a==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(es(e)){case"start":m[i]-=d*(r&&l?-1:1);break;case"end":m[i]+=d*(r&&l?-1:1);break}return m}const ib=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let l=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=lf(l,n,c),d=n,m={},h=0;for(let v=0;v<s.length;v++){const{name:y,fn:g}=s[v],{x:w,y:b,data:S,reset:E}=await g({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:t,floating:e}});u=w??u,f=b??f,m={...m,[y]:{...m[y],...S}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:u,y:f}=lf(l,d,c)),v=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}};async function cf(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=Xi(e,t),h=ab(m),y=s[d?f==="floating"?"reference":"floating":f],g=rs(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},E=rs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:c}):w);return{top:(g.top-E.top+h.top)/S.y,bottom:(E.bottom-g.bottom+h.bottom)/S.y,left:(g.left-E.left+h.left)/S.x,right:(E.right-g.right+h.right)/S.x}}const sb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=Xi(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=Vn(o),w=Ao(s),b=Vn(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=d||(b||!v?[ts(s)]:tb(s)),P=h!=="none";!d&&P&&E.push(...nb(s,v,h,S));const F=[s,...E],O=await cf(e,y),z=[];let X=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&z.push(O[g]),f){const ie=eb(o,i,S);z.push(O[ie[0]],O[ie[1]])}if(X=[...X,{placement:o,overflows:z}],!z.every(ie=>ie<=0)){var ae,B;const ie=(((ae=a.flip)==null?void 0:ae.index)||0)+1,I=F[ie];if(I)return{data:{index:ie,overflows:X},reset:{placement:I}};let pe=(B=X.filter(xe=>xe.overflows[0]<=0).sort((xe,Y)=>xe.overflows[1]-Y.overflows[1])[0])==null?void 0:B.placement;if(!pe)switch(m){case"bestFit":{var ee;const xe=(ee=X.filter(Y=>{if(P){const W=Ao(Y.placement);return W===w||W==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(W=>W>0).reduce((W,re)=>W+re,0)]).sort((Y,W)=>Y[1]-W[1])[0])==null?void 0:ee[0];xe&&(pe=xe);break}case"initialPlacement":pe=s;break}if(o!==pe)return{reset:{placement:pe}}}return{}}}};async function lb(t,e){const{placement:r,platform:n,elements:o}=t,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Vn(r),s=es(r),c=Ao(r)==="y",l=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,f=Xi(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),c?{x:m*u,y:d*l}:{x:d*l,y:m*u}}const cb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=e,c=await lb(e,t);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},ub=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:y=>{let{x:g,y:w}=y;return{x:g,y:w}}},...c}=Xi(t,e),l={x:r,y:n},u=await cf(e,c),f=Ao(Vn(o)),d=of(f);let m=l[d],h=l[f];if(a){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=m+u[y],b=m-u[g];m=nf(w,m,b)}if(i){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",w=h+u[y],b=h-u[g];h=nf(w,h,b)}const v=s.fn({...e,[d]:m,[f]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[d]:a,[f]:i}}}}}};function ns(){return typeof window<"u"}function Ro(t){return uf(t)?(t.nodeName||"").toLowerCase():"#document"}function or(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function hn(t){var e;return(e=(uf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function uf(t){return ns()?t instanceof Node||t instanceof or(t).Node:!1}function Ir(t){return ns()?t instanceof Element||t instanceof or(t).Element:!1}function Vr(t){return ns()?t instanceof HTMLElement||t instanceof or(t).HTMLElement:!1}function df(t){return!ns()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof or(t).ShadowRoot}function Na(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=Or(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function db(t){return["table","td","th"].includes(Ro(t))}function os(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function lc(t){const e=cc(),r=Ir(t)?Or(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function fb(t){let e=An(t);for(;Vr(e)&&!Io(e);){if(lc(e))return e;if(os(e))return null;e=An(e)}return null}function cc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Io(t){return["html","body","#document"].includes(Ro(t))}function Or(t){return or(t).getComputedStyle(t)}function as(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function An(t){if(Ro(t)==="html")return t;const e=t.assignedSlot||t.parentNode||df(t)&&t.host||hn(t);return df(e)?e.host:e}function ff(t){const e=An(t);return Io(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Na(e)?e:ff(e)}function hf(t,e,r){var n;e===void 0&&(e=[]);const o=ff(t),a=o===((n=t.ownerDocument)==null?void 0:n.body),i=or(o);return a?(uc(i),e.concat(i,i.visualViewport||[],Na(o)?o:[],[])):e.concat(o,hf(o,[]))}function uc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pf(t){const e=Or(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=Vr(t),a=o?t.offsetWidth:r,i=o?t.offsetHeight:n,s=Ji(r)!==a||Ji(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function gf(t){return Ir(t)?t:t.contextElement}function Oo(t){const e=gf(t);if(!Vr(e))return Gr(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:a}=pf(e);let i=(a?Ji(r.width):r.width)/n,s=(a?Ji(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const hb=Gr(0);function mf(t){const e=or(t);return!cc()||!e.visualViewport?hb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pb(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==or(t)?!1:e}function Pa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),a=gf(t);let i=Gr(1);e&&(n?Ir(n)&&(i=Oo(n)):i=Oo(t));const s=pb(a,r,n)?mf(a):Gr(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(a){const d=or(a),m=n&&Ir(n)?or(n):n;let h=d,v=uc(h);for(;v&&n&&m!==h;){const y=Oo(v),g=v.getBoundingClientRect(),w=Or(v),b=g.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,S=g.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,f*=y.y,c+=b,l+=S,h=or(v),v=uc(h)}}return rs({width:u,height:f,x:c,y:l})}function dc(t,e){const r=as(t).scrollLeft;return e?e.left+r:Pa(hn(t)).left+r}function vf(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:dc(t,n)),a=n.top+e.scrollTop;return{x:o,y:a}}function gb(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const a=o==="fixed",i=hn(n),s=e?os(e.floating):!1;if(n===i||s&&a)return r;let c={scrollLeft:0,scrollTop:0},l=Gr(1);const u=Gr(0),f=Vr(n);if((f||!f&&!a)&&((Ro(n)!=="body"||Na(i))&&(c=as(n)),Vr(n))){const m=Pa(n);l=Oo(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const d=i&&!f&&!a?vf(i,c,!0):Gr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+d.x,y:r.y*l.y-c.scrollTop*l.y+u.y+d.y}}function mb(t){return Array.from(t.getClientRects())}function vb(t){const e=hn(t),r=as(t),n=t.ownerDocument.body,o=Eo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Eo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+dc(t);const s=-r.scrollTop;return Or(n).direction==="rtl"&&(i+=Eo(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}function bb(t,e){const r=or(t),n=hn(t),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const l=cc();(!l||l&&e==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function yb(t,e){const r=Pa(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,a=Vr(t)?Oo(t):Gr(1),i=t.clientWidth*a.x,s=t.clientHeight*a.y,c=o*a.x,l=n*a.y;return{width:i,height:s,x:c,y:l}}function bf(t,e,r){let n;if(e==="viewport")n=bb(t,r);else if(e==="document")n=vb(hn(t));else if(Ir(e))n=yb(e,r);else{const o=mf(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return rs(n)}function yf(t,e){const r=An(t);return r===e||!Ir(r)||Io(r)?!1:Or(r).position==="fixed"||yf(r,e)}function wb(t,e){const r=e.get(t);if(r)return r;let n=hf(t,[]).filter(s=>Ir(s)&&Ro(s)!=="body"),o=null;const a=Or(t).position==="fixed";let i=a?An(t):t;for(;Ir(i)&&!Io(i);){const s=Or(i),c=lc(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Na(i)&&!c&&yf(t,i))?n=n.filter(u=>u!==i):o=s,i=An(i)}return e.set(t,n),n}function _b(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const i=[...r==="clippingAncestors"?os(e)?[]:wb(e,this._c):[].concat(r),n],s=i[0],c=i.reduce((l,u)=>{const f=bf(e,u,o);return l.top=Eo(f.top,l.top),l.right=ic(f.right,l.right),l.bottom=ic(f.bottom,l.bottom),l.left=Eo(f.left,l.left),l},bf(e,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kb(t){const{width:e,height:r}=pf(t);return{width:e,height:r}}function xb(t,e,r){const n=Vr(e),o=hn(e),a=r==="fixed",i=Pa(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const c=Gr(0);if(n||!n&&!a)if((Ro(e)!=="body"||Na(o))&&(s=as(e)),n){const d=Pa(e,!0,a,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop}else o&&(c.x=dc(o));const l=o&&!n&&!a?vf(o,s):Gr(0),u=i.left+s.scrollLeft-c.x-l.x,f=i.top+s.scrollTop-c.y-l.y;return{x:u,y:f,width:i.width,height:i.height}}function fc(t){return Or(t).position==="static"}function wf(t,e){if(!Vr(t)||Or(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return hn(t)===r&&(r=r.ownerDocument.body),r}function _f(t,e){const r=or(t);if(os(t))return r;if(!Vr(t)){let o=An(t);for(;o&&!Io(o);){if(Ir(o)&&!fc(o))return o;o=An(o)}return r}let n=wf(t,e);for(;n&&db(n)&&fc(n);)n=wf(n,e);return n&&Io(n)&&fc(n)&&!lc(n)?r:n||fb(t)||r}const Sb=async function(t){const e=this.getOffsetParent||_f,r=this.getDimensions,n=await r(t.floating);return{reference:xb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tb(t){return Or(t).direction==="rtl"}const Cb={convertOffsetParentRelativeRectToViewportRelativeRect:gb,getDocumentElement:hn,getClippingRect:_b,getOffsetParent:_f,getElementRects:Sb,getClientRects:mb,getDimensions:kb,getScale:Oo,isElement:Ir,isRTL:Tb},kf=cb,xf=ub,Eb=sb,Sf=(t,e,r)=>{const n=new Map,o={platform:Cb,...r},a={...o.platform,_c:n};return ib(t,e,{...o,platform:a})};function hc(t,e={enabled:!0}){let{enabled:r,eventType:n,nodeForEvent:o,options:a}=Tf(e);function i(c){c.target&&t&&!t.contains(c.target)&&!c.defaultPrevented&&t.dispatchEvent(new CustomEvent("clickoutside",{detail:c}))}let s;return e.enabled!==!1&&(s=Ft(o,n,i,a)),{update(c){s==null||s(),{enabled:r,eventType:n,nodeForEvent:o,options:a}=Tf(c),r&&(s=Ft(o,n,i,a))},destroy(){s==null||s()}}}function Tf(t={}){var e;return{enabled:t.enabled??!0,nodeForEvent:((e=t.limit)==null?void 0:e.parent)??document,eventType:t.event??"click",options:typeof t.options=="boolean"?{capture:t.options}:t.options}}const Ab=t=>t;function Cf(t){const e=t-1;return e*e*e+1}function Ef(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Af(t,{delay:e=0,duration:r=400,easing:n=Ab}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:a=>`opacity: ${a*o}`}}function Fa(t,{delay:e=0,duration:r=400,easing:n=Cf,x:o=0,y:a=0,opacity:i=0}={}){const s=getComputedStyle(t),c=+s.opacity,l=s.transform==="none"?"":s.transform,u=c*(1-i),[f,d]=Ef(o),[m,h]=Ef(a);return{delay:e,duration:r,easing:n,css:(v,y)=>`
|
|
1089
1089
|
transform: ${l} translate(${(1-v)*f}${d}, ${(1-v)*m}${h});
|
|
1090
|
-
opacity: ${c-u*y}`}}function Rb(t,{delay:e=0,duration:r=400,easing:n=Cf,axis:o="y"}={}){const a=getComputedStyle(t),i=+a.opacity,s=o==="y"?"height":"width",c=parseFloat(a[s]),l=o==="y"?["top","bottom"]:["left","right"],u=l.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),m=parseFloat(a[`margin${u[0]}`]),h=parseFloat(a[`margin${u[1]}`]),v=parseFloat(a[`border${u[0]}Width`]),y=parseFloat(a[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*i};${s}: ${g*c}px;padding-${l[0]}: ${g*f}px;padding-${l[1]}: ${g*d}px;margin-${l[0]}: ${g*m}px;margin-${l[1]}: ${g*h}px;border-${l[0]}-width: ${g*v}px;border-${l[1]}-width: ${g*y}px;min-${s}: 0`}}var Ib=(t,e)=>(t.stopPropagation(),A(e,!p(e))),Ob=V('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),Nb=(t,e,r)=>e(p(r)),Pb=V("<li><button><!> <span> </span></button></li>"),Fb=V('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),Lb=V('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),Db=V('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function Rf(t,e){var X,ae,B;Ee(e,!0);const[r,n]=Xt(),o=()=>gt(So,"$config",r),a=()=>gt(fn,"$t",r),i=()=>gt(Ta,"$selectedLanguageStore",r);let s=k(e,"menu",7),c=k(e,"usedLanguages",7),l=k(e,"currentLanguage",7),u=k(e,"onLanguageChange",7),f=me(!1),d,m=me(void 0);const h={duration:Number((X=o().theme.components.referenceNumberContent.custom)==null?void 0:X.transitionDuration)||200,delay:Number((ae=o().theme.components.referenceNumberContent.custom)==null?void 0:ae.transitionDelay)||0,y:Number((B=o().theme.components.referenceNumberContent.custom)==null?void 0:B.transitionY)||10},v=async()=>{if(!d||!p(m))return;const{x:ee,y:ie}=await Sf(d,p(m),{placement:"bottom-end",middleware:[kf(8),xf({padding:8})]});Object.assign(p(m).style,{left:`${ee}px`,top:`${ie}px`})};vt(()=>{p(f)&&v()}),vt(()=>{Ta.set(l())});const y=ee=>{u()&&(u()(ee),Ta.set(ee),A(f,!1))};var g=Db(),w=D(g);w.__click=[Ib,f];var b=D(w),S=D(b,!0);N(b);var E=ne(b,2);const P=De(()=>p(f)?"dismiss":"menu");Ht(E,{get name(){return p(P)}}),N(w),jr(w,ee=>d=ee,()=>d),bl(w,ee=>hc==null?void 0:hc(ee));var F=ne(w,2);{var O=ee=>{var ie=Lb(),I=D(ie);Sr(I,21,()=>s()??[],$r,(Y,W)=>{var re=Ob(),te=D(re),ye=D(te);Ht(ye,{get name(){return p(W).icon},class:"chat-menu__item-icon"});var Se=ne(ye,2),_e=D(Se,!0);N(Se),N(te),N(re),le(()=>{Pe(te,"href",p(W).url),Pe(te,"target",p(W).target),We(_e,p(W).label)}),C(Y,re)}),N(I);var pe=ne(I,2);{var xe=Y=>{var W=Fb(),re=ne(J(W),2),te=D(re,!0);N(re);var ye=ne(re,2);Sr(ye,21,c,$r,(Se,_e)=>{var ze=Pb(),He=D(ze);let bt;He.__click=[Nb,y,_e];var rt=D(He);Ht(rt,{name:"internalLink",class:"chat-menu__item-icon"});var se=ne(rt,2),M=D(se,!0);N(se),N(He),N(ze),le(Te=>{bt=At(He,1,"chat-menu__item transition-colors",null,bt,Te),We(M,ql[p(_e)].languageNames[p(_e)])},[()=>({active:i()===p(_e)})]),C(Se,ze)}),N(ye),le(()=>We(te,a().selectLanguage)),C(Y,W)};ce(pe,Y=>{c().length>0&&Y(xe)})}N(ie),jr(ie,Y=>A(m,Y),()=>p(m)),zr(3,ie,()=>Fa,()=>h),C(ee,ie)};ce(F,ee=>{p(f)&&ee(O)})}N(g),le(()=>We(S,p(f)?a().closeMenu:a().openMenu)),ct("clickoutside",w,()=>A(f,!1)),C(t,g);var z=Ae({get menu(){return s()},set menu(ee){s(ee),_()},get usedLanguages(){return c()},set usedLanguages(ee){c(ee),_()},get currentLanguage(){return l()},set currentLanguage(ee){l(ee),_()},get onLanguageChange(){return u()},set onLanguageChange(ee){u(ee),_()}});return n(),z}lo(["click"]),Ie(Rf,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const Mb=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var Bb=V('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit"><!></button></form>');function pc(t,e){Ee(e,!0);const[r,n]=Xt(),o=()=>gt(fn,"$t",r);let a=k(e,"class",7),i=k(e,"onSubmit",7),s=Cr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),c=me(""),l=De(()=>p(c)!==""),u,f;const d=P=>{P.preventDefault(),p(c)&&(i()(p(c)),A(c,""),m())},m=()=>{u.style.height="auto"},h=()=>{m();const P=parseInt(getComputedStyle(u).borderWidth)*2;u.style.height=`${u.scrollHeight+P}px`};vt(()=>{if(u)return f=new ResizeObserver(()=>{h()}),f.observe(u),()=>{f.disconnect()}});var v=Bb();ct("resize",ea,h);let y;var g=D(v);vu(g),g.__input=h,g.__change=h,g.__keydown=[Mb,d],Pe(g,"rows",1),jr(g,P=>u=P,()=>u);var w=ne(g,2);let b;var S=D(w);Ht(S,{name:"submit",class:"chat-input__submit-icon"}),N(w),N(v),le(P=>{y=Jt(v,y,{name:"chat-input",onsubmit:d,class:`chat-input ${a()??""}`,...s}),Pe(g,"placeholder",o().chatInputPlaceholder),Pe(w,"aria-label",o().chatInputSubmit),w.disabled=!p(l),b=At(w,1,"chat-input__submit-button transition-colors",null,b,P)},[()=>({"chat-input__submit-button--deactivated":!p(l)})]),xl(g,()=>p(c),P=>A(c,P)),C(t,v);var E=Ae({get class(){return a()},set class(P){a(P),_()},get onSubmit(){return i()},set onSubmit(P){i(P),_()}});return n(),E}lo(["input","change","keydown"]),Ie(pc,{class:{},onSubmit:{}},[],[],!0);var $b=V('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="quality" class="svelte-vqj1lp"> </label>'),zb=V('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),jb=V('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="impact" class="svelte-vqj1lp"> </label>'),qb=V('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),Ub=V('<div class="classification-feedback svelte-vqj1lp"><div class="classification-feedback__title svelte-vqj1lp"> </div> <!> <!></div>');const Zb={hash:"svelte-vqj1lp",code:".classification-feedback.svelte-vqj1lp {display:flex;flex-direction:column;padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);gap:var(--spacer-32);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color);}.classification-feedback__item.svelte-vqj1lp {display:flex;flex-direction:column;margin:0;padding:0;gap:var(--spacer-4);border:none;}.classification-feedback__title.svelte-vqj1lp {margin-bottom:-1rem;font-weight:bold;}.classification-feedback__label.svelte-vqj1lp {margin-bottom:var(--spacer-8);font-weight:bold;}.classification-feedback__option.svelte-vqj1lp {display:flex;align-items:center;padding-left:var(--spacer-16);gap:var(--spacer-12);&:has(input:where(.svelte-vqj1lp):checked) {background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color);}&:has(input:where(.svelte-vqj1lp):focus-visible) {border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);}&:has(input:where(.svelte-vqj1lp):focus-visible) input:where(.svelte-vqj1lp) {outline:none;}}"};function If(t,e){Ee(e,!0),aa(t,Zb);const[r,n]=Xt(),o=()=>gt(fn,"$t",r),a=[],i=[];let s=k(e,"impact",15),c=k(e,"quality",15),l=k(e,"classificationConfig",7);var u=he(),f=J(u);{var d=h=>{var v=Ub(),y=D(v),g=D(y,!0);N(y);var w=ne(y,2);{var b=P=>{var F=zb(),O=D(F),z=D(O,!0);N(O);var X=ne(O,2);Sr(X,17,()=>l().quality.options,$r,(ae,B)=>{var ee=$b(),ie=D(ee);_l(ie);var I,pe=ne(ie);N(ee),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),We(pe,` ${p(B).label??""}`)}),Mu(a,[],ie,()=>(p(B).value,c()),c),C(ae,ee)}),N(F),le(()=>We(z,l().quality.label)),C(P,F)};ce(w,P=>{l().quality.options.length!==0&&P(b)})}var S=ne(w,2);{var E=P=>{var F=qb(),O=D(F),z=D(O,!0);N(O);var X=ne(O,2);Sr(X,17,()=>l().impact.options,$r,(ae,B)=>{var ee=jb(),ie=D(ee);_l(ie);var I,pe=ne(ie);N(ee),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),We(pe,` ${p(B).label??""}`)}),Mu(i,[],ie,()=>(p(B).value,s()),s),C(ae,ee)}),N(F),le(()=>We(z,l().impact.label)),C(P,F)};ce(S,P=>{l().impact.options.length!==0&&P(E)})}N(v),le(()=>We(g,o().classificationTitle)),C(h,v)};ce(f,h=>{l()&&l().enabled&&h(d)})}C(t,u);var m=Ae({get impact(){return s()},set impact(h){s(h),_()},get quality(){return c()},set quality(h){c(h),_()},get classificationConfig(){return l()},set classificationConfig(h){l(h),_()}});return n(),m}Ie(If,{impact:{},quality:{},classificationConfig:{}},[],[],!0);function Hb(t){return typeof t=="function"}function Gb(t){return t!==null&&typeof t=="object"}const Vb=["string","number","bigint","boolean"];function gc(t){return t==null||Vb.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>gc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const La=Symbol("box"),mc=Symbol("is-writable");function Wb(t){return Gb(t)&&La in t}function Kb(t){return Q.isBox(t)&&mc in t}function Q(t){let e=me(Mr(t));return{[La]:!0,[mc]:!0,get current(){return p(e)},set current(r){A(e,r,!0)}}}function Yb(t,e){const r=De(t);return e?{[La]:!0,[mc]:!0,get current(){return p(r)},set current(n){e(n)}}:{[La]:!0,get current(){return t()}}}function Qb(t){return Q.isBox(t)?t:Hb(t)?Q.with(t):Q(t)}function Jb(t){return Object.entries(t).reduce((e,[r,n])=>Q.isBox(n)?(Q.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(o){n.current=o}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function Xb(t){return Q.isWritableBox(t)?{[La]:!0,get current(){return t.current}}:t}Q.from=Qb,Q.with=Yb,Q.flatten=Jb,Q.readonly=Xb,Q.isBox=Wb,Q.isWritableBox=Kb;function Of(...t){return function(e){var r;for(const n of t)if(n){if(e.defaultPrevented)return;typeof n=="function"?n.call(this,e):(r=n.current)==null||r.call(this,e)}}}var Nf={},Pf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ey=/\n/g,ty=/^\s*/,ry=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ny=/^:\s*/,oy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ay=/^[;\s]*/,iy=/^\s+|\s+$/g,sy=`
|
|
1090
|
+
opacity: ${c-u*y}`}}function Rb(t,{delay:e=0,duration:r=400,easing:n=Cf,axis:o="y"}={}){const a=getComputedStyle(t),i=+a.opacity,s=o==="y"?"height":"width",c=parseFloat(a[s]),l=o==="y"?["top","bottom"]:["left","right"],u=l.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),m=parseFloat(a[`margin${u[0]}`]),h=parseFloat(a[`margin${u[1]}`]),v=parseFloat(a[`border${u[0]}Width`]),y=parseFloat(a[`border${u[1]}Width`]);return{delay:e,duration:r,easing:n,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*i};${s}: ${g*c}px;padding-${l[0]}: ${g*f}px;padding-${l[1]}: ${g*d}px;margin-${l[0]}: ${g*m}px;margin-${l[1]}: ${g*h}px;border-${l[0]}-width: ${g*v}px;border-${l[1]}-width: ${g*y}px;min-${s}: 0`}}var Ib=(t,e)=>(t.stopPropagation(),A(e,!p(e))),Ob=V('<li><a class="chat-menu__item transition-colors"><!> <span> </span></a></li>'),Nb=(t,e,r)=>e(p(r)),Pb=V("<li><button><!> <span> </span></button></li>"),Fb=V('<hr class="chat-menu__separator"> <div class="chat-menu__title"> </div> <ul class="chat-menu__list"></ul>',1),Lb=V('<div class="chat-menu__content"><ul class="chat-menu__list"></ul> <!></div>'),Db=V('<div class="chat-menu"><button class="chat-menu__trigger btn btn--secondary"><span class="sr-only"> </span> <!></button> <!></div>');function Rf(t,e){var X,ae,B;Ee(e,!0);const[r,n]=Xt(),o=()=>gt(So,"$config",r),a=()=>gt(fn,"$t",r),i=()=>gt(Ta,"$selectedLanguageStore",r);let s=k(e,"menu",7),c=k(e,"usedLanguages",7),l=k(e,"currentLanguage",7),u=k(e,"onLanguageChange",7),f=me(!1),d,m=me(void 0);const h={duration:Number((X=o().theme.components.referenceNumberContent.custom)==null?void 0:X.transitionDuration)||200,delay:Number((ae=o().theme.components.referenceNumberContent.custom)==null?void 0:ae.transitionDelay)||0,y:Number((B=o().theme.components.referenceNumberContent.custom)==null?void 0:B.transitionY)||10},v=async()=>{if(!d||!p(m))return;const{x:ee,y:ie}=await Sf(d,p(m),{placement:"bottom-end",middleware:[kf(8),xf({padding:8})]});Object.assign(p(m).style,{left:`${ee}px`,top:`${ie}px`})};vt(()=>{p(f)&&v()}),vt(()=>{Ta.set(l())});const y=ee=>{u()&&(u()(ee),Ta.set(ee),A(f,!1))};var g=Db(),w=D(g);w.__click=[Ib,f];var b=D(w),S=D(b,!0);N(b);var E=ne(b,2);const P=De(()=>p(f)?"dismiss":"menu");Ht(E,{get name(){return p(P)}}),N(w),jr(w,ee=>d=ee,()=>d),bl(w,ee=>hc==null?void 0:hc(ee));var F=ne(w,2);{var O=ee=>{var ie=Lb(),I=D(ie);Sr(I,21,()=>s()??[],$r,(Y,W)=>{var re=Ob(),te=D(re),ye=D(te);Ht(ye,{get name(){return p(W).icon},class:"chat-menu__item-icon"});var Se=ne(ye,2),_e=D(Se,!0);N(Se),N(te),N(re),le(()=>{Pe(te,"href",p(W).url),Pe(te,"target",p(W).target),We(_e,p(W).label)}),C(Y,re)}),N(I);var pe=ne(I,2);{var xe=Y=>{var W=Fb(),re=ne(J(W),2),te=D(re,!0);N(re);var ye=ne(re,2);Sr(ye,21,c,$r,(Se,_e)=>{var ze=Pb(),He=D(ze);let bt;He.__click=[Nb,y,_e];var rt=D(He);Ht(rt,{name:"internalLink",class:"chat-menu__item-icon"});var se=ne(rt,2),M=D(se,!0);N(se),N(He),N(ze),le(Te=>{bt=At(He,1,"chat-menu__item transition-colors",null,bt,Te),We(M,ql[p(_e)].languageNames[p(_e)])},[()=>({active:i()===p(_e)})]),C(Se,ze)}),N(ye),le(()=>We(te,a().selectLanguage)),C(Y,W)};ce(pe,Y=>{c().length>0&&Y(xe)})}N(ie),jr(ie,Y=>A(m,Y),()=>p(m)),zr(3,ie,()=>Fa,()=>h),C(ee,ie)};ce(F,ee=>{p(f)&&ee(O)})}N(g),le(()=>We(S,p(f)?a().closeMenu:a().openMenu)),ct("clickoutside",w,()=>A(f,!1)),C(t,g);var z=Ae({get menu(){return s()},set menu(ee){s(ee),_()},get usedLanguages(){return c()},set usedLanguages(ee){c(ee),_()},get currentLanguage(){return l()},set currentLanguage(ee){l(ee),_()},get onLanguageChange(){return u()},set onLanguageChange(ee){u(ee),_()}});return n(),z}lo(["click"]),Ie(Rf,{menu:{},usedLanguages:{},currentLanguage:{},onLanguageChange:{}},[],[],!0);const Mb=(t,e)=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e(new SubmitEvent("submit")))};var Bb=V('<form><textarea class="chat-input__textarea transition-colors"></textarea> <button type="submit"><!></button></form>');function pc(t,e){Ee(e,!0);const[r,n]=Xt(),o=()=>gt(fn,"$t",r);let a=k(e,"class",7),i=k(e,"onSubmit",7),s=Cr(e,["$$slots","$$events","$$legacy","$$host","class","onSubmit"]),c=me(""),l=De(()=>p(c)!==""),u,f;const d=P=>{P.preventDefault(),p(c)&&(i()(p(c)),A(c,""),m())},m=()=>{u.style.height="auto"},h=()=>{m();const P=parseInt(getComputedStyle(u).borderWidth)*2;u.style.height=`${u.scrollHeight+P}px`};vt(()=>{if(u)return f=new ResizeObserver(()=>{h()}),f.observe(u),()=>{f.disconnect()}});var v=Bb();ct("resize",ea,h);let y;var g=D(v);vu(g),g.__input=h,g.__change=h,g.__keydown=[Mb,d],Pe(g,"rows",1),jr(g,P=>u=P,()=>u);var w=ne(g,2);let b;var S=D(w);Ht(S,{name:"submit",class:"chat-input__submit-icon"}),N(w),N(v),le(P=>{y=Jt(v,y,{name:"chat-input",onsubmit:d,class:`chat-input ${a()??""}`,...s}),Pe(g,"placeholder",o().chatInputPlaceholder),Pe(w,"aria-label",o().chatInputSubmit),w.disabled=!p(l),b=At(w,1,"chat-input__submit-button transition-colors",null,b,P)},[()=>({"chat-input__submit-button--deactivated":!p(l)})]),xl(g,()=>p(c),P=>A(c,P)),C(t,v);var E=Ae({get class(){return a()},set class(P){a(P),_()},get onSubmit(){return i()},set onSubmit(P){i(P),_()}});return n(),E}lo(["input","change","keydown"]),Ie(pc,{class:{},onSubmit:{}},[],[],!0);var $b=V('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="quality" class="svelte-vqj1lp"> </label>'),zb=V('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),jb=V('<label class="classification-feedback__option btn btn--secondary svelte-vqj1lp"><input type="radio" name="impact" class="svelte-vqj1lp"> </label>'),qb=V('<fieldset class="classification-feedback__item svelte-vqj1lp"><legend class="classification-feedback__label svelte-vqj1lp"> </legend> <!></fieldset>'),Ub=V('<div class="classification-feedback svelte-vqj1lp"><div class="classification-feedback__title svelte-vqj1lp"> </div> <!> <!></div>');const Zb={hash:"svelte-vqj1lp",code:".classification-feedback.svelte-vqj1lp {display:flex;flex-direction:column;padding:var(--spacer-r-20) var(--spacer-r-24) var(--spacer-r-32) var(--spacer-r-24);gap:var(--spacer-32);border-width:var(--message-user-border-width);border-radius:var(--message-user-border-radius);border-color:var(--message-user-border-color);background:var(--message-user-background);box-shadow:var(--message-user-box-shadow);color:var(--message-user-color);}.classification-feedback__item.svelte-vqj1lp {display:flex;flex-direction:column;margin:0;padding:0;gap:var(--spacer-4);border:none;}.classification-feedback__title.svelte-vqj1lp {margin-bottom:-1rem;font-weight:bold;}.classification-feedback__label.svelte-vqj1lp {margin-bottom:var(--spacer-8);font-weight:bold;}.classification-feedback__option.svelte-vqj1lp {display:flex;align-items:center;padding-left:var(--spacer-16);gap:var(--spacer-12);&:has(input:where(.svelte-vqj1lp):checked) {background:var(--btn-secondary-hover-background);color:var(--btn-secondary-hover-color);}&:has(input:where(.svelte-vqj1lp):focus-visible) {border-radius:var(--spacer-8);outline-color:var(--body-focus-color);outline-style:solid;outline-width:var(--spacer-3);}&:has(input:where(.svelte-vqj1lp):focus-visible) input:where(.svelte-vqj1lp) {outline:none;}}"};function If(t,e){Ee(e,!0),aa(t,Zb);const[r,n]=Xt(),o=()=>gt(fn,"$t",r),a=[],i=[];let s=k(e,"impact",15),c=k(e,"quality",15),l=k(e,"classificationConfig",7);var u=he(),f=J(u);{var d=h=>{var v=Ub(),y=D(v),g=D(y,!0);N(y);var w=ne(y,2);{var b=P=>{var F=zb(),O=D(F),z=D(O,!0);N(O);var X=ne(O,2);Sr(X,17,()=>l().quality.options,$r,(ae,B)=>{var ee=$b(),ie=D(ee);_l(ie);var I,pe=ne(ie);N(ee),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),We(pe,` ${p(B).label??""}`)}),Mu(a,[],ie,()=>(p(B).value,c()),c),C(ae,ee)}),N(F),le(()=>We(z,l().quality.label)),C(P,F)};ce(w,P=>{l().quality&&l().quality.options.length!==0&&P(b)})}var S=ne(w,2);{var E=P=>{var F=qb(),O=D(F),z=D(O,!0);N(O);var X=ne(O,2);Sr(X,17,()=>l().impact.options,$r,(ae,B)=>{var ee=jb(),ie=D(ee);_l(ie);var I,pe=ne(ie);N(ee),le(()=>{I!==(I=p(B).value)&&(ie.value=(ie.__value=p(B).value)==null?"":p(B).value),We(pe,` ${p(B).label??""}`)}),Mu(i,[],ie,()=>(p(B).value,s()),s),C(ae,ee)}),N(F),le(()=>We(z,l().impact.label)),C(P,F)};ce(S,P=>{l().impact&&l().impact.options.length!==0&&P(E)})}N(v),le(()=>We(g,o().classificationTitle)),C(h,v)};ce(f,h=>{l()&&(l().quality||l().impact)&&h(d)})}C(t,u);var m=Ae({get impact(){return s()},set impact(h){s(h),_()},get quality(){return c()},set quality(h){c(h),_()},get classificationConfig(){return l()},set classificationConfig(h){l(h),_()}});return n(),m}Ie(If,{impact:{},quality:{},classificationConfig:{}},[],[],!0);function Hb(t){return typeof t=="function"}function Gb(t){return t!==null&&typeof t=="object"}const Vb=["string","number","bigint","boolean"];function gc(t){return t==null||Vb.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>gc(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const La=Symbol("box"),mc=Symbol("is-writable");function Wb(t){return Gb(t)&&La in t}function Kb(t){return Q.isBox(t)&&mc in t}function Q(t){let e=me(Mr(t));return{[La]:!0,[mc]:!0,get current(){return p(e)},set current(r){A(e,r,!0)}}}function Yb(t,e){const r=De(t);return e?{[La]:!0,[mc]:!0,get current(){return p(r)},set current(n){e(n)}}:{[La]:!0,get current(){return t()}}}function Qb(t){return Q.isBox(t)?t:Hb(t)?Q.with(t):Q(t)}function Jb(t){return Object.entries(t).reduce((e,[r,n])=>Q.isBox(n)?(Q.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(o){n.current=o}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function Xb(t){return Q.isWritableBox(t)?{[La]:!0,get current(){return t.current}}:t}Q.from=Qb,Q.with=Yb,Q.flatten=Jb,Q.readonly=Xb,Q.isBox=Wb,Q.isWritableBox=Kb;function Of(...t){return function(e){var r;for(const n of t)if(n){if(e.defaultPrevented)return;typeof n=="function"?n.call(this,e):(r=n.current)==null||r.call(this,e)}}}var Nf={},Pf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ey=/\n/g,ty=/^\s*/,ry=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ny=/^:\s*/,oy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ay=/^[;\s]*/,iy=/^\s+|\s+$/g,sy=`
|
|
1091
1091
|
`,Ff="/",Lf="*",Wn="",ly="comment",cy="declaration",uy=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function o(h){var v=h.match(ey);v&&(r+=v.length);var y=h.lastIndexOf(sy);n=~y?h.length-y:n+h.length}function a(){var h={line:r,column:n};return function(v){return v.position=new i(h),l(),v}}function i(h){this.start=h,this.end={line:r,column:n},this.source=e.source}i.prototype.content=t;function s(h){var v=new Error(e.source+":"+r+":"+n+": "+h);if(v.reason=h,v.filename=e.source,v.line=r,v.column=n,v.source=t,!e.silent)throw v}function c(h){var v=h.exec(t);if(v){var y=v[0];return o(y),t=t.slice(y.length),v}}function l(){c(ty)}function u(h){var v;for(h=h||[];v=f();)v!==!1&&h.push(v);return h}function f(){var h=a();if(!(Ff!=t.charAt(0)||Lf!=t.charAt(1))){for(var v=2;Wn!=t.charAt(v)&&(Lf!=t.charAt(v)||Ff!=t.charAt(v+1));)++v;if(v+=2,Wn===t.charAt(v-1))return s("End of comment missing");var y=t.slice(2,v-2);return n+=2,o(y),t=t.slice(v),n+=2,h({type:ly,comment:y})}}function d(){var h=a(),v=c(ry);if(v){if(f(),!c(ny))return s("property missing ':'");var y=c(oy),g=h({type:cy,property:Df(v[0].replace(Pf,Wn)),value:y?Df(y[0].replace(Pf,Wn)):Wn});return c(ay),g}}function m(){var h=[];u(h);for(var v;v=d();)v!==!1&&(h.push(v),u(h));return h}return l(),m()};function Df(t){return t?t.replace(iy,Wn):Wn}var dy=zl&&zl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nf,"__esModule",{value:!0});var Mf=Nf.default=hy,fy=dy(uy);function hy(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,fy.default)(t),o=typeof e=="function";return n.forEach(function(a){if(a.type==="declaration"){var i=a.property,s=a.value;o?e(i,s,a):s&&(r=r||{},r[i]=s)}}),r}const py=Mf.default||Mf,gy=/\d/,my=["-","_","/","."];function vy(t=""){if(!gy.test(t))return t!==t.toLowerCase()}function by(t){const e=[];let r="",n,o;for(const a of t){const i=my.includes(a);if(i===!0){e.push(r),r="",n=void 0;continue}const s=vy(a);if(o===!1){if(n===!1&&s===!0){e.push(r),r=a,n=s;continue}if(n===!0&&s===!1&&r.length>1){const c=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=c+a,n=s;continue}}r+=a,n=s,o=i}return e.push(r),e}function Bf(t){return t?by(t).map(e=>wy(e)).join(""):""}function yy(t){return _y(Bf(t||""))}function wy(t){return t?t[0].toUpperCase()+t.slice(1):""}function _y(t){return t?t[0].toLowerCase()+t.slice(1):""}function is(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Bf(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[yy(n)]=o}return py(t,r),e}function Kn(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function ky(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const xy=ky(/[A-Z]/,t=>`-${t.toLowerCase()}`);function Sy(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${xy(e)}: ${t[e]};`).join(`
|
|
1092
1092
|
`)}function $f(t={}){return Sy(t).replace(`
|
|
1093
1093
|
`," ")}$f({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"});function Ty(t){var e;return t.length>2&&t.startsWith("on")&&t[2]===((e=t[2])==null?void 0:e.toLowerCase())}function vr(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];for(const o in n){const a=e[o],i=n[o],s=typeof a=="function",c=typeof i=="function";if(s&&Ty(o)){const l=a,u=i;e[o]=Of(l,u)}else if(s&&c)e[o]=Kn(a,i);else if(o==="class"){const l=gc(a),u=gc(i);l&&u?e[o]=Ci(a,i):l?e[o]=Ci(a):u&&(e[o]=Ci(i))}else if(o==="style"){const l=typeof a=="object",u=typeof i=="object",f=typeof a=="string",d=typeof i=="string";if(l&&u)e[o]={...a,...i};else if(l&&d){const m=is(i);e[o]={...a,...m}}else if(f&&u){const m=is(a);e[o]={...m,...i}}else if(f&&d){const m=is(a),h=is(i);e[o]={...m,...h}}else l?e[o]=a:u?e[o]=i:f?e[o]=a:d&&(e[o]=i)}else e[o]=i!==void 0?i:a}}return typeof e.style=="object"&&(e.style=$f(e.style).replaceAll(`
|
package/lib/liipgpt-client.js
CHANGED
|
@@ -42,7 +42,7 @@ function Dn(s) {
|
|
|
42
42
|
Le = s;
|
|
43
43
|
}
|
|
44
44
|
const lt = { exec: () => null };
|
|
45
|
-
function
|
|
45
|
+
function Z(s, e = "") {
|
|
46
46
|
let t = typeof s == "string" ? s : s.source;
|
|
47
47
|
const n = {
|
|
48
48
|
replace: (r, a) => {
|
|
@@ -110,7 +110,7 @@ const X = {
|
|
|
110
110
|
fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`),
|
|
111
111
|
headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`),
|
|
112
112
|
htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
113
|
-
}, vr = /^(?:[ \t]*(?:\n|$))+/, _r = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, kr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, wt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, br = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, an = /(?:[*+-]|\d{1,9}[.)])/, zn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Pn =
|
|
113
|
+
}, vr = /^(?:[ \t]*(?:\n|$))+/, _r = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, kr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, wt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, br = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, an = /(?:[*+-]|\d{1,9}[.)])/, zn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Pn = Z(zn).replace(/bull/g, an).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), xr = Z(zn).replace(/bull/g, an).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), on = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, wr = /^[^\n]+/, ln = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Tr = Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Sr = Z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, an).getRegex(), Pt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", cn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Rr = Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", cn).replace("tag", Pt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Mn = Z(on).replace("hr", wt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Pt).getRegex(), Er = Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Mn).getRegex(), un = {
|
|
114
114
|
blockquote: Er,
|
|
115
115
|
code: _r,
|
|
116
116
|
def: Tr,
|
|
@@ -124,22 +124,22 @@ const X = {
|
|
|
124
124
|
paragraph: Mn,
|
|
125
125
|
table: lt,
|
|
126
126
|
text: wr
|
|
127
|
-
}, wn =
|
|
127
|
+
}, wn = Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", wt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Pt).getRegex(), Cr = {
|
|
128
128
|
...un,
|
|
129
129
|
lheading: xr,
|
|
130
130
|
table: wn,
|
|
131
|
-
paragraph:
|
|
131
|
+
paragraph: Z(on).replace("hr", wt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", wn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Pt).getRegex()
|
|
132
132
|
}, Ar = {
|
|
133
133
|
...un,
|
|
134
|
-
html:
|
|
134
|
+
html: Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", cn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
135
135
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
136
136
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
137
137
|
fences: lt,
|
|
138
138
|
// fences not supported
|
|
139
139
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
140
|
-
paragraph:
|
|
140
|
+
paragraph: Z(on).replace("hr", wt).replace("heading", ` *#{1,6} *[^
|
|
141
141
|
]`).replace("lheading", Pn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
142
|
-
}, Ir = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, $r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bn = /^( {2,}|\\)\n(?!\s*$)/, Or = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Mt = /[\p{P}\p{S}]/u, dn = /[\s\p{P}\p{S}]/u, qn = /[^\s\p{P}\p{S}]/u, Nr =
|
|
142
|
+
}, Ir = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, $r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bn = /^( {2,}|\\)\n(?!\s*$)/, Or = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Mt = /[\p{P}\p{S}]/u, dn = /[\s\p{P}\p{S}]/u, qn = /[^\s\p{P}\p{S}]/u, Nr = Z(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, dn).getRegex(), Fn = /(?!~)[\p{P}\p{S}]/u, Zr = /(?!~)[\s\p{P}\p{S}]/u, jr = /(?:[^\s\p{P}\p{S}]|~)/u, Lr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Un = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Dr = Z(Un, "u").replace(/punct/g, Mt).getRegex(), zr = Z(Un, "u").replace(/punct/g, Fn).getRegex(), Vn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Pr = Z(Vn, "gu").replace(/notPunctSpace/g, qn).replace(/punctSpace/g, dn).replace(/punct/g, Mt).getRegex(), Mr = Z(Vn, "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Zr).replace(/punct/g, Fn).getRegex(), Br = Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, qn).replace(/punctSpace/g, dn).replace(/punct/g, Mt).getRegex(), qr = Z(/\\(punct)/, "gu").replace(/punct/g, Mt).getRegex(), Fr = Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ur = Z(cn).replace("(?:-->|$)", "-->").getRegex(), Vr = Z("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ur).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), At = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Hr = Z(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", At).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Hn = Z(/^!?\[(label)\]\[(ref)\]/).replace("label", At).replace("ref", ln).getRegex(), Gn = Z(/^!?\[(ref)\](?:\[\])?/).replace("ref", ln).getRegex(), Gr = Z("reflink|nolink(?!\\()", "g").replace("reflink", Hn).replace("nolink", Gn).getRegex(), hn = {
|
|
143
143
|
_backpedal: lt,
|
|
144
144
|
// only used for GFM url
|
|
145
145
|
anyPunctuation: qr,
|
|
@@ -162,20 +162,20 @@ const X = {
|
|
|
162
162
|
url: lt
|
|
163
163
|
}, Wr = {
|
|
164
164
|
...hn,
|
|
165
|
-
link:
|
|
166
|
-
reflink:
|
|
165
|
+
link: Z(/^!?\[(label)\]\((.*?)\)/).replace("label", At).getRegex(),
|
|
166
|
+
reflink: Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", At).getRegex()
|
|
167
167
|
}, Yt = {
|
|
168
168
|
...hn,
|
|
169
169
|
emStrongRDelimAst: Mr,
|
|
170
170
|
emStrongLDelim: zr,
|
|
171
|
-
url:
|
|
171
|
+
url: Z(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
172
172
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
173
173
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
174
174
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
175
175
|
}, Qr = {
|
|
176
176
|
...Yt,
|
|
177
|
-
br:
|
|
178
|
-
text:
|
|
177
|
+
br: Z(Bn).replace("{2,}", "*").getRegex(),
|
|
178
|
+
text: Z(Yt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
179
179
|
}, Ct = {
|
|
180
180
|
normal: un,
|
|
181
181
|
gfm: Cr,
|
|
@@ -4481,7 +4481,7 @@ const Es = (s, e = {
|
|
|
4481
4481
|
bigint: (s) => Ee.create({ ...s, coerce: !0 }),
|
|
4482
4482
|
date: (s) => Ze.create({ ...s, coerce: !0 })
|
|
4483
4483
|
}, la = w;
|
|
4484
|
-
var
|
|
4484
|
+
var L = /* @__PURE__ */ Object.freeze({
|
|
4485
4485
|
__proto__: null,
|
|
4486
4486
|
defaultErrorMap: We,
|
|
4487
4487
|
setErrorMap: ns,
|
|
@@ -4597,41 +4597,40 @@ var Z = /* @__PURE__ */ Object.freeze({
|
|
|
4597
4597
|
quotelessJson: ts,
|
|
4598
4598
|
ZodError: re
|
|
4599
4599
|
});
|
|
4600
|
-
const On =
|
|
4601
|
-
label:
|
|
4602
|
-
options:
|
|
4603
|
-
|
|
4604
|
-
label:
|
|
4605
|
-
value:
|
|
4600
|
+
const On = L.object({
|
|
4601
|
+
label: L.string(),
|
|
4602
|
+
options: L.array(
|
|
4603
|
+
L.object({
|
|
4604
|
+
label: L.string(),
|
|
4605
|
+
value: L.number()
|
|
4606
4606
|
})
|
|
4607
4607
|
)
|
|
4608
|
-
}), ar =
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
}), ca = Z.object({
|
|
4608
|
+
}), ar = L.object({
|
|
4609
|
+
impact: On.optional(),
|
|
4610
|
+
quality: On.optional()
|
|
4611
|
+
}), ca = L.object({
|
|
4613
4612
|
classification: ar.optional()
|
|
4614
|
-
}), ua =
|
|
4615
|
-
label:
|
|
4616
|
-
icon:
|
|
4617
|
-
url:
|
|
4618
|
-
target:
|
|
4619
|
-
}), da =
|
|
4620
|
-
menu:
|
|
4621
|
-
supportedLanguages:
|
|
4613
|
+
}), ua = L.object({
|
|
4614
|
+
label: L.string(),
|
|
4615
|
+
icon: L.string(),
|
|
4616
|
+
url: L.string(),
|
|
4617
|
+
target: L.string()
|
|
4618
|
+
}), da = L.object({
|
|
4619
|
+
menu: L.record(L.array(ua)).optional(),
|
|
4620
|
+
supportedLanguages: L.array(L.enum(["en", "de", "fr", "it"])).optional(),
|
|
4622
4621
|
classification: ar.optional()
|
|
4623
|
-
}), ha =
|
|
4624
|
-
label:
|
|
4625
|
-
question:
|
|
4626
|
-
}), fa =
|
|
4627
|
-
predefinedQuestions:
|
|
4628
|
-
}), pa =
|
|
4629
|
-
|
|
4630
|
-
maintenance:
|
|
4622
|
+
}), ha = L.object({
|
|
4623
|
+
label: L.string().nullable(),
|
|
4624
|
+
question: L.string()
|
|
4625
|
+
}), fa = L.object({
|
|
4626
|
+
predefinedQuestions: L.array(ha)
|
|
4627
|
+
}), pa = L.union([
|
|
4628
|
+
L.object({
|
|
4629
|
+
maintenance: L.literal(!0)
|
|
4631
4630
|
}),
|
|
4632
|
-
|
|
4633
|
-
id:
|
|
4634
|
-
cID:
|
|
4631
|
+
L.object({
|
|
4632
|
+
id: L.string(),
|
|
4633
|
+
cID: L.string()
|
|
4635
4634
|
})
|
|
4636
4635
|
]);
|
|
4637
4636
|
var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, rn = { exports: {} };
|
|
@@ -4683,21 +4682,21 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4683
4682
|
this.bitsNeeded = 0, this.codePoint = 0;
|
|
4684
4683
|
}
|
|
4685
4684
|
Je.prototype.decode = function(d) {
|
|
4686
|
-
function g(
|
|
4685
|
+
function g(j, z, R) {
|
|
4687
4686
|
if (R === 1)
|
|
4688
|
-
return
|
|
4687
|
+
return j >= 128 >> z && j << z <= 2047;
|
|
4689
4688
|
if (R === 2)
|
|
4690
|
-
return
|
|
4689
|
+
return j >= 2048 >> z && j << z <= 55295 || j >= 57344 >> z && j << z <= 65535;
|
|
4691
4690
|
if (R === 3)
|
|
4692
|
-
return
|
|
4691
|
+
return j >= 65536 >> z && j << z <= 1114111;
|
|
4693
4692
|
throw new Error();
|
|
4694
4693
|
}
|
|
4695
|
-
function _(
|
|
4696
|
-
if (
|
|
4694
|
+
function _(j, z) {
|
|
4695
|
+
if (j === 6 * 1)
|
|
4697
4696
|
return z >> 6 > 15 ? 3 : z > 31 ? 2 : 1;
|
|
4698
|
-
if (
|
|
4697
|
+
if (j === 6 * 2)
|
|
4699
4698
|
return z > 15 ? 3 : 2;
|
|
4700
|
-
if (
|
|
4699
|
+
if (j === 6 * 3)
|
|
4701
4700
|
return 3;
|
|
4702
4701
|
throw new Error();
|
|
4703
4702
|
}
|
|
@@ -4764,7 +4763,7 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4764
4763
|
throw new TypeError();
|
|
4765
4764
|
_.onreadystatechange();
|
|
4766
4765
|
}
|
|
4767
|
-
},
|
|
4766
|
+
}, j = function(R) {
|
|
4768
4767
|
m != null && (m.readyState === 4 ? (!("onload" in m) || !("onerror" in m) || !("onabort" in m)) && I(m.responseText === "" ? "error" : "load", R) : m.readyState === 3 ? "onprogress" in m || M() : m.readyState === 2 && A());
|
|
4769
4768
|
}, z = function() {
|
|
4770
4769
|
b = n(function() {
|
|
@@ -4778,7 +4777,7 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4778
4777
|
}), "onabort" in m && (m.onabort = function(R) {
|
|
4779
4778
|
I("abort", R);
|
|
4780
4779
|
}), "onprogress" in m && (m.onprogress = M), "onreadystatechange" in m && (m.onreadystatechange = function(R) {
|
|
4781
|
-
|
|
4780
|
+
j(R);
|
|
4782
4781
|
}), ("contentType" in m || !("ontimeout" in a.prototype)) && (g += (g.indexOf("?") === -1 ? "?" : "&") + "padding=true"), m.open(d, g, !0), "readyState" in m && (b = n(function() {
|
|
4783
4782
|
z();
|
|
4784
4783
|
}, 0));
|
|
@@ -4829,18 +4828,18 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4829
4828
|
d.open("GET", S);
|
|
4830
4829
|
var M = 0;
|
|
4831
4830
|
d.onprogress = function() {
|
|
4832
|
-
var
|
|
4831
|
+
var j = d.responseText, z = j.slice(M);
|
|
4833
4832
|
M += z.length, _(z);
|
|
4834
|
-
}, d.onerror = function(
|
|
4835
|
-
|
|
4833
|
+
}, d.onerror = function(j) {
|
|
4834
|
+
j.preventDefault(), m(new Error("NetworkError"));
|
|
4836
4835
|
}, d.onload = function() {
|
|
4837
4836
|
m(null);
|
|
4838
4837
|
}, d.onabort = function() {
|
|
4839
4838
|
m(null);
|
|
4840
4839
|
}, d.onreadystatechange = function() {
|
|
4841
4840
|
if (d.readyState === a.HEADERS_RECEIVED) {
|
|
4842
|
-
var
|
|
4843
|
-
g(
|
|
4841
|
+
var j = d.status, z = d.statusText, R = d.getResponseHeader("Content-Type"), B = d.getAllResponseHeaders();
|
|
4842
|
+
g(j, z, R, new St(B));
|
|
4844
4843
|
}
|
|
4845
4844
|
}, d.withCredentials = b;
|
|
4846
4845
|
for (var I in A)
|
|
@@ -4856,11 +4855,11 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4856
4855
|
function mn() {
|
|
4857
4856
|
}
|
|
4858
4857
|
mn.prototype.open = function(d, g, _, m, S, b, A) {
|
|
4859
|
-
var M = null, I = new N(),
|
|
4858
|
+
var M = null, I = new N(), j = I.signal, z = new T();
|
|
4860
4859
|
return f(S, {
|
|
4861
4860
|
headers: A,
|
|
4862
4861
|
credentials: b ? "include" : "same-origin",
|
|
4863
|
-
signal:
|
|
4862
|
+
signal: j,
|
|
4864
4863
|
cache: "no-store"
|
|
4865
4864
|
}).then(function(R) {
|
|
4866
4865
|
return M = R.body.getReader(), g(R.status, R.statusText, R.headers.get("Content-Type"), new we(R.headers)), new u(function(B, ge) {
|
|
@@ -4961,10 +4960,10 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4961
4960
|
var dr = f != null && v != null && "body" in v.prototype;
|
|
4962
4961
|
function hr(d, g, _) {
|
|
4963
4962
|
g = String(g);
|
|
4964
|
-
var m = !!_.withCredentials, S = _.lastEventIdQueryParameterName || "lastEventId", b = Gt(1e3), A = Ht(_.heartbeatTimeout, 45e3), M = "", I = b,
|
|
4963
|
+
var m = !!_.withCredentials, S = _.lastEventIdQueryParameterName || "lastEventId", b = Gt(1e3), A = Ht(_.heartbeatTimeout, 45e3), M = "", I = b, j = !1, z = 0, R = _.headers || {}, B = _.Transport, ge = dr && B == null ? void 0 : new de(B != null ? new B() : ur()), nt = B != null && typeof B != "string" ? new B() : ge == null ? new mn() : new De(), ee = void 0, G = 0, oe = Ft, Be = "", Rt = "", ye = "", Et = "", W = Se, Wt = 0, Ie = 0, fr = function(U, F, te, ne) {
|
|
4965
4964
|
if (oe === Te)
|
|
4966
4965
|
if (U === 200 && te != null && or.test(te)) {
|
|
4967
|
-
oe = Pe,
|
|
4966
|
+
oe = Pe, j = Date.now(), I = b, d.readyState = Pe;
|
|
4968
4967
|
var Q = new qt("open", {
|
|
4969
4968
|
status: U,
|
|
4970
4969
|
statusText: F,
|
|
@@ -4988,7 +4987,7 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4988
4987
|
(ne === 10 || ne === 13) && (F = te);
|
|
4989
4988
|
}
|
|
4990
4989
|
var Q = (F !== -1 ? Et : "") + U.slice(0, F + 1);
|
|
4991
|
-
Et = (F === -1 ? Et : "") + U.slice(F + 1), U !== "" && (
|
|
4990
|
+
Et = (F === -1 ? Et : "") + U.slice(F + 1), U !== "" && (j = Date.now(), z += U.length);
|
|
4992
4991
|
for (var V = 0; V < Q.length; V += 1) {
|
|
4993
4992
|
var ne = Q.charCodeAt(V);
|
|
4994
4993
|
if (W === Ut && ne === 10)
|
|
@@ -5031,17 +5030,17 @@ var ma = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
5031
5030
|
oe = tt, ee != null && (ee.abort(), ee = void 0), G !== 0 && (r(G), G = 0), d.readyState = tt;
|
|
5032
5031
|
}, rt = function() {
|
|
5033
5032
|
if (G = 0, oe !== Ft) {
|
|
5034
|
-
if (!
|
|
5033
|
+
if (!j && ee != null)
|
|
5035
5034
|
bn(new Error("No activity within " + A + " milliseconds. " + (oe === Te ? "No response received." : z + " chars received.") + " Reconnecting.")), ee != null && (ee.abort(), ee = void 0);
|
|
5036
5035
|
else {
|
|
5037
|
-
var U = Math.max((
|
|
5038
|
-
|
|
5036
|
+
var U = Math.max((j || Date.now()) + A - Date.now(), 1);
|
|
5037
|
+
j = !1, G = n(function() {
|
|
5039
5038
|
rt();
|
|
5040
5039
|
}, U);
|
|
5041
5040
|
}
|
|
5042
5041
|
return;
|
|
5043
5042
|
}
|
|
5044
|
-
|
|
5043
|
+
j = !1, z = 0, G = n(function() {
|
|
5045
5044
|
rt();
|
|
5046
5045
|
}, A), oe = Te, Be = "", ye = "", Rt = M, Et = "", Wt = 0, Ie = 0, W = Se;
|
|
5047
5046
|
var F = g;
|