/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var gx=Object.create;var Zs=Object.defineProperty,bx=Object.defineProperties,_x=Object.getOwnPropertyDescriptor,Ex=Object.getOwnPropertyDescriptors,Tx=Object.getOwnPropertyNames,fh=Object.getOwnPropertySymbols,xx=Object.getPrototypeOf,dh=Object.prototype.hasOwnProperty,yx=Object.prototype.propertyIsEnumerable;var nc=(t,e,n)=>e in t?Zs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))dh.call(e,n)&&nc(t,n,e[n]);if(fh)for(var n of fh(e))yx.call(e,n)&&nc(t,n,e[n]);return t},ce=(t,e)=>bx(t,Ex(e)),hh=t=>Zs(t,"__esModule",{value:!0});var x=(t,e)=>()=>(t&&(e=t(t=0)),e);var Rn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),It=(t,e)=>{hh(t);for(var n in e)Zs(t,n,{get:e[n],enumerable:!0})},Ax=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Tx(e))!dh.call(t,r)&&r!=="default"&&Zs(t,r,{get:()=>e[r],enumerable:!(n=_x(e,r))||n.enumerable});return t},be=t=>Ax(hh(Zs(t!=null?gx(xx(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var ph=(t,e,n)=>(nc(t,typeof e!="symbol"?e+"":e,n),n);function Se(){}function Cx(t,e){for(let n in e)t[n]=e[n];return t}function rc(t){return t()}function mh(){return Object.create(null)}function Ht(t){t.forEach(rc)}function un(t){return typeof t=="function"}function qe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function sc(t,e){return Oa||(Oa=document.createElement("a")),Oa.href=e,t===Oa.href}function gh(t){return Object.keys(t).length===0}function bh(t,...e){if(t==null)return Se;let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ka(t,e,n){t.$$.on_destroy.push(bh(e,n))}function Ur(t,e,n,r){if(t){let s=_h(t,e,n,r);return t[0](s)}}function _h(t,e,n,r){return t[1]&&r?Cx(n.ctx.slice(),t[1](r(e))):n.ctx}function zr(t,e,n,r){if(t[2]&&r){let s=t[2](r(n));if(e.dirty===void 0)return s;if(typeof s=="object"){let i=[],a=Math.max(e.dirty.length,s.length);for(let o=0;o32){let e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function q(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function wx(t){return Array.from(t.childNodes)}function Jt(t,e){e=""+e,t.data!==e&&(t.data=e)}function ic(t,e){t.value=e??""}function Et(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function ac(t,e,n){t.classList[n?"add":"remove"](e)}function Nx(t,e,{bubbles:n=!1,cancelable:r=!1}={}){let s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,r,e),s}function ti(t){ei=t}function oc(){if(!ei)throw new Error("Function called outside component initialization");return ei}function fr(t){oc().$$.on_mount.push(t)}function ni(t){oc().$$.on_destroy.push(t)}function uc(){let t=oc();return(e,n,{cancelable:r=!1}={})=>{let s=t.$$.callbacks[e];if(s){let i=Nx(e,n,{cancelable:r});return s.slice().forEach(a=>{a.call(t,i)}),!i.defaultPrevented}return!0}}function Tt(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}function Ah(){cc||(cc=!0,yh.then(Ch))}function Pn(){return Ah(),yh}function lc(t){Yr.push(t)}function Ch(){if(Wr!==0)return;let t=ei;do{try{for(;Wrt.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Yr=e}function hr(){dr={r:0,c:[],p:dr}}function pr(){dr.r||Ht(dr.c),dr=dr.p}function me(t,e){t&&t.i&&(Pa.delete(t),t.i(e))}function Te(t,e,n,r){if(t&&t.o){if(Pa.has(t))return;Pa.add(t),dr.c.push(()=>{Pa.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function pt(t){t&&t.c()}function ot(t,e,n,r){let{fragment:s,after_update:i}=t.$$;s&&s.m(e,n),r||lc(()=>{let a=t.$$.on_mount.map(rc).filter(un);t.$$.on_destroy?t.$$.on_destroy.push(...a):Ht(a),t.$$.on_mount=[]}),i.forEach(lc)}function Je(t,e){let n=t.$$;n.fragment!==null&&(Dx(n.after_update),Ht(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function kx(t,e){t.$$.dirty[0]===-1&&(Kr.push(t),Ah(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let E=p.length?p[0]:f;return l.ctx&&s(l.ctx[h],l.ctx[h]=E)&&(!l.skip_bound&&l.bound[h]&&l.bound[h](E),d&&kx(t,h)),f}):[],l.update(),d=!0,Ht(l.before_update),l.fragment=r?r(l.ctx):!1,e.target){if(e.hydrate){Sx();let h=wx(e.target);l.fragment&&l.fragment.l(h),h.forEach(ne)}else l.fragment&&l.fragment.c();e.intro&&me(t.$$.fragment),ot(t,e.target,e.anchor,e.customElement),Ix(),Ch()}ti(c)}var Oa,Eh,Ra,Th,ei,Kr,Ln,Yr,xh,yh,cc,fc,Wr,Pa,dr,Ox,HO,Rx,Ge,wt=x(()=>{Eh=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,Ra=class{constructor(e){this.options=e,this._listeners="WeakMap"in Eh?new WeakMap:void 0}observe(e,n){return this._listeners.set(e,n),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(n=>{var r;for(let s of n)Ra.entries.set(s.target,s),(r=this._listeners.get(s.target))===null||r===void 0||r(s)})}};Ra.entries="WeakMap"in Eh?new WeakMap:void 0;Th=!1;Kr=[],Ln=[],Yr=[],xh=[],yh=Promise.resolve(),cc=!1;fc=new Set,Wr=0;Pa=new Set;Ox=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],HO=new Set([...Ox]);typeof HTMLElement=="function"&&(Rx=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(rc).filter(un);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){Ht(this.$$.on_disconnect)}$destroy(){Je(this,1),this.$destroy=Se}$on(t,e){if(!un(e))return Se;let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let r=n.indexOf(e);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!gh(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});Ge=class{$destroy(){Je(this,1),this.$destroy=Se}$on(e,n){if(!un(n))return Se;let r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{let s=r.indexOf(n);s!==-1&&r.splice(s,1)}}$set(e){this.$$set&&!gh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}});var ri=x(()=>{wt()});var dc,Sh=x(()=>{dc=class{constructor(){this.handlers=new Map;this.disabled=[]}on(e,n,r){if(e.includes("@")||n.includes("@"))throw new Error("Invalid context/event name - Cannot contain @");this.handlers.set(`${e}@${n}`,r)}off(e,n){if(n)this.handlers.delete(`${e}@${n}`);else for(let[r]of this.handlers.entries())r.startsWith(`${e}@`)&&this.handlers.delete(r)}disable(e){this.enable(e),this.disabled.push(e)}enable(e){this.disabled=this.disabled.filter(n=>n!==e)}emit(e,...n){let r=[...this.handlers.entries()].filter(([s,i])=>!this.disabled.includes(s.split("@")[0]));for(let[s,i]of r)s.endsWith(`@${e}`)&&i(...n)}}});function Ma(t,e=Se){let n,r=new Set;function s(o){if(qe(t,o)&&(t=o,n)){let c=!$r.length;for(let l of r)l[1](),$r.push(l,t);if(c){for(let l=0;l<$r.length;l+=2)$r[l][0]($r[l+1]);$r.length=0}}}function i(o){s(o(t))}function a(o,c=Se){let l=[o,c];return r.add(l),r.size===1&&(n=e(s)||Se),o(t),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:s,update:i,subscribe:a}}var $r,hc=x(()=>{wt();wt();$r=[]});function pc(t){Nh=t}function mc(){return Nh}var Ih,wh,si,ii,ae,Fa,Nt,pe,Mn,Nh,Lx,ai,vh,en=x(()=>{Sh();hc();Ih=/[\u4e00-\u9fa5]/,wh=100,si=300,ii="omnisearch-disabled",ae=new dc,Fa={ToggleExcerpts:"toggle-excerpts"},Nt=(i=>(i[i.Done=0]="Done",i[i.LoadingCache=1]="LoadingCache",i[i.ReadingFiles=2]="ReadingFiles",i[i.IndexingFiles=3]="IndexingFiles",i[i.WritingCache=4]="WritingCache",i))(Nt||{}),pe=(h=>(h.Enter="enter",h.OpenInBackground="open-in-background",h.CreateNote="create-note",h.OpenInNewPane="open-in-new-pane",h.InsertLink="insert-link",h.Tab="tab",h.ArrowUp="arrow-up",h.ArrowDown="arrow-down",h.PrevSearchHistory="prev-search-history",h.NextSearchHistory="next-search-history",h.OpenInNewLeaf="open-in-new-leaf",h))(pe||{}),Mn=Ma(0),Nh=!1;Lx=/[|\t\n\r\^"= -#%-*,.`\/<>:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/.toString().slice(1,-1),ai=new RegExp(`${Lx}+`,"u"),vh=/[|\[\]\(\)<>\{\} \t\n\r]/u});var Dh=Rn((oi,gc)=>{(function(t,e){if(typeof oi=="object"&&typeof gc=="object")gc.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var n=e();for(var r in n)(typeof oi=="object"?oi:t)[r]=n[r]}})(typeof self!="undefined"?self:oi,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(r,s,i){n.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,s){if(1&s&&(r=n(r)),8&s||4&s&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&s&&typeof r!="string")for(var a in r)n.d(i,a,function(o){return r[o]}.bind(null,a));return i},n.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(s,"a",s),s},n.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e),n.d(e,"md5",function(){return T});var r="0123456789abcdef".split(""),s=function(w){for(var m="",S=0;S<4;S++)m+=r[w>>8*S+4&15]+r[w>>8*S&15];return m},i=function(w){for(var m=w.length,S=0;S>>32-O,P)}(m=function(N,O,P,V){return O=a(a(O,N),a(P,V))}(w,m,C,I),b,S)},c=function(w,m,S,C,b,I,A,N){return o(S&C|~S&b,m,S,I,A,N,w)},l=function(w,m,S,C,b,I,A,N){return o(S&b|C&~b,m,S,I,A,N,w)},d=function(w,m,S,C,b,I,A,N){return o(S^C^b,m,S,I,A,N,w)},h=function(w,m,S,C,b,I,A,N){return o(C^(S|~b),m,S,I,A,N,w)},f=function(w,m,S){S===void 0&&(S=a);var C=w[0],b=w[1],I=w[2],A=w[3],N=c.bind(null,S);C=N(C,b,I,A,m[0],7,-680876936),A=N(A,C,b,I,m[1],12,-389564586),I=N(I,A,C,b,m[2],17,606105819),b=N(b,I,A,C,m[3],22,-1044525330),C=N(C,b,I,A,m[4],7,-176418897),A=N(A,C,b,I,m[5],12,1200080426),I=N(I,A,C,b,m[6],17,-1473231341),b=N(b,I,A,C,m[7],22,-45705983),C=N(C,b,I,A,m[8],7,1770035416),A=N(A,C,b,I,m[9],12,-1958414417),I=N(I,A,C,b,m[10],17,-42063),b=N(b,I,A,C,m[11],22,-1990404162),C=N(C,b,I,A,m[12],7,1804603682),A=N(A,C,b,I,m[13],12,-40341101),I=N(I,A,C,b,m[14],17,-1502002290),b=N(b,I,A,C,m[15],22,1236535329);var O=l.bind(null,S);C=O(C,b,I,A,m[1],5,-165796510),A=O(A,C,b,I,m[6],9,-1069501632),I=O(I,A,C,b,m[11],14,643717713),b=O(b,I,A,C,m[0],20,-373897302),C=O(C,b,I,A,m[5],5,-701558691),A=O(A,C,b,I,m[10],9,38016083),I=O(I,A,C,b,m[15],14,-660478335),b=O(b,I,A,C,m[4],20,-405537848),C=O(C,b,I,A,m[9],5,568446438),A=O(A,C,b,I,m[14],9,-1019803690),I=O(I,A,C,b,m[3],14,-187363961),b=O(b,I,A,C,m[8],20,1163531501),C=O(C,b,I,A,m[13],5,-1444681467),A=O(A,C,b,I,m[2],9,-51403784),I=O(I,A,C,b,m[7],14,1735328473),b=O(b,I,A,C,m[12],20,-1926607734);var P=d.bind(null,S);C=P(C,b,I,A,m[5],4,-378558),A=P(A,C,b,I,m[8],11,-2022574463),I=P(I,A,C,b,m[11],16,1839030562),b=P(b,I,A,C,m[14],23,-35309556),C=P(C,b,I,A,m[1],4,-1530992060),A=P(A,C,b,I,m[4],11,1272893353),I=P(I,A,C,b,m[7],16,-155497632),b=P(b,I,A,C,m[10],23,-1094730640),C=P(C,b,I,A,m[13],4,681279174),A=P(A,C,b,I,m[0],11,-358537222),I=P(I,A,C,b,m[3],16,-722521979),b=P(b,I,A,C,m[6],23,76029189),C=P(C,b,I,A,m[9],4,-640364487),A=P(A,C,b,I,m[12],11,-421815835),I=P(I,A,C,b,m[15],16,530742520),b=P(b,I,A,C,m[2],23,-995338651);var V=h.bind(null,S);C=V(C,b,I,A,m[0],6,-198630844),A=V(A,C,b,I,m[7],10,1126891415),I=V(I,A,C,b,m[14],15,-1416354905),b=V(b,I,A,C,m[5],21,-57434055),C=V(C,b,I,A,m[12],6,1700485571),A=V(A,C,b,I,m[3],10,-1894986606),I=V(I,A,C,b,m[10],15,-1051523),b=V(b,I,A,C,m[1],21,-2054922799),C=V(C,b,I,A,m[8],6,1873313359),A=V(A,C,b,I,m[15],10,-30611744),I=V(I,A,C,b,m[6],15,-1560198380),b=V(b,I,A,C,m[13],21,1309151649),C=V(C,b,I,A,m[4],6,-145523070),A=V(A,C,b,I,m[11],10,-1120210379),I=V(I,A,C,b,m[2],15,718787259),b=V(b,I,A,C,m[9],21,-343485551),w[0]=S(C,w[0]),w[1]=S(b,w[1]),w[2]=S(I,w[2]),w[3]=S(A,w[3])},p=function(w){for(var m=[],S=0;S<64;S+=4)m[S>>2]=w.charCodeAt(S)+(w.charCodeAt(S+1)<<8)+(w.charCodeAt(S+2)<<16)+(w.charCodeAt(S+3)<<24);return m},E=function(w,m){var S,C=w.length,b=[1732584193,-271733879,-1732584194,271733878];for(S=64;S<=C;S+=64)f(b,p(w.substring(S-64,S)),m);var I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],A=(w=w.substring(S-64)).length;for(S=0;S>2]|=w.charCodeAt(S)<<(S%4<<3);if(I[S>>2]|=128<<(S%4<<3),S>55)for(f(b,I,m),S=16;S--;)I[S]=0;return I[14]=8*C,f(b,I,m),b};function T(w){var m;return i(E("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(m=function(S,C){var b=(65535&S)+(65535&C);return(S>>16)+(C>>16)+(b>>16)<<16|65535&b}),i(E(w,m))}}])})});function bc(t){let e=t.split("/");return e.pop(),e.join("/")}function _c(t){return new Promise(e=>{setTimeout(e,t)})}function Ba(t,e){return t.headings?.filter(n=>n.level===e).map(n=>n.heading)??[]}function ja(t,e){return(t+e)%e}function Oh(t){return t.replace(/(\*|_)+(.+?)(\*|_)+/g,(e,n,r)=>r)}function kh(t){return t?.frontmatter?(0,mr.parseFrontMatterAliases)(t.frontmatter)??[]:[]}function Rh(t){let e=t?(0,mr.getAllTags)(t)??[]:[];return e=[...new Set(e.reduce((n,r)=>[...n,...r.split("/").filter(s=>s).map(s=>s.startsWith("#")?s:`#${s}`),r],[]))],e}function cn(t,e=!1){if(t==null)return"";if(e){t=t.replace(/([^\u0621-\u063A\u0641-\u064A\u0660-\u0669a-zA-Z 0-9])/g,"").replace(/(آ|إ|أ)/g,"\u0627").replace(/(ة)/g,"\u0647").replace(/(ئ|ؤ)/g,"\u0621").replace(/(ى)/g,"\u064A");for(let n=0;n<10;n++)t.replace(String.fromCharCode(1632+n),String.fromCharCode(48+n))}return t=t.replaceAll("`","[__omnisearch__backtick__]"),t=t.replaceAll("^","[__omnisearch__caret__]"),t=t.normalize("NFD").replace(jx,"").normalize("NFC"),t=t.replaceAll("[__omnisearch__backtick__]","`"),t=t.replaceAll("[__omnisearch__caret__]","^"),t}function vt(){return mr.Platform.isMacOS?"\u2318":"Ctrl"}function Ha(){return mr.Platform.isMacOS?"\u2325":"Alt"}function tn(t){let e=Fn(t);return e==="png"||e==="jpg"||e==="jpeg"||e==="webp"||e==="gif"}function nn(t){return Fn(t)==="pdf"}function Lh(t){let e=Fn(t);return e==="docx"||e==="xlsx"}function ln(t){return t.endsWith(".canvas")}function Ua(t){return t.endsWith(".excalidraw")}function ui(t){return t.endsWith(".loom")}function Fn(t){let e=t.split(".");return e[e.length-1]??""}function Ph(t,e){let n=[],r=0,s=t.length;for(;rn):[]}function Tc(t){return t.includes("-")?t.split("-").filter(e=>e):[]}function le(...t){Fh(console.debug,...t)}function fn(...t){Fh(console.warn,...t)}function xc(t){Mh=t}function Fh(t,...e){Mh&&t(...e)}var mr,Px,Mx,Fx,Bx,jx,Mh,ut=x(()=>{mr=be(require("obsidian"));en();Px=be(require("crypto")),Mx=be(Dh());Fx=["\\u30FC","\\u309A","\\u3099"],Bx=Fx.join("|"),jx=new RegExp(`(?!${Bx})\\p{Diacritic}`,"gu");Mh=!1});function Hx(t){let e,n,r,s,i,a,o,c,l=t[9].default,d=Ur(l,t,t[8],null);return{c(){e=U("div"),n=U("div"),r=U("input"),i=ie(),d&&d.c(),q(r,"class","prompt-input"),q(r,"placeholder",t[0]),q(r,"spellcheck","false"),q(r,"type","text"),q(n,"class","omnisearch-input-field"),q(e,"class","omnisearch-input-container")},m(h,f){re(h,e,f),B(e,n),B(n,r),t[10](r),ic(r,t[1]),B(e,i),d&&d.m(e,null),a=!0,o||(c=[$e(r,"input",t[11]),$e(r,"compositionend",t[12]),$e(r,"compositionstart",t[13]),$e(r,"input",t[4]),Js(s=t[3].call(null,r))],o=!0)},p(h,[f]){(!a||f&1)&&q(r,"placeholder",h[0]),f&2&&r.value!==h[1]&&ic(r,h[1]),d&&d.p&&(!a||f&256)&&Vr(d,l,h,h[8],a?zr(l,h[8],f,null):qr(h[8]),null)},i(h){a||(me(d,h),a=!0)},o(h){Te(d,h),a=!1},d(h){h&&ne(e),t[10](null),d&&d.d(h),o=!1,Ht(c)}}}function Ux(t,e,n){let{$$slots:r={},$$scope:s}=e,{initialValue:i=""}=e,{placeholder:a=""}=e,{plugin:o}=e,c=!1,l="",d,h=uc();function f(b){n(1,l=b)}function p(b){b&&!c&&!l&&(c=!0,n(1,l=b),E())}function E(b){Pn().then(async()=>(ci.Platform.isMobileApp&&await _c(200),d.focus(),Pn())).then(async()=>{ci.Platform.isMobileApp&&await _c(200),d.select()})}let T=(0,ci.debounce)(()=>{o.searchHistory.addToHistory(""),h("input",l)},300);function w(b){Ln[b?"unshift":"push"](()=>{d=b,n(2,d)})}function m(){l=this.value,n(1,l)}let S=b=>pc(!1),C=b=>pc(!0);return t.$$set=b=>{"initialValue"in b&&n(5,i=b.initialValue),"placeholder"in b&&n(0,a=b.placeholder),"plugin"in b&&n(6,o=b.plugin),"$$scope"in b&&n(8,s=b.$$scope)},t.$$.update=()=>{if(t.$$.dirty&32){e:p(i)}},[a,l,d,E,T,i,o,f,s,r,w,m,S,C]}var ci,Bh,za,yc=x(()=>{wt();ci=be(require("obsidian"));en();ri();ut();Bh=class extends Ge{constructor(e){super();et(this,e,Ux,Hx,qe,{initialValue:5,placeholder:0,plugin:6,setInputValue:7})}get setInputValue(){return this.$$.ctx[7]}},za=Bh});function zx(t){let e,n,r,s,i=t[1].default,a=Ur(i,t,t[0],null);return{c(){e=U("div"),a&&a.c(),q(e,"class","prompt-results")},m(o,c){re(o,e,c),a&&a.m(e,null),n=!0,r||(s=$e(e,"mousedown",Vx),r=!0)},p(o,[c]){a&&a.p&&(!n||c&1)&&Vr(a,i,o,o[0],n?zr(i,o[0],c,null):qr(o[0]),null)},i(o){n||(me(a,o),n=!0)},o(o){Te(a,o),n=!1},d(o){o&&ne(e),a&&a.d(o),r=!1,s()}}}function qx(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=i=>{"$$scope"in i&&n(0,s=i.$$scope)},[s,r]}var Vx,jh,Va,Ac=x(()=>{wt();Vx=t=>t.preventDefault();jh=class extends Ge{constructor(e){super();et(this,e,qx,zx,qe,{})}},Va=jh});async function qa(t,e,n=0,r=!1,s=!1){let i=!1;t.workspace.iterateAllLeaves(c=>{c.view instanceof Cc.MarkdownView&&!r&&c.getViewState().state?.file===e.path&&c.getViewState()?.pinned&&(t.workspace.setActiveLeaf(c,{focus:!0}),i=!0)}),i||await t.workspace.openLinkText(e.path,"",s?"split":r);let a=t.workspace.getActiveViewOfType(Cc.MarkdownView);if(!a)return;let o=a.editor.offsetToPos(n);a.editor.setCursor(o),a.editor.scrollIntoView({from:{line:o.line-10,ch:0},to:{line:o.line+10,ch:0}})}async function Hh(t,e,n=!1){try{let r;switch(t.vault.getConfig("newFileLocation")){case"current":r=(t.workspace.getActiveFile()?.parent?.path??"")+"/";break;case"folder":r=t.vault.getConfig("newFileFolderPath")+"/";break;default:r="";break}await t.workspace.openLinkText(`${r}${e}.md`,"",n)}catch(r){throw r.message="OmniSearch - Could not create note: "+r.message,console.error(r),r}}function Uh(t,e,n){return(n.links??[]).map(r=>{let s=Sc(r.link);return t.metadataCache.getFirstLinkpathDest(s,e.path)?"":r.link}).filter(r=>!!r)}function Sc(t){return t.split(/[\^#]+/)[0]}var Cc,li=x(()=>{Cc=be(require("obsidian"))});var Kx,Ka,Ic=x(()=>{Kx=typeof global=="object"&&global&&global.Object===Object&&global,Ka=Kx});var Yx,Wx,je,Ut=x(()=>{Ic();Yx=typeof self=="object"&&self&&self.Object===Object&&self,Wx=Ka||Yx||Function("return this")(),je=Wx});var $x,ct,Gr=x(()=>{Ut();$x=je.Symbol,ct=$x});function Xx(t){var e=Gx.call(t,fi),n=t[fi];try{t[fi]=void 0;var r=!0}catch{}var s=Qx.call(t);return r&&(e?t[fi]=n:delete t[fi]),s}var zh,Gx,Qx,fi,Vh,qh=x(()=>{Gr();zh=Object.prototype,Gx=zh.hasOwnProperty,Qx=zh.toString,fi=ct?ct.toStringTag:void 0;Vh=Xx});function ey(t){return Jx.call(t)}var Zx,Jx,Kh,Yh=x(()=>{Zx=Object.prototype,Jx=Zx.toString;Kh=ey});function ry(t){return t==null?t===void 0?ny:ty:Wh&&Wh in Object(t)?Vh(t):Kh(t)}var ty,ny,Wh,zt,Qr=x(()=>{Gr();qh();Yh();ty="[object Null]",ny="[object Undefined]",Wh=ct?ct.toStringTag:void 0;zt=ry});function sy(t){return t!=null&&typeof t=="object"}var Vt,Xr=x(()=>{Vt=sy});function ay(t){return typeof t=="symbol"||Vt(t)&&zt(t)==iy}var iy,qt,Zr=x(()=>{Qr();Xr();iy="[object Symbol]";qt=ay});function oy(t,e){for(var n=-1,r=t==null?0:t.length,s=Array(r);++n{Jr=oy});var uy,Fe,Kt=x(()=>{uy=Array.isArray,Fe=uy});function Qh(t){if(typeof t=="string")return t;if(Fe(t))return Jr(t,Qh)+"";if(qt(t))return Gh?Gh.call(t):"";var e=t+"";return e=="0"&&1/t==-cy?"-0":e}var cy,$h,Gh,Xh,Zh=x(()=>{Gr();wc();Kt();Zr();cy=1/0,$h=ct?ct.prototype:void 0,Gh=$h?$h.toString:void 0;Xh=Qh});function fy(t){for(var e=t.length;e--&&ly.test(t.charAt(e)););return e}var ly,Jh,e0=x(()=>{ly=/\s/;Jh=fy});function hy(t){return t&&t.slice(0,Jh(t)+1).replace(dy,"")}var dy,t0,n0=x(()=>{e0();dy=/^\s+/;t0=hy});function py(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var xt,gr=x(()=>{xt=py});function Ey(t){if(typeof t=="number")return t;if(qt(t))return r0;if(xt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t0(t);var n=gy.test(t);return n||by.test(t)?_y(t.slice(2),n?2:8):my.test(t)?r0:+t}var r0,my,gy,by,_y,Nc,s0=x(()=>{n0();gr();Zr();r0=0/0,my=/^[-+]0x[0-9a-f]+$/i,gy=/^0b[01]+$/i,by=/^0o[0-7]+$/i,_y=parseInt;Nc=Ey});function Ty(t){return t}var Bn,di=x(()=>{Bn=Ty});function Sy(t){if(!xt(t))return!1;var e=zt(t);return e==yy||e==Ay||e==xy||e==Cy}var xy,yy,Ay,Cy,Ya,vc=x(()=>{Qr();gr();xy="[object AsyncFunction]",yy="[object Function]",Ay="[object GeneratorFunction]",Cy="[object Proxy]";Ya=Sy});var Iy,Wa,i0=x(()=>{Ut();Iy=je["__core-js_shared__"],Wa=Iy});function wy(t){return!!a0&&a0 in t}var a0,o0,u0=x(()=>{i0();a0=function(){var t=/[^.]+$/.exec(Wa&&Wa.keys&&Wa.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();o0=wy});function Dy(t){if(t!=null){try{return vy.call(t)}catch{}try{return t+""}catch{}}return""}var Ny,vy,dn,Dc=x(()=>{Ny=Function.prototype,vy=Ny.toString;dn=Dy});function By(t){if(!xt(t)||o0(t))return!1;var e=Ya(t)?Fy:ky;return e.test(dn(t))}var Oy,ky,Ry,Ly,Py,My,Fy,c0,l0=x(()=>{vc();u0();gr();Dc();Oy=/[\\^$.*+?()[\]{}|]/g,ky=/^\[object .+?Constructor\]$/,Ry=Function.prototype,Ly=Object.prototype,Py=Ry.toString,My=Ly.hasOwnProperty,Fy=RegExp("^"+Py.call(My).replace(Oy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");c0=By});function jy(t,e){return t==null?void 0:t[e]}var f0,d0=x(()=>{f0=jy});function Hy(t,e){var n=f0(t,e);return c0(n)?n:void 0}var mt,jn=x(()=>{l0();d0();mt=Hy});var Uy,$a,h0=x(()=>{jn();Ut();Uy=mt(je,"WeakMap"),$a=Uy});function zy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var p0,m0=x(()=>{p0=zy});function Yy(t){var e=0,n=0;return function(){var r=Ky(),s=qy-(r-n);if(n=r,s>0){if(++e>=Vy)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Vy,qy,Ky,g0,b0=x(()=>{Vy=800,qy=16,Ky=Date.now;g0=Yy});function Wy(t){return function(){return t}}var _0,E0=x(()=>{_0=Wy});var $y,Oc,T0=x(()=>{jn();$y=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Oc=$y});var Gy,x0,y0=x(()=>{E0();T0();di();Gy=Oc?function(t,e){return Oc(t,"toString",{configurable:!0,enumerable:!1,value:_0(e),writable:!0})}:Bn,x0=Gy});var Qy,A0,C0=x(()=>{y0();b0();Qy=g0(x0),A0=Qy});function Jy(t,e){var n=typeof t;return e=e??Xy,!!e&&(n=="number"||n!="symbol"&&Zy.test(t))&&t>-1&&t%1==0&&t{Xy=9007199254740991,Zy=/^(?:0|[1-9]\d*)$/;es=Jy});function eA(t,e){return t===e||t!==t&&e!==e}var ts,Qa=x(()=>{ts=eA});function tA(t,e,n){return e=S0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,s=-1,i=S0(r.length-e,0),a=Array(i);++s{m0();S0=Math.max;I0=tA});function nA(t,e){return A0(I0(t,e,Bn),t+"")}var N0,v0=x(()=>{di();w0();C0();N0=nA});function sA(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rA}var rA,ns,Xa=x(()=>{rA=9007199254740991;ns=sA});function iA(t){return t!=null&&ns(t.length)&&!Ya(t)}var Hn,hi=x(()=>{vc();Xa();Hn=iA});function aA(t,e,n){if(!xt(n))return!1;var r=typeof e;return(r=="number"?Hn(n)&&es(e,n.length):r=="string"&&e in n)?ts(n[e],t):!1}var kc,D0=x(()=>{Qa();hi();Ga();gr();kc=aA});function uA(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||oA;return t===n}var oA,O0,k0=x(()=>{oA=Object.prototype;O0=uA});function cA(t,e){for(var n=-1,r=Array(t);++n{R0=cA});function fA(t){return Vt(t)&&zt(t)==lA}var lA,Rc,P0=x(()=>{Qr();Xr();lA="[object Arguments]";Rc=fA});var M0,dA,hA,pA,rs,Za=x(()=>{P0();Xr();M0=Object.prototype,dA=M0.hasOwnProperty,hA=M0.propertyIsEnumerable,pA=Rc(function(){return arguments}())?Rc:function(t){return Vt(t)&&dA.call(t,"callee")&&!hA.call(t,"callee")},rs=pA});function mA(){return!1}var F0,B0=x(()=>{F0=mA});var j0,H0,gA,U0,bA,_A,pi,Lc=x(()=>{Ut();B0();j0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,H0=j0&&typeof module=="object"&&module&&!module.nodeType&&module,gA=H0&&H0.exports===j0,U0=gA?je.Buffer:void 0,bA=U0?U0.isBuffer:void 0,_A=bA||F0,pi=_A});function VA(t){return Vt(t)&&ns(t.length)&&!!ve[zt(t)]}var EA,TA,xA,yA,AA,CA,SA,IA,wA,NA,vA,DA,OA,kA,RA,LA,PA,MA,FA,BA,jA,HA,UA,zA,ve,z0,V0=x(()=>{Qr();Xa();Xr();EA="[object Arguments]",TA="[object Array]",xA="[object Boolean]",yA="[object Date]",AA="[object Error]",CA="[object Function]",SA="[object Map]",IA="[object Number]",wA="[object Object]",NA="[object RegExp]",vA="[object Set]",DA="[object String]",OA="[object WeakMap]",kA="[object ArrayBuffer]",RA="[object DataView]",LA="[object Float32Array]",PA="[object Float64Array]",MA="[object Int8Array]",FA="[object Int16Array]",BA="[object Int32Array]",jA="[object Uint8Array]",HA="[object Uint8ClampedArray]",UA="[object Uint16Array]",zA="[object Uint32Array]",ve={};ve[LA]=ve[PA]=ve[MA]=ve[FA]=ve[BA]=ve[jA]=ve[HA]=ve[UA]=ve[zA]=!0;ve[EA]=ve[TA]=ve[kA]=ve[xA]=ve[RA]=ve[yA]=ve[AA]=ve[CA]=ve[SA]=ve[IA]=ve[wA]=ve[NA]=ve[vA]=ve[DA]=ve[OA]=!1;z0=VA});function qA(t){return function(e){return t(e)}}var Ja,Pc=x(()=>{Ja=qA});var q0,mi,KA,Mc,YA,Fc,K0=x(()=>{Ic();q0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mi=q0&&typeof module=="object"&&module&&!module.nodeType&&module,KA=mi&&mi.exports===q0,Mc=KA&&Ka.process,YA=function(){try{var t=mi&&mi.require&&mi.require("util").types;return t||Mc&&Mc.binding&&Mc.binding("util")}catch{}}(),Fc=YA});var Y0,WA,eo,Bc=x(()=>{V0();Pc();K0();Y0=Fc&&Fc.isTypedArray,WA=Y0?Ja(Y0):z0,eo=WA});function QA(t,e){var n=Fe(t),r=!n&&rs(t),s=!n&&!r&&pi(t),i=!n&&!r&&!s&&eo(t),a=n||r||s||i,o=a?R0(t.length,String):[],c=o.length;for(var l in t)(e||GA.call(t,l))&&!(a&&(l=="length"||s&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||es(l,c)))&&o.push(l);return o}var $A,GA,W0,$0=x(()=>{L0();Za();Kt();Lc();Ga();Bc();$A=Object.prototype,GA=$A.hasOwnProperty;W0=QA});function XA(t,e){return function(n){return t(e(n))}}var G0,Q0=x(()=>{G0=XA});var ZA,X0,Z0=x(()=>{Q0();ZA=G0(Object.keys,Object),X0=ZA});function t2(t){if(!O0(t))return X0(t);var e=[];for(var n in Object(t))e2.call(t,n)&&n!="constructor"&&e.push(n);return e}var JA,e2,J0,ep=x(()=>{k0();Z0();JA=Object.prototype,e2=JA.hasOwnProperty;J0=t2});function n2(t){return Hn(t)?W0(t):J0(t)}var ss,to=x(()=>{$0();ep();hi();ss=n2});function i2(t,e){if(Fe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||qt(t)?!0:s2.test(t)||!r2.test(t)||e!=null&&t in Object(e)}var r2,s2,is,no=x(()=>{Kt();Zr();r2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s2=/^\w*$/;is=i2});var a2,hn,gi=x(()=>{jn();a2=mt(Object,"create"),hn=a2});function o2(){this.__data__=hn?hn(null):{},this.size=0}var tp,np=x(()=>{gi();tp=o2});function u2(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var rp,sp=x(()=>{rp=u2});function d2(t){var e=this.__data__;if(hn){var n=e[t];return n===c2?void 0:n}return f2.call(e,t)?e[t]:void 0}var c2,l2,f2,ip,ap=x(()=>{gi();c2="__lodash_hash_undefined__",l2=Object.prototype,f2=l2.hasOwnProperty;ip=d2});function m2(t){var e=this.__data__;return hn?e[t]!==void 0:p2.call(e,t)}var h2,p2,op,up=x(()=>{gi();h2=Object.prototype,p2=h2.hasOwnProperty;op=m2});function b2(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hn&&e===void 0?g2:e,this}var g2,cp,lp=x(()=>{gi();g2="__lodash_hash_undefined__";cp=b2});function as(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{np();sp();ap();up();lp();as.prototype.clear=tp;as.prototype.delete=rp;as.prototype.get=ip;as.prototype.has=op;as.prototype.set=cp;jc=as});function _2(){this.__data__=[],this.size=0}var dp,hp=x(()=>{dp=_2});function E2(t,e){for(var n=t.length;n--;)if(ts(t[n][0],e))return n;return-1}var Un,bi=x(()=>{Qa();Un=E2});function y2(t){var e=this.__data__,n=Un(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():x2.call(e,n,1),--this.size,!0}var T2,x2,pp,mp=x(()=>{bi();T2=Array.prototype,x2=T2.splice;pp=y2});function A2(t){var e=this.__data__,n=Un(e,t);return n<0?void 0:e[n][1]}var gp,bp=x(()=>{bi();gp=A2});function C2(t){return Un(this.__data__,t)>-1}var _p,Ep=x(()=>{bi();_p=C2});function S2(t,e){var n=this.__data__,r=Un(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Tp,xp=x(()=>{bi();Tp=S2});function os(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{hp();mp();bp();Ep();xp();os.prototype.clear=dp;os.prototype.delete=pp;os.prototype.get=gp;os.prototype.has=_p;os.prototype.set=Tp;zn=os});var I2,Vn,ro=x(()=>{jn();Ut();I2=mt(je,"Map"),Vn=I2});function w2(){this.size=0,this.__data__={hash:new jc,map:new(Vn||zn),string:new jc}}var yp,Ap=x(()=>{fp();_i();ro();yp=w2});function N2(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Cp,Sp=x(()=>{Cp=N2});function v2(t,e){var n=t.__data__;return Cp(e)?n[typeof e=="string"?"string":"hash"]:n.map}var qn,Ei=x(()=>{Sp();qn=v2});function D2(t){var e=qn(this,t).delete(t);return this.size-=e?1:0,e}var Ip,wp=x(()=>{Ei();Ip=D2});function O2(t){return qn(this,t).get(t)}var Np,vp=x(()=>{Ei();Np=O2});function k2(t){return qn(this,t).has(t)}var Dp,Op=x(()=>{Ei();Dp=k2});function R2(t,e){var n=qn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var kp,Rp=x(()=>{Ei();kp=R2});function us(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{Ap();wp();vp();Op();Rp();us.prototype.clear=yp;us.prototype.delete=Ip;us.prototype.get=Np;us.prototype.has=Dp;us.prototype.set=kp;br=us});function Hc(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(L2);var n=function(){var r=arguments,s=e?e.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var a=t.apply(this,r);return n.cache=i.set(s,a)||i,a};return n.cache=new(Hc.Cache||br),n}var L2,Lp,Pp=x(()=>{so();L2="Expected a function";Hc.Cache=br;Lp=Hc});function M2(t){var e=Lp(t,function(r){return n.size===P2&&n.clear(),r}),n=e.cache;return e}var P2,Mp,Fp=x(()=>{Pp();P2=500;Mp=M2});var F2,B2,j2,Bp,jp=x(()=>{Fp();F2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,B2=/\\(\\)?/g,j2=Mp(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(F2,function(n,r,s,i){e.push(s?i.replace(B2,"$1"):r||n)}),e}),Bp=j2});function H2(t){return t==null?"":Xh(t)}var io,Uc=x(()=>{Zh();io=H2});function U2(t,e){return Fe(t)?t:is(t,e)?[t]:Bp(io(t))}var ao,zc=x(()=>{Kt();no();jp();Uc();ao=U2});function V2(t){if(typeof t=="string"||qt(t))return t;var e=t+"";return e=="0"&&1/t==-z2?"-0":e}var z2,Kn,Ti=x(()=>{Zr();z2=1/0;Kn=V2});function q2(t,e){e=ao(e,t);for(var n=0,r=e.length;t!=null&&n{zc();Ti();cs=q2});function K2(t,e,n){var r=t==null?void 0:cs(t,e);return r===void 0?n:r}var Hp,Up=x(()=>{oo();Hp=K2});function Y2(t,e){for(var n=-1,r=e.length,s=t.length;++n{uo=Y2});function W2(t){return Fe(t)||rs(t)||!!(zp&&t&&t[zp])}var zp,Vp,qp=x(()=>{Gr();Za();Kt();zp=ct?ct.isConcatSpreadable:void 0;Vp=W2});function Kp(t,e,n,r,s){var i=-1,a=t.length;for(n||(n=Vp),s||(s=[]);++i0&&n(o)?e>1?Kp(o,e-1,n,r,s):uo(s,o):r||(s[s.length]=o)}return s}var Yp,Wp=x(()=>{Vc();qp();Yp=Kp});function $2(){this.__data__=new zn,this.size=0}var $p,Gp=x(()=>{_i();$p=$2});function G2(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Qp,Xp=x(()=>{Qp=G2});function Q2(t){return this.__data__.get(t)}var Zp,Jp=x(()=>{Zp=Q2});function X2(t){return this.__data__.has(t)}var em,tm=x(()=>{em=X2});function J2(t,e){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!Vn||r.length{_i();ro();so();Z2=200;nm=J2});function ls(t){var e=this.__data__=new zn(t);this.size=e.size}var fs,qc=x(()=>{_i();Gp();Xp();Jp();tm();rm();ls.prototype.clear=$p;ls.prototype.delete=Qp;ls.prototype.get=Zp;ls.prototype.has=em;ls.prototype.set=nm;fs=ls});function eC(t,e){for(var n=-1,r=t==null?0:t.length,s=0,i=[];++n{sm=eC});function tC(){return[]}var am,om=x(()=>{am=tC});var nC,rC,um,sC,cm,lm=x(()=>{im();om();nC=Object.prototype,rC=nC.propertyIsEnumerable,um=Object.getOwnPropertySymbols,sC=um?function(t){return t==null?[]:(t=Object(t),sm(um(t),function(e){return rC.call(t,e)}))}:am,cm=sC});function iC(t,e,n){var r=e(t);return Fe(t)?r:uo(r,n(t))}var fm,dm=x(()=>{Vc();Kt();fm=iC});function aC(t){return fm(t,ss,cm)}var Kc,hm=x(()=>{dm();lm();to();Kc=aC});var oC,co,pm=x(()=>{jn();Ut();oC=mt(je,"DataView"),co=oC});var uC,lo,mm=x(()=>{jn();Ut();uC=mt(je,"Promise"),lo=uC});var cC,fo,gm=x(()=>{jn();Ut();cC=mt(je,"Set"),fo=cC});var bm,lC,_m,Em,Tm,xm,fC,dC,hC,pC,mC,_r,Yc,ym=x(()=>{pm();ro();mm();gm();h0();Qr();Dc();bm="[object Map]",lC="[object Object]",_m="[object Promise]",Em="[object Set]",Tm="[object WeakMap]",xm="[object DataView]",fC=dn(co),dC=dn(Vn),hC=dn(lo),pC=dn(fo),mC=dn($a),_r=zt;(co&&_r(new co(new ArrayBuffer(1)))!=xm||Vn&&_r(new Vn)!=bm||lo&&_r(lo.resolve())!=_m||fo&&_r(new fo)!=Em||$a&&_r(new $a)!=Tm)&&(_r=function(t){var e=zt(t),n=e==lC?t.constructor:void 0,r=n?dn(n):"";if(r)switch(r){case fC:return xm;case dC:return bm;case hC:return _m;case pC:return Em;case mC:return Tm}return e});Yc=_r});var gC,Wc,Am=x(()=>{Ut();gC=je.Uint8Array,Wc=gC});function _C(t){return this.__data__.set(t,bC),this}var bC,Cm,Sm=x(()=>{bC="__lodash_hash_undefined__";Cm=_C});function EC(t){return this.__data__.has(t)}var Im,wm=x(()=>{Im=EC});function ho(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new br;++e{so();Sm();wm();ho.prototype.add=ho.prototype.push=Cm;ho.prototype.has=Im;Nm=ho});function TC(t,e){for(var n=-1,r=t==null?0:t.length;++n{Dm=TC});function xC(t,e){return t.has(e)}var km,Rm=x(()=>{km=xC});function CC(t,e,n,r,s,i){var a=n&yC,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var l=i.get(t),d=i.get(e);if(l&&d)return l==e&&d==t;var h=-1,f=!0,p=n&AC?new Nm:void 0;for(i.set(t,e),i.set(e,t);++h{vm();Om();Rm();yC=1,AC=2;po=CC});function SC(t){var e=-1,n=Array(t.size);return t.forEach(function(r,s){n[++e]=[s,r]}),n}var Lm,Pm=x(()=>{Lm=SC});function IC(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Mm,Fm=x(()=>{Mm=IC});function HC(t,e,n,r,s,i,a){switch(n){case jC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case BC:return!(t.byteLength!=e.byteLength||!i(new Wc(t),new Wc(e)));case vC:case DC:case RC:return ts(+t,+e);case OC:return t.name==e.name&&t.message==e.message;case LC:case MC:return t==e+"";case kC:var o=Lm;case PC:var c=r&wC;if(o||(o=Mm),t.size!=e.size&&!c)return!1;var l=a.get(t);if(l)return l==e;r|=NC,a.set(t,e);var d=po(o(t),o(e),r,s,i,a);return a.delete(t),d;case FC:if(Gc)return Gc.call(t)==Gc.call(e)}return!1}var wC,NC,vC,DC,OC,kC,RC,LC,PC,MC,FC,BC,jC,Bm,Gc,jm,Hm=x(()=>{Gr();Am();Qa();$c();Pm();Fm();wC=1,NC=2,vC="[object Boolean]",DC="[object Date]",OC="[object Error]",kC="[object Map]",RC="[object Number]",LC="[object RegExp]",PC="[object Set]",MC="[object String]",FC="[object Symbol]",BC="[object ArrayBuffer]",jC="[object DataView]",Bm=ct?ct.prototype:void 0,Gc=Bm?Bm.valueOf:void 0;jm=HC});function qC(t,e,n,r,s,i){var a=n&UC,o=Kc(t),c=o.length,l=Kc(e),d=l.length;if(c!=d&&!a)return!1;for(var h=c;h--;){var f=o[h];if(!(a?f in e:VC.call(e,f)))return!1}var p=i.get(t),E=i.get(e);if(p&&E)return p==e&&E==t;var T=!0;i.set(t,e),i.set(e,t);for(var w=a;++h{hm();UC=1,zC=Object.prototype,VC=zC.hasOwnProperty;Um=qC});function WC(t,e,n,r,s,i){var a=Fe(t),o=Fe(e),c=a?qm:Yc(t),l=o?qm:Yc(e);c=c==Vm?mo:c,l=l==Vm?mo:l;var d=c==mo,h=l==mo,f=c==l;if(f&&pi(t)){if(!pi(e))return!1;a=!0,d=!1}if(f&&!d)return i||(i=new fs),a||eo(t)?po(t,e,n,r,s,i):jm(t,e,c,n,r,s,i);if(!(n&KC)){var p=d&&Km.call(t,"__wrapped__"),E=h&&Km.call(e,"__wrapped__");if(p||E){var T=p?t.value():t,w=E?e.value():e;return i||(i=new fs),s(T,w,n,r,i)}}return f?(i||(i=new fs),Um(t,e,n,r,s,i)):!1}var KC,Vm,qm,mo,YC,Km,Ym,Wm=x(()=>{qc();$c();Hm();zm();ym();Kt();Lc();Bc();KC=1,Vm="[object Arguments]",qm="[object Array]",mo="[object Object]",YC=Object.prototype,Km=YC.hasOwnProperty;Ym=WC});function $m(t,e,n,r,s){return t===e?!0:t==null||e==null||!Vt(t)&&!Vt(e)?t!==t&&e!==e:Ym(t,e,n,r,$m,s)}var go,Qc=x(()=>{Wm();Xr();go=$m});function QC(t,e,n,r){var s=n.length,i=s,a=!r;if(t==null)return!i;for(t=Object(t);s--;){var o=n[s];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++s{qc();Qc();$C=1,GC=2;Gm=QC});function XC(t){return t===t&&!xt(t)}var bo,Xc=x(()=>{gr();bo=XC});function ZC(t){for(var e=ss(t),n=e.length;n--;){var r=e[n],s=t[r];e[n]=[r,s,bo(s)]}return e}var Xm,Zm=x(()=>{Xc();to();Xm=ZC});function JC(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var _o,Zc=x(()=>{_o=JC});function eS(t){var e=Xm(t);return e.length==1&&e[0][2]?_o(e[0][0],e[0][1]):function(n){return n===t||Gm(n,t,e)}}var Jm,eg=x(()=>{Qm();Zm();Zc();Jm=eS});function tS(t,e){return t!=null&&e in Object(t)}var tg,ng=x(()=>{tg=tS});function nS(t,e,n){e=ao(e,t);for(var r=-1,s=e.length,i=!1;++r{zc();Za();Kt();Ga();Xa();Ti();rg=nS});function rS(t,e){return t!=null&&rg(t,e,tg)}var ig,ag=x(()=>{ng();sg();ig=rS});function aS(t,e){return is(t)&&bo(e)?_o(Kn(t),e):function(n){var r=Hp(n,t);return r===void 0&&r===e?ig(n,t):go(e,r,sS|iS)}}var sS,iS,og,ug=x(()=>{Qc();Up();ag();no();Xc();Zc();Ti();sS=1,iS=2;og=aS});function oS(t){return function(e){return e==null?void 0:e[t]}}var cg,lg=x(()=>{cg=oS});function uS(t){return function(e){return cs(e,t)}}var fg,dg=x(()=>{oo();fg=uS});function cS(t){return is(t)?cg(Kn(t)):fg(t)}var hg,pg=x(()=>{lg();dg();no();Ti();hg=cS});function lS(t){return typeof t=="function"?t:t==null?Bn:typeof t=="object"?Fe(t)?og(t[0],t[1]):Jm(t):hg(t)}var mg,gg=x(()=>{eg();ug();di();Kt();pg();mg=lS});function fS(t){return function(e,n,r){for(var s=-1,i=Object(e),a=r(e),o=a.length;o--;){var c=a[t?o:++s];if(n(i[c],c,i)===!1)break}return e}}var bg,_g=x(()=>{bg=fS});var dS,Eg,Tg=x(()=>{_g();dS=bg(),Eg=dS});function hS(t,e){return t&&Eg(t,e,ss)}var xg,yg=x(()=>{Tg();to();xg=hS});function pS(t,e){return function(n,r){if(n==null)return n;if(!Hn(n))return t(n,r);for(var s=n.length,i=e?s:-1,a=Object(n);(e?i--:++i{hi();Ag=pS});var mS,Sg,Ig=x(()=>{yg();Cg();mS=Ag(xg),Sg=mS});var gS,Eo,wg=x(()=>{Ut();gS=function(){return je.Date.now()},Eo=gS});function TS(t,e,n){var r,s,i,a,o,c,l=0,d=!1,h=!1,f=!0;if(typeof t!="function")throw new TypeError(bS);e=Nc(e)||0,xt(n)&&(d=!!n.leading,h="maxWait"in n,i=h?_S(Nc(n.maxWait)||0,e):i,f="trailing"in n?!!n.trailing:f);function p(A){var N=r,O=s;return r=s=void 0,l=A,a=t.apply(O,N),a}function E(A){return l=A,o=setTimeout(m,e),d?p(A):a}function T(A){var N=A-c,O=A-l,P=e-N;return h?ES(P,i-O):P}function w(A){var N=A-c,O=A-l;return c===void 0||N>=e||N<0||h&&O>=i}function m(){var A=Eo();if(w(A))return S(A);o=setTimeout(m,T(A))}function S(A){return o=void 0,f&&r?p(A):(r=s=void 0,a)}function C(){o!==void 0&&clearTimeout(o),l=0,r=c=s=o=void 0}function b(){return o===void 0?a:S(Eo())}function I(){var A=Eo(),N=w(A);if(r=arguments,s=this,c=A,N){if(o===void 0)return E(c);if(h)return clearTimeout(o),o=setTimeout(m,e),p(c)}return o===void 0&&(o=setTimeout(m,e)),a}return I.cancel=C,I.flush=b,I}var bS,_S,ES,xi,Ng=x(()=>{gr();wg();s0();bS="Expected a function",_S=Math.max,ES=Math.min;xi=TS});function yS(t){return t=io(t),t&&xS.test(t)?t.replace(vg,"\\$&"):t}var vg,xS,Yn,Dg=x(()=>{Uc();vg=/[\\^$.*+?()[\]{}|]/g,xS=RegExp(vg.source);Yn=yS});function AS(t,e){var n=-1,r=Hn(t)?Array(t.length):[];return Sg(t,function(s,i,a){r[++n]=e(s,i,a)}),r}var Og,kg=x(()=>{Ig();hi();Og=AS});function CS(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}var Rg,Lg=x(()=>{Rg=CS});function SS(t,e){if(t!==e){var n=t!==void 0,r=t===null,s=t===t,i=qt(t),a=e!==void 0,o=e===null,c=e===e,l=qt(e);if(!o&&!l&&!i&&t>e||i&&a&&c&&!o&&!l||r&&a&&c||!n&&c||!s)return 1;if(!r&&!i&&!l&&t{Zr();Pg=SS});function IS(t,e,n){for(var r=-1,s=t.criteria,i=e.criteria,a=s.length,o=n.length;++r=o)return c;var l=n[r];return c*(l=="desc"?-1:1)}}return t.index-e.index}var Fg,Bg=x(()=>{Mg();Fg=IS});function wS(t,e,n){e.length?e=Jr(e,function(i){return Fe(i)?function(a){return cs(a,i.length===1?i[0]:i)}:i}):e=[Bn];var r=-1;e=Jr(e,Ja(mg));var s=Og(t,function(i,a,o){var c=Jr(e,function(l){return l(i)});return{criteria:c,index:++r,value:i}});return Rg(s,function(i,a){return Fg(i,a,n)})}var jg,Hg=x(()=>{wc();oo();gg();kg();Lg();Pc();Bg();di();Kt();jg=wS});var NS,Jc,Ug=x(()=>{Wp();Hg();v0();D0();NS=N0(function(t,e){if(t==null)return[];var n=e.length;return n>1&&kc(t,e[0],e[1])?e=[]:n>2&&kc(e[0],e[1],e[2])&&(e=[e[0]]),jg(t,Yp(e,1),[])}),Jc=NS});var yi=x(()=>{Ng();Dg();Ug();});function xo(t){return{useCache:!0,hideExcluded:!1,downrankedFoldersFilters:[],ignoreDiacritics:!0,ignoreArabicDiacritics:!1,indexedFileTypes:[],displayTitle:"",PDFIndexing:!1,officeIndexing:!1,imagesIndexing:!1,aiImageIndexing:!1,unsupportedFilesIndexing:"default",splitCamelCase:!1,openInNewPane:!1,vimLikeNavigationShortcut:t.vault.getConfig("vimMode"),ribbonIcon:!0,showExcerpt:!0,maxEmbeds:5,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,tokenizeUrls:!1,fuzziness:"1",weightBasename:10,weightDirectory:7,weightH1:6,weightH2:5,weightH3:4,weightUnmarkedTags:2,weightCustomProperties:[],httpApiEnabled:!1,httpApiPort:"51361",httpApiNotice:!0,welcomeMessage:"",verboseLogging:!1,DANGER_httpHost:null,DANGER_forceSaveCache:!1}}function yt(t){let e=new DocumentFragment;return e.createSpan({},n=>{n.innerHTML=t}),e}async function zg(t){return z=Object.assign({},xo(t.app),await t.loadData()),Er.set(z.showExcerpt),xc(z.verboseLogging),z}async function ue(t){await t.saveData(z)}function tl(t){return t.loadLocalStorage(ii)==="1"}function Wn(){return!G.Platform.isIosApp&&z.useCache}var G,Er,To,el,z,nl=x(()=>{G=be(require("obsidian"));hc();en();ut();yi();Er=Ma(!1),To='Needs a restart to fully take effect.',el=class extends G.PluginSettingTab{constructor(e){super(e.app,e);this.plugin=e,Er.subscribe(async n=>{z.showExcerpt=n,await ue(this.plugin)})}display(){let{containerEl:e}=this,n=this.plugin.database,r=this.plugin.getTextExtractor(),s=xi(async()=>{await n.clearCache()},1e3),i=this.plugin.getAIImageAnalyzer();if(e.empty(),this.app.loadLocalStorage(ii)=="1"){let h=e.createEl("span");h.innerHTML='\u26A0\uFE0F OMNISEARCH IS DISABLED \u26A0\uFE0F'}e.createEl("h1",{text:"Omnisearch"});let a=e.createDiv();a.innerHTML=` Buy Me a Coffee at ko-fi.com `,new G.Setting(e).setName("Indexing").setHeading().setDesc(yt(`\u26A0\uFE0F Changing indexing settings will clear the cache, and requires a restart of Obsidian.

${r?`\u{1F44D} You have installed Text Extractor, Omnisearch can use it to index PDFs and images contents.
Text extraction only works on desktop, but the cache can be synchronized with your mobile device.`:'\u26A0\uFE0F Omnisearch requires Text Extractor to index PDFs and images.'} ${i?'
\u{1F44D} You have installed AI Image Analyzer, Omnisearch can use it to index images contents with ai.':'
\u26A0\uFE0F Omnisearch requires AI Image Analyzer to index images with ai.'}`)),new G.Setting(e).setName(`PDFs content indexing ${r?"":"\u26A0\uFE0F Disabled"}`).setDesc(yt("Omnisearch will use Text Extractor to index the content of your PDFs.")).addToggle(h=>h.setValue(z.PDFIndexing).onChange(async f=>{await n.clearCache(),z.PDFIndexing=f,await ue(this.plugin)})).setDisabled(!r),new G.Setting(e).setName(`Images OCR indexing ${r?"":"\u26A0\uFE0F Disabled"}`).setDesc(yt("Omnisearch will use Text Extractor to OCR your images and index their content.")).addToggle(h=>h.setValue(z.imagesIndexing).onChange(async f=>{await n.clearCache(),z.imagesIndexing=f,await ue(this.plugin)})).setDisabled(!r);let o=new DocumentFragment;o.createSpan({},h=>{h.innerHTML='Omnisearch will use Text Extractor to index the content of your office documents (currently
.docx
and
.xlsx
).'}),new G.Setting(e).setName(`Documents content indexing ${r?"":"\u26A0\uFE0F Disabled"}`).setDesc(o).addToggle(h=>h.setValue(z.officeIndexing).onChange(async f=>{await n.clearCache(),z.officeIndexing=f,await ue(this.plugin)})).setDisabled(!r);let c=new DocumentFragment;c.createSpan({},h=>{h.innerHTML="Omnisearch will use AI Image Analyzer to index the content of your images with ai."}),new G.Setting(e).setName(`Images AI indexing ${i?"":"\u26A0\uFE0F Disabled"}`).setDesc(c).addToggle(h=>h.setValue(z.aiImageIndexing).onChange(async f=>{await n.clearCache(),z.aiImageIndexing=f,await ue(this.plugin)})).setDisabled(!i),new G.Setting(e).setName("Index paths of unsupported files").setDesc(yt(` Omnisearch can index filenames of "unsupported" files, such as e.g.
.mp4
or non-extracted PDFs & images.
"Obsidian setting" will respect the value of "Files & Links > Detect all file extensions".`)).addDropdown(h=>{h.addOptions({yes:"Yes",no:"No",default:"Obsidian setting"}).setValue(z.unsupportedFilesIndexing).onChange(async f=>{await s(),z.unsupportedFilesIndexing=f,await ue(this.plugin)})}),new G.Setting(e).setName("Set frontmatter property key as title").setDesc(yt(`If you have a custom property in your notes that you want to use as the title in search results.
Leave empty to disable.`)).addText(h=>{h.setValue(z.displayTitle).onChange(async f=>{await s(),z.displayTitle=f,await ue(this.plugin)})}),new G.Setting(e).setName("Additional TEXT files to index").setDesc(yt(`In addition to standard md files, Omnisearch can also index other PLAINTEXT files.
Add extensions separated by a space, without the dot. Example: "txt org csv".
\u26A0\uFE0F Using extensions of non-plaintext files (like .pptx) WILL cause crashes, because Omnisearch will try to index their content.`)).addText(h=>{h.setValue(z.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org csv").onChange(async f=>{await n.clearCache(),z.indexedFileTypes=f.split(" "),await ue(this.plugin)})}),new G.Setting(e).setName("Behavior").setHeading(),new G.Setting(e).setName("Save index to cache").setDesc("Enable caching to speed up indexing time. In rare cases, the cache write may cause a crash in Obsidian. This option will disable itself if it happens.").addToggle(h=>h.setValue(z.useCache).onChange(async f=>{z.useCache=f,await ue(this.plugin)})),new G.Setting(e).setName("Show previous query results").setDesc("Re-executes the previous query when opening Omnisearch.").addToggle(h=>h.setValue(z.showPreviousQueryResults).onChange(async f=>{z.showPreviousQueryResults=f,await ue(this.plugin)})),new G.Setting(e).setName(`Respect Obsidian's "Excluded Files"`).setDesc(`By default, files that are in Obsidian's "Options > Files & Links > Excluded Files" list are downranked in results. Enable this option to completely hide them.`).addToggle(h=>h.setValue(z.hideExcluded).onChange(async f=>{z.hideExcluded=f,await ue(this.plugin)})),new G.Setting(e).setName("Folders to downrank in search results").setDesc("Folders to downrank in search results. Files in these folders will be downranked in results. They will still be indexed for tags, unlike excluded files. Folders should be comma delimited.").addText(h=>{h.setValue(z.downrankedFoldersFilters.join(",")).setPlaceholder("Example: src,p2/dir").onChange(async f=>{let p=f.split(",");p=p.map(E=>E.trim()),z.downrankedFoldersFilters=p,await ue(this.plugin)})}),new G.Setting(e).setName("Split CamelCaseWords").setDesc(yt(`Enable this if you want to be able to search for CamelCaseWords as separate words.
\u26A0\uFE0F Changing this setting will clear the cache.
${To}`)).addToggle(h=>h.setValue(z.splitCamelCase).onChange(async f=>{await n.clearCache(),z.splitCamelCase=f,await ue(this.plugin)})),new G.Setting(e).setName("Simpler search").setDesc(`Enable this if Obsidian often freezes while making searches. Words shorter than 3 characters won't be used as prefixes; this can reduce search delay but will return fewer results.`).addToggle(h=>h.setValue(z.simpleSearch).onChange(async f=>{z.simpleSearch=f,await ue(this.plugin)})),G.Platform.isIosApp||new G.Setting(e).setName("Tokenize URLs").setDesc(`Enable this if you want to be able to search for URLs as separate words. This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.`).addToggle(h=>h.setValue(z.tokenizeUrls).onChange(async f=>{z.tokenizeUrls=f,await ue(this.plugin)})),new G.Setting(e).setName("Open in new pane").setDesc("Open and create files in a new pane instead of the current pane.").addToggle(h=>h.setValue(z.openInNewPane).onChange(async f=>{z.openInNewPane=f,await ue(this.plugin)})),new G.Setting(e).setName("Set Vim like navigation keys").setDesc(`Navigate down the results with ${vt()} + J/N, or navigate up with ${vt()} + K/P.`).addToggle(h=>h.setValue(z.vimLikeNavigationShortcut).onChange(async f=>{z.vimLikeNavigationShortcut=f,await ue(this.plugin)})),new G.Setting(e).setName("Fuzziness").setDesc("Define the level of fuzziness for the search. The higher the fuzziness, the more results you'll get.").addDropdown(h=>h.addOptions({0:"Exact match",1:"Not too fuzzy",2:"Fuzzy enough"}).setValue(z.fuzziness).onChange(async f=>{["0","1","2"].includes(f)||(f="2"),z.fuzziness=f,await ue(this.plugin)})),new G.Setting(e).setName("User Interface").setHeading(),new G.Setting(e).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(h=>h.setValue(z.ribbonIcon).onChange(async f=>{z.ribbonIcon=f,await ue(this.plugin),f?this.plugin.addRibbonButton():this.plugin.removeRibbonButton()})),new G.Setting(e).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(h=>h.setValue(z.showExcerpt).onChange(async f=>{Er.set(f)})),new G.Setting(e).setName("Show embed references").setDesc(yt(`Some results are embedded in other notes.
This setting controls the maximum number of embeds to show in the search results. Set to 0 to disable.
Also works with Text Extractor for embedded images and documents.`)).addSlider(h=>{h.setLimits(0,10,1).setValue(z.maxEmbeds).setDynamicTooltip().onChange(async f=>{z.maxEmbeds=f,await ue(this.plugin)})}),new G.Setting(e).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(h=>h.setValue(z.renderLineReturnInExcerpts).onChange(async f=>{z.renderLineReturnInExcerpts=f,await ue(this.plugin)})),new G.Setting(e).setName('Show "Create note" button').setDesc(yt(`Shows a button next to the search input, to create a note. Acts the same as the shift \u21B5 shortcut, can be useful for mobile device users.`)).addToggle(h=>h.setValue(z.showCreateButton).onChange(async f=>{z.showCreateButton=f,await ue(this.plugin)})),new G.Setting(e).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(h=>h.setValue(z.highlight).onChange(async f=>{z.highlight=f,await ue(this.plugin)}));let l=xo(this.app);new G.Setting(e).setName("Results weighting").setHeading(),new G.Setting(e).setName(`File name & declared aliases (default: ${l.weightBasename})`).addSlider(h=>this.weightSlider(h,"weightBasename")),new G.Setting(e).setName(`File directory (default: ${l.weightDirectory})`).addSlider(h=>this.weightSlider(h,"weightDirectory")),new G.Setting(e).setName(`Headings level 1 (default: ${l.weightH1})`).addSlider(h=>this.weightSlider(h,"weightH1")),new G.Setting(e).setName(`Headings level 2 (default: ${l.weightH2})`).addSlider(h=>this.weightSlider(h,"weightH2")),new G.Setting(e).setName(`Headings level 3 (default: ${l.weightH3})`).addSlider(h=>this.weightSlider(h,"weightH3")),new G.Setting(e).setName(`Tags (default: ${l.weightUnmarkedTags})`).addSlider(h=>this.weightSlider(h,"weightUnmarkedTags")),new G.Setting(e).setName("Header properties fields").setDesc('You can set custom weights for values of header properties (e.g. "keywords"). Weights under 1.0 will downrank the results.');for(let h=0;h{p.setPlaceholder("Property name").setValue(f.name).onChange(async E=>{f.name=E,await ue(this.plugin)})}).addSlider(p=>{p.setLimits(.1,5,.1).setValue(f.weight).setDynamicTooltip().onChange(async E=>{f.weight=E,await ue(this.plugin)})}).addButton(p=>{p.setButtonText("Remove"),p.onClick(async()=>{z.weightCustomProperties.splice(h,1),await ue(this.plugin),this.display()})})}new G.Setting(e).addButton(h=>{h.setButtonText("Add a new property"),h.onClick(f=>{z.weightCustomProperties.push({name:"",weight:1}),this.display()})}),G.Platform.isMobile||(new G.Setting(e).setName("API Access Through HTTP").setHeading().setDesc(yt('Omnisearch can be used through a simple HTTP server (more information).')),new G.Setting(e).setName("Enable the HTTP server").addToggle(h=>h.setValue(z.httpApiEnabled).onChange(async f=>{z.httpApiEnabled=f,f?this.plugin.apiHttpServer.listen(z.httpApiPort):this.plugin.apiHttpServer.close(),await ue(this.plugin)})),new G.Setting(e).setName("HTTP Port").addText(h=>{h.setValue(z.httpApiPort).setPlaceholder("51361").onChange(async f=>{parseInt(f)>65535&&(f=z.httpApiPort,h.setValue(z.httpApiPort)),z.httpApiPort=f,z.httpApiEnabled&&(this.plugin.apiHttpServer.close(),this.plugin.apiHttpServer.listen(z.httpApiPort)),await ue(this.plugin)})}),new G.Setting(e).setName("Show a notification when the server starts").setDesc("Will display a notification if the server is enabled, at Obsidian startup.").addToggle(h=>h.setValue(z.httpApiNotice).onChange(async f=>{z.httpApiNotice=f,await ue(this.plugin)}))),new G.Setting(e).setName("Debugging").setHeading(),new G.Setting(e).setName("Enable verbose logging").setDesc("Adds a LOT of logs for debugging purposes. Don't forget to disable it.").addToggle(h=>h.setValue(z.verboseLogging).onChange(async f=>{z.verboseLogging=f,xc(f),await ue(this.plugin)})),new G.Setting(e).setName("Danger Zone").setHeading(),new G.Setting(e).setName("Ignore diacritics").setDesc(yt(`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".
\u26A0\uFE0F You probably should NOT disable this.
\u26A0\uFE0F Changing this setting will clear the cache.
${To}`)).addToggle(h=>h.setValue(z.ignoreDiacritics).onChange(async f=>{await n.clearCache(),z.ignoreDiacritics=f,await ue(this.plugin)})),new G.Setting(e).setName("Ignore Arabic diacritics (beta)").addToggle(h=>h.setValue(z.ignoreArabicDiacritics).onChange(async f=>{await n.clearCache(),z.ignoreArabicDiacritics=f,await ue(this.plugin)}));let d=new DocumentFragment;d.createSpan({},h=>{h.innerHTML=`Disable Omnisearch on this device only.
${To}`}),new G.Setting(e).setName("Disable on this device").setDesc(d).addToggle(h=>h.setValue(tl(this.app)).onChange(async f=>{f?(this.app.saveLocalStorage(ii,"1"),new G.Notice("Omnisearch - Disabled. Please restart Obsidian.")):(this.app.saveLocalStorage(ii),new G.Notice("Omnisearch - Enabled. Please restart Obsidian."))})),new G.Setting(e).setName("Force save the cache").setDesc(yt(`Omnisearch has a security feature that automatically disables cache writing if it cannot fully perform the operation.
Use this option to force the cache to be saved, even if it causes a crash.
\u26A0\uFE0F Enabling this setting could lead to crash loops`)).addToggle(h=>h.setValue(z.DANGER_forceSaveCache).onChange(async f=>{z.DANGER_forceSaveCache=f,await ue(this.plugin)})),Wn()&&new G.Setting(e).setName("Clear cache data").setDesc(yt(`Erase all Omnisearch cache data. Use this if Omnisearch results are inconsistent, missing, or appear outdated.
${To}`)).addButton(h=>{h.setButtonText("Clear cache"),h.onClick(async()=>{await n.clearCache()})})}weightSlider(e,n){e.setLimits(1,10,.5).setValue(z[n]).setDynamicTooltip().onChange(async r=>{z[n]=r,await ue(this.plugin)})}}});function vS(t){let e;return{c(){e=U("span"),e.innerHTML='',q(e,"class","suggestion-flair"),q(e,"aria-label","Not created yet, select to create")},m(n,r){re(n,e,r)},p:Se,i:Se,o:Se,d(n){n&&ne(e)}}}function DS(t){"use strict";return[]}var Vg,qg,Kg=x(()=>{wt();Vg=class extends Ge{constructor(e){super();et(this,e,DS,vS,qe,{})}},qg=Vg});function Yg(t){let e,n;return e=new qg({}),{c(){pt(e.$$.fragment)},m(r,s){ot(e,r,s),n=!0},i(r){n||(me(e.$$.fragment,r),n=!0)},o(r){Te(e.$$.fragment,r),n=!1},d(r){Je(e,r)}}}function OS(t){let e,n,r,s,i,a,o=t[2]&&Yg(t),c=t[5].default,l=Ur(c,t,t[4],null);return{c(){e=U("div"),o&&o.c(),n=ie(),l&&l.c(),q(e,"data-result-id",t[0]),q(e,"class",r="suggestion-item omnisearch-result "+t[3]),ac(e,"is-selected",t[1])},m(d,h){re(d,e,h),o&&o.m(e,null),B(e,n),l&&l.m(e,null),s=!0,i||(a=[$e(e,"mousemove",t[6]),$e(e,"click",t[7]),$e(e,"keypress",t[8]),$e(e,"auxclick",t[9])],i=!0)},p(d,[h]){d[2]?o?h&4&&me(o,1):(o=Yg(d),o.c(),me(o,1),o.m(e,n)):o&&(hr(),Te(o,1,1,()=>{o=null}),pr()),l&&l.p&&(!s||h&16)&&Vr(l,c,d,d[4],s?zr(c,d[4],h,null):qr(d[4]),null),(!s||h&1)&&q(e,"data-result-id",d[0]),(!s||h&8&&r!==(r="suggestion-item omnisearch-result "+d[3]))&&q(e,"class",r),(!s||h&10)&&ac(e,"is-selected",d[1])},i(d){s||(me(o),me(l,d),s=!0)},o(d){Te(o),Te(l,d),s=!1},d(d){d&&ne(e),o&&o.d(),l&&l.d(d),i=!1,Ht(a)}}}function kS(t,e,n){let{$$slots:r={},$$scope:s}=e,{id:i}=e,{selected:a=!1}=e,{glyph:o=!1}=e,{cssClass:c=""}=e;function l(p){Tt.call(this,t,p)}function d(p){Tt.call(this,t,p)}function h(p){Tt.call(this,t,p)}function f(p){Tt.call(this,t,p)}return t.$$set=p=>{"id"in p&&n(0,i=p.id),"selected"in p&&n(1,a=p.selected),"glyph"in p&&n(2,o=p.glyph),"cssClass"in p&&n(3,c=p.cssClass),"$$scope"in p&&n(4,s=p.$$scope)},[i,a,o,c,s,r,l,d,h,f]}var Wg,yo,rl=x(()=>{wt();Kg();Wg=class extends Ge{constructor(e){super();et(this,e,kS,OS,qe,{id:0,selected:1,glyph:2,cssClass:3})}},yo=Wg});function il(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var $g,sl,al=x(()=>{en();ut();$g=be(require("obsidian"));yi();sl=class{constructor(e){this.plugin=e}highlightText(e,n){let r=`suggestion-highlight omnisearch-highlight ${this.plugin.settings.highlight?"omnisearch-default-highlight":""}`;if(!n.length)return e;try{let s=new RegExp(n.map(o=>{let c=Yn(o.match);return`\\b${c}\\b${/[a-zA-Z]/.test(o.match)?"":`|${c}`}`}).join("|"),"giu"),i=o=>n.find(l=>o.match(new RegExp(`\\b${Yn(l.match)}\\b${/[a-zA-Z]/.test(l.match)?"":`|${Yn(l.match)}`}`,"giu")))?`${o}`:o,a=e.replace(s,i);if(a===e){let o=new RegExp(n.map(c=>Yn(c.match)).join("|"),"giu");a=e.replace(o,i)}return a}catch(s){return console.error("Omnisearch - Error in highlightText()",s),e}}stringsToRegex(e){if(!e.length)return/^$/g;e.sort((r,s)=>s.length-r.length);let n=`(${e.map(r=>`\\b${Yn(r)}\\b|${Yn(r)}`).join("|")})`;return new RegExp(`${n}`,"gui")}getMatches(e,n,r){let s=this.stringsToRegex(n),i=e;this.plugin.settings.ignoreDiacritics&&(e=cn(e,this.plugin.settings.ignoreArabicDiacritics));let a=new Date().getTime(),o=null,c=[],l=0;for(;(o=s.exec(e))!==null;){if(++l>=100||new Date().getTime()-a>50){fn("Stopped getMatches at",l,"results");break}let d=o.index,h=d+o[0].length,f=i.substring(d,h).trim();f&&o.index>=0&&c.push({match:f,offset:o.index})}if(r&&(r.query.text.length>1||r.getExactTerms().length>0)){let d=e.indexOf(r.getBestStringForExcerpt());d>-1&&c.find(h=>h.offset===d)&&c.unshift({offset:d,match:r.getBestStringForExcerpt()})}return c}makeExcerpt(e,n){let r=this.plugin.settings;try{let s=n??-1,i=Math.max(0,s-wh),a=Math.min(e.length,s+si);if(s>-1?e=(i>0?"\u2026":"")+e.slice(i,a).trim()+(al).join(` `);let c=e.lastIndexOf(` `,s-i);c>0&&(e=e.slice(c))}return e=il(e),r.renderLineReturnInExcerpts&&(e=e.trim().replaceAll(` `,"
")),e}catch(s){return new $g.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(s),""}}}});async function Gg(t){let e=t.app;if(!e.plugins.getPlugin("obsidian-icon-folder"))return{};let r=`${e.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let s=await e.vault.adapter.read(r),i=JSON.parse(s),a={};for(let o in i){let c=(0,ds.normalizePath)(o);a[c]=i[o]}return a}catch(s){return fn("Failed to read data.json:",s),{}}}async function Qg(t){let e={Li:"lucide-icons"},n="icons",r=t.app,s=r.plugins.getPlugin("obsidian-icon-folder");if(s){n=s.settings?.iconPacksPath||"icons";let a=`${r.vault.configDir}/${n}`;try{let o=await r.vault.adapter.list(a);if(o.folders&&o.folders.length>0)for(let c of o.folders){let l=c.split("/"),d=l[l.length-1],h=RS(d);e[h]=d}}catch(o){fn("Failed to list icon packs:",o)}}return{prefixToIconPack:e,iconsPath:n}}function RS(t){if(t.includes("-")){let e=t.split("-"),n=e[0].charAt(0).toUpperCase();for(let r=1;r${il(a)}`;let o=r[i];if(!o)return fn(`No icon pack found for prefix: ${i}`),null;if(o==="lucide-icons"){let c=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=(0,ds.getIcon)(c);return l?l.outerHTML:(fn(`Lucide icon not found: ${c}`),null)}else{if(!n)return fn("Icons path is not set. Cannot load icon SVG."),null;let c=`${e.app.vault.configDir}/${n}/${o}/${a}.svg`;try{return await e.app.vault.adapter.read(c)}catch(l){return fn(`Failed to load icon SVG for ${t} at ${c}:`,l),null}}}function cl(t,e){let n="file";tn(t)?n="image":nn(t)?n="file-text":(ln(t)||Ua(t))&&(n="layout-dashboard");let r=(0,ds.getIcon)(n);return r?r.outerHTML:""}var ds,Xg=x(()=>{ds=be(require("obsidian"));ut();al()});function PS(t){let e,n=t[8]&&Zg(t);return{c(){n&&n.c(),e=lr()},m(r,s){n&&n.m(r,s),re(r,e,s)},p(r,s){r[8]?n?n.p(r,s):(n=Zg(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(r){n&&n.d(r),r&&ne(e)}}}function MS(t){let e;return{c(){e=U("span"),q(e,"title","The document above is embedded in this note")},m(n,r){re(n,e,r),t[15](e)},p:Se,d(n){n&&ne(e),t[15](null)}}}function Zg(t){let e,n,r,s;return{c(){e=U("span"),q(e,"class","omnisearch-result__icon")},m(i,a){re(i,e,a),r||(s=Js(n=ib.call(null,e,t[8])),r=!0)},p(i,a){n&&un(n.update)&&a&256&&n.update.call(null,i[8])},d(i){i&&ne(e),r=!1,s()}}}function Jg(t){let e,n=t[1].matches.length+"",r,s,i=(t[1].matches.length>1?"matches":"match")+"",a;return{c(){e=U("span"),r=We(n),s=We("\xA0"),a=We(i),q(e,"class","omnisearch-result__counter")},m(o,c){re(o,e,c),B(e,r),B(e,s),B(e,a)},p(o,c){c&2&&n!==(n=o[1].matches.length+"")&&Jt(r,n),c&2&&i!==(i=(o[1].matches.length>1?"matches":"match")+"")&&Jt(a,i)},d(o){o&&ne(e)}}}function eb(t){let e,n,r,s=t[2].textProcessor.highlightText(t[4],t[11])+"",i=t[7]&&tb(t);return{c(){e=U("div"),i&&i.c(),n=ie(),r=U("span"),q(e,"class","omnisearch-result__folder-path")},m(a,o){re(a,e,o),i&&i.m(e,null),B(e,n),B(e,r),r.innerHTML=s},p(a,o){a[7]?i?i.p(a,o):(i=tb(a),i.c(),i.m(e,n)):i&&(i.d(1),i=null),o&2068&&s!==(s=a[2].textProcessor.highlightText(a[4],a[11])+"")&&(r.innerHTML=s)},d(a){a&&ne(e),i&&i.d()}}}function tb(t){let e,n,r,s;return{c(){e=U("span"),q(e,"class","omnisearch-result__icon")},m(i,a){re(i,e,a),r||(s=Js(n=ib.call(null,e,t[7])),r=!0)},p(i,a){n&&un(n.update)&&a&128&&n.update.call(null,i[7])},d(i){i&&ne(e),r=!1,s()}}}function nb(t){let e,n,r=t[13]&&rb(t),s=t[6]&&sb(t);return{c(){e=U("div"),r&&r.c(),n=ie(),s&&s.c(),Et(e,"display","flex"),Et(e,"flex-direction","row")},m(i,a){re(i,e,a),r&&r.m(e,null),B(e,n),s&&s.m(e,null)},p(i,a){i[13]?r?r.p(i,a):(r=rb(i),r.c(),r.m(e,n)):r&&(r.d(1),r=null),i[6]?s?s.p(i,a):(s=sb(i),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(i){i&&ne(e),r&&r.d(),s&&s.d()}}}function rb(t){let e,n=t[2].textProcessor.highlightText(t[10],t[1].matches)+"";return{c(){e=U("div"),q(e,"class","omnisearch-result__body")},m(r,s){re(r,e,s),e.innerHTML=n},p(r,s){s&1030&&n!==(n=r[2].textProcessor.highlightText(r[10],r[1].matches)+"")&&(e.innerHTML=n)},d(r){r&&ne(e)}}}function sb(t){let e,n,r;return{c(){e=U("div"),n=U("img"),Et(n,"width","100px"),sc(n.src,r=t[6])||q(n,"src",r),q(n,"alt",""),q(e,"class","omnisearch-result__image-container")},m(s,i){re(s,e,i),B(e,n)},p(s,i){i&64&&!sc(n.src,r=s[6])&&q(n,"src",r)},d(s){s&&ne(e)}}}function FS(t){let e,n,r,s,i,a=t[2].textProcessor.highlightText(t[3],t[12])+"",o,c,l,d=Fn(t[1].path)+"",h,f,p,E;function T(I,A){return I[1].isEmbed?MS:PS}let w=T(t,-1),m=w(t),S=t[1].matches.length>0&&Jg(t),C=t[4]&&eb(t),b=!t[1].isEmbed&&nb(t);return{c(){e=U("div"),n=U("div"),r=U("span"),m.c(),s=ie(),i=U("span"),o=ie(),c=U("span"),l=We("."),h=We(d),f=ie(),S&&S.c(),p=ie(),C&&C.c(),E=ie(),b&&b.c(),q(c,"class","omnisearch-result__extension"),q(r,"class","omnisearch-result__title"),q(n,"class","omnisearch-result__title-container")},m(I,A){re(I,e,A),B(e,n),B(n,r),m.m(r,null),B(r,s),B(r,i),i.innerHTML=a,B(r,o),B(r,c),B(c,l),B(c,h),B(r,f),S&&S.m(r,null),B(e,p),C&&C.m(e,null),B(e,E),b&&b.m(e,null)},p(I,A){w===(w=T(I,A))&&m?m.p(I,A):(m.d(1),m=w(I),m&&(m.c(),m.m(r,s))),A&4108&&a!==(a=I[2].textProcessor.highlightText(I[3],I[12])+"")&&(i.innerHTML=a),A&2&&d!==(d=Fn(I[1].path)+"")&&Jt(h,d),I[1].matches.length>0?S?S.p(I,A):(S=Jg(I),S.c(),S.m(r,null)):S&&(S.d(1),S=null),I[4]?C?C.p(I,A):(C=eb(I),C.c(),C.m(e,E)):C&&(C.d(1),C=null),I[1].isEmbed?b&&(b.d(1),b=null):b?b.p(I,A):(b=nb(I),b.c(),b.m(e,null))},d(I){I&&ne(e),m.d(),S&&S.d(),C&&C.d(),b&&b.d()}}}function BS(t){let e,n;return e=new yo({props:{glyph:t[9],id:t[1].path,cssClass:" "+(t[1].isEmbed?"omnisearch-result__embed":""),selected:t[0],$$slots:{default:[FS]},$$scope:{ctx:t}}}),e.$on("auxclick",t[16]),e.$on("click",t[17]),e.$on("mousemove",t[18]),{c(){pt(e.$$.fragment)},m(r,s){ot(e,r,s),n=!0},p(r,[s]){let i={};s&512&&(i.glyph=r[9]),s&2&&(i.id=r[1].path),s&2&&(i.cssClass=" "+(r[1].isEmbed?"omnisearch-result__embed":"")),s&1&&(i.selected=r[0]),s&33570302&&(i.$$scope={dirty:s,ctx:r}),e.$set(i)},i(r){n||(me(e.$$.fragment,r),n=!0)},o(r){Te(e.$$.fragment,r),n=!1},d(r){Je(e,r)}}}function ib(t,e){return t.innerHTML=e,{update(n){t.innerHTML=n},destroy(){t.innerHTML=""}}}function jS(t,e,n){let r,s,i,a,o;ka(t,Er,J=>n(13,o=J));let{selected:c=!1}=e,{note:l}=e,{plugin:d}=e,h=null,f="",p="",E={},T=null,w=null,m={},S,C=!1;fr(async()=>{E=await Gg(d);let J=await Qg(d);m=J.prefixToIconPack,S=J.iconsPath,n(14,C=!0)});async function b(){let J=ol(p,E);J?n(7,T=await ul(J,d,S,m)):n(7,T=cl("folder",d));let $=ol(l.path,E);$?n(8,w=await ul($,d,S,m)):n(8,w=cl(l.path,d))}let I,A,N;function O(J){Ln[J?"unshift":"push"](()=>{N=J,n(5,N)})}function P(J){Tt.call(this,t,J)}function V(J){Tt.call(this,t,J)}function W(J){Tt.call(this,t,J)}t.$$set=J=>{"selected"in J&&n(0,c=J.selected),"note"in J&&n(1,l=J.note),"plugin"in J&&n(2,d=J.plugin)},t.$$.update=()=>{if(t.$$.dirty&16386){e:l&&l.path&&C&&(async()=>{n(3,f=l.displayTitle||l.basename),n(4,p=bc(l.path)),await b()})()}if(t.$$.dirty&6){e:if(n(6,h=null),tn(l.path)){let J=d.app.vault.getAbstractFileByPath(l.path);J instanceof pn.TFile&&n(6,h=d.app.vault.getResourcePath(J))}}if(t.$$.dirty&34){e:n(3,f=l.displayTitle||l.basename),n(4,p=bc(l.path)),I&&(0,pn.setIcon)(I,"folder-open"),A&&(tn(l.path)?(0,pn.setIcon)(A,"image"):nn(l.path)?(0,pn.setIcon)(A,"file-text"):ln(l.path)||Ua(l.path)?(0,pn.setIcon)(A,"layout-dashboard"):(0,pn.setIcon)(A,"file")),N&&(0,pn.setIcon)(N,"corner-down-right")}if(t.$$.dirty&14){e:n(12,r=d.textProcessor.getMatches(f,l.foundWords))}if(t.$$.dirty&22){e:n(11,s=d.textProcessor.getMatches(p,l.foundWords))}if(t.$$.dirty&6){e:n(10,i=d.textProcessor.makeExcerpt(l.content,l.matches[0]?.offset??-1))}};e:n(9,a=!1);return[c,l,d,f,p,N,h,T,w,a,i,s,r,o,C,O,P,V,W]}var pn,ab,ob,ub=x(()=>{wt();nl();ut();rl();pn=be(require("obsidian"));ri();Xg();ab=class extends Ge{constructor(e){super();et(this,e,jS,BS,qe,{selected:0,note:1,plugin:2})}},ob=ab});var cb=Rn(Ao=>{Ao.parse=function(t,e){if(e?e.offsets=typeof e.offsets=="undefined"?!0:e.offsets:e={offsets:!0},t||(t=""),t.indexOf(":")===-1&&!e.tokenize)return t;if(!e.keywords&&!e.ranges&&!e.tokenize)return t;var n={text:[]};e.offsets&&(n.offsets=[]);for(var r={},s=[],i=/(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|(-?"(?:[^"\\]|\\.)*")|(-?'(?:[^'\\]|\\.)*')|\S+|\S+:\S+/g,a;(a=i.exec(t))!==null;){var f=a[0],o=f.indexOf(":");if(o!==-1){var c=f.split(":"),l=f.slice(0,o),d=f.slice(o+1);d=d.replace(/^\"|\"$|^\'|\'$/g,""),d=(d+"").replace(/\\(.?)/g,function(A,N){switch(N){case"\\":return"\\";case"0":return"\0";case"":return"";default:return N}}),s.push({keyword:l,value:d,offsetStart:a.index,offsetEnd:a.index+f.length})}else{var h=!1;f[0]==="-"&&(h=!0,f=f.slice(1)),f=f.replace(/^\"|\"$|^\'|\'$/g,""),f=(f+"").replace(/\\(.?)/g,function(A,N){switch(N){case"\\":return"\\";case"0":return"\0";case"":return"";default:return N}}),h?r.text?(r.text instanceof Array||(r.text=[r.text]),r.text.push(f)):r.text=f:s.push({text:f,offsetStart:a.index,offsetEnd:a.index+f.length})}}s.reverse();for(var f;f=s.pop();)if(f.text)n.text.push(f.text),e.offsets&&n.offsets.push(f);else{var l=f.keyword;e.keywords=e.keywords||[];var p=!1,E=!1;if(!/^-/.test(l))p=e.keywords.indexOf(l)!==-1;else if(l[0]==="-"){var T=l.slice(1);p=e.keywords.indexOf(T)!==-1,p&&(l=T,E=!0)}e.ranges=e.ranges||[];var w=e.ranges.indexOf(l)!==-1;if(p){e.offsets&&n.offsets.push({keyword:l,value:f.value,offsetStart:E?f.offsetStart+1:f.offsetStart,offsetEnd:f.offsetEnd});var m=f.value;if(m.length){var S=m.split(",");E?r[l]?r[l]instanceof Array?S.length>1?r[l]=r[l].concat(S):r[l].push(m):(r[l]=[r[l]],r[l].push(m)):S.length>1?r[l]=S:e.alwaysArray?r[l]=[m]:r[l]=m:n[l]?n[l]instanceof Array?S.length>1?n[l]=n[l].concat(S):n[l].push(m):(n[l]=[n[l]],n[l].push(m)):S.length>1?n[l]=S:e.alwaysArray?n[l]=[m]:n[l]=m}}else if(w){e.offsets&&n.offsets.push(f);var m=f.value,C=m.split("-");n[l]={},C.length===2?(n[l].from=C[0],n[l].to=C[1]):!C.length%2||(n[l].from=m)}else{var b=f.keyword+":"+f.value;n.text.push(b),e.offsets&&n.offsets.push({text:b,offsetStart:f.offsetStart,offsetEnd:f.offsetEnd})}}return n.text.length?e.tokenize||(n.text=n.text.join(" ").trim()):delete n.text,n.exclude=r,n};Ao.stringify=function(t,e,n){if(e||(e={offsets:!0}),!t)return"";if(typeof t=="string")return t;if(Array.isArray(t))return t.join(" ");if(!Object.keys(t).length)return"";if(Object.keys(t).length===3&&!!t.text&&!!t.offsets&&!!t.exclude&&typeof t.text=="string")return t.text;n||(n="");var r=function(o){return o.indexOf(" ")>-1?JSON.stringify(o):o},s=function(o){return n+o},i=[];if(t.text){var a=[];typeof t.text=="string"?a.push(t.text):a.push.apply(a,t.text),a.length>0&&i.push(a.map(r).map(s).join(" "))}return e.keywords&&e.keywords.forEach(function(o){if(!!t[o]){var c=[];typeof t[o]=="string"?c.push(t[o]):c.push.apply(c,t[o]),c.length>0&&i.push(s(o+":"+c.map(r).join(",")))}}),e.ranges&&e.ranges.forEach(function(o){if(!!t[o]){var c=t[o].from,l=t[o].to;l&&(c=c+"-"+l),c&&i.push(s(o+":"+c))}}),t.exclude&&Object.keys(t.exclude).length>0&&i.push(Ao.stringify(t.exclude,e,"-")),i.join(" ")}});var fb=Rn((ZF,lb)=>{lb.exports=cb()});var db,ll,Tr,Co=x(()=>{ut();db=be(fb()),ll=["ext","path"],Tr=class{#e;constructor(e="",n){n.ignoreDiacritics&&(e=cn(e,n.ignoreArabicDiacritics));let r=(0,db.parse)(e.toLowerCase(),{tokenize:!0,keywords:ll});r.text=r.text??[],r.exclude=r.exclude??{},r.exclude.text=r.exclude.text??[],Array.isArray(r.exclude.text)||(r.exclude.text=[r.exclude.text]),r.exclude.text=r.exclude.text.filter(i=>i.length);for(let i of ll){let a=r[i];a&&(r[i]=Array.isArray(a)?a:[a]);let o=r.exclude[i];o&&(r.exclude[i]=Array.isArray(o)?o:[o])}this.query=r;let s=this.query.text.filter(i=>i.startsWith(".")).map(i=>i.slice(1));this.query.ext=[...new Set([...s,...this.query.ext??[]])],this.query.text=this.query.text.filter(i=>!i.startsWith(".")),this.#e=e.match(/"([^"]+)"/g)?.map(i=>i.replace(/"/g,""))??[]}isEmpty(){for(let e of ll)if(this.query[e]?.length||this.query.text.length)return!1;return!0}segmentsToStr(){return this.query.text.join(" ")}getTags(){return this.query.text.filter(e=>e.startsWith("#"))}getTagsWithoutHashtag(){return this.getTags().map(e=>e.replace(/^#/,""))}getExactTerms(){return[...new Set([...this.query.text.filter(e=>e.split(" ").length>1),...this.#e].map(e=>e.toLowerCase()))]}getBestStringForExcerpt(){return this.#e.length?this.#e.sort((e,n)=>n.length-e.length)[0]??"":this.segmentsToStr()}}});var hb=Rn(So=>{function fl(t){return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fl(t)}(function(t,e){if(typeof define=="function"&&define.amd)define(["exports"],e);else if(typeof So!="undefined")e(So);else{var n={exports:{}};e(n.exports),t.CancelablePromise=n.exports}})(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:So,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0,t.cancelable=J,t.default=void 0,t.isCancelablePromise=$;function e(k,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(L&&L.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),L&&n(k,L)}function n(k,L){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Z,oe){return Z.__proto__=oe,Z},n(k,L)}function r(k){var L=a();return function(){var Z=o(k),oe;if(L){var Ce=o(this).constructor;oe=Reflect.construct(Z,arguments,Ce)}else oe=Z.apply(this,arguments);return s(this,oe)}}function s(k,L){if(L&&(fl(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(k)}function i(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function o(k){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(H){return H.__proto__||Object.getPrototypeOf(H)},o(k)}function c(k,L){var H=typeof Symbol!="undefined"&&k[Symbol.iterator]||k["@@iterator"];if(!H){if(Array.isArray(k)||(H=l(k))||L&&k&&typeof k.length=="number"){H&&(k=H);var Z=0,oe=function(){};return{s:oe,n:function(){return Z>=k.length?{done:!0}:{done:!1,value:k[Z++]}},e:function(Y){throw Y},f:oe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ce=!0,Ue=!1,on;return{s:function(){H=H.call(k)},n:function(){var Y=H.next();return Ce=Y.done,Y},e:function(Y){Ue=!0,on=Y},f:function(){try{!Ce&&H.return!=null&&H.return()}finally{if(Ue)throw on}}}}function l(k,L){if(!!k){if(typeof k=="string")return d(k,L);var H=Object.prototype.toString.call(k).slice(8,-1);if(H==="Object"&&k.constructor&&(H=k.constructor.name),H==="Map"||H==="Set")return Array.from(k);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return d(k,L)}}function d(k,L){(L==null||L>k.length)&&(L=k.length);for(var H=0,Z=new Array(L);HTe(i[d],1,1,()=>{i[d]=null});function o(d,h){if(!d[3].length&&d[2]&&!d[5])return VS;if(d[5])return zS}let c=o(t,[-1,-1]),l=c&&c(t);return{c(){for(let d=0;d\u2191\u2193to navigate',c=ie(),l=U("div"),d=U("span"),d.textContent=`${Ha()} \u2191\u2193`,h=ie(),f=U("span"),f.textContent="to cycle history",p=ie(),E=U("div"),T=U("span"),w=We(t[8]),m=ie(),S=U("span"),S.textContent="to open",C=ie(),b=U("div"),b.innerHTML=`Tab to switch to In-File Search`,I=ie(),A=U("div"),N=U("span"),O=We(t[7]),P=ie(),V=U("span"),V.textContent="to open in a new pane",W=ie(),J=U("div"),$=U("span"),$.textContent=`${t[11]}`,Pe=ie(),Re=U("span"),Re.textContent="to open in a new split",Ae=ie(),Ne=U("div"),k=U("span"),k.textContent=`${vt()} o`,L=ie(),H=U("span"),H.textContent="to open in the background",Z=ie(),oe=U("div"),Ce=U("span"),Ue=We(t[10]),on=ie(),Ze=U("span"),Ze.textContent="to create",Y=ie(),Le=U("div"),jt=U("span"),Zt=We(t[9]),cr=ie(),Xs=U("span"),Xs.textContent="to create in a new pane",ah=ie(),Hr=U("div"),wa=U("span"),wa.textContent=`${Ha()} \u21B5`,oh=ie(),tc=U("span"),tc.textContent="to insert a link",uh=ie(),Na=U("div"),Na.innerHTML=`Ctrl g to toggle excerpts`,ch=ie(),va=U("div"),va.innerHTML='Escto close',q(o,"class","prompt-instruction"),q(d,"class","prompt-instruction-command"),q(l,"class","prompt-instruction"),q(T,"class","prompt-instruction-command"),q(E,"class","prompt-instruction"),q(b,"class","prompt-instruction"),q(N,"class","prompt-instruction-command"),q(A,"class","prompt-instruction"),q($,"class","prompt-instruction-command"),q(J,"class","prompt-instruction"),q(k,"class","prompt-instruction-command"),q(Ne,"class","prompt-instruction"),q(Ce,"class","prompt-instruction-command"),q(oe,"class","prompt-instruction"),q(jt,"class","prompt-instruction-command"),q(Le,"class","prompt-instruction"),q(wa,"class","prompt-instruction-command"),q(Hr,"class","prompt-instruction"),q(Na,"class","prompt-instruction"),q(va,"class","prompt-instruction"),q(a,"class","prompt-instructions")},m(he,Me){ot(e,he,Me),re(he,n,Me),ht&&ht.m(he,Me),re(he,r,Me),ot(s,he,Me),re(he,i,Me),re(he,a,Me),B(a,o),B(a,c),B(a,l),B(l,d),B(l,h),B(l,f),B(a,p),B(a,E),B(E,T),B(T,w),B(E,m),B(E,S),B(a,C),B(a,b),B(a,I),B(a,A),B(A,N),B(N,O),B(A,P),B(A,V),B(a,W),B(a,J),B(J,$),B(J,Pe),B(J,Re),B(a,Ae),B(a,Ne),B(Ne,k),B(Ne,L),B(Ne,H),B(a,Z),B(a,oe),B(oe,Ce),B(Ce,Ue),B(oe,on),B(oe,Ze),B(a,Y),B(a,Le),B(Le,jt),B(jt,Zt),B(Le,cr),B(Le,Xs),B(a,ah),B(a,Hr),B(Hr,wa),B(Hr,oh),B(Hr,tc),B(a,uh),B(a,Na),B(a,ch),B(a,va),kn=!0},p(he,Me){let Da={};Me[0]&1&&(Da.plugin=he[0]),Me[0]&4&&(Da.initialValue=he[2]),Me[0]&1|Me[1]&4096&&(Da.$$scope={dirty:Me,ctx:he}),e.$set(Da),he[4]?ht?ht.p(he,Me):(ht=bb(he),ht.c(),ht.m(r.parentNode,r)):ht&&(ht.d(1),ht=null);let lh={};Me[0]&47|Me[1]&4096&&(lh.$$scope={dirty:Me,ctx:he}),s.$set(lh),(!kn||Me[0]&256)&&Jt(w,he[8]),(!kn||Me[0]&128)&&Jt(O,he[7]),(!kn||Me[0]&1024)&&Jt(Ue,he[10]),(!kn||Me[0]&512)&&Jt(Zt,he[9])},i(he){kn||(me(e.$$.fragment,he),me(s.$$.fragment,he),kn=!0)},o(he){Te(e.$$.fragment,he),Te(s.$$.fragment,he),kn=!1},d(he){t[19](null),Je(e,he),he&&ne(n),ht&&ht.d(he),he&&ne(r),Je(s,he),he&&ne(i),he&&ne(a)}}}function YS(t,e,n){let r,s;ka(t,Mn,Y=>n(18,s=Y));let{modal:i}=e,{previousQuery:a}=e,{plugin:o}=e,c=0,l=0,d,h=[],f,p="",E=!0,T,w,m,S,C,b=vt()+Ha()+" \u21B5";fr(async()=>{ae.enable("vault"),ae.on("vault",pe.Enter,W),ae.on("vault",pe.OpenInBackground,J),ae.on("vault",pe.CreateNote,k),ae.on("vault",pe.OpenInNewPane,$),ae.on("vault",pe.InsertLink,L),ae.on("vault",pe.Tab,H),ae.on("vault",pe.ArrowUp,()=>Z(-1)),ae.on("vault",pe.ArrowDown,()=>Z(1)),ae.on("vault",pe.PrevSearchHistory,I),ae.on("vault",pe.NextSearchHistory,A),ae.on("vault",pe.OpenInNewLeaf,Pe),await o.notesIndexer.refreshIndex(),await P()}),ni(()=>{ae.disable("vault")});async function I(){let Y=(await o.searchHistory.getHistory()).filter(Le=>Le);++l>=Y.length&&(l=0),n(2,d=Y[l]),T?.setInputValue(d??"")}async function A(){let Y=(await o.searchHistory.getHistory()).filter(Le=>Le);--l<0&&(l=Y.length?Y.length-1:0),n(2,d=Y[l]),T?.setInputValue(d??"")}let N=null;async function O(){n(5,E=!0),N&&(N.cancel(),N=null),f=new Tr(d,{ignoreDiacritics:o.settings.ignoreDiacritics,ignoreArabicDiacritics:o.settings.ignoreArabicDiacritics}),N=(0,pb.cancelable)(new Promise(Y=>{Y(o.searchEngine.getSuggestions(f))})),n(3,h=await N),n(1,c=0),await oe(),n(5,E=!1)}let P=xi(O,0);function V(Y){!r||(Y?.ctrlKey?$():W(),i.close())}function W(){!r||(Ae(r),i.close())}function J(){!r||Ae(r,!0)}function $(){!r||(Ae(r,!0),i.close())}function Pe(){!r||(Ae(r,!0,!0),i.close())}function Re(){d&&o.searchHistory.addToHistory(d)}function Ae(Y,Le=!1,jt=!1){Re();let Zt=Y.matches?.[0]?.offset??0;qa(o.app,Y,Zt,Le,jt)}async function Ne(Y){await k()}async function k(Y){if(d){try{await Hh(o.app,d,Y?.newLeaf)}catch(Le){new Yt.Notice(Le.message);return}i.close()}}function L(){if(!r)return;let Y=o.app.vault.getMarkdownFiles().find(Xs=>Xs.path===r.path),Le=o.app.workspace.getActiveFile(),jt=o.app.workspace.getActiveViewOfType(Yt.MarkdownView);if(!jt?.editor){new Yt.Notice("Omnisearch - Error - No active editor",3e3);return}let Zt;Y&&Le?Zt=o.app.fileManager.generateMarkdownLink(Y,Le.path):Zt=`[[${r.basename}.${Fn(r.path)}]]`;let cr=jt.editor.getCursor();jt.editor.replaceRange(Zt,cr,cr),cr.ch+=Zt.length,jt.editor.setCursor(cr),i.close()}function H(){if(!(r&&(nn(r?.path)||!r?.matches.length)))if(Re(),i.close(),r){let Y=o.app.vault.getAbstractFileByPath(r.path);Y&&Y instanceof Yt.TFile&&new hs(o,Y,d).open()}else{let Y=o.app.workspace.getActiveViewOfType(Yt.MarkdownView);Y?.file&&new hs(o,Y.file,d).open()}}function Z(Y){n(1,c=ja(c+Y,h.length)),oe()}async function oe(){await Pn(),r&&activeWindow.document.querySelector(`[data-result-id="${r.path}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}function Ce(Y){Ln[Y?"unshift":"push"](()=>{T=Y,n(6,T)})}let Ue=Y=>n(2,d=Y.detail),on=(Y,Le)=>n(1,c=Y),Ze=Y=>{Y.button==1&&$()};return t.$$set=Y=>{"modal"in Y&&n(16,i=Y.modal),"previousQuery"in Y&&n(17,a=Y.previousQuery),"plugin"in Y&&n(0,o=Y.plugin)},t.$$.update=()=>{if(t.$$.dirty[0]&131076){e:n(2,d=d??a)}if(t.$$.dirty[0]&4){e:d?P():(n(5,E=!1),n(3,h=[]))}if(t.$$.dirty[0]&10){e:r=h[c]}if(t.$$.dirty[0]&1){e:o.settings.openInNewPane?(n(7,w="\u21B5"),n(8,m=vt()+" \u21B5"),n(9,S="Shift \u21B5"),n(10,C=vt()+" Shift \u21B5")):(n(7,w=vt()+" \u21B5"),n(8,m="\u21B5"),n(9,S=vt()+" Shift \u21B5"),n(10,C="Shift \u21B5"))}if(t.$$.dirty[0]&262144){e:switch(s){case Nt.LoadingCache:n(4,p="Loading cache...");break;case Nt.ReadingFiles:n(4,p="Reading files...");break;case Nt.IndexingFiles:n(4,p="Indexing files...");break;case Nt.WritingCache:P(),n(4,p="Updating cache...");break;default:P(),n(4,p="");break}}},[o,c,d,h,p,E,T,w,m,S,C,b,V,$,Ne,H,i,a,s,Ce,Ue,on,Ze]}var Yt,pb,Tb,xb,yb,Ab=x(()=>{wt();Yt=be(require("obsidian"));ri();yc();Ac();en();li();ut();Ai();ub();Co();pb=be(hb());yi();Tb=t=>t.length<3;xb=class extends Ge{constructor(e){super();et(this,e,YS,KS,qe,{modal:16,previousQuery:17,plugin:0},null,[-1,-1])}},yb=xb});function WS(t){let e,n=t[0].textProcessor.highlightText(t[4],t[1].matches)+"";return{c(){e=U("div"),q(e,"class","omnisearch-result__body")},m(r,s){re(r,e,s),e.innerHTML=n},p(r,s){s&19&&n!==(n=r[0].textProcessor.highlightText(r[4],r[1].matches)+"")&&(e.innerHTML=n)},d(r){r&&ne(e)}}}function $S(t){let e,n;return e=new yo({props:{id:t[2].toString(),selected:t[3],$$slots:{default:[WS]},$$scope:{ctx:t}}}),e.$on("auxclick",t[6]),e.$on("click",t[7]),e.$on("mousemove",t[8]),{c(){pt(e.$$.fragment)},m(r,s){ot(e,r,s),n=!0},p(r,[s]){let i={};s&4&&(i.id=r[2].toString()),s&8&&(i.selected=r[3]),s&531&&(i.$$scope={dirty:s,ctx:r}),e.$set(i)},i(r){n||(me(e.$$.fragment,r),n=!0)},o(r){Te(e.$$.fragment,r),n=!1},d(r){Je(e,r)}}}function GS(t,e,n){let r,{plugin:s}=e,{offset:i}=e,{note:a}=e,{index:o=0}=e,{selected:c=!1}=e;function l(f){Tt.call(this,t,f)}function d(f){Tt.call(this,t,f)}function h(f){Tt.call(this,t,f)}return t.$$set=f=>{"plugin"in f&&n(0,s=f.plugin),"offset"in f&&n(5,i=f.offset),"note"in f&&n(1,a=f.note),"index"in f&&n(2,o=f.index),"selected"in f&&n(3,c=f.selected)},t.$$.update=()=>{if(t.$$.dirty&35){e:n(4,r=s.textProcessor.makeExcerpt(a?.content??"",i))}},[s,a,o,c,r,i,l,d,h]}var Cb,Sb,Ib=x(()=>{wt();rl();Cb=class extends Ge{constructor(e){super();et(this,e,GS,$S,qe,{plugin:0,offset:5,note:1,index:2,selected:3})}},Sb=Cb});function wb(t,e,n){let r=t.slice();return r[20]=e[n],r[22]=n,r}function QS(t){let e,n,r;return{c(){e=U("button"),e.textContent="Vault search"},m(s,i){re(s,e,i),n||(r=$e(e,"click",t[8]),n=!0)},p:Se,d(s){s&&ne(e),n=!1,r()}}}function XS(t){let e,n=Ci.Platform.isMobile&&QS(t);return{c(){e=U("div"),n&&n.c(),q(e,"class","omnisearch-input-container__buttons")},m(r,s){re(r,e,s),n&&n.m(e,null)},p(r,s){Ci.Platform.isMobile&&n.p(r,s)},d(r){r&&ne(e),n&&n.d()}}}function ZS(t){let e;return{c(){e=U("div"),e.textContent="We found 0 result for your search here.",Et(e,"text-align","center")},m(n,r){re(n,e,r)},p:Se,i:Se,o:Se,d(n){n&&ne(e)}}}function JS(t){let e,n,r=t[5],s=[];for(let a=0;aTe(s[a],1,1,()=>{s[a]=null});return{c(){for(let a=0;a{a[d]=null}),pr(),n=a[e],n?n.p(c,l):(n=a[e]=i[e](c),n.c()),me(n,1),n.m(r.parentNode,r))},i(c){s||(me(n),s=!0)},o(c){Te(n),s=!1},d(c){a[e].d(c),c&&ne(r)}}}function t3(t){let e;return{c(){e=U("span"),e.textContent="to close"},m(n,r){re(n,e,r)},d(n){n&&ne(e)}}}function n3(t){let e;return{c(){e=U("span"),e.textContent="to go back to Vault Search"},m(n,r){re(n,e,r)},d(n){n&&ne(e)}}}function r3(t){let e,n,r,s,i,a,o,c,l,d,h,f,p,E,T,w,m,S,C,b;e=new za({props:{plugin:t[0],placeholder:"Omnisearch - File",initialValue:t[2],$$slots:{default:[XS]},$$scope:{ctx:t}}}),e.$on("input",t[12]),r=new Va({props:{$$slots:{default:[e3]},$$scope:{ctx:t}}});function I(O,P){return O[1]?n3:t3}let A=I(t,-1),N=A(t);return{c(){pt(e.$$.fragment),n=ie(),pt(r.$$.fragment),s=ie(),i=U("div"),a=U("div"),a.innerHTML='\u2191\u2193to navigate',o=ie(),c=U("div"),c.innerHTML='\u21B5to open',l=ie(),d=U("div"),d.innerHTML=`tab to switch to Vault Search`,h=ie(),f=U("div"),p=U("span"),p.textContent="esc",E=ie(),N.c(),T=ie(),w=U("div"),m=U("span"),m.textContent=`${vt()} \u21B5`,S=ie(),C=U("span"),C.textContent="to open in a new pane",q(a,"class","prompt-instruction"),q(c,"class","prompt-instruction"),q(d,"class","prompt-instruction"),q(p,"class","prompt-instruction-command"),q(f,"class","prompt-instruction"),q(m,"class","prompt-instruction-command"),q(w,"class","prompt-instruction"),q(i,"class","prompt-instructions")},m(O,P){ot(e,O,P),re(O,n,P),ot(r,O,P),re(O,s,P),re(O,i,P),B(i,a),B(i,o),B(i,c),B(i,l),B(i,d),B(i,h),B(i,f),B(f,p),B(f,E),N.m(f,null),B(i,T),B(i,w),B(w,m),B(w,S),B(w,C),b=!0},p(O,[P]){let V={};P&1&&(V.plugin=O[0]),P&4&&(V.initialValue=O[2]),P&8388608&&(V.$$scope={dirty:P,ctx:O}),e.$set(V);let W={};P&8388721&&(W.$$scope={dirty:P,ctx:O}),r.$set(W),A!==(A=I(O,P))&&(N.d(1),N=A(O),N&&(N.c(),N.m(f,null)))},i(O){b||(me(e.$$.fragment,O),me(r.$$.fragment,O),b=!0)},o(O){Te(e.$$.fragment,O),Te(r.$$.fragment,O),b=!1},d(O){Je(e,O),O&&ne(n),Je(r,O),O&&ne(s),O&&ne(i),N.d()}}}function s3(t,e,n){let r=t.find(s=>s.offset>e);return r?t.filter(s=>s.offset>e&&s.offset<=r.offset+n):[]}function i3(t,e,n){let{plugin:r}=e,{modal:s}=e,{parent:i=null}=e,{singleFilePath:a=""}=e,{previousQuery:o}=e,c,l=[],d=0,h,f;fr(()=>{ae.enable("infile"),ae.on("infile",pe.Enter,m),ae.on("infile",pe.OpenInNewPane,w),ae.on("infile",pe.ArrowUp,()=>E(-1)),ae.on("infile",pe.ArrowDown,()=>E(1)),ae.on("infile",pe.Tab,S)}),ni(()=>{ae.disable("infile")});function p(N){let O=[],P=-1,V=0;for(;++V<100;){let W=s3(N,P,si);if(!W.length)break;P=W.last().offset,O.push(W)}return O}function E(N){n(6,d=ja(d+N,l.length)),T()}async function T(){await Pn(),document.querySelector(`[data-result-id="${d}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function w(){return m(!0)}async function m(N=!1){if(h){s.close(),i&&i.close();let O=r.textProcessor.stringsToRegex(h.foundWords);O.exec(h.content),await qa(r.app,h,O.lastIndex,N);let P=r.app.workspace.getActiveViewOfType(Ci.MarkdownView);if(!P)return;let V=l[d]??0,W=P.editor.offsetToPos(V);W.ch=0,P.editor.setCursor(W),P.editor.scrollIntoView({from:{line:W.line-10,ch:0},to:{line:W.line+10,ch:0}})}}function S(){new $n(r,c??o).open(),s.close()}let C=N=>n(3,c=N.detail),b=(N,O)=>n(6,d=N),I=N=>m(N.ctrlKey),A=N=>{N.button==1&&m(!0)};return t.$$set=N=>{"plugin"in N&&n(0,r=N.plugin),"modal"in N&&n(9,s=N.modal),"parent"in N&&n(1,i=N.parent),"singleFilePath"in N&&n(10,a=N.singleFilePath),"previousQuery"in N&&n(2,o=N.previousQuery)},t.$$.update=()=>{if(t.$$.dirty&4){e:n(3,c=o??"")}if(t.$$.dirty&3081){e:(async()=>{c&&(n(11,f=new Tr(c,{ignoreDiacritics:r.settings.ignoreDiacritics,ignoreArabicDiacritics:r.settings.ignoreArabicDiacritics})),n(4,h=(await r.searchEngine.getSuggestions(f,{singleFilePath:a}))[0]??null)),n(6,d=0),await T()})()}if(t.$$.dirty&2064){e:if(h){let N=p(h.matches),O=f.getExactTerms();O.length&&(N=N.filter(P=>O.every(V=>P.some(W=>W.match.includes(V))))),n(5,l=N.map(P=>Math.round(P.first().offset)))}}},[r,i,o,c,h,l,d,m,S,s,a,f,C,b,I,A]}var Ci,vb,Db,Ob=x(()=>{wt();yc();en();ut();ri();Ci=be(require("obsidian"));Ac();Ai();Ib();Co();li();vb=class extends Ge{constructor(e){super();et(this,e,i3,r3,qe,{plugin:0,modal:9,parent:1,singleFilePath:10,previousQuery:2})}},Db=vb});var Io,dl,$n,hs,Ai=x(()=>{Io=be(require("obsidian"));Ab();Ob();en();dl=class extends Io.Modal{constructor(e){super(e.app);let n=e.settings;this.modalEl.replaceChildren(),this.modalEl.addClass("omnisearch-modal","prompt"),this.modalEl.removeClass("modal"),this.modalEl.tabIndex=-1,this.scope.register([],"ArrowDown",c=>{c.preventDefault(),ae.emit(pe.ArrowDown)}),this.scope.register([],"ArrowUp",c=>{c.preventDefault(),ae.emit(pe.ArrowUp)});for(let c of[{k:"J",dir:"down"},{k:"K",dir:"up"}])for(let l of["Ctrl","Mod"])this.scope.register([l],c.k,d=>{n.vimLikeNavigationShortcut&&ae.emit("arrow-"+c.dir)});for(let c of[{k:"N",dir:"down"},{k:"P",dir:"up"}])for(let l of["Ctrl","Mod"])this.scope.register([l],c.k,d=>{n.vimLikeNavigationShortcut&&ae.emit("arrow-"+c.dir)});let r,s,i,a,o=["Mod","Alt"];n.openInNewPane?(r=["Mod"],s=[],i=["Mod","Shift"],a=["Shift"]):(r=[],s=["Mod"],i=["Shift"],a=["Mod","Shift"]),this.scope.register(s,"Enter",c=>{c.preventDefault(),ae.emit(pe.OpenInNewPane)}),this.scope.register(o,"Enter",c=>{c.preventDefault(),ae.emit(pe.OpenInNewLeaf)}),this.scope.register(["Alt"],"Enter",c=>{c.preventDefault(),ae.emit(pe.InsertLink)}),this.scope.register(i,"Enter",c=>{c.preventDefault(),ae.emit(pe.CreateNote)}),this.scope.register(a,"Enter",c=>{c.preventDefault(),ae.emit(pe.CreateNote,{newLeaf:!0})}),this.scope.register(r,"Enter",c=>{mc()||(c.preventDefault(),ae.emit(pe.Enter))}),this.scope.register(["Ctrl"],"O",c=>{mc()||(c.preventDefault(),ae.emit(pe.OpenInBackground))}),this.scope.register([],"Tab",c=>{c.preventDefault(),ae.emit(pe.Tab)}),this.scope.register(["Alt"],"ArrowDown",c=>{c.preventDefault(),ae.emit(pe.NextSearchHistory)}),this.scope.register(["Alt"],"ArrowUp",c=>{c.preventDefault(),ae.emit(pe.PrevSearchHistory)}),this.scope.register(["Ctrl"],"G",c=>{ae.emit(Fa.ToggleExcerpts)})}},$n=class extends dl{constructor(e,n){super(e);let r=e.app.workspace.getActiveViewOfType(Io.MarkdownView)?.editor.getSelection();e.searchHistory.getHistory().then(s=>{let i=e.settings.showPreviousQueryResults?s[0]:null,a=new yb({target:this.modalEl,props:{plugin:e,modal:this,previousQuery:n||r||i||""}});this.onClose=()=>{a.$destroy()}})}},hs=class extends dl{constructor(e,n,r="",s){super(e);let i=new Db({target:this.modalEl,props:{plugin:e,modal:this,singleFilePath:n.path,parent:s,previousQuery:r}});s&&s.containerEl.toggleVisibility(!1),this.onClose=()=>{s&&s.containerEl.toggleVisibility(!0),i.$destroy()}}}});function a3(t,e){return e.map(n=>{let{score:r,path:s,basename:i,foundWords:a,matches:o,content:c}=n,l=t.textProcessor.makeExcerpt(c,o[0]?.offset??-1);return{score:r,vault:t.app.vault.getName(),path:s,basename:i,foundWords:a,matches:o.map(h=>({match:h.match,offset:h.offset})),excerpt:l}})}function Rb(){kb=!0,wo.forEach(t=>t())}function Pb(t){if(Lb)return;Lb=!0,t.registerObsidianProtocolHandler("omnisearch",n=>{new $n(t,n.query).open()});let e=hl(t);globalThis.omnisearch=e,t.app.plugins.plugins.omnisearch.api=e}function hl(t){return{async search(e){let n=new Tr(e,{ignoreDiacritics:t.settings.ignoreDiacritics,ignoreArabicDiacritics:t.settings.ignoreArabicDiacritics}),r=await t.searchEngine.getSuggestions(n);return a3(t,r)},registerOnIndexed(e){wo.push(e),kb&&e()},unregisterOnIndexed(e){wo=wo.filter(n=>n!==e)},refreshIndex:t.notesIndexer.refreshIndex}}var kb,wo,Lb,pl=x(()=>{Co();Ai();kb=!1,wo=[];Lb=!1});var t_=Rn(Ie=>{"use strict";function nu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}Ie.defaults=nu();function H1(t){Ie.defaults=t}var U1=/[&<>"']/,HI=new RegExp(U1.source,"g"),z1=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,UI=new RegExp(z1.source,"g"),zI={"&":"&","<":"<",">":">",'"':""","'":"'"},V1=t=>zI[t];function St(t,e){if(e){if(U1.test(t))return t.replace(HI,V1)}else if(z1.test(t))return t.replace(UI,V1);return t}var VI=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function qI(t){return t.replace(VI,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}var KI=/(^|[^\[])\^/g;function _e(t,e){let n=typeof t=="string"?t:t.source;e=e||"";let r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(KI,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}function q1(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}var Ki={exec:()=>null};function K1(t,e){let n=t.replace(/\|/g,(i,a,o)=>{let c=!1,l=a;for(;--l>=0&&o[l]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{let i=s.match(/^\s+/);if(i===null)return s;let[a]=i;return a.length>=r.length?s.slice(r.length):s}).join(` `)}var Is=class{options;rules;lexer;constructor(e){this.options=e||Ie.defaults}space(e){let n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){let n=this.rules.block.code.exec(e);if(n){let r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ru(r,` `)}}}fences(e){let n=this.rules.block.fences.exec(e);if(n){let r=n[0],s=WI(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(e){let n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){let s=ru(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){let n=this.rules.block.blockquote.exec(e);if(n){let r=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`);r=ru(r.replace(/^ *>[ \t]?/gm,""),` `);let s=this.lexer.state.top;this.lexer.state.top=!0;let i=this.lexer.blockTokens(r);return this.lexer.state.top=s,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim(),s=r.length>1,i={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),o="",c="",l=!1;for(;e;){let d=!1;if(!(n=a.exec(e))||this.rules.block.hr.test(e))break;o=n[0],e=e.substring(o.length);let h=n[2].split(` `,1)[0].replace(/^\t+/,m=>" ".repeat(3*m.length)),f=e.split(` `,1)[0],p=0;this.options.pedantic?(p=2,c=h.trimStart()):(p=n[2].search(/[^ ]/),p=p>4?1:p,c=h.slice(p),p+=n[1].length);let E=!1;if(!h&&/^ *$/.test(f)&&(o+=f+` `,e=e.substring(f.length+1),d=!0),!d){let m=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),S=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),C=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),b=new RegExp(`^ {0,${Math.min(3,p-1)}}#`);for(;e;){let I=e.split(` `,1)[0];if(f=I,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),C.test(f)||b.test(f)||m.test(f)||S.test(e))break;if(f.search(/[^ ]/)>=p||!f.trim())c+=` `+f.slice(p);else{if(E||h.search(/[^ ]/)>=4||C.test(h)||b.test(h)||S.test(h))break;c+=` `+f}!E&&!f.trim()&&(E=!0),o+=I+` `,e=e.substring(I.length+1),h=f.slice(p)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(o)&&(l=!0));let T=null,w;this.options.gfm&&(T=/^\[[ xX]\] /.exec(c),T&&(w=T[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:o,task:!!T,checked:w,loose:!1,text:c,tokens:[]}),i.raw+=o}i.items[i.items.length-1].raw=o.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let d=0;dp.type==="space"),f=h.length>0&&h.some(p=>/\n.*\n/.test(p.raw));i.loose=f}if(i.loose)for(let d=0;d$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:s,title:i}}}table(e){let n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;let r=K1(n[1]),s=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` `):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let o of s)/^ *-+: *$/.test(o)?a.align.push("right"):/^ *:-+: *$/.test(o)?a.align.push("center"):/^ *:-+ *$/.test(o)?a.align.push("left"):a.align.push(null);for(let o of r)a.header.push({text:o,tokens:this.lexer.inline(o)});for(let o of i)a.rows.push(K1(o,a.header.length).map(c=>({text:c,tokens:this.lexer.inline(c)})));return a}}lheading(e){let n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){let n=this.rules.block.paragraph.exec(e);if(n){let r=n[1].charAt(n[1].length-1)===` `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){let n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:St(n[1])}}tag(e){let n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){let n=this.rules.inline.link.exec(e);if(n){let r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;let a=ru(r.slice(0,-1),"\\");if((r.length-a.length)%2==0)return}else{let a=YI(n[2],"()");if(a>-1){let c=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let s=n[2],i="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);a&&(s=a[1],i=a[3])}else i=n[3]?n[3].slice(1,-1):"";return s=s.trim(),/^$/.test(r)?s=s.slice(1):s=s.slice(1,-1)),Y1(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let s=(r[2]||r[1]).replace(/\s+/g," "),i=n[s.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Y1(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let a=[...s[0]].length-1,o,c,l=a,d=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,n=n.slice(-1*e.length+a);(s=h.exec(n))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(c=[...o].length,s[3]||s[4]){l+=c;continue}else if((s[5]||s[6])&&a%3&&!((a+c)%3)){d+=c;continue}if(l-=c,l>0)continue;c=Math.min(c,c+l+d);let f=[...s[0]][0].length,p=e.slice(0,a+s.index+f+c);if(Math.min(a,c)%2){let T=p.slice(1,-1);return{type:"em",raw:p,text:T,tokens:this.lexer.inlineTokens(T)}}let E=p.slice(2,-2);return{type:"strong",raw:p,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(e){let n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," "),s=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return s&&i&&(r=r.substring(1,r.length-1)),r=St(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){let n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){let n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){let n=this.rules.inline.autolink.exec(e);if(n){let r,s;return n[2]==="@"?(r=St(n[1]),s="mailto:"+r):(r=St(n[1]),s=r),{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,s;if(n[2]==="@")r=St(n[0]),s="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);r=St(n[0]),n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=St(n[0]),{type:"text",raw:n[0],text:r}}}},$I=/^(?: *(?:\n|$))+/,GI=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,QI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,W1=/(?:[*+-]|\d{1,9}[.)])/,$1=_e(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,W1).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ef=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ZI=/^[^\n]+/,Tf=/(?!\s*\])(?:\\.|[^\[\]\\])+/,JI=_e(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Tf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ew=_e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,W1).getRegex(),su="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xf=/|$))/,tw=_e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",xf).replace("tag",su).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G1=_e(Ef).replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",su).getRegex(),nw=_e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",G1).getRegex(),yf={blockquote:nw,code:GI,def:JI,fences:QI,heading:XI,hr:Yi,html:tw,lheading:$1,list:ew,newline:$I,paragraph:G1,table:Ki,text:ZI},Q1=_e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",su).getRegex(),rw=ce(j({},yf),{table:Q1,paragraph:_e(Ef).replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Q1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",su).getRegex()}),sw=ce(j({},yf),{html:_e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ki,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_e(Ef).replace("hr",Yi).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",$1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),X1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Z1=/^( {2,}|\\)\n(?!\s*$)/,aw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,cw=_e(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Wi).getRegex(),lw=_e("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Wi).getRegex(),fw=_e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Wi).getRegex(),dw=_e(/\\([punct])/,"gu").replace(/punct/g,Wi).getRegex(),hw=_e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pw=_e(xf).replace("(?:-->|$)","-->").getRegex(),mw=_e("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",pw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),iu=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,gw=_e(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",iu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J1=_e(/^!?\[(label)\]\[(ref)\]/).replace("label",iu).replace("ref",Tf).getRegex(),e_=_e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tf).getRegex(),bw=_e("reflink|nolink(?!\\()","g").replace("reflink",J1).replace("nolink",e_).getRegex(),Af={_backpedal:Ki,anyPunctuation:dw,autolink:hw,blockSkip:uw,br:Z1,code:iw,del:Ki,emStrongLDelim:cw,emStrongRDelimAst:lw,emStrongRDelimUnd:fw,escape:X1,link:gw,nolink:e_,punctuation:ow,reflink:J1,reflinkSearch:bw,tag:mw,text:aw,url:Ki},_w=ce(j({},Af),{link:_e(/^!?\[(label)\]\((.*?)\)/).replace("label",iu).getRegex(),reflink:_e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",iu).getRegex()}),Cf=ce(j({},Af),{escape:_e(X1).replace("])","~|])").getRegex(),url:_e(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(l.length));let r,s,i,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(r=o.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),s=n[n.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` `+r.raw,s.text+=` `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),s=n[n.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` `+r.raw,s.text+=` `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0,c=e.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},c),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(i=e.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){s=n[n.length-1],a&&s.type==="paragraph"?(s.raw+=` `+r.raw,s.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(r),a=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),s=n[n.length-1],s&&s.type==="text"?(s.raw+=` `+r.raw,s.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(r);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,s,i,a=e,o,c,l;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)d.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(l=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(r=d.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),s=n[n.length-1],s&&r.type==="text"&&s.type==="text"?(s.raw+=r.raw,s.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),s=n[n.length-1],s&&r.type==="text"&&s.type==="text"?(s.raw+=r.raw,s.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,a,l)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),n.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0,h=e.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(i=e.substring(0,d+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(l=r.raw.slice(-1)),c=!0,s=n[n.length-1],s&&s.type==="text"?(s.raw+=r.raw,s.text+=r.text):n.push(r);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},ws=class{options;constructor(e){this.options=e||Ie.defaults}code(e,n,r){let s=(n||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+` `,s?'
'+(r?e:St(e,!0))+`
`:"
"+(r?e:St(e,!0))+`
`}blockquote(e){return`
${e}
`}html(e,n){return e}heading(e,n,r){return`${e} `}hr(){return`
`}list(e,n,r){let s=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+s+i+`> `+e+" `}listitem(e,n,r){return`
  • ${e}
  • `}checkbox(e){return"'}paragraph(e){return`

    ${e}

    `}table(e,n){return n&&(n=`${n}`),` `+e+` `+n+`
    `}tablerow(e){return` ${e} `}tablecell(e,n){let r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+` `}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,n,r){let s=q1(e);if(s===null)return r;e=s;let i='
    ",i}image(e,n,r){let s=q1(e);if(s===null)return r;e=s;let i=`${r}0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=w+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=w+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:w+" "}):T+=w+" "}T+=this.parse(f.tokens,l),d+=this.renderer.listitem(T,E,!!p)}r+=this.renderer.list(d,o,c);continue}case"html":{let a=i;r+=this.renderer.html(a.text,a.block);continue}case"paragraph":{let a=i;r+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=i,o=a.tokens?this.parseInline(a.tokens):a.text;for(;s+1{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,n))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,n)))}}return r}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let s=j({},r);if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=n.renderers[i.name];a?n.renderers[i.name]=function(...o){let c=i.renderer.apply(this,o);return c===!1&&(c=a.apply(this,o)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),s.extensions=n),r.renderer){let i=this.defaults.renderer||new ws(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(a==="options")continue;let o=a,c=r.renderer[o],l=i[o];i[o]=(...d)=>{let h=c.apply(i,d);return h===!1&&(h=l.apply(i,d)),h||""}}s.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Is(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,c=r.tokenizer[o],l=i[o];i[o]=(...d)=>{let h=c.apply(i,d);return h===!1&&(h=l.apply(i,d)),h}}s.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Nr;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(a==="options")continue;let o=a,c=r.hooks[o],l=i[o];Nr.passThroughHooks.has(a)?i[o]=d=>{if(this.defaults.async)return Promise.resolve(c.call(i,d)).then(f=>l.call(i,f));let h=c.call(i,d);return l.call(i,h)}:i[o]=(...d)=>{let h=c.apply(i,d);return h===!1&&(h=l.apply(i,d)),h}}s.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;s.walkTokens=function(o){let c=[];return c.push(a.call(this,o)),i&&(c=c.concat(i.call(this,o))),c}}this.defaults=j(j({},this.defaults),s)}),this}setOptions(e){return this.defaults=j(j({},this.defaults),e),this}lexer(e,n){return Dt.lex(e,n??this.defaults)}parser(e,n){return Ot.parse(e,n??this.defaults)}#e(e,n){return(r,s)=>{let i=j({},s),a=j(j({},this.defaults),i);this.defaults.async===!0&&i.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);let o=this.#t(!!a.silent,!!a.async);if(typeof r=="undefined"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(c=>e(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>n(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let c=e(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let l=n(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(c){return o(c)}}}#t(e,n){return r=>{if(r.message+=` Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+St(r.message+"",!0)+"
    ";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},vr=new Sf;function ge(t,e){return vr.parse(t,e)}ge.options=ge.setOptions=function(t){return vr.setOptions(t),ge.defaults=vr.defaults,H1(ge.defaults),ge};ge.getDefaults=nu;ge.defaults=Ie.defaults;ge.use=function(...t){return vr.use(...t),ge.defaults=vr.defaults,H1(ge.defaults),ge};ge.walkTokens=function(t,e){return vr.walkTokens(t,e)};ge.parseInline=vr.parseInline;ge.Parser=Ot;ge.parser=Ot.parse;ge.Renderer=ws;ge.TextRenderer=Gi;ge.Lexer=Dt;ge.lexer=Dt.lex;ge.Tokenizer=Is;ge.Hooks=Nr;ge.parse=ge;var Tw=ge.options,xw=ge.setOptions,yw=ge.use,Aw=ge.walkTokens,Cw=ge.parseInline,Sw=ge,Iw=Ot.parse,ww=Dt.lex;Ie.Hooks=Nr;Ie.Lexer=Dt;Ie.Marked=Sf;Ie.Parser=Ot;Ie.Renderer=ws;Ie.TextRenderer=Gi;Ie.Tokenizer=Is;Ie.getDefaults=nu;Ie.lexer=ww;Ie.marked=ge;Ie.options=Tw;Ie.parse=Sw;Ie.parseInline=Cw;Ie.parser=Iw;Ie.setOptions=xw;Ie.use=yw;Ie.walkTokens=Aw});function n_(t){return t.type===de.Tag||t.type===de.Script||t.type===de.Style}var de,r_,s_,i_,a_,o_,u_,c_,l_,f_,Ns=x(()=>{(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(de||(de={}));r_=de.Root,s_=de.Text,i_=de.Directive,a_=de.Comment,o_=de.Script,u_=de.Style,c_=de.Tag,l_=de.CDATA,f_=de.Doctype});function Q(t){return n_(t)}function ks(t){return t.type===de.CDATA}function gt(t){return t.type===de.Text}function Dr(t){return t.type===de.Comment}function lu(t){return t.type===de.Directive}function Rt(t){return t.type===de.Root}function Oe(t){return Object.prototype.hasOwnProperty.call(t,"children")}function Rs(t,e=!1){let n;if(gt(t))n=new An(t.data);else if(Dr(t))n=new vs(t.data);else if(Q(t)){let r=e?wf(t.children):[],s=new Os(t.name,j({},t.attribs),r);r.forEach(i=>i.parent=s),t.namespace!=null&&(s.namespace=t.namespace),t["x-attribsNamespace"]&&(s["x-attribsNamespace"]=j({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(s["x-attribsPrefix"]=j({},t["x-attribsPrefix"])),n=s}else if(ks(t)){let r=e?wf(t.children):[],s=new cu(r);r.forEach(i=>i.parent=s),n=s}else if(Rt(t)){let r=e?wf(t.children):[],s=new kt(r);r.forEach(i=>i.parent=s),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),n=s}else if(lu(t)){let r=new Ds(t.name,t.data);t["x-name"]!=null&&(r["x-name"]=t["x-name"],r["x-publicId"]=t["x-publicId"],r["x-systemId"]=t["x-systemId"]),n=r}else throw new Error(`Not implemented yet: ${t.type}`);return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}function wf(t){let e=t.map(n=>Rs(n,!0));for(let n=1;n{Ns();If=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return Rs(this,e)}},ou=class extends If{constructor(e){super();this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},An=class extends ou{constructor(){super(...arguments);this.type=de.Text}get nodeType(){return 3}},vs=class extends ou{constructor(){super(...arguments);this.type=de.Comment}get nodeType(){return 8}},Ds=class extends ou{constructor(e,n){super(n);this.name=e,this.type=de.Directive}get nodeType(){return 1}},uu=class extends If{constructor(e){super();this.children=e}get firstChild(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},cu=class extends uu{constructor(){super(...arguments);this.type=de.CDATA}get nodeType(){return 4}},kt=class extends uu{constructor(){super(...arguments);this.type=de.Root}get nodeType(){return 9}},Os=class extends uu{constructor(e,n,r=[],s=e==="script"?de.Script:e==="style"?de.Style:de.Tag){super(r);this.name=e,this.attribs=n,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>{var n,r;return{name:e,value:this.attribs[e],namespace:(n=this["x-attribsNamespace"])===null||n===void 0?void 0:n[e],prefix:(r=this["x-attribsPrefix"])===null||r===void 0?void 0:r[e]}})}}});var d_,Qi,Qe=x(()=>{Ns();Nf();Nf();d_={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Qi=class{constructor(e,n,r){this.dom=[],this.root=new kt(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=d_),typeof e=="object"&&(n=e,e=void 0),this.callback=e??null,this.options=n??d_,this.elementCB=r??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new kt(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,n){let r=this.options.xmlMode?de.Tag:void 0,s=new Os(e,n,void 0,r);this.addNode(s),this.tagStack.push(s)}ontext(e){let{lastNode:n}=this;if(n&&n.type===de.Text)n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{let r=new An(e);this.addNode(r),this.lastNode=r}}oncomment(e){if(this.lastNode&&this.lastNode.type===de.Comment){this.lastNode.data+=e;return}let n=new vs(e);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){let e=new An(""),n=new cu([e]);this.addNode(n),e.parent=n,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,n){let r=new Ds(e,n);this.addNode(r)}handleCallback(e){if(typeof this.callback=="function")this.callback(e,this.dom);else if(e)throw e}addNode(e){let n=this.tagStack[this.tagStack.length-1],r=n.children[n.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),n.children.push(e),r&&(e.prev=r,r.next=e),e.parent=n,this.lastNode=null}}});var Ls,h_=x(()=>{Ls=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)))});var fu,p_=x(()=>{fu=new Uint16Array("\u0200aglq \u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)))});function Df(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=vw.get(t))!==null&&e!==void 0?e:t}var vf,vw,Ps,Of=x(()=>{vw=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Ps=(vf=String.fromCodePoint)!==null&&vf!==void 0?vf:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e}});function kf(t){return t>=Ke.ZERO&&t<=Ke.NINE}function Ow(t){return t>=Ke.UPPER_A&&t<=Ke.UPPER_F||t>=Ke.LOWER_A&&t<=Ke.LOWER_F}function kw(t){return t>=Ke.UPPER_A&&t<=Ke.UPPER_Z||t>=Ke.LOWER_A&&t<=Ke.LOWER_Z||kf(t)}function Rw(t){return t===Ke.EQUALS||kw(t)}function m_(t){let e="",n=new Or(t,r=>e+=Ps(r));return function(s,i){let a=0,o=0;for(;(o=s.indexOf("&",o))>=0;){e+=s.slice(a,o),n.startEntity(i);let l=n.write(s,o+1);if(l<0){a=o+n.end();break}a=o+l,o=l===0?a+1:a}let c=e+s.slice(a);return e="",c}}function Lw(t,e,n,r){let s=(e&tr.BRANCH_LENGTH)>>7,i=e&tr.JUMP_TABLE;if(s===0)return i!==0&&r===i?n:-1;if(i){let c=r-i;return c<0||c>=s?-1:t[n+c]-1}let a=n,o=a+s-1;for(;a<=o;){let c=a+o>>>1,l=t[c];if(lr)o=c-1;else return t[c+s]}return-1}var Ke,Dw,tr,Ye,rt,Or,cB,lB,Ms=x(()=>{h_();p_();Of();Of();(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(Ke||(Ke={}));Dw=32;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(tr||(tr={}));(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Ye||(Ye={}));(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(rt||(rt={}));Or=class{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Ye.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=rt.Strict}startEntity(e){this.decodeMode=e,this.state=Ye.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Ye.EntityStart:return e.charCodeAt(n)===Ke.NUM?(this.state=Ye.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Ye.NamedEntity,this.stateNamedEntity(e,n));case Ye.NumericStart:return this.stateNumericStart(e,n);case Ye.NumericDecimal:return this.stateNumericDecimal(e,n);case Ye.NumericHex:return this.stateNumericHex(e,n);case Ye.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|Dw)===Ke.LOWER_X?(this.state=Ye.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Ye.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,s){if(n!==r){let i=r-n;this.result=this.result*Math.pow(s,i)+parseInt(e.substr(n,i),s),this.consumed+=i}}stateNumericHex(e,n){let r=n;for(;n>14;for(;n>14,i!==0){if(a===Ke.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==rt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:n,decodeTree:r}=this,s=(r[n]&tr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){let{decodeTree:s}=this;return this.emitCodePoint(n===1?s[e]&~tr.VALUE_LENGTH:s[e+1],r),n===3&&this.emitCodePoint(s[e+2],r),r}end(){var e;switch(this.state){case Ye.NamedEntity:return this.result!==0&&(this.decodeMode!==rt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ye.NumericDecimal:return this.emitNumericEntity(0,2);case Ye.NumericHex:return this.emitNumericEntity(0,3);case Ye.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ye.EntityStart:return 0}}};cB=m_(Ls),lB=m_(fu)});function du(t){for(let e=1;e{Pw=new Map(du([[9," "],[0," "],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(du([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(du([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(du([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]))});function Xi(t){let e="",n=0,r;for(;(r=Rf.exec(t))!==null;){let s=r.index,i=t.charCodeAt(s),a=b_.get(i);a!==void 0?(e+=t.substring(n,s)+a,n=s+1):(e+=`${t.substring(n,s)}&#x${__(t,s).toString(16)};`,n=Rf.lastIndex+=Number((i&64512)==55296))}return e+t.substr(n)}function Lf(t,e){return function(r){let s,i=0,a="";for(;s=t.exec(r);)i!==s.index&&(a+=r.substring(i,s.index)),a+=e.get(s[0].charCodeAt(0)),i=s.index+1;return a+r.substring(i)}}var Rf,b_,__,E_,Fs,Bs,Zi=x(()=>{Rf=/["&'<>$\x80-\uFFFF]/g,b_=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),__=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)==55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);E_=Lf(/[&<>'"]/g,b_),Fs=Lf(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Bs=Lf(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))});var Pf=x(()=>{g_();Zi()});var y_,A_,C_=x(()=>{Ms();Pf();Zi();Zi();Pf();Ms();(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(y_||(y_={}));(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(A_||(A_={}))});var S_,I_,w_=x(()=>{S_=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),I_=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t]))});function Bw(t){return t.replace(/"/g,""")}function jw(t,e){var n;if(!t)return;let r=((n=e.encodeEntities)!==null&&n!==void 0?n:e.decodeEntities)===!1?Bw:e.xmlMode||e.encodeEntities!=="utf8"?Xi:Fs;return Object.keys(t).map(s=>{var i,a;let o=(i=t[s])!==null&&i!==void 0?i:"";return e.xmlMode==="foreign"&&(s=(a=I_.get(s))!==null&&a!==void 0?a:s),!e.emptyAttrs&&!e.xmlMode&&o===""?s:`${s}="${r(o)}"`}).join(" ")}function Bf(t,e={}){let n="length"in t?t:[t],r="";for(let s=0;s0&&(r+=Bf(t.children,e)),(e.xmlMode||!N_.has(t.name))&&(r+=``)),r}function qw(t){return`<${t.data}>`}function Kw(t,e){var n;let r=t.data||"";return((n=e.encodeEntities)!==null&&n!==void 0?n:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&Fw.has(t.parent.name))&&(r=e.xmlMode||e.encodeEntities!=="utf8"?Xi(r):Bs(r)),r}function Yw(t){return``}function Ww(t){return``}var Fw,N_,hu,Uw,zw,jf=x(()=>{Ns();C_();w_();Fw=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);N_=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);hu=Bf;Uw=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),zw=new Set(["svg","math"])});function v_(t,e){return hu(t,e)}function $w(t,e){return Oe(t)?t.children.map(n=>v_(n,e)).join(""):""}function pu(t){return Array.isArray(t)?t.map(pu).join(""):Q(t)?t.name==="br"?` `:pu(t.children):ks(t)?pu(t.children):gt(t)?t.data:""}function Cn(t){return Array.isArray(t)?t.map(Cn).join(""):Oe(t)&&!Dr(t)?Cn(t.children):gt(t)?t.data:""}function Ji(t){return Array.isArray(t)?t.map(Ji).join(""):Oe(t)&&(t.type===de.Tag||ks(t))?Ji(t.children):gt(t)?t.data:""}var Hf=x(()=>{Qe();jf();Ns()});function ea(t){return Oe(t)?t.children:[]}function D_(t){return t.parent||null}function Uf(t){let e=D_(t);if(e!=null)return ea(e);let n=[t],{prev:r,next:s}=t;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;s!=null;)n.push(s),{next:s}=s;return n}function Gw(t,e){var n;return(n=t.attribs)===null||n===void 0?void 0:n[e]}function Qw(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function Xw(t){return t.name}function mu(t){let{next:e}=t;for(;e!==null&&!Q(e);)({next:e}=e);return e}function gu(t){let{prev:e}=t;for(;e!==null&&!Q(e);)({prev:e}=e);return e}var O_=x(()=>{Qe()});function Sn(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,n=e.lastIndexOf(t);n>=0&&e.splice(n,1)}t.next=null,t.prev=null,t.parent=null}function Zw(t,e){let n=e.prev=t.prev;n&&(n.next=e);let r=e.next=t.next;r&&(r.prev=e);let s=e.parent=t.parent;if(s){let i=s.children;i[i.lastIndexOf(t)]=e,t.parent=null}}function Jw(t,e){if(Sn(e),e.next=null,e.parent=t,t.children.push(e)>1){let n=t.children[t.children.length-2];n.next=e,e.prev=n}else e.prev=null}function eN(t,e){Sn(e);let{parent:n}=t,r=t.next;if(e.next=r,e.prev=t,t.next=e,e.parent=n,r){if(r.prev=e,n){let s=n.children;s.splice(s.lastIndexOf(r),0,e)}}else n&&n.children.push(e)}function tN(t,e){if(Sn(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){let n=t.children[1];n.prev=e,e.next=n}else e.next=null}function nN(t,e){Sn(e);let{parent:n}=t;if(n){let r=n.children;r.splice(r.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,e.next=t,t.prev=e}var k_=x(()=>{});function ta(t,e,n=!0,r=1/0){return zf(t,Array.isArray(e)?e:[e],n,r)}function zf(t,e,n,r){let s=[],i=[e],a=[0];for(;;){if(a[0]>=i[0].length){if(a.length===1)return s;i.shift(),a.shift();continue}let o=i[0][a[0]++];if(t(o)&&(s.push(o),--r<=0))return s;n&&Oe(o)&&o.children.length>0&&(a.unshift(0),i.unshift(o.children))}}function rN(t,e){return e.find(t)}function bu(t,e,n=!0){let r=null;for(let s=0;s0&&(r=bu(t,i.children,!0));else continue}return r}function R_(t,e){return e.some(n=>Q(n)&&(t(n)||R_(t,n.children)))}function sN(t,e){let n=[],r=[e],s=[0];for(;;){if(s[0]>=r[0].length){if(r.length===1)return n;r.shift(),s.shift();continue}let i=r[0][s[0]++];!Q(i)||(t(i)&&n.push(i),i.children.length>0&&(s.unshift(0),r.unshift(i.children)))}}var Vf=x(()=>{Qe()});function L_(t,e){return typeof e=="function"?n=>Q(n)&&e(n.attribs[t]):n=>Q(n)&&n.attribs[t]===e}function iN(t,e){return n=>t(n)||e(n)}function P_(t){let e=Object.keys(t).map(n=>{let r=t[n];return Object.prototype.hasOwnProperty.call(_u,n)?_u[n](r):L_(n,r)});return e.length===0?null:e.reduce(iN)}function aN(t,e){let n=P_(t);return n?n(e):!0}function oN(t,e,n,r=1/0){let s=P_(t);return s?ta(s,e,n,r):[]}function uN(t,e,n=!0){return Array.isArray(e)||(e=[e]),bu(L_("id",t),e,n)}function kr(t,e,n=!0,r=1/0){return ta(_u.tag_name(t),e,n,r)}function cN(t,e,n=!0,r=1/0){return ta(_u.tag_type(t),e,n,r)}var _u,qf=x(()=>{Qe();Vf();_u={tag_name(t){return typeof t=="function"?e=>Q(e)&&t(e.name):t==="*"?Q:e=>Q(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>gt(e)&&t(e.data):e=>gt(e)&&e.data===t}}});function lN(t){let e=t.length;for(;--e>=0;){let n=t[e];if(e>0&&t.lastIndexOf(n,e-1)>=0){t.splice(e,1);continue}for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t}function M_(t,e){let n=[],r=[];if(t===e)return 0;let s=Oe(t)?t:t.parent;for(;s;)n.unshift(s),s=s.parent;for(s=Oe(e)?e:e.parent;s;)r.unshift(s),s=s.parent;let i=Math.min(n.length,r.length),a=0;for(;ac.indexOf(d)?o===e?Lt.FOLLOWING|Lt.CONTAINED_BY:Lt.FOLLOWING:o===t?Lt.PRECEDING|Lt.CONTAINS:Lt.PRECEDING}function Rr(t){return t=t.filter((e,n,r)=>!r.includes(e,n+1)),t.sort((e,n)=>{let r=M_(e,n);return r&Lt.PRECEDING?-1:r&Lt.FOLLOWING?1:0}),t}var Lt,F_=x(()=>{Qe();(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(Lt||(Lt={}))});function Kf(t){let e=Eu(mN,t);return e?e.name==="feed"?fN(e):dN(e):null}function fN(t){var e;let n=t.children,r={type:"atom",items:kr("entry",n).map(a=>{var o;let{children:c}=a,l={media:B_(c)};bt(l,"id","id",c),bt(l,"title","title",c);let d=(o=Eu("link",c))===null||o===void 0?void 0:o.attribs.href;d&&(l.link=d);let h=nr("summary",c)||nr("content",c);h&&(l.description=h);let f=nr("updated",c);return f&&(l.pubDate=new Date(f)),l})};bt(r,"id","id",n),bt(r,"title","title",n);let s=(e=Eu("link",n))===null||e===void 0?void 0:e.attribs.href;s&&(r.link=s),bt(r,"description","subtitle",n);let i=nr("updated",n);return i&&(r.updated=new Date(i)),bt(r,"author","email",n,!0),r}function dN(t){var e,n;let r=(n=(e=Eu("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&n!==void 0?n:[],s={type:t.name.substr(0,3),id:"",items:kr("item",t.children).map(a=>{let{children:o}=a,c={media:B_(o)};bt(c,"id","guid",o),bt(c,"title","title",o),bt(c,"link","link",o),bt(c,"description","description",o);let l=nr("pubDate",o)||nr("dc:date",o);return l&&(c.pubDate=new Date(l)),c})};bt(s,"title","title",r),bt(s,"link","link",r),bt(s,"description","description",r);let i=nr("lastBuildDate",r);return i&&(s.updated=new Date(i)),bt(s,"author","managingEditor",r,!0),s}function B_(t){return kr("media:content",t).map(e=>{let{attribs:n}=e,r={medium:n.medium,isDefault:!!n.isDefault};for(let s of hN)n[s]&&(r[s]=n[s]);for(let s of pN)n[s]&&(r[s]=parseInt(n[s],10));return n.expression&&(r.expression=n.expression),r})}function Eu(t,e){return kr(t,e,!0,1)[0]}function nr(t,e,n=!1){return Cn(kr(t,e,n,1)).trim()}function bt(t,e,n,r,s=!1){let i=nr(n,r,s);i&&(t[e]=i)}function mN(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}var hN,pN,j_=x(()=>{Hf();qf();hN=["url","type","lang"],pN=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"]});var rr={};It(rr,{DocumentPosition:()=>Lt,append:()=>eN,appendChild:()=>Jw,compareDocumentPosition:()=>M_,existsOne:()=>R_,filter:()=>ta,find:()=>zf,findAll:()=>sN,findOne:()=>bu,findOneChild:()=>rN,getAttributeValue:()=>Gw,getChildren:()=>ea,getElementById:()=>uN,getElements:()=>oN,getElementsByTagName:()=>kr,getElementsByTagType:()=>cN,getFeed:()=>Kf,getInnerHTML:()=>$w,getName:()=>Xw,getOuterHTML:()=>v_,getParent:()=>D_,getSiblings:()=>Uf,getText:()=>pu,hasAttrib:()=>Qw,hasChildren:()=>Oe,innerText:()=>Ji,isCDATA:()=>ks,isComment:()=>Dr,isDocument:()=>Rt,isTag:()=>Q,isText:()=>gt,nextElementSibling:()=>mu,prepend:()=>nN,prependChild:()=>tN,prevElementSibling:()=>gu,removeElement:()=>Sn,removeSubsets:()=>lN,replaceElement:()=>Zw,testElement:()=>aN,textContent:()=>Cn,uniqueSort:()=>Rr});var Gt=x(()=>{Hf();O_();k_();Vf();qf();F_();j_();Qe()});function na(t,e){if(!t)return e??gN;let n=j(j({_useHtmlParser2:!!t.xmlMode},e),t);return t.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,t.xml!==!0&&Object.assign(n,t.xml)):t.xmlMode&&(n._useHtmlParser2=!0),n}var gN,Yf=x(()=>{gN={_useHtmlParser2:!1}});var $f={};It($f,{contains:()=>ra,extract:()=>yN,html:()=>_N,merge:()=>Wf,parseHTML:()=>TN,root:()=>xN,text:()=>Lr,xml:()=>EN});function H_(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function bN(t,e){return!e&&typeof t=="object"&&t!=null&&!("length"in t)&&!("type"in t)}function _N(t,e){let n=bN(t)?(e=t,void 0):t,r=j(j({},this===null||this===void 0?void 0:this._options),na(e));return H_(this,n,r)}function EN(t){let e=ce(j({},this._options),{xmlMode:!0});return H_(this,t,e)}function Lr(t){let e=t??(this?this.root():[]),n="";for(let r=0;r{Gt();Yf()});function Pt(t){return t.cheerio!=null}function z_(t){return t.replace(/[._-](\w|$)/g,(e,n)=>n.toUpperCase())}function V_(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()}function ye(t,e){let n=t.length;for(let r=0;rt.length-3)return!1;let n=t.charCodeAt(e+1);return(n>=Pr.LowerA&&n<=Pr.LowerZ||n>=Pr.UpperA&&n<=Pr.UpperZ||n===Pr.Exclamation)&&t.includes(">",e+2)}var Pr,Hs=x(()=>{(function(t){t[t.LowerA=97]="LowerA",t[t.LowerZ=122]="LowerZ",t[t.UpperA=65]="UpperA",t[t.UpperZ=90]="UpperZ",t[t.Exclamation=33]="Exclamation"})(Pr||(Pr={}))});var Zf={};It(Zf,{addClass:()=>$_,attr:()=>CN,data:()=>NN,hasClass:()=>ON,prop:()=>SN,removeAttr:()=>DN,removeClass:()=>G_,toggleClass:()=>Q_,val:()=>vN});function Tu(t,e,n){var r;if(!(!t||!Q(t))){if((r=t.attribs)!==null&&r!==void 0||(t.attribs={}),!e)return t.attribs;if(ia.call(t.attribs,e))return!n&&Qf.test(e)?e:t.attribs[e];if(t.name==="option"&&e==="value")return Lr(t.children);if(t.name==="input"&&(t.attribs.type==="radio"||t.attribs.type==="checkbox")&&e==="value")return"on"}}function Us(t,e,n){n===null?W_(t,e):t.attribs[e]=`${n}`}function CN(t,e){if(typeof t=="object"||e!==void 0){if(typeof e=="function"){if(typeof t!="string")throw new Error("Bad combination of arguments.");return ye(this,(n,r)=>{Q(n)&&Us(n,t,e.call(n,r,n.attribs[t]))})}return ye(this,n=>{if(!!Q(n))if(typeof t=="object")for(let r of Object.keys(t)){let s=t[r];Us(n,r,s)}else Us(n,t,e)})}return arguments.length>1?this:Tu(this[0],t,this.options.xmlMode)}function q_(t,e,n){return e in t?t[e]:!n&&Qf.test(e)?Tu(t,e,!1)!==void 0:Tu(t,e,n)}function Xf(t,e,n,r){e in t?t[e]=n:Us(t,e,!r&&Qf.test(e)?n?"":null:`${n}`)}function SN(t,e){var n;if(typeof t=="string"&&e===void 0){let r=this[0];if(!r||!Q(r))return;switch(t){case"style":{let s=this.css(),i=Object.keys(s);for(let a=0;a").parent().html();case"innerHTML":return this.html();default:return q_(r,t,this.options.xmlMode)}}if(typeof t=="object"||e!==void 0){if(typeof e=="function"){if(typeof t=="object")throw new TypeError("Bad combination of arguments.");return ye(this,(r,s)=>{Q(r)&&Xf(r,t,e.call(r,s,q_(r,t,this.options.xmlMode)),this.options.xmlMode)})}return ye(this,r=>{if(!!Q(r))if(typeof t=="object")for(let s of Object.keys(t)){let i=t[s];Xf(r,s,i,this.options.xmlMode)}else Xf(r,t,e,this.options.xmlMode)})}}function K_(t,e,n){var r;(r=t.data)!==null&&r!==void 0||(t.data={}),typeof e=="object"?Object.assign(t.data,e):typeof e=="string"&&n!==void 0&&(t.data[e]=n)}function IN(t){for(let e of Object.keys(t.attribs)){if(!e.startsWith(Gf))continue;let n=z_(e.slice(Gf.length));ia.call(t.data,n)||(t.data[n]=Y_(t.attribs[e]))}return t.data}function wN(t,e){let n=Gf+V_(e),r=t.data;if(ia.call(r,e))return r[e];if(ia.call(t.attribs,n))return r[e]=Y_(t.attribs[n])}function Y_(t){if(t==="null")return null;if(t==="true")return!0;if(t==="false")return!1;let e=Number(t);if(t===String(e))return e;if(AN.test(t))try{return JSON.parse(t)}catch{}return t}function NN(t,e){var n;let r=this[0];if(!r||!Q(r))return;let s=r;return(n=s.data)!==null&&n!==void 0||(s.data={}),t==null?IN(s):typeof t=="object"||e!==void 0?(ye(this,i=>{Q(i)&&(typeof t=="object"?K_(i,t):K_(i,t,e))}),this):wN(s,t)}function vN(t){let e=arguments.length===0,n=this[0];if(!n||!Q(n))return e?void 0:this;switch(n.name){case"textarea":return this.text(t);case"select":{let r=this.find("option:selected");if(!e){if(this.attr("multiple")==null&&typeof t=="object")return this;this.find("option").removeAttr("selected");let s=typeof t=="object"?t:[t];for(let i of s)this.find(`option[value="${i}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(s=>Lr(s.children)):r.attr("value")}case"input":case"option":return e?this.attr("value"):this.attr("value",t)}}function W_(t,e){!t.attribs||!ia.call(t.attribs,e)||delete t.attribs[e]}function xu(t){return t?t.trim().split(aa):[]}function DN(t){let e=xu(t);for(let n of e)ye(this,r=>{Q(r)&&W_(r,n)});return this}function ON(t){return this.toArray().some(e=>{let n=Q(e)&&e.attribs.class,r=-1;if(n&&t.length>0)for(;(r=n.indexOf(t,r+1))>-1;){let s=r+t.length;if((r===0||aa.test(n[r-1]))&&(s===n.length||aa.test(n[s])))return!0}return!1})}function $_(t){if(typeof t=="function")return ye(this,(r,s)=>{if(Q(r)){let i=r.attribs.class||"";$_.call([r],t.call(r,s,i))}});if(!t||typeof t!="string")return this;let e=t.split(aa),n=this.length;for(let r=0;r{Q(s)&&G_.call([s],t.call(s,i,s.attribs.class||""))});let e=xu(t),n=e.length,r=arguments.length===0;return ye(this,s=>{if(!!Q(s))if(r)s.attribs.class="";else{let i=xu(s.attribs.class),a=!1;for(let o=0;o=0&&(i.splice(c,1),a=!0,o--)}a&&(s.attribs.class=i.join(" "))}})}function Q_(t,e){if(typeof t=="function")return ye(this,(a,o)=>{Q(a)&&Q_.call([a],t.call(a,o,a.attribs.class||"",e),e)});if(!t||typeof t!="string")return this;let n=t.split(aa),r=n.length,s=typeof e=="boolean"?e?1:-1:0,i=this.length;for(let a=0;a=0&&d<0?c.push(n[l]):s<=0&&d>=0&&c.splice(d,1)}o.attribs.class=c.join(" ")}return this}var ia,aa,Gf,Qf,AN,X_=x(()=>{js();Hs();Qe();Gt();ia=Object.prototype.hasOwnProperty,aa=/\s+/,Gf="data-",Qf=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,AN=/^{[^]*}$|^\[[^]*]$/});var X,Be,Jf=x(()=>{(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(X||(X={}));(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Be||(Be={}))});function Mr(t){switch(t.type){case X.Adjacent:case X.Child:case X.Descendant:case X.Parent:case X.Sibling:case X.ColumnCombinator:return!0;default:return!1}}function MN(t,e,n){let r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function oa(t){return t.replace(kN,MN)}function ed(t){return t===39||t===34}function J_(t){return t===32||t===9||t===10||t===12||t===13}function In(t){let e=[],n=eE(e,`${t}`,0);if(n0&&n0&&Mr(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(f){if(r.length>0&&r[r.length-1].type===X.Descendant){r[r.length-1].type=f;return}c(),r.push({type:f})}function d(f,p){r.push({type:X.Attribute,name:f,action:p,value:s(1),namespace:null,ignoreCase:"quirks"})}function h(){if(r.length&&r[r.length-1].type===X.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(i(0),e.length===n)return n;e:for(;n{Jf();Z_=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,kN=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,RN=new Map([[126,Be.Element],[94,Be.Start],[36,Be.End],[42,Be.Any],[33,Be.Not],[124,Be.Hyphen]]),LN=new Set(["has","not","matches","is","where","host","host-context"]);PN=new Set(["contains","icontains"])});var zs=x(()=>{Jf();tE()});var sr=Rn((b9,nE)=>{nE.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});function ua(t){return!rE.has(t.type)}function td(t){let e=t.map(sE);for(let n=1;n=0&&r>=1)):t.type===X.Pseudo&&(t.data?t.name==="has"||t.name==="contains"?r=0:Array.isArray(t.data)?(r=Math.min(...t.data.map(s=>Math.min(...s.map(sE)))),r<0&&(r=0)):r=2:r=3),r}var rE,FN,nd=x(()=>{zs();rE=new Map([[X.Universal,50],[X.Tag,30],[X.Attribute,1],[X.Pseudo,0]]);FN=new Map([[Be.Exists,10],[Be.Equals,8],[Be.Not,7],[Be.Start,6],[Be.End,6],[Be.Any,5]])});function iE(t){return t.replace(BN,"\\$&")}function Fr(t,e){return typeof t.ignoreCase=="boolean"?t.ignoreCase:t.ignoreCase==="quirks"?!!e.quirksMode:!e.xmlMode&&jN.has(t.name)}var ca,BN,jN,aE,oE=x(()=>{ca=be(sr()),BN=/[-[\]{}()*+?.,\\^$|#\s]/g;jN=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);aE={equals(t,e,n){let{adapter:r}=n,{name:s}=e,{value:i}=e;return Fr(e,n)?(i=i.toLowerCase(),a=>{let o=r.getAttributeValue(a,s);return o!=null&&o.length===i.length&&o.toLowerCase()===i&&t(a)}):a=>r.getAttributeValue(a,s)===i&&t(a)},hyphen(t,e,n){let{adapter:r}=n,{name:s}=e,{value:i}=e,a=i.length;return Fr(e,n)?(i=i.toLowerCase(),function(c){let l=r.getAttributeValue(c,s);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a).toLowerCase()===i&&t(c)}):function(c){let l=r.getAttributeValue(c,s);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a)===i&&t(c)}},element(t,e,n){let{adapter:r}=n,{name:s,value:i}=e;if(/\s/.test(i))return ca.default.falseFunc;let a=new RegExp(`(?:^|\\s)${iE(i)}(?:$|\\s)`,Fr(e,n)?"i":"");return function(c){let l=r.getAttributeValue(c,s);return l!=null&&l.length>=i.length&&a.test(l)&&t(c)}},exists(t,{name:e},{adapter:n}){return r=>n.hasAttrib(r,e)&&t(r)},start(t,e,n){let{adapter:r}=n,{name:s}=e,{value:i}=e,a=i.length;return a===0?ca.default.falseFunc:Fr(e,n)?(i=i.toLowerCase(),o=>{let c=r.getAttributeValue(o,s);return c!=null&&c.length>=a&&c.substr(0,a).toLowerCase()===i&&t(o)}):o=>{var c;return!!((c=r.getAttributeValue(o,s))===null||c===void 0?void 0:c.startsWith(i))&&t(o)}},end(t,e,n){let{adapter:r}=n,{name:s}=e,{value:i}=e,a=-i.length;return a===0?ca.default.falseFunc:Fr(e,n)?(i=i.toLowerCase(),o=>{var c;return((c=r.getAttributeValue(o,s))===null||c===void 0?void 0:c.substr(a).toLowerCase())===i&&t(o)}):o=>{var c;return!!((c=r.getAttributeValue(o,s))===null||c===void 0?void 0:c.endsWith(i))&&t(o)}},any(t,e,n){let{adapter:r}=n,{name:s,value:i}=e;if(i==="")return ca.default.falseFunc;if(Fr(e,n)){let a=new RegExp(iE(i),"i");return function(c){let l=r.getAttributeValue(c,s);return l!=null&&l.length>=i.length&&a.test(l)&&t(c)}}return a=>{var o;return!!((o=r.getAttributeValue(a,s))===null||o===void 0?void 0:o.includes(i))&&t(a)}},not(t,e,n){let{adapter:r}=n,{name:s}=e,{value:i}=e;return i===""?a=>!!r.getAttributeValue(a,s)&&t(a):Fr(e,n)?(i=i.toLowerCase(),a=>{let o=r.getAttributeValue(a,s);return(o==null||o.length!==i.length||o.toLowerCase()!==i)&&t(a)}):a=>r.getAttributeValue(a,s)!==i&&t(a)}}});function cE(t){if(t=t.trim().toLowerCase(),t==="even")return[2,0];if(t==="odd")return[2,1];let e=0,n=0,r=i(),s=a();if(e=uE&&t.charCodeAt(e)<=UN;)l=l*10+(t.charCodeAt(e)-uE),e++;return e===c?null:l}function o(){for(;e{HN=new Set([9,10,12,13,32]),uE="0".charCodeAt(0),UN="9".charCodeAt(0)});function fE(t){let e=t[0],n=t[1]-1;if(n<0&&e<=0)return rd.default.falseFunc;if(e===-1)return i=>i<=n;if(e===0)return i=>i===n;if(e===1)return n<0?rd.default.trueFunc:i=>i>=n;let r=Math.abs(e),s=(n%r+r)%r;return e>1?i=>i>=n&&i%r===s:i=>i<=n&&i%r===s}var rd,dE=x(()=>{rd=be(sr())});function Vs(t){return fE(cE(t))}var hE=x(()=>{lE();dE()});function yu(t,e){return n=>{let r=e.getParent(n);return r!=null&&e.isTag(r)&&t(n)}}function sd(t){return function(n,r,{adapter:s}){let i=s[t];return typeof i!="function"?_t.default.falseFunc:function(o){return i(o)&&n(o)}}}var _t,qs,pE=x(()=>{hE();_t=be(sr());qs={contains(t,e,{adapter:n}){return function(s){return t(s)&&n.getText(s).includes(e)}},icontains(t,e,{adapter:n}){let r=e.toLowerCase();return function(i){return t(i)&&n.getText(i).toLowerCase().includes(r)}},"nth-child"(t,e,{adapter:n,equals:r}){let s=Vs(e);return s===_t.default.falseFunc?_t.default.falseFunc:s===_t.default.trueFunc?yu(t,n):function(a){let o=n.getSiblings(a),c=0;for(let l=0;l=0&&!r(a,o[l]);l--)n.isTag(o[l])&&c++;return s(c)&&t(a)}},"nth-of-type"(t,e,{adapter:n,equals:r}){let s=Vs(e);return s===_t.default.falseFunc?_t.default.falseFunc:s===_t.default.trueFunc?yu(t,n):function(a){let o=n.getSiblings(a),c=0;for(let l=0;l=0;l--){let d=o[l];if(r(a,d))break;n.isTag(d)&&n.getName(d)===n.getName(a)&&c++}return s(c)&&t(a)}},root(t,e,{adapter:n}){return r=>{let s=n.getParent(r);return(s==null||!n.isTag(s))&&t(r)}},scope(t,e,n,r){let{equals:s}=n;return!r||r.length===0?qs.root(t,e,n):r.length===1?i=>s(r[0],i)&&t(i):i=>r.includes(i)&&t(i)},hover:sd("isHovered"),visited:sd("isVisited"),active:sd("isActive")}});function id(t,e,n,r){if(n===null){if(t.length>r)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(t.length===r)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}var la,mE=x(()=>{la={empty(t,{adapter:e}){return!e.getChildren(t).some(n=>e.isTag(n)||e.getText(n)!=="")},"first-child"(t,{adapter:e,equals:n}){if(e.prevElementSibling)return e.prevElementSibling(t)==null;let r=e.getSiblings(t).find(s=>e.isTag(s));return r!=null&&n(t,r)},"last-child"(t,{adapter:e,equals:n}){let r=e.getSiblings(t);for(let s=r.length-1;s>=0;s--){if(n(t,r[s]))return!0;if(e.isTag(r[s]))break}return!1},"first-of-type"(t,{adapter:e,equals:n}){let r=e.getSiblings(t),s=e.getName(t);for(let i=0;i=0;i--){let a=r[i];if(n(t,a))return!0;if(e.isTag(a)&&e.getName(a)===s)break}return!1},"only-of-type"(t,{adapter:e,equals:n}){let r=e.getName(t);return e.getSiblings(t).every(s=>n(t,s)||!e.isTag(s)||e.getName(s)!==r)},"only-child"(t,{adapter:e,equals:n}){return e.getSiblings(t).every(r=>n(t,r)||!e.isTag(r))}}});var Au,gE=x(()=>{Au={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function od(t,e){return t===Mt.default.falseFunc?Mt.default.falseFunc:n=>e.isTag(n)&&t(n)}function ud(t,e){let n=e.getSiblings(t);if(n.length<=1)return[];let r=n.indexOf(t);return r<0||r===n.length-1?[]:n.slice(r+1).filter(e.isTag)}function cd(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var Mt,ad,ld,Cu,Su=x(()=>{Mt=be(sr());nd();ad={};ld=(t,e,n,r,s)=>{let i=s(e,cd(n),r);return i===Mt.default.trueFunc?t:i===Mt.default.falseFunc?Mt.default.falseFunc:a=>i(a)&&t(a)},Cu={is:ld,matches:ld,where:ld,not(t,e,n,r,s){let i=s(e,cd(n),r);return i===Mt.default.falseFunc?t:i===Mt.default.trueFunc?Mt.default.falseFunc:a=>!i(a)&&t(a)},has(t,e,n,r,s){let{adapter:i}=n,a=cd(n);a.relativeSelector=!0;let o=e.some(d=>d.some(ua))?[ad]:void 0,c=s(e,a,o);if(c===Mt.default.falseFunc)return Mt.default.falseFunc;let l=od(c,i);if(o&&c!==Mt.default.trueFunc){let{shouldTestNextSiblings:d=!1}=c;return h=>{if(!t(h))return!1;o[0]=h;let f=i.getChildren(h),p=d?[...f,...ud(h,i)]:f;return i.existsOne(l,p)}}return d=>t(d)&&i.existsOne(l,i.getChildren(d))}}});function bE(t,e,n,r,s){var i;let{name:a,data:o}=e;if(Array.isArray(o)){if(!(a in Cu))throw new Error(`Unknown pseudo-class :${a}(${o})`);return Cu[a](t,o,n,r,s)}let c=(i=n.pseudos)===null||i===void 0?void 0:i[a],l=typeof c=="string"?c:Au[a];if(typeof l=="string"){if(o!=null)throw new Error(`Pseudo ${a} doesn't have any arguments`);let d=In(l);return Cu.is(t,d,n,r,s)}if(typeof c=="function")return id(c,a,o,1),d=>c(d,o)&&t(d);if(a in qs)return qs[a](t,o,n,r);if(a in la){let d=la[a];return id(d,a,o,2),h=>d(h,n,o)&&t(h)}throw new Error(`Unknown pseudo-class :${a}`)}var fd=x(()=>{zs();pE();mE();gE();Su()});function dd(t,e){let n=e.getParent(t);return n&&e.isTag(n)?n:null}function _E(t,e,n,r,s){let{adapter:i,equals:a}=n;switch(e.type){case X.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case X.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case X.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),aE[e.action](t,e,n)}case X.Pseudo:return bE(t,e,n,r,s);case X.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=e;return(!n.xmlMode||n.lowerCaseTags)&&(o=o.toLowerCase()),function(l){return i.getName(l)===o&&t(l)}}case X.Descendant:{if(n.cacheResults===!1||typeof WeakSet=="undefined")return function(l){let d=l;for(;d=dd(d,i);)if(t(d))return!0;return!1};let o=new WeakSet;return function(l){let d=l;for(;d=dd(d,i);)if(!o.has(d)){if(i.isTag(d)&&t(d))return!0;o.add(d)}return!1}}case"_flexibleDescendant":return function(c){let l=c;do if(t(l))return!0;while(l=dd(l,i));return!1};case X.Parent:return function(c){return i.getChildren(c).some(l=>i.isTag(l)&&t(l))};case X.Child:return function(c){let l=i.getParent(c);return l!=null&&i.isTag(l)&&t(l)};case X.Sibling:return function(c){let l=i.getSiblings(c);for(let d=0;d{oE();fd();zs()});function TE(t,e,n){let r=Iu(t,e,n);return od(r,e.adapter)}function Iu(t,e,n){let r=typeof t=="string"?In(t):t;return wu(r,e,n)}function xE(t){return t.type===X.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(xE)))}function KN(t,{adapter:e},n){let r=!!(n==null?void 0:n.every(s=>{let i=e.isTag(s)&&e.getParent(s);return s===ad||i&&e.isTag(i)}));for(let s of t){if(!(s.length>0&&ua(s[0])&&s[0].type!==X.Descendant))if(r&&!s.some(xE))s.unshift(zN);else continue;s.unshift(qN)}}function wu(t,e,n){var r;t.forEach(td),n=(r=e.context)!==null&&r!==void 0?r:n;let s=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)KN(t,e,i);else if(t.some(c=>c.length>0&&ua(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1,o=t.map(c=>{if(c.length>=2){let[l,d]=c;l.type!==X.Pseudo||l.name!=="scope"||(s&&d.type===X.Descendant?c[1]=VN:(d.type===X.Adjacent||d.type===X.Sibling)&&(a=!0))}return YN(c,e,i)}).reduce(WN,wn.default.falseFunc);return o.shouldTestNextSiblings=a,o}function YN(t,e,n){var r;return t.reduce((s,i)=>s===wn.default.falseFunc?wn.default.falseFunc:_E(s,i,e,n,wu),(r=e.rootFunc)!==null&&r!==void 0?r:wn.default.trueFunc)}function WN(t,e){return e===wn.default.falseFunc||t===wn.default.trueFunc?t:t===wn.default.falseFunc||e===wn.default.trueFunc?e:function(r){return t(r)||e(r)}}var wn,zN,VN,qN,yE=x(()=>{zs();wn=be(sr());nd();EE();Su();zN={type:X.Descendant},VN={type:"_flexibleDescendant"},qN={type:X.Pseudo,name:"scope",data:null}});function CE(t){var e,n,r,s;let i=t??$N;return(e=i.adapter)!==null&&e!==void 0||(i.adapter=rr),(n=i.equals)!==null&&n!==void 0||(i.equals=(s=(r=i.adapter)===null||r===void 0?void 0:r.equals)!==null&&s!==void 0?s:AE),i}function pd(t){return function(n,r,s){let i=CE(r);return t(n,i,s)}}function SE(t){return function(n,r,s){let i=CE(s);typeof n!="function"&&(n=Iu(n,i,r));let a=vu(r,i.adapter,n.shouldTestNextSiblings);return t(n,a,i)}}function vu(t,e,n=!1){return n&&(t=GN(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}function GN(t,e){let n=Array.isArray(t)?t.slice(0):[t],r=n.length;for(let s=0;s{Gt();hd=be(sr());yE();Su();fd();AE=(t,e)=>t===e,$N={adapter:rr,equals:AE};Q9=pd(TE),X9=pd(Iu),Nu=pd(wu);Z9=SE((t,e,n)=>t===hd.default.falseFunc||!e||e.length===0?[]:n.adapter.findAll(t,e)),J9=SE((t,e,n)=>t===hd.default.falseFunc||!e||e.length===0?null:n.adapter.findOne(t,e))});function Ks(t){return t.type!=="pseudo"?!1:QN.has(t.name)?!0:t.name==="not"&&Array.isArray(t.data)?t.data.some(e=>e.some(Ks)):!1}function IE(t,e,n){let r=e!=null?parseInt(e,10):NaN;switch(t){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}var QN,gd=x(()=>{QN=new Set(["first","last","eq","gt","nth","lt","even","odd"])});function wE(t){for(;t.parent;)t=t.parent;return t}function Du(t){let e=[],n=[];for(let r of t)r.some(Ks)?e.push(r):n.push(r);return[n,e]}var NE=x(()=>{gd()});function bd(t,e,n={}){return _d([t],e,n)}function _d(t,e,n={}){if(typeof e=="function")return t.some(e);let[r,s]=Du(In(e));return r.length>0&&t.some(Nu(r,n))||s.some(i=>DE(i,t,n).length>0)}function JN(t,e,n,r){let s=typeof n=="string"?parseInt(n,10):NaN;switch(t){case"first":case"lt":return e;case"last":return e.length>0?[e[e.length-1]]:e;case"nth":case"eq":return isFinite(s)&&Math.abs(s)a%2==0);case"odd":return e.filter((i,a)=>a%2==1);case"not":{let i=new Set(vE(n,e,r));return e.filter(a=>!i.has(a))}}}function Ed(t,e,n={}){return vE(In(t),e,n)}function vE(t,e,n){if(e.length===0)return[];let[r,s]=Du(t),i;if(r.length){let a=xd(e,r,n);if(s.length===0)return a;a.length&&(i=new Set(a))}for(let a=0;aQ(d)&&!i.has(d)):e).length===0)break;let l=DE(o,e,n);if(l.length)if(i)l.forEach(d=>i.add(d));else{if(a===s.length-1)return l;i=new Set(l)}}return typeof i!="undefined"?i.size===e.length?e:e.filter(a=>i.has(a)):[]}function DE(t,e,n){var r;if(t.some(Mr)){let s=(r=n.root)!==null&&r!==void 0?r:wE(e[0]),i=ce(j({},n),{context:e,relativeSelector:!1});return t.push(ZN),ku(s,t,i,!0,e.length)}return ku(e,t,n,!1,e.length)}function OE(t,e,n={},r=1/0){if(typeof t=="function")return kE(e,t);let[s,i]=Du(In(t)),a=i.map(o=>ku(e,o,n,!0,r));return s.length&&a.push(Td(e,s,n,r)),a.length===0?[]:a.length===1?a[0]:Rr(a.reduce((o,c)=>[...o,...c]))}function ku(t,e,n,r,s){let i=e.findIndex(Ks),a=e.slice(0,i),o=e[i],c=e.length-1===i?s:1/0,l=IE(o.name,o.data,c);if(l===0)return[];let h=(a.length===0&&!Array.isArray(t)?ea(t).filter(Q):a.length===0?(Array.isArray(t)?t:[t]).filter(Q):r||a.some(Mr)?Td(t,[a],n,l):xd(t,[a],n)).slice(0,l),f=JN(o.name,h,o.data,n);if(f.length===0||e.length===i+1)return f;let p=e.slice(i+1),E=p.some(Mr);if(E){if(Mr(p[0])){let{type:T}=p[0];(T===X.Sibling||T===X.Adjacent)&&(f=vu(f,rr,!0)),p.unshift(XN)}n=ce(j({},n),{relativeSelector:!1,rootFunc:T=>f.includes(T)})}else n.rootFunc&&n.rootFunc!==Ou.trueFunc&&(n=ce(j({},n),{rootFunc:Ou.trueFunc}));return p.some(Ks)?ku(f,p,n,!1,s):E?Td(f,[p],n,s):xd(f,[p],n)}function Td(t,e,n,r){let s=Nu(e,n,t);return kE(t,s,r)}function kE(t,e,n=1/0){let r=vu(t,rr,e.shouldTestNextSiblings);return zf(s=>Q(s)&&e(s),r,!0,n)}function xd(t,e,n){let r=(Array.isArray(t)?t:[t]).filter(Q);if(r.length===0)return r;let s=Nu(e,n);return s===Ou.trueFunc?r:r.filter(s)}var Ou,XN,ZN,RE=x(()=>{zs();md();Gt();Ou=be(sr());NE();gd();md();XN={type:X.Universal,namespace:null},ZN={type:X.Pseudo,name:"scope",data:null}});var Id={};It(Id,{_findBySelector:()=>nv,add:()=>Dv,addBack:()=>Ov,children:()=>pv,closest:()=>av,contents:()=>mv,each:()=>gv,end:()=>vv,eq:()=>Cv,filter:()=>_v,filterArray:()=>Sd,find:()=>tv,first:()=>yv,get:()=>Sv,has:()=>xv,index:()=>wv,is:()=>Ev,last:()=>Av,map:()=>bv,next:()=>ov,nextAll:()=>uv,nextUntil:()=>cv,not:()=>Tv,parent:()=>rv,parents:()=>sv,parentsUntil:()=>iv,prev:()=>lv,prevAll:()=>fv,prevUntil:()=>dv,siblings:()=>hv,slice:()=>Nv,toArray:()=>Iv});function tv(t){if(!t)return this._make([]);if(typeof t!="string"){let e=Pt(t)?t.toArray():[t],n=this.toArray();return this._make(e.filter(r=>n.some(s=>ra(s,r))))}return this._findBySelector(t,Number.POSITIVE_INFINITY)}function nv(t,e){var n;let r=this.toArray(),s=ev.test(t)?r:this.children().toArray(),i={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(OE(t,s,i,e))}function yd(t){return function(e,...n){return function(r){var s;let i=t(e,this);return r&&(i=Sd(i,r,this.options.xmlMode,(s=this._root)===null||s===void 0?void 0:s[0])),this._make(this.length>1&&i.length>1?n.reduce((a,o)=>o(a),i):i)}}}function Cd(t,...e){let n=null,r=yd((s,i)=>{let a=[];return ye(i,o=>{for(let c;(c=s(o))&&!(n==null?void 0:n(c,a.length));o=c)a.push(c)}),a})(t,...e);return function(s,i){n=typeof s=="string"?o=>bd(o,s,this.options):s?da(s):null;let a=r.call(this,i);return n=null,a}}function Ys(t){return t.length>1?Array.from(new Set(t)):t}function av(t){var e;let n=[];if(!t)return this._make(n);let r={xmlMode:this.options.xmlMode,root:(e=this._root)===null||e===void 0?void 0:e[0]},s=typeof t=="string"?i=>bd(i,t,r):da(t);return ye(this,i=>{for(i&&!Rt(i)&&!Q(i)&&(i=i.parent);i&&Q(i);){if(s(i,0)){n.includes(i)||n.push(i);break}i=i.parent}}),this._make(n)}function mv(){let t=this.toArray().reduce((e,n)=>Oe(n)?e.concat(n.children):e,[]);return this._make(t)}function gv(t){let e=0,n=this.length;for(;et.call(e,n,e):Pt(t)?e=>Array.prototype.includes.call(t,e):function(e){return t===e}}function _v(t){var e;return this._make(Sd(this.toArray(),t,this.options.xmlMode,(e=this._root)===null||e===void 0?void 0:e[0]))}function Sd(t,e,n,r){return typeof e=="string"?Ed(e,t,{xmlMode:n,root:r}):t.filter(da(e))}function Ev(t){let e=this.toArray();return typeof t=="string"?_d(e.filter(Q),t,this.options):t?e.some(da(t)):!1}function Tv(t){let e=this.toArray();if(typeof t=="string"){let n=new Set(Ed(t,e,this.options));e=e.filter(r=>!n.has(r))}else{let n=da(t);e=e.filter((r,s)=>!n(r,s))}return this._make(e)}function xv(t){return this.filter(typeof t=="string"?`:has(${t})`:(e,n)=>this._make(n).find(t).length>0)}function yv(){return this.length>1?this._make(this[0]):this}function Av(){return this.length>0?this._make(this[this.length-1]):this}function Cv(t){var e;return t=+t,t===0&&this.length<=1?this:(t<0&&(t=this.length+t),this._make((e=this[t])!==null&&e!==void 0?e:[]))}function Sv(t){return t==null?this.toArray():this[t<0?this.length+t:t]}function Iv(){return Array.prototype.slice.call(this)}function wv(t){let e,n;return t==null?(e=this.parent().children(),n=this[0]):typeof t=="string"?(e=this._make(t),n=this[0]):(e=this,n=Pt(t)?t[0]:t),Array.prototype.indexOf.call(e,n)}function Nv(t,e){return this._make(Array.prototype.slice.call(this,t,e))}function vv(){var t;return(t=this.prevObject)!==null&&t!==void 0?t:this._make([])}function Dv(t,e){let n=this._make(t,e),r=Rr([...this.get(),...n.get()]);return this._make(r)}function Ov(t){return this.prevObject?this.add(t?this.prevObject.filter(t):this.prevObject):this}var ev,fa,Ad,rv,sv,iv,ov,uv,cv,lv,fv,dv,hv,pv,LE=x(()=>{Qe();RE();Hs();js();Gt();ev=/^\s*[+~]/;fa=yd((t,e)=>{let n=[];for(let r=0;r0&&(n=n.concat(s))}return n}),Ad=yd((t,e)=>{let n=[];for(let r=0;rt&&!Rt(t)?t:null,Ys),sv=fa(t=>{let e=[];for(;t.parent&&!Rt(t.parent);)e.push(t.parent),t=t.parent;return e},Rr,t=>t.reverse()),iv=Cd(({parent:t})=>t&&!Rt(t)?t:null,Rr,t=>t.reverse());ov=Ad(t=>mu(t)),uv=fa(t=>{let e=[];for(;t.next;)t=t.next,Q(t)&&e.push(t);return e},Ys),cv=Cd(t=>mu(t),Ys),lv=Ad(t=>gu(t)),fv=fa(t=>{let e=[];for(;t.prev;)t=t.prev,Q(t)&&e.push(t);return e},Ys),dv=Cd(t=>gu(t),Ys),hv=fa(t=>Uf(t).filter(e=>Q(e)&&e!==t),Rr),pv=fa(t=>ea(t).filter(Q),Ys)});function PE(t){return function(n,r,s,i){if(typeof Buffer!="undefined"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return t(n,r,s,i);let a=n;if(!Array.isArray(a)&&Rt(a))return a;let o=new kt([]);return ir(a,o),o}}function ir(t,e){let n=Array.isArray(t)?t:[t];e?e.children=n:e=null;for(let r=0;r{Gt();Qe()});var Nd={};It(Nd,{_makeDomArray:()=>kv,after:()=>Uv,append:()=>Pv,appendTo:()=>Rv,before:()=>Vv,clone:()=>Xv,empty:()=>Wv,html:()=>$v,insertAfter:()=>zv,insertBefore:()=>qv,prepend:()=>Mv,prependTo:()=>Lv,remove:()=>Kv,replaceWith:()=>Yv,text:()=>Qv,toString:()=>Gv,unwrap:()=>jv,wrap:()=>Fv,wrapAll:()=>Hv,wrapInner:()=>Bv});function kv(t,e){if(t==null)return[];if(typeof t=="string")return this._parse(t,this.options,!1,null).children.slice(0);if("length"in t){if(t.length===1)return this._makeDomArray(t[0],e);let n=[];for(let r=0;r{if(!Oe(r))return;let i=typeof e[0]=="function"?e[0].call(r,s,this._render(r.children)):e,a=this._makeDomArray(i,s=t.length?null:t[e+n];for(let d=0;d-1&&(f.children.splice(E,1),s===f&&e>E&&o[0]--)}h.parent=s,h.prev&&(h.prev.next=(i=h.next)!==null&&i!==void 0?i:null),h.next&&(h.next.prev=(a=h.prev)!==null&&a!==void 0?a:null),h.prev=d===0?c:r[d-1],h.next=d===r.length-1?l:r[d+1]}return c&&(c.next=r[0]),l&&(l.prev=r[r.length-1]),t.splice(...o)}function Rv(t){return(Pt(t)?t:this._make(t)).append(this),this}function Lv(t){return(Pt(t)?t:this._make(t)).prepend(this),this}function FE(t){return function(e){let n=this.length-1,r=this.parents().last();for(let s=0;s{this._make(n).replaceWith(n.children)}),this}function Hv(t){let e=this[0];if(e){let n=this._make(typeof t=="function"?t.call(e,0,e):t).insertBefore(e),r;for(let i=0;i{if(!Oe(n)||!n.parent)return;let s=n.parent.children,i=s.indexOf(n);if(i<0)return;let a=typeof t[0]=="function"?t[0].call(n,r,this._render(n.children)):t,o=this._makeDomArray(a,r{if(!Oe(n)||!n.parent)return;let s=n.parent.children,i=s.indexOf(n);if(i<0)return;let a=typeof t[0]=="function"?t[0].call(n,r,this._render(n.children)):t,o=this._makeDomArray(a,r{let s=this.clone().toArray(),{parent:i}=r;if(!i)return;let a=i.children,o=a.indexOf(r);o<0||(ar(a,o,0,s,i),n.push(...s))}),this._make(n)}function Kv(t){let e=t?this.filter(t):this;return ye(e,n=>{Sn(n),n.prev=n.next=n.parent=null}),this}function Yv(t){return ye(this,(e,n)=>{let{parent:r}=e;if(!r)return;let s=r.children,i=typeof t=="function"?t.call(e,n,e):t,a=this._makeDomArray(i);ir(a,null);let o=s.indexOf(e);ar(s,o,1,a,r),a.includes(e)||(e.parent=e.prev=e.next=null)})}function Wv(){return ye(this,t=>{if(!!Oe(t)){for(let e of t.children)e.next=e.prev=e.parent=null;t.children.length=0}})}function $v(t){if(t===void 0){let e=this[0];return!e||!Oe(e)?null:this._render(e.children)}return ye(this,e=>{if(!Oe(e))return;for(let r of e.children)r.next=r.prev=r.parent=null;let n=Pt(t)?t.toArray():this._parse(`${t}`,this.options,!1,e).children;ir(n,e)})}function Gv(){return this._render(this)}function Qv(t){return t===void 0?Lr(this):typeof t=="function"?ye(this,(e,n)=>this._make(e).text(t.call(e,n,Lr([e])))):ye(this,e=>{if(!Oe(e))return;for(let r of e.children)r.next=r.prev=r.parent=null;let n=new An(`${t}`);ir(n,e)})}function Xv(){let t=Array.prototype.map.call(this.get(),n=>Rs(n,!0)),e=new kt(t);for(let n of t)n.parent=e;return this._make(t)}var Pv,Mv,Fv,Bv,BE=x(()=>{Qe();wd();js();Hs();Gt();Pv=ME((t,e,n)=>{ar(e,e.length,0,t,n)}),Mv=ME((t,e,n)=>{ar(e,0,0,t,n)});Fv=FE((t,e,n)=>{let{parent:r}=t;if(!r)return;let s=r.children,i=s.indexOf(t);ir([t],e),ar(s,i,0,n,r)}),Bv=FE((t,e,n)=>{!Oe(t)||(ir(t.children,e),ir(n,t))})});var vd={};It(vd,{css:()=>Zv});function Zv(t,e){if(t!=null&&e!=null||typeof t=="object"&&!Array.isArray(t))return ye(this,(n,r)=>{Q(n)&&jE(n,t,e,r)});if(this.length!==0)return HE(this[0],t)}function jE(t,e,n,r){if(typeof e=="string"){let s=HE(t),i=typeof n=="function"?n.call(t,r,s[e]):n;i===""?delete s[e]:i!=null&&(s[e]=i),t.attribs.style=Jv(s)}else if(typeof e=="object"){let s=Object.keys(e);for(let i=0;i`${e}${e?" ":""}${n}: ${t[n]};`,"")}function e6(t){if(t=(t||"").trim(),!t)return{};let e={},n;for(let r of t.split(";")){let s=r.indexOf(":");if(s<1||s===r.length-1){let i=r.trimEnd();i.length>0&&n!==void 0&&(e[n]+=`;${i}`)}else n=r.slice(0,s).trim(),e[n]=r.slice(s+1).trim()}return e}var UE=x(()=>{Hs();Qe()});var Dd={};It(Dd,{serialize:()=>n6,serializeArray:()=>r6});function n6(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(t6,"+")}function r6(){return this.map((t,e)=>{let n=this._make(e);return Q(e)&&e.name==="form"?n.find(zE).toArray():n.filter(zE).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((t,e)=>{var n;let r=this._make(e),s=r.attr("name"),i=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(i)?i.map(a=>({name:s,value:a.replace(VE,`\r `)})):{name:s,value:i.replace(VE,`\r `)}}).toArray()}var zE,t6,VE,qE=x(()=>{Qe();zE="input,select,textarea,keygen",t6=/%20/g,VE=/\r?\n/g});var Od={};It(Od,{extract:()=>i6});function s6(t){var e;return typeof t=="string"?{selector:t,value:"textContent"}:{selector:t.selector,value:(e=t.value)!==null&&e!==void 0?e:"textContent"}}function i6(t){let e={};for(let n in t){let r=t[n],s=Array.isArray(r),{selector:i,value:a}=s6(s?r[0]:r),o=typeof a=="function"?a:typeof a=="string"?c=>this._make(c).prop(a):c=>this._make(c).extract(a);if(s)e[n]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((c,l)=>o(l,n,e)).get();else{let c=this._findBySelector(i,1);e[n]=c.length>0?o(c[0],n,e):void 0}}return e}var KE=x(()=>{});var Br,YE=x(()=>{X_();LE();BE();UE();qE();KE();Br=class{constructor(e,n,r){if(this.length=0,this.options=r,this._root=n,e){for(let s=0;s{Yf();js();YE();Hs()});function Ru(t){return t>=55296&&t<=57343}function GE(t){return t>=56320&&t<=57343}function QE(t,e){return(t-55296)*1024+9216+e}function Lu(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function Pu(t){return t>=64976&&t<=65007||o6.has(t)}var o6,we,g,dt,Mu=x(()=>{o6=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),we="\uFFFD";(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(g||(g={}));dt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var D,ha=x(()=>{(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(D||(D={}))});var u6,kd,XE=x(()=>{Mu();ha();u6=1<<16,kd=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=u6,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,n){let{line:r,col:s,offset:i}=this,a=s+n,o=i+n;return{code:e,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let n=this.html.charCodeAt(this.pos+1);if(GE(n))return this.pos++,this._addGap(),QE(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(D.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let r=0;r=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let e=this.html.charCodeAt(this.pos);return e===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):e===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ru(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===g.LINE_FEED||e===g.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Lu(e)?this._err(D.controlCharacterInInputStream):Pu(e)&&this._err(D.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}var fe,Bu=x(()=>{(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(fe||(fe={}))});var ju={};It(ju,{ATTRS:()=>an,DOCUMENT_MODE:()=>st,NS:()=>R,NUMBERED_HEADERS:()=>Ws,SPECIAL_ELEMENTS:()=>Rd,TAG_ID:()=>u,TAG_NAMES:()=>v,getTagID:()=>or,hasUnescapedText:()=>Ld});function or(t){var e;return(e=l6.get(t))!==null&&e!==void 0?e:u.UNKNOWN}function Ld(t,e){return f6.has(t)||e&&t===v.NOSCRIPT}var R,an,st,v,u,l6,F,Rd,Ws,f6,Nn=x(()=>{(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(R||(R={}));(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(an||(an={}));(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(st||(st={}));(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(v||(v={}));(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(u||(u={}));l6=new Map([[v.A,u.A],[v.ADDRESS,u.ADDRESS],[v.ANNOTATION_XML,u.ANNOTATION_XML],[v.APPLET,u.APPLET],[v.AREA,u.AREA],[v.ARTICLE,u.ARTICLE],[v.ASIDE,u.ASIDE],[v.B,u.B],[v.BASE,u.BASE],[v.BASEFONT,u.BASEFONT],[v.BGSOUND,u.BGSOUND],[v.BIG,u.BIG],[v.BLOCKQUOTE,u.BLOCKQUOTE],[v.BODY,u.BODY],[v.BR,u.BR],[v.BUTTON,u.BUTTON],[v.CAPTION,u.CAPTION],[v.CENTER,u.CENTER],[v.CODE,u.CODE],[v.COL,u.COL],[v.COLGROUP,u.COLGROUP],[v.DD,u.DD],[v.DESC,u.DESC],[v.DETAILS,u.DETAILS],[v.DIALOG,u.DIALOG],[v.DIR,u.DIR],[v.DIV,u.DIV],[v.DL,u.DL],[v.DT,u.DT],[v.EM,u.EM],[v.EMBED,u.EMBED],[v.FIELDSET,u.FIELDSET],[v.FIGCAPTION,u.FIGCAPTION],[v.FIGURE,u.FIGURE],[v.FONT,u.FONT],[v.FOOTER,u.FOOTER],[v.FOREIGN_OBJECT,u.FOREIGN_OBJECT],[v.FORM,u.FORM],[v.FRAME,u.FRAME],[v.FRAMESET,u.FRAMESET],[v.H1,u.H1],[v.H2,u.H2],[v.H3,u.H3],[v.H4,u.H4],[v.H5,u.H5],[v.H6,u.H6],[v.HEAD,u.HEAD],[v.HEADER,u.HEADER],[v.HGROUP,u.HGROUP],[v.HR,u.HR],[v.HTML,u.HTML],[v.I,u.I],[v.IMG,u.IMG],[v.IMAGE,u.IMAGE],[v.INPUT,u.INPUT],[v.IFRAME,u.IFRAME],[v.KEYGEN,u.KEYGEN],[v.LABEL,u.LABEL],[v.LI,u.LI],[v.LINK,u.LINK],[v.LISTING,u.LISTING],[v.MAIN,u.MAIN],[v.MALIGNMARK,u.MALIGNMARK],[v.MARQUEE,u.MARQUEE],[v.MATH,u.MATH],[v.MENU,u.MENU],[v.META,u.META],[v.MGLYPH,u.MGLYPH],[v.MI,u.MI],[v.MO,u.MO],[v.MN,u.MN],[v.MS,u.MS],[v.MTEXT,u.MTEXT],[v.NAV,u.NAV],[v.NOBR,u.NOBR],[v.NOFRAMES,u.NOFRAMES],[v.NOEMBED,u.NOEMBED],[v.NOSCRIPT,u.NOSCRIPT],[v.OBJECT,u.OBJECT],[v.OL,u.OL],[v.OPTGROUP,u.OPTGROUP],[v.OPTION,u.OPTION],[v.P,u.P],[v.PARAM,u.PARAM],[v.PLAINTEXT,u.PLAINTEXT],[v.PRE,u.PRE],[v.RB,u.RB],[v.RP,u.RP],[v.RT,u.RT],[v.RTC,u.RTC],[v.RUBY,u.RUBY],[v.S,u.S],[v.SCRIPT,u.SCRIPT],[v.SEARCH,u.SEARCH],[v.SECTION,u.SECTION],[v.SELECT,u.SELECT],[v.SOURCE,u.SOURCE],[v.SMALL,u.SMALL],[v.SPAN,u.SPAN],[v.STRIKE,u.STRIKE],[v.STRONG,u.STRONG],[v.STYLE,u.STYLE],[v.SUB,u.SUB],[v.SUMMARY,u.SUMMARY],[v.SUP,u.SUP],[v.TABLE,u.TABLE],[v.TBODY,u.TBODY],[v.TEMPLATE,u.TEMPLATE],[v.TEXTAREA,u.TEXTAREA],[v.TFOOT,u.TFOOT],[v.TD,u.TD],[v.TH,u.TH],[v.THEAD,u.THEAD],[v.TITLE,u.TITLE],[v.TR,u.TR],[v.TRACK,u.TRACK],[v.TT,u.TT],[v.U,u.U],[v.UL,u.UL],[v.SVG,u.SVG],[v.VAR,u.VAR],[v.WBR,u.WBR],[v.XMP,u.XMP]]);F=u,Rd={[R.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[R.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[R.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[R.XLINK]:new Set,[R.XML]:new Set,[R.XMLNS]:new Set},Ws=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]),f6=new Set([v.STYLE,v.SCRIPT,v.XMP,v.IFRAME,v.NOEMBED,v.NOFRAMES,v.PLAINTEXT])});function d6(t){return t>=g.DIGIT_0&&t<=g.DIGIT_9}function pa(t){return t>=g.LATIN_CAPITAL_A&&t<=g.LATIN_CAPITAL_Z}function h6(t){return t>=g.LATIN_SMALL_A&&t<=g.LATIN_SMALL_Z}function ur(t){return h6(t)||pa(t)}function ZE(t){return ur(t)||d6(t)}function Hu(t){return t+32}function JE(t){return t===g.SPACE||t===g.LINE_FEED||t===g.TABULATION||t===g.FORM_FEED}function eT(t){return JE(t)||t===g.SOLIDUS||t===g.GREATER_THAN_SIGN}function p6(t){return t===g.NULL?D.nullCharacterReference:t>1114111?D.characterReferenceOutsideUnicodeRange:Ru(t)?D.surrogateCharacterReference:Pu(t)?D.noncharacterCharacterReference:Lu(t)||t===g.CARRIAGE_RETURN?D.controlCharacterReference:null}var _,it,Uu,Pd=x(()=>{XE();Mu();Bu();Ms();ha();Nn();(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(_||(_={}));it={DATA:_.DATA,RCDATA:_.RCDATA,RAWTEXT:_.RAWTEXT,SCRIPT_DATA:_.SCRIPT_DATA,PLAINTEXT:_.PLAINTEXT,CDATA_SECTION:_.CDATA_SECTION};Uu=class{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=_.DATA,this.returnState=_.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kd(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Or(Ls,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{let s=p6(r);s&&this._err(s,1)}}:void 0)}_err(e,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(e,n))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,n,r){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let n=0;n0&&this._err(D.endTagWithAttributes),e.selfClosing&&this._err(D.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:fe.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,n)}_emitCodePoint(e){let n=JE(e)?fe.WHITESPACE_CHARACTER:e===g.NULL?fe.NULL_CHARACTER:fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(fe.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=_.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?rt.Attribute:rt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case _.DATA:{this._stateData(e);break}case _.RCDATA:{this._stateRcdata(e);break}case _.RAWTEXT:{this._stateRawtext(e);break}case _.SCRIPT_DATA:{this._stateScriptData(e);break}case _.PLAINTEXT:{this._statePlaintext(e);break}case _.TAG_OPEN:{this._stateTagOpen(e);break}case _.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case _.TAG_NAME:{this._stateTagName(e);break}case _.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case _.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case _.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case _.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case _.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case _.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case _.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case _.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case _.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case _.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case _.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case _.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case _.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case _.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case _.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case _.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case _.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case _.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case _.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case _.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case _.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case _.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case _.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case _.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case _.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case _.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case _.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case _.BOGUS_COMMENT:{this._stateBogusComment(e);break}case _.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case _.COMMENT_START:{this._stateCommentStart(e);break}case _.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case _.COMMENT:{this._stateComment(e);break}case _.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case _.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case _.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case _.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case _.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case _.COMMENT_END:{this._stateCommentEnd(e);break}case _.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case _.DOCTYPE:{this._stateDoctype(e);break}case _.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case _.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case _.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case _.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case _.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case _.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case _.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case _.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case _.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case _.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case _.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case _.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case _.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case _.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case _.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case _.CDATA_SECTION:{this._stateCdataSection(e);break}case _.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case _.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case _.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case _.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case g.LESS_THAN_SIGN:{this.state=_.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(e);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=_.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(we);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case g.LESS_THAN_SIGN:{this.state=_.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(we);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case g.LESS_THAN_SIGN:{this.state=_.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(we);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(we);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ur(e))this._createStartTagToken(),this.state=_.TAG_NAME,this._stateTagName(e);else switch(e){case g.EXCLAMATION_MARK:{this.state=_.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=_.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_.BOGUS_COMMENT,this._stateBogusComment(e);break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=_.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ur(e))this._createEndTagToken(),this.state=_.TAG_NAME,this._stateTagName(e);else switch(e){case g.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=_.DATA;break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=_.SCRIPT_DATA_ESCAPED,this._emitChars(we);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===g.SOLIDUS?this.state=_.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ur(e)?(this._emitChars("<"),this.state=_.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=_.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ur(e)?(this.state=_.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=_.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(we);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=_.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===g.SOLIDUS?(this.state=_.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=_.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(dt.SCRIPT,!1)&&eT(this.preprocessor.peek(dt.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n{Nn();tT=new Set([u.DD,u.DT,u.LI,u.OPTGROUP,u.OPTION,u.P,u.RB,u.RP,u.RT,u.RTC]),nT=new Set([...tT,u.CAPTION,u.COLGROUP,u.TBODY,u.TD,u.TFOOT,u.TH,u.THEAD,u.TR]),zu=new Set([u.APPLET,u.CAPTION,u.HTML,u.MARQUEE,u.OBJECT,u.TABLE,u.TD,u.TEMPLATE,u.TH]),m6=new Set([...zu,u.OL,u.UL]),g6=new Set([...zu,u.BUTTON]),rT=new Set([u.ANNOTATION_XML,u.MI,u.MN,u.MO,u.MS,u.MTEXT]),sT=new Set([u.DESC,u.FOREIGN_OBJECT,u.TITLE]),b6=new Set([u.TR,u.TEMPLATE,u.HTML]),_6=new Set([u.TBODY,u.TFOOT,u.THEAD,u.TEMPLATE,u.HTML]),E6=new Set([u.TABLE,u.TEMPLATE,u.HTML]),T6=new Set([u.TD,u.TH]),Md=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=u.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===u.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===R.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){let r=this._indexOf(e);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(e,n,r){let s=this._indexOf(e)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==R.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(e){for(;this.stackTop>=e;){let n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(e,n){let r=this._indexOfTagNames(e,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(E6,R.HTML)}clearBackToTableBodyContext(){this.clearBackTo(_6,R.HTML)}clearBackToTableRowContext(){this.clearBackTo(b6,R.HTML)}remove(e){let n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===u.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===u.HTML}hasInDynamicScope(e,n){for(let r=this.stackTop;r>=0;r--){let s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case R.HTML:{if(s===e)return!0;if(n.has(s))return!1;break}case R.SVG:{if(sT.has(s))return!1;break}case R.MATHML:{if(rT.has(s))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,zu)}hasInListItemScope(e){return this.hasInDynamicScope(e,m6)}hasInButtonScope(e){return this.hasInDynamicScope(e,g6)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let n=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case R.HTML:{if(Ws.has(n))return!0;if(zu.has(n))return!1;break}case R.SVG:{if(sT.has(n))return!1;break}case R.MATHML:{if(rT.has(n))return!1;break}}}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===R.HTML)switch(this.tagIDs[n]){case e:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===R.HTML)switch(this.tagIDs[e]){case u.TBODY:case u.THEAD:case u.TFOOT:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasInSelectScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===R.HTML)switch(this.tagIDs[n]){case e:return!0;case u.OPTION:case u.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;tT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;nT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&nT.has(this.currentTagId);)this.pop()}}});var Fd,Qt,aT,Bd,oT=x(()=>{Fd=3;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Qt||(Qt={}));aT={type:Qt.Marker},Bd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){let r=[],s=n.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let o=0;o[a.name,a.value])),i=0;for(let a=0;as.get(c.name)===c.value)&&(i+=1,i>=Fd&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(aT)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Qt.Element,element:e,token:n})}insertElementAfterBookmark(e,n){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Qt.Element,element:e,token:n})}removeEntry(e){let n=this.entries.indexOf(e);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){let e=this.entries.indexOf(aT);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let n=this.entries.find(r=>r.type===Qt.Marker||this.treeAdapter.getTagName(r.element)===e);return n&&n.type===Qt.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Qt.Element&&n.element===e)}}});var Ft,Vu=x(()=>{Nn();Ft={createDocument(){return{nodeName:"#document",mode:st.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){let r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,r){let s=t.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=e,s.publicId=n,s.systemId=r;else{let i={nodeName:"#documentType",name:e,publicId:n,systemId:r,parentNode:null};Ft.appendChild(t,i)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){let e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){let n=t.childNodes[t.childNodes.length-1];if(Ft.isTextNode(n)){n.value+=e;return}}Ft.appendChild(t,Ft.createTextNode(e))},insertTextBefore(t,e,n){let r=t.childNodes[t.childNodes.indexOf(n)-1];r&&Ft.isTextNode(r)?r.value+=e:Ft.insertBefore(t,Ft.createTextNode(e),n)},adoptAttributes(t,e){let n=new Set(t.attrs.map(r=>r.name));for(let r=0;rt.startsWith(n))}function dT(t){return t.name===uT&&t.publicId===null&&(t.systemId===null||t.systemId===x6)}function hT(t){if(t.name!==uT)return st.QUIRKS;let{systemId:e}=t;if(e&&e.toLowerCase()===y6)return st.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),C6.has(n))return st.QUIRKS;let r=e===null?A6:cT;if(fT(n,r))return st.QUIRKS;if(r=e===null?lT:S6,fT(n,r))return st.LIMITED_QUIRKS}return st.NO_QUIRKS}var uT,x6,y6,cT,A6,C6,lT,S6,pT=x(()=>{Nn();uT="html",x6="about:legacy-compat",y6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",cT=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],A6=[...cT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],C6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),lT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],S6=[...lT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]});function gT(t){let e=t.tagID;return e===u.FONT&&t.attrs.some(({name:r})=>r===an.COLOR||r===an.SIZE||r===an.FACE)||O6.has(e)}function jd(t){for(let e=0;e{Nn();mT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},I6="definitionurl",w6="definitionURL",N6=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),v6=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:R.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:R.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:R.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:R.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:R.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:R.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:R.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:R.XML}],["xml:space",{prefix:"xml",name:"space",namespace:R.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:R.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:R.XMLNS}]]),D6=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),O6=new Set([u.B,u.BIG,u.BLOCKQUOTE,u.BODY,u.BR,u.CENTER,u.CODE,u.DD,u.DIV,u.DL,u.DT,u.EM,u.EMBED,u.H1,u.H2,u.H3,u.H4,u.H5,u.H6,u.HEAD,u.HR,u.I,u.IMG,u.LI,u.LISTING,u.MENU,u.META,u.NOBR,u.OL,u.P,u.PRE,u.RUBY,u.S,u.SMALL,u.SPAN,u.STRONG,u.STRIKE,u.SUB,u.SUP,u.TABLE,u.TT,u.U,u.UL,u.VAR])});function j6(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):wT(t,e),n}function H6(t,e){let n=null,r=t.openElements.stackTop;for(;r>=0;r--){let s=t.openElements.items[r];if(s===e.element)break;t._isSpecialElement(s,t.openElements.tagIDs[r])&&(n=s)}return n||(t.openElements.shortenToLength(r<0?0:r),t.activeFormattingElements.removeEntry(e)),n}function U6(t,e,n){let r=e,s=t.openElements.getCommonAncestor(e);for(let i=0,a=s;a!==n;i++,a=s){s=t.openElements.getCommonAncestor(a);let o=t.activeFormattingElements.getElementEntry(a),c=o&&i>=F6;!o||c?(c&&t.activeFormattingElements.removeEntry(o),t.openElements.remove(a)):(a=z6(t,o),r===e&&(t.activeFormattingElements.bookmark=o),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(a,r),r=a)}return r}function z6(t,e){let n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function V6(t,e,n){let r=t.treeAdapter.getTagName(e),s=or(r);if(t._isElementCausesFosterParenting(s))t._fosterParentElement(n);else{let i=t.treeAdapter.getNamespaceURI(e);s===u.TEMPLATE&&i===R.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function q6(t,e,n){let r=t.treeAdapter.getNamespaceURI(n.element),{token:s}=n,i=t.treeAdapter.createElement(s.tagName,r,s.attrs);t._adoptNodes(e,i),t.treeAdapter.appendChild(e,i),t.activeFormattingElements.insertElementAfterBookmark(i,s),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,i,s.tagID)}function zd(t,e){for(let n=0;n=n;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){let r=t.openElements.items[0],s=t.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){let i=t.openElements.items[1],a=t.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&t._setEndLocation(i,e)}}}}function W6(t,e){t._setDocumentType(e);let n=e.forceQuirks?st.QUIRKS:hT(e);dT(e)||t._err(e,D.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=y.BEFORE_HTML}function ga(t,e){t._err(e,D.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,st.QUIRKS),t.insertionMode=y.BEFORE_HTML,t._processToken(e)}function $6(t,e){e.tagID===u.HTML?(t._insertElement(e,R.HTML),t.insertionMode=y.BEFORE_HEAD):ba(t,e)}function G6(t,e){let n=e.tagID;(n===u.HTML||n===u.HEAD||n===u.BODY||n===u.BR)&&ba(t,e)}function ba(t,e){t._insertFakeRootElement(),t.insertionMode=y.BEFORE_HEAD,t._processToken(e)}function Q6(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.HEAD:{t._insertElement(e,R.HTML),t.headElement=t.openElements.current,t.insertionMode=y.IN_HEAD;break}default:_a(t,e)}}function X6(t,e){let n=e.tagID;n===u.HEAD||n===u.BODY||n===u.HTML||n===u.BR?_a(t,e):t._err(e,D.endTagWithoutMatchingOpenElement)}function _a(t,e){t._insertFakeElement(v.HEAD,u.HEAD),t.headElement=t.openElements.current,t.insertionMode=y.IN_HEAD,t._processToken(e)}function Xt(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:{t._appendElement(e,R.HTML),e.ackSelfClosing=!0;break}case u.TITLE:{t._switchToTextParsing(e,it.RCDATA);break}case u.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,it.RAWTEXT):(t._insertElement(e,R.HTML),t.insertionMode=y.IN_HEAD_NO_SCRIPT);break}case u.NOFRAMES:case u.STYLE:{t._switchToTextParsing(e,it.RAWTEXT);break}case u.SCRIPT:{t._switchToTextParsing(e,it.SCRIPT_DATA);break}case u.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=y.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(y.IN_TEMPLATE);break}case u.HEAD:{t._err(e,D.misplacedStartTagForHeadElement);break}default:Ea(t,e)}}function Z6(t,e){switch(e.tagID){case u.HEAD:{t.openElements.pop(),t.insertionMode=y.AFTER_HEAD;break}case u.BODY:case u.BR:case u.HTML:{Ea(t,e);break}case u.TEMPLATE:{jr(t,e);break}default:t._err(e,D.endTagWithoutMatchingOpenElement)}}function jr(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==u.TEMPLATE&&t._err(e,D.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(u.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,D.endTagWithoutMatchingOpenElement)}function Ea(t,e){t.openElements.pop(),t.insertionMode=y.AFTER_HEAD,t._processToken(e)}function J6(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.BASEFONT:case u.BGSOUND:case u.HEAD:case u.LINK:case u.META:case u.NOFRAMES:case u.STYLE:{Xt(t,e);break}case u.NOSCRIPT:{t._err(e,D.nestedNoscriptInHead);break}default:Ta(t,e)}}function eD(t,e){switch(e.tagID){case u.NOSCRIPT:{t.openElements.pop(),t.insertionMode=y.IN_HEAD;break}case u.BR:{Ta(t,e);break}default:t._err(e,D.endTagWithoutMatchingOpenElement)}}function Ta(t,e){let n=e.type===fe.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=y.IN_HEAD,t._processToken(e)}function tD(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.BODY:{t._insertElement(e,R.HTML),t.framesetOk=!1,t.insertionMode=y.IN_BODY;break}case u.FRAMESET:{t._insertElement(e,R.HTML),t.insertionMode=y.IN_FRAMESET;break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{t._err(e,D.abandonedHeadElementChild),t.openElements.push(t.headElement,u.HEAD),Xt(t,e),t.openElements.remove(t.headElement);break}case u.HEAD:{t._err(e,D.misplacedStartTagForHeadElement);break}default:xa(t,e)}}function nD(t,e){switch(e.tagID){case u.BODY:case u.HTML:case u.BR:{xa(t,e);break}case u.TEMPLATE:{jr(t,e);break}default:t._err(e,D.endTagWithoutMatchingOpenElement)}}function xa(t,e){t._insertFakeElement(v.BODY,u.BODY),t.insertionMode=y.IN_BODY,Ku(t,e)}function Ku(t,e){switch(e.type){case fe.CHARACTER:{yT(t,e);break}case fe.WHITESPACE_CHARACTER:{xT(t,e);break}case fe.COMMENT:{Vd(t,e);break}case fe.START_TAG:{at(t,e);break}case fe.END_TAG:{Yu(t,e);break}case fe.EOF:{NT(t,e);break}default:}}function xT(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function yT(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function rD(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function sD(t,e){let n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function iD(t,e){let n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,R.HTML),t.insertionMode=y.IN_FRAMESET)}function aD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML)}function oD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),Ws.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,R.HTML)}function uD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function cD(t,e){let n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML),n||(t.formElement=t.openElements.current))}function lD(t,e){t.framesetOk=!1;let n=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){let s=t.openElements.tagIDs[r];if(n===u.LI&&s===u.LI||(n===u.DD||n===u.DT)&&(s===u.DD||s===u.DT)){t.openElements.generateImpliedEndTagsWithExclusion(s),t.openElements.popUntilTagNamePopped(s);break}if(s!==u.ADDRESS&&s!==u.DIV&&s!==u.P&&t._isSpecialElement(t.openElements.items[r],s))break}t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML)}function fD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML),t.tokenizer.state=it.PLAINTEXT}function dD(t,e){t.openElements.hasInScope(u.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(u.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML),t.framesetOk=!1}function hD(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(v.A);n&&(zd(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function pD(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function mD(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(u.NOBR)&&(zd(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,R.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function gD(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function bD(t,e){t.treeAdapter.getDocumentMode(t.document)!==st.QUIRKS&&t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._insertElement(e,R.HTML),t.framesetOk=!1,t.insertionMode=y.IN_TABLE}function AT(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,R.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function CT(t){let e=Fu(t,an.TYPE);return e!=null&&e.toLowerCase()===P6}function _D(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,R.HTML),CT(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function ED(t,e){t._appendElement(e,R.HTML),e.ackSelfClosing=!0}function TD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._appendElement(e,R.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function xD(t,e){e.tagName=v.IMG,e.tagID=u.IMG,AT(t,e)}function yD(t,e){t._insertElement(e,R.HTML),t.skipNextNewLine=!0,t.tokenizer.state=it.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=y.TEXT}function AD(t,e){t.openElements.hasInButtonScope(u.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,it.RAWTEXT)}function CD(t,e){t.framesetOk=!1,t._switchToTextParsing(e,it.RAWTEXT)}function ST(t,e){t._switchToTextParsing(e,it.RAWTEXT)}function SD(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===y.IN_TABLE||t.insertionMode===y.IN_CAPTION||t.insertionMode===y.IN_TABLE_BODY||t.insertionMode===y.IN_ROW||t.insertionMode===y.IN_CELL?y.IN_SELECT_IN_TABLE:y.IN_SELECT}function ID(t,e){t.openElements.currentTagId===u.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML)}function wD(t,e){t.openElements.hasInScope(u.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,R.HTML)}function ND(t,e){t.openElements.hasInScope(u.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(u.RTC),t._insertElement(e,R.HTML)}function vD(t,e){t._reconstructActiveFormattingElements(),jd(e),qu(e),e.selfClosing?t._appendElement(e,R.MATHML):t._insertElement(e,R.MATHML),e.ackSelfClosing=!0}function DD(t,e){t._reconstructActiveFormattingElements(),Hd(e),qu(e),e.selfClosing?t._appendElement(e,R.SVG):t._insertElement(e,R.SVG),e.ackSelfClosing=!0}function IT(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,R.HTML)}function at(t,e){switch(e.tagID){case u.I:case u.S:case u.B:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.SMALL:case u.STRIKE:case u.STRONG:{pD(t,e);break}case u.A:{hD(t,e);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{oD(t,e);break}case u.P:case u.DL:case u.OL:case u.UL:case u.DIV:case u.DIR:case u.NAV:case u.MAIN:case u.MENU:case u.ASIDE:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.DETAILS:case u.ADDRESS:case u.ARTICLE:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{aD(t,e);break}case u.LI:case u.DD:case u.DT:{lD(t,e);break}case u.BR:case u.IMG:case u.WBR:case u.AREA:case u.EMBED:case u.KEYGEN:{AT(t,e);break}case u.HR:{TD(t,e);break}case u.RB:case u.RTC:{wD(t,e);break}case u.RT:case u.RP:{ND(t,e);break}case u.PRE:case u.LISTING:{uD(t,e);break}case u.XMP:{AD(t,e);break}case u.SVG:{DD(t,e);break}case u.HTML:{rD(t,e);break}case u.BASE:case u.LINK:case u.META:case u.STYLE:case u.TITLE:case u.SCRIPT:case u.BGSOUND:case u.BASEFONT:case u.TEMPLATE:{Xt(t,e);break}case u.BODY:{sD(t,e);break}case u.FORM:{cD(t,e);break}case u.NOBR:{mD(t,e);break}case u.MATH:{vD(t,e);break}case u.TABLE:{bD(t,e);break}case u.INPUT:{_D(t,e);break}case u.PARAM:case u.TRACK:case u.SOURCE:{ED(t,e);break}case u.IMAGE:{xD(t,e);break}case u.BUTTON:{dD(t,e);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{gD(t,e);break}case u.IFRAME:{CD(t,e);break}case u.SELECT:{SD(t,e);break}case u.OPTION:case u.OPTGROUP:{ID(t,e);break}case u.NOEMBED:case u.NOFRAMES:{ST(t,e);break}case u.FRAMESET:{iD(t,e);break}case u.TEXTAREA:{yD(t,e);break}case u.NOSCRIPT:{t.options.scriptingEnabled?ST(t,e):IT(t,e);break}case u.PLAINTEXT:{fD(t,e);break}case u.COL:case u.TH:case u.TD:case u.TR:case u.HEAD:case u.FRAME:case u.TBODY:case u.TFOOT:case u.THEAD:case u.CAPTION:case u.COLGROUP:break;default:IT(t,e)}}function OD(t,e){if(t.openElements.hasInScope(u.BODY)&&(t.insertionMode=y.AFTER_BODY,t.options.sourceCodeLocationInfo)){let n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function kD(t,e){t.openElements.hasInScope(u.BODY)&&(t.insertionMode=y.AFTER_BODY,MT(t,e))}function RD(t,e){let n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function LD(t){let e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(u.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(u.FORM):n&&t.openElements.remove(n))}function PD(t){t.openElements.hasInButtonScope(u.P)||t._insertFakeElement(v.P,u.P),t._closePElement()}function MD(t){t.openElements.hasInListItemScope(u.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(u.LI),t.openElements.popUntilTagNamePopped(u.LI))}function FD(t,e){let n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function BD(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function jD(t,e){let n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function HD(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(v.BR,u.BR),t.openElements.pop(),t.framesetOk=!1}function wT(t,e){let n=e.tagName,r=e.tagID;for(let s=t.openElements.stackTop;s>0;s--){let i=t.openElements.items[s],a=t.openElements.tagIDs[s];if(r===a&&(r!==u.UNKNOWN||t.treeAdapter.getTagName(i)===n)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=s&&t.openElements.shortenToLength(s);break}if(t._isSpecialElement(i,a))break}}function Yu(t,e){switch(e.tagID){case u.A:case u.B:case u.I:case u.S:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.NOBR:case u.SMALL:case u.STRIKE:case u.STRONG:{zd(t,e);break}case u.P:{PD(t);break}case u.DL:case u.UL:case u.OL:case u.DIR:case u.DIV:case u.NAV:case u.PRE:case u.MAIN:case u.MENU:case u.ASIDE:case u.BUTTON:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.ADDRESS:case u.ARTICLE:case u.DETAILS:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.LISTING:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{RD(t,e);break}case u.LI:{MD(t);break}case u.DD:case u.DT:{FD(t,e);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{BD(t);break}case u.BR:{HD(t);break}case u.BODY:{OD(t,e);break}case u.HTML:{kD(t,e);break}case u.FORM:{LD(t);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{jD(t,e);break}case u.TEMPLATE:{jr(t,e);break}default:wT(t,e)}}function NT(t,e){t.tmplInsertionModeStack.length>0?PT(t,e):qd(t,e)}function UD(t,e){var n;e.tagID===u.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function zD(t,e){t._err(e,D.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Kd(t,e){if(ET.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=y.IN_TABLE_TEXT,e.type){case fe.CHARACTER:{DT(t,e);break}case fe.WHITESPACE_CHARACTER:{vT(t,e);break}}else Aa(t,e)}function VD(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,R.HTML),t.insertionMode=y.IN_CAPTION}function qD(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,R.HTML),t.insertionMode=y.IN_COLUMN_GROUP}function KD(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(v.COLGROUP,u.COLGROUP),t.insertionMode=y.IN_COLUMN_GROUP,Yd(t,e)}function YD(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,R.HTML),t.insertionMode=y.IN_TABLE_BODY}function WD(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(v.TBODY,u.TBODY),t.insertionMode=y.IN_TABLE_BODY,$u(t,e)}function $D(t,e){t.openElements.hasInTableScope(u.TABLE)&&(t.openElements.popUntilTagNamePopped(u.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function GD(t,e){CT(e)?t._appendElement(e,R.HTML):Aa(t,e),e.ackSelfClosing=!0}function QD(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,R.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function $s(t,e){switch(e.tagID){case u.TD:case u.TH:case u.TR:{WD(t,e);break}case u.STYLE:case u.SCRIPT:case u.TEMPLATE:{Xt(t,e);break}case u.COL:{KD(t,e);break}case u.FORM:{QD(t,e);break}case u.TABLE:{$D(t,e);break}case u.TBODY:case u.TFOOT:case u.THEAD:{YD(t,e);break}case u.INPUT:{GD(t,e);break}case u.CAPTION:{VD(t,e);break}case u.COLGROUP:{qD(t,e);break}default:Aa(t,e)}}function ya(t,e){switch(e.tagID){case u.TABLE:{t.openElements.hasInTableScope(u.TABLE)&&(t.openElements.popUntilTagNamePopped(u.TABLE),t._resetInsertionMode());break}case u.TEMPLATE:{jr(t,e);break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:case u.TBODY:case u.TD:case u.TFOOT:case u.TH:case u.THEAD:case u.TR:break;default:Aa(t,e)}}function Aa(t,e){let n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Ku(t,e),t.fosterParentingEnabled=n}function vT(t,e){t.pendingCharacterTokens.push(e)}function DT(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Ca(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n0&&t.openElements.currentTagId===u.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===u.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===u.OPTGROUP&&t.openElements.pop();break}case u.OPTION:{t.openElements.currentTagId===u.OPTION&&t.openElements.pop();break}case u.SELECT:{t.openElements.hasInSelectScope(u.SELECT)&&(t.openElements.popUntilTagNamePopped(u.SELECT),t._resetInsertionMode());break}case u.TEMPLATE:{jr(t,e);break}default:}}function nO(t,e){let n=e.tagID;n===u.CAPTION||n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR||n===u.TD||n===u.TH?(t.openElements.popUntilTagNamePopped(u.SELECT),t._resetInsertionMode(),t._processStartTag(e)):RT(t,e)}function rO(t,e){let n=e.tagID;n===u.CAPTION||n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR||n===u.TD||n===u.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(u.SELECT),t._resetInsertionMode(),t.onEndTag(e)):LT(t,e)}function sO(t,e){switch(e.tagID){case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{Xt(t,e);break}case u.CAPTION:case u.COLGROUP:case u.TBODY:case u.TFOOT:case u.THEAD:{t.tmplInsertionModeStack[0]=y.IN_TABLE,t.insertionMode=y.IN_TABLE,$s(t,e);break}case u.COL:{t.tmplInsertionModeStack[0]=y.IN_COLUMN_GROUP,t.insertionMode=y.IN_COLUMN_GROUP,Yd(t,e);break}case u.TR:{t.tmplInsertionModeStack[0]=y.IN_TABLE_BODY,t.insertionMode=y.IN_TABLE_BODY,$u(t,e);break}case u.TD:case u.TH:{t.tmplInsertionModeStack[0]=y.IN_ROW,t.insertionMode=y.IN_ROW,Gu(t,e);break}default:t.tmplInsertionModeStack[0]=y.IN_BODY,t.insertionMode=y.IN_BODY,at(t,e)}}function iO(t,e){e.tagID===u.TEMPLATE&&jr(t,e)}function PT(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(u.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):qd(t,e)}function aO(t,e){e.tagID===u.HTML?at(t,e):Qu(t,e)}function MT(t,e){var n;if(e.tagID===u.HTML){if(t.fragmentContext||(t.insertionMode=y.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===u.HTML){t._setEndLocation(t.openElements.items[0],e);let r=t.openElements.items[1];r&&!((n=t.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0?void 0:n.endTag)&&t._setEndLocation(r,e)}}else Qu(t,e)}function Qu(t,e){t.insertionMode=y.IN_BODY,Ku(t,e)}function oO(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.FRAMESET:{t._insertElement(e,R.HTML);break}case u.FRAME:{t._appendElement(e,R.HTML),e.ackSelfClosing=!0;break}case u.NOFRAMES:{Xt(t,e);break}default:}}function uO(t,e){e.tagID===u.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==u.FRAMESET&&(t.insertionMode=y.AFTER_FRAMESET))}function cO(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.NOFRAMES:{Xt(t,e);break}default:}}function lO(t,e){e.tagID===u.HTML&&(t.insertionMode=y.AFTER_AFTER_FRAMESET)}function fO(t,e){e.tagID===u.HTML?at(t,e):Xu(t,e)}function Xu(t,e){t.insertionMode=y.IN_BODY,Ku(t,e)}function dO(t,e){switch(e.tagID){case u.HTML:{at(t,e);break}case u.NOFRAMES:{Xt(t,e);break}default:}}function hO(t,e){e.chars=we,t._insertCharacters(e)}function pO(t,e){t._insertCharacters(e),t.framesetOk=!1}function FT(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==R.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function mO(t,e){if(gT(e))FT(t),t._startTagOutsideForeignContent(e);else{let n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===R.MATHML?jd(e):r===R.SVG&&(bT(e),Hd(e)),qu(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function gO(t,e){if(e.tagID===u.P||e.tagID===u.BR){FT(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){let r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===R.HTML){t._endTagOutsideForeignContent(e);break}let s=t.treeAdapter.getTagName(r);if(s.toLowerCase()===e.tagName){e.tagName=s,t.openElements.shortenToLength(n);break}}}var P6,M6,F6,y,B6,ET,TT,ma,OT,$d=x(()=>{Pd();iT();oT();Vu();pT();Ud();ha();Mu();Nn();Bu();P6="hidden",M6=8,F6=3;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(y||(y={}));B6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ET=new Set([u.TABLE,u.TBODY,u.TFOOT,u.THEAD,u.TR]),TT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ft,onParseError:null},ma=class{constructor(e,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=y.INITIAL,this.originalInsertionMode=y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=j(j({},TT),e),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Uu(this.options,this),this.activeFormattingElements=new Bd(this.treeAdapter),this.fragmentContextID=r?or(this.treeAdapter.getTagName(r)):u.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Md(this.document,this.treeAdapter,this)}static parse(e,n){let r=new this(n);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,n){let r=j(j({},TT),n);e??(e=r.treeAdapter.createElement(v.TEMPLATE,R.HTML,[]));let s=r.treeAdapter.createElement("documentmock",R.HTML,[]),i=new this(r,s,e);return i.fragmentContextID===u.TEMPLATE&&i.tmplInsertionModeStack.unshift(y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,n),n}_err(e,n,r){var s;if(!this.onParseError)return;let i=(s=e.location)!==null&&s!==void 0?s:B6,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(e,n,r){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,n)}onItemPop(e,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,e,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(e,n){let r=e===this.document||this.treeAdapter.getNamespaceURI(e)===R.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,R.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=y.TEXT}switchToPlaintextParsing(){this.insertionMode=y.TEXT,this.originalInsertionMode=y.IN_BODY,this.tokenizer.state=it.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===v.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==R.HTML))switch(this.fragmentContextID){case u.TITLE:case u.TEXTAREA:{this.tokenizer.state=it.RCDATA;break}case u.STYLE:case u.XMP:case u.IFRAME:case u.NOEMBED:case u.NOFRAMES:case u.NOSCRIPT:{this.tokenizer.state=it.RAWTEXT;break}case u.SCRIPT:{this.tokenizer.state=it.SCRIPT_DATA;break}case u.PLAINTEXT:{this.tokenizer.state=it.PLAINTEXT;break}default:}}_setDocumentType(e){let n=e.name||"",r=e.publicId||"",s=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),e.location){let a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){let r=n&&ce(j({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,e)}}_appendElement(e,n){let r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,n){let r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,n){let r=this.treeAdapter.createElement(e,R.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(e){let n=this.treeAdapter.createElement(e.tagName,R.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(v.HTML,R.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,u.HTML)}_appendCommentNode(e,n){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,e.chars,r):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;let s=this.treeAdapter.getChildNodes(n),i=r?s.lastIndexOf(r):s.length,a=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){let{endLine:c,endCol:l,endOffset:d}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,n){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){let r=n.location,s=this.treeAdapter.getTagName(e),i=n.type===fe.END_TAG&&s===n.tagName?{endTag:j({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,e.tagID===u.SVG&&this.treeAdapter.getTagName(n)===v.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===R.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===u.MGLYPH||e.tagID===u.MALIGNMARK)&&!this._isIntegrationPoint(r,n,R.HTML)}_processToken(e){switch(e.type){case fe.CHARACTER:{this.onCharacter(e);break}case fe.NULL_CHARACTER:{this.onNullCharacter(e);break}case fe.COMMENT:{this.onComment(e);break}case fe.DOCTYPE:{this.onDoctype(e);break}case fe.START_TAG:{this._processStartTag(e);break}case fe.END_TAG:{this.onEndTag(e);break}case fe.EOF:{this.onEof(e);break}case fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,r){let s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return _T(e,s,i,r)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let n=this.activeFormattingElements.entries.findIndex(s=>s.type===Qt.Marker||this.openElements.contains(s.element)),r=n<0?e-1:n-1;for(let s=r;s>=0;s--){let i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(u.P),this.openElements.popUntilTagNamePopped(u.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case u.TR:{this.insertionMode=y.IN_ROW;return}case u.TBODY:case u.THEAD:case u.TFOOT:{this.insertionMode=y.IN_TABLE_BODY;return}case u.CAPTION:{this.insertionMode=y.IN_CAPTION;return}case u.COLGROUP:{this.insertionMode=y.IN_COLUMN_GROUP;return}case u.TABLE:{this.insertionMode=y.IN_TABLE;return}case u.BODY:{this.insertionMode=y.IN_BODY;return}case u.FRAMESET:{this.insertionMode=y.IN_FRAMESET;return}case u.SELECT:{this._resetInsertionModeForSelect(e);return}case u.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case u.HTML:{this.insertionMode=this.headElement?y.AFTER_HEAD:y.BEFORE_HEAD;return}case u.TD:case u.TH:{if(e>0){this.insertionMode=y.IN_CELL;return}break}case u.HEAD:{if(e>0){this.insertionMode=y.IN_HEAD;return}break}}this.insertionMode=y.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){let r=this.openElements.tagIDs[n];if(r===u.TEMPLATE)break;if(r===u.TABLE){this.insertionMode=y.IN_SELECT_IN_TABLE;return}}this.insertionMode=y.IN_SELECT}_isElementCausesFosterParenting(e){return ET.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case u.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===R.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case u.TABLE:{let r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){let r=this.treeAdapter.getNamespaceURI(e);return Rd[r].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pO(this,e);return}switch(this.insertionMode){case y.INITIAL:{ga(this,e);break}case y.BEFORE_HTML:{ba(this,e);break}case y.BEFORE_HEAD:{_a(this,e);break}case y.IN_HEAD:{Ea(this,e);break}case y.IN_HEAD_NO_SCRIPT:{Ta(this,e);break}case y.AFTER_HEAD:{xa(this,e);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:{yT(this,e);break}case y.TEXT:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Kd(this,e);break}case y.IN_TABLE_TEXT:{DT(this,e);break}case y.IN_COLUMN_GROUP:{Wu(this,e);break}case y.AFTER_BODY:{Qu(this,e);break}case y.AFTER_AFTER_BODY:{Xu(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hO(this,e);return}switch(this.insertionMode){case y.INITIAL:{ga(this,e);break}case y.BEFORE_HTML:{ba(this,e);break}case y.BEFORE_HEAD:{_a(this,e);break}case y.IN_HEAD:{Ea(this,e);break}case y.IN_HEAD_NO_SCRIPT:{Ta(this,e);break}case y.AFTER_HEAD:{xa(this,e);break}case y.TEXT:{this._insertCharacters(e);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Kd(this,e);break}case y.IN_COLUMN_GROUP:{Wu(this,e);break}case y.AFTER_BODY:{Qu(this,e);break}case y.AFTER_AFTER_BODY:{Xu(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vd(this,e);return}switch(this.insertionMode){case y.INITIAL:case y.BEFORE_HTML:case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_TEMPLATE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{Vd(this,e);break}case y.IN_TABLE_TEXT:{Ca(this,e);break}case y.AFTER_BODY:{K6(this,e);break}case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Y6(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case y.INITIAL:{W6(this,e);break}case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:{this._err(e,D.misplacedDoctype);break}case y.IN_TABLE_TEXT:{Ca(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?mO(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case y.INITIAL:{ga(this,e);break}case y.BEFORE_HTML:{$6(this,e);break}case y.BEFORE_HEAD:{Q6(this,e);break}case y.IN_HEAD:{Xt(this,e);break}case y.IN_HEAD_NO_SCRIPT:{J6(this,e);break}case y.AFTER_HEAD:{tD(this,e);break}case y.IN_BODY:{at(this,e);break}case y.IN_TABLE:{$s(this,e);break}case y.IN_TABLE_TEXT:{Ca(this,e);break}case y.IN_CAPTION:{XD(this,e);break}case y.IN_COLUMN_GROUP:{Yd(this,e);break}case y.IN_TABLE_BODY:{$u(this,e);break}case y.IN_ROW:{Gu(this,e);break}case y.IN_CELL:{eO(this,e);break}case y.IN_SELECT:{RT(this,e);break}case y.IN_SELECT_IN_TABLE:{nO(this,e);break}case y.IN_TEMPLATE:{sO(this,e);break}case y.AFTER_BODY:{aO(this,e);break}case y.IN_FRAMESET:{oO(this,e);break}case y.AFTER_FRAMESET:{cO(this,e);break}case y.AFTER_AFTER_BODY:{fO(this,e);break}case y.AFTER_AFTER_FRAMESET:{dO(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?gO(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case y.INITIAL:{ga(this,e);break}case y.BEFORE_HTML:{G6(this,e);break}case y.BEFORE_HEAD:{X6(this,e);break}case y.IN_HEAD:{Z6(this,e);break}case y.IN_HEAD_NO_SCRIPT:{eD(this,e);break}case y.AFTER_HEAD:{nD(this,e);break}case y.IN_BODY:{Yu(this,e);break}case y.TEXT:{UD(this,e);break}case y.IN_TABLE:{ya(this,e);break}case y.IN_TABLE_TEXT:{Ca(this,e);break}case y.IN_CAPTION:{ZD(this,e);break}case y.IN_COLUMN_GROUP:{JD(this,e);break}case y.IN_TABLE_BODY:{Wd(this,e);break}case y.IN_ROW:{kT(this,e);break}case y.IN_CELL:{tO(this,e);break}case y.IN_SELECT:{LT(this,e);break}case y.IN_SELECT_IN_TABLE:{rO(this,e);break}case y.IN_TEMPLATE:{iO(this,e);break}case y.AFTER_BODY:{MT(this,e);break}case y.IN_FRAMESET:{uO(this,e);break}case y.AFTER_FRAMESET:{lO(this,e);break}case y.AFTER_AFTER_BODY:{Xu(this,e);break}default:}}onEof(e){switch(this.insertionMode){case y.INITIAL:{ga(this,e);break}case y.BEFORE_HTML:{ba(this,e);break}case y.BEFORE_HEAD:{_a(this,e);break}case y.IN_HEAD:{Ea(this,e);break}case y.IN_HEAD_NO_SCRIPT:{Ta(this,e);break}case y.AFTER_HEAD:{xa(this,e);break}case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{NT(this,e);break}case y.TEXT:{zD(this,e);break}case y.IN_TABLE_TEXT:{Ca(this,e);break}case y.IN_TEMPLATE:{PT(this,e);break}case y.AFTER_BODY:case y.IN_FRAMESET:case y.AFTER_FRAMESET:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{qd(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===g.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.TEXT:case y.IN_COLUMN_GROUP:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{this._insertCharacters(e);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:case y.AFTER_BODY:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{xT(this,e);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Kd(this,e);break}case y.IN_TABLE_TEXT:{vT(this,e);break}default:}}};OT=new Set([u.CAPTION,u.COL,u.COLGROUP,u.TBODY,u.TD,u.TFOOT,u.TH,u.THEAD,u.TR])});function _O(t,e){return e.treeAdapter.isElementNode(t)&&e.treeAdapter.getNamespaceURI(t)===R.HTML&&bO.has(e.treeAdapter.getTagName(t))}function Gd(t,e){let n=j(j({},EO),e);return BT(t,n)}function TO(t,e){let n="",r=e.treeAdapter.isElementNode(t)&&e.treeAdapter.getTagName(t)===v.TEMPLATE&&e.treeAdapter.getNamespaceURI(t)===R.HTML?e.treeAdapter.getTemplateContent(t):t,s=e.treeAdapter.getChildNodes(r);if(s)for(let i of s)n+=BT(i,e);return n}function BT(t,e){return e.treeAdapter.isElementNode(t)?xO(t,e):e.treeAdapter.isTextNode(t)?AO(t,e):e.treeAdapter.isCommentNode(t)?CO(t,e):e.treeAdapter.isDocumentTypeNode(t)?SO(t,e):""}function xO(t,e){let n=e.treeAdapter.getTagName(t);return`<${n}${yO(t,e)}>${_O(t,e)?"":`${TO(t,e)}`}`}function yO(t,{treeAdapter:e}){let n="";for(let r of e.getAttrList(t)){if(n+=" ",r.namespace)switch(r.namespace){case R.XML:{n+=`xml:${r.name}`;break}case R.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case R.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${Fs(r.value)}"`}return n}function AO(t,e){let{treeAdapter:n}=e,r=n.getTextNodeContent(t),s=n.getParentNode(t),i=s&&n.isElementNode(s)&&n.getTagName(s);return i&&n.getNamespaceURI(s)===R.HTML&&Ld(i,e.scriptingEnabled)?r:Bs(r)}function CO(t,{treeAdapter:e}){return``}function SO(t,{treeAdapter:e}){return``}var bO,EO,jT=x(()=>{Nn();Zi();Vu();bO=new Set([v.AREA,v.BASE,v.BASEFONT,v.BGSOUND,v.BR,v.COL,v.EMBED,v.FRAME,v.HR,v.IMG,v.INPUT,v.KEYGEN,v.LINK,v.META,v.PARAM,v.SOURCE,v.TRACK,v.WBR]);EO={treeAdapter:Ft,scriptingEnabled:!0}});function HT(t,e){return ma.parse(t,e)}function UT(t,e,n){typeof t=="string"&&(n=e,e=t,t=null);let r=ma.getFragmentParser(t,n);return r.tokenizer.write(e,!0),r.getFragment()}var Qd=x(()=>{$d();Vu();$d();jT();ha();Ud();Nn();Bu();Pd()});function zT(t){let e=t.includes('"')?"'":'"';return e+t+e}function IO(t,e,n){let r="!DOCTYPE ";return t&&(r+=t),e?r+=` PUBLIC ${zT(e)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${zT(n)}`),r}var vn,VT=x(()=>{Qd();Qe();vn={isCommentNode:Dr,isElementNode:Q,isTextNode:gt,createDocument(){let t=new kt([]);return t["x-mode"]=ju.DOCUMENT_MODE.NO_QUIRKS,t},createDocumentFragment(){return new kt([])},createElement(t,e,n){let r=Object.create(null),s=Object.create(null),i=Object.create(null);for(let o=0;olu(a)&&a.name==="!doctype");i?i.data=s??null:(i=new Ds("!doctype",s),vn.appendChild(t,i)),i["x-name"]=e,i["x-publicId"]=n,i["x-systemId"]=r},setDocumentMode(t,e){t["x-mode"]=e},getDocumentMode(t){return t["x-mode"]},detachNode(t){if(t.parent){let e=t.parent.children.indexOf(t),{prev:n,next:r}=t;t.prev=null,t.next=null,n&&(n.next=r),r&&(r.prev=n),t.parent.children.splice(e,1),t.parent=null}},insertText(t,e){let n=t.children[t.children.length-1];n&>(n)?n.data+=e:vn.appendChild(t,vn.createTextNode(e))},insertTextBefore(t,e,n){let r=t.children[t.children.indexOf(n)-1];r&>(r)?r.data+=e:vn.insertBefore(t,vn.createTextNode(e),n)},adoptAttributes(t,e){for(let n=0;n{Qe();Qd();VT();wO={treeAdapter:vn}});function Dn(t){return t===te.Space||t===te.NewLine||t===te.Tab||t===te.FormFeed||t===te.CarriageReturn}function Zu(t){return t===te.Slash||t===te.Gt||Dn(t)}function NO(t){return t>=te.LowerA&&t<=te.LowerZ||t>=te.UpperA&&t<=te.UpperZ}var te,M,Bt,Xe,Sa,Xd=x(()=>{Ms();(function(t){t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationMark=33]="ExclamationMark",t[t.Number=35]="Number",t[t.Amp=38]="Amp",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Dash=45]="Dash",t[t.Slash=47]="Slash",t[t.Zero=48]="Zero",t[t.Nine=57]="Nine",t[t.Semi=59]="Semi",t[t.Lt=60]="Lt",t[t.Eq=61]="Eq",t[t.Gt=62]="Gt",t[t.Questionmark=63]="Questionmark",t[t.UpperA=65]="UpperA",t[t.LowerA=97]="LowerA",t[t.UpperF=70]="UpperF",t[t.LowerF=102]="LowerF",t[t.UpperZ=90]="UpperZ",t[t.LowerZ=122]="LowerZ",t[t.LowerX=120]="LowerX",t[t.OpeningSquareBracket=91]="OpeningSquareBracket"})(te||(te={}));(function(t){t[t.Text=1]="Text",t[t.BeforeTagName=2]="BeforeTagName",t[t.InTagName=3]="InTagName",t[t.InSelfClosingTag=4]="InSelfClosingTag",t[t.BeforeClosingTagName=5]="BeforeClosingTagName",t[t.InClosingTagName=6]="InClosingTagName",t[t.AfterClosingTagName=7]="AfterClosingTagName",t[t.BeforeAttributeName=8]="BeforeAttributeName",t[t.InAttributeName=9]="InAttributeName",t[t.AfterAttributeName=10]="AfterAttributeName",t[t.BeforeAttributeValue=11]="BeforeAttributeValue",t[t.InAttributeValueDq=12]="InAttributeValueDq",t[t.InAttributeValueSq=13]="InAttributeValueSq",t[t.InAttributeValueNq=14]="InAttributeValueNq",t[t.BeforeDeclaration=15]="BeforeDeclaration",t[t.InDeclaration=16]="InDeclaration",t[t.InProcessingInstruction=17]="InProcessingInstruction",t[t.BeforeComment=18]="BeforeComment",t[t.CDATASequence=19]="CDATASequence",t[t.InSpecialComment=20]="InSpecialComment",t[t.InCommentLike=21]="InCommentLike",t[t.BeforeSpecialS=22]="BeforeSpecialS",t[t.BeforeSpecialT=23]="BeforeSpecialT",t[t.SpecialStartSequence=24]="SpecialStartSequence",t[t.InSpecialTag=25]="InSpecialTag",t[t.InEntity=26]="InEntity"})(M||(M={}));(function(t){t[t.NoValue=0]="NoValue",t[t.Unquoted=1]="Unquoted",t[t.Single=2]="Single",t[t.Double=3]="Double"})(Bt||(Bt={}));Xe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},Sa=class{constructor({xmlMode:e=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=M.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=M.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=e,this.decodeEntities=n,this.entityDecoder=new Or(e?fu:Ls,(s,i)=>this.emitCodePoint(s,i))}reset(){this.state=M.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=M.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=M.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===te.Amp&&this.startEntity()}stateSpecialStartSequence(e){let n=this.sequenceIndex===this.currentSequence.length;if(!(n?Zu(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=M.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===te.Gt||Dn(e)){let n=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,e===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===M.Text||this.state===M.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===M.InAttributeValueDq||this.state===M.InAttributeValueSq||this.state===M.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index=e||(this.state===M.InCommentLike?this.currentSequence===Xe.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===M.InTagName||this.state===M.BeforeAttributeName||this.state===M.BeforeAttributeValue||this.state===M.AfterAttributeName||this.state===M.InAttributeName||this.state===M.InAttributeValueSq||this.state===M.InAttributeValueDq||this.state===M.InAttributeValueNq||this.state===M.InClosingTagName||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,n){this.baseState!==M.Text&&this.baseState!==M.InSpecialTag?(this.sectionStart{Xd();Ms();Gs=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Ee=new Set(["p"]),WT=new Set(["thead","tbody"]),$T=new Set(["dd","dt"]),GT=new Set(["rt","rp"]),vO=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Ee],["h1",Ee],["h2",Ee],["h3",Ee],["h4",Ee],["h5",Ee],["h6",Ee],["select",Gs],["input",Gs],["output",Gs],["button",Gs],["datalist",Gs],["textarea",Gs],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",$T],["dt",$T],["address",Ee],["article",Ee],["aside",Ee],["blockquote",Ee],["details",Ee],["div",Ee],["dl",Ee],["fieldset",Ee],["figcaption",Ee],["figure",Ee],["footer",Ee],["form",Ee],["header",Ee],["hr",Ee],["main",Ee],["nav",Ee],["ol",Ee],["pre",Ee],["section",Ee],["table",Ee],["ul",Ee],["rt",GT],["rp",GT],["tbody",WT],["tfoot",WT]]),DO=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),QT=new Set(["math","svg"]),XT=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),OO=/\s|\//,Ju=class{constructor(e,n={}){var r,s,i,a,o,c;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=e??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(s=n.lowerCaseAttributeNames)!==null&&s!==void 0?s:this.htmlMode,this.recognizeSelfClosing=(i=n.recognizeSelfClosing)!==null&&i!==void 0?i:!this.htmlMode,this.tokenizer=new((a=n.Tokenizer)!==null&&a!==void 0?a:Sa)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(o=this.cbs).onparserinit)===null||c===void 0||c.call(o,this)}ontext(e,n){var r,s;let i=this.getSlice(e,n);this.endIndex=n-1,(s=(r=this.cbs).ontext)===null||s===void 0||s.call(r,i),this.startIndex=n}ontextentity(e,n){var r,s;this.endIndex=n-1,(s=(r=this.cbs).ontext)===null||s===void 0||s.call(r,Ps(e)),this.startIndex=n}isVoidElement(e){return this.htmlMode&&DO.has(e)}onopentagname(e,n){this.endIndex=n;let r=this.getSlice(e,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(e){var n,r,s,i;this.openTagStart=this.startIndex,this.tagname=e;let a=this.htmlMode&&vO.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){let o=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,o,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(QT.has(e)?this.foreignContext.unshift(!0):XT.has(e)&&this.foreignContext.unshift(!1))),(i=(s=this.cbs).onopentagname)===null||i===void 0||i.call(s,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,n){var r,s,i,a,o,c,l,d;this.endIndex=n;let h=this.getSlice(e,n);if(this.lowerCaseTagNames&&(h=h.toLowerCase()),this.htmlMode&&(QT.has(h)||XT.has(h))&&this.foreignContext.shift(),this.isVoidElement(h))this.htmlMode&&h==="br"&&((a=(i=this.cbs).onopentagname)===null||a===void 0||a.call(i,"br"),(c=(o=this.cbs).onopentag)===null||c===void 0||c.call(o,"br",{},!0),(d=(l=this.cbs).onclosetag)===null||d===void 0||d.call(l,"br",!1));else{let f=this.stack.indexOf(h);if(f!==-1)for(let p=0;p<=f;p++){let E=this.stack.shift();(s=(r=this.cbs).onclosetag)===null||s===void 0||s.call(r,E,p!==f)}else this.htmlMode&&h==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var n,r;let s=this.tagname;this.endOpenTag(e),this.stack[0]===s&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,s,!e),this.stack.shift())}onattribname(e,n){this.startIndex=e;let r=this.getSlice(e,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(e,n){this.attribvalue+=this.getSlice(e,n)}onattribentity(e){this.attribvalue+=Ps(e)}onattribend(e,n){var r,s;this.endIndex=n,(s=(r=this.cbs).onattribute)===null||s===void 0||s.call(r,this.attribname,this.attribvalue,e===Bt.Double?'"':e===Bt.Single?"'":e===Bt.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){let n=e.search(OO),r=n<0?e:e.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(e,n){this.endIndex=n;let r=this.getSlice(e,n);if(this.cbs.onprocessinginstruction){let s=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${s}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(e,n){this.endIndex=n;let r=this.getSlice(e,n);if(this.cbs.onprocessinginstruction){let s=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${s}`,`?${r}`)}this.startIndex=n+1}oncomment(e,n,r){var s,i,a,o;this.endIndex=n,(i=(s=this.cbs).oncomment)===null||i===void 0||i.call(s,this.getSlice(e,n-r)),(o=(a=this.cbs).oncommentend)===null||o===void 0||o.call(a),this.startIndex=n+1}oncdata(e,n,r){var s,i,a,o,c,l,d,h,f,p;this.endIndex=n;let E=this.getSlice(e,n-r);!this.htmlMode||this.options.recognizeCDATA?((i=(s=this.cbs).oncdatastart)===null||i===void 0||i.call(s),(o=(a=this.cbs).ontext)===null||o===void 0||o.call(a,E),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((h=(d=this.cbs).oncomment)===null||h===void 0||h.call(d,`[CDATA[${E}]]`),(p=(f=this.cbs).oncommentend)===null||p===void 0||p.call(f)),this.startIndex=n+1}onend(){var e,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(e-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{Zd();Zd();Qe();Qe();Xd();Ns();Gt();Gt();Gt()});var kO,RO,ex=x(()=>{$E();wd();YT();jf();JT();kO=PE((t,e,n,r)=>e._useHtmlParser2?ZT(t,e):qT(t,e,n,r)),RO=WE(kO,(t,e)=>e._useHtmlParser2?hu(t,e):KT(t))});var tx={};It(tx,{contains:()=>ra,load:()=>RO,merge:()=>Wf});var nx=x(()=>{js();ex()});var sx=Rn((Gj,rx)=>{"use strict";var LO=(nx(),tx);function PO(t){let e=LO.load(t),n=[];return[{tagName:"a",attr:"href"},{tagName:"area",attr:"href"},{tagName:"link",attr:"href"},{tagName:"audio",attr:"src"},{tagName:"embed",attr:"src"},{tagName:"iframe",attr:"src"},{tagName:"input",attr:"src"},{tagName:"img",attr:"src"},{tagName:"javascript",attr:"src"},{tagName:"source",attr:"src"},{tagName:"track",attr:"src"},{tagName:"video",attr:"src"}].forEach(({tagName:r,attr:s})=>{e(r).each((i,a)=>{e(a).attr(s)&&n.push(e(a).attr(s))})}),n}rx.exports=PO});var ox=Rn((Qj,ax)=>{"use strict";var{marked:ix}=t_(),MO=sx();ax.exports=function(e,n=!1){ix.setOptions({mangle:!1});let r=ix(e);return MO(r)}});var hx={};It(hx,{default:()=>FO,getServer:()=>dx});function dx(t){let e=hl(t),n=lx.createServer(async function(r,s){s.setHeader("Access-Control-Allow-Origin","*"),s.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),s.setHeader("Access-Control-Allow-Headers","Access-Control-Allow-Headers, Origin, Authorization,Accept,x-client-id, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, hypothesis-client-version"),s.setHeader("Access-Control-Allow-Credentials","true");try{if(r.url){let i=fx.parse(r.url,!0);if(i.pathname==="/search"){let a=i.query.q,o=await e.search(a);s.statusCode=200,s.setHeader("Content-Type","application/json"),s.end(JSON.stringify(o))}else s.end()}}catch(i){s.statusCode=500,s.end(i)}});return{listen(r){console.debug(`Omnisearch - Starting HTTP server on port ${r}`),n.listen({port:parseInt(r),host:t.settings.DANGER_httpHost??"localhost"},()=>{console.log(`Omnisearch - Started HTTP server on port ${r}`),t.settings.DANGER_httpHost&&t.settings.DANGER_httpHost!=="localhost"?new Ia.Notice(`Omnisearch - Started non-localhost HTTP server at ${t.settings.DANGER_httpHost}:${r}`,12e4):t.settings.httpApiNotice&&new Ia.Notice(`Omnisearch - Started HTTP server on port ${r}`)}),n.on("error",s=>{console.error(s),new Ia.Notice(`Omnisearch - Cannot start HTTP server on ${r}. See console for more details.`)})},close(){n.close(),console.log("Omnisearch - Terminated HTTP server"),t.settings.httpApiEnabled&&t.settings.httpApiNotice&&new Ia.Notice("Omnisearch - Terminated HTTP server")}}}var lx,fx,Ia,FO,px=x(()=>{lx=be(require("http")),fx=be(require("url")),Ia=be(require("obsidian"));pl();FO=dx});It(exports,{default:()=>ih});var On=be(require("obsidian"));Ai();nl();en();pl();var De=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,He=Object.keys,tt=Array.isArray;typeof Promise!="undefined"&&!De.Promise&&(De.Promise=Promise);function lt(t,e){return typeof e!="object"||He(e).forEach(function(n){t[n]=e[n]}),t}var Si=Object.getPrototypeOf,o3={}.hasOwnProperty;function At(t,e){return o3.call(t,e)}function ps(t,e){typeof e=="function"&&(e=e(Si(t))),(typeof Reflect=="undefined"?He:Reflect.ownKeys)(e).forEach(n=>{mn(t,n,e[n])})}var Mb=Object.defineProperty;function mn(t,e,n,r){Mb(t,e,lt(n&&At(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ms(t){return{from:function(e){return t.prototype=Object.create(e.prototype),mn(t.prototype,"constructor",t),{extend:ps.bind(null,t.prototype)}}}}var u3=Object.getOwnPropertyDescriptor;function ml(t,e){let n=u3(t,e),r;return n||(r=Si(t))&&ml(r,e)}var c3=[].slice;function No(t,e,n){return c3.call(t,e,n)}function Fb(t,e){return e(t)}function Ii(t){if(!t)throw new Error("Assertion Failed")}function Bb(t){De.setImmediate?setImmediate(t):setTimeout(t,0)}function jb(t,e){return t.reduce((n,r,s)=>{var i=e(r,s);return i&&(n[i[0]]=i[1]),n},{})}function l3(t,e,n){try{t.apply(null,n)}catch(r){e&&e(r)}}function gn(t,e){if(typeof e=="string"&&At(t,e))return t[e];if(!e)return t;if(typeof e!="string"){for(var n=[],r=0,s=e.length;r["Int","Uint","Float"].map(e=>e+t+"Array")))).filter(t=>De[t]),h3=zb.map(t=>De[t]);jb(zb,t=>[t,!0]);var Gn=null;function wi(t){Gn=typeof WeakMap!="undefined"&&new WeakMap;let e=gl(t);return Gn=null,e}function gl(t){if(!t||typeof t!="object")return t;let e=Gn&&Gn.get(t);if(e)return e;if(tt(t)){e=[],Gn&&Gn.set(t,e);for(var n=0,r=t.length;n=0)e=t;else{let i=Si(t);e=i===Object.prototype?{}:Object.create(i),Gn&&Gn.set(t,e);for(var s in t)At(t,s)&&(e[s]=gl(t[s]))}return e}var{toString:p3}={};function bl(t){return p3.call(t).slice(8,-1)}var _l=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",m3=typeof _l=="symbol"?function(t){var e;return t!=null&&(e=t[_l])&&e.apply(t)}:function(){return null},gs={};function bn(t){var e,n,r,s;if(arguments.length===1){if(tt(t))return t.slice();if(this===gs&&typeof t=="string")return[t];if(s=m3(t)){for(n=[];r=s.next(),!r.done;)n.push(r.value);return n}if(t==null)return[t];if(e=t.length,typeof e=="number"){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}var El=typeof Symbol!="undefined"?t=>t[Symbol.toStringTag]==="AsyncFunction":()=>!1,rn=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Vb(t,e){rn=t,qb=e}var qb=()=>!0,g3=!new Error("").stack;function xr(){if(g3)try{throw xr.arguments,new Error}catch(t){return t}return new Error}function Tl(t,e){var n=t.stack;return n?(e=e||0,n.indexOf(t.name)===0&&(e+=(t.name+t.message).split(` `).length),n.split(` `).slice(e).filter(qb).map(r=>` `+r).join("")):""}var b3=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],Kb=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],xl=b3.concat(Kb),_3={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function bs(t,e){this._e=xr(),this.name=t,this.message=e}ms(bs).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Tl(this._e,2))}},toString:function(){return this.name+": "+this.message}});function Yb(t,e){return t+". Errors: "+Object.keys(e).map(n=>e[n].toString()).filter((n,r,s)=>s.indexOf(n)===r).join(` `)}function vo(t,e,n,r){this._e=xr(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Yb(t,e)}ms(vo).from(bs);function Ni(t,e){this._e=xr(),this.name="BulkError",this.failures=Object.keys(e).map(n=>e[n]),this.failuresByPos=e,this.message=Yb(t,e)}ms(Ni).from(bs);var yl=xl.reduce((t,e)=>(t[e]=e+"Error",t),{}),E3=bs,se=xl.reduce((t,e)=>{var n=e+"Error";function r(s,i){this._e=xr(),this.name=n,s?typeof s=="string"?(this.message=`${s}${i?` `+i:""}`,this.inner=i||null):typeof s=="object"&&(this.message=`${s.name} ${s.message}`,this.inner=s):(this.message=_3[e]||n,this.inner=null)}return ms(r).from(E3),t[e]=r,t},{});se.Syntax=SyntaxError;se.Type=TypeError;se.Range=RangeError;var Wb=Kb.reduce((t,e)=>(t[e+"Error"]=se[e],t),{});function T3(t,e){if(!t||t instanceof bs||t instanceof TypeError||t instanceof SyntaxError||!t.name||!Wb[t.name])return t;var n=new Wb[t.name](e||t.message,t);return"stack"in t&&mn(n,"stack",{get:function(){return this.inner.stack}}),n}var Do=xl.reduce((t,e)=>(["Syntax","Type","Range"].indexOf(e)===-1&&(t[e+"Error"]=se[e]),t),{});Do.ModifyError=vo;Do.DexieError=bs;Do.BulkError=Ni;function xe(){}function vi(t){return t}function x3(t,e){return t==null||t===vi?e:function(n){return e(t(n))}}function yr(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function y3(t,e){return t===xe?e:function(){var n=t.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?yr(r,this.onsuccess):r),s&&(this.onerror=this.onerror?yr(s,this.onerror):s),i!==void 0?i:n}}function A3(t,e){return t===xe?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?yr(n,this.onsuccess):n),r&&(this.onerror=this.onerror?yr(r,this.onerror):r)}}function C3(t,e){return t===xe?e:function(n){var r=t.apply(this,arguments);lt(n,r);var s=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return s&&(this.onsuccess=this.onsuccess?yr(s,this.onsuccess):s),i&&(this.onerror=this.onerror?yr(i,this.onerror):i),r===void 0?a===void 0?void 0:a:lt(r,a)}}function S3(t,e){return t===xe?e:function(){return e.apply(this,arguments)===!1?!1:t.apply(this,arguments)}}function Al(t,e){return t===xe?e:function(){var n=t.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,s=arguments.length,i=new Array(s);s--;)i[s]=arguments[s];return n.then(function(){return e.apply(r,i)})}return e.apply(this,arguments)}}var Di={},I3=100,w3=20,$b=100,[Cl,Oo,Sl]=typeof Promise=="undefined"?[]:(()=>{let t=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[t,Si(t),t];let e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Si(e),t]})(),Gb=Oo&&Oo.then,ko=Cl&&Cl.constructor,Il=!!Sl,wl=!1,N3=Sl?()=>{Sl.then(Mo)}:De.setImmediate?setImmediate.bind(null,Mo):De.MutationObserver?()=>{var t=document.createElement("div");new MutationObserver(()=>{Mo(),t=null}).observe(t,{attributes:!0}),t.setAttribute("i","1")}:()=>{setTimeout(Mo,0)},Oi=function(t,e){ki.push([t,e]),Ro&&(N3(),Ro=!1)},Nl=!0,Ro=!0,Ar=[],Lo=[],vl=null,Dl=vi,_s={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:i1,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(t=>{try{i1(t[0],t[1])}catch{}})}},ee=_s,ki=[],Cr=0,Po=[];function K(t){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=xe,this._lib=!1;var e=this._PSD=ee;if(rn&&(this._stackHolder=xr(),this._prev=null,this._numPrev=0),typeof t!="function"){if(t!==Di)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&kl(this,this._value);return}this._state=null,this._value=null,++e.ref,Xb(this,t)}var Ol={get:function(){var t=ee,e=jo;function n(r,s){var i=!t.global&&(t!==ee||e!==jo);let a=i&&!_n();var o=new K((c,l)=>{Rl(this,new Qb(Uo(r,t,i,a),Uo(s,t,i,a),c,l,t))});return rn&&e1(o,this),o}return n.prototype=Di,n},set:function(t){mn(this,"then",t&&t.prototype===Di?Ol:{get:function(){return t},set:Ol.set})}};ps(K.prototype,{then:Ol,_then:function(t,e){Rl(this,new Qb(null,null,t,e,ee))},catch:function(t){if(arguments.length===1)return this.then(null,t);var e=arguments[0],n=arguments[1];return typeof e=="function"?this.then(null,r=>r instanceof e?n(r):Fo(r)):this.then(null,r=>r&&r.name===e?n(r):Fo(r))},finally:function(t){return this.then(e=>(t(),e),e=>(t(),Fo(e)))},stack:{get:function(){if(this._stack)return this._stack;try{wl=!0;var t=Jb(this,[],w3),e=t.join(` From previous: `);return this._state!==null&&(this._stack=e),e}finally{wl=!1}}},timeout:function(t,e){return t<1/0?new K((n,r)=>{var s=setTimeout(()=>r(new se.Timeout(e)),t);this.then(n,r).finally(clearTimeout.bind(null,s))}):this}});typeof Symbol!="undefined"&&Symbol.toStringTag&&mn(K.prototype,Symbol.toStringTag,"Dexie.Promise");_s.env=t1();function Qb(t,e,n,r,s){this.onFulfilled=typeof t=="function"?t:null,this.onRejected=typeof e=="function"?e:null,this.resolve=n,this.reject=r,this.psd=s}ps(K,{all:function(){var t=bn.apply(null,arguments).map(Ho);return new K(function(e,n){t.length===0&&e([]);var r=t.length;t.forEach((s,i)=>K.resolve(s).then(a=>{t[i]=a,--r||e(t)},n))})},resolve:t=>{if(t instanceof K)return t;if(t&&typeof t.then=="function")return new K((n,r)=>{t.then(n,r)});var e=new K(Di,!0,t);return e1(e,vl),e},reject:Fo,race:function(){var t=bn.apply(null,arguments).map(Ho);return new K((e,n)=>{t.map(r=>K.resolve(r).then(e,n))})},PSD:{get:()=>ee,set:t=>ee=t},totalEchoes:{get:()=>jo},newPSD:Qn,usePSD:Ts,scheduler:{get:()=>Oi,set:t=>{Oi=t}},rejectionMapper:{get:()=>Dl,set:t=>{Dl=t}},follow:(t,e)=>new K((n,r)=>Qn((s,i)=>{var a=ee;a.unhandleds=[],a.onunhandled=i,a.finalize=yr(function(){D3(()=>{this.unhandleds.length===0?s():i(this.unhandleds[0])})},a.finalize),t()},e,n,r))});ko&&(ko.allSettled&&mn(K,"allSettled",function(){let t=bn.apply(null,arguments).map(Ho);return new K(e=>{t.length===0&&e([]);let n=t.length,r=new Array(n);t.forEach((s,i)=>K.resolve(s).then(a=>r[i]={status:"fulfilled",value:a},a=>r[i]={status:"rejected",reason:a}).then(()=>--n||e(r)))})}),ko.any&&typeof AggregateError!="undefined"&&mn(K,"any",function(){let t=bn.apply(null,arguments).map(Ho);return new K((e,n)=>{t.length===0&&n(new AggregateError([]));let r=t.length,s=new Array(r);t.forEach((i,a)=>K.resolve(i).then(o=>e(o),o=>{s[a]=o,--r||n(new AggregateError(s))}))})}));function Xb(t,e){try{e(n=>{if(t._state===null){if(n===t)throw new TypeError("A promise cannot be resolved with itself.");var r=t._lib&&Ri();n&&typeof n.then=="function"?Xb(t,(s,i)=>{n instanceof K?n._then(s,i):n.then(s,i)}):(t._state=!0,t._value=n,Zb(t)),r&&Li()}},kl.bind(null,t))}catch(n){kl(t,n)}}function kl(t,e){if(Lo.push(e),t._state===null){var n=t._lib&&Ri();e=Dl(e),t._state=!1,t._value=e,rn&&e!==null&&typeof e=="object"&&!e._promise&&l3(()=>{var r=ml(e,"stack");e._promise=t,mn(e,"stack",{get:()=>wl?r&&(r.get?r.get.apply(e):r.value):t.stack})}),O3(t),Zb(t),n&&Li()}}function Zb(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n{--Cr==0&&Ll()},[]))}function Rl(t,e){if(t._state===null){t._listeners.push(e);return}var n=t._state?e.onFulfilled:e.onRejected;if(n===null)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Cr,Oi(v3,[n,t,e])}function v3(t,e,n){try{vl=e;var r,s=e._value;e._state?r=t(s):(Lo.length&&(Lo=[]),r=t(s),Lo.indexOf(s)===-1&&k3(e)),n.resolve(r)}catch(i){n.reject(i)}finally{vl=null,--Cr==0&&Ll(),--n.psd.ref||n.psd.finalize()}}function Jb(t,e,n){if(e.length===n)return e;var r="";if(t._state===!1){var s=t._value,i,a;s!=null?(i=s.name||"Error",a=s.message||s,r=Tl(s,0)):(i=s,a=""),e.push(i+(a?": "+a:"")+r)}return rn&&(r=Tl(t._stackHolder,2),r&&e.indexOf(r)===-1&&e.push(r),t._prev&&Jb(t._prev,e,n)),e}function e1(t,e){var n=e?e._numPrev+1:0;n0;)for(t=ki,ki=[],n=t.length,e=0;e0);Nl=!0,Ro=!0}function Ll(){var t=Ar;Ar=[],t.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var e=Po.slice(0),n=e.length;n;)e[--n]()}function D3(t){function e(){t(),Po.splice(Po.indexOf(e),1)}Po.push(e),++Cr,Oi(()=>{--Cr==0&&Ll()},[])}function O3(t){Ar.some(e=>e._value===t._value)||Ar.push(t)}function k3(t){for(var e=Ar.length;e;)if(Ar[--e]._value===t._value){Ar.splice(e,1);return}}function Fo(t){return new K(Di,!1,t)}function ke(t,e){var n=ee;return function(){var r=Ri(),s=ee;try{return Xn(n,!0),t.apply(this,arguments)}catch(i){e&&e(i)}finally{Xn(s,!1),r&&Li()}}}var nt={awaits:0,echoes:0,id:0},R3=0,Bo=[],Pl=0,jo=0,L3=0;function Qn(t,e,n,r){var s=ee,i=Object.create(s);i.parent=s,i.ref=0,i.global=!1,i.id=++L3;var a=_s.env;i.env=Il?{Promise:K,PromiseProp:{value:K,configurable:!0,writable:!0},all:K.all,race:K.race,allSettled:K.allSettled,any:K.any,resolve:K.resolve,reject:K.reject,nthen:r1(a.nthen,i),gthen:r1(a.gthen,i)}:{},e&<(i,e),++s.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var o=Ts(i,t,n,r);return i.ref===0&&i.finalize(),o}function Es(){return nt.id||(nt.id=++R3),++nt.awaits,nt.echoes+=$b,nt.id}function _n(){return nt.awaits?(--nt.awaits==0&&(nt.id=0),nt.echoes=nt.awaits*$b,!0):!1}(""+Gb).indexOf("[native code]")===-1&&(Es=_n=xe);function Ho(t){return nt.echoes&&t&&t.constructor===ko?(Es(),t.then(e=>(_n(),e),e=>(_n(),ze(e)))):t}function P3(t){++jo,(!nt.echoes||--nt.echoes==0)&&(nt.echoes=nt.id=0),Bo.push(ee),Xn(t,!0)}function M3(){var t=Bo[Bo.length-1];Bo.pop(),Xn(t,!1)}function Xn(t,e){var n=ee;if((e?nt.echoes&&(!Pl++||t!==ee):Pl&&(!--Pl||t!==ee))&&n1(e?P3.bind(null,t):M3),t!==ee&&(ee=t,n===_s&&(_s.env=t1()),Il)){var r=_s.env.Promise,s=t.env;Oo.then=s.nthen,r.prototype.then=s.gthen,(n.global||t.global)&&(Object.defineProperty(De,"Promise",s.PromiseProp),r.all=s.all,r.race=s.race,r.resolve=s.resolve,r.reject=s.reject,s.allSettled&&(r.allSettled=s.allSettled),s.any&&(r.any=s.any))}}function t1(){var t=De.Promise;return Il?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(De,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Oo.then,gthen:t.prototype.then}:{}}function Ts(t,e,n,r,s){var i=ee;try{return Xn(t,!0),e(n,r,s)}finally{Xn(i,!1)}}function n1(t){Gb.call(Cl,t)}function Uo(t,e,n,r){return typeof t!="function"?t:function(){var s=ee;n&&Es(),Xn(e,!0);try{return t.apply(this,arguments)}finally{Xn(s,!1),r&&n1(_n)}}}function r1(t,e){return function(n,r){return t.call(this,Uo(n,e),Uo(r,e))}}var s1="unhandledrejection";function i1(t,e){var n;try{n=e.onuncatched(t)}catch{}if(n!==!1)try{var r,s={promise:e,reason:t};if(De.document&&document.createEvent?(r=document.createEvent("Event"),r.initEvent(s1,!0,!0),lt(r,s)):De.CustomEvent&&(r=new CustomEvent(s1,{detail:s}),lt(r,s)),r&&De.dispatchEvent&&(dispatchEvent(r),!De.PromiseRejectionEvent&&De.onunhandledrejection))try{De.onunhandledrejection(r)}catch{}rn&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch{}}var ze=K.reject;function Ml(t,e,n,r){if(!t.idbdb||!t._state.openComplete&&!ee.letThrough&&!t._vip){if(t._state.openComplete)return ze(new se.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return ze(new se.DatabaseClosed);t.open().catch(xe)}return t._state.dbReadyPromise.then(()=>Ml(t,e,n,r))}else{var s=t._createTransaction(e,n,t._dbSchema);try{s.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===yl.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>Ml(t,e,n,r))):ze(i)}return s._promise(e,(i,a)=>Qn(()=>(ee.trans=s,r(i,a,s)))).then(i=>s._completion.then(()=>i))}}var a1="3.2.7",Sr=String.fromCharCode(65535),Fl=-1/0,En="Invalid key provided. Keys must be of type string, number, Date or Array.",o1="String expected.",Pi=[],zo=typeof navigator!="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),F3=zo,B3=zo,u1=t=>!/(dexie\.js|dexie\.min\.js)/.test(t),Vo="__dbnames",Bl="readonly",jl="readwrite";function Ir(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}var c1={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function qo(t){return typeof t=="string"&&!/\./.test(t)?e=>(e[t]===void 0&&t in e&&(e=wi(e),delete e[t]),e):e=>e}var l1=class{_trans(e,n,r){let s=this._tx||ee.trans,i=this.name;function a(c,l,d){if(!d.schema[i])throw new se.NotFound("Table "+i+" not part of transaction");return n(d.idbtrans,d)}let o=Ri();try{return s&&s.db===this.db?s===ee.trans?s._promise(e,a,r):Qn(()=>s._promise(e,a,r),{trans:s,transless:ee.transless||ee}):Ml(this.db,e,[this.name],a)}finally{o&&Li()}}get(e,n){return e&&e.constructor===Object?this.where(e).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:e}).then(s=>this.hook.reading.fire(s))).then(n)}where(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(tt(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let n=He(e);if(n.length===1)return this.where(n[0]).equals(e[n[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(l=>{if(l.compound&&n.every(d=>l.keyPath.indexOf(d)>=0)){for(let d=0;dl.keyPath.length-d.keyPath.length)[0];if(r&&this.db._maxKey!==Sr){let l=r.keyPath.slice(0,n.length);return this.where(l).equals(l.map(d=>e[d]))}!r&&rn&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);let{idxByName:s}=this.schema,i=this.db._deps.indexedDB;function a(l,d){try{return i.cmp(l,d)===0}catch{return!1}}let[o,c]=n.reduce(([l,d],h)=>{let f=s[h],p=e[h];return[l||f,l||!f?Ir(d,f&&f.multi?E=>{let T=gn(E,h);return tt(T)&&T.some(w=>a(p,w))}:E=>a(p,gn(E,h))):d]},[null,null]);return o?this.where(o.name).equals(e[o.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,tt(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let n=r=>{if(!r)return r;let s=Object.create(e.prototype);for(var i in r)if(At(r,i))try{s[i]=r[i]}catch{}return s};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),e}defineClass(){function e(n){lt(this,n)}return this.mapToClass(e)}add(e,n){let{auto:r,keyPath:s}=this.schema.primKey,i=e;return s&&r&&(i=qo(s)(e)),this._trans("readwrite",a=>this.core.mutate({trans:a,type:"add",keys:n!=null?[n]:null,values:[i]})).then(a=>a.numFailures?K.reject(a.failures[0]):a.lastResult).then(a=>{if(s)try{Wt(e,s,a)}catch{}return a})}update(e,n){if(typeof e=="object"&&!tt(e)){let r=gn(e,this.schema.primKey.keyPath);if(r===void 0)return ze(new se.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?He(n).forEach(s=>{Wt(e,s,n[s])}):n(e,{value:e,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}else return this.where(":id").equals(e).modify(n)}put(e,n){let{auto:r,keyPath:s}=this.schema.primKey,i=e;return s&&r&&(i=qo(s)(e)),this._trans("readwrite",a=>this.core.mutate({trans:a,type:"put",values:[i],keys:n!=null?[n]:null})).then(a=>a.numFailures?K.reject(a.failures[0]):a.lastResult).then(a=>{if(s)try{Wt(e,s,a)}catch{}return a})}delete(e){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[e]})).then(n=>n.numFailures?K.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:c1})).then(e=>e.numFailures?K.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",n=>this.core.getMany({keys:e,trans:n}).then(r=>r.map(s=>this.hook.reading.fire(s))))}bulkAdd(e,n,r){let s=Array.isArray(n)?n:void 0;r=r||(s?void 0:n);let i=r?r.allKeys:void 0;return this._trans("readwrite",a=>{let{auto:o,keyPath:c}=this.schema.primKey;if(c&&s)throw new se.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new se.InvalidArgument("Arguments objects and keys must have the same length");let l=e.length,d=c&&o?e.map(qo(c)):e;return this.core.mutate({trans:a,type:"add",keys:s,values:d,wantResults:i}).then(({numFailures:h,results:f,lastResult:p,failures:E})=>{let T=i?f:p;if(h===0)return T;throw new Ni(`${this.name}.bulkAdd(): ${h} of ${l} operations failed`,E)})})}bulkPut(e,n,r){let s=Array.isArray(n)?n:void 0;r=r||(s?void 0:n);let i=r?r.allKeys:void 0;return this._trans("readwrite",a=>{let{auto:o,keyPath:c}=this.schema.primKey;if(c&&s)throw new se.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new se.InvalidArgument("Arguments objects and keys must have the same length");let l=e.length,d=c&&o?e.map(qo(c)):e;return this.core.mutate({trans:a,type:"put",keys:s,values:d,wantResults:i}).then(({numFailures:h,results:f,lastResult:p,failures:E})=>{let T=i?f:p;if(h===0)return T;throw new Ni(`${this.name}.bulkPut(): ${h} of ${l} operations failed`,E)})})}bulkDelete(e){let n=e.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:e})).then(({numFailures:r,lastResult:s,failures:i})=>{if(r===0)return s;throw new Ni(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,i)})}};function Mi(t){var e={},n=function(o,c){if(c){for(var l=arguments.length,d=new Array(l-1);--l;)d[l-1]=arguments[l];return e[o].subscribe.apply(null,d),t}else if(typeof o=="string")return e[o]};n.addEventType=i;for(var r=1,s=arguments.length;rIr(r(),e()):e,t.justLimit=n&&!r}function H3(t,e){t.isMatch=Ir(t.isMatch,e)}function Ko(t,e){if(t.isPrimKey)return e.primaryKey;let n=e.getIndexByKeyPath(t.index);if(!n)throw new se.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function f1(t,e,n){let r=Ko(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:t.dir==="prev",unique:!!t.unique,query:{index:r,range:t.range}})}function Yo(t,e,n,r){let s=t.replayFilter?Ir(t.filter,t.replayFilter()):t.filter;if(t.or){let i={},a=(o,c,l)=>{if(!s||s(c,l,f=>c.stop(f),f=>c.fail(f))){var d=c.primaryKey,h=""+d;h==="[object ArrayBuffer]"&&(h=""+new Uint8Array(d)),At(i,h)||(i[h]=!0,e(o,c,l))}};return Promise.all([t.or._iterate(a,n),d1(f1(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}else return d1(f1(t,r,n),Ir(t.algorithm,s),e,!t.keysOnly&&t.valueMapper)}function d1(t,e,n,r){var s=r?(a,o,c)=>n(r(a),o,c):n,i=ke(s);return t.then(a=>{if(a)return a.start(()=>{var o=()=>a.continue();(!e||e(a,c=>o=c,c=>{a.stop(c),o=xe},c=>{a.fail(c),o=xe}))&&i(a.value,a,c=>o=c),o()})})}function ft(t,e){try{let n=h1(t),r=h1(e);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t>e?1:tYo(n,e,r,n.table.core))}count(e){return this._read(n=>{let r=this._ctx,s=r.table.core;if(xs(r,!0))return s.count({trans:n,query:{index:Ko(r,s.schema),range:r.range}}).then(a=>Math.min(a,r.limit));var i=0;return Yo(r,()=>(++i,!1),n,s).then(()=>i)}).then(e)}sortBy(e,n){let r=e.split(".").reverse(),s=r[0],i=r.length-1;function a(l,d){return d?a(l[r[d]],d-1):l[s]}var o=this._ctx.dir==="next"?1:-1;function c(l,d){var h=a(l,i),f=a(d,i);return hf?o:0}return this.toArray(function(l){return l.sort(c)}).then(n)}toArray(e){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&xs(r,!0)&&r.limit>0){let{valueMapper:s}=r,i=Ko(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then(({result:a})=>s?a.map(s):a)}else{let s=[];return Yo(r,i=>s.push(i),n,r.table.core).then(()=>s)}},e)}offset(e){var n=this._ctx;return e<=0?this:(n.offset+=e,xs(n)?Ul(n,()=>{var r=e;return(s,i)=>r===0?!0:r===1?(--r,!1):(i(()=>{s.advance(r),r=0}),!1)}):Ul(n,()=>{var r=e;return()=>--r<0}),this)}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ul(this._ctx,()=>{var n=e;return function(r,s,i){return--n<=0&&s(i),n>=0}},!0),this}until(e,n){return Hl(this._ctx,function(r,s,i){return e(r.value)?(s(i),n):!0}),this}first(e){return this.limit(1).toArray(function(n){return n[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){return Hl(this._ctx,function(n){return e(n.value)}),H3(this._ctx,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,s){e(s.key,s)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,s){e(s.primaryKey,s)})}keys(e){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(s,i){r.push(i.key)}).then(function(){return r}).then(e)}primaryKeys(e){var n=this._ctx;if(n.dir==="next"&&xs(n,!0)&&n.limit>0)return this._read(s=>{var i=Ko(n,n.table.core.schema);return n.table.core.query({trans:s,values:!1,limit:n.limit,query:{index:i,range:n.range}})}).then(({result:s})=>s).then(e);n.keysOnly=!n.isMatch;var r=[];return this.each(function(s,i){r.push(i.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(n){return n[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,n=e.index&&e.table.schema.idxByName[e.index];if(!n||!n.multi)return this;var r={};return Hl(this._ctx,function(s){var i=s.primaryKey.toString(),a=At(r,i);return r[i]=!0,!a}),this}modify(e){var n=this._ctx;return this._write(r=>{var s;if(typeof e=="function")s=e;else{var i=He(e),a=i.length;s=function(T){for(var w=!1,m=0;m{let{failures:m,numFailures:S}=w;f+=T-S;for(let C of He(m))h.push(m[C])};return this.clone().primaryKeys().then(T=>{let w=m=>{let S=Math.min(d,T.length-m);return o.getMany({trans:r,keys:T.slice(m,m+S),cache:"immutable"}).then(C=>{let b=[],I=[],A=c?[]:null,N=[];for(let P=0;P0&&o.mutate({trans:r,type:"add",values:b}).then(P=>{for(let V in P.failures)N.splice(parseInt(V),1);E(b.length,P)})).then(()=>(I.length>0||O&&typeof e=="object")&&o.mutate({trans:r,type:"put",keys:A,values:I,criteria:O,changeSpec:typeof e!="function"&&e}).then(P=>E(I.length,P))).then(()=>(N.length>0||O&&e===zl)&&o.mutate({trans:r,type:"delete",keys:N,criteria:O}).then(P=>E(N.length,P))).then(()=>T.length>m+S&&w(m+d))})};return w(0).then(()=>{if(h.length>0)throw new vo("Error modifying one or more objects",h,f,p);return T.length})})})}delete(){var e=this._ctx,n=e.range;return xs(e)&&(e.isPrimKey&&!B3||n.type===3)?this._write(r=>{let{primaryKey:s}=e.table.core.schema,i=n;return e.table.core.count({trans:r,query:{index:s,range:i}}).then(a=>e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then(({failures:o,lastResult:c,results:l,numFailures:d})=>{if(d)throw new vo("Could not delete some values",Object.keys(o).map(h=>o[h]),a-d);return a-d}))}):this.modify(zl)}},zl=(t,e)=>e.value=null;function V3(t){return Fi(m1.prototype,function(n,r){this.db=t;let s=c1,i=null;if(r)try{s=r()}catch(l){i=l}let a=n._ctx,o=a.table,c=o.hook.reading.fire;this._ctx={table:o,index:a.index,isPrimKey:!a.index||o.schema.primKey.keyPath&&a.index===o.schema.primKey.name,range:s,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:a.or,valueMapper:c!==vi?c:null}})}function q3(t,e){return te?-1:t===e?0:1}function Ct(t,e,n){var r=t instanceof Vl?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function ys(t){return new t.Collection(t,()=>g1("")).limit(0)}function Y3(t){return t==="next"?e=>e.toUpperCase():e=>e.toLowerCase()}function W3(t){return t==="next"?e=>e.toLowerCase():e=>e.toUpperCase()}function $3(t,e,n,r,s,i){for(var a=Math.min(t.length,r.length),o=-1,c=0;c=0?t.substr(0,o)+e[o]+n.substr(o+1):null;s(t[c],l)<0&&(o=c)}return atypeof T=="string"))return Ct(t,o1);function f(T){s=Y3(T),i=W3(T),a=T==="next"?q3:K3;var w=n.map(function(m){return{lower:i(m),upper:s(m)}}).sort(function(m,S){return a(m.lower,S.lower)});o=w.map(function(m){return m.upper}),c=w.map(function(m){return m.lower}),l=T,d=T==="next"?"":r}f("next");var p=new t.Collection(t,()=>Zn(o[0],c[h-1]+r));p._ondirectionchange=function(T){f(T)};var E=0;return p._addAlgorithm(function(T,w,m){var S=T.key;if(typeof S!="string")return!1;var C=i(S);if(e(C,c,E))return!0;for(var b=null,I=E;I0)&&(b=A)}return w(b!==null?function(){T.continue(b+d)}:m),!1}),p}function Zn(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function g1(t){return{type:1,lower:t,upper:t}}var Vl=class{get Collection(){return this._ctx.table.db.Collection}between(e,n,r,s){r=r!==!1,s=s===!0;try{return this._cmp(e,n)>0||this._cmp(e,n)===0&&(r||s)&&!(r&&s)?ys(this):new this.Collection(this,()=>Zn(e,n,!r,!s))}catch{return Ct(this,En)}}equals(e){return e==null?Ct(this,En):new this.Collection(this,()=>g1(e))}above(e){return e==null?Ct(this,En):new this.Collection(this,()=>Zn(e,void 0,!0))}aboveOrEqual(e){return e==null?Ct(this,En):new this.Collection(this,()=>Zn(e,void 0,!1))}below(e){return e==null?Ct(this,En):new this.Collection(this,()=>Zn(void 0,e,!1,!0))}belowOrEqual(e){return e==null?Ct(this,En):new this.Collection(this,()=>Zn(void 0,e))}startsWith(e){return typeof e!="string"?Ct(this,o1):this.between(e,e+Sr,!0,!0)}startsWithIgnoreCase(e){return e===""?this.startsWith(e):Wo(this,(n,r)=>n.indexOf(r[0])===0,[e],Sr)}equalsIgnoreCase(e){return Wo(this,(n,r)=>n===r[0],[e],"")}anyOfIgnoreCase(){var e=bn.apply(gs,arguments);return e.length===0?ys(this):Wo(this,(n,r)=>r.indexOf(n)!==-1,e,"")}startsWithAnyOfIgnoreCase(){var e=bn.apply(gs,arguments);return e.length===0?ys(this):Wo(this,(n,r)=>r.some(s=>n.indexOf(s)===0),e,Sr)}anyOf(){let e=bn.apply(gs,arguments),n=this._cmp;try{e.sort(n)}catch{return Ct(this,En)}if(e.length===0)return ys(this);let r=new this.Collection(this,()=>Zn(e[0],e[e.length-1]));r._ondirectionchange=i=>{n=i==="next"?this._ascending:this._descending,e.sort(n)};let s=0;return r._addAlgorithm((i,a,o)=>{let c=i.key;for(;n(c,e[s])>0;)if(++s,s===e.length)return a(o),!1;return n(c,e[s])===0?!0:(a(()=>{i.continue(e[s])}),!1)}),r}notEqual(e){return this.inAnyRange([[Fl,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=bn.apply(gs,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Ct(this,En)}let n=e.reduce((r,s)=>r?r.concat([[r[r.length-1][1],s]]):[[Fl,s]],null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,n){let r=this._cmp,s=this._ascending,i=this._descending,a=this._min,o=this._max;if(e.length===0)return ys(this);if(!e.every(b=>b[0]!==void 0&&b[1]!==void 0&&s(b[0],b[1])<=0))return Ct(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",se.InvalidArgument);let c=!n||n.includeLowers!==!1,l=n&&n.includeUppers===!0;function d(b,I){let A=0,N=b.length;for(;A0){O[0]=a(O[0],I[0]),O[1]=o(O[1],I[1]);break}}return A===N&&b.push(I),b}let h=s;function f(b,I){return h(b[0],I[0])}let p;try{p=e.reduce(d,[]),p.sort(f)}catch{return Ct(this,En)}let E=0,T=l?b=>s(b,p[E][1])>0:b=>s(b,p[E][1])>=0,w=c?b=>i(b,p[E][0])>0:b=>i(b,p[E][0])>=0;function m(b){return!T(b)&&!w(b)}let S=T,C=new this.Collection(this,()=>Zn(p[0][0],p[p.length-1][1],!c,!l));return C._ondirectionchange=b=>{b==="next"?(S=T,h=s):(S=w,h=i),p.sort(f)},C._addAlgorithm((b,I,A)=>{for(var N=b.key;S(N);)if(++E,E===p.length)return I(A),!1;return m(N)?!0:(this._cmp(N,p[E][1])===0||this._cmp(N,p[E][0])===0||I(()=>{h===s?b.continue(p[E][0]):b.continue(p[E][1])}),!1)}),C}startsWithAnyOf(){let e=bn.apply(gs,arguments);return e.every(n=>typeof n=="string")?e.length===0?ys(this):this.inAnyRange(e.map(n=>[n,n+Sr])):Ct(this,"startsWithAnyOf() only works with strings")}};function G3(t){return Fi(Vl.prototype,function(n,r,s){this.db=t,this._ctx={table:n,index:r===":id"?null:r,or:s};let i=t._deps.indexedDB;if(!i)throw new se.MissingAPI;this._cmp=this._ascending=i.cmp.bind(i),this._descending=(a,o)=>i.cmp(o,a),this._max=(a,o)=>i.cmp(a,o)>0?a:o,this._min=(a,o)=>i.cmp(a,o)<0?a:o,this._IDBKeyRange=t._deps.IDBKeyRange})}function sn(t){return ke(function(e){return Bi(e),t(e.target.error),!1})}function Bi(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}var ji="storagemutated",Jn="x-storagemutated-1",er=Mi(null,ji),b1=class{_lock(){return Ii(!ee.global),++this._reculock,this._reculock===1&&!ee.global&&(ee.lockOwnerFor=this),this}_unlock(){if(Ii(!ee.global),--this._reculock==0)for(ee.global||(ee.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Ts(e[1],e[0])}catch{}}return this}_locked(){return this._reculock&&ee.lockOwnerFor!==this}create(e){if(!this.mode)return this;let n=this.db.idbdb,r=this.db._state.dbOpenError;if(Ii(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new se.DatabaseClosed(r);case"MissingAPIError":throw new se.MissingAPI(r.message,r);default:throw new se.OpenFailed(r)}if(!this.active)throw new se.TransactionInactive;return Ii(this._completion._state===null),e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),e.onerror=ke(s=>{Bi(s),this._reject(e.error)}),e.onabort=ke(s=>{Bi(s),this.active&&this._reject(new se.Abort(e.error)),this.active=!1,this.on("abort").fire(s)}),e.oncomplete=ke(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&er.storagemutated.fire(e.mutatedParts)}),this}_promise(e,n,r){if(e==="readwrite"&&this.mode!=="readwrite")return ze(new se.ReadOnly("Transaction is readonly"));if(!this.active)return ze(new se.TransactionInactive);if(this._locked())return new K((i,a)=>{this._blockedFuncs.push([()=>{this._promise(e,n,r).then(i,a)},ee])});if(r)return Qn(()=>{var i=new K((a,o)=>{this._lock();let c=n(a,o,this);c&&c.then&&c.then(a,o)});return i.finally(()=>this._unlock()),i._lib=!0,i});var s=new K((i,a)=>{var o=n(i,a,this);o&&o.then&&o.then(i,a)});return s._lib=!0,s}_root(){return this.parent?this.parent._root():this}waitFor(e){var n=this._root();let r=K.resolve(e);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var s=n.idbtrans.objectStore(n.storeNames[0]);(function a(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(s.get(-1/0).onsuccess=a)})()}var i=n._waitingFor;return new K((a,o)=>{r.then(c=>n._waitingQueue.push(ke(a.bind(null,c))),c=>n._waitingQueue.push(ke(o.bind(null,c)))).finally(()=>{n._waitingFor===i&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new se.Abort))}table(e){let n=this._memoizedTables||(this._memoizedTables={});if(At(n,e))return n[e];let r=this.schema[e];if(!r)throw new se.NotFound("Table "+e+" not part of transaction");let s=new this.db.Table(e,r,this);return s.core=this.db.core.table(e),n[e]=s,s}};function Q3(t){return Fi(b1.prototype,function(n,r,s,i,a){this.db=t,this.mode=n,this.storeNames=r,this.schema=s,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Mi(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new K((o,c)=>{this._resolve=o,this._reject=c}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},o=>{var c=this.active;return this.active=!1,this.on.error.fire(o),this.parent?this.parent._reject(o):c&&this.idbtrans&&this.idbtrans.abort(),ze(o)})})}function ql(t,e,n,r,s,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:s,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(s?"++":"")+_1(e)}}function _1(t){return typeof t=="string"?t:t?"["+[].join.call(t,"+")+"]":""}function E1(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:jb(n,r=>[r.name,r])}}function X3(t){return t.length===1?t[0]:t}var Hi=t=>{try{return t.only([[]]),Hi=()=>[[]],[[]]}catch{return Hi=()=>Sr,Sr}};function Kl(t){return t==null?()=>{}:typeof t=="string"?Z3(t):e=>gn(e,t)}function Z3(t){return t.split(".").length===1?n=>n[t]:n=>gn(n,t)}function T1(t){return[].slice.call(t)}var J3=0;function Ui(t){return t==null?":id":typeof t=="string"?t:`[${t.join("+")}]`}function eI(t,e,n){function r(d,h){let f=T1(d.objectStoreNames);return{schema:{name:d.name,tables:f.map(p=>h.objectStore(p)).map(p=>{let{keyPath:E,autoIncrement:T}=p,w=tt(E),m=E==null,S={},C={name:p.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:m,compound:w,keyPath:E,autoIncrement:T,unique:!0,extractKey:Kl(E)},indexes:T1(p.indexNames).map(b=>p.index(b)).map(b=>{let{name:I,unique:A,multiEntry:N,keyPath:O}=b,P=tt(O),V={name:I,compound:P,keyPath:O,unique:A,multiEntry:N,extractKey:Kl(O)};return S[Ui(O)]=V,V}),getIndexByKeyPath:b=>S[Ui(b)]};return S[":id"]=C.primaryKey,E!=null&&(S[Ui(E)]=C.primaryKey),C})},hasGetAll:f.length>0&&"getAll"in h.objectStore(f[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function s(d){if(d.type===3)return null;if(d.type===4)throw new Error("Cannot convert never type to IDBKeyRange");let{lower:h,upper:f,lowerOpen:p,upperOpen:E}=d;return h===void 0?f===void 0?null:e.upperBound(f,!!E):f===void 0?e.lowerBound(h,!!p):e.bound(h,f,!!p,!!E)}function i(d){let h=d.name;function f({trans:T,type:w,keys:m,values:S,range:C}){return new Promise((b,I)=>{b=ke(b);let A=T.objectStore(h),N=A.keyPath==null,O=w==="put"||w==="add";if(!O&&w!=="delete"&&w!=="deleteRange")throw new Error("Invalid operation type: "+w);let{length:P}=m||S||{length:1};if(m&&S&&m.length!==S.length)throw new Error("Given keys array must have same length as given values array.");if(P===0)return b({numFailures:0,failures:{},results:[],lastResult:void 0});let V,W=[],J=[],$=0,Pe=Ae=>{++$,Bi(Ae)};if(w==="deleteRange"){if(C.type===4)return b({numFailures:$,failures:J,results:[],lastResult:void 0});C.type===3?W.push(V=A.clear()):W.push(V=A.delete(s(C)))}else{let[Ae,Ne]=O?N?[S,m]:[S,null]:[m,null];if(O)for(let k=0;k{let Ne=Ae.target.result;W.forEach((k,L)=>k.error!=null&&(J[L]=k.error)),b({numFailures:$,failures:J,results:w==="delete"?m:W.map(k=>k.result),lastResult:Ne})};V.onerror=Ae=>{Pe(Ae),Re(Ae)},V.onsuccess=Re})}function p({trans:T,values:w,query:m,reverse:S,unique:C}){return new Promise((b,I)=>{b=ke(b);let{index:A,range:N}=m,O=T.objectStore(h),P=A.isPrimaryKey?O:O.index(A.name),V=S?C?"prevunique":"prev":C?"nextunique":"next",W=w||!("openKeyCursor"in P)?P.openCursor(s(N),V):P.openKeyCursor(s(N),V);W.onerror=sn(I),W.onsuccess=ke(J=>{let $=W.result;if(!$){b(null);return}$.___id=++J3,$.done=!1;let Pe=$.continue.bind($),Re=$.continuePrimaryKey;Re&&(Re=Re.bind($));let Ae=$.advance.bind($),Ne=()=>{throw new Error("Cursor not started")},k=()=>{throw new Error("Cursor not stopped")};$.trans=T,$.stop=$.continue=$.continuePrimaryKey=$.advance=Ne,$.fail=ke(I),$.next=function(){let L=1;return this.start(()=>L--?this.continue():this.stop()).then(()=>this)},$.start=L=>{let H=new Promise((oe,Ce)=>{oe=ke(oe),W.onerror=sn(Ce),$.fail=Ce,$.stop=Ue=>{$.stop=$.continue=$.continuePrimaryKey=$.advance=k,oe(Ue)}}),Z=()=>{if(W.result)try{L()}catch(oe){$.fail(oe)}else $.done=!0,$.start=()=>{throw new Error("Cursor behind last entry")},$.stop()};return W.onsuccess=ke(oe=>{W.onsuccess=Z,Z()}),$.continue=Pe,$.continuePrimaryKey=Re,$.advance=Ae,Z(),H},b($)},I)})}function E(T){return w=>new Promise((m,S)=>{m=ke(m);let{trans:C,values:b,limit:I,query:A}=w,N=I===1/0?void 0:I,{index:O,range:P}=A,V=C.objectStore(h),W=O.isPrimaryKey?V:V.index(O.name),J=s(P);if(I===0)return m({result:[]});if(T){let $=b?W.getAll(J,N):W.getAllKeys(J,N);$.onsuccess=Pe=>m({result:Pe.target.result}),$.onerror=sn(S)}else{let $=0,Pe=b||!("openKeyCursor"in W)?W.openCursor(J):W.openKeyCursor(J),Re=[];Pe.onsuccess=Ae=>{let Ne=Pe.result;if(!Ne)return m({result:Re});if(Re.push(b?Ne.value:Ne.primaryKey),++$===I)return m({result:Re});Ne.continue()},Pe.onerror=sn(S)}})}return{name:h,schema:d,mutate:f,getMany({trans:T,keys:w}){return new Promise((m,S)=>{m=ke(m);let C=T.objectStore(h),b=w.length,I=new Array(b),A=0,N=0,O,P=W=>{let J=W.target;(I[J._pos]=J.result)!=null,++N===A&&m(I)},V=sn(S);for(let W=0;W{m=ke(m);let b=T.objectStore(h).get(w);b.onsuccess=I=>m(I.target.result),b.onerror=sn(S)})},query:E(o),openCursor:p,count({query:T,trans:w}){let{index:m,range:S}=T;return new Promise((C,b)=>{let I=w.objectStore(h),A=m.isPrimaryKey?I:I.index(m.name),N=s(S),O=N?A.count(N):A.count();O.onsuccess=ke(P=>C(P.target.result)),O.onerror=sn(b)})}}}let{schema:a,hasGetAll:o}=r(t,n),c=a.tables.map(d=>i(d)),l={};return c.forEach(d=>l[d.name]=d),{stack:"dbcore",transaction:t.transaction.bind(t),table(d){if(!l[d])throw new Error(`Table '${d}' not found`);return l[d]},MIN_KEY:-1/0,MAX_KEY:Hi(e),schema:a}}function tI(t,e){return e.reduce((n,{create:r})=>j(j({},n),r(n)),t)}function nI(t,e,{IDBKeyRange:n,indexedDB:r},s){return{dbcore:tI(eI(e,n,s),t.dbcore)}}function Yl({_novip:t},e){let n=e.db,r=nI(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach(s=>{let i=s.name;t.core.schema.tables.some(a=>a.name===i)&&(s.core=t.core.table(i),t[i]instanceof t.Table&&(t[i].core=s.core))})}function $o({_novip:t},e,n,r){n.forEach(s=>{let i=r[s];e.forEach(a=>{let o=ml(a,s);(!o||"value"in o&&o.value===void 0)&&(a===t.Transaction.prototype||a instanceof t.Transaction?mn(a,s,{get(){return this.table(s)},set(c){Mb(this,s,{value:c,writable:!0,configurable:!0,enumerable:!0})}}):a[s]=new t.Table(s,i))})})}function Wl({_novip:t},e){e.forEach(n=>{for(let r in n)n[r]instanceof t.Table&&delete n[r]})}function rI(t,e){return t._cfg.version-e._cfg.version}function sI(t,e,n,r){let s=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,s);i.create(n),i._completion.catch(r);let a=i._reject.bind(i),o=ee.transless||ee;Qn(()=>{ee.trans=i,ee.transless=o,e===0?(He(s).forEach(c=>{$l(n,c,s[c].primKey,s[c].indexes)}),Yl(t,n),K.follow(()=>t.on.populate.fire(i)).catch(a)):iI(t,e,i,n).catch(a)})}function iI({_novip:t},e,n,r){let s=[],i=t._versions,a=t._dbSchema=Ql(t,t.idbdb,r),o=!1;i.filter(d=>d._cfg.version>=e).forEach(d=>{s.push(()=>{let h=a,f=d._cfg.dbschema;Xl(t,h,r),Xl(t,f,r),a=t._dbSchema=f;let p=x1(h,f);p.add.forEach(T=>{$l(r,T[0],T[1].primKey,T[1].indexes)}),p.change.forEach(T=>{if(T.recreate)throw new se.Upgrade("Not yet support for changing primary key");{let w=r.objectStore(T.name);T.add.forEach(m=>Gl(w,m)),T.change.forEach(m=>{w.deleteIndex(m.name),Gl(w,m)}),T.del.forEach(m=>w.deleteIndex(m))}});let E=d._cfg.contentUpgrade;if(E&&d._cfg.version>e){Yl(t,r),n._memoizedTables={},o=!0;let T=Hb(f);p.del.forEach(C=>{T[C]=h[C]}),Wl(t,[t.Transaction.prototype]),$o(t,[t.Transaction.prototype],He(T),T),n.schema=T;let w=El(E);w&&Es();let m,S=K.follow(()=>{if(m=E(n),m&&w){var C=_n.bind(null,null);m.then(C,C)}});return m&&typeof m.then=="function"?K.resolve(m):S.then(()=>m)}}),s.push(h=>{if(!o||!F3){let f=d._cfg.dbschema;oI(f,h)}Wl(t,[t.Transaction.prototype]),$o(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema})});function l(){return s.length?K.resolve(s.shift()(n.idbtrans)).then(l):K.resolve()}return l().then(()=>{aI(a,r)})}function x1(t,e){let n={del:[],add:[],change:[]},r;for(r in t)e[r]||n.del.push(r);for(r in e){let s=t[r],i=e[r];if(!s)n.add.push([r,i]);else{let a={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||s.primKey.auto!==i.primKey.auto&&!zo)a.recreate=!0,n.change.push(a);else{let o=s.idxByName,c=i.idxByName,l;for(l in o)c[l]||a.del.push(l);for(l in c){let d=o[l],h=c[l];d?d.src!==h.src&&a.change.push(h):a.add.push(h)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function $l(t,e,n,r){let s=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(i=>Gl(s,i)),s}function aI(t,e){He(t).forEach(n=>{e.db.objectStoreNames.contains(n)||$l(e,n,t[n].primKey,t[n].indexes)})}function oI(t,e){[].slice.call(e.db.objectStoreNames).forEach(n=>t[n]==null&&e.db.deleteObjectStore(n))}function Gl(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Ql(t,e,n){let r={};return No(e.objectStoreNames,0).forEach(i=>{let a=n.objectStore(i),o=a.keyPath,c=ql(_1(o),o||"",!1,!1,!!a.autoIncrement,o&&typeof o!="string",!0),l=[];for(let h=0;hs.add.length||s.change.length))}function Xl({_novip:t},e,n){let r=n.db.objectStoreNames;for(let s=0;s{e=e.trim();let r=e.replace(/([&*]|\+\+)/g,""),s=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return ql(r,s||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),tt(s),n===0)})}var y1=class{_parseStoresSpec(e,n){He(e).forEach(r=>{if(e[r]!==null){var s=lI(e[r]),i=s.shift();if(i.multi)throw new se.Schema("Primary key cannot be multi-valued");s.forEach(a=>{if(a.auto)throw new se.Schema("Only primary key can be marked as autoIncrement (++)");if(!a.keyPath)throw new se.Schema("Index must have a name and cannot be an empty string")}),n[r]=E1(r,i,s)}})}stores(e){let n=this.db;this._cfg.storesSource=this._cfg.storesSource?lt(this._cfg.storesSource,e):e;let r=n._versions,s={},i={};return r.forEach(a=>{lt(s,a._cfg.storesSource),i=a._cfg.dbschema={},a._parseStoresSpec(s,i)}),n._dbSchema=i,Wl(n,[n._allTables,n,n.Transaction.prototype]),$o(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],He(i),i),n._storeNames=He(i),this}upgrade(e){return this._cfg.contentUpgrade=Al(this._cfg.contentUpgrade||xe,e),this}};function fI(t){return Fi(y1.prototype,function(n){this.db=t,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}function Zl(t,e){let n=t._dbNamesDB;return n||(n=t._dbNamesDB=new xn(Vo,{addons:[],indexedDB:t,IDBKeyRange:e}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Jl(t){return t&&typeof t.databases=="function"}function dI({indexedDB:t,IDBKeyRange:e}){return Jl(t)?Promise.resolve(t.databases()).then(n=>n.map(r=>r.name).filter(r=>r!==Vo)):Zl(t,e).toCollection().primaryKeys()}function hI({indexedDB:t,IDBKeyRange:e},n){!Jl(t)&&n!==Vo&&Zl(t,e).put({name:n}).catch(xe)}function pI({indexedDB:t,IDBKeyRange:e},n){!Jl(t)&&n!==Vo&&Zl(t,e).delete(n).catch(xe)}function ef(t){return Qn(function(){return ee.letThrough=!0,t()})}function mI(){var t=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!t||!indexedDB.databases)return Promise.resolve();var e;return new Promise(function(n){var r=function(){return indexedDB.databases().finally(n)};e=setInterval(r,100),r()}).finally(function(){return clearInterval(e)})}function gI(t){let e=t._state,{indexedDB:n}=t._deps;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then(()=>e.dbOpenError?ze(e.dbOpenError):t);rn&&(e.openCanceller._stackHolder=xr()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;let r=e.openCanceller;function s(){if(e.openCanceller!==r)throw new se.DatabaseClosed("db.open() was cancelled")}let i=e.dbReadyResolve,a=null,o=!1,c=()=>new K((l,d)=>{if(s(),!n)throw new se.MissingAPI;let h=t.name,f=e.autoSchema?n.open(h):n.open(h,Math.round(t.verno*10));if(!f)throw new se.MissingAPI;f.onerror=sn(d),f.onblocked=ke(t._fireOnBlocked),f.onupgradeneeded=ke(p=>{if(a=f.transaction,e.autoSchema&&!t._options.allowEmptyDB){f.onerror=Bi,a.abort(),f.result.close();let T=n.deleteDatabase(h);T.onsuccess=T.onerror=ke(()=>{d(new se.NoSuchDatabase(`Database ${h} doesnt exist`))})}else{a.onerror=sn(d);var E=p.oldVersion>Math.pow(2,62)?0:p.oldVersion;o=E<1,t._novip.idbdb=f.result,sI(t,E/10,a,d)}},d),f.onsuccess=ke(()=>{a=null;let p=t._novip.idbdb=f.result,E=No(p.objectStoreNames);if(E.length>0)try{let T=p.transaction(X3(E),"readonly");e.autoSchema?uI(t,p,T):(Xl(t,t._dbSchema,T),cI(t,T)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Yl(t,T)}catch{}Pi.push(t),p.onversionchange=ke(T=>{e.vcFired=!0,t.on("versionchange").fire(T)}),p.onclose=ke(T=>{t.on("close").fire(T)}),o&&hI(t._deps,h),l()},d)}).catch(l=>l&&l.name==="UnknownError"&&e.PR1398_maxLoop>0?(e.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):K.reject(l));return K.race([r,(typeof navigator=="undefined"?K.resolve():mI()).then(c)]).then(()=>(s(),e.onReadyBeingFired=[],K.resolve(ef(()=>t.on.ready.fire(t.vip))).then(function l(){if(e.onReadyBeingFired.length>0){let d=e.onReadyBeingFired.reduce(Al,xe);return e.onReadyBeingFired=[],K.resolve(ef(()=>d(t.vip))).then(l)}}))).finally(()=>{e.onReadyBeingFired=null,e.isBeingOpened=!1}).then(()=>t).catch(l=>{e.dbOpenError=l;try{a&&a.abort()}catch{}return r===e.openCanceller&&t._close(),ze(l)}).finally(()=>{e.openComplete=!0,i()})}function tf(t){var e=a=>t.next(a),n=a=>t.throw(a),r=i(e),s=i(n);function i(a){return o=>{var c=a(o),l=c.value;return c.done?l:!l||typeof l.then!="function"?tt(l)?Promise.all(l).then(r,s):r(l):l.then(r,s)}}return i(e)()}function bI(t,e,n){var r=arguments.length;if(r<2)throw new se.InvalidArgument("Too few arguments");for(var s=new Array(r-1);--r;)s[r-1]=arguments[r];n=s.pop();var i=Ub(s);return[t,i,n]}function A1(t,e,n,r,s){return K.resolve().then(()=>{let i=ee.transless||ee,a=t._createTransaction(e,n,t._dbSchema,r),o={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),t._state.PR1398_maxLoop=3}catch(h){return h.name===yl.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>A1(t,e,n,null,s))):ze(h)}let c=El(s);c&&Es();let l,d=K.follow(()=>{if(l=s.call(a,a),l)if(c){var h=_n.bind(null,null);l.then(h,h)}else typeof l.next=="function"&&typeof l.throw=="function"&&(l=tf(l))},o);return(l&&typeof l.then=="function"?K.resolve(l).then(h=>a.active?h:ze(new se.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):d.then(()=>l)).then(h=>(r&&a._resolve(),a._completion.then(()=>h))).catch(h=>(a._reject(h),ze(h)))})}function Go(t,e,n){let r=tt(t)?t.slice():[t];for(let s=0;s0,C=ce(j({},E),{isVirtual:S,keyTail:p,keyLength:m,extractKey:Kl(f),unique:!S&&E.unique});if(w.push(C),C.isPrimaryKey||i.push(C),m>1){let b=m===2?f[0]:f.slice(0,m-1);a(b,p+1,E)}return w.sort((b,I)=>b.keyTail-I.keyTail),C}let o=a(r.primaryKey.keyPath,0,r.primaryKey);s[":id"]=[o];for(let f of r.indexes)a(f.keyPath,0,f);function c(f){let p=s[Ui(f)];return p&&p[0]}function l(f,p){return{type:f.type===1?2:f.type,lower:Go(f.lower,f.lowerOpen?t.MAX_KEY:t.MIN_KEY,p),lowerOpen:!0,upper:Go(f.upper,f.upperOpen?t.MIN_KEY:t.MAX_KEY,p),upperOpen:!0}}function d(f){let p=f.query.index;return p.isVirtual?ce(j({},f),{query:{index:p,range:l(f.query.range,p.keyTail)}}):f}return ce(j({},n),{schema:ce(j({},r),{primaryKey:o,indexes:i,getIndexByKeyPath:c}),count(f){return n.count(d(f))},query(f){return n.query(d(f))},openCursor(f){let{keyTail:p,isVirtual:E,keyLength:T}=f.query.index;if(!E)return n.openCursor(f);function w(m){function S(b){b!=null?m.continue(Go(b,f.reverse?t.MAX_KEY:t.MIN_KEY,p)):f.unique?m.continue(m.key.slice(0,T).concat(f.reverse?t.MIN_KEY:t.MAX_KEY,p)):m.continue()}return Object.create(m,{continue:{value:S},continuePrimaryKey:{value(b,I){m.continuePrimaryKey(Go(b,t.MAX_KEY,p),I)}},primaryKey:{get(){return m.primaryKey}},key:{get(){let b=m.key;return T===1?b[0]:b.slice(0,T)}},value:{get(){return m.value}}})}return n.openCursor(d(f)).then(m=>m&&w(m))}})}})}var EI={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:_I};function nf(t,e,n,r){return n=n||{},r=r||"",He(t).forEach(s=>{if(!At(e,s))n[r+s]=void 0;else{var i=t[s],a=e[s];if(typeof i=="object"&&typeof a=="object"&&i&&a){let o=bl(i),c=bl(a);o!==c?n[r+s]=e[s]:o==="Object"?nf(i,a,n,r+s+"."):i!==a&&(n[r+s]=e[s])}else i!==a&&(n[r+s]=e[s])}}),He(e).forEach(s=>{At(t,s)||(n[r+s]=e[s])}),n}function TI(t,e){return e.type==="delete"?e.keys:e.keys||e.values.map(t.extractKey)}var xI={stack:"dbcore",name:"HooksMiddleware",level:2,create:t=>ce(j({},t),{table(e){let n=t.table(e),{primaryKey:r}=n.schema;return ce(j({},n),{mutate(i){let a=ee.trans,{deleting:o,creating:c,updating:l}=a.table(e).hook;switch(i.type){case"add":if(c.fire===xe)break;return a._promise("readwrite",()=>d(i),!0);case"put":if(c.fire===xe&&l.fire===xe)break;return a._promise("readwrite",()=>d(i),!0);case"delete":if(o.fire===xe)break;return a._promise("readwrite",()=>d(i),!0);case"deleteRange":if(o.fire===xe)break;return a._promise("readwrite",()=>h(i),!0)}return n.mutate(i);function d(p){let E=ee.trans,T=p.keys||TI(r,p);if(!T)throw new Error("Keys missing");return p=p.type==="add"||p.type==="put"?ce(j({},p),{keys:T}):j({},p),p.type!=="delete"&&(p.values=[...p.values]),p.keys&&(p.keys=[...p.keys]),yI(n,p,T).then(w=>{let m=T.map((S,C)=>{let b=w[C],I={onerror:null,onsuccess:null};if(p.type==="delete")o.fire.call(I,S,b,E);else if(p.type==="add"||b===void 0){let A=c.fire.call(I,S,p.values[C],E);S==null&&A!=null&&(S=A,p.keys[C]=S,r.outbound||Wt(p.values[C],r.keyPath,S))}else{let A=nf(b,p.values[C]),N=l.fire.call(I,A,S,b,E);if(N){let O=p.values[C];Object.keys(N).forEach(P=>{At(O,P)?O[P]=N[P]:Wt(O,P,N[P])})}}return I});return n.mutate(p).then(({failures:S,results:C,numFailures:b,lastResult:I})=>{for(let A=0;A(m.forEach(C=>C.onerror&&C.onerror(S)),Promise.reject(S)))})}function h(p){return f(p.trans,p.range,1e4)}function f(p,E,T){return n.query({trans:p,values:!1,query:{index:r,range:E},limit:T}).then(({result:w})=>d({type:"delete",keys:w,trans:p}).then(m=>m.numFailures>0?Promise.reject(m.failures[0]):w.length({table:e=>{let n=t.table(e);return ce(j({},n),{getMany:r=>{if(!r.cache)return n.getMany(r);let s=C1(r.keys,r.trans._cache,r.cache==="clone");return s?K.resolve(s):n.getMany(r).then(i=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?wi(i):i},i))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))})}})};function rf(t){return!("from"in t)}var Tn=function(t,e){if(this)lt(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0});else{let n=new Tn;return t&&"d"in t&<(n,t),n}};ps(Tn.prototype,{add(t){return Qo(this,t),this},addKey(t){return zi(this,t,t),this},addKeys(t){return t.forEach(e=>zi(this,e,e)),this},[_l](){return sf(this)}});function zi(t,e,n){let r=ft(e,n);if(isNaN(r))return;if(r>0)throw RangeError();if(rf(t))return lt(t,{from:e,to:n,d:1});let s=t.l,i=t.r;if(ft(n,t.from)<0)return s?zi(s,e,n):t.l={from:e,to:n,d:1,l:null,r:null},S1(t);if(ft(e,t.to)>0)return i?zi(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},S1(t);ft(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),ft(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);let a=!t.r;s&&!t.l&&Qo(t,s),i&&a&&Qo(t,i)}function Qo(t,e){function n(r,{from:s,to:i,l:a,r:o}){zi(r,s,i),a&&n(r,a),o&&n(r,o)}rf(e)||n(t,e)}function CI(t,e){let n=sf(e),r=n.next();if(r.done)return!1;let s=r.value,i=sf(t),a=i.next(s.from),o=a.value;for(;!r.done&&!a.done;){if(ft(o.from,s.to)<=0&&ft(o.to,s.from)>=0)return!0;ft(s.from,o.from)<0?s=(r=n.next(o.from)).value:o=(a=i.next(s.from)).value}return!1}function sf(t){let e=rf(t)?null:{s:0,n:t};return{next(n){let r=arguments.length>0;for(;e;)switch(e.s){case 0:if(e.s=1,r)for(;e.n.l&&ft(n,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!r||ft(n,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}}function S1(t){var e,n;let r=(((e=t.r)===null||e===void 0?void 0:e.d)||0)-(((n=t.l)===null||n===void 0?void 0:n.d)||0),s=r>1?"r":r<-1?"l":"";if(s){let i=s==="r"?"l":"r",a=j({},t),o=t[s];t.from=o.from,t.to=o.to,t[s]=o[s],a[s]=o[i],t[i]=a,a.d=I1(a)}t.d=I1(t)}function I1({r:t,l:e}){return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}var SI={stack:"dbcore",level:0,create:t=>{let e=t.schema.name,n=new Tn(t.MIN_KEY,t.MAX_KEY);return ce(j({},t),{table:r=>{let s=t.table(r),{schema:i}=s,{primaryKey:a}=i,{extractKey:o,outbound:c}=a,l=ce(j({},s),{mutate:f=>{let p=f.trans,E=p.mutatedParts||(p.mutatedParts={}),T=A=>{let N=`idb://${e}/${r}/${A}`;return E[N]||(E[N]=new Tn)},w=T(""),m=T(":dels"),{type:S}=f,[C,b]=f.type==="deleteRange"?[f.range]:f.type==="delete"?[f.keys]:f.values.length<50?[[],f.values]:[],I=f.trans._cache;return s.mutate(f).then(A=>{if(tt(C)){S!=="delete"&&(C=A.results),w.addKeys(C);let N=C1(C,I);!N&&S!=="add"&&m.addKeys(C),(N||b)&&II(T,i,N,b)}else if(C){let N={from:C.lower,to:C.upper};m.add(N),w.add(N)}else w.add(n),m.add(n),i.indexes.forEach(N=>T(N.name).add(n));return A})}}),d=({query:{index:f,range:p}})=>{var E,T;return[f,new Tn((E=p.lower)!==null&&E!==void 0?E:t.MIN_KEY,(T=p.upper)!==null&&T!==void 0?T:t.MAX_KEY)]},h={get:f=>[a,new Tn(f.key)],getMany:f=>[a,new Tn().addKeys(f.keys)],count:d,query:d,openCursor:d};return He(h).forEach(f=>{l[f]=function(p){let{subscr:E}=ee;if(E){let T=b=>{let I=`idb://${e}/${r}/${b}`;return E[I]||(E[I]=new Tn)},w=T(""),m=T(":dels"),[S,C]=h[f](p);if(T(S.name||"").add(C),!S.isPrimaryKey)if(f==="count")m.add(n);else{let b=f==="query"&&c&&p.values&&s.query(ce(j({},p),{values:!1}));return s[f].apply(this,arguments).then(I=>{if(f==="query"){if(c&&p.values)return b.then(({result:N})=>(w.addKeys(N),I));let A=p.values?I.result.map(o):I.result;p.values?w.addKeys(A):m.addKeys(A)}else if(f==="openCursor"){let A=I,N=p.values;return A&&Object.create(A,{key:{get(){return m.addKey(A.primaryKey),A.key}},primaryKey:{get(){let O=A.primaryKey;return m.addKey(O),O}},value:{get(){return N&&w.addKey(A.primaryKey),A.value}}})}return I})}}return s[f].apply(this,arguments)}}),l}})}};function II(t,e,n,r){function s(i){let a=t(i.name||"");function o(l){return l!=null?i.extractKey(l):null}let c=l=>i.multiEntry&&tt(l)?l.forEach(d=>a.addKey(d)):a.addKey(l);(n||r).forEach((l,d)=>{let h=n&&o(n[d]),f=r&&o(r[d]);ft(h,f)!==0&&(h!=null&&c(h),f!=null&&c(f))})}e.indexes.forEach(s)}var xn=class{constructor(e,n){this._middlewares={},this.verno=0;let r=xn.dependencies;this._options=n=j({addons:xn.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};let{addons:s}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;let i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:xe,dbReadyPromise:null,cancelOpen:xe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new K(a=>{i.dbReadyResolve=a}),i.openCanceller=new K((a,o)=>{i.cancelOpen=o}),this._state=i,this.name=e,this.on=Mi(this,"populate","blocked","versionchange","close",{ready:[Al,xe]}),this.on.ready.subscribe=Fb(this.on.ready.subscribe,a=>(o,c)=>{xn.vip(()=>{let l=this._state;if(l.openComplete)l.dbOpenError||K.resolve().then(o),c&&a(o);else if(l.onReadyBeingFired)l.onReadyBeingFired.push(o),c&&a(o);else{a(o);let d=this;c||a(function h(){d.on.ready.unsubscribe(o),d.on.ready.unsubscribe(h)})}})}),this.Collection=V3(this),this.Table=j3(this),this.Transaction=Q3(this),this.Version=fI(this),this.WhereClause=G3(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,o,c,this._options.chromeTransactionDurability,l),this._fireOnBlocked=a=>{this.on("blocked").fire(a),Pi.filter(o=>o.name===this.name&&o!==this&&!o._state.vcFired).map(o=>o.on("versionchange").fire(a))},this.use(EI),this.use(xI),this.use(SI),this.use(AI),this.vip=Object.create(this,{_vip:{value:!0}}),s.forEach(a=>a(this))}version(e){if(isNaN(e)||e<.1)throw new se.Type("Given version is not a positive number");if(e=Math.round(e*10)/10,this.idbdb||this._state.isBeingOpened)throw new se.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let n=this._versions;var r=n.filter(s=>s._cfg.version===e)[0];return r||(r=new this.Version(e),n.push(r),n.sort(rI),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||ee.letThrough||this._vip)?e():new K((n,r)=>{if(this._state.openComplete)return r(new se.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen){r(new se.DatabaseClosed);return}this.open().catch(xe)}this._state.dbReadyPromise.then(n,r)}).then(e)}use({stack:e,create:n,level:r,name:s}){s&&this.unuse({stack:e,name:s});let i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:r??10,name:s}),i.sort((a,o)=>a.level-o.level),this}unuse({stack:e,name:n,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(s=>r?s.create!==r:n?s.name!==n:!1)),this}open(){return gI(this)}_close(){let e=this._state,n=Pi.indexOf(this);if(n>=0&&Pi.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}e.dbReadyPromise=new K(r=>{e.dbReadyResolve=r}),e.openCanceller=new K((r,s)=>{e.cancelOpen=s})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new se.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,n=this._state;return new K((r,s)=>{let i=()=>{this.close();var a=this._deps.indexedDB.deleteDatabase(this.name);a.onsuccess=ke(()=>{pI(this._deps,this.name),r()}),a.onerror=sn(s),a.onblocked=this._fireOnBlocked};if(e)throw new se.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){let e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return He(this._allTables).map(e=>this._allTables[e])}transaction(){let e=bI.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,n,r){let s=ee.trans;(!s||s.db!==this||e.indexOf("!")!==-1)&&(s=null);let i=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");let a,o;try{if(o=n.map(l=>{var d=l instanceof this.Table?l.name:l;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),e=="r"||e===Bl)a=Bl;else if(e=="rw"||e==jl)a=jl;else throw new se.InvalidArgument("Invalid transaction mode: "+e);if(s){if(s.mode===Bl&&a===jl)if(i)s=null;else throw new se.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s&&o.forEach(l=>{if(s&&s.storeNames.indexOf(l)===-1)if(i)s=null;else throw new se.SubTransaction("Table "+l+" not included in parent transaction.")}),i&&s&&!s.active&&(s=null)}}catch(l){return s?s._promise(null,(d,h)=>{h(l)}):ze(l)}let c=A1.bind(null,this,a,o,s,r);return s?s._promise(a,c,"lock"):ee.trans?Ts(ee.transless,()=>this._whenReady(c)):this._whenReady(c)}table(e){if(!At(this._allTables,e))throw new se.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}},wI=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",w1=class{constructor(e){this._subscribe=e}subscribe(e,n,r){return this._subscribe(!e||typeof e=="function"?{next:e,error:n,complete:r}:e)}[wI](){return this}};function N1(t,e){return He(e).forEach(n=>{let r=t[n]||(t[n]=new Tn);Qo(r,e[n])}),t}function NI(t){let e=!1,n,r=new w1(s=>{let i=El(t);function a(w){i&&Es();let m=()=>Qn(t,{subscr:w,trans:null}),S=ee.trans?Ts(ee.transless,m):m();return i&&S.then(_n,_n),S}let o=!1,c={},l={},d={get closed(){return o},unsubscribe:()=>{o=!0,er.storagemutated.unsubscribe(E)}};s.start&&s.start(d);let h=!1,f=!1;function p(){return He(l).some(w=>c[w]&&CI(c[w],l[w]))}let E=w=>{N1(c,w),p()&&T()},T=()=>{if(h||o)return;c={};let w={},m=a(w);f||(er(ji,E),f=!0),h=!0,Promise.resolve(m).then(S=>{e=!0,n=S,h=!1,!o&&(p()?T():(c={},l=w,s.next&&s.next(S)))},S=>{h=!1,e=!1,s.error&&s.error(S),d.unsubscribe()})};return T(),d});return r.hasValue=()=>e,r.getValue=()=>n,r}var af;try{af={indexedDB:De.indexedDB||De.mozIndexedDB||De.webkitIndexedDB||De.msIndexedDB,IDBKeyRange:De.IDBKeyRange||De.webkitIDBKeyRange}}catch{af={indexedDB:null,IDBKeyRange:null}}var wr=xn;ps(wr,ce(j({},Do),{delete(t){return new wr(t,{addons:[]}).delete()},exists(t){return new wr(t,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1)},getDatabaseNames(t){try{return dI(wr.dependencies).then(t)}catch{return ze(new se.MissingAPI)}},defineClass(){function t(e){lt(this,e)}return t},ignoreTransaction(t){return ee.trans?Ts(ee.transless,t):t()},vip:ef,async:function(t){return function(){try{var e=tf(t.apply(this,arguments));return!e||typeof e.then!="function"?K.resolve(e):e}catch(n){return ze(n)}}},spawn:function(t,e,n){try{var r=tf(t.apply(n,e||[]));return!r||typeof r.then!="function"?K.resolve(r):r}catch(s){return ze(s)}},currentTransaction:{get:()=>ee.trans||null},waitFor:function(t,e){let n=K.resolve(typeof t=="function"?wr.ignoreTransaction(t):t).timeout(e||6e4);return ee.trans?ee.trans.waitFor(n):n},Promise:K,debug:{get:()=>rn,set:t=>{Vb(t,t==="dexie"?()=>!0:u1)}},derive:ms,extend:lt,props:ps,override:Fb,Events:Mi,on:er,liveQuery:NI,extendObservabilitySet:N1,getByKeyPath:gn,setByKeyPath:Wt,delByKeyPath:f3,shallowClone:Hb,deepClone:wi,getObjectDiff:nf,cmp:ft,asap:Bb,minKey:Fl,addons:[],connections:Pi,errnames:yl,dependencies:af,semVer:a1,version:a1.split(".").map(t=>parseInt(t)).reduce((t,e,n)=>t+e/Math.pow(10,n*2))}));wr.maxKey=Hi(wr.dependencies.IDBKeyRange);typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(er(ji,t=>{if(!yn){let e;zo?(e=document.createEvent("CustomEvent"),e.initCustomEvent(Jn,!0,!0,t)):e=new CustomEvent(Jn,{detail:t}),yn=!0,dispatchEvent(e),yn=!1}}),addEventListener(Jn,({detail:t})=>{yn||Xo(t)}));function Xo(t){let e=yn;try{yn=!0,er.storagemutated.fire(t)}finally{yn=e}}var yn=!1;if(typeof BroadcastChannel!="undefined"){let t=new BroadcastChannel(Jn);typeof t.unref=="function"&&t.unref(),er(ji,e=>{yn||t.postMessage(e)}),t.onmessage=e=>{e.data&&Xo(e.data)}}else if(typeof self!="undefined"&&typeof navigator!="undefined"){er(ji,e=>{try{yn||(typeof localStorage!="undefined"&&localStorage.setItem(Jn,JSON.stringify({trig:Math.random(),changedParts:e})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Jn,changedParts:e})))}catch{}}),typeof addEventListener!="undefined"&&addEventListener("storage",e=>{if(e.key===Jn){let n=JSON.parse(e.newValue);n&&Xo(n.changedParts)}});let t=self.document&&navigator.serviceWorker;t&&t.addEventListener("message",vI)}function vI({data:t}){t&&t.type===Jn&&Xo(t.changedParts)}K.rejectionMapper=T3;Vb(rn,u1);var of=be(require("obsidian")),As=class extends xn{constructor(e){super(As.getDbName(e.app.appId));this.plugin=e;this.version(As.dbVersion).stores({searchHistory:"++id",minisearch:"date",embeds:"embedded"})}static getDbName(e){return"omnisearch/cache/"+e}async getMinisearchCache(){try{return(await this.plugin.database.minisearch.toArray())[0]}catch(e){return new of.Notice("Omnisearch - Cache missing or invalid. Some freezes may occur while Omnisearch indexes your vault."),console.error("Omnisearch - Error while loading Minisearch cache"),console.error(e),null}}async writeMinisearchCache(){let e=this.plugin.searchEngine.getSerializedMiniSearch(),n=this.plugin.searchEngine.getSerializedIndexedDocuments(),r=this.plugin.database;await r.minisearch.clear(),await r.minisearch.add({date:new Date().toISOString(),paths:n,data:e}),console.debug("Omnisearch - Search cache written")}async clearOldDatabases(){let e=(await indexedDB.databases()).filter(n=>n.name===As.getDbName(this.plugin.app.appId)&&n.version!==As.dbVersion*10);if(e.length){console.debug("Omnisearch - Those IndexedDb databases will be deleted:");for(let n of e)n.name&&indexedDB.deleteDatabase(n.name)}}async clearCache(){await this.minisearch.clear(),await this.embeds.clear(),new of.Notice("Omnisearch - Cache cleared. Please restart Obsidian.")}},Zo=As;Zo.dbVersion=10;var v1="ENTRIES",uf="KEYS",cf="VALUES",Ve="",Vi=class{constructor(e,n){let r=e._tree,s=Array.from(r.keys());this.set=e,this._type=n,this._path=s.length>0?[{node:r,keys:s}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:n}=Cs(this._path);if(Cs(n)===Ve)return{done:!1,value:this.result()};let r=e.get(Cs(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=Cs(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>Cs(e)).filter(e=>e!==Ve).join("")}value(){return Cs(this._path).node.get(Ve)}result(){switch(this._type){case cf:return this.value();case uf:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},Cs=t=>t[t.length-1];var DI=(t,e,n)=>{let r=new Map;if(e===void 0)return r;let s=e.length+1,i=s+n,a=new Uint8Array(i*s).fill(n+1);for(let o=0;o{let c=i*a;e:for(let l of t.keys())if(l===Ve){let d=s[c-1];d<=n&&r.set(o,[t.get(l),d])}else{let d=i;for(let h=0;hn)continue e}D1(t.get(l),e,n,r,s,d,a,o+l)}},O1=DI;var $t=class{constructor(e=new Map,n=""){this._size=void 0;this._tree=e,this._prefix=n}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[n,r]=Jo(this._tree,e.slice(this._prefix.length));if(n===void 0){let[s,i]=df(r);for(let a of s.keys())if(a!==Ve&&a.startsWith(i)){let o=new Map;return o.set(a.slice(i.length),s.get(a)),new $t(o,e)}}return new $t(n,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,OI(this._tree,e)}entries(){return new Vi(this,v1)}forEach(e){for(let[n,r]of this)e(n,r,this)}fuzzyGet(e,n){return O1(this._tree,e,n)}get(e){let n=lf(this._tree,e);return n!==void 0?n.get(Ve):void 0}has(e){let n=lf(this._tree,e);return n!==void 0&&n.has(Ve)}keys(){return new Vi(this,uf)}set(e,n){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ff(this._tree,e).set(Ve,n),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let r=ff(this._tree,e);return r.set(Ve,n(r.get(Ve))),this}fetch(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let r=ff(this._tree,e),s=r.get(Ve);return s===void 0&&r.set(Ve,s=n()),s}values(){return new Vi(this,cf)}[Symbol.iterator](){return this.entries()}static from(e){let n=new $t;for(let[r,s]of e)n.set(r,s);return n}static fromObject(e){return $t.from(Object.entries(e))}},Jo=(t,e,n=[])=>{if(e.length===0||t==null)return[t,n];for(let r of t.keys())if(r!==Ve&&e.startsWith(r))return n.push([t,r]),Jo(t.get(r),e.slice(r.length),n);return n.push([t,e]),Jo(void 0,"",n)},lf=(t,e)=>{if(e.length===0||t==null)return t;for(let n of t.keys())if(n!==Ve&&e.startsWith(n))return lf(t.get(n),e.slice(n.length))},ff=(t,e)=>{let n=e.length;e:for(let r=0;t&&r{let[n,r]=Jo(t,e);if(n!==void 0){if(n.delete(Ve),n.size===0)k1(r);else if(n.size===1){let[s,i]=n.entries().next().value;R1(r,s,i)}}},k1=t=>{if(t.length===0)return;let[e,n]=df(t);if(e.delete(n),e.size===0)k1(t.slice(0,-1));else if(e.size===1){let[r,s]=e.entries().next().value;r!==Ve&&R1(t.slice(0,-1),r,s)}},R1=(t,e,n)=>{if(t.length===0)return;let[r,s]=df(t);r.set(s+e,n),r.delete(s)},df=t=>t[t.length-1];var hf="or",L1="and",kI="and_not",qi=class{constructor(e){if(e?.fields==null)throw new Error('MiniSearch: option "fields" must be provided');let n=e.autoVacuum==null||e.autoVacuum===!0?_f:e.autoVacuum;this._options=ce(j(j({},mf),e),{autoVacuum:n,searchOptions:j(j({},P1),e.searchOptions||{}),autoSuggestOptions:j(j({},FI),e.autoSuggestOptions||{})}),this._index=new $t,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=bf,this.addFields(this._options.fields)}add(e){let{extractField:n,tokenize:r,processTerm:s,fields:i,idField:a}=this._options,o=n(e,a);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${a}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);let c=this.addDocumentId(o);this.saveStoredFields(c,e);for(let l of i){let d=n(e,l);if(d==null)continue;let h=r(d.toString(),l),f=this._fieldIds[l],p=new Set(h).size;this.addFieldLength(c,f,this._documentCount-1,p);for(let E of h){let T=s(E,l);if(Array.isArray(T))for(let w of T)this.addTerm(f,c,w);else T&&this.addTerm(f,c,T)}}}addAll(e){for(let n of e)this.add(n)}addAllAsync(e,n={}){let{chunkSize:r=10}=n,s={chunk:[],promise:Promise.resolve()},{chunk:i,promise:a}=e.reduce(({chunk:o,promise:c},l,d)=>(o.push(l),(d+1)%r==0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(o))}:{chunk:o,promise:c}),s);return a.then(()=>this.addAll(i))}remove(e){let{tokenize:n,processTerm:r,extractField:s,fields:i,idField:a}=this._options,o=s(e,a);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${a}"`);let c=this._idToShortId.get(o);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(let l of i){let d=s(e,l);if(d==null)continue;let h=n(d.toString(),l),f=this._fieldIds[l],p=new Set(h).size;this.removeFieldLength(c,f,this._documentCount,p);for(let E of h){let T=r(E,l);if(Array.isArray(T))for(let w of T)this.removeTerm(f,c,w);else T&&this.removeTerm(f,c,T)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(o),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(let n of e)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new $t,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let n=this._idToShortId.get(e);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,s)=>{this.removeFieldLength(n,s,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:n,batchSize:r,batchWait:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:s},{minDirtCount:n,minDirtFactor:e})}discardAll(e){let n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let r of e)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(e){let{idField:n,extractField:r}=this._options,s=r(e,n);this.discard(s),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=bf,this.performVacuuming(e,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,n){let r=this._dirtCount;if(this.vacuumConditionsMet(n)){let s=e.batchSize||gf.batchSize,i=e.batchWait||gf.batchWait,a=1;for(let[o,c]of this._index){for(let[l,d]of c)for(let[h]of d)this._documentIds.has(h)||(d.size<=1?c.delete(l):d.delete(h));this._index.get(o).size===0&&this._index.delete(o),a%s==0&&await new Promise(l=>setTimeout(l,i)),a+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:n,minDirtFactor:r}=e;return n=n||_f.minDirtCount,r=r||_f.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let n=this._idToShortId.get(e);if(n!=null)return this._storedFields.get(n)}search(e,n={}){let r=this.executeQuery(e,n),s=[];for(let[i,{score:a,terms:o,match:c}]of r){let l=o.length||1,d={id:this._documentIds.get(i),score:a*l,terms:Object.keys(c),queryTerms:o,match:c};Object.assign(d,this._storedFields.get(i)),(n.filter==null||n.filter(d))&&s.push(d)}return e===qi.wildcard&&n.boostDocument==null&&this._options.searchOptions.boostDocument==null||s.sort(F1),s}autoSuggest(e,n={}){n=j(j({},this._options.autoSuggestOptions),n);let r=new Map;for(let{score:i,terms:a}of this.search(e,n)){let o=a.join(" "),c=r.get(o);c!=null?(c.score+=i,c.count+=1):r.set(o,{score:i,terms:a,count:1})}let s=[];for(let[i,{score:a,terms:o,count:c}]of r)s.push({suggestion:i,terms:o,score:a/c});return s.sort(F1),s}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),n)}static async loadJSONAsync(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),n)}static getDefault(e){if(mf.hasOwnProperty(e))return pf(mf,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,n){let{index:r,documentIds:s,fieldLength:i,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=eu(s),c._fieldLength=eu(i),c._storedFields=eu(a);for(let[l,d]of c._documentIds)c._idToShortId.set(d,l);for(let[l,d]of r){let h=new Map;for(let f of Object.keys(d)){let p=d[f];o===1&&(p=p.ds),h.set(parseInt(f,10),eu(p))}c._index.set(l,h)}return c}static async loadJSAsync(e,n){let{index:r,documentIds:s,fieldLength:i,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=await tu(s),c._fieldLength=await tu(i),c._storedFields=await tu(a);for(let[d,h]of c._documentIds)c._idToShortId.set(h,d);let l=0;for(let[d,h]of r){let f=new Map;for(let p of Object.keys(h)){let E=h[p];o===1&&(E=E.ds),f.set(parseInt(p,10),await tu(E))}++l%1e3==0&&await j1(0),c._index.set(d,f)}return c}static instantiateMiniSearch(e,n){let{documentCount:r,nextId:s,fieldIds:i,averageFieldLength:a,dirtCount:o,serializationVersion:c}=e;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let l=new qi(n);return l._documentCount=r,l._nextId=s,l._idToShortId=new Map,l._fieldIds=i,l._avgFieldLength=a,l._dirtCount=o||0,l._index=new $t,l}executeQuery(e,n={}){if(e===qi.wildcard)return this.executeWildcardQuery(n);if(typeof e!="string"){let f=ce(j(j({},n),e),{queries:void 0}),p=e.queries.map(E=>this.executeQuery(E,f));return this.combineResults(p,f.combineWith)}let{tokenize:r,processTerm:s,searchOptions:i}=this._options,a=j(j({tokenize:r,processTerm:s},i),n),{tokenize:o,processTerm:c}=a,h=o(e).flatMap(f=>c(f)).filter(f=>!!f).map(MI(a)).map(f=>this.executeQuerySpec(f,a));return this.combineResults(h,a.combineWith)}executeQuerySpec(e,n){let r=j(j({},this._options.searchOptions),n),s=(r.fields||this._options.fields).reduce((T,w)=>ce(j({},T),{[w]:pf(r.boost,w)||1}),{}),{boostDocument:i,weights:a,maxFuzzy:o,bm25:c}=r,{fuzzy:l,prefix:d}=j(j({},P1.weights),a),h=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,h,s,i,c),p,E;if(e.prefix&&(p=this._index.atPrefix(e.term)),e.fuzzy){let T=e.fuzzy===!0?.2:e.fuzzy,w=T<1?Math.min(o,Math.round(e.term.length*T)):T;w&&(E=this._index.fuzzyGet(e.term,w))}if(p)for(let[T,w]of p){let m=T.length-e.term.length;if(!m)continue;E?.delete(T);let S=d*T.length/(T.length+.3*m);this.termResults(e.term,T,S,e.termBoost,w,s,i,c,f)}if(E)for(let T of E.keys()){let[w,m]=E.get(T);if(!m)continue;let S=l*T.length/(T.length+m);this.termResults(e.term,T,S,e.termBoost,w,s,i,c,f)}return f}executeWildcardQuery(e){let n=new Map,r=j(j({},this._options.searchOptions),e);for(let[s,i]of this._documentIds){let a=r.boostDocument?r.boostDocument(i,"",this._storedFields.get(s)):1;n.set(s,{score:a,terms:[],match:{}})}return n}combineResults(e,n=hf){if(e.length===0)return new Map;let r=n.toLowerCase(),s=RI[r];if(!s)throw new Error(`Invalid combination operator: ${n}`);return e.reduce(s)||new Map}toJSON(){let e=[];for(let[n,r]of this._index){let s={};for(let[i,a]of r)s[i]=Object.fromEntries(a);e.push([n,s])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,n,r,s,i,a,o,c,l=new Map){if(i==null)return l;for(let d of Object.keys(a)){let h=a[d],f=this._fieldIds[d],p=i.get(f);if(p==null)continue;let E=p.size,T=this._avgFieldLength[f];for(let w of p.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,n),E-=1;continue}let m=o?o(this._documentIds.get(w),n,this._storedFields.get(w)):1;if(!m)continue;let S=p.get(w),C=this._fieldLength.get(w)[f],b=PI(S,E,this._documentCount,C,T,c),I=r*s*h*m*b,A=l.get(w);if(A){A.score+=I,BI(A.terms,e);let N=pf(A.match,n);N?N.push(d):A.match[n]=[d]}else l.set(w,{score:I,terms:[e],match:{[n]:[d]}})}}return l}addTerm(e,n,r){let s=this._index.fetch(r,B1),i=s.get(e);if(i==null)i=new Map,i.set(n,1),s.set(e,i);else{let a=i.get(n);i.set(n,(a||0)+1)}}removeTerm(e,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,e,r);return}let s=this._index.fetch(r,B1),i=s.get(e);i==null||i.get(n)==null?this.warnDocumentChanged(n,e,r):i.get(n)<=1?i.size<=1?s.delete(e):i.delete(n):i.set(n,i.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(e,n,r){for(let s of Object.keys(this._fieldIds))if(this._fieldIds[s]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${r}" was not present in field "${s}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){let n=this._nextId;return this._idToShortId.set(e,n),this._documentIds.set(n,e),this._documentCount+=1,this._nextId+=1,n}addFields(e){for(let n=0;nObject.prototype.hasOwnProperty.call(t,e)?t[e]:void 0,RI={[hf]:(t,e)=>{for(let n of e.keys()){let r=t.get(n);if(r==null)t.set(n,e.get(n));else{let{score:s,terms:i,match:a}=e.get(n);r.score=r.score+s,r.match=Object.assign(r.match,a),M1(r.terms,i)}}return t},[L1]:(t,e)=>{let n=new Map;for(let r of e.keys()){let s=t.get(r);if(s==null)continue;let{score:i,terms:a,match:o}=e.get(r);M1(s.terms,a),n.set(r,{score:s.score+i,terms:s.terms,match:Object.assign(s.match,o)})}return n},[kI]:(t,e)=>{for(let n of e.keys())t.delete(n);return t}},LI={k:1.2,b:.7,d:.5},PI=(t,e,n,r,s,i)=>{let{k:a,b:o,d:c}=i;return Math.log(1+(n-e+.5)/(e+.5))*(c+t*(a+1)/(t+a*(1-o+o*r/s)))},MI=t=>(e,n,r)=>{let s=typeof t.fuzzy=="function"?t.fuzzy(e,n,r):t.fuzzy||!1,i=typeof t.prefix=="function"?t.prefix(e,n,r):t.prefix===!0,a=typeof t.boostTerm=="function"?t.boostTerm(e,n,r):1;return{term:e,fuzzy:s,prefix:i,termBoost:a}},mf={idField:"id",extractField:(t,e)=>t[e],tokenize:t=>t.split(jI),processTerm:t=>t.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(t,e)=>{typeof console?.[t]=="function"&&console[t](e)},autoVacuum:!0},P1={combineWith:hf,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:LI},FI={combineWith:L1,prefix:(t,e,n)=>e===n.length-1},gf={batchSize:1e3,batchWait:10},bf={minDirtFactor:.1,minDirtCount:20},_f=j(j({},gf),bf),BI=(t,e)=>{t.includes(e)||t.push(e)},M1=(t,e)=>{for(let n of e)t.includes(n)||t.push(n)},F1=({score:t},{score:e})=>e-t,B1=()=>new Map,eu=t=>{let e=new Map;for(let n of Object.keys(t))e.set(parseInt(n,10),t[n]);return e},tu=async t=>{let e=new Map,n=0;for(let r of Object.keys(t))e.set(parseInt(r,10),t[r]),++n%1e3==0&&await j1(0);return e},j1=t=>new Promise(e=>setTimeout(e,t)),jI=/[\n\r\p{Z}\p{P}]+/u;ut();var cx=be(require("obsidian"));yi();en();ut();var ux=ox(),Jd=class{constructor(e){this.plugin=e}tokenizeForIndexing(e){try{let n=this.tokenizeWords(e),r=[];if(this.plugin.settings.tokenizeUrls)try{r=ux(e)}catch(i){le("Error extracting urls",i)}let s=this.tokenizeTokens(e,{skipChs:!0});return s=[...s.flatMap(i=>[i,...Tc(i),...Ec(i)]),...n],r.length&&(s=[...s,...r]),s=[...new Set(s)],s}catch(n){return console.error("Error tokenizing text, skipping document",n),[]}}tokenizeForSearch(e){let n=ux(e);e=n.reduce((s,i)=>s.replace(i,""),e);let r=[...this.tokenizeTokens(e),...n].filter(Boolean);return{combineWith:"OR",queries:[{combineWith:"AND",queries:r},{combineWith:"AND",queries:this.tokenizeWords(e).filter(Boolean)},{combineWith:"AND",queries:r.flatMap(Tc)},{combineWith:"AND",queries:r.flatMap(Ec)}]}}tokenizeWords(e,{skipChs:n=!1}={}){let r=e.split(vh);return n?r:this.tokenizeChsWord(r)}tokenizeTokens(e,{skipChs:n=!1}={}){let r=e.split(ai);return n?r:this.tokenizeChsWord(r)}tokenizeChsWord(e){let n=this.plugin.getChsSegmenter();return n?e.flatMap(r=>Ih.test(r)?n.cut(r,{search:!0}):[r]):e}};var eh=class{constructor(e){this.plugin=e;this.indexedDocuments=new Map;this.tokenizer=new Jd(e),this.minisearch=new Ss(this.getOptions())}async loadCache(){await this.plugin.embedsRepository.loadFromCache();let e=await this.plugin.database.getMinisearchCache();return e?(this.minisearch=await Ss.loadJSAsync(e.data,this.getOptions()),this.indexedDocuments=new Map(e.paths.map(n=>[n.path,n.mtime])),!0):(console.log("Omnisearch - No cache found"),!1)}getDocumentsToReindex(e){let n=new Map(e.map(i=>[i.path,i.mtime])),r=e.filter(i=>!this.indexedDocuments.has(i.path)||this.indexedDocuments.get(i.path)!==i.mtime),s=[...this.indexedDocuments].filter(([i,a])=>!n.has(i)||n.get(i)!==a).map(i=>({path:i[0],mtime:i[1]}));return{toAdd:r,toRemove:s}}async addFromPaths(e){le("Adding files",e);let n=(await Promise.all(e.map(async s=>await this.plugin.documentsRepository.getDocument(s)))).filter(s=>!!s?.path);le("Sorting documents to first index markdown"),n=Jc(n,s=>s.path.endsWith(".md")?0:1),this.removeFromPaths(n.filter(s=>this.indexedDocuments.has(s.path)).map(s=>s.path));let r=Ph(n,500);for(let s of r){le("Indexing into search engine",s),s.forEach(a=>this.indexedDocuments.set(a.path,a.mtime));let i=s.filter(a=>this.minisearch.has(a.path));this.removeFromPaths(i.map(a=>a.path)),await this.minisearch.addAllAsync(s)}}removeFromPaths(e){e.forEach(r=>this.indexedDocuments.delete(r));let n=e.filter(r=>this.minisearch.has(r));this.minisearch.discardAll(n)}async search(e,n){let r=this.plugin.settings;if(e.isEmpty())return[];le("=== New search ==="),le("Starting search for",e);let s;switch(r.fuzziness){case"0":s=0;break;case"1":s=.1;break;default:s=.2;break}let i=this.tokenizer.tokenizeForSearch(e.segmentsToStr());le(JSON.stringify(i,null,1));let a=this.minisearch.search(i,{prefix:h=>h.length>=n.prefixLength,fuzzy:h=>h.length<=3?0:h.length<=5?s/2:s,boost:{basename:r.weightBasename,aliases:r.weightBasename,displayTitle:r.weightBasename,directory:r.weightDirectory,headings1:r.weightH1,headings2:r.weightH2,headings3:r.weightH3,tags:r.weightUnmarkedTags,unmarkedTags:r.weightUnmarkedTags},tokenize:h=>[h]});if(le(`Found ${a.length} results`,a),e.query.ext?.length&&(a=a.filter(h=>{let f="."+h.id.split(".").pop();return e.query.ext?.some(p=>f.startsWith(p.startsWith(".")?p:"."+p))})),e.query.path&&(a=a.filter(h=>e.query.path?.some(f=>h.id.toLowerCase().includes(f.toLowerCase())))),e.query.exclude.path&&(a=a.filter(h=>!e.query.exclude.path?.some(f=>h.id.toLowerCase().includes(f.toLowerCase())))),!a.length)return[];if(n.singleFilePath)return a.filter(h=>h.id===n.singleFilePath);le("searching with downranked folders",r.downrankedFoldersFilters),r.hideExcluded?a=a.filter(h=>!(this.plugin.app.metadataCache.isUserIgnored&&this.plugin.app.metadataCache.isUserIgnored(h.id))):a.forEach(h=>{this.plugin.app.metadataCache.isUserIgnored&&this.plugin.app.metadataCache.isUserIgnored(h.id)&&(h.score/=10)});let o=e.getTags();for(let h of a){let f=h.id;if(r.downrankedFoldersFilters.length>0){let E=!1;r.downrankedFoldersFilters.forEach(m=>{f.startsWith(m)&&(f===m||f.startsWith(m+"/"))&&(le("searching with downranked folders in path: ",f),E=!0)}),E&&(h.score/=10);let T=f.split("/"),w=T.length;for(let m=0;mw.includes(m))&&(le(`Boosting field "${E}" x${T} for ${f}`),h.score*=T)}for(let E of o)(h.tags??[]).includes(E)&&(h.score*=100)}le("Sorting and limiting results"),a=a.sort((h,f)=>f.score-h.score).slice(0,50),le("Filtered results:",a),a.length&&le("First result:",a[0]);let c=await Promise.all(a.map(async h=>await this.plugin.documentsRepository.getDocument(h.id))),l=e.getExactTerms();l.length&&(le("Filtering with quoted terms: ",l),a=a.filter(h=>{let f=c.find(T=>T.path===h.id),p=f?.path.toLowerCase()??"",E=(f?.cleanedContent??"").toLowerCase();return l.every(T=>E.includes(T)||cn(p,this.plugin.settings.ignoreArabicDiacritics).includes(T))}));let d=e.query.exclude.text;return d.length&&(le("Filtering with exclusions"),a=a.filter(h=>{let f=(c.find(p=>p.path===h.id)?.content??"").toLowerCase();return d.every(p=>!f.includes(p))})),le("Deduping"),a=a.filter((h,f,p)=>p.findIndex(E=>E.id===h.id)===f),a}async getSuggestions(e,n){let r;this.plugin.settings.simpleSearch?r=await this.search(e,{prefixLength:3,singleFilePath:n?.singleFilePath}):r=await this.search(e,{prefixLength:1,singleFilePath:n?.singleFilePath});let s=await Promise.all(r.map(async o=>await this.plugin.documentsRepository.getDocument(o.id))),i=s.length;for(let o=0;o{le("Locating matches for",o.id);let c=s.find(f=>f.path===o.id);c||(console.warn(`Omnisearch - Note "${o.id}" not in the live cache`),c={content:"",basename:o.id,path:o.id});let l=[...o.terms,...e.getExactTerms(),...e.getTags()];le("Matching tokens:",l),le("Getting matches locations...");let d=this.plugin.textProcessor.getMatches(c.content,l,e);return le(`Matches for note "${c.path}"`,d),j({score:o.score,foundWords:l,matches:d,isEmbed:o.isEmbed},c)});return le("Suggestions:",a),a}getSerializedMiniSearch(){return this.minisearch.toJSON()}getSerializedIndexedDocuments(){return Array.from(this.indexedDocuments).map(([e,n])=>({path:e,mtime:n}))}getOptions(){return{tokenize:this.tokenizer.tokenizeForIndexing.bind(this.tokenizer),extractField:(e,n)=>{if(n==="directory"){let r=e.path.split("/");return r.pop(),r.join("/")}return e[n]},processTerm:e=>(this.plugin.settings.ignoreDiacritics?cn(e,this.plugin.settings.ignoreArabicDiacritics):e).toLowerCase(),idField:"path",fields:["basename","directory","aliases","content","headings1","headings2","headings3"],storeFields:["tags"],logger(e,n,r){r==="version_conflict"&&new cx.Notice("Omnisearch - Your index cache may be incorrect or corrupted. If this message keeps appearing, go to Settings to clear the cache.",5e3)}}}};var Qs=be(require("obsidian"));ut();li();var th=class{constructor(e){this.plugin=e;this.documents=new Map;this.errorsCount=0;this.errorsWarned=!1;setInterval(()=>{this.errorsCount>0&&--this.errorsCount},1e3)}async addDocument(e){try{let n=await this.getAndMapIndexedDocument(e);if(!n.path){console.error(`Missing .path field in IndexedDocument "${n.basename}", skipping`);return}this.documents.set(e,n),this.plugin.embedsRepository.refreshEmbedsForNote(e)}catch(n){console.warn(`Omnisearch: Error while adding "${e}" to live cache`,n),this.removeDocument(e),this.countError()}}removeDocument(e){this.documents.delete(e)}async getDocument(e){return this.documents.has(e)?this.documents.get(e):(le("Generating IndexedDocument from",e),await this.addDocument(e),this.documents.get(e))}async getAndMapIndexedDocument(e){e=(0,Qs.normalizePath)(e);let n=this.plugin.app,r=n.vault.getAbstractFileByPath(e);if(!r)throw new Error(`Invalid file path: "${e}"`);if(!(r instanceof Qs.TFile))throw new Error(`Not a TFile: "${e}"`);let s=null,i=this.plugin.getTextExtractor(),a=this.plugin.getAIImageAnalyzer();if(this.plugin.notesIndexer.isFilePlaintext(e))s=await n.vault.cachedRead(r);else if(ln(e)){let d=await n.vault.cachedRead(r),h=d?JSON.parse(d):{},f=[];for(let p of h.nodes??[])p.type==="text"?f.push(p.text):p.type==="file"&&f.push(p.file);for(let p of(h.edges??[]).filter(E=>!!E.label))f.push(p.label);s=f.join(`\r `)}else if(ui(e))try{let d=JSON.parse(await n.vault.cachedRead(r)),h=[],f=p=>{for(let E in p)typeof p[E]=="object"?f(p[E]):E==="content"&&h.push(p[E])};f(d),s=h.join(`\r `)}catch(d){console.error("Omnisearch: Error while parsing Dataloom file",e),console.error(d)}else tn(e)&&(this.plugin.settings.imagesIndexing&&i?.canFileBeExtracted(e)||this.plugin.settings.aiImageIndexing&&a?.canBeAnalyzed(r))?(this.plugin.settings.imagesIndexing&&i?.canFileBeExtracted(e)&&(s=await i.extractText(r)),this.plugin.settings.aiImageIndexing&&a?.canBeAnalyzed(r)&&(s=await a.analyzeImage(r)+(s??""))):nn(e)&&this.plugin.settings.PDFIndexing&&i?.canFileBeExtracted(e)?s=await i.extractText(r):Lh(e)&&this.plugin.settings.officeIndexing&&i?.canFileBeExtracted(e)?s=await i.extractText(r):this.plugin.notesIndexer.isFilenameIndexable(e)&&(s=r.path);s==null&&(console.warn(`Omnisearch: ${s} content for file`,r.path),s="");let o=n.metadataCache.getFileCache(r);if(o){let d=Uh(this.plugin.app,r,o);for(let h of d.filter(f=>!this.documents.has(f))){let f=this.plugin.notesIndexer.generateIndexableNonexistingDocument(h,r.path)}if(o.frontmatter?.["excalidraw-plugin"]){let h=o.sections?.filter(f=>f.type==="comment")??[];for(let{start:f,end:p}of h.map(E=>E.position))s=s.substring(0,f.offset-1)+s.substring(p.offset)}}let c=o?.frontmatter?.[this.plugin.settings.displayTitle]??"",l=Rh(o);return{basename:r.basename,displayTitle:c,content:s,cleanedContent:Oh(cn(s)),path:r.path,mtime:r.stat.mtime,tags:l,unmarkedTags:l.map(d=>d.replace("#","")),aliases:kh(o).join(""),headings1:o?Ba(o,1).join(" "):"",headings2:o?Ba(o,2).join(" "):"",headings3:o?Ba(o,3).join(" "):""}}countError(){++this.errorsCount>5&&!this.errorsWarned&&(this.errorsWarned=!0,new Qs.Notice("Omnisearch \u26A0\uFE0F There might be an issue with your cache. You should clean it in Omnisearch settings and restart Obsidian."))}};ut();li();ut();var nh=class{constructor(e){this.plugin=e;this.notesToReindex=new Set}flagNoteForReindex(e){this.notesToReindex.add(e)}async refreshIndex(){for(let n of this.notesToReindex)le("Updating file",n.path),await this.plugin.documentsRepository.addDocument(n.path);let e=[...this.notesToReindex].map(n=>n.path);e.length&&(this.plugin.searchEngine.removeFromPaths(e),await this.plugin.searchEngine.addFromPaths(e),this.notesToReindex.clear())}isFileIndexable(e){return this.isFilenameIndexable(e)||this.isContentIndexable(e)}isContentIndexable(e){let n=this.plugin.settings,r=!!this.plugin.getTextExtractor(),s=!!this.plugin.getAIImageAnalyzer(),i=r&&n.PDFIndexing,a=r&&n.imagesIndexing,o=s&&n.aiImageIndexing;return this.isFilePlaintext(e)||ln(e)||ui(e)||i&&nn(e)||a&&tn(e)||o&&tn(e)}isFilenameIndexable(e){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(e)||ln(e)||ui(e)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(e,n){return e=Sc(e),{path:e+(e.endsWith(".md")?"":".md"),basename:e,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:n}}isFilePlaintext(e){return[...this.plugin.settings.indexedFileTypes,"md"].some(n=>e.endsWith(`.${n}`))}};al();var ec=be(require("obsidian"));ut();var rh=class{constructor(e){this.plugin=e;this.embeds=new Map}addEmbed(e,n){this.embeds.has(e)||this.embeds.set(e,new Set),this.embeds.get(e).add(n)}removeFile(e){this.embeds.delete(e),this.refreshEmbedsForNote(e)}renameFile(e,n){this.embeds.has(e)&&(this.embeds.set(n,this.embeds.get(e)),this.embeds.delete(e)),this.embeds.forEach((r,s)=>{r.has(e)&&(r.delete(e),r.add(n))})}refreshEmbedsForNote(e){this.embeds.forEach((n,r)=>{n.has(e)&&n.delete(e)}),this.addEmbedsForNote(e)}getEmbeds(e){return this.embeds.has(e)?[...this.embeds.get(e)]:[]}async writeToCache(){le("Writing embeds to cache");let e=this.plugin.database,n=[];for(let[r,s]of this.embeds)n.push({embedded:r,referencedBy:[...s]});await e.embeds.clear(),await e.embeds.bulkAdd(n)}async loadFromCache(){try{let e=this.plugin.database;if(!e.embeds){le("No embeds in cache");return}le("Loading embeds from cache");let n=await e.embeds.toArray();for(let{embedded:r,referencedBy:s}of n)for(let i of s)this.addEmbed(r,i)}catch{this.plugin.database.clearCache(),console.error("Omnisearch - Error while loading embeds cache"),new ec.Notice("Omnisearch - There was an error while loading the cache. Please restart Obsidian.")}}addEmbedsForNote(e){let n=(this.plugin.app.metadataCache.getCache(e)?.embeds??[]).map(r=>this.plugin.app.metadataCache.getFirstLinkpathDest((0,ec.getLinkpath)(r.link),e)).filter(r=>!!r);for(let r of n)this.addEmbed(r.path,e)}};var sh=class{constructor(e){this.plugin=e;this.nextQueryIsEmpty=!1}async addToHistory(e){if(!e){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let n=this.plugin.database,r=await n.searchHistory.toArray();r=r.filter(s=>s.query!==e).reverse(),r.unshift({query:e}),r=r.slice(0,10),await n.searchHistory.clear(),await n.searchHistory.bulkAdd(r)}async getHistory(){let e=(await this.plugin.database.searchHistory.toArray()).reverse().map(n=>n.query);return this.nextQueryIsEmpty&&e.unshift(""),e}};var ih=class extends On.Plugin{constructor(e,n){super(e,n);this.apiHttpServer=null;this.settings=xo(this.app);this.embedsRepository=new rh(this);this.database=new Zo(this);this.notesIndexer=new nh(this);this.textProcessor=new sl(this);this.searchEngine=new eh(this);this.searchHistory=new sh(this);this.documentsRepository=new th(this)}async onload(){if(this.settings=await zg(this),this.addSettingTab(new el(this)),On.Platform.isMobile||Promise.resolve().then(()=>(px(),hx)).then(r=>this.apiHttpServer=r.getServer(this)),tl(this.app)){console.debug("Plugin disabled");return}await BO(this.app),await this.database.clearOldDatabases(),Pb(this);let e=this.settings;e.ribbonIcon&&this.addRibbonButton(),ae.disable("vault"),ae.disable("infile"),ae.on("global",Fa.ToggleExcerpts,()=>{Er.set(!e.showExcerpt)}),this.addCommand({id:"show-modal",name:"Vault search",callback:()=>{new $n(this).open()}}),this.addCommand({id:"show-modal-infile",name:"In-file search",editorCallback:(r,s)=>{s.file&&new hs(this,s.file).open()}});let n=this.searchEngine;this.app.workspace.onLayoutReady(async()=>{this.registerEvent(this.app.vault.on("create",r=>{r instanceof On.TFile&&this.notesIndexer.isFileIndexable(r.path)&&(le("Indexing new file",r.path),n.addFromPaths([r.path]),this.embedsRepository.refreshEmbedsForNote(r.path))})),this.registerEvent(this.app.vault.on("delete",r=>{le("Removing file",r.path),this.documentsRepository.removeDocument(r.path),n.removeFromPaths([r.path]),this.embedsRepository.removeFile(r.path)})),this.registerEvent(this.app.vault.on("modify",async r=>{this.notesIndexer.isFileIndexable(r.path)&&this.notesIndexer.flagNoteForReindex(r),this.embedsRepository.refreshEmbedsForNote(r.path)})),this.registerEvent(this.app.vault.on("rename",async(r,s)=>{this.notesIndexer.isFileIndexable(r.path)&&(le("Renaming file",r.path),this.documentsRepository.removeDocument(s),await this.documentsRepository.addDocument(r.path),n.removeFromPaths([s]),await n.addFromPaths([r.path]),this.embedsRepository.renameFile(s,r.path))})),this.refreshIndexCallback=this.notesIndexer.refreshIndex.bind(this.notesIndexer),addEventListener("blur",this.refreshIndexCallback),removeEventListener,await this.executeFirstLaunchTasks(),await this.populateIndex(),this.apiHttpServer&&e.httpApiEnabled&&this.apiHttpServer.listen(e.httpApiPort)})}async executeFirstLaunchTasks(){let e="1.21.0";this.settings.welcomeMessage=e,await this.saveData(this.settings)}async onunload(){delete globalThis.omnisearch,this.refreshIndexCallback&&removeEventListener("blur",this.refreshIndexCallback),await this.database.clearCache(),this.apiHttpServer.close()}addRibbonButton(){this.ribbonButton=this.addRibbonIcon("search","Omnisearch",e=>{new $n(this).open()})}removeRibbonButton(){this.ribbonButton&&this.ribbonButton.parentNode?.removeChild(this.ribbonButton)}getChsSegmenter(){return this.app.plugins.plugins["cm-chs-patch"]}getTextExtractor(){return this.app.plugins?.plugins?.["text-extractor"]?.api}getAIImageAnalyzer(){return this.app.plugins?.plugins?.["ai-image-analyzer"]?.api}async populateIndex(){console.time("Indexing total time"),Mn.set(Nt.ReadingFiles);let e=this.app.vault.getFiles().filter(s=>this.notesIndexer.isFileIndexable(s.path));console.debug(`${e.length} files total`),console.debug(`Cache is ${Wn()?"enabled":"disabled"}`);let n=this.searchEngine;Wn()&&(console.time("Loading index from cache"),Mn.set(Nt.LoadingCache),await n.loadCache()&&console.timeEnd("Loading index from cache"));let r=n.getDocumentsToReindex(e.map(s=>({path:s.path,mtime:s.stat.mtime})));if(Wn()&&(r.toAdd.length&&console.debug("Total number of files to add/update: "+r.toAdd.length),r.toRemove.length&&console.debug("Total number of files to remove: "+r.toRemove.length)),r.toAdd.length>=1e3&&Wn()&&new On.Notice(`${r.toAdd.length} files need to be indexed. Obsidian may experience stutters and freezes during the process`,1e4),Mn.set(Nt.IndexingFiles),n.removeFromPaths(r.toRemove.map(s=>s.path)),await n.addFromPaths(r.toAdd.map(s=>s.path)),(r.toRemove.length||r.toAdd.length)&&Wn()){Mn.set(Nt.WritingCache);let s=this.settings.useCache;s&&!this.settings.DANGER_forceSaveCache&&(this.settings.useCache=!1,await ue(this)),await this.database.writeMinisearchCache(),await this.embedsRepository.writeToCache(),s&&(this.settings.useCache=!0,await ue(this))}console.timeEnd("Indexing total time"),r.toAdd.length>=1e3&&Wn()&&new On.Notice("Your files have been indexed."),Mn.set(Nt.Done),Rb()}};async function BO(t){let e=[`${t.vault.configDir}/plugins/omnisearch/searchIndex.json`,`${t.vault.configDir}/plugins/omnisearch/notesCache.json`,`${t.vault.configDir}/plugins/omnisearch/notesCache.data`,`${t.vault.configDir}/plugins/omnisearch/searchIndex.data`,`${t.vault.configDir}/plugins/omnisearch/historyCache.json`,`${t.vault.configDir}/plugins/omnisearch/pdfCache.data`];for(let n of e)if(await t.vault.adapter.exists(n))try{await t.vault.adapter.remove(n)}catch{}} /* nosourcemap */