@everymatrix/svg-image 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/SvgImage-BNxs4GBT.cjs +2 -0
- package/components/SvgImage-C6uUwgpp.js +1174 -0
- package/components/SvgImage-CzhJINjG.js +1214 -0
- package/es2015/svg-image.cjs +1 -0
- package/es2015/svg-image.js +16 -0
- package/esnext/svg-image.js +14 -0
- package/package.json +25 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var yn=Object.defineProperty,Sn=Object.defineProperties;var $n=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var Ln=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable;var Vt=(e,t,i)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Pe=(e,t)=>{for(var i in t||(t={}))Ln.call(t,i)&&Vt(e,i,t[i]);if(ke)for(var i of ke(t))Rn.call(t,i)&&Vt(e,i,t[i]);return e},ve=(e,t)=>Sn(e,$n(t));var I=(e,t,i)=>(Vt(e,typeof t!="symbol"?t+"":t,i),i);var Xt=(e,t,i)=>new Promise((o,s)=>{var a=h=>{try{d(i.next(h))}catch(f){s(f)}},u=h=>{try{d(i.throw(h))}catch(f){s(f)}},d=h=>h.done?o(h.value):Promise.resolve(h.value).then(a,u);d((i=i.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function pt(){}function Ke(e){return e()}function Ue(){return Object.create(null)}function Nt(e){e.forEach(Ke)}function Ze(e){return typeof e=="function"}function wn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let $t;function Fe(e,t){return e===t?!0:($t||($t=document.createElement("a")),$t.href=t,e===$t.href)}function On(e){return Object.keys(e).length===0}function Nn(e,t){e.appendChild(t)}function Cn(e,t,i){const o=Dn(e);if(!o.getElementById(t)){const s=Dt("style");s.id=t,s.textContent=i,In(o,s)}}function Dn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function In(e,t){return Nn(e.head||e,t),t.sheet}function se(e,t,i){e.insertBefore(t,i||null)}function Ct(e){e.parentNode&&e.parentNode.removeChild(e)}function Dt(e){return document.createElement(e)}function W(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function Mn(e){return Array.from(e.childNodes)}function xn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let _t;function ht(e){_t=e}function Je(){if(!_t)throw new Error("Function called outside component initialization");return _t}function kn(e){Je().$$.on_mount.push(e)}function Pn(e){Je().$$.on_destroy.push(e)}const nt=[],ee=[];let ot=[];const He=[],vn=Promise.resolve();let ne=!1;function Un(){ne||(ne=!0,vn.then(Y))}function ie(e){ot.push(e)}const qt=new Set;let et=0;function Y(){if(et!==0)return;const e=_t;do{try{for(;et<nt.length;){const t=nt[et];et++,ht(t),Fn(t.$$)}}catch(t){throw nt.length=0,et=0,t}for(ht(null),nt.length=0,et=0;ee.length;)ee.pop()();for(let t=0;t<ot.length;t+=1){const i=ot[t];qt.has(i)||(qt.add(i),i())}ot.length=0}while(nt.length);for(;He.length;)He.pop()();ne=!1,qt.clear(),ht(e)}function Fn(e){if(e.fragment!==null){e.update(),Nt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ie)}}function Hn(e){const t=[],i=[];ot.forEach(o=>e.indexOf(o)===-1?t.push(o):i.push(o)),i.forEach(o=>o()),ot=t}const Bn=new Set;function zn(e,t){e&&e.i&&(Bn.delete(e),e.i(t))}function Gn(e,t,i){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,i),ie(()=>{const a=e.$$.on_mount.map(Ke).filter(Ze);e.$$.on_destroy?e.$$.on_destroy.push(...a):Nt(a),e.$$.on_mount=[]}),s.forEach(ie)}function Wn(e,t){const i=e.$$;i.fragment!==null&&(Hn(i.after_update),Nt(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function jn(e,t){e.$$.dirty[0]===-1&&(nt.push(e),Un(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yn(e,t,i,o,s,a,u=null,d=[-1]){const h=_t;ht(e);const f=e.$$={fragment:null,ctx:[],props:a,update:pt,not_equal:s,bound:Ue(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:Ue(),dirty:d,skip_bound:!1,root:t.target||h.$$.root};u&&u(f.root);let S=!1;if(f.ctx=i?i(e,t.props||{},(T,L,...H)=>{const P=H.length?H[0]:L;return f.ctx&&s(f.ctx[T],f.ctx[T]=P)&&(!f.skip_bound&&f.bound[T]&&f.bound[T](P),S&&jn(e,T)),L}):[],f.update(),S=!0,Nt(f.before_update),f.fragment=o?o(f.ctx):!1,t.target){if(t.hydrate){const T=Mn(t.target);f.fragment&&f.fragment.l(T),T.forEach(Ct)}else f.fragment&&f.fragment.c();t.intro&&zn(e.$$.fragment),Gn(e,t.target,t.anchor),Y()}ht(h)}let Qe;typeof HTMLElement=="function"&&(Qe=class extends HTMLElement{constructor(t,i,o){super();I(this,"$$ctor");I(this,"$$s");I(this,"$$c");I(this,"$$cn",!1);I(this,"$$d",{});I(this,"$$r",!1);I(this,"$$p_d",{});I(this,"$$l",{});I(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(t,i,o){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(i),this.$$c){const s=this.$$c.$on(t,i);this.$$l_u.set(i,s)}super.addEventListener(t,i,o)}removeEventListener(t,i,o){if(super.removeEventListener(t,i,o),this.$$c){const s=this.$$l_u.get(i);s&&(s(),this.$$l_u.delete(i))}}connectedCallback(){return Xt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(a){return()=>{let u;return{c:function(){u=Dt("slot"),a!=="default"&&W(u,"name",a)},m:function(f,S){se(f,u,S)},d:function(f){f&&Ct(u)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const i={},o=xn(this);for(const a of this.$$s)a in o&&(i[a]=[t(a)]);for(const a of this.attributes){const u=this.$$g_p(a.name);u in this.$$d||(this.$$d[u]=wt(u,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:ve(Pe({},this.$$d),{$$slots:i,$$scope:{ctx:[]}})});const s=()=>{this.$$r=!0;for(const a in this.$$p_d)if(this.$$d[a]=this.$$c.$$.ctx[this.$$c.$$.props[a]],this.$$p_d[a].reflect){const u=wt(a,this.$$d[a],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,u)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const a in this.$$l)for(const u of this.$$l[a]){const d=this.$$c.$on(a,u);this.$$l_u.set(u,d)}this.$$l={}}})}attributeChangedCallback(t,i,o){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=wt(t,o,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===t||!this.$$p_d[i].attribute&&i.toLowerCase()===t)||t}});function wt(e,t,i,o){var a;const s=(a=i[e])==null?void 0:a.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!o||!i[e])return t;if(o==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Vn(e,t,i,o,s,a){let u=class extends Qe{constructor(){super(e,i,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(d=>(t[d].attribute||d).toLowerCase())}};return Object.keys(t).forEach(d=>{Object.defineProperty(u.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(h){var f;h=wt(d,h,t),this.$$d[d]=h,(f=this.$$c)==null||f.$set({[d]:h})}})}),o.forEach(d=>{Object.defineProperty(u.prototype,d,{get(){var h;return(h=this.$$c)==null?void 0:h[d]}})}),e.element=u,u}class Xn{constructor(){I(this,"$$");I(this,"$$set")}$destroy(){Wn(this,1),this.$destroy=pt}$on(t,i){if(!Ze(i))return pt;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(i),()=>{const s=o.indexOf(i);s!==-1&&o.splice(s,1)}}$set(t){this.$$set&&!On(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const qn="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(qn);const it="__WIDGET_GLOBAL_STYLE_CACHE__";function Kn(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function Zn(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then(o=>o.text()).then(o=>{const s=document.createElement("style");s.innerHTML=o,e&&e.appendChild(s)}).catch(o=>{console.error("There was an error while trying to load client styling from URL",o)})}function Jn(e,t,i,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return i=Qn(e,t),i;window[it]||(window[it]={}),i=ti(e,t);const a=i.unsubscribe.bind(i),u=()=>{if(window[it][t]){const d=window[it][t];d.refCount>1?d.refCount=d.refCount-1:delete window[it][t]}a()};return i.unsubscribe=u,i}function Qn(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,o=>{e&&(i.innerHTML=o,e.appendChild(i))})}function ti(e,t){return window.emMessageBus.subscribe(t,i=>{if(!e)return;const o=e.getRootNode(),s=window[it];let a=s[t]&&s[t].sheet;a?s[t].refCount=s[t].refCount+1:(a=new CSSStyleSheet,a.replaceSync(i),s[t]={sheet:a,refCount:1});const u=o.adoptedStyleSheets||[];u.includes(a)||(o.adoptedStyleSheets=[...u,a])})}/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:tn,setPrototypeOf:Be,isFrozen:ei,getPrototypeOf:ni,getOwnPropertyDescriptor:ii}=Object;let{freeze:N,seal:M,create:en}=Object,{apply:oe,construct:re}=typeof Reflect!="undefined"&&Reflect;N||(N=function(t){return t});M||(M=function(t){return t});oe||(oe=function(t,i,o){return t.apply(i,o)});re||(re=function(t,i){return new t(...i)});const Lt=D(Array.prototype.forEach),ze=D(Array.prototype.pop),ct=D(Array.prototype.push),Ot=D(String.prototype.toLowerCase),Kt=D(String.prototype.toString),Ge=D(String.prototype.match),ut=D(String.prototype.replace),oi=D(String.prototype.indexOf),ri=D(String.prototype.trim),k=D(Object.prototype.hasOwnProperty),O=D(RegExp.prototype.test),ft=si(TypeError);function D(e){return function(t){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return oe(e,t,o)}}function si(e){return function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return re(e,i)}}function m(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ot;Be&&Be(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=i(s);a!==s&&(ei(t)||(t[o]=a),s=a)}e[s]=!0}return e}function ai(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}function X(e){const t=en(null);for(const[i,o]of tn(e))k(e,i)&&(Array.isArray(o)?t[i]=ai(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=X(o):t[i]=o);return t}function mt(e,t){for(;e!==null;){const o=ii(e,t);if(o){if(o.get)return D(o.get);if(typeof o.value=="function")return D(o.value)}e=ni(e)}function i(){return null}return i}const We=N(["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","section","select","shadow","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"]),Zt=N(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Jt=N(["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"]),li=N(["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"]),Qt=N(["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"]),ci=N(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),je=N(["#text"]),Ye=N(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),te=N(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","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"]),Ve=N(["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"]),Rt=N(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ui=M(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fi=M(/<%[\w\W]*|[\w\W]*%>/gm),mi=M(/\${[\w\W]*}/gm),di=M(/^data-[\-\w.\u00B7-\uFFFF]/),hi=M(/^aria-[\-\w]+$/),nn=M(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pi=M(/^(?:\w+script|data):/i),_i=M(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),on=M(/^html$/i),gi=M(/^[a-z][.\w]*(-[.\w]+)+$/i);var Xe=Object.freeze({__proto__:null,MUSTACHE_EXPR:ui,ERB_EXPR:fi,TMPLIT_EXPR:mi,DATA_ATTR:di,ARIA_ATTR:hi,IS_ALLOWED_URI:nn,IS_SCRIPT_OR_DATA:pi,ATTR_WHITESPACE:_i,DOCTYPE_NAME:on,CUSTOM_ELEMENT:gi});const dt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ei=function(){return typeof window=="undefined"?null:window},Ti=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(o=i.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(u){return u},createScriptURL(u){return u}})}catch(u){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function rn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ei();const t=c=>rn(c);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==dt.document)return t.isSupported=!1,t;let{document:i}=e;const o=i,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:d,Element:h,NodeFilter:f,NamedNodeMap:S=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:T,DOMParser:L,trustedTypes:H}=e,P=h.prototype,It=mt(P,"cloneNode"),Mt=mt(P,"remove"),_=mt(P,"nextSibling"),x=mt(P,"childNodes"),j=mt(P,"parentNode");if(typeof u=="function"){const c=i.createElement("template");c.content&&c.content.ownerDocument&&(i=c.content.ownerDocument)}let E,B="";const{implementation:gt,createNodeIterator:Et,createDocumentFragment:an,getElementsByTagName:ln}=i,{importNode:cn}=o;let v={};t.isSupported=typeof tn=="function"&&typeof j=="function"&>&>.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:xt,ERB_EXPR:kt,TMPLIT_EXPR:Pt,DATA_ATTR:un,ARIA_ATTR:fn,IS_SCRIPT_OR_DATA:mn,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:dn}=Xe;let{IS_ALLOWED_URI:le}=Xe,A=null;const ce=m({},[...We,...Zt,...Jt,...Qt,...je]);let b=null;const ue=m({},[...Ye,...te,...Ve,...Rt]);let g=Object.seal(en(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}})),rt=null,vt=null,fe=!0,Ut=!0,me=!1,de=!0,q=!1,Ft=!0,V=!1,Ht=!1,Bt=!1,K=!1,Tt=!1,At=!1,he=!0,pe=!1;const hn="user-content-";let zt=!0,st=!1,Z={},J=null;const _e=m({},["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 ge=null;const Ee=m({},["audio","video","img","source","image","track"]);let Gt=null;const Te=m({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",yt="http://www.w3.org/2000/svg",z="http://www.w3.org/1999/xhtml";let Q=z,Wt=!1,jt=null;const pn=m({},[bt,yt,z],Kt);let at=null;const _n=["application/xhtml+xml","text/html"],gn="text/html";let y=null,tt=null;const En=i.createElement("form"),Ae=function(n){return n instanceof RegExp||n instanceof Function},Yt=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(tt&&tt===n)){if((!n||typeof n!="object")&&(n={}),n=X(n),at=_n.indexOf(n.PARSER_MEDIA_TYPE)===-1?gn:n.PARSER_MEDIA_TYPE,y=at==="application/xhtml+xml"?Kt:Ot,A=k(n,"ALLOWED_TAGS")?m({},n.ALLOWED_TAGS,y):ce,b=k(n,"ALLOWED_ATTR")?m({},n.ALLOWED_ATTR,y):ue,jt=k(n,"ALLOWED_NAMESPACES")?m({},n.ALLOWED_NAMESPACES,Kt):pn,Gt=k(n,"ADD_URI_SAFE_ATTR")?m(X(Te),n.ADD_URI_SAFE_ATTR,y):Te,ge=k(n,"ADD_DATA_URI_TAGS")?m(X(Ee),n.ADD_DATA_URI_TAGS,y):Ee,J=k(n,"FORBID_CONTENTS")?m({},n.FORBID_CONTENTS,y):_e,rt=k(n,"FORBID_TAGS")?m({},n.FORBID_TAGS,y):{},vt=k(n,"FORBID_ATTR")?m({},n.FORBID_ATTR,y):{},Z=k(n,"USE_PROFILES")?n.USE_PROFILES:!1,fe=n.ALLOW_ARIA_ATTR!==!1,Ut=n.ALLOW_DATA_ATTR!==!1,me=n.ALLOW_UNKNOWN_PROTOCOLS||!1,de=n.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=n.SAFE_FOR_TEMPLATES||!1,Ft=n.SAFE_FOR_XML!==!1,V=n.WHOLE_DOCUMENT||!1,K=n.RETURN_DOM||!1,Tt=n.RETURN_DOM_FRAGMENT||!1,At=n.RETURN_TRUSTED_TYPE||!1,Bt=n.FORCE_BODY||!1,he=n.SANITIZE_DOM!==!1,pe=n.SANITIZE_NAMED_PROPS||!1,zt=n.KEEP_CONTENT!==!1,st=n.IN_PLACE||!1,le=n.ALLOWED_URI_REGEXP||nn,Q=n.NAMESPACE||z,g=n.CUSTOM_ELEMENT_HANDLING||{},n.CUSTOM_ELEMENT_HANDLING&&Ae(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(g.tagNameCheck=n.CUSTOM_ELEMENT_HANDLING.tagNameCheck),n.CUSTOM_ELEMENT_HANDLING&&Ae(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(g.attributeNameCheck=n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),n.CUSTOM_ELEMENT_HANDLING&&typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(g.allowCustomizedBuiltInElements=n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(Ut=!1),Tt&&(K=!0),Z&&(A=m({},je),b=[],Z.html===!0&&(m(A,We),m(b,Ye)),Z.svg===!0&&(m(A,Zt),m(b,te),m(b,Rt)),Z.svgFilters===!0&&(m(A,Jt),m(b,te),m(b,Rt)),Z.mathMl===!0&&(m(A,Qt),m(b,Ve),m(b,Rt))),n.ADD_TAGS&&(A===ce&&(A=X(A)),m(A,n.ADD_TAGS,y)),n.ADD_ATTR&&(b===ue&&(b=X(b)),m(b,n.ADD_ATTR,y)),n.ADD_URI_SAFE_ATTR&&m(Gt,n.ADD_URI_SAFE_ATTR,y),n.FORBID_CONTENTS&&(J===_e&&(J=X(J)),m(J,n.FORBID_CONTENTS,y)),zt&&(A["#text"]=!0),V&&m(A,["html","head","body"]),A.table&&(m(A,["tbody"]),delete rt.tbody),n.TRUSTED_TYPES_POLICY){if(typeof n.TRUSTED_TYPES_POLICY.createHTML!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof n.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=n.TRUSTED_TYPES_POLICY,B=E.createHTML("")}else E===void 0&&(E=Ti(H,s)),E!==null&&typeof B=="string"&&(B=E.createHTML(""));N&&N(n),tt=n}},be=m({},["mi","mo","mn","ms","mtext"]),ye=m({},["foreignobject","annotation-xml"]),Tn=m({},["title","style","font","a","script"]),Se=m({},[...Zt,...Jt,...li]),$e=m({},[...Qt,...ci]),An=function(n){let r=j(n);(!r||!r.tagName)&&(r={namespaceURI:Q,tagName:"template"});const l=Ot(n.tagName),p=Ot(r.tagName);return jt[n.namespaceURI]?n.namespaceURI===yt?r.namespaceURI===z?l==="svg":r.namespaceURI===bt?l==="svg"&&(p==="annotation-xml"||be[p]):!!Se[l]:n.namespaceURI===bt?r.namespaceURI===z?l==="math":r.namespaceURI===yt?l==="math"&&ye[p]:!!$e[l]:n.namespaceURI===z?r.namespaceURI===yt&&!ye[p]||r.namespaceURI===bt&&!be[p]?!1:!$e[l]&&(Tn[l]||!Se[l]):!!(at==="application/xhtml+xml"&&jt[n.namespaceURI]):!1},U=function(n){ct(t.removed,{element:n});try{j(n).removeChild(n)}catch(r){Mt(n)}},St=function(n,r){try{ct(t.removed,{attribute:r.getAttributeNode(n),from:r})}catch(l){ct(t.removed,{attribute:null,from:r})}if(r.removeAttribute(n),n==="is"&&!b[n])if(K||Tt)try{U(r)}catch(l){}else try{r.setAttribute(n,"")}catch(l){}},Le=function(n){let r=null,l=null;if(Bt)n="<remove></remove>"+n;else{const $=Ge(n,/^[\r\n\t ]+/);l=$&&$[0]}at==="application/xhtml+xml"&&Q===z&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+n+"</body></html>");const p=E?E.createHTML(n):n;if(Q===z)try{r=new L().parseFromString(p,at)}catch($){}if(!r||!r.documentElement){r=gt.createDocument(Q,"template",null);try{r.documentElement.innerHTML=Wt?B:p}catch($){}}const R=r.body||r.documentElement;return n&&l&&R.insertBefore(i.createTextNode(l),R.childNodes[0]||null),Q===z?ln.call(r,V?"html":"body")[0]:V?r.documentElement:R},Re=function(n){return Et.call(n.ownerDocument||n,n,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},we=function(n){return n instanceof T&&(typeof n.nodeName!="string"||typeof n.textContent!="string"||typeof n.removeChild!="function"||!(n.attributes instanceof S)||typeof n.removeAttribute!="function"||typeof n.setAttribute!="function"||typeof n.namespaceURI!="string"||typeof n.insertBefore!="function"||typeof n.hasChildNodes!="function")},Oe=function(n){return typeof d=="function"&&n instanceof d},G=function(n,r,l){v[n]&&Lt(v[n],p=>{p.call(t,r,l,tt)})},Ne=function(n){let r=null;if(G("beforeSanitizeElements",n,null),we(n))return U(n),!0;const l=y(n.nodeName);if(G("uponSanitizeElement",n,{tagName:l,allowedTags:A}),n.hasChildNodes()&&!Oe(n.firstElementChild)&&O(/<[/\w]/g,n.innerHTML)&&O(/<[/\w]/g,n.textContent)||n.nodeType===dt.progressingInstruction||Ft&&n.nodeType===dt.comment&&O(/<[/\w]/g,n.data))return U(n),!0;if(!A[l]||rt[l]){if(!rt[l]&&De(l)&&(g.tagNameCheck instanceof RegExp&&O(g.tagNameCheck,l)||g.tagNameCheck instanceof Function&&g.tagNameCheck(l)))return!1;if(zt&&!J[l]){const p=j(n)||n.parentNode,R=x(n)||n.childNodes;if(R&&p){const $=R.length;for(let C=$-1;C>=0;--C){const F=It(R[C],!0);F.__removalCount=(n.__removalCount||0)+1,p.insertBefore(F,_(n))}}}return U(n),!0}return n instanceof h&&!An(n)||(l==="noscript"||l==="noembed"||l==="noframes")&&O(/<\/no(script|embed|frames)/i,n.innerHTML)?(U(n),!0):(q&&n.nodeType===dt.text&&(r=n.textContent,Lt([xt,kt,Pt],p=>{r=ut(r,p," ")}),n.textContent!==r&&(ct(t.removed,{element:n.cloneNode()}),n.textContent=r)),G("afterSanitizeElements",n,null),!1)},Ce=function(n,r,l){if(he&&(r==="id"||r==="name")&&(l in i||l in En))return!1;if(!(Ut&&!vt[r]&&O(un,r))){if(!(fe&&O(fn,r))){if(!b[r]||vt[r]){if(!(De(n)&&(g.tagNameCheck instanceof RegExp&&O(g.tagNameCheck,n)||g.tagNameCheck instanceof Function&&g.tagNameCheck(n))&&(g.attributeNameCheck instanceof RegExp&&O(g.attributeNameCheck,r)||g.attributeNameCheck instanceof Function&&g.attributeNameCheck(r))||r==="is"&&g.allowCustomizedBuiltInElements&&(g.tagNameCheck instanceof RegExp&&O(g.tagNameCheck,l)||g.tagNameCheck instanceof Function&&g.tagNameCheck(l))))return!1}else if(!Gt[r]){if(!O(le,ut(l,ae,""))){if(!((r==="src"||r==="xlink:href"||r==="href")&&n!=="script"&&oi(l,"data:")===0&&ge[n])){if(!(me&&!O(mn,ut(l,ae,"")))){if(l)return!1}}}}}}return!0},De=function(n){return n!=="annotation-xml"&&Ge(n,dn)},Ie=function(n){G("beforeSanitizeAttributes",n,null);const{attributes:r}=n;if(!r)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:b};let p=r.length;for(;p--;){const R=r[p],{name:$,namespaceURI:C,value:F}=R,lt=y($);let w=$==="value"?F:ri(F);if(l.attrName=lt,l.attrValue=w,l.keepAttr=!0,l.forceKeepAttr=void 0,G("uponSanitizeAttribute",n,l),w=l.attrValue,Ft&&O(/((--!?|])>)|<\/(style|title)/i,w)){St($,n);continue}if(l.forceKeepAttr||(St($,n),!l.keepAttr))continue;if(!de&&O(/\/>/i,w)){St($,n);continue}q&&Lt([xt,kt,Pt],xe=>{w=ut(w,xe," ")});const Me=y(n.nodeName);if(Ce(Me,lt,w)){if(pe&&(lt==="id"||lt==="name")&&(St($,n),w=hn+w),E&&typeof H=="object"&&typeof H.getAttributeType=="function"&&!C)switch(H.getAttributeType(Me,lt)){case"TrustedHTML":{w=E.createHTML(w);break}case"TrustedScriptURL":{w=E.createScriptURL(w);break}}try{C?n.setAttributeNS(C,$,w):n.setAttribute($,w),we(n)?U(n):ze(t.removed)}catch(xe){}}}G("afterSanitizeAttributes",n,null)},bn=function c(n){let r=null;const l=Re(n);for(G("beforeSanitizeShadowDOM",n,null);r=l.nextNode();)G("uponSanitizeShadowNode",r,null),!Ne(r)&&(r.content instanceof a&&c(r.content),Ie(r));G("afterSanitizeShadowDOM",n,null)};return t.sanitize=function(c){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=null,l=null,p=null,R=null;if(Wt=!c,Wt&&(c="<!-->"),typeof c!="string"&&!Oe(c))if(typeof c.toString=="function"){if(c=c.toString(),typeof c!="string")throw ft("dirty is not a string, aborting")}else throw ft("toString is not a function");if(!t.isSupported)return c;if(Ht||Yt(n),t.removed=[],typeof c=="string"&&(st=!1),st){if(c.nodeName){const F=y(c.nodeName);if(!A[F]||rt[F])throw ft("root node is forbidden and cannot be sanitized in-place")}}else if(c instanceof d)r=Le("<!---->"),l=r.ownerDocument.importNode(c,!0),l.nodeType===dt.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?r=l:r.appendChild(l);else{if(!K&&!q&&!V&&c.indexOf("<")===-1)return E&&At?E.createHTML(c):c;if(r=Le(c),!r)return K?null:At?B:""}r&&Bt&&U(r.firstChild);const $=Re(st?c:r);for(;p=$.nextNode();)Ne(p)||(p.content instanceof a&&bn(p.content),Ie(p));if(st)return c;if(K){if(Tt)for(R=an.call(r.ownerDocument);r.firstChild;)R.appendChild(r.firstChild);else R=r;return(b.shadowroot||b.shadowrootmode)&&(R=cn.call(o,R,!0)),R}let C=V?r.outerHTML:r.innerHTML;return V&&A["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&O(on,r.ownerDocument.doctype.name)&&(C="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
|
|
2
|
+
`+C),q&&Lt([xt,kt,Pt],F=>{C=ut(C,F," ")}),E&&At?E.createHTML(C):C},t.setConfig=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(c),Ht=!0},t.clearConfig=function(){tt=null,Ht=!1},t.isValidAttribute=function(c,n,r){tt||Yt({});const l=y(c),p=y(n);return Ce(l,p,r)},t.addHook=function(c,n){typeof n=="function"&&(v[c]=v[c]||[],ct(v[c],n))},t.removeHook=function(c){if(v[c])return ze(v[c])},t.removeHooks=function(c){v[c]&&(v[c]=[])},t.removeAllHooks=function(){v={}},t}var Ai=rn();function bi(e){Cn(e,"svelte-88v9np",".InlineSvgContainer{display:inline-flex}")}function qe(e){let t,i;return{c(){t=Dt("img"),Fe(t.src,i=e[0])||W(t,"src",i),W(t,"class",e[1]),W(t,"alt",e[2])},m(o,s){se(o,t,s)},p(o,s){s&1&&!Fe(t.src,i=o[0])&&W(t,"src",i),s&2&&W(t,"class",o[1]),s&4&&W(t,"alt",o[2])},d(o){o&&Ct(t)}}}function yi(e){let t,i=e[4]&&qe(e);return{c(){t=Dt("span"),i&&i.c(),W(t,"class","InlineSvgContainer"),W(t,"part","svg-container")},m(o,s){se(o,t,s),i&&i.m(t,null),e[8](t)},p(o,[s]){o[4]?i?i.p(o,s):(i=qe(o),i.c(),i.m(t,null)):i&&(i.d(1),i=null)},i:pt,o:pt,d(o){o&&Ct(t),i&&i.d(),e[8](null)}}}function Si(e,t,i){let{src:o}=t,{className:s=""}=t,{ariaLabel:a=""}=t,{clientstyling:u=""}=t,{clientstylingurl:d=""}=t,{mbsource:h}=t,f=!1,S=null,T,L,H;function P(_){return Xt(this,null,function*(){if(_){if(i(4,f=!1),T==null||T.abort(),T=new AbortController,!_.toLowerCase().endsWith(".svg")){i(4,f=!0);return}try{const x=yield fetch(_,{signal:T.signal});if(!x.ok)throw new Error("Fetch failed");const j=yield x.text(),E=Ai.sanitize(j,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["foreignObject"],FORBID_ATTR:["onload","onerror","onclick","onmouseover"]}),Et=new DOMParser().parseFromString(E,"image/svg+xml").querySelector("svg");if(!Et)throw new Error("No SVG element found");if(S=Et,a?(S.setAttribute("role","img"),S.setAttribute("aria-label",a)):S.setAttribute("aria-hidden","true"),S.setAttribute("part","svg-icon"),!L)return;L.replaceChildren(S)}catch(x){if(x.name==="AbortError")return;console.error("Inline SVG error:",x),i(4,f=!0)}}})}function It(_){var E,B;if(!S)return;const x=(E=_==null?void 0:_.trim())!=null?E:"",j=(B=S.getAttribute("class"))!=null?B:"";x!==j&&(x?S.setAttribute("class",x):S.removeAttribute("class"))}kn(()=>()=>{}),Pn(()=>{T==null||T.abort()});function Mt(_){ee[_?"unshift":"push"](()=>{L=_,i(3,L)})}return e.$$set=_=>{"src"in _&&i(0,o=_.src),"className"in _&&i(1,s=_.className),"ariaLabel"in _&&i(2,a=_.ariaLabel),"clientstyling"in _&&i(5,u=_.clientstyling),"clientstylingurl"in _&&i(6,d=_.clientstylingurl),"mbsource"in _&&i(7,h=_.mbsource)},e.$$.update=()=>{e.$$.dirty&1&&o&&P(o),e.$$.dirty&2&&It(s),e.$$.dirty&40&&u&&L&&Kn(L,u),e.$$.dirty&72&&d&&L&&Zn(L,d),e.$$.dirty&136&&h&&L&&Jn(L,`${h}.Style`,H)},[o,s,a,L,f,u,d,h,Mt]}class sn extends Xn{constructor(t){super(),Yn(this,t,Si,yi,wn,{src:0,className:1,ariaLabel:2,clientstyling:5,clientstylingurl:6,mbsource:7},bi)}get src(){return this.$$.ctx[0]}set src(t){this.$$set({src:t}),Y()}get className(){return this.$$.ctx[1]}set className(t){this.$$set({className:t}),Y()}get ariaLabel(){return this.$$.ctx[2]}set ariaLabel(t){this.$$set({ariaLabel:t}),Y()}get clientstyling(){return this.$$.ctx[5]}set clientstyling(t){this.$$set({clientstyling:t}),Y()}get clientstylingurl(){return this.$$.ctx[6]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Y()}get mbsource(){return this.$$.ctx[7]}set mbsource(t){this.$$set({mbsource:t}),Y()}}Vn(sn,{src:{},className:{},ariaLabel:{},clientstyling:{},clientstylingurl:{},mbsource:{}},[],[],!0);exports.default=sn;
|