(()=>{var Rd=Object.create;var el=Object.defineProperty,Wd=Object.defineProperties,md=Object.getOwnPropertyDescriptor,Ud=Object.getOwnPropertyDescriptors,Gd=Object.getOwnPropertyNames,sn=Object.getOwnPropertySymbols,sd=Object.getPrototypeOf,Tn=Object.prototype.hasOwnProperty,Fd=Object.prototype.propertyIsEnumerable;var Fn=(e,t,l)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,pn=(e,t)=>{for(var l in t||(t={}))Tn.call(t,l)&&Fn(e,l,t[l]);if(sn)for(var l of sn(t))Fd.call(t,l)&&Fn(e,l,t[l]);return e},un=(e,t)=>Wd(e,Ud(t));var Y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Td=(e,t,l,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Gd(t))!Tn.call(e,i)&&i!==l&&el(e,i,{get:()=>t[i],enumerable:!(n=md(t,i))||n.enumerable});return e};var Yt=(e,t,l)=>(l=e!=null?Rd(sd(e)):{},Td(t||!e||!e.__esModule?el(l,"default",{value:e,enumerable:!0}):l,e));var Nn=Y((nl,il)=>{(function(e,t){typeof nl=="object"&&typeof il!="undefined"?il.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.DOMPurify=t())})(nl,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:l,getPrototypeOf:n,getOwnPropertyDescriptor:i}=Object,{freeze:o,seal:a,create:c}=Object,{apply:V,construct:b}=typeof Reflect!="undefined"&&Reflect;o||(o=function(T){return T}),a||(a=function(T){return T}),V||(V=function(T,M,B){return T.apply(M,B)}),b||(b=function(T,M){return new T(...M)});let r=x(Array.prototype.forEach),G=x(Array.prototype.pop),s=x(Array.prototype.push),I=x(String.prototype.toLowerCase),O=x(String.prototype.toString),z=x(String.prototype.match),A=x(String.prototype.replace),rt=x(String.prototype.indexOf),Tt=x(String.prototype.trim),S=x(Object.prototype.hasOwnProperty),w=x(RegExp.prototype.test),D=tt(TypeError);function x(X){return function(T){for(var M=arguments.length,B=new Array(M>1?M-1:0),q=1;q<M;q++)B[q-1]=arguments[q];return V(X,T,B)}}function tt(X){return function(){for(var T=arguments.length,M=new Array(T),B=0;B<T;B++)M[B]=arguments[B];return b(X,M)}}function g(X,T){let M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I;t&&t(X,null);let B=T.length;for(;B--;){let q=T[B];if(typeof q=="string"){let mt=M(q);mt!==q&&(l(T)||(T[B]=mt),q=mt)}X[q]=!0}return X}function Ct(X){for(let T=0;T<X.length;T++)S(X,T)||(X[T]=null);return X}function Rt(X){let T=c(null);for(let[M,B]of e(X))S(X,M)&&(Array.isArray(B)?T[M]=Ct(B):B&&typeof B=="object"&&B.constructor===Object?T[M]=Rt(B):T[M]=B);return T}function pt(X,T){for(;X!==null;){let B=i(X,T);if(B){if(B.get)return x(B.get);if(typeof B.value=="function")return x(B.value)}X=n(X)}function M(){return null}return M}let Ue=o(["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"]),Bt=o(["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"]),Xt=o(["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"]),Lt=o(["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"]),Pt=o(["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"]),R=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Z=o(["#text"]),m=o(["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"]),h=o(["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"]),u=o(["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"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_=a(/<%[\w\W]*|[\w\W]*%>/gm),it=a(/\${[\w\W]*}/gm),K=a(/^data-[\-\w.\u00B7-\uFFFF]/),_t=a(/^aria-[\-\w]+$/),ut=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wt=a(/^(?:\w+script|data):/i),wi=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wl=a(/^html$/i),Hi=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Hl=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:_,TMPLIT_EXPR:it,DATA_ATTR:K,ARIA_ATTR:_t,IS_ALLOWED_URI:ut,IS_SCRIPT_OR_DATA:Wt,ATTR_WHITESPACE:wi,DOCTYPE_NAME:wl,CUSTOM_ELEMENT:Hi});let Kt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ai=function(){return typeof window=="undefined"?null:window},yi=function(T,M){if(typeof T!="object"||typeof T.createPolicy!="function")return null;let B=null,q="data-tt-policy-suffix";M&&M.hasAttribute(q)&&(B=M.getAttribute(q));let mt="dompurify"+(B?"#"+B:"");try{return T.createPolicy(mt,{createHTML(kt){return kt},createScriptURL(kt){return kt}})}catch(kt){return console.warn("TrustedTypes policy "+mt+" could not be created."),null}};function Al(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ai(),T=p=>Al(p);if(T.version="3.1.6",T.removed=[],!X||!X.document||X.document.nodeType!==Kt.document)return T.isSupported=!1,T;let{document:M}=X,B=M,q=B.currentScript,{DocumentFragment:mt,HTMLTemplateElement:kt,Node:He,Element:yl,NodeFilter:qt,NamedNodeMap:Di=X.NamedNodeMap||X.MozNamedAttrMap,HTMLFormElement:ji,DOMParser:fi,trustedTypes:Ge}=X,$t=yl.prototype,vi=pt($t,"cloneNode"),Li=pt($t,"remove"),Pi=pt($t,"nextSibling"),_i=pt($t,"childNodes"),se=pt($t,"parentNode");if(typeof kt=="function"){let p=M.createElement("template");p.content&&p.content.ownerDocument&&(M=p.content.ownerDocument)}let et,te="",{implementation:Ae,createNodeIterator:Ki,createDocumentFragment:qi,getElementsByTagName:$i}=M,{importNode:td}=B,Vt={};T.isSupported=typeof e=="function"&&typeof se=="function"&&Ae&&Ae.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ye,ERB_EXPR:ze,TMPLIT_EXPR:De,DATA_ATTR:ed,ARIA_ATTR:ld,IS_SCRIPT_OR_DATA:nd,ATTR_WHITESPACE:zl,CUSTOM_ELEMENT:id}=Hl,{IS_ALLOWED_URI:Dl}=Hl,j=null,jl=g({},[...Ue,...Bt,...Xt,...Pt,...Z]),f=null,fl=g({},[...m,...h,...u,...Q]),H=Object.seal(c(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}})),ee=null,je=null,vl=!0,fe=!0,Ll=!1,Pl=!0,St=!1,ve=!0,Qt=!1,Le=!1,Pe=!1,Ot=!1,Fe=!1,Te=!1,_l=!0,Kl=!1,dd="user-content-",_e=!0,le=!1,wt={},Ht=null,ql=g({},["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"]),$l=null,tn=g({},["audio","video","img","source","image","track"]),Ke=null,en=g({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml",At=Ut,qe=!1,$e=null,od=g({},[pe,ue,Ut],O),ne=null,ad=["application/xhtml+xml","text/html"],cd="text/html",v=null,yt=null,Vd=M.createElement("form"),ln=function(d){return d instanceof RegExp||d instanceof Function},tl=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yt&&yt===d)){if((!d||typeof d!="object")&&(d={}),d=Rt(d),ne=ad.indexOf(d.PARSER_MEDIA_TYPE)===-1?cd:d.PARSER_MEDIA_TYPE,v=ne==="application/xhtml+xml"?O:I,j=S(d,"ALLOWED_TAGS")?g({},d.ALLOWED_TAGS,v):jl,f=S(d,"ALLOWED_ATTR")?g({},d.ALLOWED_ATTR,v):fl,$e=S(d,"ALLOWED_NAMESPACES")?g({},d.ALLOWED_NAMESPACES,O):od,Ke=S(d,"ADD_URI_SAFE_ATTR")?g(Rt(en),d.ADD_URI_SAFE_ATTR,v):en,$l=S(d,"ADD_DATA_URI_TAGS")?g(Rt(tn),d.ADD_DATA_URI_TAGS,v):tn,Ht=S(d,"FORBID_CONTENTS")?g({},d.FORBID_CONTENTS,v):ql,ee=S(d,"FORBID_TAGS")?g({},d.FORBID_TAGS,v):{},je=S(d,"FORBID_ATTR")?g({},d.FORBID_ATTR,v):{},wt=S(d,"USE_PROFILES")?d.USE_PROFILES:!1,vl=d.ALLOW_ARIA_ATTR!==!1,fe=d.ALLOW_DATA_ATTR!==!1,Ll=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Pl=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,St=d.SAFE_FOR_TEMPLATES||!1,ve=d.SAFE_FOR_XML!==!1,Qt=d.WHOLE_DOCUMENT||!1,Ot=d.RETURN_DOM||!1,Fe=d.RETURN_DOM_FRAGMENT||!1,Te=d.RETURN_TRUSTED_TYPE||!1,Pe=d.FORCE_BODY||!1,_l=d.SANITIZE_DOM!==!1,Kl=d.SANITIZE_NAMED_PROPS||!1,_e=d.KEEP_CONTENT!==!1,le=d.IN_PLACE||!1,Dl=d.ALLOWED_URI_REGEXP||ut,At=d.NAMESPACE||Ut,H=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&ln(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&ln(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(fe=!1),Fe&&(Ot=!0),wt&&(j=g({},Z),f=[],wt.html===!0&&(g(j,Ue),g(f,m)),wt.svg===!0&&(g(j,Bt),g(f,h),g(f,Q)),wt.svgFilters===!0&&(g(j,Xt),g(f,h),g(f,Q)),wt.mathMl===!0&&(g(j,Pt),g(f,u),g(f,Q))),d.ADD_TAGS&&(j===jl&&(j=Rt(j)),g(j,d.ADD_TAGS,v)),d.ADD_ATTR&&(f===fl&&(f=Rt(f)),g(f,d.ADD_ATTR,v)),d.ADD_URI_SAFE_ATTR&&g(Ke,d.ADD_URI_SAFE_ATTR,v),d.FORBID_CONTENTS&&(Ht===ql&&(Ht=Rt(Ht)),g(Ht,d.FORBID_CONTENTS,v)),_e&&(j["#text"]=!0),Qt&&g(j,["html","head","body"]),j.table&&(g(j,["tbody"]),delete ee.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=d.TRUSTED_TYPES_POLICY,te=et.createHTML("")}else et===void 0&&(et=yi(Ge,q)),et!==null&&typeof te=="string"&&(te=et.createHTML(""));o&&o(d),yt=d}},nn=g({},["mi","mo","mn","ms","mtext"]),dn=g({},["foreignobject","annotation-xml"]),bd=g({},["title","style","font","a","script"]),on=g({},[...Bt,...Xt,...Lt]),an=g({},[...Pt,...R]),Zd=function(d){let W=se(d);(!W||!W.tagName)&&(W={namespaceURI:At,tagName:"template"});let F=I(d.tagName),E=I(W.tagName);return $e[d.namespaceURI]?d.namespaceURI===ue?W.namespaceURI===Ut?F==="svg":W.namespaceURI===pe?F==="svg"&&(E==="annotation-xml"||nn[E]):!!on[F]:d.namespaceURI===pe?W.namespaceURI===Ut?F==="math":W.namespaceURI===ue?F==="math"&&dn[E]:!!an[F]:d.namespaceURI===Ut?W.namespaceURI===ue&&!dn[E]||W.namespaceURI===pe&&!nn[E]?!1:!an[F]&&(bd[F]||!on[F]):!!(ne==="application/xhtml+xml"&&$e[d.namespaceURI]):!1},bt=function(d){s(T.removed,{element:d});try{se(d).removeChild(d)}catch(W){Li(d)}},Ne=function(d,W){try{s(T.removed,{attribute:W.getAttributeNode(d),from:W})}catch(F){s(T.removed,{attribute:null,from:W})}if(W.removeAttribute(d),d==="is"&&!f[d])if(Ot||Fe)try{bt(W)}catch(F){}else try{W.setAttribute(d,"")}catch(F){}},cn=function(d){let W=null,F=null;if(Pe)d="<remove></remove>"+d;else{let L=z(d,/^[\r\n\t ]+/);F=L&&L[0]}ne==="application/xhtml+xml"&&At===Ut&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");let E=et?et.createHTML(d):d;if(At===Ut)try{W=new fi().parseFromString(E,ne)}catch(L){}if(!W||!W.documentElement){W=Ae.createDocument(At,"template",null);try{W.documentElement.innerHTML=qe?te:E}catch(L){}}let $=W.body||W.documentElement;return d&&F&&$.insertBefore(M.createTextNode(F),$.childNodes[0]||null),At===Ut?$i.call(W,Qt?"html":"body")[0]:Qt?W.documentElement:$},Vn=function(d){return Ki.call(d.ownerDocument||d,d,qt.SHOW_ELEMENT|qt.SHOW_COMMENT|qt.SHOW_TEXT|qt.SHOW_PROCESSING_INSTRUCTION|qt.SHOW_CDATA_SECTION,null)},bn=function(d){return d instanceof ji&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof Di)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Zn=function(d){return typeof He=="function"&&d instanceof He},Gt=function(d,W,F){Vt[d]&&r(Vt[d],E=>{E.call(T,W,F,yt)})},rn=function(d){let W=null;if(Gt("beforeSanitizeElements",d,null),bn(d))return bt(d),!0;let F=v(d.nodeName);if(Gt("uponSanitizeElement",d,{tagName:F,allowedTags:j}),d.hasChildNodes()&&!Zn(d.firstElementChild)&&w(/<[/\w]/g,d.innerHTML)&&w(/<[/\w]/g,d.textContent)||d.nodeType===Kt.progressingInstruction||ve&&d.nodeType===Kt.comment&&w(/<[/\w]/g,d.data))return bt(d),!0;if(!j[F]||ee[F]){if(!ee[F]&&Wn(F)&&(H.tagNameCheck instanceof RegExp&&w(H.tagNameCheck,F)||H.tagNameCheck instanceof Function&&H.tagNameCheck(F)))return!1;if(_e&&!Ht[F]){let E=se(d)||d.parentNode,$=_i(d)||d.childNodes;if($&&E){let L=$.length;for(let dt=L-1;dt>=0;--dt){let Zt=vi($[dt],!0);Zt.__removalCount=(d.__removalCount||0)+1,E.insertBefore(Zt,Pi(d))}}}return bt(d),!0}return d instanceof yl&&!Zd(d)||(F==="noscript"||F==="noembed"||F==="noframes")&&w(/<\/no(script|embed|frames)/i,d.innerHTML)?(bt(d),!0):(St&&d.nodeType===Kt.text&&(W=d.textContent,r([ye,ze,De],E=>{W=A(W,E," ")}),d.textContent!==W&&(s(T.removed,{element:d.cloneNode()}),d.textContent=W)),Gt("afterSanitizeElements",d,null),!1)},Rn=function(d,W,F){if(_l&&(W==="id"||W==="name")&&(F in M||F in Vd))return!1;if(!(fe&&!je[W]&&w(ed,W))){if(!(vl&&w(ld,W))){if(!f[W]||je[W]){if(!(Wn(d)&&(H.tagNameCheck instanceof RegExp&&w(H.tagNameCheck,d)||H.tagNameCheck instanceof Function&&H.tagNameCheck(d))&&(H.attributeNameCheck instanceof RegExp&&w(H.attributeNameCheck,W)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(W))||W==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&w(H.tagNameCheck,F)||H.tagNameCheck instanceof Function&&H.tagNameCheck(F))))return!1}else if(!Ke[W]){if(!w(Dl,A(F,zl,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&d!=="script"&&rt(F,"data:")===0&&$l[d])){if(!(Ll&&!w(nd,A(F,zl,"")))){if(F)return!1}}}}}}return!0},Wn=function(d){return d!=="annotation-xml"&&z(d,id)},mn=function(d){Gt("beforeSanitizeAttributes",d,null);let{attributes:W}=d;if(!W)return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f},E=W.length;for(;E--;){let $=W[E],{name:L,namespaceURI:dt,value:Zt}=$,ie=v(L),lt=L==="value"?Zt:Tt(Zt);if(F.attrName=ie,F.attrValue=lt,F.keepAttr=!0,F.forceKeepAttr=void 0,Gt("uponSanitizeAttribute",d,F),lt=F.attrValue,ve&&w(/((--!?|])>)|<\/(style|title)/i,lt)){Ne(L,d);continue}if(F.forceKeepAttr||(Ne(L,d),!F.keepAttr))continue;if(!Pl&&w(/\/>/i,lt)){Ne(L,d);continue}St&&r([ye,ze,De],Gn=>{lt=A(lt,Gn," ")});let Un=v(d.nodeName);if(Rn(Un,ie,lt)){if(Kl&&(ie==="id"||ie==="name")&&(Ne(L,d),lt=dd+lt),et&&typeof Ge=="object"&&typeof Ge.getAttributeType=="function"&&!dt)switch(Ge.getAttributeType(Un,ie)){case"TrustedHTML":{lt=et.createHTML(lt);break}case"TrustedScriptURL":{lt=et.createScriptURL(lt);break}}try{dt?d.setAttributeNS(dt,L,lt):d.setAttribute(L,lt),bn(d)?bt(d):G(T.removed)}catch(Gn){}}}Gt("afterSanitizeAttributes",d,null)},rd=function p(d){let W=null,F=Vn(d);for(Gt("beforeSanitizeShadowDOM",d,null);W=F.nextNode();)Gt("uponSanitizeShadowNode",W,null),!rn(W)&&(W.content instanceof mt&&p(W.content),mn(W));Gt("afterSanitizeShadowDOM",d,null)};return T.sanitize=function(p){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,F=null,E=null,$=null;if(qe=!p,qe&&(p="<!-->"),typeof p!="string"&&!Zn(p))if(typeof p.toString=="function"){if(p=p.toString(),typeof p!="string")throw D("dirty is not a string, aborting")}else throw D("toString is not a function");if(!T.isSupported)return p;if(Le||tl(d),T.removed=[],typeof p=="string"&&(le=!1),le){if(p.nodeName){let Zt=v(p.nodeName);if(!j[Zt]||ee[Zt])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(p instanceof He)W=cn("<!---->"),F=W.ownerDocument.importNode(p,!0),F.nodeType===Kt.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?W=F:W.appendChild(F);else{if(!Ot&&!St&&!Qt&&p.indexOf("<")===-1)return et&&Te?et.createHTML(p):p;if(W=cn(p),!W)return Ot?null:Te?te:""}W&&Pe&&bt(W.firstChild);let L=Vn(le?p:W);for(;E=L.nextNode();)rn(E)||(E.content instanceof mt&&rd(E.content),mn(E));if(le)return p;if(Ot){if(Fe)for($=qi.call(W.ownerDocument);W.firstChild;)$.appendChild(W.firstChild);else $=W;return(f.shadowroot||f.shadowrootmode)&&($=td.call(B,$,!0)),$}let dt=Qt?W.outerHTML:W.innerHTML;return Qt&&j["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&w(wl,W.ownerDocument.doctype.name)&&(dt="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
`+dt),St&&r([ye,ze,De],Zt=>{dt=A(dt,Zt," ")}),et&&Te?et.createHTML(dt):dt},T.setConfig=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tl(p),Le=!0},T.clearConfig=function(){yt=null,Le=!1},T.isValidAttribute=function(p,d,W){yt||tl({});let F=v(p),E=v(d);return Rn(F,E,W)},T.addHook=function(p,d){typeof d=="function"&&(Vt[p]=Vt[p]||[],s(Vt[p],d))},T.removeHook=function(p){if(Vt[p])return G(Vt[p])},T.removeHooks=function(p){Vt[p]&&(Vt[p]=[])},T.removeAllHooks=function(){Vt={}},T}var zi=Al();return zi})});var ge=Y((dl,ol)=>{(function(e){"use strict";var t=function(){},l=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(b){return setTimeout(b,16)};function n(){var b=this;b.reads=[],b.writes=[],b.raf=l.bind(e),t("initialized",b)}n.prototype={constructor:n,runTasks:function(b){t("run tasks");for(var r;r=b.shift();)r()},measure:function(b,r){t("measure");var G=r?b.bind(r):b;return this.reads.push(G),i(this),G},mutate:function(b,r){t("mutate");var G=r?b.bind(r):b;return this.writes.push(G),i(this),G},clear:function(b){return t("clear",b),a(this.reads,b)||a(this.writes,b)},extend:function(b){if(t("extend",b),typeof b!="object")throw new Error("expected object");var r=Object.create(this);return c(r,b),r.fastdom=this,r.initialize&&r.initialize(),r},catch:null};function i(b){b.scheduled||(b.scheduled=!0,b.raf(o.bind(null,b)),t("flush scheduled"))}function o(b){t("flush");var r=b.writes,G=b.reads,s;try{t("flushing reads",G.length),b.runTasks(G),t("flushing writes",r.length),b.runTasks(r)}catch(I){s=I}if(b.scheduled=!1,(G.length||r.length)&&i(b),s)if(t("task errored",s.message),b.catch)b.catch(s);else throw s}function a(b,r){var G=b.indexOf(r);return!!~G&&!!b.splice(G,1)}function c(b,r){for(var G in r)r.hasOwnProperty(G)&&(b[G]=r[G])}var V=e.fastdom=e.fastdom||new n;typeof ol=="object"&&(ol.exports=V)})(typeof window!="undefined"?window:typeof dl!="undefined"?dl:globalThis)});var hn=Y((Mo,gn)=>{gn.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Nt=Y(Mt=>{var al,ud=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Mt.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Mt.getSymbolTotalCodewords=function(t){return ud[t]};Mt.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Mt.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');al=t};Mt.isKanjiModeEnabled=function(){return typeof al!="undefined"};Mt.toSJIS=function(t){return al(t)}});var he=Y(at=>{at.L={bit:1};at.M={bit:0};at.Q={bit:3};at.H={bit:2};function Nd(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return at.L;case"m":case"medium":return at.M;case"q":case"quartile":return at.Q;case"h":case"high":return at.H;default:throw new Error("Unknown EC Level: "+e)}}at.isValid=function(t){return t&&typeof t.bit!="undefined"&&t.bit>=0&&t.bit<4};at.from=function(t,l){if(at.isValid(t))return t;try{return Nd(t)}catch(n){return l}}});var Xn=Y((Eo,Bn)=>{function In(){this.buffer=[],this.length=0}In.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let l=0;l<t;l++)this.putBit((e>>>t-l-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Bn.exports=In});var Yn=Y((Co,Qn)=>{function de(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}de.prototype.set=function(e,t,l,n){let i=e*this.size+t;this.data[i]=l,n&&(this.reservedBit[i]=!0)};de.prototype.get=function(e,t){return this.data[e*this.size+t]};de.prototype.xor=function(e,t,l){this.data[e*this.size+t]^=l};de.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};Qn.exports=de});var Mn=Y(Ie=>{var gd=Nt().getSymbolSize;Ie.getRowColCoords=function(t){if(t===1)return[];let l=Math.floor(t/7)+2,n=gd(t),i=n===145?26:Math.ceil((n-13)/(2*l-2))*2,o=[n-7];for(let a=1;a<l-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()};Ie.getPositions=function(t){let l=[],n=Ie.getRowColCoords(t),i=n.length;for(let o=0;o<i;o++)for(let a=0;a<i;a++)o===0&&a===0||o===0&&a===i-1||o===i-1&&a===0||l.push([n[o],n[a]]);return l}});var En=Y(xn=>{var hd=Nt().getSymbolSize,Jn=7;xn.getPositions=function(t){let l=hd(t);return[[0,0],[l-Jn,0],[0,l-Jn]]}});var Cn=Y(C=>{C.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Jt={N1:3,N2:3,N3:40,N4:10};C.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};C.from=function(t){return C.isValid(t)?parseInt(t,10):void 0};C.getPenaltyN1=function(t){let l=t.size,n=0,i=0,o=0,a=null,c=null;for(let V=0;V<l;V++){i=o=0,a=c=null;for(let b=0;b<l;b++){let r=t.get(V,b);r===a?i++:(i>=5&&(n+=Jt.N1+(i-5)),a=r,i=1),r=t.get(b,V),r===c?o++:(o>=5&&(n+=Jt.N1+(o-5)),c=r,o=1)}i>=5&&(n+=Jt.N1+(i-5)),o>=5&&(n+=Jt.N1+(o-5))}return n};C.getPenaltyN2=function(t){let l=t.size,n=0;for(let i=0;i<l-1;i++)for(let o=0;o<l-1;o++){let a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);(a===4||a===0)&&n++}return n*Jt.N2};C.getPenaltyN3=function(t){let l=t.size,n=0,i=0,o=0;for(let a=0;a<l;a++){i=o=0;for(let c=0;c<l;c++)i=i<<1&2047|t.get(a,c),c>=10&&(i===1488||i===93)&&n++,o=o<<1&2047|t.get(c,a),c>=10&&(o===1488||o===93)&&n++}return n*Jt.N3};C.getPenaltyN4=function(t){let l=0,n=t.data.length;for(let o=0;o<n;o++)l+=t.data[o];return Math.abs(Math.ceil(l*100/n/5)-10)*Jt.N4};function Id(e,t,l){switch(e){case C.Patterns.PATTERN000:return(t+l)%2===0;case C.Patterns.PATTERN001:return t%2===0;case C.Patterns.PATTERN010:return l%3===0;case C.Patterns.PATTERN011:return(t+l)%3===0;case C.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(l/3))%2===0;case C.Patterns.PATTERN101:return t*l%2+t*l%3===0;case C.Patterns.PATTERN110:return(t*l%2+t*l%3)%2===0;case C.Patterns.PATTERN111:return(t*l%3+(t+l)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}C.applyMask=function(t,l){let n=l.size;for(let i=0;i<n;i++)for(let o=0;o<n;o++)l.isReserved(o,i)||l.xor(o,i,Id(t,o,i))};C.getBestMask=function(t,l){let n=Object.keys(C.Patterns).length,i=0,o=1/0;for(let a=0;a<n;a++){l(a),C.applyMask(a,t);let c=C.getPenaltyN1(t)+C.getPenaltyN2(t)+C.getPenaltyN3(t)+C.getPenaltyN4(t);C.applyMask(a,t),c<o&&(o=c,i=a)}return i}});var Vl=Y(cl=>{var gt=he(),Be=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Xe=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];cl.getBlocksCount=function(t,l){switch(l){case gt.L:return Be[(t-1)*4+0];case gt.M:return Be[(t-1)*4+1];case gt.Q:return Be[(t-1)*4+2];case gt.H:return Be[(t-1)*4+3];default:return}};cl.getTotalCodewordsCount=function(t,l){switch(l){case gt.L:return Xe[(t-1)*4+0];case gt.M:return Xe[(t-1)*4+1];case gt.Q:return Xe[(t-1)*4+2];case gt.H:return Xe[(t-1)*4+3];default:return}}});var kn=Y(Ye=>{var oe=new Uint8Array(512),Qe=new Uint8Array(256);(function(){let t=1;for(let l=0;l<255;l++)oe[l]=t,Qe[t]=l,t<<=1,t&256&&(t^=285);for(let l=255;l<512;l++)oe[l]=oe[l-255]})();Ye.log=function(t){if(t<1)throw new Error("log("+t+")");return Qe[t]};Ye.exp=function(t){return oe[t]};Ye.mul=function(t,l){return t===0||l===0?0:oe[Qe[t]+Qe[l]]}});var Sn=Y(ae=>{var bl=kn();ae.mul=function(t,l){let n=new Uint8Array(t.length+l.length-1);for(let i=0;i<t.length;i++)for(let o=0;o<l.length;o++)n[i+o]^=bl.mul(t[i],l[o]);return n};ae.mod=function(t,l){let n=new Uint8Array(t);for(;n.length-l.length>=0;){let i=n[0];for(let a=0;a<l.length;a++)n[a]^=bl.mul(l[a],i);let o=0;for(;o<n.length&&n[o]===0;)o++;n=n.slice(o)}return n};ae.generateECPolynomial=function(t){let l=new Uint8Array([1]);for(let n=0;n<t;n++)l=ae.mul(l,new Uint8Array([1,bl.exp(n)]));return l}});var Hn=Y((yo,wn)=>{var On=Sn();function Zl(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Zl.prototype.initialize=function(t){this.degree=t,this.genPoly=On.generateECPolynomial(this.degree)};Zl.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let l=new Uint8Array(t.length+this.degree);l.set(t);let n=On.mod(l,this.genPoly),i=this.degree-n.length;if(i>0){let o=new Uint8Array(this.degree);return o.set(n,i),o}return n};wn.exports=Zl});var rl=Y(An=>{An.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var Rl=Y(st=>{var yn="[0-9]+",Bd="[A-Z $%*+\\-./:]+",ce="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ce=ce.replace(/u/g,"\\u");var Xd="(?:(?![A-Z0-9 $%*+\\-./:]|"+ce+`)(?:.|[\r
]))+`;st.KANJI=new RegExp(ce,"g");st.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");st.BYTE=new RegExp(Xd,"g");st.NUMERIC=new RegExp(yn,"g");st.ALPHANUMERIC=new RegExp(Bd,"g");var Qd=new RegExp("^"+ce+"$"),Yd=new RegExp("^"+yn+"$"),Md=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");st.testKanji=function(t){return Qd.test(t)};st.testNumeric=function(t){return Yd.test(t)};st.testAlphanumeric=function(t){return Md.test(t)}});var ht=Y(y=>{var Jd=rl(),Wl=Rl();y.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};y.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};y.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};y.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};y.MIXED={bit:-1};y.getCharCountIndicator=function(t,l){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!Jd.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?t.ccBits[0]:l<27?t.ccBits[1]:t.ccBits[2]};y.getBestModeForData=function(t){return Wl.testNumeric(t)?y.NUMERIC:Wl.testAlphanumeric(t)?y.ALPHANUMERIC:Wl.testKanji(t)?y.KANJI:y.BYTE};y.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};y.isValid=function(t){return t&&t.bit&&t.ccBits};function xd(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return y.NUMERIC;case"alphanumeric":return y.ALPHANUMERIC;case"kanji":return y.KANJI;case"byte":return y.BYTE;default:throw new Error("Unknown mode: "+e)}}y.from=function(t,l){if(y.isValid(t))return t;try{return xd(t)}catch(n){return l}}});var vn=Y(xt=>{var Me=Nt(),Ed=Vl(),zn=he(),It=ht(),ml=rl(),jn=7973,Dn=Me.getBCHDigit(jn);function Cd(e,t,l){for(let n=1;n<=40;n++)if(t<=xt.getCapacity(n,l,e))return n}function fn(e,t){return It.getCharCountIndicator(e,t)+4}function kd(e,t){let l=0;return e.forEach(function(n){let i=fn(n.mode,t);l+=i+n.getBitsLength()}),l}function Sd(e,t){for(let l=1;l<=40;l++)if(kd(e,l)<=xt.getCapacity(l,t,It.MIXED))return l}xt.from=function(t,l){return ml.isValid(t)?parseInt(t,10):l};xt.getCapacity=function(t,l,n){if(!ml.isValid(t))throw new Error("Invalid QR Code version");typeof n=="undefined"&&(n=It.BYTE);let i=Me.getSymbolTotalCodewords(t),o=Ed.getTotalCodewordsCount(t,l),a=(i-o)*8;if(n===It.MIXED)return a;let c=a-fn(n,t);switch(n){case It.NUMERIC:return Math.floor(c/10*3);case It.ALPHANUMERIC:return Math.floor(c/11*2);case It.KANJI:return Math.floor(c/13);case It.BYTE:default:return Math.floor(c/8)}};xt.getBestVersionForData=function(t,l){let n,i=zn.from(l,zn.M);if(Array.isArray(t)){if(t.length>1)return Sd(t,i);if(t.length===0)return 1;n=t[0]}else n=t;return Cd(n.mode,n.getLength(),i)};xt.getEncodedBits=function(t){if(!ml.isValid(t)||t<7)throw new Error("Invalid QR Code version");let l=t<<12;for(;Me.getBCHDigit(l)-Dn>=0;)l^=jn<<Me.getBCHDigit(l)-Dn;return t<<12|l}});var Kn=Y(_n=>{var Ul=Nt(),Pn=1335,Od=21522,Ln=Ul.getBCHDigit(Pn);_n.getEncodedBits=function(t,l){let n=t.bit<<3|l,i=n<<10;for(;Ul.getBCHDigit(i)-Ln>=0;)i^=Pn<<Ul.getBCHDigit(i)-Ln;return(n<<10|i)^Od}});var $n=Y((Lo,qn)=>{var wd=ht();function zt(e){this.mode=wd.NUMERIC,this.data=e.toString()}zt.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};zt.prototype.getLength=function(){return this.data.length};zt.prototype.getBitsLength=function(){return zt.getBitsLength(this.data.length)};zt.prototype.write=function(t){let l,n,i;for(l=0;l+3<=this.data.length;l+=3)n=this.data.substr(l,3),i=parseInt(n,10),t.put(i,10);let o=this.data.length-l;o>0&&(n=this.data.substr(l),i=parseInt(n,10),t.put(i,o*3+1))};qn.exports=zt});var ei=Y((Po,ti)=>{var Hd=ht(),Gl=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Dt(e){this.mode=Hd.ALPHANUMERIC,this.data=e}Dt.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Dt.prototype.getLength=function(){return this.data.length};Dt.prototype.getBitsLength=function(){return Dt.getBitsLength(this.data.length)};Dt.prototype.write=function(t){let l;for(l=0;l+2<=this.data.length;l+=2){let n=Gl.indexOf(this.data[l])*45;n+=Gl.indexOf(this.data[l+1]),t.put(n,11)}this.data.length%2&&t.put(Gl.indexOf(this.data[l]),6)};ti.exports=Dt});var ni=Y((_o,li)=>{var Ad=ht();function jt(e){this.mode=Ad.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}jt.getBitsLength=function(t){return t*8};jt.prototype.getLength=function(){return this.data.length};jt.prototype.getBitsLength=function(){return jt.getBitsLength(this.data.length)};jt.prototype.write=function(e){for(let t=0,l=this.data.length;t<l;t++)e.put(this.data[t],8)};li.exports=jt});var di=Y((Ko,ii)=>{var yd=ht(),zd=Nt();function ft(e){this.mode=yd.KANJI,this.data=e}ft.getBitsLength=function(t){return t*13};ft.prototype.getLength=function(){return this.data.length};ft.prototype.getBitsLength=function(){return ft.getBitsLength(this.data.length)};ft.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let l=zd.toSJIS(this.data[t]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),e.put(l,13)}};ii.exports=ft});var oi=Y((qo,sl)=>{"use strict";var Ve={single_source_shortest_paths:function(e,t,l){var n={},i={};i[t]=0;var o=Ve.PriorityQueue.make();o.push(t,0);for(var a,c,V,b,r,G,s,I,O;!o.empty();){a=o.pop(),c=a.value,b=a.cost,r=e[c]||{};for(V in r)r.hasOwnProperty(V)&&(G=r[V],s=b+G,I=i[V],O=typeof i[V]=="undefined",(O||I>s)&&(i[V]=s,o.push(V,s),n[V]=c))}if(typeof l!="undefined"&&typeof i[l]=="undefined"){var z=["Could not find a path from ",t," to ",l,"."].join("");throw new Error(z)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var l=[],n=t,i;n;)l.push(n),i=e[n],n=e[n];return l.reverse(),l},find_path:function(e,t,l){var n=Ve.single_source_shortest_paths(e,t,l);return Ve.extract_shortest_path_from_predecessor_list(n,l)},PriorityQueue:{make:function(e){var t=Ve.PriorityQueue,l={},n;e=e||{};for(n in t)t.hasOwnProperty(n)&&(l[n]=t[n]);return l.queue=[],l.sorter=e.sorter||t.default_sorter,l},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var l={value:e,cost:t};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof sl!="undefined"&&(sl.exports=Ve)});var Wi=Y(vt=>{var J=ht(),Vi=$n(),bi=ei(),Zi=ni(),ri=di(),be=Rl(),Je=Nt(),Dd=oi();function ai(e){return unescape(encodeURIComponent(e)).length}function Ze(e,t,l){let n=[],i;for(;(i=e.exec(l))!==null;)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function Ri(e){let t=Ze(be.NUMERIC,J.NUMERIC,e),l=Ze(be.ALPHANUMERIC,J.ALPHANUMERIC,e),n,i;return Je.isKanjiModeEnabled()?(n=Ze(be.BYTE,J.BYTE,e),i=Ze(be.KANJI,J.KANJI,e)):(n=Ze(be.BYTE_KANJI,J.BYTE,e),i=[]),t.concat(l,n,i).sort(function(a,c){return a.index-c.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function Fl(e,t){switch(t){case J.NUMERIC:return Vi.getBitsLength(e);case J.ALPHANUMERIC:return bi.getBitsLength(e);case J.KANJI:return ri.getBitsLength(e);case J.BYTE:return Zi.getBitsLength(e)}}function jd(e){return e.reduce(function(t,l){let n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===l.mode?(t[t.length-1].data+=l.data,t):(t.push(l),t)},[])}function fd(e){let t=[];for(let l=0;l<e.length;l++){let n=e[l];switch(n.mode){case J.NUMERIC:t.push([n,{data:n.data,mode:J.ALPHANUMERIC,length:n.length},{data:n.data,mode:J.BYTE,length:n.length}]);break;case J.ALPHANUMERIC:t.push([n,{data:n.data,mode:J.BYTE,length:n.length}]);break;case J.KANJI:t.push([n,{data:n.data,mode:J.BYTE,length:ai(n.data)}]);break;case J.BYTE:t.push([{data:n.data,mode:J.BYTE,length:ai(n.data)}])}}return t}function vd(e,t){let l={},n={start:{}},i=["start"];for(let o=0;o<e.length;o++){let a=e[o],c=[];for(let V=0;V<a.length;V++){let b=a[V],r=""+o+V;c.push(r),l[r]={node:b,lastCount:0},n[r]={};for(let G=0;G<i.length;G++){let s=i[G];l[s]&&l[s].node.mode===b.mode?(n[s][r]=Fl(l[s].lastCount+b.length,b.mode)-Fl(l[s].lastCount,b.mode),l[s].lastCount+=b.length):(l[s]&&(l[s].lastCount=b.length),n[s][r]=Fl(b.length,b.mode)+4+J.getCharCountIndicator(b.mode,t))}}i=c}for(let o=0;o<i.length;o++)n[i[o]].end=0;return{map:n,table:l}}function ci(e,t){let l,n=J.getBestModeForData(e);if(l=J.from(t,n),l!==J.BYTE&&l.bit<n.bit)throw new Error('"'+e+'" cannot be encoded with mode '+J.toString(l)+`.
 Suggested mode is: `+J.toString(n));switch(l===J.KANJI&&!Je.isKanjiModeEnabled()&&(l=J.BYTE),l){case J.NUMERIC:return new Vi(e);case J.ALPHANUMERIC:return new bi(e);case J.KANJI:return new ri(e);case J.BYTE:return new Zi(e)}}vt.fromArray=function(t){return t.reduce(function(l,n){return typeof n=="string"?l.push(ci(n,null)):n.data&&l.push(ci(n.data,n.mode)),l},[])};vt.fromString=function(t,l){let n=Ri(t,Je.isKanjiModeEnabled()),i=fd(n),o=vd(i,l),a=Dd.find_path(o.map,"start","end"),c=[];for(let V=1;V<a.length-1;V++)c.push(o.table[a[V]].node);return vt.fromArray(jd(c))};vt.rawSplit=function(t){return vt.fromArray(Ri(t,Je.isKanjiModeEnabled()))}});var Ui=Y(mi=>{var Ee=Nt(),Tl=he(),Ld=Xn(),Pd=Yn(),_d=Mn(),Kd=En(),Nl=Cn(),gl=Vl(),qd=Hn(),xe=vn(),$d=Kn(),to=ht(),pl=Wi();function eo(e,t){let l=e.size,n=Kd.getPositions(t);for(let i=0;i<n.length;i++){let o=n[i][0],a=n[i][1];for(let c=-1;c<=7;c++)if(!(o+c<=-1||l<=o+c))for(let V=-1;V<=7;V++)a+V<=-1||l<=a+V||(c>=0&&c<=6&&(V===0||V===6)||V>=0&&V<=6&&(c===0||c===6)||c>=2&&c<=4&&V>=2&&V<=4?e.set(o+c,a+V,!0,!0):e.set(o+c,a+V,!1,!0))}}function lo(e){let t=e.size;for(let l=8;l<t-8;l++){let n=l%2===0;e.set(l,6,n,!0),e.set(6,l,n,!0)}}function no(e,t){let l=_d.getPositions(t);for(let n=0;n<l.length;n++){let i=l[n][0],o=l[n][1];for(let a=-2;a<=2;a++)for(let c=-2;c<=2;c++)a===-2||a===2||c===-2||c===2||a===0&&c===0?e.set(i+a,o+c,!0,!0):e.set(i+a,o+c,!1,!0)}}function io(e,t){let l=e.size,n=xe.getEncodedBits(t),i,o,a;for(let c=0;c<18;c++)i=Math.floor(c/3),o=c%3+l-8-3,a=(n>>c&1)===1,e.set(i,o,a,!0),e.set(o,i,a,!0)}function ul(e,t,l){let n=e.size,i=$d.getEncodedBits(t,l),o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function oo(e,t){let l=e.size,n=-1,i=l-1,o=7,a=0;for(let c=l-1;c>0;c-=2)for(c===6&&c--;;){for(let V=0;V<2;V++)if(!e.isReserved(i,c-V)){let b=!1;a<t.length&&(b=(t[a]>>>o&1)===1),e.set(i,c-V,b),o--,o===-1&&(a++,o=7)}if(i+=n,i<0||l<=i){i-=n,n=-n;break}}}function ao(e,t,l){let n=new Ld;l.forEach(function(V){n.put(V.mode.bit,4),n.put(V.getLength(),to.getCharCountIndicator(V.mode,e)),V.write(n)});let i=Ee.getSymbolTotalCodewords(e),o=gl.getTotalCodewordsCount(e,t),a=(i-o)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let c=(a-n.getLengthInBits())/8;for(let V=0;V<c;V++)n.put(V%2?17:236,8);return co(n,e,t)}function co(e,t,l){let n=Ee.getSymbolTotalCodewords(t),i=gl.getTotalCodewordsCount(t,l),o=n-i,a=gl.getBlocksCount(t,l),c=n%a,V=a-c,b=Math.floor(n/a),r=Math.floor(o/a),G=r+1,s=b-r,I=new qd(s),O=0,z=new Array(a),A=new Array(a),rt=0,Tt=new Uint8Array(e.buffer);for(let tt=0;tt<a;tt++){let g=tt<V?r:G;z[tt]=Tt.slice(O,O+g),A[tt]=I.encode(z[tt]),O+=g,rt=Math.max(rt,g)}let S=new Uint8Array(n),w=0,D,x;for(D=0;D<rt;D++)for(x=0;x<a;x++)D<z[x].length&&(S[w++]=z[x][D]);for(D=0;D<s;D++)for(x=0;x<a;x++)S[w++]=A[x][D];return S}function Vo(e,t,l,n){let i;if(Array.isArray(e))i=pl.fromArray(e);else if(typeof e=="string"){let b=t;if(!b){let r=pl.rawSplit(e);b=xe.getBestVersionForData(r,l)}i=pl.fromString(e,b||40)}else throw new Error("Invalid data");let o=xe.getBestVersionForData(i,l);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+o+`.
