import{R as k}from"./vendor-react-FyxEPqXS.js";var Rn=Object.defineProperty,$e=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Bt=(i,r,a)=>r in i?Rn(i,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[r]=a,ht=(i,r)=>{for(var a in r||(r={}))en.call(r,a)&&Bt(i,a,r[a]);if($e)for(var a of $e(r))tn.call(r,a)&&Bt(i,a,r[a]);return i},dt=(i,r)=>{var a={};for(var c in i)en.call(i,c)&&r.indexOf(c)<0&&(a[c]=i[c]);if(i!=null&&$e)for(var c of $e(i))r.indexOf(c)<0&&tn.call(i,c)&&(a[c]=i[c]);return a};var me;(i=>{const r=class R{constructor(t,n,o,l){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],tR.MAX_VERSION)throw new RangeError("Version value out of range");if(l<-1||l>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let u=[];for(let h=0;h7)throw new RangeError("Invalid value");let h,T;for(h=o;;h++){const _=R.getNumDataCodewords(h,n)*8,O=C.getTotalBits(t,h);if(O<=_){T=O;break}if(h>=l)throw new RangeError("Data too long")}for(const _ of[R.Ecc.MEDIUM,R.Ecc.QUARTILE,R.Ecc.HIGH])g&&T<=R.getNumDataCodewords(h,_)*8&&(n=_);let E=[];for(const _ of t){a(_.mode.modeBits,4,E),a(_.numChars,_.mode.numCharCountBits(h),E);for(const O of _.getData())E.push(O)}d(E.length==T);const W=R.getNumDataCodewords(h,n)*8;d(E.length<=W),a(0,Math.min(4,W-E.length),E),a(0,(8-E.length%8)%8,E),d(E.length%8==0);for(let _=236;E.lengthw[O>>>3]|=_<<7-(O&7)),new R(h,n,w,u)}getModule(t,n){return 0<=t&&t>>9)*1335;const l=(n<<10|o)^21522;d(l>>>15==0);for(let u=0;u<=5;u++)this.setFunctionModule(8,u,c(l,u));this.setFunctionModule(8,7,c(l,6)),this.setFunctionModule(8,8,c(l,7)),this.setFunctionModule(7,8,c(l,8));for(let u=9;u<15;u++)this.setFunctionModule(14-u,8,c(l,u));for(let u=0;u<8;u++)this.setFunctionModule(this.size-1-u,8,c(l,u));for(let u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,c(l,u));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let o=0;o<12;o++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;d(n>>>18==0);for(let o=0;o<18;o++){const l=c(n,o),u=this.size-11+o%3,g=Math.floor(o/3);this.setFunctionModule(u,g,l),this.setFunctionModule(g,u,l)}}drawFinderPattern(t,n){for(let o=-4;o<=4;o++)for(let l=-4;l<=4;l++){const u=Math.max(Math.abs(l),Math.abs(o)),g=t+l,h=n+o;0<=g&&g{(_!=T-u||Y>=h)&&w.push(O[_])});return d(w.length==g),w}drawCodewords(t){if(t.length!=Math.floor(R.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let o=this.size-1;o>=1;o-=2){o==6&&(o=5);for(let l=0;l>>3],7-(n&7)),n++)}}d(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n5&&t++):(this.finderPenaltyAddHistory(h,T),g||(t+=this.finderPenaltyCountPatterns(T)*R.PENALTY_N3),g=this.modules[u][E],h=1);t+=this.finderPenaltyTerminateAndCount(g,h,T)*R.PENALTY_N3}for(let u=0;u5&&t++):(this.finderPenaltyAddHistory(h,T),g||(t+=this.finderPenaltyCountPatterns(T)*R.PENALTY_N3),g=this.modules[E][u],h=1);t+=this.finderPenaltyTerminateAndCount(g,h,T)*R.PENALTY_N3}for(let u=0;ug+(h?1:0),n);const o=this.size*this.size,l=Math.ceil(Math.abs(n*20-o*10)/o)-1;return d(0<=l&&l<=9),t+=l*R.PENALTY_N4,d(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2;let o=[6];for(let l=this.size-7;o.lengthR.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const o=Math.floor(t/7)+2;n-=(25*o-10)*o-55,t>=7&&(n-=36)}return d(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(R.getNumRawDataModules(t)/8)-R.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*R.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let n=[];for(let l=0;l0);for(const l of t){const u=l^o.shift();o.push(0),n.forEach((g,h)=>o[h]^=R.reedSolomonMultiply(g,u))}return o}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let o=0;for(let l=7;l>=0;l--)o=o<<1^(o>>>7)*285,o^=(n>>>l&1)*t;return d(o>>>8==0),o}finderPenaltyCountPatterns(t){const n=t[1];d(n<=this.size*3);const o=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(o&&t[0]>=n*4&&t[6]>=n?1:0)+(o&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,o){return t&&(this.finderPenaltyAddHistory(n,o),n=0),n+=this.size,this.finderPenaltyAddHistory(n,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}};r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],i.QrCode=r;function a(y,t,n){if(t<0||t>31||y>>>t)throw new RangeError("Value out of range");for(let o=t-1;o>=0;o--)n.push(y>>>o&1)}function c(y,t){return(y>>>t&1)!=0}function d(y){if(!y)throw new Error("Assertion error")}const m=class N{constructor(t,n,o){if(this.mode=t,this.numChars=n,this.bitData=o,n<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(t){let n=[];for(const o of t)a(o,8,n);return new N(N.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!N.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let o=0;o=1<{(r=>{const a=class{constructor(d,m){this.ordinal=d,this.formatBits=m}};a.LOW=new a(0,1),a.MEDIUM=new a(1,0),a.QUARTILE=new a(2,3),a.HIGH=new a(3,2),r.Ecc=a})(i.QrCode||(i.QrCode={}))})(me||(me={}));(i=>{(r=>{const a=class{constructor(d,m){this.modeBits=d,this.numBitsCharCount=m}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}};a.NUMERIC=new a(1,[10,12,14]),a.ALPHANUMERIC=new a(2,[9,11,13]),a.BYTE=new a(4,[8,16,16]),a.KANJI=new a(8,[8,10,12]),a.ECI=new a(7,[0,0,0]),r.Mode=a})(i.QrSegment||(i.QrSegment={}))})(me||(me={}));var ye=me;var yn={L:ye.QrCode.Ecc.LOW,M:ye.QrCode.Ecc.MEDIUM,Q:ye.QrCode.Ecc.QUARTILE,H:ye.QrCode.Ecc.HIGH},nn=128,on="L",rn="#FFFFFF",an="#000000",sn=!1,ln=1,Cn=4,On=0,Mn=.1;function cn(i,r=0){const a=[];return i.forEach(function(c,d){let m=null;c.forEach(function(C,y){if(!C&&m!==null){a.push(`M${m+r} ${d+r}h${y-m}v1H${m+r}z`),m=null;return}if(y===c.length-1){if(!C)return;m===null?a.push(`M${y+r},${d+r} h1v1H${y+r}z`):a.push(`M${m+r},${d+r} h${y+1-m}v1H${m+r}z`);return}C&&m===null&&(m=y)})}),a.join("")}function un(i,r){return i.slice().map((a,c)=>c=r.y+r.h?a:a.map((d,m)=>m=r.x+r.w?d:!1))}function Nn(i,r,a,c){if(c==null)return null;const d=i.length+a*2,m=Math.floor(r*Mn),C=d/r,y=(c.width||m)*C,t=(c.height||m)*C,n=c.x==null?i.length/2-y/2:c.x*C,o=c.y==null?i.length/2-t/2:c.y*C,l=c.opacity==null?1:c.opacity;let u=null;if(c.excavate){let h=Math.floor(n),T=Math.floor(o),E=Math.ceil(y+n-h),W=Math.ceil(t+o-T);u={x:h,y:T,w:E,h:W}}const g=c.crossOrigin;return{x:n,y:o,h:t,w:y,excavation:u,opacity:l,crossOrigin:g}}function bn(i,r){return r!=null?Math.max(Math.floor(r),0):i?Cn:On}function fn({value:i,level:r,minVersion:a,includeMargin:c,marginSize:d,imageSettings:m,size:C,boostLevel:y}){let t=k.useMemo(()=>{const h=(Array.isArray(i)?i:[i]).reduce((T,E)=>(T.push(...ye.QrSegment.makeSegments(E)),T),[]);return ye.QrCode.encodeSegments(h,yn[r],a,void 0,void 0,y)},[i,r,a,y]);const{cells:n,margin:o,numCells:l,calculatedImageSettings:u}=k.useMemo(()=>{let g=t.getModules();const h=bn(c,d),T=g.length+h*2,E=Nn(g,C,h,m);return{cells:g,margin:h,numCells:T,calculatedImageSettings:E}},[t,C,m,c,d]);return{qrcode:t,margin:o,cells:n,numCells:l,calculatedImageSettings:u}}var In=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),wn=k.forwardRef(function(r,a){const c=r,{value:d,size:m=nn,level:C=on,bgColor:y=rn,fgColor:t=an,includeMargin:n=sn,minVersion:o=ln,boostLevel:l,marginSize:u,imageSettings:g}=c,T=dt(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:E}=T,W=dt(T,["style"]),w=g?.src,_=k.useRef(null),O=k.useRef(null),Y=k.useCallback(M=>{_.current=M,typeof a=="function"?a(M):a&&(a.current=M)},[a]),[D,oe]=k.useState(!1),{margin:Z,cells:se,numCells:he,calculatedImageSettings:X}=fn({value:d,level:C,minVersion:o,boostLevel:l,includeMargin:n,marginSize:u,imageSettings:g,size:m});k.useEffect(()=>{if(_.current!=null){const M=_.current,$=M.getContext("2d");if(!$)return;let le=se;const q=O.current,De=X!=null&&q!==null&&q.complete&&q.naturalHeight!==0&&q.naturalWidth!==0;De&&X.excavation!=null&&(le=un(se,X.excavation));const Le=window.devicePixelRatio||1;M.height=M.width=m*Le;const Pe=m/he*Le;$.scale(Pe,Pe),$.fillStyle=y,$.fillRect(0,0,he,he),$.fillStyle=t,In?$.fill(new Path2D(cn(le,Z))):se.forEach(function(ve,Qe){ve.forEach(function(Fe,L){Fe&&$.fillRect(L+Z,Qe+Z,1,1)})}),X&&($.globalAlpha=X.opacity),De&&$.drawImage(q,X.x+Z,X.y+Z,X.w,X.h)}}),k.useEffect(()=>{oe(!1)},[w]);const je=ht({height:m,width:m},E);let we=null;return w!=null&&(we=k.createElement("img",{src:w,key:w,style:{display:"none"},onLoad:()=>{oe(!0)},ref:O,crossOrigin:X?.crossOrigin})),k.createElement(k.Fragment,null,k.createElement("canvas",ht({style:je,height:m,width:m,ref:Y,role:"img"},W)),we)});wn.displayName="QRCodeCanvas";var Dn=k.forwardRef(function(r,a){const c=r,{value:d,size:m=nn,level:C=on,bgColor:y=rn,fgColor:t=an,includeMargin:n=sn,minVersion:o=ln,boostLevel:l,title:u,marginSize:g,imageSettings:h}=c,T=dt(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:E,cells:W,numCells:w,calculatedImageSettings:_}=fn({value:d,level:C,minVersion:o,boostLevel:l,includeMargin:n,marginSize:g,imageSettings:h,size:m});let O=W,Y=null;h!=null&&_!=null&&(_.excavation!=null&&(O=un(W,_.excavation)),Y=k.createElement("image",{href:h.src,height:_.h,width:_.w,x:_.x+E,y:_.y+E,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const D=cn(O,E);return k.createElement("svg",ht({height:m,width:m,viewBox:`0 0 ${w} ${w}`,ref:a,role:"img"},T),!!u&&k.createElement("title",null,u),k.createElement("path",{fill:y,d:`M0,0 h${w}v${w}H0z`,shapeRendering:"crispEdges"}),k.createElement("path",{fill:t,d:D,shapeRendering:"crispEdges"}),Y)});Dn.displayName="QRCodeSVG";function Ht(i,r){(r==null||r>i.length)&&(r=i.length);for(var a=0,c=Array(r);a2?c-2:0),m=2;m1?a-1:0),d=1;d"u"?null:F(BigInt.prototype.toString),Qt=typeof Symbol>"u"?null:F(Symbol.prototype.toString),b=F(Object.prototype.hasOwnProperty),be=F(Object.prototype.toString),B=F(RegExp.prototype.test),We=$n(TypeError);function F(i){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var a=arguments.length,c=new Array(a>1?a-1:0),d=1;d2&&arguments[2]!==void 0?arguments[2]:Ie;if(Gt&&Gt(i,null),!H(r))return i;let c=r.length;for(;c--;){let d=r[c];if(typeof d=="string"){const m=a(d);m!==d&&(kn(r)||(r[c]=m),d=m)}i[d]=!0}return i}function jn(i){for(let r=0;r/g),Jn=V(/\${[\w\W]*/g),eo=V(/^data-[\-\w.\u00B7-\uFFFF]+$/),to=V(/^aria-[\-\w]+$/),qt=V(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),no=V(/^(?:\w+script|data):/i),oo=V(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ro=V(/^html$/i),io=V(/^[a-z][.\w]*(-[.\w]+)+$/i),Se={element:1,text:3,progressingInstruction:7,comment:8,document:9},ao=function(){return typeof window>"u"?null:window},so=function(r,a){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let c=null;const d="data-tt-policy-suffix";a&&a.hasAttribute(d)&&(c=a.getAttribute(d));const m="dompurify"+(c?"#"+c:"");try{return r.createPolicy(m,{createHTML(C){return C},createScriptURL(C){return C}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},Jt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dn(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ao();const r=p=>dn(p);if(r.version="3.4.5",r.removed=[],!i||!i.document||i.document.nodeType!==Se.document||!i.Element)return r.isSupported=!1,r;let a=i.document;const c=a,d=c.currentScript,m=i.DocumentFragment,C=i.HTMLTemplateElement,y=i.Node,t=i.Element,n=i.NodeFilter,o=i.NamedNodeMap,l=o===void 0?i.NamedNodeMap||i.MozNamedAttrMap:o,u=i.HTMLFormElement,g=i.DOMParser,h=i.trustedTypes,T=t.prototype,E=fe(T,"cloneNode"),W=fe(T,"remove"),w=fe(T,"nextSibling"),_=fe(T,"childNodes"),O=fe(T,"parentNode"),Y=y&&y.prototype?fe(y.prototype,"nodeType"):null;if(typeof C=="function"){const p=a.createElement("template");p.content&&p.content.ownerDocument&&(a=p.content.ownerDocument)}let D,oe="";const Z=a,se=Z.implementation,he=Z.createNodeIterator,X=Z.createDocumentFragment,je=Z.getElementsByTagName,we=c.importNode;let M=Jt();r.isSupported=typeof mn=="function"&&typeof O=="function"&&se&&se.createHTMLDocument!==void 0;const $=Zn,le=qn,q=Jn,De=eo,Le=to,Pe=no,ve=oo,Qe=io;let Fe=qt,L=null;const Et=A({},[...Xt,...ct,...ut,...ft,...Vt]);let z=null;const Tt=A({},[...Kt,...mt,...Zt,...Ye]);let I=Object.seal(Re(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}})),Ce=null,xe=null;const re=Object.seal(Re(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let At=!0,Xe=!0,_t=!1,St=!0,ie=!1,Oe=!0,ce=!1,Ve=!1,Ke=!1,de=!1,ke=!1,Ue=!1,Rt=!0,yt=!1;const Ct="user-content-";let Ze=!0,Me=!1,pe={},J=null;const qe=A({},["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 Ot=null;const Mt=A({},["audio","video","img","source","image","track"]);let Je=null;const Nt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",Be="http://www.w3.org/2000/svg",ee="http://www.w3.org/1999/xhtml";let ge=ee,et=!1,tt=null;const pn=A({},[ze,Be,ee],lt);let nt=A({},["mi","mo","mn","ms","mtext"]),ot=A({},["annotation-xml"]);const gn=A({},["title","style","font","a","script"]);let Ne=null;const En=["application/xhtml+xml","text/html"],Tn="text/html";let x=null,Ee=null;const An=a.createElement("form"),bt=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ee&&Ee===e)return;(!e||typeof e!="object")&&(e={}),e=Q(e),Ne=En.indexOf(e.PARSER_MEDIA_TYPE)===-1?Tn:e.PARSER_MEDIA_TYPE,x=Ne==="application/xhtml+xml"?lt:Ie,L=b(e,"ALLOWED_TAGS")&&H(e.ALLOWED_TAGS)?A({},e.ALLOWED_TAGS,x):Et,z=b(e,"ALLOWED_ATTR")&&H(e.ALLOWED_ATTR)?A({},e.ALLOWED_ATTR,x):Tt,tt=b(e,"ALLOWED_NAMESPACES")&&H(e.ALLOWED_NAMESPACES)?A({},e.ALLOWED_NAMESPACES,lt):pn,Je=b(e,"ADD_URI_SAFE_ATTR")&&H(e.ADD_URI_SAFE_ATTR)?A(Q(Nt),e.ADD_URI_SAFE_ATTR,x):Nt,Ot=b(e,"ADD_DATA_URI_TAGS")&&H(e.ADD_DATA_URI_TAGS)?A(Q(Mt),e.ADD_DATA_URI_TAGS,x):Mt,J=b(e,"FORBID_CONTENTS")&&H(e.FORBID_CONTENTS)?A({},e.FORBID_CONTENTS,x):qe,Ce=b(e,"FORBID_TAGS")&&H(e.FORBID_TAGS)?A({},e.FORBID_TAGS,x):Q({}),xe=b(e,"FORBID_ATTR")&&H(e.FORBID_ATTR)?A({},e.FORBID_ATTR,x):Q({}),pe=b(e,"USE_PROFILES")?e.USE_PROFILES&&typeof e.USE_PROFILES=="object"?Q(e.USE_PROFILES):e.USE_PROFILES:!1,At=e.ALLOW_ARIA_ATTR!==!1,Xe=e.ALLOW_DATA_ATTR!==!1,_t=e.ALLOW_UNKNOWN_PROTOCOLS||!1,St=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ce=e.WHOLE_DOCUMENT||!1,de=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Ke=e.FORCE_BODY||!1,Rt=e.SANITIZE_DOM!==!1,yt=e.SANITIZE_NAMED_PROPS||!1,Ze=e.KEEP_CONTENT!==!1,Me=e.IN_PLACE||!1,Fe=Xn(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:qt,ge=typeof e.NAMESPACE=="string"?e.NAMESPACE:ee,nt=b(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS=="object"?Q(e.MATHML_TEXT_INTEGRATION_POINTS):A({},["mi","mo","mn","ms","mtext"]),ot=b(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS=="object"?Q(e.HTML_INTEGRATION_POINTS):A({},["annotation-xml"]);const s=b(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING=="object"?Q(e.CUSTOM_ELEMENT_HANDLING):Re(null);if(I=Re(null),b(s,"tagNameCheck")&&bt(s.tagNameCheck)&&(I.tagNameCheck=s.tagNameCheck),b(s,"attributeNameCheck")&&bt(s.attributeNameCheck)&&(I.attributeNameCheck=s.attributeNameCheck),b(s,"allowCustomizedBuiltInElements")&&typeof s.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=s.allowCustomizedBuiltInElements),ie&&(Xe=!1),ke&&(de=!0),pe&&(L=A({},Vt),z=Re(null),pe.html===!0&&(A(L,Xt),A(z,Kt)),pe.svg===!0&&(A(L,ct),A(z,mt),A(z,Ye)),pe.svgFilters===!0&&(A(L,ut),A(z,mt),A(z,Ye)),pe.mathMl===!0&&(A(L,ft),A(z,Zt),A(z,Ye))),re.tagCheck=null,re.attributeCheck=null,b(e,"ADD_TAGS")&&(typeof e.ADD_TAGS=="function"?re.tagCheck=e.ADD_TAGS:H(e.ADD_TAGS)&&(L===Et&&(L=Q(L)),A(L,e.ADD_TAGS,x))),b(e,"ADD_ATTR")&&(typeof e.ADD_ATTR=="function"?re.attributeCheck=e.ADD_ATTR:H(e.ADD_ATTR)&&(z===Tt&&(z=Q(z)),A(z,e.ADD_ATTR,x))),b(e,"ADD_URI_SAFE_ATTR")&&H(e.ADD_URI_SAFE_ATTR)&&A(Je,e.ADD_URI_SAFE_ATTR,x),b(e,"FORBID_CONTENTS")&&H(e.FORBID_CONTENTS)&&(J===qe&&(J=Q(J)),A(J,e.FORBID_CONTENTS,x)),b(e,"ADD_FORBID_CONTENTS")&&H(e.ADD_FORBID_CONTENTS)&&(J===qe&&(J=Q(J)),A(J,e.ADD_FORBID_CONTENTS,x)),Ze&&(L["#text"]=!0),ce&&A(L,["html","head","body"]),L.table&&(A(L,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw We('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw We('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=e.TRUSTED_TYPES_POLICY,oe=D.createHTML("")}else D===void 0&&(D=so(h,d)),D!==null&&typeof oe=="string"&&(oe=D.createHTML(""));G&&G(e),Ee=e},It=A({},[...ct,...ut,...Vn]),wt=A({},[...ft,...Kn]),_n=function(e){let s=O(e);(!s||!s.tagName)&&(s={namespaceURI:ge,tagName:"template"});const f=Ie(e.tagName),S=Ie(s.tagName);return tt[e.namespaceURI]?e.namespaceURI===Be?s.namespaceURI===ee?f==="svg":s.namespaceURI===ze?f==="svg"&&(S==="annotation-xml"||nt[S]):!!It[f]:e.namespaceURI===ze?s.namespaceURI===ee?f==="math":s.namespaceURI===Be?f==="math"&&ot[S]:!!wt[f]:e.namespaceURI===ee?s.namespaceURI===Be&&!ot[S]||s.namespaceURI===ze&&!nt[S]?!1:!wt[f]&&(gn[f]||!It[f]):!!(Ne==="application/xhtml+xml"&&tt[e.namespaceURI]):!1},K=function(e){Ae(r.removed,{element:e});try{O(e).removeChild(e)}catch{W(e)}},ue=function(e,s){try{Ae(r.removed,{attribute:s.getAttributeNode(e),from:s})}catch{Ae(r.removed,{attribute:null,from:s})}if(s.removeAttribute(e),e==="is")if(de||ke)try{K(s)}catch{}else try{s.setAttribute(e,"")}catch{}},Dt=function(e){let s=null,f=null;if(Ke)e=""+e;else{const v=Yt(e,/^[\r\n\t ]+/);f=v&&v[0]}Ne==="application/xhtml+xml"&&ge===ee&&(e=' BlockSight.Live — Real-Time Bitcoin Blockchain Explorer '+e+"");const S=D?D.createHTML(e):e;if(ge===ee)try{s=new g().parseFromString(S,Ne)}catch{}if(!s||!s.documentElement){s=se.createDocument(ge,"template",null);try{s.documentElement.innerHTML=et?oe:S}catch{}}const P=s.body||s.documentElement;return e&&f&&P.insertBefore(a.createTextNode(f),P.childNodes[0]||null),ge===ee?je.call(s,ce?"html":"body")[0]:ce?s.documentElement:P},Lt=function(e){return he.call(e.ownerDocument||e,e,n.SHOW_ELEMENT|n.SHOW_COMMENT|n.SHOW_TEXT|n.SHOW_PROCESSING_INSTRUCTION|n.SHOW_CDATA_SECTION,null)},Pt=function(e){e.normalize();const s=he.call(e.ownerDocument||e,e,n.SHOW_TEXT|n.SHOW_COMMENT|n.SHOW_CDATA_SECTION|n.SHOW_PROCESSING_INSTRUCTION,null);let f=s.nextNode();for(;f;){let S=f.data;Te([$,le,q],P=>{S=_e(S,P," ")}),f.data=S,f=s.nextNode()}},it=function(e){return e instanceof u&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof l)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},He=function(e){if(!Y||typeof e!="object"||e===null)return!1;try{return typeof Y(e)=="number"}catch{return!1}};function te(p,e,s){Te(p,f=>{f.call(r,e,s,Ee)})}const vt=function(e){let s=null;if(te(M.beforeSanitizeElements,e,null),it(e))return K(e),!0;const f=x(e.nodeName);if(te(M.uponSanitizeElement,e,{tagName:f,allowedTags:L}),Oe&&e.hasChildNodes()&&!He(e.firstElementChild)&&B(/<[/\w!]/g,e.innerHTML)&&B(/<[/\w!]/g,e.textContent)||Oe&&e.namespaceURI===ee&&f==="style"&&He(e.firstElementChild)||e.nodeType===Se.progressingInstruction||Oe&&e.nodeType===Se.comment&&B(/<[/\w]/g,e.data))return K(e),!0;if(Ce[f]||!(re.tagCheck instanceof Function&&re.tagCheck(f))&&!L[f]){if(!Ce[f]&&xt(f)&&(I.tagNameCheck instanceof RegExp&&B(I.tagNameCheck,f)||I.tagNameCheck instanceof Function&&I.tagNameCheck(f)))return!1;if(Ze&&!J[f]){const S=O(e)||e.parentNode,P=_(e)||e.childNodes;if(P&&S){const v=P.length;for(let j=v-1;j>=0;--j){const ae=E(P[j],!0);S.insertBefore(ae,w(e))}}}return K(e),!0}return e instanceof t&&!_n(e)||(f==="noscript"||f==="noembed"||f==="noframes")&&B(/<\/no(script|embed|frames)/i,e.innerHTML)?(K(e),!0):(ie&&e.nodeType===Se.text&&(s=e.textContent,Te([$,le,q],S=>{s=_e(s,S," ")}),e.textContent!==s&&(Ae(r.removed,{element:e.cloneNode()}),e.textContent=s)),te(M.afterSanitizeElements,e,null),!1)},Ft=function(e,s,f){if(xe[s]||Rt&&(s==="id"||s==="name")&&(f in a||f in An))return!1;const S=z[s]||re.attributeCheck instanceof Function&&re.attributeCheck(s,e);if(!(Xe&&!xe[s]&&B(De,s))){if(!(At&&B(Le,s))){if(!S||xe[s]){if(!(xt(e)&&(I.tagNameCheck instanceof RegExp&&B(I.tagNameCheck,e)||I.tagNameCheck instanceof Function&&I.tagNameCheck(e))&&(I.attributeNameCheck instanceof RegExp&&B(I.attributeNameCheck,s)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(s,e))||s==="is"&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&B(I.tagNameCheck,f)||I.tagNameCheck instanceof Function&&I.tagNameCheck(f))))return!1}else if(!Je[s]){if(!B(Fe,_e(f,ve,""))){if(!((s==="src"||s==="xlink:href"||s==="href")&&e!=="script"&&$t(f,"data:")===0&&Ot[e])){if(!(_t&&!B(Pe,_e(f,ve,"")))){if(f)return!1}}}}}}return!0},Sn=A({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),xt=function(e){return!Sn[Ie(e)]&&B(Qe,e)},kt=function(e){te(M.beforeSanitizeAttributes,e,null);const s=e.attributes;if(!s||it(e))return;const f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let S=s.length;for(;S--;){const P=s[S],v=P.name,j=P.namespaceURI,ae=P.value,ne=x(v),st=ae;let U=v==="value"?st:Gn(st);if(f.attrName=ne,f.attrValue=U,f.keepAttr=!0,f.forceKeepAttr=void 0,te(M.uponSanitizeAttribute,e,f),U=f.attrValue,yt&&(ne==="id"||ne==="name")&&$t(U,Ct)!==0&&(ue(v,e),U=Ct+U),Oe&&B(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,U)){ue(v,e);continue}if(ne==="attributename"&&Yt(U,"href")){ue(v,e);continue}if(f.forceKeepAttr)continue;if(!f.keepAttr){ue(v,e);continue}if(!St&&B(/\/>/i,U)){ue(v,e);continue}ie&&Te([$,le,q],zt=>{U=_e(U,zt," ")});const Ut=x(e.nodeName);if(!Ft(Ut,ne,U)){ue(v,e);continue}if(D&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!j)switch(h.getAttributeType(Ut,ne)){case"TrustedHTML":{U=D.createHTML(U);break}case"TrustedScriptURL":{U=D.createScriptURL(U);break}}if(U!==st)try{j?e.setAttributeNS(j,v,U):e.setAttribute(v,U),it(e)?K(e):Wt(r.removed)}catch{ue(v,e)}}te(M.afterSanitizeAttributes,e,null)},at=function(e){let s=null;const f=Lt(e);for(te(M.beforeSanitizeShadowDOM,e,null);s=f.nextNode();)te(M.uponSanitizeShadowNode,s,null),vt(s),kt(s),s.content instanceof m&&at(s.content);te(M.afterSanitizeShadowDOM,e,null)},Ge=function(e){if(e.nodeType===Se.element&&e.shadowRoot instanceof m){const S=e.shadowRoot;Ge(S),at(S)}const s=e.childNodes;if(!s)return;const f=[];Te(s,S=>{Ae(f,S)});for(const S of f)Ge(S)};return r.sanitize=function(p){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=null,f=null,S=null,P=null;if(et=!p,et&&(p=""),typeof p!="string"&&!He(p)&&(p=Qn(p),typeof p!="string"))throw We("dirty is not a string, aborting");if(!r.isSupported)return p;if(Ve||rt(e),r.removed=[],typeof p=="string"&&(Me=!1),Me){const ae=p.nodeName;if(typeof ae=="string"){const ne=x(ae);if(!L[ne]||Ce[ne])throw We("root node is forbidden and cannot be sanitized in-place")}Ge(p)}else if(He(p))s=Dt(""),f=s.ownerDocument.importNode(p,!0),f.nodeType===Se.element&&f.nodeName==="BODY"||f.nodeName==="HTML"?s=f:s.appendChild(f),Ge(f);else{if(!de&&!ie&&!ce&&p.indexOf("<")===-1)return D&&Ue?D.createHTML(p):p;if(s=Dt(p),!s)return de?null:Ue?oe:""}s&&Ke&&K(s.firstChild);const v=Lt(Me?p:s);for(;S=v.nextNode();)vt(S),kt(S),S.content instanceof m&&at(S.content);if(Me)return ie&&Pt(p),p;if(de){if(ie&&Pt(s),ke)for(P=X.call(s.ownerDocument);s.firstChild;)P.appendChild(s.firstChild);else P=s;return(z.shadowroot||z.shadowrootmode)&&(P=we.call(c,P,!0)),P}let j=ce?s.outerHTML:s.innerHTML;return ce&&L["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&B(ro,s.ownerDocument.doctype.name)&&(j=" `+j),ie&&Te([$,le,q],ae=>{j=_e(j,ae," ")}),D&&Ue?D.createHTML(j):j},r.setConfig=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rt(p),Ve=!0},r.clearConfig=function(){Ee=null,Ve=!1},r.isValidAttribute=function(p,e,s){Ee||rt({});const f=x(p),S=x(e);return Ft(f,S,s)},r.addHook=function(p,e){typeof e=="function"&&Ae(M[p],e)},r.removeHook=function(p,e){if(e!==void 0){const s=Bn(M[p],e);return s===-1?void 0:Hn(M[p],s,1)[0]}return Wt(M[p])},r.removeHooks=function(p){M[p]=[]},r.removeAllHooks=function(){M=Jt()},r}var fo=dn();export{Dn as Q,fo as p}; //# sourceMappingURL=vendor-utils-BPQtUf6t.js.map