@orca-pt/orca-components 1.0.6 β†’ 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vuetify/components"),require("markdown-it"),require("highlight.js"),require("markdown-it-link-attributes"),require("markdown-it-katex"),require("@videojs-player/vue"),require("mapbox-gl"),require("vuetify/dist/vuetify-labs.esm.js")):"function"==typeof define&&define.amd?define(["exports","vue","vuetify/components","markdown-it","highlight.js","markdown-it-link-attributes","markdown-it-katex","@videojs-player/vue","mapbox-gl","vuetify/dist/vuetify-labs.esm.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).OrcaComponents={},e.Vue,e.components,e.MarkdownIt,e.hljs,e.markdownItLinkAttributes,e.markdownItKatex,e.VideoPlayer,e.mapboxgl,e.VuetifyLabs)}(this,function(e,t,n,o,a,r,i,l,c,s){"use strict";function d(e){const t=[".jpg",".jpeg",".png",".gif",".webp",".bmp",".svg"];try{const n=new URL(e).pathname.toLowerCase();return t.some(e=>n.endsWith(e))}catch(n){return!1}}function u(e){try{const t=new URL(e).pathname,n=t.split("/").pop()||"";return decodeURIComponent(n)}catch(t){return null}}function m(e){const t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return t&&11===t[7].length?t[7]:""}function p(e){if(!e)return"#1976D2";const t={primary:"#1976D2",secondary:"#424242",success:"#4CAF50",info:"#2196F3",warning:"#FB8C00",error:"#FF5252",accent:"#82B1FF"};return t[e.toLowerCase()]?t[e.toLowerCase()]:e}function g(e){const t={};return e.forEach(e=>{const n=e.row||1;t[n]||(t[n]=[]),t[n].push(e)}),Object.keys(t).sort((e,t)=>parseInt(e)-parseInt(t)).map(e=>t[parseInt(e)])}function f(e){if(!e)return{};const t=p(e);return{border:`1px solid ${t}`,color:t,"background-color":"transparent"}}function h(e){if(!e)return{};return{color:p(e),"background-color":"transparent"}}function y(e){if(!e)return{};const t=p(e);return{color:t,fill:t}}const v=[{type:"general-loading",start:"[orca.loading.start]",end:"[orca.loading.end]"},{type:"thinking-loading",start:"[orca.loading.thinking.start]",end:"[orca.loading.thinking.end]"},{type:"searching-loading",start:"[orca.loading.searching.start]",end:"[orca.loading.searching.end]"},{type:"coding-loading",start:"[orca.loading.coding.start]",end:"[orca.loading.coding.end]"},{type:"analyzing-loading",start:"[orca.loading.analyzing.start]",end:"[orca.loading.analyzing.end]"},{type:"generating-loading",start:"[orca.loading.generating.start]",end:"[orca.loading.generating.end]"},{type:"custom-loading",start:"[orca.loading.custom.start]",end:"[orca.loading.custom.end]"},{type:"image-loading",start:"[orca.loading.image.start]",end:"[orca.loading.image.end]"},{type:"video-loading",start:"[orca.loading.video.start]",end:"[orca.loading.video.end]"},{type:"youtube-loading",start:"[orca.loading.youtube.start]",end:"[orca.loading.youtube.end]"},{type:"card-loading",start:"[orca.loading.card.list.start]",end:"[orca.loading.card.list.end]"},{type:"map-loading",start:"[orca.loading.map.start]",end:"[orca.loading.map.end]"},{type:"html-loading",start:"[orca.loading.html.start]",end:"[orca.loading.html.end]"},{type:"image",start:"[orca.image.start]",end:"[orca.image.end]"},{type:"video",start:"[orca.video.start]",end:"[orca.video.end]"},{type:"youtube",start:"[orca.youtube.start]",end:"[orca.youtube.end]"},{type:"card",start:"[orca.list.card.start]",end:"[orca.list.card.end]"},{type:"location",start:"[orca.location.start]",end:"[orca.location.end]"},{type:"buttons",start:"[orca.buttons.start]",end:"[orca.buttons.end]"},{type:"tracing",start:"[orca.tracing.start]",end:"[orca.tracing.end]"},{type:"audio",start:"[orca.audio.start]",end:"[orca.audio.end]"},{type:"html",start:"[orca.html.start]",end:"[orca.html.end]"}],k=["general-loading","thinking-loading","searching-loading","coding-loading","analyzing-loading","generating-loading","custom-loading"];function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(e){const t=b(e.start),n=b(e.end);return new RegExp(`${t}(.*?)${n}`,"s")}const E=v.map(e=>({type:e.type,regex:w(e)}));function T(e,t){return e.filter(t)}function N(e,t,n){return e.replace(t,n?"$1":"")}function x(e,t,n=!1){let o=e;for(const a of t){o=N(o,w(a),n)}return o}function _(e,t){return x(e,t,!0)}function C(e,t,n){let o=_(e,t);return o=function(e,t){return x(e,t,!1)}(o,n),o}const L=function(e){return T(e,e=>{return t=e.type,k.includes(t);var t})}(v),A=function(e){return T(e,e=>!e.type.includes("-loading"))}(v);function S(e){return C(e,L,A)}function B(e){return E.map(({type:t,regex:n})=>{const o=e.match(n);return{type:t,match:o,index:o?e.indexOf(o[0]):1/0}}).filter(e=>null!==e.match&&e.index!==1/0)}function D(e,t,n){const o=function(e,t){const n=t.filter(t=>t!==e).map(e=>`${e}:`).join("|");return new RegExp(`${e}:\\s*([\\s\\S]*?)(?=\\s*(?:${n})|$)`,"m")}(t,n),a=e.match(o);if(!a||!a[1])return"";let r=a[1];r=r.replace(/\u200b/g,"");return r.split("\n")[0].trim()}function I(e,t,n){const o=t.map(e=>e.name);return e.split("- ").map(e=>e.trim()).filter(e=>e).map(e=>{const a={};for(const n of t){const t=D(e,n.name,o);if("number"===n.type){const e=parseInt(t,10);a[n.name]=Number.isFinite(e)?e:void 0!==n.defaultValue?n.defaultValue:void 0}else a[n.name]=t||(void 0!==n.defaultValue?n.defaultValue:n.required?"":void 0)}return n(a)})}const V=[{name:"photo",required:!0,defaultValue:"https://via.placeholder.com/300x200"},{name:"header",required:!0,defaultValue:"Card Title"},{name:"subheader",defaultValue:""}];const M=[{name:"type",required:!0,defaultValue:"action"},{name:"label",required:!0,defaultValue:"Button"},{name:"url",defaultValue:void 0},{name:"id",type:"number",defaultValue:void 0},{name:"color",defaultValue:"primary"},{name:"row",type:"number",defaultValue:1}];const O=[{name:"label",required:!0,defaultValue:"Audio Track"},{name:"url",required:!0,defaultValue:""},{name:"type",required:!0,defaultValue:"audio/mpeg"}];const R=["image","video","youtube","html"],z={card:function(e){return I(e,V,e=>({photo:e.photo||"",header:e.header||"",subheader:e.subheader||""}))},location:function(e){const[t,n]=e.split(",").map(e=>e.trim()),o=parseFloat(t),a=parseFloat(n);return{latitude:Number.isFinite(o)?o:0,longitude:Number.isFinite(a)?a:0}},buttons:function(e){return I(e,M,e=>({type:"link"===e.type?"link":"action",label:e.label||"",url:e.url,id:e.id,color:e.color,row:e.row}))},tracing:function(e){var t;const n=e.match(/visibility:\s*(\w+)/),o=(null==n?void 0:n[1])||"all",a=e.match(/content:\s*([\s\S]*)/);return{visibility:o,content:(null==(t=null==a?void 0:a[1])?void 0:t.trim())||e,rawContent:e}},audio:function(e){return I(e,O,e=>({label:e.label||"",url:e.url||"",type:e.type||""}))}};function F(e,t){if(function(e){return e.includes("-loading")}(e))return null;if(R.includes(e))return{type:e,content:t};const n=z[e];if(n){return{type:e,content:n(t)}}return null}function H(e){return k.includes(e)}function U(e){return t.computed(()=>function(e){const t=[];let n=function(e){let t=e;for(const n of v){const e=t.lastIndexOf(n.start);if(-1===e)continue;t.substring(e+n.start.length).includes(n.end)||(t=t.substring(0,e))}return t}(e),o=0;const a=100;for(;n.length>0&&o<a;){o++;const e=B(n);if(0===e.length){P(t,n);break}const a=e.reduce((e,t)=>e.index<t.index?e:t);P(t,n.substring(0,a.index)),j(t,a);const r=a.index+a.match[0].length;n=n.substring(r)}return t}(t.unref(e)||""))}function P(e,t){const n=S(t).trim();n&&e.push({type:"text",content:n})}function j(e,t){const n=(t.match[1]??"").trim(),o=t.type.includes("-loading");if(o&&!n)return;if(o&&n){const t=_(n,L);if(t.trim()){const n=function(e){const t=[];let n=e,o=0;for(;n.length>0&&o<100;){o++;const e=B(n);if(0===e.length){const e=S(n).trim();e&&t.push({type:"text",content:e});break}const a=e.reduce((e,t)=>e.index<t.index?e:t),r=H(a.type),i=S(n.substring(0,a.index)).trim();if(i&&t.push({type:"text",content:i}),!r){const e=(a.match[1]??"").trim(),n=F(a.type,e);n&&t.push(n)}const l=a.index+a.match[0].length;n=n.substring(l)}return t}(t);e.push(...n)}return}const a=F(t.type,n);a&&e.push(a)}const G={start:"[orca.loading.start]",end:"[orca.loading.end]"},W={start:"[orca.loading.thinking.start]",end:"[orca.loading.thinking.end]"},q={start:"[orca.loading.searching.start]",end:"[orca.loading.searching.end]"},Y={start:"[orca.loading.coding.start]",end:"[orca.loading.coding.end]"},$={start:"[orca.loading.analyzing.start]",end:"[orca.loading.analyzing.end]"},X={start:"[orca.loading.generating.start]",end:"[orca.loading.generating.end]"},K={start:"[orca.loading.custom.start]",end:"[orca.loading.custom.end]"},Z={start:"[orca.loading.image.start]",end:"[orca.loading.image.end]",actual:/\[orca\.image\.start\](.*?)\[orca\.image\.end\]/s},Q={start:"[orca.loading.video.start]",end:"[orca.loading.video.end]",actual:/\[orca\.video\.start\](.*?)\[orca\.video\.end\]/s},J={start:"[orca.loading.youtube.start]",end:"[orca.loading.youtube.end]",actual:/\[orca\.youtube\.start\](.*?)\[orca\.youtube\.end\]/s},ee={start:"[orca.loading.card.start]",end:"[orca.loading.card.end]",actual:/\[orca\.list\.card\.start\](.*?)\[orca\.list\.card\.end\]/s},te={start:"[orca.loading.map.start]",end:"[orca.loading.map.end]",actual:/\[orca\.location\.start\](.*?)\[orca\.location\.end\]/s},ne={"general-loading":"⏳ Loading...","thinking-loading":"πŸ€” Thinking...","searching-loading":"πŸ” Searching...","coding-loading":"πŸ’» Coding...","analyzing-loading":"πŸ“Š Analyzing...","generating-loading":"✨ Generating...","custom-loading":"⏳ Processing...","image-loading":"πŸ–ΌοΈ Loading image...","video-loading":"πŸŽ₯ Loading video...","youtube-loading":"πŸ“Ί Loading YouTube video...","card-loading":"πŸƒ Loading cards...","map-loading":"πŸ—ΊοΈ Loading map..."};function oe(e,t,n){const o=e.includes(t),a=e.includes(n);return o&&!a}function ae(e,t,n,o){const a=e.includes(t),r=e.includes(n),i=!!o&&o.test(e);return a&&!r&&!i}const re='\n <div class="d-flex align-center">\n <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect x="6.66675" y="6.66675" width="10" height="10" rx="2" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M13.3333 6.66659V4.99992C13.3333 4.07944 12.5871 3.33325 11.6666 3.33325H4.99992C4.07944 3.33325 3.33325 4.07944 3.33325 4.99992V11.6666C3.33325 12.5871 4.07944 13.3333 4.99992 13.3333H6.66659" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color:rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;">Copy</span>\n </div>\n',ie='\n <div class="d-flex align-center">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M7.5 14.1667L10 11.6667L12.5 14.1667" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7.5 5.83325L10 8.33325L12.5 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Collapse</span>\n </div>\n';function le(e){if(e.closest(".code-container"))return;const t=document.createElement("div");t.className="code-container";const n=document.createElement("div");n.className="code-wrapper",n.style.transition="max-height 0.3s ease, opacity 0.3s ease",n.style.overflow="hidden",n.appendChild(e.cloneNode(!0));const o=document.createElement("div");o.className="buttons-container";const a=document.createElement("button");a.innerHTML=re,a.className="copy-btn",a.onclick=()=>{var t;!async function(e,t){try{await navigator.clipboard.writeText(e),t.innerHTML='\n <div class="d-flex align-center">\n <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4.16663 9.99992L8.33329 14.1666L16.6666 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Copied</span>\n </div>\n',setTimeout(()=>{t.innerHTML=re},2e3)}catch(n){}}((null==(t=e.querySelector("code"))?void 0:t.innerText)||"",a)};const r=document.createElement("button");r.innerHTML=ie,r.className="collapse-btn",r.onclick=()=>{!function(e,t){if(e.classList.contains("collapsed"))e.classList.remove("collapsed"),e.style.maxHeight="",e.style.overflow="",t.innerHTML=ie;else{e.classList.add("collapsed");const n=e.scrollHeight;e.style.maxHeight=`${n}px`,e.offsetHeight,e.style.maxHeight="0px",e.style.overflow="hidden",t.innerHTML='\n <div class="d-flex align-center">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M7.5 14.1667L10 11.6667L12.5 14.1667" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7.5 5.83325L10 8.33325L12.5 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Expand</span>\n </div>\n'}}(n,r)},o.appendChild(r),o.appendChild(a),t.appendChild(o),t.appendChild(n),e.replaceWith(t)}const ce=["general-loading","thinking-loading","searching-loading","coding-loading","analyzing-loading","generating-loading","custom-loading","image-loading","video-loading","youtube-loading","card-loading","map-loading"];function se(e){return ce.includes(e)}
2
- /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:de,setPrototypeOf:ue,isFrozen:me,getPrototypeOf:pe,getOwnPropertyDescriptor:ge}=Object;let{freeze:fe,seal:he,create:ye}=Object,{apply:ve,construct:ke}="undefined"!=typeof Reflect&&Reflect;fe||(fe=function(e){return e}),he||(he=function(e){return e}),ve||(ve=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return e.apply(t,o)}),ke||(ke=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const be=Me(Array.prototype.forEach),we=Me(Array.prototype.lastIndexOf),Ee=Me(Array.prototype.pop),Te=Me(Array.prototype.push),Ne=Me(Array.prototype.splice),xe=Me(String.prototype.toLowerCase),_e=Me(String.prototype.toString),Ce=Me(String.prototype.match),Le=Me(String.prototype.replace),Ae=Me(String.prototype.indexOf),Se=Me(String.prototype.trim),Be=Me(Object.prototype.hasOwnProperty),De=Me(RegExp.prototype.test),Ie=(Ve=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ke(Ve,t)});var Ve;function Me(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return ve(e,t,o)}}function Oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:xe;ue&&ue(e,null);let o=t.length;for(;o--;){let a=t[o];if("string"==typeof a){const e=n(a);e!==a&&(me(t)||(t[o]=e),a=e)}e[a]=!0}return e}function Re(e){for(let t=0;t<e.length;t++){Be(e,t)||(e[t]=null)}return e}function ze(e){const t=ye(null);for(const[n,o]of de(e)){Be(e,n)&&(Array.isArray(o)?t[n]=Re(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=ze(o):t[n]=o)}return t}function Fe(e,t){for(;null!==e;){const n=ge(e,t);if(n){if(n.get)return Me(n.get);if("function"==typeof n.value)return Me(n.value)}e=pe(e)}return function(){return null}}const He=fe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ue=fe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pe=fe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),je=fe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ge=fe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),We=fe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qe=fe(["#text"]),Ye=fe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$e=fe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xe=fe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ke=fe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ze=he(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qe=he(/<%[\w\W]*|[\w\W]*%>/gm),Je=he(/\$\{[\w\W]*/gm),et=he(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=he(/^aria-[\-\w]+$/),nt=he(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ot=he(/^(?:\w+script|data):/i),at=he(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rt=he(/^html$/i),it=he(/^[a-z][.\w]*(-[.\w]+)+$/i);var lt=Object.freeze({__proto__:null,ARIA_ATTR:tt,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:it,DATA_ATTR:et,DOCTYPE_NAME:rt,ERB_EXPR:Qe,IS_ALLOWED_URI:nt,IS_SCRIPT_OR_DATA:ot,MUSTACHE_EXPR:Ze,TMPLIT_EXPR:Je});const ct=1,st=3,dt=7,ut=8,mt=9;var pt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||t.document.nodeType!==mt||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const a=o,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:g}=t,f=s.prototype,h=Fe(f,"cloneNode"),y=Fe(f,"remove"),v=Fe(f,"nextSibling"),k=Fe(f,"childNodes"),b=Fe(f,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let w,E="";const{implementation:T,createNodeIterator:N,createDocumentFragment:x,getElementsByTagName:_}=o,{importNode:C}=a;let L={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof de&&"function"==typeof b&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:S,TMPLIT_EXPR:B,DATA_ATTR:D,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:O}=lt;let{IS_ALLOWED_URI:R}=lt,z=null;const F=Oe({},[...He,...Ue,...Pe,...Ge,...qe]);let H=null;const U=Oe({},[...Ye,...$e,...Xe,...Ke]);let P=Object.seal(ye(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,G=null;const W=Object.seal(ye(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,Y=!0,$=!1,X=!0,K=!1,Z=!0,Q=!1,J=!1,ee=!1,te=!1,ne=!1,oe=!1,ae=!0,re=!1,ie=!0,le=!1,ce={},se=null;const ue=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let me=null;const pe=Oe({},["audio","video","img","source","image","track"]);let ge=null;const he=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ve="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Me=Ve,Re=!1,Ze=null;const Qe=Oe({},[ve,ke,Ve],_e);let Je=Oe({},["mi","mo","mn","ms","mtext"]),et=Oe({},["annotation-xml"]);const tt=Oe({},["title","style","font","a","script"]);let ot=null;const at=["application/xhtml+xml","text/html"];let it=null,pt=null;const gt=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=ze(e),ot=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===ot?_e:xe,z=Be(e,"ALLOWED_TAGS")?Oe({},e.ALLOWED_TAGS,it):F,H=Be(e,"ALLOWED_ATTR")?Oe({},e.ALLOWED_ATTR,it):U,Ze=Be(e,"ALLOWED_NAMESPACES")?Oe({},e.ALLOWED_NAMESPACES,_e):Qe,ge=Be(e,"ADD_URI_SAFE_ATTR")?Oe(ze(he),e.ADD_URI_SAFE_ATTR,it):he,me=Be(e,"ADD_DATA_URI_TAGS")?Oe(ze(pe),e.ADD_DATA_URI_TAGS,it):pe,se=Be(e,"FORBID_CONTENTS")?Oe({},e.FORBID_CONTENTS,it):ue,j=Be(e,"FORBID_TAGS")?Oe({},e.FORBID_TAGS,it):ze({}),G=Be(e,"FORBID_ATTR")?Oe({},e.FORBID_ATTR,it):ze({}),ce=!!Be(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ae=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,le=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||nt,Me=e.NAMESPACE||Ve,Je=e.MATHML_TEXT_INTEGRATION_POINTS||Je,et=e.HTML_INTEGRATION_POINTS||et,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Y=!1),ne&&(te=!0),ce&&(z=Oe({},qe),H=[],!0===ce.html&&(Oe(z,He),Oe(H,Ye)),!0===ce.svg&&(Oe(z,Ue),Oe(H,$e),Oe(H,Ke)),!0===ce.svgFilters&&(Oe(z,Pe),Oe(H,$e),Oe(H,Ke)),!0===ce.mathMl&&(Oe(z,Ge),Oe(H,Xe),Oe(H,Ke))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?W.tagCheck=e.ADD_TAGS:(z===F&&(z=ze(z)),Oe(z,e.ADD_TAGS,it))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?W.attributeCheck=e.ADD_ATTR:(H===U&&(H=ze(H)),Oe(H,e.ADD_ATTR,it))),e.ADD_URI_SAFE_ATTR&&Oe(ge,e.ADD_URI_SAFE_ATTR,it),e.FORBID_CONTENTS&&(se===ue&&(se=ze(se)),Oe(se,e.FORBID_CONTENTS,it)),e.ADD_FORBID_CONTENTS&&(se===ue&&(se=ze(se)),Oe(se,e.ADD_FORBID_CONTENTS,it)),ie&&(z["#text"]=!0),Q&&Oe(z,["html","head","body"]),z.table&&(Oe(z,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ie('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ie('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(r){return null}}(g,r)),null!==w&&"string"==typeof E&&(E=w.createHTML(""));fe&&fe(e),pt=e}},yt=Oe({},[...Ue,...Pe,...je]),vt=Oe({},[...Ge,...We]),kt=function(e){Te(n.removed,{element:e});try{b(e).removeChild(e)}catch(t){y(e)}},bt=function(e,t){try{Te(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(o){Te(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{kt(t)}catch(o){}else try{t.setAttribute(e,"")}catch(o){}},wt=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Ce(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ot&&Me===Ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=w?w.createHTML(e):e;if(Me===Ve)try{t=(new p).parseFromString(a,ot)}catch(i){}if(!t||!t.documentElement){t=T.createDocument(Me,"template",null);try{t.documentElement.innerHTML=Re?E:a}catch(i){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),Me===Ve?_.call(t,Q?"html":"body")[0]:Q?t.documentElement:r},Et=function(e){return N.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Tt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof c&&e instanceof c};function xt(e,t,o){be(e,e=>{e.call(n,t,o,pt)})}const _t=function(e){let t=null;if(xt(L.beforeSanitizeElements,e,null),Tt(e))return kt(e),!0;const o=it(e.nodeName);if(xt(L.uponSanitizeElement,e,{tagName:o,allowedTags:z}),Z&&e.hasChildNodes()&&!Nt(e.firstElementChild)&&De(/<[/\w!]/g,e.innerHTML)&&De(/<[/\w!]/g,e.textContent))return kt(e),!0;if(e.nodeType===dt)return kt(e),!0;if(Z&&e.nodeType===ut&&De(/<[/\w]/g,e.data))return kt(e),!0;if(!(W.tagCheck instanceof Function&&W.tagCheck(o))&&(!z[o]||j[o])){if(!j[o]&&Lt(o)){if(P.tagNameCheck instanceof RegExp&&De(P.tagNameCheck,o))return!1;if(P.tagNameCheck instanceof Function&&P.tagNameCheck(o))return!1}if(ie&&!se[o]){const t=b(e)||e.parentNode,n=k(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const a=h(n[o],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,v(e))}}}return kt(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Me,tagName:"template"});const n=xe(e.tagName),o=xe(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===ke?t.namespaceURI===Ve?"svg"===n:t.namespaceURI===ve?"svg"===n&&("annotation-xml"===o||Je[o]):Boolean(yt[n]):e.namespaceURI===ve?t.namespaceURI===Ve?"math"===n:t.namespaceURI===ke?"math"===n&&et[o]:Boolean(vt[n]):e.namespaceURI===Ve?!(t.namespaceURI===ke&&!et[o])&&!(t.namespaceURI===ve&&!Je[o])&&!vt[n]&&(tt[n]||!yt[n]):!("application/xhtml+xml"!==ot||!Ze[e.namespaceURI]))}(e)?(kt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!De(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&e.nodeType===st&&(t=e.textContent,be([A,S,B],e=>{t=Le(t,e," ")}),e.textContent!==t&&(Te(n.removed,{element:e.cloneNode()}),e.textContent=t)),xt(L.afterSanitizeElements,e,null),!1):(kt(e),!0)},Ct=function(e,t,n){if(ae&&("id"===t||"name"===t)&&(n in o||n in gt))return!1;if(Y&&!G[t]&&De(D,t));else if(q&&De(I,t));else if(W.attributeCheck instanceof Function&&W.attributeCheck(t,e));else if(!H[t]||G[t]){if(!(Lt(e)&&(P.tagNameCheck instanceof RegExp&&De(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&De(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||"is"===t&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&De(P.tagNameCheck,n)||P.tagNameCheck instanceof Function&&P.tagNameCheck(n))))return!1}else if(ge[t]);else if(De(R,Le(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ae(n,"data:")||!me[e]){if($&&!De(V,Le(n,M,"")));else if(n)return!1}else;return!0},Lt=function(e){return"annotation-xml"!==e&&Ce(e,O)},At=function(e){xt(L.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Tt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let a=t.length;for(;a--;){const i=t[a],{name:l,namespaceURI:c,value:s}=i,d=it(l),u=s;let m="value"===l?u:Se(u);if(o.attrName=d,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,xt(L.uponSanitizeAttribute,e,o),m=o.attrValue,!re||"id"!==d&&"name"!==d||(bt(l,e),m="user-content-"+m),Z&&De(/((--!?|])>)|<\/(style|title|textarea)/i,m)){bt(l,e);continue}if("attributename"===d&&Ce(m,"href")){bt(l,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){bt(l,e);continue}if(!X&&De(/\/>/i,m)){bt(l,e);continue}K&&be([A,S,B],e=>{m=Le(m,e," ")});const p=it(e.nodeName);if(Ct(p,d,m)){if(w&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(c);else switch(g.getAttributeType(p,d)){case"TrustedHTML":m=w.createHTML(m);break;case"TrustedScriptURL":m=w.createScriptURL(m)}if(m!==u)try{c?e.setAttributeNS(c,l,m):e.setAttribute(l,m),Tt(e)?kt(e):Ee(n.removed)}catch(r){bt(l,e)}}else bt(l,e)}xt(L.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const o=Et(t);for(xt(L.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)xt(L.uponSanitizeShadowNode,n,null),_t(n),At(n),n.content instanceof i&&e(n.content);xt(L.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,l=null,s=null;if(Re=!e,Re&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw Ie("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ie("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||ht(t),n.removed=[],"string"==typeof e&&(le=!1),le){if(e.nodeName){const t=it(e.nodeName);if(!z[t]||j[t])throw Ie("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=wt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),r.nodeType===ct&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!te&&!K&&!Q&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(o=wt(e),!o)return te?null:oe?E:""}o&&ee&&kt(o.firstChild);const d=Et(le?e:o);for(;l=d.nextNode();)_t(l),At(l),l.content instanceof i&&St(l.content);if(le)return e;if(te){if(ne)for(s=x.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(H.shadowroot||H.shadowrootmode)&&(s=C.call(a,s,!0)),s}let u=Q?o.outerHTML:o.innerHTML;return Q&&z["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&De(rt,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),K&&be([A,S,B],e=>{u=Le(u,e," ")}),w&&oe?w.createHTML(u):u},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){pt=null,J=!1},n.isValidAttribute=function(e,t,n){pt||ht({});const o=it(e),a=it(t);return Ct(o,a,n)},n.addHook=function(e,t){"function"==typeof t&&Te(L[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=we(L[e],t);return-1===n?void 0:Ne(L[e],n,1)[0]}return Ee(L[e])},n.removeHooks=function(e){L[e]=[]},n.removeAllHooks=function(){L={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const gt=new o({html:!0,linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&a.getLanguage(t))try{return`<pre><code class="hljs">${a.highlight(e,{language:t}).value}</code></pre>`}catch{}return`<pre><code class="hljs">${(e=>{const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,e=>t[e])})(e)}</code></pre>`}}).use(i).use(r,{pattern:/^https?:\/\//,attrs:{target:"_blank",rel:"noopener noreferrer"}});const ft={class:"image-container tw-my-4"},ht={class:"image-wrapper"},yt=["src"],vt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},kt=vt(t.defineComponent({__name:"OrcaImage",props:{url:{}},emits:["open-modal"],setup(e,{emit:n}){const o=e,a=n,r=()=>{a("open-modal",o.url)};return(n,o)=>(t.openBlock(),t.createElementBlock("div",ft,[t.createElementVNode("div",ht,[t.createElementVNode("img",{src:e.url,alt:"Generated image",class:"orca-image",loading:"lazy",onClick:r},null,8,yt),o[0]||(o[0]=t.createStaticVNode('<div class="image-overlay" data-v-e4f9d4c4><div class="zoom-icon" data-v-e4f9d4c4><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-e4f9d4c4><circle cx="11" cy="11" r="8" data-v-e4f9d4c4></circle><path d="m21 21-4.35-4.35" data-v-e4f9d4c4></path><line x1="11" y1="8" x2="11" y2="14" data-v-e4f9d4c4></line><line x1="8" y1="11" x2="14" y2="11" data-v-e4f9d4c4></line></svg></div></div>',1))])]))}}),[["__scopeId","data-v-e4f9d4c4"]]),bt={class:"orca-video-container"},wt={class:"video-wrapper"},Et=vt(t.defineComponent({__name:"OrcaVideo",props:{url:{}},setup(e){const n=t.ref({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{type:"video/mp4",src:""}]});return(o,a)=>(t.openBlock(),t.createElementBlock("div",bt,[t.createElementVNode("div",wt,[t.createVNode(t.unref(l.VideoPlayer),{options:{...n.value,sources:[{type:"video/mp4",src:e.url}]},class:"video-player-custom"},null,8,["options"])])]))}}),[["__scopeId","data-v-7a20a30c"]]),Tt={class:"orca-youtube-container"},Nt={class:"youtube-wrapper"},xt=["src"],_t=vt(t.defineComponent({__name:"OrcaYouTube",props:{url:{}},setup(e){const n=e,o=t.computed(()=>`https://www.youtube.com/embed/${m(n.url)}`);return(e,n)=>(t.openBlock(),t.createElementBlock("div",Tt,[t.createElementVNode("div",Nt,[t.createElementVNode("iframe",{width:"100%",height:"100%",src:o.value,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",class:"youtube-iframe"},null,8,xt)])]))}}),[["__scopeId","data-v-9cd52c38"]]),Ct={class:"orca-audio-container"},Lt={class:"audio-list"},At={class:"audio-content"},St={class:"audio-label"},Bt=["type"],Dt=["src","type"],It=vt(t.defineComponent({__name:"OrcaAudio",props:{audioItems:{}},setup:e=>(n,o)=>(t.openBlock(),t.createElementBlock("div",Ct,[t.createElementVNode("div",Lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.audioItems,(e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:"audio-item"},[o[1]||(o[1]=t.createElementVNode("div",{class:"audio-icon-wrapper"},[t.createElementVNode("svg",{class:"audio-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"})])],-1)),t.createElementVNode("div",At,[t.createElementVNode("p",St,t.toDisplayString(e.label),1),t.createElementVNode("audio",{controls:"",class:"audio-player",type:e.type},[t.createElementVNode("source",{src:e.url,type:e.type},null,8,Dt),o[0]||(o[0]=t.createTextVNode(" Your browser does not support the audio element. ",-1))],8,Bt)])]))),128))])]))}),[["__scopeId","data-v-ade9342b"]]),Vt={class:"orca-location-container"},Mt={class:"map-wrapper"},Ot={class:"location-info"},Rt={class:"location-text"},zt=vt(t.defineComponent({__name:"OrcaLocation",props:{latitude:{},longitude:{},mapboxToken:{}},setup(e){const n=e,o=t.ref(null),a=t.ref(!1);return t.onUnmounted(()=>{o.value&&(o.value.remove(),o.value=null)}),(r,i)=>(t.openBlock(),t.createElementBlock("div",Vt,[t.createElementVNode("div",Mt,[(t.openBlock(),t.createElementBlock("div",{ref:e=>(e=>{const r=e&&"tagName"in e?e:null;r&&e&&(a.value=!0,t.nextTick(()=>{try{c.accessToken=n.mapboxToken||"pk.eyJ1IjoicG91cnlhYnpwIiwiYSI6ImNsZ3Vuanl4YzF2NXkzZW1tcnR0MTlxNXEifQ.I3RdtfiL0ObnXbWVKxW1gQ",o.value&&(o.value.remove(),o.value=null);const e=`map-${n.latitude}-${n.longitude}`;r.id=e;const t=new c.Map({container:r,style:"mapbox://styles/mapbox/streets-v11",center:[n.longitude,n.latitude],zoom:12,attributionControl:!1});o.value=t,t.on("load",()=>{new c.Marker({color:"#0D5FD6"}).setLngLat([n.longitude,n.latitude]).addTo(t),t.addControl(new c.NavigationControl),setTimeout(()=>{t.resize()},100),a.value=!1}),t.on("error",e=>{a.value=!1}),t.on("render",()=>{t.resize()})}catch(e){a.value=!1}}))})(e),class:"map-container",key:`map-${e.latitude}-${e.longitude}`}))]),t.createElementVNode("div",Ot,[i[0]||(i[0]=t.createElementVNode("div",{class:"location-icon"},[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),t.createElementVNode("circle",{cx:"12",cy:"10",r:"3"})])],-1)),t.createElementVNode("span",Rt,t.toDisplayString(e.latitude.toFixed(6))+", "+t.toDisplayString(e.longitude.toFixed(6)),1)])]))}}),[["__scopeId","data-v-99a42606"]]),Ft={class:"orca-card-container"},Ht={key:0,class:"card-image-wrapper"},Ut={key:1,class:"card-subheader"},Pt={key:2,class:"card-text"},jt=vt(t.defineComponent({__name:"OrcaCardList",props:{cards:{}},setup:e=>(o,a)=>(t.openBlock(),t.createElementBlock("div",Ft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.cards,(e,o)=>(t.openBlock(),t.createBlock(t.unref(n.VCard),{key:o,class:"orca-card",elevation:"2"},{default:t.withCtx(()=>[e.photo?(t.openBlock(),t.createElementBlock("div",Ht,[t.createVNode(t.unref(n.VImg),{src:e.photo,height:"223",cover:"",class:"card-image"},null,8,["src"])])):t.createCommentVNode("",!0),t.createVNode(t.unref(n.VCardItem),{class:"card-content"},{default:t.withCtx(()=>[e.header?(t.openBlock(),t.createBlock(t.unref(n.VCardTitle),{key:0,class:"card-header"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.header),1)]),_:2},1024)):t.createCommentVNode("",!0),e.subheader?(t.openBlock(),t.createElementBlock("span",Ut,t.toDisplayString(e.subheader),1)):t.createCommentVNode("",!0),e.text?(t.openBlock(),t.createElementBlock("p",Pt,t.toDisplayString(e.text),1)):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128))]))}),[["__scopeId","data-v-d9e3b93c"]]),Gt={class:"orca-buttons-container tw-my-4"},Wt=vt(t.defineComponent({__name:"OrcaButtons",props:{buttons:{},disabled:{type:Boolean}},emits:["button-click"],setup(e,{emit:o}){const a=e,r=o,i=t.computed(()=>g(a.buttons));return(o,l)=>(t.openBlock(),t.createElementBlock("div",Gt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(o,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"button-row"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o,(o,i)=>(t.openBlock(),t.createBlock(t.unref(n.VBtn),{disabled:e.disabled,key:i,class:t.normalizeClass(["orca-button","custom-outlined-button"]),style:t.normalizeStyle(t.unref(f)(o.color)),variant:"text",rounded:"xl",target:"link"===o.type?"_blank":void 0,href:"link"===o.type?o.url:void 0,onClick:e=>(e=>{"action"!==e.type||a.disabled||r("button-click",e)})(o)},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",{style:t.normalizeStyle(t.unref(h)(o.color))},t.toDisplayString(o.label),5)]),_:2},["link"===o.type?{name:"append",fn:t.withCtx(()=>[t.createVNode(t.unref(n.VIcon),{icon:"tabler-external-link",style:t.normalizeStyle(t.unref(y)(o.color)),size:"small"},null,8,["style"])]),key:"0"}:void 0]),1032,["disabled","style","target","href","onClick"]))),128))]))),128))]))}}),[["__scopeId","data-v-480c6090"]]),qt={key:0,class:"orca-trace-container"},Yt={class:"trace-header"},$t={key:0,class:"trace-content"},Xt={class:"trace-pre"},Kt=vt(t.defineComponent({__name:"OrcaTracing",props:{tracingData:{},visibility:{},isAdmin:{type:Boolean}},setup(e){const o=e,a=t.ref(!1),r=t.computed(()=>a.value),i=t.computed(()=>Array.isArray(o.tracingData)?o.tracingData.some(e=>"all"===e.visibility||"admin"===e.visibility&&o.isAdmin):"all"===o.tracingData.visibility||"admin"===o.tracingData.visibility&&o.isAdmin),l=t.computed(()=>Array.isArray(o.tracingData)?o.tracingData.map(e=>e.content||e.rawContent).join("\n\n"):o.tracingData.content||o.tracingData.rawContent||""),c=()=>{a.value=!a.value};return(e,o)=>i.value?(t.openBlock(),t.createElementBlock("div",qt,[t.createVNode(t.unref(n.VCard),{class:"trace-card",elevation:"2"},{default:t.withCtx(()=>[t.createElementVNode("div",Yt,[o[0]||(o[0]=t.createElementVNode("div",{class:"trace-header-content"},[t.createElementVNode("div",{class:"trace-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})])]),t.createElementVNode("strong",{class:"trace-title"},"Trace Log")],-1)),t.createVNode(t.unref(n.VBtn),{size:"small",variant:"tonal",color:"primary",class:"trace-toggle-btn",onClick:c},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.value?"Hide":"Show"),1)]),_:1})]),t.createVNode(t.unref(n.VExpandTransition),null,{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createElementBlock("div",$t,[t.createElementVNode("pre",Xt,t.toDisplayString(l.value),1)])):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-69e262d5"]]),Zt={class:"orca-html-container"},Qt={class:"html-wrapper"},Jt=["srcdoc"],en=vt(t.defineComponent({__name:"OrcaHtml",props:{content:{}},setup(e){t.useCssVars(e=>({v22560b2d:a.value+"px"}));const n=e,o=t.ref(null),a=t.ref(400),r=t.computed(()=>`\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <style>\n * {\n box-sizing: border-box;\n }\n html, body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n background: transparent;\n overflow: hidden;\n }\n body {\n padding: 8px;\n }\n /* SVG responsiveness for matplotlib */\n svg {\n max-width: 100%;\n height: auto;\n }\n /* Plotly container responsiveness */\n .plotly-graph-div {\n width: 100% !important;\n }\n </style>\n</head>\n<body>\n ${(e=>{let t=e.replace(/<\?xml[^?]*\?>/gi,"");return t=t.replace(/<!DOCTYPE[^>]*>/gi,""),t.trim()})(n.content)}\n <script>\n // Auto-resize iframe based on content\n function sendHeight() {\n const height = Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.scrollHeight,\n document.documentElement.offsetHeight\n );\n window.parent.postMessage({ type: 'orca-html-resize', height: height + 16 }, '*');\n }\n \n // Initial send\n setTimeout(sendHeight, 100);\n \n // Send on resize\n window.addEventListener('resize', sendHeight);\n \n // Send when images/content loads\n document.addEventListener('DOMContentLoaded', sendHeight);\n window.addEventListener('load', sendHeight);\n \n // Observe DOM changes for dynamic content (like Plotly)\n const observer = new MutationObserver(sendHeight);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true });\n <\/script>\n</body>\n</html>`),i=()=>{l()},l=()=>{if(o.value)try{const e=o.value.contentDocument;if(e&&e.body){const t=Math.max(e.body.scrollHeight,e.body.offsetHeight);t>0&&(a.value=t+16)}}catch(e){}},c=e=>{if(e.data&&"orca-html-resize"===e.data.type){const t=e.data.height;t&&t>0&&(a.value=Math.min(t,800))}};return t.onMounted(()=>{window.addEventListener("message",c)}),t.onUnmounted(()=>{window.removeEventListener("message",c)}),(e,n)=>(t.openBlock(),t.createElementBlock("div",Zt,[t.createElementVNode("div",Qt,[t.createElementVNode("iframe",{ref_key:"iframeRef",ref:o,srcdoc:r.value,sandbox:"allow-scripts",class:"html-iframe",onLoad:i},null,40,Jt)])]))}}),[["__scopeId","data-v-c4d7eb31"]]),tn=["innerHTML"],nn=t.defineComponent({__name:"ContentElement",props:{element:{},disabledButton:{type:Boolean},visibility:{},isAdmin:{type:Boolean},mapboxToken:{}},emits:["image-modal","button-click"],setup(e,{emit:n}){const o=n,{render:a}={render:e=>{const t=e.replace(/\[orca\..*?\]/g,"").trim();if(!t)return"";const n=gt.render(t);return pt.sanitize(n,{ADD_ATTR:["style"]})}},r=e=>{o("image-modal",e)},i=e=>{o("button-click",e)};return(n,o)=>(t.openBlock(),t.createElementBlock("div",null,["text"===e.element.type?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-content",innerHTML:t.unref(a)(e.element.content)},null,8,tn)):"image"===e.element.type?(t.openBlock(),t.createBlock(kt,{key:1,url:e.element.content,onOpenModal:r},null,8,["url"])):"video"===e.element.type?(t.openBlock(),t.createBlock(Et,{key:2,url:e.element.content},null,8,["url"])):"youtube"===e.element.type?(t.openBlock(),t.createBlock(_t,{key:3,url:e.element.content},null,8,["url"])):"audio"===e.element.type?(t.openBlock(),t.createBlock(It,{key:4,"audio-items":e.element.content},null,8,["audio-items"])):"location"===e.element.type?(t.openBlock(),t.createBlock(zt,{key:5,latitude:e.element.content.latitude,longitude:e.element.content.longitude,"mapbox-token":e.mapboxToken},null,8,["latitude","longitude","mapbox-token"])):"card"===e.element.type?(t.openBlock(),t.createBlock(jt,{key:6,cards:e.element.content},null,8,["cards"])):"buttons"===e.element.type?(t.openBlock(),t.createBlock(Wt,{key:7,buttons:e.element.content,disabled:e.disabledButton,onButtonClick:i},null,8,["buttons","disabled"])):"tracing"===e.element.type?(t.openBlock(),t.createBlock(Kt,{key:8,"tracing-data":e.element.content,visibility:e.visibility,"is-admin":e.isAdmin},null,8,["tracing-data","visibility","is-admin"])):"html"===e.element.type?(t.openBlock(),t.createBlock(en,{key:9,content:e.element.content},null,8,["content"])):t.createCommentVNode("",!0)]))}}),on={key:0,class:"general-loading-container"},an={class:"loading-content"},rn={class:"loading-text"},ln=vt(t.defineComponent({__name:"GeneralLoading",props:{isLoading:{type:Boolean},message:{}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",on,[t.createElementVNode("div",an,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:24,width:3,color:"primary",class:"loading-spinner"}),t.createElementVNode("span",rn,t.toDisplayString(e.message),1)])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-ba70521a"]]),cn={key:0,class:"image-loading-placeholder"},sn={class:"loading-skeleton-image"},dn=vt(t.defineComponent({__name:"ImageLoading",props:{isLoading:{type:Boolean}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",cn,[t.createElementVNode("div",sn,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:48,width:4,color:"primary",class:"loading-spinner-large"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸ–ΌοΈ Loading image...",-1))])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-39a596d3"]]),un={key:0,class:"video-loading-placeholder"},mn={class:"loading-skeleton-video"},pn=vt(t.defineComponent({__name:"VideoLoading",props:{isLoading:{type:Boolean}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",un,[t.createElementVNode("div",mn,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:48,width:4,color:"primary",class:"loading-spinner-large"}),a[0]||(a[0]=t.createElementVNode("div",{class:"loading-skeleton-text"},"πŸŽ₯ Loading video...",-1))])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-0889a265"]]),gn={key:0,class:"card-loading-placeholder"},fn=vt(t.defineComponent({__name:"CardLoading",props:{isLoading:{type:Boolean}},setup(e){const n=s.components.VSkeletonLoader;return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",gn,[t.createVNode(t.unref(n),{class:"card-skeleton",width:"311",type:"image, article"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸƒ Loading cards...",-1))])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-2d326b15"]]),hn={key:0,class:"map-loading-placeholder"},yn=vt(t.defineComponent({__name:"MapLoading",props:{isLoading:{type:Boolean}},setup(e){const n=s.components.VSkeletonLoader;return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",hn,[t.createVNode(t.unref(n),{class:"map-skeleton",width:"500",height:"300",type:"image"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸ—ΊοΈ Loading map...",-1))])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-4bb3095a"]]),vn={class:"message-content"},kn={key:0,class:"tw-flex tw-flex-wrap tw-gap-4 tw-mt-4 tw-mb-4"},bn=["src","onClick"],wn={class:"modal-content"},En=vt(t.defineComponent({__name:"OrcaMarkdown",props:{description:{},role:{},images:{},fileAttachments:{default:()=>[]},isLastMessage:{type:Boolean,default:!1},storeIdentifier:{},visibility:{default:"all"}},emits:["send-message"],setup(e,{emit:o}){const a=e,r=o,i=t.ref(null),{modalVisible:l,currentImage:c,openModal:s,closeModal:m}=function(){const e=t.ref(!1),n=t.ref("");return{modalVisible:e,currentImage:n,openModal:t=>{n.value=t,e.value=!0},closeModal:()=>{e.value=!1,setTimeout(()=>{n.value=""},300)}}}(),p=U(t.computed(()=>a.description)),{isLoading:g,isImageLoading:f,isVideoLoading:h,isCardLoading:y,isLocationLoading:v,getLoadingMessage:k}=function(e){const n=t.ref(!1),o=t.ref(!1),a=t.ref(!1),r=t.ref(!1),i=t.ref(!1),l=t.computed(()=>t.unref(e));return t.watch(l,e=>{if(!e)return void(n.value=!1);const t=oe(e,G.start,G.end)||oe(e,W.start,W.end)||oe(e,q.start,q.end)||oe(e,Y.start,Y.end)||oe(e,$.start,$.end)||oe(e,X.start,X.end)||oe(e,K.start,K.end);n.value=t},{immediate:!0}),t.watch(l,e=>{o.value=ae(e,Z.start,Z.end,Z.actual)},{immediate:!0}),t.watch(l,e=>{const t=ae(e,Q.start,Q.end,Q.actual),n=ae(e,J.start,J.end,J.actual);a.value=t||n},{immediate:!0}),t.watch(l,e=>{r.value=ae(e,ee.start,ee.end,ee.actual)},{immediate:!0}),t.watch(l,e=>{i.value=ae(e,te.start,te.end,te.actual)},{immediate:!0}),{isLoading:n,isImageLoading:o,isVideoLoading:a,isCardLoading:r,isLocationLoading:i,getLoadingMessage:e=>ne[e]||ne["general-loading"]}}(t.computed(()=>a.description)),b=t.computed(()=>a.fileAttachments.filter(e=>e&&d(e))),w=t.computed(()=>a.fileAttachments.filter(e=>e&&!d(e))),E=t.computed(()=>"assistant"!==a.role||!a.isLastMessage||T()),T=()=>"admin"===a.visibility,N=t.computed(()=>{const e=a.description||"";return e.includes("[orca.loading.thinking.start]")&&!e.includes("[orca.loading.thinking.end]")?"thinking-loading":e.includes("[orca.loading.searching.start]")&&!e.includes("[orca.loading.searching.end]")?"searching-loading":e.includes("[orca.loading.coding.start]")&&!e.includes("[orca.loading.coding.end]")?"coding-loading":e.includes("[orca.loading.analyzing.start]")&&!e.includes("[orca.loading.analyzing.end]")?"analyzing-loading":e.includes("[orca.loading.generating.start]")&&!e.includes("[orca.loading.generating.end]")?"generating-loading":e.includes("[orca.loading.custom.start]")&&!e.includes("[orca.loading.custom.end]")?"custom-loading":e.includes("[orca.loading.start]")&&!e.includes("[orca.loading.end]")?"general-loading":null}),x=t.computed(()=>{if(g.value){const e=N.value;return e?k(e):"⏳ Loading..."}return"⏳ Loading..."}),{addCodeButtons:_}=function(e,n){const o=()=>{t.nextTick(()=>{e.value&&n()&&e.value.querySelectorAll("pre").forEach(e=>{le(e)})})};return t.onMounted(()=>{o()}),{addCodeButtons:o}}(i,()=>"user"!==a.role);t.watch(p,()=>{_()});const C=async e=>{if("action"===e.type&&!E.value)try{r("send-message",{message:e.label,buttonData:e,type:"button-action"})}catch(t){}},L=e=>{s(e)};return(e,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",vn,[t.createElementVNode("div",{ref_key:"messageContentRef",ref:i,class:"content-wrapper"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[t.unref(se)(e.type)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(nn,{key:0,element:e,"disabled-button":E.value,visibility:a.visibility,"is-admin":T(),onImageModal:L,onButtonClick:C},null,8,["element","disabled-button","visibility","is-admin"]))],64))),128)),t.createVNode(ln,{isLoading:t.unref(g),message:x.value},null,8,["isLoading","message"]),t.createVNode(dn,{isLoading:t.unref(f)},null,8,["isLoading"]),t.createVNode(pn,{isLoading:t.unref(h)},null,8,["isLoading"]),t.createVNode(fn,{isLoading:t.unref(y)},null,8,["isLoading"]),t.createVNode(yn,{isLoading:t.unref(v)},null,8,["isLoading"]),a.fileAttachments&&a.fileAttachments.length>0&&"user"===a.role?(t.openBlock(),t.createElementBlock("div",kn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,e=>(t.openBlock(),t.createElementBlock("img",{key:e,src:e,class:"tw-w-[300px] lg:tw-w-[303px] tw-h-[300px] lg:tw-h-[303px] tw-object-cover tw-rounded-lg tw-cursor-pointer",onClick:n=>t.unref(s)(e)},null,8,bn))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,e=>(t.openBlock(),t.createBlock(t.unref(n.VBtn),{key:e,class:"text-center text-sm",variant:"tonal",color:"grey-500",href:e,target:"_blank",rel:"noopener noreferrer"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(u)(e)),1)]),_:2},1032,["href"]))),128))])):t.createCommentVNode("",!0)],512)]),t.createVNode(t.unref(n.VDialog),{modelValue:t.unref(l),"onUpdate:modelValue":o[1]||(o[1]=e=>t.isRef(l)?l.value=e:null),fullscreen:"",class:"image-modal",scrim:"rgba(0, 0, 0, 0.85)",onClick:t.unref(m),transition:"fade-transition"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"modal-close-btn",onClick:o[0]||(o[0]=t.withModifiers((...e)=>t.unref(m)&&t.unref(m)(...e),["stop"]))},[...o[2]||(o[2]=[t.createElementVNode("button",{class:"close-button","aria-label":"Close image"},[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})])],-1)])]),t.createElementVNode("div",wn,[t.createVNode(t.unref(n.VImg),{src:t.unref(c),class:"modal-image",contain:""},null,8,["src"])])]),_:1},8,["modelValue","onClick"])],64))}}),[["__scopeId","data-v-619a1855"]]);e.OrcaMarkdown=En,e.cleanOrcaMarkers=function(e){return e.replace(/\[orca\..*?\]/g,"").trim()},e.generateMapId=function(e){return`map-container-${e}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`},e.getAppendIconStyle=y,e.getFileNameFromUrl=u,e.getGroupedButtons=g,e.getOutlinedButtonStyle=f,e.getOutlinedButtonTextStyle=h,e.getVuetifyColor=p,e.getYouTubeId=m,e.hasLoadingMarkers=function(e){return/\[orca\.(?:loading|image\.loading|loading\.image)\.start\]/.test(e)},e.isImageFile=d,e.packageInfo={name:"@orca-pt/orca-components",undefined:void 0,description:"Orca native components for rendering special content markers",author:"Orca Team"},e.version="1.0.2",Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("vuetify/components"),require("markdown-it"),require("highlight.js"),require("markdown-it-link-attributes"),require("markdown-it-katex"),require("@videojs-player/vue"),require("vuetify/dist/vuetify-labs.esm.js")):"function"==typeof define&&define.amd?define(["exports","vue","vuetify/components","markdown-it","highlight.js","markdown-it-link-attributes","markdown-it-katex","@videojs-player/vue","vuetify/dist/vuetify-labs.esm.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).OrcaComponents={},e.Vue,e.components,e.MarkdownIt,e.hljs,e.markdownItLinkAttributes,e.markdownItKatex,e.VideoPlayer,e.VuetifyLabs)}(this,function(e,t,n,o,a,r,i,l,c){"use strict";function s(e){const t=[".jpg",".jpeg",".png",".gif",".webp",".bmp",".svg"];try{const n=new URL(e).pathname.toLowerCase();return t.some(e=>n.endsWith(e))}catch(n){return!1}}function d(e){try{const t=new URL(e).pathname,n=t.split("/").pop()||"";return decodeURIComponent(n)}catch(t){return null}}function u(e){const t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return t&&11===t[7].length?t[7]:""}function m(e){if(!e)return"#1976D2";const t={primary:"#1976D2",secondary:"#424242",success:"#4CAF50",info:"#2196F3",warning:"#FB8C00",error:"#FF5252",accent:"#82B1FF"};return t[e.toLowerCase()]?t[e.toLowerCase()]:e}function p(e){const t={};return e.forEach(e=>{const n=e.row||1;t[n]||(t[n]=[]),t[n].push(e)}),Object.keys(t).sort((e,t)=>parseInt(e)-parseInt(t)).map(e=>t[parseInt(e)])}function g(e){if(!e)return{};const t=m(e);return{border:`1px solid ${t}`,color:t,"background-color":"transparent"}}function f(e){if(!e)return{};return{color:m(e),"background-color":"transparent"}}function h(e){if(!e)return{};const t=m(e);return{color:t,fill:t}}const y=[{type:"general-loading",start:"[orca.loading.start]",end:"[orca.loading.end]"},{type:"thinking-loading",start:"[orca.loading.thinking.start]",end:"[orca.loading.thinking.end]"},{type:"searching-loading",start:"[orca.loading.searching.start]",end:"[orca.loading.searching.end]"},{type:"coding-loading",start:"[orca.loading.coding.start]",end:"[orca.loading.coding.end]"},{type:"analyzing-loading",start:"[orca.loading.analyzing.start]",end:"[orca.loading.analyzing.end]"},{type:"generating-loading",start:"[orca.loading.generating.start]",end:"[orca.loading.generating.end]"},{type:"custom-loading",start:"[orca.loading.custom.start]",end:"[orca.loading.custom.end]"},{type:"image-loading",start:"[orca.loading.image.start]",end:"[orca.loading.image.end]"},{type:"video-loading",start:"[orca.loading.video.start]",end:"[orca.loading.video.end]"},{type:"youtube-loading",start:"[orca.loading.youtube.start]",end:"[orca.loading.youtube.end]"},{type:"card-loading",start:"[orca.loading.card.list.start]",end:"[orca.loading.card.list.end]"},{type:"map-loading",start:"[orca.loading.map.start]",end:"[orca.loading.map.end]"},{type:"html-loading",start:"[orca.loading.html.start]",end:"[orca.loading.html.end]"},{type:"image",start:"[orca.image.start]",end:"[orca.image.end]"},{type:"video",start:"[orca.video.start]",end:"[orca.video.end]"},{type:"youtube",start:"[orca.youtube.start]",end:"[orca.youtube.end]"},{type:"card",start:"[orca.list.card.start]",end:"[orca.list.card.end]"},{type:"location",start:"[orca.location.start]",end:"[orca.location.end]"},{type:"buttons",start:"[orca.buttons.start]",end:"[orca.buttons.end]"},{type:"tracing",start:"[orca.tracing.start]",end:"[orca.tracing.end]"},{type:"audio",start:"[orca.audio.start]",end:"[orca.audio.end]"},{type:"html",start:"[orca.html.start]",end:"[orca.html.end]"}],v=["general-loading","thinking-loading","searching-loading","coding-loading","analyzing-loading","generating-loading","custom-loading"];function k(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e){const t=k(e.start),n=k(e.end);return new RegExp(`${t}(.*?)${n}`,"s")}const w=y.map(e=>({type:e.type,regex:b(e)}));function E(e,t){return e.filter(t)}function T(e,t,n){return e.replace(t,n?"$1":"")}function _(e,t,n=!1){let o=e;for(const a of t){o=T(o,b(a),n)}return o}function N(e,t){return _(e,t,!0)}function x(e,t,n){let o=N(e,t);return o=function(e,t){return _(e,t,!1)}(o,n),o}const C=function(e){return E(e,e=>{return t=e.type,v.includes(t);var t})}(y),L=function(e){return E(e,e=>!e.type.includes("-loading"))}(y);function A(e){return x(e,C,L)}function S(e){return w.map(({type:t,regex:n})=>{const o=e.match(n);return{type:t,match:o,index:o?e.indexOf(o[0]):1/0}}).filter(e=>null!==e.match&&e.index!==1/0)}function B(e,t,n){const o=function(e,t){const n=t.filter(t=>t!==e).map(e=>`${e}:`).join("|");return new RegExp(`${e}:\\s*([\\s\\S]*?)(?=\\s*(?:${n})|$)`,"m")}(t,n),a=e.match(o);if(!a||!a[1])return"";let r=a[1];r=r.replace(/\u200b/g,"");return r.split("\n")[0].trim()}function D(e,t,n){const o=t.map(e=>e.name);return e.split("- ").map(e=>e.trim()).filter(e=>e).map(e=>{const a={};for(const n of t){const t=B(e,n.name,o);if("number"===n.type){const e=parseInt(t,10);a[n.name]=Number.isFinite(e)?e:void 0!==n.defaultValue?n.defaultValue:void 0}else a[n.name]=t||(void 0!==n.defaultValue?n.defaultValue:n.required?"":void 0)}return n(a)})}const V=[{name:"photo",required:!0,defaultValue:"https://via.placeholder.com/300x200"},{name:"header",required:!0,defaultValue:"Card Title"},{name:"subheader",defaultValue:""}];const I=[{name:"type",required:!0,defaultValue:"action"},{name:"label",required:!0,defaultValue:"Button"},{name:"url",defaultValue:void 0},{name:"id",type:"number",defaultValue:void 0},{name:"color",defaultValue:"primary"},{name:"row",type:"number",defaultValue:1}];const M=[{name:"label",required:!0,defaultValue:"Audio Track"},{name:"url",required:!0,defaultValue:""},{name:"type",required:!0,defaultValue:"audio/mpeg"}];const O=["image","video","youtube","html"],R={card:function(e){return D(e,V,e=>({photo:e.photo||"",header:e.header||"",subheader:e.subheader||""}))},location:function(e){const[t,n]=e.split(",").map(e=>e.trim()),o=parseFloat(t),a=parseFloat(n);return{latitude:Number.isFinite(o)?o:0,longitude:Number.isFinite(a)?a:0}},buttons:function(e){return D(e,I,e=>({type:"link"===e.type?"link":"action",label:e.label||"",url:e.url,id:e.id,color:e.color,row:e.row}))},tracing:function(e){var t;const n=e.match(/visibility:\s*(\w+)/),o=(null==n?void 0:n[1])||"all",a=e.match(/content:\s*([\s\S]*)/);return{visibility:o,content:(null==(t=null==a?void 0:a[1])?void 0:t.trim())||e,rawContent:e}},audio:function(e){return D(e,M,e=>({label:e.label||"",url:e.url||"",type:e.type||""}))}};function z(e,t){if(function(e){return e.includes("-loading")}(e))return null;if(O.includes(e))return{type:e,content:t};const n=R[e];if(n){return{type:e,content:n(t)}}return null}function F(e){return v.includes(e)}function H(e){return t.computed(()=>function(e){const t=[];let n=function(e){let t=e;for(const n of y){const e=t.lastIndexOf(n.start);if(-1===e)continue;t.substring(e+n.start.length).includes(n.end)||(t=t.substring(0,e))}return t}(e),o=0;const a=100;for(;n.length>0&&o<a;){o++;const e=S(n);if(0===e.length){U(t,n);break}const a=e.reduce((e,t)=>e.index<t.index?e:t);U(t,n.substring(0,a.index)),P(t,a);const r=a.index+a.match[0].length;n=n.substring(r)}return t}(t.unref(e)||""))}function U(e,t){const n=A(t).trim();n&&e.push({type:"text",content:n})}function P(e,t){const n=(t.match[1]??"").trim(),o=t.type.includes("-loading");if(o&&!n)return;if(o&&n){const t=N(n,C);if(t.trim()){const n=function(e){const t=[];let n=e,o=0;for(;n.length>0&&o<100;){o++;const e=S(n);if(0===e.length){const e=A(n).trim();e&&t.push({type:"text",content:e});break}const a=e.reduce((e,t)=>e.index<t.index?e:t),r=F(a.type),i=A(n.substring(0,a.index)).trim();if(i&&t.push({type:"text",content:i}),!r){const e=(a.match[1]??"").trim(),n=z(a.type,e);n&&t.push(n)}const l=a.index+a.match[0].length;n=n.substring(l)}return t}(t);e.push(...n)}return}const a=z(t.type,n);a&&e.push(a)}const j={start:"[orca.loading.start]",end:"[orca.loading.end]"},G={start:"[orca.loading.thinking.start]",end:"[orca.loading.thinking.end]"},W={start:"[orca.loading.searching.start]",end:"[orca.loading.searching.end]"},q={start:"[orca.loading.coding.start]",end:"[orca.loading.coding.end]"},Y={start:"[orca.loading.analyzing.start]",end:"[orca.loading.analyzing.end]"},$={start:"[orca.loading.generating.start]",end:"[orca.loading.generating.end]"},X={start:"[orca.loading.custom.start]",end:"[orca.loading.custom.end]"},K={start:"[orca.loading.image.start]",end:"[orca.loading.image.end]",actual:/\[orca\.image\.start\](.*?)\[orca\.image\.end\]/s},Z={start:"[orca.loading.video.start]",end:"[orca.loading.video.end]",actual:/\[orca\.video\.start\](.*?)\[orca\.video\.end\]/s},J={start:"[orca.loading.youtube.start]",end:"[orca.loading.youtube.end]",actual:/\[orca\.youtube\.start\](.*?)\[orca\.youtube\.end\]/s},Q={start:"[orca.loading.card.start]",end:"[orca.loading.card.end]",actual:/\[orca\.list\.card\.start\](.*?)\[orca\.list\.card\.end\]/s},ee={start:"[orca.loading.map.start]",end:"[orca.loading.map.end]",actual:/\[orca\.location\.start\](.*?)\[orca\.location\.end\]/s},te={"general-loading":"⏳ Loading...","thinking-loading":"πŸ€” Thinking...","searching-loading":"πŸ” Searching...","coding-loading":"πŸ’» Coding...","analyzing-loading":"πŸ“Š Analyzing...","generating-loading":"✨ Generating...","custom-loading":"⏳ Processing...","image-loading":"πŸ–ΌοΈ Loading image...","video-loading":"πŸŽ₯ Loading video...","youtube-loading":"πŸ“Ί Loading YouTube video...","card-loading":"πŸƒ Loading cards...","map-loading":"πŸ—ΊοΈ Loading map..."};function ne(e,t,n){const o=e.includes(t),a=e.includes(n);return o&&!a}function oe(e,t,n,o){const a=e.includes(t),r=e.includes(n),i=!!o&&o.test(e);return a&&!r&&!i}const ae='\n <div class="d-flex align-center">\n <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect x="6.66675" y="6.66675" width="10" height="10" rx="2" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M13.3333 6.66659V4.99992C13.3333 4.07944 12.5871 3.33325 11.6666 3.33325H4.99992C4.07944 3.33325 3.33325 4.07944 3.33325 4.99992V11.6666C3.33325 12.5871 4.07944 13.3333 4.99992 13.3333H6.66659" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color:rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;">Copy</span>\n </div>\n',re='\n <div class="d-flex align-center">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M7.5 14.1667L10 11.6667L12.5 14.1667" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7.5 5.83325L10 8.33325L12.5 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Collapse</span>\n </div>\n';function ie(e){if(e.closest(".code-container"))return;const t=document.createElement("div");t.className="code-container";const n=document.createElement("div");n.className="code-wrapper",n.style.transition="max-height 0.3s ease, opacity 0.3s ease",n.style.overflow="hidden",n.appendChild(e.cloneNode(!0));const o=document.createElement("div");o.className="buttons-container";const a=document.createElement("button");a.innerHTML=ae,a.className="copy-btn",a.onclick=()=>{var t;!async function(e,t){try{await navigator.clipboard.writeText(e),t.innerHTML='\n <div class="d-flex align-center">\n <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4.16663 9.99992L8.33329 14.1666L16.6666 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Copied</span>\n </div>\n',setTimeout(()=>{t.innerHTML=ae},2e3)}catch(n){}}((null==(t=e.querySelector("code"))?void 0:t.innerText)||"",a)};const r=document.createElement("button");r.innerHTML=re,r.className="collapse-btn",r.onclick=()=>{!function(e,t){if(e.classList.contains("collapsed"))e.classList.remove("collapsed"),e.style.maxHeight="",e.style.overflow="",t.innerHTML=re;else{e.classList.add("collapsed");const n=e.scrollHeight;e.style.maxHeight=`${n}px`,e.offsetHeight,e.style.maxHeight="0px",e.style.overflow="hidden",t.innerHTML='\n <div class="d-flex align-center">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <path d="M7.5 14.1667L10 11.6667L12.5 14.1667" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7.5 5.83325L10 8.33325L12.5 5.83325" stroke="rgb(var(--v-theme-on-surface))" stroke-opacity="0.9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span style="color: rgb(var(--v-theme-on-surface)); font-feature-settings: \'liga\' off, \'clig\' off; font-family: Inter; font-size: 12px; font-style: normal; font-weight: 400; line-height: 24px;"> Expand</span>\n </div>\n'}}(n,r)},o.appendChild(r),o.appendChild(a),t.appendChild(o),t.appendChild(n),e.replaceWith(t)}const le=["general-loading","thinking-loading","searching-loading","coding-loading","analyzing-loading","generating-loading","custom-loading","image-loading","video-loading","youtube-loading","card-loading","map-loading"];function ce(e){return le.includes(e)}
2
+ /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:se,setPrototypeOf:de,isFrozen:ue,getPrototypeOf:me,getOwnPropertyDescriptor:pe}=Object;let{freeze:ge,seal:fe,create:he}=Object,{apply:ye,construct:ve}="undefined"!=typeof Reflect&&Reflect;ge||(ge=function(e){return e}),fe||(fe=function(e){return e}),ye||(ye=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return e.apply(t,o)}),ve||(ve=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const ke=Ie(Array.prototype.forEach),be=Ie(Array.prototype.lastIndexOf),we=Ie(Array.prototype.pop),Ee=Ie(Array.prototype.push),Te=Ie(Array.prototype.splice),_e=Ie(String.prototype.toLowerCase),Ne=Ie(String.prototype.toString),xe=Ie(String.prototype.match),Ce=Ie(String.prototype.replace),Le=Ie(String.prototype.indexOf),Ae=Ie(String.prototype.trim),Se=Ie(Object.prototype.hasOwnProperty),Be=Ie(RegExp.prototype.test),De=(Ve=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ve(Ve,t)});var Ve;function Ie(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return ye(e,t,o)}}function Me(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_e;de&&de(e,null);let o=t.length;for(;o--;){let a=t[o];if("string"==typeof a){const e=n(a);e!==a&&(ue(t)||(t[o]=e),a=e)}e[a]=!0}return e}function Oe(e){for(let t=0;t<e.length;t++){Se(e,t)||(e[t]=null)}return e}function Re(e){const t=he(null);for(const[n,o]of se(e)){Se(e,n)&&(Array.isArray(o)?t[n]=Oe(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=Re(o):t[n]=o)}return t}function ze(e,t){for(;null!==e;){const n=pe(e,t);if(n){if(n.get)return Ie(n.get);if("function"==typeof n.value)return Ie(n.value)}e=me(e)}return function(){return null}}const Fe=ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),He=ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ue=ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Pe=ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),je=ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ge=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),We=ge(["#text"]),qe=ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ye=ge(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$e=ge(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Xe=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ke=fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ze=fe(/<%[\w\W]*|[\w\W]*%>/gm),Je=fe(/\$\{[\w\W]*/gm),Qe=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),et=fe(/^aria-[\-\w]+$/),tt=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=fe(/^(?:\w+script|data):/i),ot=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),at=fe(/^html$/i),rt=fe(/^[a-z][.\w]*(-[.\w]+)+$/i);var it=Object.freeze({__proto__:null,ARIA_ATTR:et,ATTR_WHITESPACE:ot,CUSTOM_ELEMENT:rt,DATA_ATTR:Qe,DOCTYPE_NAME:at,ERB_EXPR:Ze,IS_ALLOWED_URI:tt,IS_SCRIPT_OR_DATA:nt,MUSTACHE_EXPR:Ke,TMPLIT_EXPR:Je});const lt=1,ct=3,st=7,dt=8,ut=9;var mt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||t.document.nodeType!==ut||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const a=o,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:g}=t,f=s.prototype,h=ze(f,"cloneNode"),y=ze(f,"remove"),v=ze(f,"nextSibling"),k=ze(f,"childNodes"),b=ze(f,"parentNode");if("function"==typeof l){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let w,E="";const{implementation:T,createNodeIterator:_,createDocumentFragment:N,getElementsByTagName:x}=o,{importNode:C}=a;let L={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof se&&"function"==typeof b&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:S,TMPLIT_EXPR:B,DATA_ATTR:D,ARIA_ATTR:V,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:O}=it;let{IS_ALLOWED_URI:R}=it,z=null;const F=Me({},[...Fe,...He,...Ue,...je,...We]);let H=null;const U=Me({},[...qe,...Ye,...$e,...Xe]);let P=Object.seal(he(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,G=null;const W=Object.seal(he(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,Y=!0,$=!1,X=!0,K=!1,Z=!0,J=!1,Q=!1,ee=!1,te=!1,ne=!1,oe=!1,ae=!0,re=!1,ie=!0,le=!1,ce={},de=null;const ue=Me({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let me=null;const pe=Me({},["audio","video","img","source","image","track"]);let fe=null;const ye=Me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ve="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Ie="http://www.w3.org/1999/xhtml";let Oe=Ie,Ke=!1,Ze=null;const Je=Me({},[ve,Ve,Ie],Ne);let Qe=Me({},["mi","mo","mn","ms","mtext"]),et=Me({},["annotation-xml"]);const nt=Me({},["title","style","font","a","script"]);let ot=null;const rt=["application/xhtml+xml","text/html"];let mt=null,pt=null;const gt=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=Re(e),ot=-1===rt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===ot?Ne:_e,z=Se(e,"ALLOWED_TAGS")?Me({},e.ALLOWED_TAGS,mt):F,H=Se(e,"ALLOWED_ATTR")?Me({},e.ALLOWED_ATTR,mt):U,Ze=Se(e,"ALLOWED_NAMESPACES")?Me({},e.ALLOWED_NAMESPACES,Ne):Je,fe=Se(e,"ADD_URI_SAFE_ATTR")?Me(Re(ye),e.ADD_URI_SAFE_ATTR,mt):ye,me=Se(e,"ADD_DATA_URI_TAGS")?Me(Re(pe),e.ADD_DATA_URI_TAGS,mt):pe,de=Se(e,"FORBID_CONTENTS")?Me({},e.FORBID_CONTENTS,mt):ue,j=Se(e,"FORBID_TAGS")?Me({},e.FORBID_TAGS,mt):Re({}),G=Se(e,"FORBID_ATTR")?Me({},e.FORBID_ATTR,mt):Re({}),ce=!!Se(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,J=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ae=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,le=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||tt,Oe=e.NAMESPACE||Ie,Qe=e.MATHML_TEXT_INTEGRATION_POINTS||Qe,et=e.HTML_INTEGRATION_POINTS||et,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Y=!1),ne&&(te=!0),ce&&(z=Me({},We),H=[],!0===ce.html&&(Me(z,Fe),Me(H,qe)),!0===ce.svg&&(Me(z,He),Me(H,Ye),Me(H,Xe)),!0===ce.svgFilters&&(Me(z,Ue),Me(H,Ye),Me(H,Xe)),!0===ce.mathMl&&(Me(z,je),Me(H,$e),Me(H,Xe))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?W.tagCheck=e.ADD_TAGS:(z===F&&(z=Re(z)),Me(z,e.ADD_TAGS,mt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?W.attributeCheck=e.ADD_ATTR:(H===U&&(H=Re(H)),Me(H,e.ADD_ATTR,mt))),e.ADD_URI_SAFE_ATTR&&Me(fe,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(de===ue&&(de=Re(de)),Me(de,e.FORBID_CONTENTS,mt)),e.ADD_FORBID_CONTENTS&&(de===ue&&(de=Re(de)),Me(de,e.ADD_FORBID_CONTENTS,mt)),ie&&(z["#text"]=!0),J&&Me(z,["html","head","body"]),z.table&&(Me(z,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(r){return null}}(g,r)),null!==w&&"string"==typeof E&&(E=w.createHTML(""));ge&&ge(e),pt=e}},yt=Me({},[...He,...Ue,...Pe]),vt=Me({},[...je,...Ge]),kt=function(e){Ee(n.removed,{element:e});try{b(e).removeChild(e)}catch(t){y(e)}},bt=function(e,t){try{Ee(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(o){Ee(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{kt(t)}catch(o){}else try{t.setAttribute(e,"")}catch(o){}},wt=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=xe(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ot&&Oe===Ie&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=w?w.createHTML(e):e;if(Oe===Ie)try{t=(new p).parseFromString(a,ot)}catch(i){}if(!t||!t.documentElement){t=T.createDocument(Oe,"template",null);try{t.documentElement.innerHTML=Ke?E:a}catch(i){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),Oe===Ie?x.call(t,J?"html":"body")[0]:J?t.documentElement:r},Et=function(e){return _.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Tt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof c&&e instanceof c};function Nt(e,t,o){ke(e,e=>{e.call(n,t,o,pt)})}const xt=function(e){let t=null;if(Nt(L.beforeSanitizeElements,e,null),Tt(e))return kt(e),!0;const o=mt(e.nodeName);if(Nt(L.uponSanitizeElement,e,{tagName:o,allowedTags:z}),Z&&e.hasChildNodes()&&!_t(e.firstElementChild)&&Be(/<[/\w!]/g,e.innerHTML)&&Be(/<[/\w!]/g,e.textContent))return kt(e),!0;if(e.nodeType===st)return kt(e),!0;if(Z&&e.nodeType===dt&&Be(/<[/\w]/g,e.data))return kt(e),!0;if(!(W.tagCheck instanceof Function&&W.tagCheck(o))&&(!z[o]||j[o])){if(!j[o]&&Lt(o)){if(P.tagNameCheck instanceof RegExp&&Be(P.tagNameCheck,o))return!1;if(P.tagNameCheck instanceof Function&&P.tagNameCheck(o))return!1}if(ie&&!de[o]){const t=b(e)||e.parentNode,n=k(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const a=h(n[o],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,v(e))}}}return kt(e),!0}return e instanceof s&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Oe,tagName:"template"});const n=_e(e.tagName),o=_e(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Ie?"svg"===n:t.namespaceURI===ve?"svg"===n&&("annotation-xml"===o||Qe[o]):Boolean(yt[n]):e.namespaceURI===ve?t.namespaceURI===Ie?"math"===n:t.namespaceURI===Ve?"math"===n&&et[o]:Boolean(vt[n]):e.namespaceURI===Ie?!(t.namespaceURI===Ve&&!et[o])&&!(t.namespaceURI===ve&&!Qe[o])&&!vt[n]&&(nt[n]||!yt[n]):!("application/xhtml+xml"!==ot||!Ze[e.namespaceURI]))}(e)?(kt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!Be(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&e.nodeType===ct&&(t=e.textContent,ke([A,S,B],e=>{t=Ce(t,e," ")}),e.textContent!==t&&(Ee(n.removed,{element:e.cloneNode()}),e.textContent=t)),Nt(L.afterSanitizeElements,e,null),!1):(kt(e),!0)},Ct=function(e,t,n){if(ae&&("id"===t||"name"===t)&&(n in o||n in gt))return!1;if(Y&&!G[t]&&Be(D,t));else if(q&&Be(V,t));else if(W.attributeCheck instanceof Function&&W.attributeCheck(t,e));else if(!H[t]||G[t]){if(!(Lt(e)&&(P.tagNameCheck instanceof RegExp&&Be(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&Be(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||"is"===t&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&Be(P.tagNameCheck,n)||P.tagNameCheck instanceof Function&&P.tagNameCheck(n))))return!1}else if(fe[t]);else if(Be(R,Ce(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Le(n,"data:")||!me[e]){if($&&!Be(I,Ce(n,M,"")));else if(n)return!1}else;return!0},Lt=function(e){return"annotation-xml"!==e&&xe(e,O)},At=function(e){Nt(L.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Tt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let a=t.length;for(;a--;){const i=t[a],{name:l,namespaceURI:c,value:s}=i,d=mt(l),u=s;let m="value"===l?u:Ae(u);if(o.attrName=d,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,Nt(L.uponSanitizeAttribute,e,o),m=o.attrValue,!re||"id"!==d&&"name"!==d||(bt(l,e),m="user-content-"+m),Z&&Be(/((--!?|])>)|<\/(style|title|textarea)/i,m)){bt(l,e);continue}if("attributename"===d&&xe(m,"href")){bt(l,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){bt(l,e);continue}if(!X&&Be(/\/>/i,m)){bt(l,e);continue}K&&ke([A,S,B],e=>{m=Ce(m,e," ")});const p=mt(e.nodeName);if(Ct(p,d,m)){if(w&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(c);else switch(g.getAttributeType(p,d)){case"TrustedHTML":m=w.createHTML(m);break;case"TrustedScriptURL":m=w.createScriptURL(m)}if(m!==u)try{c?e.setAttributeNS(c,l,m):e.setAttribute(l,m),Tt(e)?kt(e):we(n.removed)}catch(r){bt(l,e)}}else bt(l,e)}Nt(L.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const o=Et(t);for(Nt(L.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Nt(L.uponSanitizeShadowNode,n,null),xt(n),At(n),n.content instanceof i&&e(n.content);Nt(L.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,l=null,s=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw De("toString is not a function");if("string"!=typeof(e=e.toString()))throw De("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||ht(t),n.removed=[],"string"==typeof e&&(le=!1),le){if(e.nodeName){const t=mt(e.nodeName);if(!z[t]||j[t])throw De("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=wt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),r.nodeType===lt&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!te&&!K&&!J&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(o=wt(e),!o)return te?null:oe?E:""}o&&ee&&kt(o.firstChild);const d=Et(le?e:o);for(;l=d.nextNode();)xt(l),At(l),l.content instanceof i&&St(l.content);if(le)return e;if(te){if(ne)for(s=N.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(H.shadowroot||H.shadowrootmode)&&(s=C.call(a,s,!0)),s}let u=J?o.outerHTML:o.innerHTML;return J&&z["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&Be(at,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),K&&ke([A,S,B],e=>{u=Ce(u,e," ")}),w&&oe?w.createHTML(u):u},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){pt=null,Q=!1},n.isValidAttribute=function(e,t,n){pt||ht({});const o=mt(e),a=mt(t);return Ct(o,a,n)},n.addHook=function(e,t){"function"==typeof t&&Ee(L[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=be(L[e],t);return-1===n?void 0:Te(L[e],n,1)[0]}return we(L[e])},n.removeHooks=function(e){L[e]=[]},n.removeAllHooks=function(){L={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const pt=new o({html:!0,linkify:!0,typographer:!0,highlight:(e,t)=>{if(t&&a.getLanguage(t))try{return`<pre><code class="hljs">${a.highlight(e,{language:t}).value}</code></pre>`}catch{}return`<pre><code class="hljs">${(e=>{const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,e=>t[e])})(e)}</code></pre>`}}).use(i).use(r,{pattern:/^https?:\/\//,attrs:{target:"_blank",rel:"noopener noreferrer"}});const gt={class:"image-container tw-my-4"},ft={class:"image-wrapper"},ht=["src"],yt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},vt=yt(t.defineComponent({__name:"OrcaImage",props:{url:{}},emits:["open-modal"],setup(e,{emit:n}){const o=e,a=n,r=()=>{a("open-modal",o.url)};return(n,o)=>(t.openBlock(),t.createElementBlock("div",gt,[t.createElementVNode("div",ft,[t.createElementVNode("img",{src:e.url,alt:"Generated image",class:"orca-image",loading:"lazy",onClick:r},null,8,ht),o[0]||(o[0]=t.createStaticVNode('<div class="image-overlay" data-v-e4f9d4c4><div class="zoom-icon" data-v-e4f9d4c4><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-e4f9d4c4><circle cx="11" cy="11" r="8" data-v-e4f9d4c4></circle><path d="m21 21-4.35-4.35" data-v-e4f9d4c4></path><line x1="11" y1="8" x2="11" y2="14" data-v-e4f9d4c4></line><line x1="8" y1="11" x2="14" y2="11" data-v-e4f9d4c4></line></svg></div></div>',1))])]))}}),[["__scopeId","data-v-e4f9d4c4"]]),kt={class:"orca-video-container"},bt={class:"video-wrapper"},wt=yt(t.defineComponent({__name:"OrcaVideo",props:{url:{}},setup(e){const n=t.ref({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{type:"video/mp4",src:""}]});return(o,a)=>(t.openBlock(),t.createElementBlock("div",kt,[t.createElementVNode("div",bt,[t.createVNode(t.unref(l.VideoPlayer),{options:{...n.value,sources:[{type:"video/mp4",src:e.url}]},class:"video-player-custom"},null,8,["options"])])]))}}),[["__scopeId","data-v-7a20a30c"]]),Et={class:"orca-youtube-container"},Tt={class:"youtube-wrapper"},_t=["src"],Nt=yt(t.defineComponent({__name:"OrcaYouTube",props:{url:{}},setup(e){const n=e,o=t.computed(()=>`https://www.youtube.com/embed/${u(n.url)}`);return(e,n)=>(t.openBlock(),t.createElementBlock("div",Et,[t.createElementVNode("div",Tt,[t.createElementVNode("iframe",{width:"100%",height:"100%",src:o.value,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",class:"youtube-iframe"},null,8,_t)])]))}}),[["__scopeId","data-v-9cd52c38"]]),xt={class:"orca-audio-container"},Ct={class:"audio-list"},Lt={class:"audio-content"},At={class:"audio-label"},St=["type"],Bt=["src","type"],Dt=yt(t.defineComponent({__name:"OrcaAudio",props:{audioItems:{}},setup:e=>(n,o)=>(t.openBlock(),t.createElementBlock("div",xt,[t.createElementVNode("div",Ct,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.audioItems,(e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:"audio-item"},[o[1]||(o[1]=t.createElementVNode("div",{class:"audio-icon-wrapper"},[t.createElementVNode("svg",{class:"audio-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"})])],-1)),t.createElementVNode("div",Lt,[t.createElementVNode("p",At,t.toDisplayString(e.label),1),t.createElementVNode("audio",{controls:"",class:"audio-player",type:e.type},[t.createElementVNode("source",{src:e.url,type:e.type},null,8,Bt),o[0]||(o[0]=t.createTextVNode(" Your browser does not support the audio element. ",-1))],8,St)])]))),128))])]))}),[["__scopeId","data-v-ade9342b"]]),Vt={class:"orca-location-container"},It={class:"location-info"},Mt={class:"location-text"},Ot=yt(t.defineComponent({__name:"OrcaLocation",props:{latitude:{},longitude:{},mapboxToken:{}},setup:e=>(n,o)=>(t.openBlock(),t.createElementBlock("div",Vt,[o[1]||(o[1]=t.createStaticVNode('<div class="map-placeholder" data-v-2d752e0f><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="1.5" data-v-2d752e0f><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" data-v-2d752e0f></path><circle cx="12" cy="10" r="3" data-v-2d752e0f></circle></svg><span class="placeholder-text" data-v-2d752e0f>Map view temporarily unavailable</span></div>',1)),t.createElementVNode("div",It,[o[0]||(o[0]=t.createElementVNode("div",{class:"location-icon"},[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),t.createElementVNode("circle",{cx:"12",cy:"10",r:"3"})])],-1)),t.createElementVNode("span",Mt,t.toDisplayString(e.latitude.toFixed(6))+", "+t.toDisplayString(e.longitude.toFixed(6)),1)])]))}),[["__scopeId","data-v-2d752e0f"]]),Rt={class:"orca-card-container"},zt={key:0,class:"card-image-wrapper"},Ft={key:1,class:"card-subheader"},Ht={key:2,class:"card-text"},Ut=yt(t.defineComponent({__name:"OrcaCardList",props:{cards:{}},setup:e=>(o,a)=>(t.openBlock(),t.createElementBlock("div",Rt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.cards,(e,o)=>(t.openBlock(),t.createBlock(t.unref(n.VCard),{key:o,class:"orca-card",elevation:"2"},{default:t.withCtx(()=>[e.photo?(t.openBlock(),t.createElementBlock("div",zt,[t.createVNode(t.unref(n.VImg),{src:e.photo,height:"223",cover:"",class:"card-image"},null,8,["src"])])):t.createCommentVNode("",!0),t.createVNode(t.unref(n.VCardItem),{class:"card-content"},{default:t.withCtx(()=>[e.header?(t.openBlock(),t.createBlock(t.unref(n.VCardTitle),{key:0,class:"card-header"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.header),1)]),_:2},1024)):t.createCommentVNode("",!0),e.subheader?(t.openBlock(),t.createElementBlock("span",Ft,t.toDisplayString(e.subheader),1)):t.createCommentVNode("",!0),e.text?(t.openBlock(),t.createElementBlock("p",Ht,t.toDisplayString(e.text),1)):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128))]))}),[["__scopeId","data-v-d9e3b93c"]]),Pt={class:"orca-buttons-container tw-my-4"},jt=yt(t.defineComponent({__name:"OrcaButtons",props:{buttons:{},disabled:{type:Boolean}},emits:["button-click"],setup(e,{emit:o}){const a=e,r=o,i=t.computed(()=>p(a.buttons));return(o,l)=>(t.openBlock(),t.createElementBlock("div",Pt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(o,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"button-row"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o,(o,i)=>(t.openBlock(),t.createBlock(t.unref(n.VBtn),{disabled:e.disabled,key:i,class:t.normalizeClass(["orca-button","custom-outlined-button"]),style:t.normalizeStyle(t.unref(g)(o.color)),variant:"text",rounded:"xl",target:"link"===o.type?"_blank":void 0,href:"link"===o.type?o.url:void 0,onClick:e=>(e=>{"action"!==e.type||a.disabled||r("button-click",e)})(o)},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",{style:t.normalizeStyle(t.unref(f)(o.color))},t.toDisplayString(o.label),5)]),_:2},["link"===o.type?{name:"append",fn:t.withCtx(()=>[t.createVNode(t.unref(n.VIcon),{icon:"tabler-external-link",style:t.normalizeStyle(t.unref(h)(o.color)),size:"small"},null,8,["style"])]),key:"0"}:void 0]),1032,["disabled","style","target","href","onClick"]))),128))]))),128))]))}}),[["__scopeId","data-v-480c6090"]]),Gt={key:0,class:"orca-trace-container"},Wt={class:"trace-header"},qt={key:0,class:"trace-content"},Yt={class:"trace-pre"},$t=yt(t.defineComponent({__name:"OrcaTracing",props:{tracingData:{},visibility:{},isAdmin:{type:Boolean}},setup(e){const o=e,a=t.ref(!1),r=t.computed(()=>a.value),i=t.computed(()=>Array.isArray(o.tracingData)?o.tracingData.some(e=>"all"===e.visibility||"admin"===e.visibility&&o.isAdmin):"all"===o.tracingData.visibility||"admin"===o.tracingData.visibility&&o.isAdmin),l=t.computed(()=>Array.isArray(o.tracingData)?o.tracingData.map(e=>e.content||e.rawContent).join("\n\n"):o.tracingData.content||o.tracingData.rawContent||""),c=()=>{a.value=!a.value};return(e,o)=>i.value?(t.openBlock(),t.createElementBlock("div",Gt,[t.createVNode(t.unref(n.VCard),{class:"trace-card",elevation:"2"},{default:t.withCtx(()=>[t.createElementVNode("div",Wt,[o[0]||(o[0]=t.createElementVNode("div",{class:"trace-header-content"},[t.createElementVNode("div",{class:"trace-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})])]),t.createElementVNode("strong",{class:"trace-title"},"Trace Log")],-1)),t.createVNode(t.unref(n.VBtn),{size:"small",variant:"tonal",color:"primary",class:"trace-toggle-btn",onClick:c},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.value?"Hide":"Show"),1)]),_:1})]),t.createVNode(t.unref(n.VExpandTransition),null,{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createElementBlock("div",qt,[t.createElementVNode("pre",Yt,t.toDisplayString(l.value),1)])):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-69e262d5"]]),Xt={class:"orca-html-container"},Kt={class:"html-wrapper"},Zt=["srcdoc"],Jt=yt(t.defineComponent({__name:"OrcaHtml",props:{content:{}},setup(e){t.useCssVars(e=>({v22560b2d:a.value+"px"}));const n=e,o=t.ref(null),a=t.ref(400),r=t.computed(()=>`\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <style>\n * {\n box-sizing: border-box;\n }\n html, body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n background: transparent;\n overflow: hidden;\n }\n body {\n padding: 8px;\n }\n /* SVG responsiveness for matplotlib */\n svg {\n max-width: 100%;\n height: auto;\n }\n /* Plotly container responsiveness */\n .plotly-graph-div {\n width: 100% !important;\n }\n </style>\n</head>\n<body>\n ${(e=>{let t=e.replace(/<\?xml[^?]*\?>/gi,"");return t=t.replace(/<!DOCTYPE[^>]*>/gi,""),t.trim()})(n.content)}\n <script>\n // Auto-resize iframe based on content\n function sendHeight() {\n const height = Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.scrollHeight,\n document.documentElement.offsetHeight\n );\n window.parent.postMessage({ type: 'orca-html-resize', height: height + 16 }, '*');\n }\n \n // Initial send\n setTimeout(sendHeight, 100);\n \n // Send on resize\n window.addEventListener('resize', sendHeight);\n \n // Send when images/content loads\n document.addEventListener('DOMContentLoaded', sendHeight);\n window.addEventListener('load', sendHeight);\n \n // Observe DOM changes for dynamic content (like Plotly)\n const observer = new MutationObserver(sendHeight);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true });\n <\/script>\n</body>\n</html>`),i=()=>{l()},l=()=>{if(o.value)try{const e=o.value.contentDocument;if(e&&e.body){const t=Math.max(e.body.scrollHeight,e.body.offsetHeight);t>0&&(a.value=t+16)}}catch(e){}},c=e=>{if(e.data&&"orca-html-resize"===e.data.type){const t=e.data.height;t&&t>0&&(a.value=Math.min(t,800))}};return t.onMounted(()=>{window.addEventListener("message",c)}),t.onUnmounted(()=>{window.removeEventListener("message",c)}),(e,n)=>(t.openBlock(),t.createElementBlock("div",Xt,[t.createElementVNode("div",Kt,[t.createElementVNode("iframe",{ref_key:"iframeRef",ref:o,srcdoc:r.value,sandbox:"allow-scripts",class:"html-iframe",onLoad:i},null,40,Zt)])]))}}),[["__scopeId","data-v-c4d7eb31"]]),Qt=["innerHTML"],en=t.defineComponent({__name:"ContentElement",props:{element:{},disabledButton:{type:Boolean},visibility:{},isAdmin:{type:Boolean},mapboxToken:{}},emits:["image-modal","button-click"],setup(e,{emit:n}){const o=n,{render:a}={render:e=>{const t=e.replace(/\[orca\..*?\]/g,"").trim();if(!t)return"";const n=pt.render(t);return mt.sanitize(n,{ADD_ATTR:["style"]})}},r=e=>{o("image-modal",e)},i=e=>{o("button-click",e)};return(n,o)=>(t.openBlock(),t.createElementBlock("div",null,["text"===e.element.type?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-content",innerHTML:t.unref(a)(e.element.content)},null,8,Qt)):"image"===e.element.type?(t.openBlock(),t.createBlock(vt,{key:1,url:e.element.content,onOpenModal:r},null,8,["url"])):"video"===e.element.type?(t.openBlock(),t.createBlock(wt,{key:2,url:e.element.content},null,8,["url"])):"youtube"===e.element.type?(t.openBlock(),t.createBlock(Nt,{key:3,url:e.element.content},null,8,["url"])):"audio"===e.element.type?(t.openBlock(),t.createBlock(Dt,{key:4,"audio-items":e.element.content},null,8,["audio-items"])):"location"===e.element.type?(t.openBlock(),t.createBlock(Ot,{key:5,latitude:e.element.content.latitude,longitude:e.element.content.longitude,"mapbox-token":e.mapboxToken},null,8,["latitude","longitude","mapbox-token"])):"card"===e.element.type?(t.openBlock(),t.createBlock(Ut,{key:6,cards:e.element.content},null,8,["cards"])):"buttons"===e.element.type?(t.openBlock(),t.createBlock(jt,{key:7,buttons:e.element.content,disabled:e.disabledButton,onButtonClick:i},null,8,["buttons","disabled"])):"tracing"===e.element.type?(t.openBlock(),t.createBlock($t,{key:8,"tracing-data":e.element.content,visibility:e.visibility,"is-admin":e.isAdmin},null,8,["tracing-data","visibility","is-admin"])):"html"===e.element.type?(t.openBlock(),t.createBlock(Jt,{key:9,content:e.element.content},null,8,["content"])):t.createCommentVNode("",!0)]))}}),tn={key:0,class:"general-loading-container"},nn={class:"loading-content"},on={class:"loading-text"},an=yt(t.defineComponent({__name:"GeneralLoading",props:{isLoading:{type:Boolean},message:{}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",tn,[t.createElementVNode("div",nn,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:24,width:3,color:"primary",class:"loading-spinner"}),t.createElementVNode("span",on,t.toDisplayString(e.message),1)])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-ba70521a"]]),rn={key:0,class:"image-loading-placeholder"},ln={class:"loading-skeleton-image"},cn=yt(t.defineComponent({__name:"ImageLoading",props:{isLoading:{type:Boolean}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",rn,[t.createElementVNode("div",ln,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:48,width:4,color:"primary",class:"loading-spinner-large"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸ–ΌοΈ Loading image...",-1))])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-39a596d3"]]),sn={key:0,class:"video-loading-placeholder"},dn={class:"loading-skeleton-video"},un=yt(t.defineComponent({__name:"VideoLoading",props:{isLoading:{type:Boolean}},setup:e=>(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",sn,[t.createElementVNode("div",dn,[t.createVNode(t.unref(n.VProgressCircular),{indeterminate:"",size:48,width:4,color:"primary",class:"loading-spinner-large"}),a[0]||(a[0]=t.createElementVNode("div",{class:"loading-skeleton-text"},"πŸŽ₯ Loading video...",-1))])])):t.createCommentVNode("",!0)]),_:1}))}),[["__scopeId","data-v-0889a265"]]),mn={key:0,class:"card-loading-placeholder"},pn=yt(t.defineComponent({__name:"CardLoading",props:{isLoading:{type:Boolean}},setup(e){const n=c.components.VSkeletonLoader;return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",mn,[t.createVNode(t.unref(n),{class:"card-skeleton",width:"311",type:"image, article"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸƒ Loading cards...",-1))])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-2d326b15"]]),gn={key:0,class:"map-loading-placeholder"},fn=yt(t.defineComponent({__name:"MapLoading",props:{isLoading:{type:Boolean}},setup(e){const n=c.components.VSkeletonLoader;return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[e.isLoading?(t.openBlock(),t.createElementBlock("div",gn,[t.createVNode(t.unref(n),{class:"map-skeleton",width:"500",height:"300",type:"image"}),a[0]||(a[0]=t.createElementVNode("span",{class:"loading-skeleton-text"},"πŸ—ΊοΈ Loading map...",-1))])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-4bb3095a"]]),hn={class:"message-content"},yn={key:0,class:"tw-flex tw-flex-wrap tw-gap-4 tw-mt-4 tw-mb-4"},vn=["src","onClick"],kn={class:"modal-content"},bn=yt(t.defineComponent({__name:"OrcaMarkdown",props:{description:{},role:{},images:{},fileAttachments:{default:()=>[]},isLastMessage:{type:Boolean,default:!1},storeIdentifier:{},visibility:{default:"all"}},emits:["send-message"],setup(e,{emit:o}){const a=e,r=o,i=t.ref(null),{modalVisible:l,currentImage:c,openModal:u,closeModal:m}=function(){const e=t.ref(!1),n=t.ref("");return{modalVisible:e,currentImage:n,openModal:t=>{n.value=t,e.value=!0},closeModal:()=>{e.value=!1,setTimeout(()=>{n.value=""},300)}}}(),p=H(t.computed(()=>a.description)),{isLoading:g,isImageLoading:f,isVideoLoading:h,isCardLoading:y,isLocationLoading:v,getLoadingMessage:k}=function(e){const n=t.ref(!1),o=t.ref(!1),a=t.ref(!1),r=t.ref(!1),i=t.ref(!1),l=t.computed(()=>t.unref(e));return t.watch(l,e=>{if(!e)return void(n.value=!1);const t=ne(e,j.start,j.end)||ne(e,G.start,G.end)||ne(e,W.start,W.end)||ne(e,q.start,q.end)||ne(e,Y.start,Y.end)||ne(e,$.start,$.end)||ne(e,X.start,X.end);n.value=t},{immediate:!0}),t.watch(l,e=>{o.value=oe(e,K.start,K.end,K.actual)},{immediate:!0}),t.watch(l,e=>{const t=oe(e,Z.start,Z.end,Z.actual),n=oe(e,J.start,J.end,J.actual);a.value=t||n},{immediate:!0}),t.watch(l,e=>{r.value=oe(e,Q.start,Q.end,Q.actual)},{immediate:!0}),t.watch(l,e=>{i.value=oe(e,ee.start,ee.end,ee.actual)},{immediate:!0}),{isLoading:n,isImageLoading:o,isVideoLoading:a,isCardLoading:r,isLocationLoading:i,getLoadingMessage:e=>te[e]||te["general-loading"]}}(t.computed(()=>a.description)),b=t.computed(()=>a.fileAttachments.filter(e=>e&&s(e))),w=t.computed(()=>a.fileAttachments.filter(e=>e&&!s(e))),E=t.computed(()=>"assistant"!==a.role||!a.isLastMessage||T()),T=()=>"admin"===a.visibility,_=t.computed(()=>{const e=a.description||"";return e.includes("[orca.loading.thinking.start]")&&!e.includes("[orca.loading.thinking.end]")?"thinking-loading":e.includes("[orca.loading.searching.start]")&&!e.includes("[orca.loading.searching.end]")?"searching-loading":e.includes("[orca.loading.coding.start]")&&!e.includes("[orca.loading.coding.end]")?"coding-loading":e.includes("[orca.loading.analyzing.start]")&&!e.includes("[orca.loading.analyzing.end]")?"analyzing-loading":e.includes("[orca.loading.generating.start]")&&!e.includes("[orca.loading.generating.end]")?"generating-loading":e.includes("[orca.loading.custom.start]")&&!e.includes("[orca.loading.custom.end]")?"custom-loading":e.includes("[orca.loading.start]")&&!e.includes("[orca.loading.end]")?"general-loading":null}),N=t.computed(()=>{if(g.value){const e=_.value;return e?k(e):"⏳ Loading..."}return"⏳ Loading..."}),{addCodeButtons:x}=function(e,n){const o=()=>{t.nextTick(()=>{e.value&&n()&&e.value.querySelectorAll("pre").forEach(e=>{ie(e)})})};return t.onMounted(()=>{o()}),{addCodeButtons:o}}(i,()=>"user"!==a.role);t.watch(p,()=>{x()});const C=async e=>{if("action"===e.type&&!E.value)try{r("send-message",{message:e.label,buttonData:e,type:"button-action"})}catch(t){}},L=e=>{u(e)};return(e,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",hn,[t.createElementVNode("div",{ref_key:"messageContentRef",ref:i,class:"content-wrapper"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[t.unref(ce)(e.type)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(en,{key:0,element:e,"disabled-button":E.value,visibility:a.visibility,"is-admin":T(),onImageModal:L,onButtonClick:C},null,8,["element","disabled-button","visibility","is-admin"]))],64))),128)),t.createVNode(an,{isLoading:t.unref(g),message:N.value},null,8,["isLoading","message"]),t.createVNode(cn,{isLoading:t.unref(f)},null,8,["isLoading"]),t.createVNode(un,{isLoading:t.unref(h)},null,8,["isLoading"]),t.createVNode(pn,{isLoading:t.unref(y)},null,8,["isLoading"]),t.createVNode(fn,{isLoading:t.unref(v)},null,8,["isLoading"]),a.fileAttachments&&a.fileAttachments.length>0&&"user"===a.role?(t.openBlock(),t.createElementBlock("div",yn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,e=>(t.openBlock(),t.createElementBlock("img",{key:e,src:e,class:"tw-w-[300px] lg:tw-w-[303px] tw-h-[300px] lg:tw-h-[303px] tw-object-cover tw-rounded-lg tw-cursor-pointer",onClick:n=>t.unref(u)(e)},null,8,vn))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,e=>(t.openBlock(),t.createBlock(t.unref(n.VBtn),{key:e,class:"text-center text-sm",variant:"tonal",color:"grey-500",href:e,target:"_blank",rel:"noopener noreferrer"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)(e)),1)]),_:2},1032,["href"]))),128))])):t.createCommentVNode("",!0)],512)]),t.createVNode(t.unref(n.VDialog),{modelValue:t.unref(l),"onUpdate:modelValue":o[1]||(o[1]=e=>t.isRef(l)?l.value=e:null),fullscreen:"",class:"image-modal",scrim:"rgba(0, 0, 0, 0.85)",onClick:t.unref(m),transition:"fade-transition"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"modal-close-btn",onClick:o[0]||(o[0]=t.withModifiers((...e)=>t.unref(m)&&t.unref(m)(...e),["stop"]))},[...o[2]||(o[2]=[t.createElementVNode("button",{class:"close-button","aria-label":"Close image"},[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})])],-1)])]),t.createElementVNode("div",kn,[t.createVNode(t.unref(n.VImg),{src:t.unref(c),class:"modal-image",contain:""},null,8,["src"])])]),_:1},8,["modelValue","onClick"])],64))}}),[["__scopeId","data-v-619a1855"]]);e.OrcaMarkdown=bn,e.cleanOrcaMarkers=function(e){return e.replace(/\[orca\..*?\]/g,"").trim()},e.generateMapId=function(e){return`map-container-${e}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`},e.getAppendIconStyle=h,e.getFileNameFromUrl=d,e.getGroupedButtons=p,e.getOutlinedButtonStyle=g,e.getOutlinedButtonTextStyle=f,e.getVuetifyColor=m,e.getYouTubeId=u,e.hasLoadingMarkers=function(e){return/\[orca\.(?:loading|image\.loading|loading\.image)\.start\]/.test(e)},e.isImageFile=s,e.packageInfo={name:"@orca-pt/orca-components",undefined:void 0,description:"Orca native components for rendering special content markers",author:"Orca Team"},e.version="1.0.2",Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
3
3
  //# sourceMappingURL=orca-components.umd.js.map