`);let a=ao(t,l,i),c=Ee.getSymbolSize(t),V=new Pd(c);return eo(V,t),lo(V),no(V,t),ul(V,l,0),t>=7&&io(V,t),oo(V,a),isNaN(n)&&(n=Nl.getBestMask(V,ul.bind(null,V,l))),Nl.applyMask(n,V),ul(V,l,n),{modules:V,version:t,errorCorrectionLevel:l,maskPattern:n,segments:i}}mi.create=function(t,l){if(typeof t=="undefined"||t==="")throw new Error("No input text");let n=Tl.M,i,o;return typeof l!="undefined"&&(n=Tl.from(l.errorCorrectionLevel,Tl.M),i=xe.from(l.version),o=Nl.from(l.maskPattern),l.toSJISFunc&&Ee.setToSJISFunction(l.toSJISFunc)),Vo(t,i,n,o)}});var hl=Y(Et=>{function Gi(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(n){return[n,n]}))),t.length===6&&t.push("F","F");let l=parseInt(t.join(""),16);return{r:l>>24&255,g:l>>16&255,b:l>>8&255,a:l&255,hex:"#"+t.slice(0,6).join("")}}Et.getOptions=function(t){t||(t={}),t.color||(t.color={});let l=typeof t.margin=="undefined"||t.margin===null||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:n,scale:n?4:i,margin:l,color:{dark:Gi(t.color.dark||"#000000ff"),light:Gi(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};Et.getScale=function(t,l){return l.width&&l.width>=t+l.margin*2?l.width/(t+l.margin*2):l.scale};Et.getImageWidth=function(t,l){let n=Et.getScale(t,l);return Math.floor((t+l.margin*2)*n)};Et.qrToImageData=function(t,l,n){let i=l.modules.size,o=l.modules.data,a=Et.getScale(i,n),c=Math.floor((i+n.margin*2)*a),V=n.margin*a,b=[n.color.light,n.color.dark];for(let r=0;r<c;r++)for(let G=0;G<c;G++){let s=(r*c+G)*4,I=n.color.light;if(r>=V&&G>=V&&r<c-V&&G<c-V){let O=Math.floor((r-V)/a),z=Math.floor((G-V)/a);I=b[o[O*i+z]?1:0]}t[s++]=I.r,t[s++]=I.g,t[s++]=I.b,t[s]=I.a}}});var si=Y(Ce=>{var Il=hl();function bo(e,t,l){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=l,t.width=l,t.style.height=l+"px",t.style.width=l+"px"}function Zo(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}Ce.render=function(t,l,n){let i=n,o=l;typeof i=="undefined"&&(!l||!l.getContext)&&(i=l,l=void 0),l||(o=Zo()),i=Il.getOptions(i);let a=Il.getImageWidth(t.modules.size,i),c=o.getContext("2d"),V=c.createImageData(a,a);return Il.qrToImageData(V.data,t,i),bo(c,o,a),c.putImageData(V,0,0),o};Ce.renderToDataURL=function(t,l,n){let i=n;typeof i=="undefined"&&(!l||!l.getContext)&&(i=l,l=void 0),i||(i={});let o=Ce.render(t,l,i),a=i.type||"image/png",c=i.rendererOpts||{};return o.toDataURL(a,c.quality)}});var pi=Y(Ti=>{var ro=hl();function Fi(e,t){let l=e.a/255,n=t+'="'+e.hex+'"';return l<1?n+" "+t+'-opacity="'+l.toFixed(2).slice(1)+'"':n}function Bl(e,t,l){let n=e+t;return typeof l!="undefined"&&(n+=" "+l),n}function Ro(e,t,l){let n="",i=0,o=!1,a=0;for(let c=0;c<e.length;c++){let V=Math.floor(c%t),b=Math.floor(c/t);!V&&!o&&(o=!0),e[c]?(a++,c>0&&V>0&&e[c-1]||(n+=o?Bl("M",V+l,.5+b+l):Bl("m",i,0),i=0,o=!1),V+1<t&&e[c+1]||(n+=Bl("h",a),a=0)):i++}return n}Ti.render=function(t,l,n){let i=ro.getOptions(l),o=t.modules.size,a=t.modules.data,c=o+i.margin*2,V=i.color.light.a?"<path "+Fi(i.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",b="<path "+Fi(i.color.dark,"stroke")+' d="'+Ro(a,o,i.margin)+'"/>',r='viewBox="0 0 '+c+" "+c+'"',s='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+r+' shape-rendering="crispEdges">'+V+b+`</svg>
`;return typeof n=="function"&&n(null,s),s}});var Ni=Y(re=>{var Wo=hn(),Xl=Ui(),ui=si(),mo=pi();function Ql(e,t,l,n,i){let o=[].slice.call(arguments,1),a=o.length,c=typeof o[a-1]=="function";if(!c&&!Wo())throw new Error("Callback required as last argument");if(c){if(a<2)throw new Error("Too few arguments provided");a===2?(i=l,l=t,t=n=void 0):a===3&&(t.getContext&&typeof i=="undefined"?(i=n,n=void 0):(i=n,n=l,l=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(l=t,t=n=void 0):a===2&&!t.getContext&&(n=l,l=t,t=void 0),new Promise(function(V,b){try{let r=Xl.create(l,n);V(e(r,t,n))}catch(r){b(r)}})}try{let V=Xl.create(l,n);i(null,e(V,t,n))}catch(V){i(V)}}re.create=Xl.create;re.toCanvas=Ql.bind(null,ui.render);re.toDataURL=Ql.bind(null,ui.renderToDataURL);re.toString=Ql.bind(null,function(e,t,l){return mo.render(e,l)})});var gi=Y((da,Ml)=>{var Yl=function(e){"use strict";var t=Object.prototype,l=t.hasOwnProperty,n=Object.defineProperty||function(R,Z,m){R[Z]=m.value},i,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",V=o.toStringTag||"@@toStringTag";function b(R,Z,m){return Object.defineProperty(R,Z,{value:m,enumerable:!0,configurable:!0,writable:!0}),R[Z]}try{b({},"")}catch(R){b=function(Z,m,h){return Z[m]=h}}function r(R,Z,m,h){var u=Z&&Z.prototype instanceof rt?Z:rt,Q=Object.create(u.prototype),P=new Xt(h||[]);return n(Q,"_invoke",{value:Rt(R,m,P)}),Q}e.wrap=r;function G(R,Z,m){try{return{type:"normal",arg:R.call(Z,m)}}catch(h){return{type:"throw",arg:h}}}var s="suspendedStart",I="suspendedYield",O="executing",z="completed",A={};function rt(){}function Tt(){}function S(){}var w={};b(w,a,function(){return this});var D=Object.getPrototypeOf,x=D&&D(D(Lt([])));x&&x!==t&&l.call(x,a)&&(w=x);var tt=S.prototype=rt.prototype=Object.create(w);Tt.prototype=S,n(tt,"constructor",{value:S,configurable:!0}),n(S,"constructor",{value:Tt,configurable:!0}),Tt.displayName=b(S,V,"GeneratorFunction");function g(R){["next","throw","return"].forEach(function(Z){b(R,Z,function(m){return this._invoke(Z,m)})})}e.isGeneratorFunction=function(R){var Z=typeof R=="function"&&R.constructor;return Z?Z===Tt||(Z.displayName||Z.name)==="GeneratorFunction":!1},e.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,S):(R.__proto__=S,b(R,V,"GeneratorFunction")),R.prototype=Object.create(tt),R},e.awrap=function(R){return{__await:R}};function Ct(R,Z){function m(Q,P,_,it){var K=G(R[Q],R,P);if(K.type==="throw")it(K.arg);else{var _t=K.arg,ut=_t.value;return ut&&typeof ut=="object"&&l.call(ut,"__await")?Z.resolve(ut.__await).then(function(Wt){m("next",Wt,_,it)},function(Wt){m("throw",Wt,_,it)}):Z.resolve(ut).then(function(Wt){_t.value=Wt,_(_t)},function(Wt){return m("throw",Wt,_,it)})}}var h;function u(Q,P){function _(){return new Z(function(it,K){m(Q,P,it,K)})}return h=h?h.then(_,_):_()}n(this,"_invoke",{value:u})}g(Ct.prototype),b(Ct.prototype,c,function(){return this}),e.AsyncIterator=Ct,e.async=function(R,Z,m,h,u){u===void 0&&(u=Promise);var Q=new Ct(r(R,Z,m,h),u);return e.isGeneratorFunction(Z)?Q:Q.next().then(function(P){return P.done?P.value:Q.next()})};function Rt(R,Z,m){var h=s;return function(Q,P){if(h===O)throw new Error("Generator is already running");if(h===z){if(Q==="throw")throw P;return Pt()}for(m.method=Q,m.arg=P;;){var _=m.delegate;if(_){var it=pt(_,m);if(it){if(it===A)continue;return it}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(h===s)throw h=z,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);h=O;var K=G(R,Z,m);if(K.type==="normal"){if(h=m.done?z:I,K.arg===A)continue;return{value:K.arg,done:m.done}}else K.type==="throw"&&(h=z,m.method="throw",m.arg=K.arg)}}}function pt(R,Z){var m=Z.method,h=R.iterator[m];if(h===i)return Z.delegate=null,m==="throw"&&R.iterator.return&&(Z.method="return",Z.arg=i,pt(R,Z),Z.method==="throw")||m!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+m+"' method")),A;var u=G(h,R.iterator,Z.arg);if(u.type==="throw")return Z.method="throw",Z.arg=u.arg,Z.delegate=null,A;var Q=u.arg;if(!Q)return Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,A;if(Q.done)Z[R.resultName]=Q.value,Z.next=R.nextLoc,Z.method!=="return"&&(Z.method="next",Z.arg=i);else return Q;return Z.delegate=null,A}g(tt),b(tt,V,"Generator"),b(tt,a,function(){return this}),b(tt,"toString",function(){return"[object Generator]"});function Ue(R){var Z={tryLoc:R[0]};1 in R&&(Z.catchLoc=R[1]),2 in R&&(Z.finallyLoc=R[2],Z.afterLoc=R[3]),this.tryEntries.push(Z)}function Bt(R){var Z=R.completion||{};Z.type="normal",delete Z.arg,R.completion=Z}function Xt(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(Ue,this),this.reset(!0)}e.keys=function(R){var Z=Object(R),m=[];for(var h in Z)m.push(h);return m.reverse(),function u(){for(;m.length;){var Q=m.pop();if(Q in Z)return u.value=Q,u.done=!1,u}return u.done=!0,u}};function Lt(R){if(R!=null){var Z=R[a];if(Z)return Z.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var m=-1,h=function u(){for(;++m<R.length;)if(l.call(R,m))return u.value=R[m],u.done=!1,u;return u.value=i,u.done=!0,u};return h.next=h}}throw new TypeError(typeof R+" is not iterable")}e.values=Lt;function Pt(){return{value:i,done:!0}}return Xt.prototype={constructor:Xt,reset:function(R){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Bt),!R)for(var Z in this)Z.charAt(0)==="t"&&l.call(this,Z)&&!isNaN(+Z.slice(1))&&(this[Z]=i)},stop:function(){this.done=!0;var R=this.tryEntries[0],Z=R.completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(R){if(this.done)throw R;var Z=this;function m(it,K){return Q.type="throw",Q.arg=R,Z.next=it,K&&(Z.method="next",Z.arg=i),!!K}for(var h=this.tryEntries.length-1;h>=0;--h){var u=this.tryEntries[h],Q=u.completion;if(u.tryLoc==="root")return m("end");if(u.tryLoc<=this.prev){var P=l.call(u,"catchLoc"),_=l.call(u,"finallyLoc");if(P&&_){if(this.prev<u.catchLoc)return m(u.catchLoc,!0);if(this.prev<u.finallyLoc)return m(u.finallyLoc)}else if(P){if(this.prev<u.catchLoc)return m(u.catchLoc,!0)}else if(_){if(this.prev<u.finallyLoc)return m(u.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(R,Z){for(var m=this.tryEntries.length-1;m>=0;--m){var h=this.tryEntries[m];if(h.tryLoc<=this.prev&&l.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var u=h;break}}u&&(R==="break"||R==="continue")&&u.tryLoc<=Z&&Z<=u.finallyLoc&&(u=null);var Q=u?u.completion:{};return Q.type=R,Q.arg=Z,u?(this.method="next",this.next=u.finallyLoc,A):this.complete(Q)},complete:function(R,Z){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&Z&&(this.next=Z),A},finish:function(R){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var m=this.tryEntries[Z];if(m.finallyLoc===R)return this.complete(m.completion,m.afterLoc),Bt(m),A}},catch:function(R){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var m=this.tryEntries[Z];if(m.tryLoc===R){var h=m.completion;if(h.type==="throw"){var u=h.arg;Bt(m)}return u}}throw new Error("illegal catch attempt")},delegateYield:function(R,Z,m){return this.delegate={iterator:Lt(R),resultName:Z,nextLoc:m},this.method==="next"&&(this.arg=i),A}},e}(typeof Ml=="object"?Ml.exports:{});try{regeneratorRuntime=Yl}catch(e){typeof globalThis=="object"?globalThis.regeneratorRuntime=Yl:Function("r","regeneratorRuntime = r")(Yl)}});var hi=Y((oa,ke)=>{(function(){"use strict";var e=function(){function t(){}t.prototype=Object.create(null);function l(r,G){for(var s=G.length,I=0;I<s;++I)V(r,G[I])}var n={}.hasOwnProperty;function i(r,G){r[G]=!0}function o(r,G){if(G.toString!==Object.prototype.toString&&!G.toString.toString().includes("[native code]")){r[G.toString()]=!0;return}for(var s in G)n.call(G,s)&&(r[s]=!!G[s])}var a=/\s+/;function c(r,G){for(var s=G.split(a),I=s.length,O=0;O<I;++O)r[s[O]]=!0}function V(r,G){if(G){var s=typeof G;s==="string"?c(r,G):Array.isArray(G)?l(r,G):s==="object"?o(r,G):s==="number"&&i(r,G)}}function b(){for(var r=arguments.length,G=Array(r),s=0;s<r;s++)G[s]=arguments[s];var I=new t;l(I,G);var O=[];for(var z in I)I[z]&&O.push(z);return O.join(" ")}return b}();typeof ke!="undefined"&&ke.exports?(e.default=e,ke.exports=e):window.classNames=e})()});var Bi=Y((Ii,Se)=>{(function(e){var t={browser:[[/msie ([\.\_\d]+)/,"ie"],[/trident\/.*?rv:([\.\_\d]+)/,"ie"],[/firefox\/([\.\_\d]+)/,"firefox"],[/chrome\/([\.\_\d]+)/,"chrome"],[/version\/([\.\_\d]+).*?safari/,"safari"],[/mobile safari ([\.\_\d]+)/,"safari"],[/android.*?version\/([\.\_\d]+).*?safari/,"com.android.browser"],[/crios\/([\.\_\d]+).*?safari/,"chrome"],[/opera/,"opera"],[/opera\/([\.\_\d]+)/,"opera"],[/opera ([\.\_\d]+)/,"opera"],[/opera mini.*?version\/([\.\_\d]+)/,"opera.mini"],[/opios\/([a-z\.\_\d]+)/,"opera"],[/blackberry/,"blackberry"],[/blackberry.*?version\/([\.\_\d]+)/,"blackberry"],[/bb\d+.*?version\/([\.\_\d]+)/,"blackberry"],[/rim.*?version\/([\.\_\d]+)/,"blackberry"],[/iceweasel\/([\.\_\d]+)/,"iceweasel"],[/edge\/([\.\d]+)/,"edge"]],os:[[/linux ()([a-z\.\_\d]+)/,"linux"],[/mac os x/,"macos"],[/mac os x.*?([\.\_\d]+)/,"macos"],[/os ([\.\_\d]+) like mac os/,"ios"],[/openbsd ()([a-z\.\_\d]+)/,"openbsd"],[/android/,"android"],[/android ([a-z\.\_\d]+);/,"android"],[/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/,"firefoxos"],[/windows\s*(?:nt)?\s*([\.\_\d]+)/,"windows"],[/windows phone.*?([\.\_\d]+)/,"windows.phone"],[/windows mobile/,"windows.mobile"],[/blackberry/,"blackberryos"],[/bb\d+/,"blackberryos"],[/rim.*?os\s*([\.\_\d]+)/,"blackberryos"]],device:[[/ipad/,"ipad"],[/iphone/,"iphone"],[/lumia/,"lumia"],[/htc/,"htc"],[/nexus/,"nexus"],[/galaxy nexus/,"galaxy.nexus"],[/nokia/,"nokia"],[/ gt\-/,"galaxy"],[/ sm\-/,"galaxy"],[/xbox/,"xbox"],[/(?:bb\d+)|(?:blackberry)|(?: rim )/,"blackberry"]]},l="Unknown",n=Object.keys(t);function i(){var c=this;n.forEach(function(V){c[V]={name:l,version:[],versionString:l}})}function o(c,V,b){t[V].forEach(function(r){var G=r[0],s=r[1],I=b.match(G);I&&(c[V].name=s,I[2]?(c[V].versionString=I[2],c[V].version=[]):I[1]?(c[V].versionString=I[1].replace(/_/g,"."),c[V].version=a(I[1])):(c[V].versionString=l,c[V].version=[]))})}function a(c){return c.split(/[\._]/).map(function(V){return parseInt(V)})}i.prototype.sniff=function(c){var V=this,b=typeof window!="undefined",r=b?navigator.userAgent:"",G=(c||r).toLowerCase();return n.forEach(function(s){o(V,s,G)}),this},typeof Se!="undefined"&&Se.exports?Se.exports=i:(e.Sniffr=new i,e.Sniffr.sniff(navigator.userAgent))})(Ii)});function ot(e,t=null){let n=pd(t).querySelectorAll(e);return Array.from(n)}function k(e,t=null){let l=ot(e,t);return l.length===0?!1:l[0]}function pd(e){return e||(window.__shadowRoot?window.__shadowRoot.querySelector("article"):document)}var nt={footer:k("#StandardFooter"),topLink:k("[id$='-footerTopLink']"),logo:k("#FooterLogo"),logoLink:k("[id$='-footer_shorthand_link']"),lower:document.createElement("div"),lowerInner:document.createElement("div")};function ll(){nt.footer.classList.add("Prime3"),nt.logo.setAttribute("src",nt.logo.getAttribute("src").replace("black","white")),nt.topLink.classList.add("Prime3"),nt.logoLink.classList.add("Prime3"),nt.lower.id="prime3FooterLower",nt.lower.className="prime3FooterLower",nt.lowerInner.id="prime3FooterLowerInner",nt.lowerInner.className="prime3FooterLowerInner";let t=["<div>Join the world's leading storytelling teams at Shorthand.</div>","<div><a href="+nt.logoLink.getAttribute("href")+"><u>TRY IT FOR <strong>FREE</strong></u></a></div>","<div>No code, no credit card, & no commitment required.</div>"];nt.lowerInner.innerHTML="<div class='Layout prime3-items'>"+t.map(l=>l).join("")+"</div>",nt.footer.after(nt.lower),nt.lower.innerHTML=nt.lowerInner.outerHTML}var Ci=Yt(Nn()),we=Yt(ge()),ki=Yt(Ni()),Ra=Yt(gi());var Uo=Yt(hi());var Go=Bi(),Xi=["android","ios","firefoxos","windows.phone","windows.mobile","blackberryos"];var Jl=null;function xl(){if(Jl===null){let e=new Go;e.sniff(navigator.userAgent),Jl={isMobile:Xi.includes(e.os.name),isDesktop:!Xi.includes(e.os.name),isTablet:!1,isiPhone:e.device.name==="iphone",isiPad:e.device.name==="ipad",isAndroid:e.os.name==="android",isiOS:e.os.name==="ios",isiOS10:e.os.name==="ios"&&e.os.version[0]===10,isMac:e.os.name==="macos",isWindows:e.os.name==="windows",isIE:e.browser.name==="ie",isEdge:e.browser.name==="edge",isChrome:e.browser.name==="chrome",isSafari:e.browser.name==="safari",isFirefox:e.browser.name==="firefox",isOpera:e.browser.name==="opera",isBot:/bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent),isCypress:window.Cypress}}return Jl}var El=Yt(ge());function N(e,t){(Array.isArray(e)?e:[e]).forEach(n=>{El.default.mutate(()=>{n.setAttribute("style","display: "+t)})})}function Ft(e){(Array.isArray(e)?e:[e]).forEach(l=>{El.default.mutate(()=>{l.parentNode.removeChild(l)})})}var Qi=Yt(ge());function Oe(e,t){let l=e.clientHeight;e.style.transition="all 0.5s ease-in-out",Qi.default.mutate(()=>{t==="out"?(e.style.bottom=`-${l}px`,e.style.opacity="0",e.style.zIndex="-1"):(e.style.zIndex="9999",e.style.bottom="0px",e.style.opacity="1")})}function Sl(){let e=ot("[id$='-footer_shorthand_link']");if(e&&To(e),U.footer&&kl){Ft(U.closeButton),Ft(U.footerContents),Ft(U.footerTitles),Ft(U.interactivePanels),Ft(U.mobileHeaders),Ft(U.mobileTitle),Ft(U.openButton),Ft(U.openMessage),N(U.upper,"block"),U.openMessageContainer.classList.add("PreviewFooter--center-horizontal"),N(U.upperInner,"flex"),U.footer.style.position="static";return}U.footer&&!kl&&(U.mobileTitle.forEach((t,l)=>{uo(U.mobileTitle[l],U.footerContents[l],U.footerClose[l])}),Yi(U.openButton),Yi(U.closeButton),Io(),No(),me(),po(),window.addEventListener("scroll",Si,{passive:!0}))}var Cl=xl().isMobile,{isIE:so,isEdge:Fo}=xl(),kl=so||Fo,ct=!1,We=Math.max(document.body.offsetWidth,window.innerWidth),Re=We<=926||Cl,U={closeButton:ot(".PreviewFooter--close-button"),footer:k(".PreviewFooter"),footerClose:ot(".PreviewFooter--mobile-close"),footerContents:ot("[data-PreviewFooter--item]"),footerOuter:k(".PreviewFooter--outer"),footerTitles:ot(".PreviewFooter--col-title"),interactivePanels:k(".PreviewFooter--interactive-panels"),mailtoLink:k(".PreviewFooter--mailto"),mobileHeaders:ot(".PreviewFooter--mobile-header"),mobileTitle:ot(".PreviewFooter--col-title-mobile"),openButton:k(".PreviewFooter--open-button"),openMessage:k(".PreviewFooter--message"),openMessageContainer:k(".PreviewFooter--message-container"),upper:k(".PreviewFooter--upper"),upperInner:k(".PreviewFooter--upper-inner")};function To(e){return(Array.isArray(e)?e:[e]).forEach(l=>{l.setAttribute("href",l.getAttribute("href").replace("__host__",window.location.hostname))})}function po(){let e=Cl?"orientationchange":"resize";window.addEventListener(e,()=>{we.default.measure(()=>{We=Math.max(document.body.offsetWidth,window.innerWidth),Re=We<=926||Cl,ct=!1,me()})},{passive:!0})}function Si(){let e=window.scrollY,t=document.body.offsetHeight,l=window.innerHeight,n=e/(t-l),i=Math.round(n*100);if(kl||window.Cypress){Oe(U.footer,"in"),removeEventListener("scroll",Si);return}!ct&&i<80&&Oe(U.footer,"out"),!ct&&i>=80&&Oe(U.footer,"in")}function Yi(e){let t=()=>{ct=!ct,me()};(Array.isArray(e)?e:[e]).forEach(n=>{n.addEventListener("click",()=>{t()},{passive:!0})})}var uo=(e,t,l)=>{e.addEventListener("click",()=>{ct=!0,me(t)},{passive:!0}),l.addEventListener("click",()=>{ct=!1,me(t)},{passive:!0})};function Mi(){U.footer.style.position="relative",we.default.measure(()=>{let e=document.body.offsetHeight;we.default.mutate(()=>{window.scrollTo({top:e,behavior:"smooth"})})})}function me(e=U.footerContents[0]){switch(!0){case(ct&&!Re):N(U.openButton,"none"),N(U.mobileTitle,"none"),N(U.mobileHeaders,"none"),We>926&&We<1100&&N(U.openMessageContainer,"none"),N(U.footerContents,"block"),N(U.openMessage,"block"),N(U.closeButton,"block"),N(U.footerTitles,"block"),N(U.upperInner,"flex"),N(U.interactivePanels,"flex"),U.openMessageContainer.classList.remove("PreviewFooter--center-horizontal"),U.upper.style.padding="1em 0",Mi();break;case(!ct&&!Re):N(U.mobileTitle,"none"),N(U.mobileHeaders,"none"),N(U.closeButton,"none"),N(U.openMessage,"none"),N(U.footerContents,"none"),N(U.interactivePanels,"none"),N(U.openMessageContainer,"block"),N(U.openButton,"flex"),N(U.upper,"block"),N(U.upperInner,"flex"),U.openMessageContainer.classList.add("PreviewFooter--center-horizontal"),U.footer.style.position="sticky",U.upper.style.padding="0.5em 0";break;case(ct&&Re):N(U.mobileTitle,"none"),N(U.closeButton,"none"),N(U.footerTitles,"none"),N(U.upperInner,"none"),N(U.footerContents,"none"),N(e,"block"),N(U.mobileHeaders,"flex"),N(U.interactivePanels,"flex"),U.upper.style.padding="1em 0",Mi();break;case(!ct&&Re):N(U.openMessage,"none"),N(U.openButton,"none"),N(U.closeButton,"none"),N(U.footerContents,"none"),N(U.interactivePanels,"none"),N(U.upper,"block"),N(U.upperInner,"flex"),N(U.mobileTitle,"flex"),N(U.mobileHeaders,"flex"),N(U.openMessageContainer,"block"),U.footer.style.position="sticky",U.upper.style.padding="0.5em 0",U.openMessageContainer.classList.add("PreviewFooter--center-horizontal");break}}function No(){let e=k("#PreviewFooter--form");if(!e)return;let t=k("#PreviewFooter--feedbackButton");e.addEventListener("submit",go);let l=e.querySelectorAll("input, textarea");l.forEach(n=>{n.addEventListener("focus",()=>{t.classList.add("share-btn-active")})}),l.forEach(n=>{n.addEventListener("blur",()=>{t.classList.remove("share-btn-active")})})}var Ji={feedback:function(e){if(!(e.length>=4))return"feedback"},name:function(e){if(!e.match(new RegExp("\\b([A-Z\\u{00C0}\\-\\u{00FF}][-,a-z. ']+[ ]*)+","ims")))return"name"},email:function(e){if(!e.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}])|(([a-zA-Z\-\d]+\.)+[a-zA-Z]{2,}))$/))return"email"}},xi={success:function(e){e.reset();let t=k("#feedback-success");N(e,"none"),N(t,"block"),setTimeout(()=>{N(t,"none"),N(e,"block")},4e3)},error:function(e,t){function l(i){n=k(`${i}`),N(n,"block"),setTimeout(()=>{N(n,"none")},4e3)}if(t.error==="feedback"){l("#feedback-error");return}if(t.error==="name"){l("#name-error");return}if(t.error==="email"){l("#email-error");return}let n=k("#generic-error");N(e,"none"),n.innerText=t,N(n,"block"),setTimeout(()=>{N(n,"none"),N(e,"block")},4e3),console.error(t)}},go=e=>{e.preventDefault();let t=U.footer.getAttribute("data-story"),l=e.target,n=new FormData(l),i={};n.forEach((a,c)=>{i[c]=Ci.default.sanitize(a)});let o=Object.keys(Ji).reduce((a,c)=>{let V=Ji[c](i[c]);return V?un(pn({},a),{error:V}):a},{});Object.keys(o).length>0&&xi.error(l,o),Object.keys(o).length===0&&ho(i,t).then(()=>{xi.success(l)})};function ho(e,t){return fetch(`/${t}/feedback`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(l=>{if(!l.ok)throw new Error("Something went wrong, please try again.")})}function Ei({mailtoEmail:e,previewURL:t,title:l},n=U.mailtoLink){n.setAttribute("href",`mailto:${e}?subject=${encodeURIComponent("Shorthand story for review - ")}${l}&body=${encodeURIComponent("Hello, here's a link to an unpublished (draft) copy of a Shorthand story for the purposes of review:")}%0D%0A%0D%0A${t}%0D%0A%0D%0A${encodeURIComponent("This link is for review only, and should not be promoted or shared. The story at this address may still be actively edited, extensively changed, or removed.")}`),n.setAttribute("target","_blank")}function Io(){let e=k(".mailtoForm"),t=new FormData(e),l={mailtoEmail:"",previewURL:document.location,title:""};t.forEach((a,c)=>{l[c]=a}),l.title===""&&(l.title="A Shorthand Story"),Ei(l);let n=k("#mailtoEmail"),i=k("#mailtoButton");n.addEventListener("focus",()=>{i.classList.add("share-btn-active")}),n.addEventListener("blur",function(a){l.mailtoEmail=a.target.value,Ei(l),i.classList.remove("share-btn-active")});let o=document.querySelector("#qr-code");o&&ki.default.toCanvas(o,l.previewURL.toString(),{margin:0,width:116,color:{dark:"#fff",light:"#353535"}})}function Oi(e){return(Array.isArray(e)?e:[e]).forEach(l=>{l.setAttribute("href",l.getAttribute("href").replace("__host__",window.location.hostname))})}function Ol(){let e=k("#StandardFooter");e&&e.dataset.footer==="prime3"&&fetch("/features.json").then(n=>{n.status===200&&n.json().then(i=>{i.prime3&&ll()})}).catch(n=>{console.log(n)});let t=ot("[id$='-footer_shorthand_link']");if(t&&Oi(t),ot("#PreviewFooter"))return Sl()}Ol();})();
/*! Bundled license information:

dompurify/dist/purify.js:
  (*! @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 *)

classnames/dedupe.js:
  (*!
  	Copyright (c) 2018 Jed Watson.
  	Licensed under the MIT License (MIT), see
  	http://jedwatson.github.io/classnames
  *)
*/
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bcc57e3d-05af-5c4e-85bb-00884b12e3eb")}catch(e){}}();
//# sourceMappingURL=footer.350340.min.js.map
//# debugId=bcc57e3d-05af-5c4e-85bb-00884b12e3eb
