/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD see https://github.com/BambusControl/obsidian-unicode-search for the source */
"use strict";var Nt=Object.create;var fe=Object.defineProperty,Rt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptor,Lt=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,at=Object.getPrototypeOf,rt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Kt=Reflect.get;var tt=(t,e,a)=>e in t?fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,F=(t,e)=>{for(var a in e||(e={}))rt.call(e,a)&&tt(t,a,e[a]);if(et)for(var a of et(e))Ht.call(e,a)&&tt(t,a,e[a]);return t},w=(t,e)=>Rt(t,Lt(e));var Gt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qt=(t,e)=>{for(var a in e)fe(t,a,{get:e[a],enumerable:!0})},nt=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of zt(e))!rt.call(t,o)&&o!==a&&fe(t,o,{get:()=>e[o],enumerable:!(i=Ot(e,o))||i.enumerable});return t};var Vt=(t,e,a)=>(a=t!=null?Nt(at(t)):{},nt(e||!t||!t.__esModule?fe(a,"default",{value:t,enumerable:!0}):a,t)),Jt=t=>nt(fe({},"__esModule",{value:!0}),t);var Ee=(t,e,a)=>Kt(at(t),a,e);var c=(t,e,a)=>new Promise((i,o)=>{var d=C=>{try{D(a.next(C))}catch(V){o(V)}},s=C=>{try{D(a.throw(C))}catch(V){o(V)}},D=C=>C.done?i(C.value):Promise.resolve(C.value).then(d,s);D((a=a.apply(t,e)).next())});var it=Gt((Je,We)=>{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof We=="object"&&typeof Je!="undefined"?We.exports=e():t.Papa=e()})(Je,function t(){"use strict";var e=typeof self!="undefined"?self:typeof window!="undefined"?window:e!==void 0?e:{},a=!e.document&&!!e.postMessage,i=e.IS_PAPA_WORKER||!1,o={},d=0,s={parse:function(n,r){var l=(r=r||{}).dynamicTyping||!1;if(b(l)&&(r.dynamicTypingFunction=l,l={}),r.dynamicTyping=l,r.transform=!!b(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var p=function(){if(!s.WORKERS_SUPPORTED)return!1;var g=(L=e.URL||e.webkitURL||null,I=t.toString(),s.BLOB_URL||(s.BLOB_URL=L.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",I,")();"],{type:"text/javascript"})))),v=new e.Worker(g),L,I;return v.onmessage=Bt,v.id=d++,o[v.id]=v}();return p.userStep=r.step,p.userChunk=r.chunk,p.userComplete=r.complete,p.userError=r.error,r.step=b(r.step),r.chunk=b(r.chunk),r.complete=b(r.complete),r.error=b(r.error),delete r.worker,void p.postMessage({input:n,config:r,workerId:p.id})}var m=null;return s.NODE_STREAM_INPUT,typeof n=="string"?(n=function(g){return g.charCodeAt(0)===65279?g.slice(1):g}(n),m=r.download?new V(r):new oe(r)):n.readable===!0&&b(n.read)&&b(n.on)?m=new se(r):(e.File&&n instanceof File||n instanceof Object)&&(m=new ce(r)),m.stream(n)},unparse:function(n,r){var l=!1,p=!0,m=",",g=`\r
`,v='"',L=v+v,I=!1,h=null,M=!1;(function(){if(typeof r=="object"){if(typeof r.delimiter!="string"||s.BAD_DELIMITERS.filter(function(u){return r.delimiter.indexOf(u)!==-1}).length||(m=r.delimiter),(typeof r.quotes=="boolean"||typeof r.quotes=="function"||Array.isArray(r.quotes))&&(l=r.quotes),typeof r.skipEmptyLines!="boolean"&&typeof r.skipEmptyLines!="string"||(I=r.skipEmptyLines),typeof r.newline=="string"&&(g=r.newline),typeof r.quoteChar=="string"&&(v=r.quoteChar),typeof r.header=="boolean"&&(p=r.header),Array.isArray(r.columns)){if(r.columns.length===0)throw new Error("Option columns is empty");h=r.columns}r.escapeChar!==void 0&&(L=r.escapeChar+v),(typeof r.escapeFormulae=="boolean"||r.escapeFormulae instanceof RegExp)&&(M=r.escapeFormulae instanceof RegExp?r.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var f=new RegExp(xe(v),"g");if(typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(n)){if(!n.length||Array.isArray(n[0]))return Q(null,n,I);if(typeof n[0]=="object")return Q(h||Object.keys(n[0]),n,I)}else if(typeof n=="object")return typeof n.data=="string"&&(n.data=JSON.parse(n.data)),Array.isArray(n.data)&&(n.fields||(n.fields=n.meta&&n.meta.fields||h),n.fields||(n.fields=Array.isArray(n.data[0])?n.fields:typeof n.data[0]=="object"?Object.keys(n.data[0]):[]),Array.isArray(n.data[0])||typeof n.data[0]=="object"||(n.data=[n.data])),Q(n.fields||[],n.data||[],I);throw new Error("Unable to serialize unrecognized input");function Q(u,U,K){var k="";typeof u=="string"&&(u=JSON.parse(u)),typeof U=="string"&&(U=JSON.parse(U));var z=Array.isArray(u)&&0<u.length,R=!Array.isArray(U[0]);if(z&&p){for(var O=0;O<u.length;O++)0<O&&(k+=m),k+=H(u[O],O);0<U.length&&(k+=g)}for(var x=0;x<U.length;x++){var y=z?u.length:U[x].length,P=!1,N=z?Object.keys(U[x]).length===0:U[x].length===0;if(K&&!z&&(P=K==="greedy"?U[x].join("").trim()==="":U[x].length===1&&U[x][0].length===0),K==="greedy"&&z){for(var E=[],G=0;G<y;G++){var T=R?u[G]:G;E.push(U[x][T])}P=E.join("").trim()===""}if(!P){for(var A=0;A<y;A++){0<A&&!N&&(k+=m);var Z=z&&R?u[A]:A;k+=H(U[x][Z],A)}x<U.length-1&&(!K||0<y&&!N)&&(k+=g)}}return k}function H(u,U){if(u==null)return"";if(u.constructor===Date)return JSON.stringify(u).slice(1,25);var K=!1;M&&typeof u=="string"&&M.test(u)&&(u="'"+u,K=!0);var k=u.toString().replace(f,L);return(K=K||l===!0||typeof l=="function"&&l(u,U)||Array.isArray(l)&&l[U]||function(z,R){for(var O=0;O<R.length;O++)if(-1<z.indexOf(R[O]))return!0;return!1}(k,s.BAD_DELIMITERS)||-1<k.indexOf(m)||k.charAt(0)===" "||k.charAt(k.length-1)===" ")?v+k+v:k}}};if(s.RECORD_SEP="",s.UNIT_SEP="",s.BYTE_ORDER_MARK="\uFEFF",s.BAD_DELIMITERS=["\r",`
`,'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!a&&!!e.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=Ge,s.ParserHandle=Se,s.NetworkStreamer=V,s.FileStreamer=ce,s.StringStreamer=oe,s.ReadableStreamStreamer=se,e.jQuery){var D=e.jQuery;D.fn.parse=function(n){var r=n.config||{},l=[];return this.each(function(g){if(!(D(this).prop("tagName").toUpperCase()==="INPUT"&&D(this).attr("type").toLowerCase()==="file"&&e.FileReader)||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)l.push({file:this.files[v],inputElem:this,instanceConfig:D.extend({},r)})}),p(),this;function p(){if(l.length!==0){var g,v,L,I,h=l[0];if(b(n.before)){var M=n.before(h.file,h.inputElem);if(typeof M=="object"){if(M.action==="abort")return g="AbortError",v=h.file,L=h.inputElem,I=M.reason,void(b(n.error)&&n.error({name:g},v,L,I));if(M.action==="skip")return void m();typeof M.config=="object"&&(h.instanceConfig=D.extend(h.instanceConfig,M.config))}else if(M==="skip")return void m()}var f=h.instanceConfig.complete;h.instanceConfig.complete=function(Q){b(f)&&f(Q,h.file,h.inputElem),m()},s.parse(h.file,h.instanceConfig)}else b(n.complete)&&n.complete()}function m(){l.splice(0,1),p()}}}function C(n){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(r){var l=qe(r);l.chunkSize=parseInt(l.chunkSize),r.step||r.chunk||(l.chunkSize=null),this._handle=new Se(l),(this._handle.streamer=this)._config=l}.call(this,n),this.parseChunk=function(r,l){if(this.isFirstChunk&&b(this._config.beforeFirstChunk)){var p=this._config.beforeFirstChunk(r);p!==void 0&&(r=p)}this.isFirstChunk=!1,this._halted=!1;var m=this._partialLine+r;this._partialLine="";var g=this._handle.parse(m,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var v=g.meta.cursor;this._finished||(this._partialLine=m.substring(v-this._baseIndex),this._baseIndex=v),g&&g.data&&(this._rowCount+=g.data.length);var L=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)e.postMessage({results:g,workerId:s.WORKER_ID,finished:L});else if(b(this._config.chunk)&&!l){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);g=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!L||!b(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),L||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(r){b(this._config.error)?this._config.error(r):i&&this._config.error&&e.postMessage({workerId:s.WORKER_ID,error:r,finished:!1})}}function V(n){var r;(n=n||{}).chunkSize||(n.chunkSize=s.RemoteChunkSize),C.call(this,n),this._nextChunk=a?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(l){this._input=l,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),a||(r.onload=ae(this._chunkLoaded,this),r.onerror=ae(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!a),this._config.downloadRequestHeaders){var l=this._config.downloadRequestHeaders;for(var p in l)r.setRequestHeader(p,l[p])}if(this._config.chunkSize){var m=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+m)}try{r.send(this._config.downloadRequestBody)}catch(g){this._chunkError(g.message)}a&&r.status===0&&this._chunkError()}},this._chunkLoaded=function(){r.readyState===4&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(l){var p=l.getResponseHeader("Content-Range");return p===null?-1:parseInt(p.substring(p.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)))},this._chunkError=function(l){var p=r.statusText||l;this._sendError(new Error(p))}}function ce(n){var r,l;(n=n||{}).chunkSize||(n.chunkSize=s.LocalChunkSize),C.call(this,n);var p=typeof FileReader!="undefined";this.stream=function(m){this._input=m,l=m.slice||m.webkitSlice||m.mozSlice,p?((r=new FileReader).onload=ae(this._chunkLoaded,this),r.onerror=ae(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input;if(this._config.chunkSize){var g=Math.min(this._start+this._config.chunkSize,this._input.size);m=l.call(m,this._start,g)}var v=r.readAsText(m,this._config.encoding);p||this._chunkLoaded({target:{result:v}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(r.error)}}function oe(n){var r;C.call(this,n=n||{}),this.stream=function(l){return r=l,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var l,p=this._config.chunkSize;return p?(l=r.substring(0,p),r=r.substring(p)):(l=r,r=""),this._finished=!r,this.parseChunk(l)}}}function se(n){C.call(this,n=n||{});var r=[],l=!0,p=!1;this.pause=function(){C.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){C.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){p&&r.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),r.length?this.parseChunk(r.shift()):l=!0},this._streamData=ae(function(m){try{r.push(typeof m=="string"?m:m.toString(this._config.encoding)),l&&(l=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(g){this._streamError(g)}},this),this._streamError=ae(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=ae(function(){this._streamCleanUp(),p=!0,this._streamData("")},this),this._streamCleanUp=ae(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Se(n){var r,l,p,m=Math.pow(2,53),g=-m,v=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,L=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,I=this,h=0,M=0,f=!1,Q=!1,H=[],u={data:[],errors:[],meta:{}};if(b(n.step)){var U=n.step;n.step=function(x){if(u=x,z())k();else{if(k(),u.data.length===0)return;h+=x.data.length,n.preview&&h>n.preview?l.abort():(u.data=u.data[0],U(u,I))}}}function K(x){return n.skipEmptyLines==="greedy"?x.join("").trim()==="":x.length===1&&x[0].length===0}function k(){return u&&p&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),p=!1),n.skipEmptyLines&&(u.data=u.data.filter(function(x){return!K(x)})),z()&&function(){if(!u)return;function x(P,N){b(n.transformHeader)&&(P=n.transformHeader(P,N)),H.push(P)}if(Array.isArray(u.data[0])){for(var y=0;z()&&y<u.data.length;y++)u.data[y].forEach(x);u.data.splice(0,1)}else u.data.forEach(x)}(),function(){if(!u||!n.header&&!n.dynamicTyping&&!n.transform)return u;function x(P,N){var E,G=n.header?{}:[];for(E=0;E<P.length;E++){var T=E,A=P[E];n.header&&(T=E>=H.length?"__parsed_extra":H[E]),n.transform&&(A=n.transform(A,T)),A=R(T,A),T==="__parsed_extra"?(G[T]=G[T]||[],G[T].push(A)):G[T]=A}return n.header&&(E>H.length?O("FieldMismatch","TooManyFields","Too many fields: expected "+H.length+" fields but parsed "+E,M+N):E<H.length&&O("FieldMismatch","TooFewFields","Too few fields: expected "+H.length+" fields but parsed "+E,M+N)),G}var y=1;return!u.data.length||Array.isArray(u.data[0])?(u.data=u.data.map(x),y=u.data.length):u.data=x(u.data,0),n.header&&u.meta&&(u.meta.fields=H),M+=y,u}()}function z(){return n.header&&H.length===0}function R(x,y){return P=x,n.dynamicTypingFunction&&n.dynamicTyping[P]===void 0&&(n.dynamicTyping[P]=n.dynamicTypingFunction(P)),(n.dynamicTyping[P]||n.dynamicTyping)===!0?y==="true"||y==="TRUE"||y!=="false"&&y!=="FALSE"&&(function(N){if(v.test(N)){var E=parseFloat(N);if(g<E&&E<m)return!0}return!1}(y)?parseFloat(y):L.test(y)?new Date(y):y===""?null:y):y;var P}function O(x,y,P,N){var E={type:x,code:y,message:P};N!==void 0&&(E.row=N),u.errors.push(E)}this.parse=function(x,y,P){var N=n.quoteChar||'"';if(n.newline||(n.newline=function(T,A){T=T.substring(0,1048576);var Z=new RegExp(xe(A)+"([^]*?)"+xe(A),"gm"),J=(T=T.replace(Z,"")).split("\r"),Y=T.split(`
`),ee=1<Y.length&&Y[0].length<J[0].length;if(J.length===1||ee)return`
`;for(var W=0,_=0;_<J.length;_++)J[_][0]===`
`&&W++;return W>=J.length/2?`\r
`:"\r"}(x,N)),p=!1,n.delimiter)b(n.delimiter)&&(n.delimiter=n.delimiter(x),u.meta.delimiter=n.delimiter);else{var E=function(T,A,Z,J,Y){var ee,W,_,B;Y=Y||[",","	","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var le=0;le<Y.length;le++){var S=Y[le],pe=0,te=0,de=0;_=void 0;for(var re=new Ge({comments:J,delimiter:S,newline:A,preview:10}).parse(T),ne=0;ne<re.data.length;ne++)if(Z&&K(re.data[ne]))de++;else{var ie=re.data[ne].length;te+=ie,_!==void 0?0<ie&&(pe+=Math.abs(ie-_),_=ie):_=ie}0<re.data.length&&(te/=re.data.length-de),(W===void 0||pe<=W)&&(B===void 0||B<te)&&1.99<te&&(W=pe,ee=S,B=te)}return{successful:!!(n.delimiter=ee),bestDelimiter:ee}}(x,n.newline,n.skipEmptyLines,n.comments,n.delimitersToGuess);E.successful?n.delimiter=E.bestDelimiter:(p=!0,n.delimiter=s.DefaultDelimiter),u.meta.delimiter=n.delimiter}var G=qe(n);return n.preview&&n.header&&G.preview++,r=x,l=new Ge(G),u=l.parse(r,y,P),k(),f?{meta:{paused:!0}}:u||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,l.abort(),r=b(n.chunk)?"":r.substring(l.getCharIndex())},this.resume=function(){I.streamer._halted?(f=!1,I.streamer.parseChunk(r,!0)):setTimeout(I.resume,3)},this.aborted=function(){return Q},this.abort=function(){Q=!0,l.abort(),u.meta.aborted=!0,b(n.complete)&&n.complete(u),r=""}}function xe(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge(n){var r,l=(n=n||{}).delimiter,p=n.newline,m=n.comments,g=n.step,v=n.preview,L=n.fastMode,I=r=n.quoteChar===void 0||n.quoteChar===null?'"':n.quoteChar;if(n.escapeChar!==void 0&&(I=n.escapeChar),(typeof l!="string"||-1<s.BAD_DELIMITERS.indexOf(l))&&(l=","),m===l)throw new Error("Comment character same as delimiter");m===!0?m="#":(typeof m!="string"||-1<s.BAD_DELIMITERS.indexOf(m))&&(m=!1),p!==`
`&&p!=="\r"&&p!==`\r
`&&(p=`
`);var h=0,M=!1;this.parse=function(f,Q,H){if(typeof f!="string")throw new Error("Input must be a string");var u=f.length,U=l.length,K=p.length,k=m.length,z=b(g),R=[],O=[],x=[],y=h=0;if(!f)return $();if(n.header&&!Q){var P=f.split(p)[0].split(l),N=[],E={},G=!1;for(var T in P){var A=P[T];b(n.transformHeader)&&(A=n.transformHeader(A,T));var Z=A,J=E[A]||0;for(0<J&&(G=!0,Z=A+"_"+J),E[A]=J+1;N.includes(Z);)Z=Z+"_"+J;N.push(Z)}if(G){var Y=f.split(p);Y[0]=N.join(l),f=Y.join(p)}}if(L||L!==!1&&f.indexOf(r)===-1){for(var ee=f.split(p),W=0;W<ee.length;W++){if(x=ee[W],h+=x.length,W!==ee.length-1)h+=p.length;else if(H)return $();if(!m||x.substring(0,k)!==m){if(z){if(R=[],de(x.split(l)),be(),M)return $()}else de(x.split(l));if(v&&v<=W)return R=R.slice(0,v),$(!0)}}return $()}for(var _=f.indexOf(l,h),B=f.indexOf(p,h),le=new RegExp(xe(I)+xe(r),"g"),S=f.indexOf(r,h);;)if(f[h]!==r)if(m&&x.length===0&&f.substring(h,h+k)===m){if(B===-1)return $();h=B+K,B=f.indexOf(p,h),_=f.indexOf(l,h)}else if(_!==-1&&(_<B||B===-1))x.push(f.substring(h,_)),h=_+U,_=f.indexOf(l,h);else{if(B===-1)break;if(x.push(f.substring(h,B)),ie(B+K),z&&(be(),M))return $();if(v&&R.length>=v)return $(!0)}else for(S=h,h++;;){if((S=f.indexOf(r,S+1))===-1)return H||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:R.length,index:h}),ne();if(S===u-1)return ne(f.substring(h,S).replace(le,r));if(r!==I||f[S+1]!==I){if(r===I||S===0||f[S-1]!==I){_!==-1&&_<S+1&&(_=f.indexOf(l,S+1)),B!==-1&&B<S+1&&(B=f.indexOf(p,S+1));var pe=re(B===-1?_:Math.min(_,B));if(f.substr(S+1+pe,U)===l){x.push(f.substring(h,S).replace(le,r)),f[h=S+1+pe+U]!==r&&(S=f.indexOf(r,h)),_=f.indexOf(l,h),B=f.indexOf(p,h);break}var te=re(B);if(f.substring(S+1+te,S+1+te+K)===p){if(x.push(f.substring(h,S).replace(le,r)),ie(S+1+te+K),_=f.indexOf(l,h),S=f.indexOf(r,h),z&&(be(),M))return $();if(v&&R.length>=v)return $(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:R.length,index:h}),S++}}else S++}return ne();function de(j){R.push(j),y=h}function re(j){var Xe=0;if(j!==-1){var Ve=f.substring(S+1,j);Ve&&Ve.trim()===""&&(Xe=Ve.length)}return Xe}function ne(j){return H||(j===void 0&&(j=f.substring(h)),x.push(j),h=u,de(x),z&&be()),$()}function ie(j){h=j,de(x),x=[],B=f.indexOf(p,h)}function $(j){return{data:R,errors:O,meta:{delimiter:l,linebreak:p,aborted:M,truncated:!!j,cursor:y+(Q||0)}}}function be(){g($()),R=[],O=[]}},this.abort=function(){M=!0},this.getCharIndex=function(){return h}}function Bt(n){var r=n.data,l=o[r.workerId],p=!1;if(r.error)l.userError(r.error,r.file);else if(r.results&&r.results.data){var m={abort:function(){p=!0,Ze(r.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Ye,resume:Ye};if(b(l.userStep)){for(var g=0;g<r.results.data.length&&(l.userStep({data:r.results.data[g],errors:r.results.errors,meta:r.results.meta},m),!p);g++);delete r.results}else b(l.userChunk)&&(l.userChunk(r.results,m,r.file),delete r.results)}r.finished&&!p&&Ze(r.workerId,r.results)}function Ze(n,r){var l=o[n];b(l.userComplete)&&l.userComplete(r),l.terminate(),delete o[n]}function Ye(){throw new Error("Not implemented.")}function qe(n){if(typeof n!="object"||n===null)return n;var r=Array.isArray(n)?[]:{};for(var l in n)r[l]=qe(n[l]);return r}function ae(n,r){return function(){n.apply(r,arguments)}}function b(n){return typeof n=="function"}return i&&(e.onmessage=function(n){var r=n.data;if(s.WORKER_ID===void 0&&r&&(s.WORKER_ID=r.workerId),typeof r.input=="string")e.postMessage({workerId:s.WORKER_ID,results:s.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var l=s.parse(r.input,r.config);l&&e.postMessage({workerId:s.WORKER_ID,results:l,finished:!0})}}),(V.prototype=Object.create(C.prototype)).constructor=V,(ce.prototype=Object.create(C.prototype)).constructor=ce,(oe.prototype=Object.create(oe.prototype)).constructor=oe,(se.prototype=Object.create(C.prototype)).constructor=se,s})});var sa={};qt(sa,{default:()=>Ke});module.exports=Jt(sa);var Tt=require("obsidian");var lt=require("obsidian"),dt=Vt(it());var q=class extends Error{constructor(e){super(e)}};function ot(t){let e=Array.from(t);e.sort((i,o)=>i.start-o.start);let a=0;for(let i=1;i<e.length;i++){let o=e[a],d=e[i];o.end>=d.start?o.end=Math.max(o.end,d.end):(a++,e[a]=d)}return e.slice(0,a+1)}function st(t,e){return t>=e.start&&t<=e.end}var De=class{constructor(e){this.settingsStore=e;this.config={delimiter:";",header:!1,transformHeader:void 0,dynamicTyping:!1,fastMode:!0}}download(){return c(this,null,function*(){let a=yield(0,lt.request)("https://www.unicode.org/Public/14.0.0/ucd/UnicodeData.txt"),i=yield this.transformToCharacters(a);return(yield this.filterCharacters(i)).map(Qt)})}filterCharacters(e){return c(this,null,function*(){let a=yield this.settingsStore.getFilter(),i=ot(a.planes.flatMap(d=>d.blocks).filter(d=>d.included)),o=a.categoryGroups.flatMap(d=>d.categories).filter(d=>d.included).map(d=>d.abbreviation);return e.filter(d=>!Wt(d)&&$t(d,i)&&jt(d,o))})}transformToCharacters(e){return new Promise((a,i)=>{let o=s=>{s.errors.length!==0&&i(new q("Error while parsing data from Unicode Character Database"));let D=s.data.map(C=>({codepoint:parseInt(C[0],16),name:C[1],category:C[2]}));a(D)},d=w(F({},this.config),{worker:!0,complete:s=>o(s)});(0,dt.parse)(e,d)})}};function Wt(t){return t==null||t.name==null||t.codepoint==null||t.category==null}function $t(t,e){return e.some(a=>st(t.codepoint,a))}function jt(t,e){return e.some(a=>t.category===a)}function Qt(t){return{codepoint:String.fromCodePoint(t.codepoint),name:t.name.toLowerCase(),category:t.category}}var Ae=class{constructor(e,a,i){this.getCallback=e;this.persistCallback=a;this.value=i}get(){return c(this,null,function*(){return this.value==null&&(this.value=yield this.getCallback()),this.value})}set(e){this.value=e}persist(){return c(this,null,function*(){if(this.value==null)throw new q("Refuse to persist a null value");return yield this.persistCallback(this.value),this.value})}};var ue="0.6.0";var Zt={planeNumber:0,description:"Basic Multilingual Plane",abbreviation:"BMP",interval:{start:0,end:65535},blocks:[{interval:{start:0,end:127},description:"Basic Latin",plane:0},{interval:{start:128,end:255},description:"Latin-1 Supplement",plane:0},{interval:{start:256,end:383},description:"Latin Extended-A",plane:0},{interval:{start:384,end:591},description:"Latin Extended-B",plane:0},{interval:{start:592,end:687},description:"IPA Extensions",plane:0},{interval:{start:688,end:767},description:"Spacing Modifier Letters",plane:0},{interval:{start:768,end:879},description:"Combining Diacritical Marks",plane:0},{interval:{start:880,end:1023},description:"Greek and Coptic",plane:0},{interval:{start:1024,end:1279},description:"Cyrillic",plane:0},{interval:{start:1280,end:1327},description:"Cyrillic Supplement",plane:0},{interval:{start:1328,end:1423},description:"Armenian",plane:0},{interval:{start:1424,end:1535},description:"Hebrew",plane:0},{interval:{start:1536,end:1791},description:"Arabic",plane:0},{interval:{start:1792,end:1871},description:"Syriac",plane:0},{interval:{start:1872,end:1919},description:"Arabic Supplement",plane:0},{interval:{start:1920,end:1983},description:"Thaana",plane:0},{interval:{start:1984,end:2047},description:"NKo",plane:0},{interval:{start:2048,end:2111},description:"Samaritan",plane:0},{interval:{start:2112,end:2143},description:"Mandaic",plane:0},{interval:{start:2144,end:2159},description:"Syriac Supplement",plane:0},{interval:{start:2160,end:2207},description:"Arabic Extended-B",plane:0},{interval:{start:2208,end:2303},description:"Arabic Extended-A",plane:0},{interval:{start:2304,end:2431},description:"Devanagari",plane:0},{interval:{start:2432,end:2559},description:"Bengali",plane:0},{interval:{start:2560,end:2687},description:"Gurmukhi",plane:0},{interval:{start:2688,end:2815},description:"Gujarati",plane:0},{interval:{start:2816,end:2943},description:"Oriya",plane:0},{interval:{start:2944,end:3071},description:"Tamil",plane:0},{interval:{start:3072,end:3199},description:"Telugu",plane:0},{interval:{start:3200,end:3327},description:"Kannada",plane:0},{interval:{start:3328,end:3455},description:"Malayalam",plane:0},{interval:{start:3456,end:3583},description:"Sinhala",plane:0},{interval:{start:3584,end:3711},description:"Thai",plane:0},{interval:{start:3712,end:3839},description:"Lao",plane:0},{interval:{start:3840,end:4095},description:"Tibetan",plane:0},{interval:{start:4096,end:4255},description:"Myanmar",plane:0},{interval:{start:4256,end:4351},description:"Georgian",plane:0},{interval:{start:4352,end:4607},description:"Hangul Jamo",plane:0},{interval:{start:4608,end:4991},description:"Ethiopic",plane:0},{interval:{start:4992,end:5023},description:"Ethiopic Supplement",plane:0},{interval:{start:5024,end:5119},description:"Cherokee",plane:0},{interval:{start:5120,end:5759},description:"Unified Canadian Aboriginal Syllabics",plane:0},{interval:{start:5760,end:5791},description:"Ogham",plane:0},{interval:{start:5792,end:5887},description:"Runic",plane:0},{interval:{start:5888,end:5919},description:"Tagalog",plane:0},{interval:{start:5920,end:5951},description:"Hanunoo",plane:0},{interval:{start:5952,end:5983},description:"Buhid",plane:0},{interval:{start:5984,end:6015},description:"Tagbanwa",plane:0},{interval:{start:6016,end:6143},description:"Khmer",plane:0},{interval:{start:6144,end:6319},description:"Mongolian",plane:0},{interval:{start:6320,end:6399},description:"Unified Canadian Aboriginal Syllabics Extended",plane:0},{interval:{start:6400,end:6479},description:"Limbu",plane:0},{interval:{start:6480,end:6527},description:"Tai Le",plane:0},{interval:{start:6528,end:6623},description:"New Tai Lue",plane:0},{interval:{start:6624,end:6655},description:"Khmer Symbols",plane:0},{interval:{start:6656,end:6687},description:"Buginese",plane:0},{interval:{start:6688,end:6831},description:"Tai Tham",plane:0},{interval:{start:6832,end:6911},description:"Combining Diacritical Marks Extended",plane:0},{interval:{start:6912,end:7039},description:"Balinese",plane:0},{interval:{start:7040,end:7103},description:"Sundanese",plane:0},{interval:{start:7104,end:7167},description:"Batak",plane:0},{interval:{start:7168,end:7247},description:"Lepcha",plane:0},{interval:{start:7248,end:7295},description:"Ol Chiki",plane:0},{interval:{start:7296,end:7311},description:"Cyrillic Extended-C",plane:0},{interval:{start:7312,end:7359},description:"Georgian Extended",plane:0},{interval:{start:7360,end:7375},description:"Sundanese Supplement",plane:0},{interval:{start:7376,end:7423},description:"Vedic Extensions",plane:0},{interval:{start:7424,end:7551},description:"Phonetic Extensions",plane:0},{interval:{start:7552,end:7615},description:"Phonetic Extensions Supplement",plane:0},{interval:{start:7616,end:7679},description:"Combining Diacritical Marks Supplement",plane:0},{interval:{start:7680,end:7935},description:"Latin Extended Additional",plane:0},{interval:{start:7936,end:8191},description:"Greek Extended",plane:0},{interval:{start:8192,end:8303},description:"General Punctuation",plane:0},{interval:{start:8304,end:8351},description:"Superscripts and Subscripts",plane:0},{interval:{start:8352,end:8399},description:"Currency Symbols",plane:0},{interval:{start:8400,end:8447},description:"Combining Diacritical Marks for Symbols",plane:0},{interval:{start:8448,end:8527},description:"Letterlike Symbols",plane:0},{interval:{start:8528,end:8591},description:"Number Forms",plane:0},{interval:{start:8592,end:8703},description:"Arrows",plane:0},{interval:{start:8704,end:8959},description:"Mathematical Operators",plane:0},{interval:{start:8960,end:9215},description:"Miscellaneous Technical",plane:0},{interval:{start:9216,end:9279},description:"Control Pictures",plane:0},{interval:{start:9280,end:9311},description:"Optical Character Recognition",plane:0},{interval:{start:9312,end:9471},description:"Enclosed Alphanumerics",plane:0},{interval:{start:9472,end:9599},description:"Box Drawing",plane:0},{interval:{start:9600,end:9631},description:"Block Elements",plane:0},{interval:{start:9632,end:9727},description:"Geometric Shapes",plane:0},{interval:{start:9728,end:9983},description:"Miscellaneous Symbols",plane:0},{interval:{start:9984,end:10175},description:"Dingbats",plane:0},{interval:{start:10176,end:10223},description:"Miscellaneous Mathematical Symbols-A",plane:0},{interval:{start:10224,end:10239},description:"Supplemental Arrows-A",plane:0},{interval:{start:10240,end:10495},description:"Braille Patterns",plane:0},{interval:{start:10496,end:10623},description:"Supplemental Arrows-B",plane:0},{interval:{start:10624,end:10751},description:"Miscellaneous Mathematical Symbols-B",plane:0},{interval:{start:10752,end:11007},description:"Supplemental Mathematical Operators",plane:0},{interval:{start:11008,end:11263},description:"Miscellaneous Symbols and Arrows",plane:0},{interval:{start:11264,end:11359},description:"Glagolitic",plane:0},{interval:{start:11360,end:11391},description:"Latin Extended-C",plane:0},{interval:{start:11392,end:11519},description:"Coptic",plane:0},{interval:{start:11520,end:11567},description:"Georgian Supplement",plane:0},{interval:{start:11568,end:11647},description:"Tifinagh",plane:0},{interval:{start:11648,end:11743},description:"Ethiopic Extended",plane:0},{interval:{start:11744,end:11775},description:"Cyrillic Extended-A",plane:0},{interval:{start:11776,end:11903},description:"Supplemental Punctuation",plane:0},{interval:{start:11904,end:12031},description:"CJK Radicals Supplement",plane:0},{interval:{start:12032,end:12255},description:"Kangxi Radicals",plane:0},{interval:{start:12272,end:12287},description:"Ideographic Description Characters",plane:0},{interval:{start:12288,end:12351},description:"CJK Symbols and Punctuation",plane:0},{interval:{start:12352,end:12447},description:"Hiragana",plane:0},{interval:{start:12448,end:12543},description:"Katakana",plane:0},{interval:{start:12544,end:12591},description:"Bopomofo",plane:0},{interval:{start:12592,end:12687},description:"Hangul Compatibility Jamo",plane:0},{interval:{start:12688,end:12703},description:"Kanbun",plane:0},{interval:{start:12704,end:12735},description:"Bopomofo Extended",plane:0},{interval:{start:12736,end:12783},description:"CJK Strokes",plane:0},{interval:{start:12784,end:12799},description:"Katakana Phonetic Extensions",plane:0},{interval:{start:12800,end:13055},description:"Enclosed CJK Letters and Months",plane:0},{interval:{start:13056,end:13311},description:"CJK Compatibility",plane:0},{interval:{start:13312,end:19903},description:"CJK Unified Ideographs Extension A",plane:0},{interval:{start:19904,end:19967},description:"Yijing Hexagram Symbols",plane:0},{interval:{start:19968,end:40959},description:"CJK Unified Ideographs",plane:0},{interval:{start:40960,end:42127},description:"Yi Syllables",plane:0},{interval:{start:42128,end:42191},description:"Yi Radicals",plane:0},{interval:{start:42192,end:42239},description:"Lisu",plane:0},{interval:{start:42240,end:42559},description:"Vai",plane:0},{interval:{start:42560,end:42655},description:"Cyrillic Extended-B",plane:0},{interval:{start:42656,end:42751},description:"Bamum",plane:0},{interval:{start:42752,end:42783},description:"Modifier Tone Letters",plane:0},{interval:{start:42784,end:43007},description:"Latin Extended-D",plane:0},{interval:{start:43008,end:43055},description:"Syloti Nagri",plane:0},{interval:{start:43056,end:43071},description:"Common Indic Number Forms",plane:0},{interval:{start:43072,end:43135},description:"Phags-pa",plane:0},{interval:{start:43136,end:43231},description:"Saurashtra",plane:0},{interval:{start:43232,end:43263},description:"Devanagari Extended",plane:0},{interval:{start:43264,end:43311},description:"Kayah Li",plane:0},{interval:{start:43312,end:43359},description:"Rejang",plane:0},{interval:{start:43360,end:43391},description:"Hangul Jamo Extended-A",plane:0},{interval:{start:43392,end:43487},description:"Javanese",plane:0},{interval:{start:43488,end:43519},description:"Myanmar Extended-B",plane:0},{interval:{start:43520,end:43615},description:"Cham",plane:0},{interval:{start:43616,end:43647},description:"Myanmar Extended-A",plane:0},{interval:{start:43648,end:43743},description:"Tai Viet",plane:0},{interval:{start:43744,end:43775},description:"Meetei Mayek Extensions",plane:0},{interval:{start:43776,end:43823},description:"Ethiopic Extended-A",plane:0},{interval:{start:43824,end:43887},description:"Latin Extended-E",plane:0},{interval:{start:43888,end:43967},description:"Cherokee Supplement",plane:0},{interval:{start:43968,end:44031},description:"Meetei Mayek",plane:0},{interval:{start:44032,end:55215},description:"Hangul Syllables",plane:0},{interval:{start:55216,end:55295},description:"Hangul Jamo Extended-B",plane:0},{interval:{start:55296,end:56191},description:"High Surrogates",plane:0},{interval:{start:56192,end:56319},description:"High Private Use Surrogates",plane:0},{interval:{start:56320,end:57343},description:"Low Surrogates",plane:0},{interval:{start:57344,end:63743},description:"Private Use Area",plane:0},{interval:{start:63744,end:64255},description:"CJK Compatibility Ideographs",plane:0},{interval:{start:64256,end:64335},description:"Alphabetic Presentation Forms",plane:0},{interval:{start:64336,end:65023},description:"Arabic Presentation Forms-A",plane:0},{interval:{start:65024,end:65039},description:"Variation Selectors",plane:0},{interval:{start:65040,end:65055},description:"Vertical Forms",plane:0},{interval:{start:65056,end:65071},description:"Combining Half Marks",plane:0},{interval:{start:65072,end:65103},description:"CJK Compatibility Forms",plane:0},{interval:{start:65104,end:65135},description:"Small Form Variants",plane:0},{interval:{start:65136,end:65279},description:"Arabic Presentation Forms-B",plane:0},{interval:{start:65280,end:65519},description:"Halfwidth and Fullwidth Forms",plane:0},{interval:{start:65520,end:65535},description:"Specials",plane:0}]},Yt={planeNumber:1,description:"Supplementary Multilingual Plane",abbreviation:"SMP",interval:{start:65536,end:131071},blocks:[{interval:{start:65536,end:65663},description:"Linear B Syllabary",plane:1},{interval:{start:65664,end:65791},description:"Linear B Ideograms",plane:1},{interval:{start:65792,end:65855},description:"Aegean Numbers",plane:1},{interval:{start:65856,end:65935},description:"Ancient Greek Numbers",plane:1},{interval:{start:65936,end:65999},description:"Ancient Symbols",plane:1},{interval:{start:66e3,end:66047},description:"Phaistos Disc",plane:1},{interval:{start:66176,end:66207},description:"Lycian",plane:1},{interval:{start:66208,end:66271},description:"Carian",plane:1},{interval:{start:66272,end:66303},description:"Coptic Epact Numbers",plane:1},{interval:{start:66304,end:66351},description:"Old Italic",plane:1},{interval:{start:66352,end:66383},description:"Gothic",plane:1},{interval:{start:66384,end:66431},description:"Old Permic",plane:1},{interval:{start:66432,end:66463},description:"Ugaritic",plane:1},{interval:{start:66464,end:66527},description:"Old Persian",plane:1},{interval:{start:66560,end:66639},description:"Deseret",plane:1},{interval:{start:66640,end:66687},description:"Shavian",plane:1},{interval:{start:66688,end:66735},description:"Osmanya",plane:1},{interval:{start:66736,end:66815},description:"Osage",plane:1},{interval:{start:66816,end:66863},description:"Elbasan",plane:1},{interval:{start:66864,end:66927},description:"Caucasian Albanian",plane:1},{interval:{start:66928,end:67007},description:"Vithkuqi",plane:1},{interval:{start:67072,end:67455},description:"Linear A",plane:1},{interval:{start:67456,end:67519},description:"Latin Extended-F",plane:1},{interval:{start:67584,end:67647},description:"Cypriot Syllabary",plane:1},{interval:{start:67648,end:67679},description:"Imperial Aramaic",plane:1},{interval:{start:67680,end:67711},description:"Palmyrene",plane:1},{interval:{start:67712,end:67759},description:"Nabataean",plane:1},{interval:{start:67808,end:67839},description:"Hatran",plane:1},{interval:{start:67840,end:67871},description:"Phoenician",plane:1},{interval:{start:67872,end:67903},description:"Lydian",plane:1},{interval:{start:67968,end:67999},description:"Meroitic Hieroglyphs",plane:1},{interval:{start:68e3,end:68095},description:"Meroitic Cursive",plane:1},{interval:{start:68096,end:68191},description:"Kharoshthi",plane:1},{interval:{start:68192,end:68223},description:"Old South Arabian",plane:1},{interval:{start:68224,end:68255},description:"Old North Arabian",plane:1},{interval:{start:68288,end:68351},description:"Manichaean",plane:1},{interval:{start:68352,end:68415},description:"Avestan",plane:1},{interval:{start:68416,end:68447},description:"Inscriptional Parthian",plane:1},{interval:{start:68448,end:68479},description:"Inscriptional Pahlavi",plane:1},{interval:{start:68480,end:68527},description:"Psalter Pahlavi",plane:1},{interval:{start:68608,end:68687},description:"Old Turkic",plane:1},{interval:{start:68736,end:68863},description:"Old Hungarian",plane:1},{interval:{start:68864,end:68927},description:"Hanifi Rohingya",plane:1},{interval:{start:69216,end:69247},description:"Rumi Numeral Symbols",plane:1},{interval:{start:69248,end:69311},description:"Yezidi",plane:1},{interval:{start:69312,end:69375},description:"Arabic Extended-C",plane:1},{interval:{start:69376,end:69423},description:"Old Sogdian",plane:1},{interval:{start:69424,end:69487},description:"Sogdian",plane:1},{interval:{start:69488,end:69551},description:"Old Uyghur",plane:1},{interval:{start:69552,end:69599},description:"Chorasmian",plane:1},{interval:{start:69600,end:69631},description:"Elymaic",plane:1},{interval:{start:69632,end:69759},description:"Brahmi",plane:1},{interval:{start:69760,end:69839},description:"Kaithi",plane:1},{interval:{start:69840,end:69887},description:"Sora Sompeng",plane:1},{interval:{start:69888,end:69967},description:"Chakma",plane:1},{interval:{start:69968,end:70015},description:"Mahajani",plane:1},{interval:{start:70016,end:70111},description:"Sharada",plane:1},{interval:{start:70112,end:70143},description:"Sinhala Archaic Numbers",plane:1},{interval:{start:70144,end:70223},description:"Khojki",plane:1},{interval:{start:70272,end:70319},description:"Multani",plane:1},{interval:{start:70320,end:70399},description:"Khudawadi",plane:1},{interval:{start:70400,end:70527},description:"Grantha",plane:1},{interval:{start:70656,end:70783},description:"Newa",plane:1},{interval:{start:70784,end:70879},description:"Tirhuta",plane:1},{interval:{start:71040,end:71167},description:"Siddham",plane:1},{interval:{start:71168,end:71263},description:"Modi",plane:1},{interval:{start:71264,end:71295},description:"Mongolian Supplement",plane:1},{interval:{start:71296,end:71375},description:"Takri",plane:1},{interval:{start:71424,end:71503},description:"Ahom",plane:1},{interval:{start:71680,end:71759},description:"Dogra",plane:1},{interval:{start:71840,end:71935},description:"Warang Citi",plane:1},{interval:{start:71936,end:72031},description:"Dives Akuru",plane:1},{interval:{start:72096,end:72191},description:"Nandinagari",plane:1},{interval:{start:72192,end:72271},description:"Zanabazar Square",plane:1},{interval:{start:72272,end:72367},description:"Soyombo",plane:1},{interval:{start:72368,end:72383},description:"Unified Canadian Aboriginal Syllabics Extended-A",plane:1},{interval:{start:72384,end:72447},description:"Pau Cin Hau",plane:1},{interval:{start:72448,end:72543},description:"Devanagari Extended-A",plane:1},{interval:{start:72704,end:72815},description:"Bhaiksuki",plane:1},{interval:{start:72816,end:72895},description:"Marchen",plane:1},{interval:{start:72960,end:73055},description:"Masaram Gondi",plane:1},{interval:{start:73056,end:73135},description:"Gunjala Gondi",plane:1},{interval:{start:73440,end:73471},description:"Makasar",plane:1},{interval:{start:73472,end:73567},description:"Kawi",plane:1},{interval:{start:73648,end:73663},description:"Lisu Supplement",plane:1},{interval:{start:73664,end:73727},description:"Tamil Supplement",plane:1},{interval:{start:73728,end:74751},description:"Cuneiform",plane:1},{interval:{start:74752,end:74879},description:"Cuneiform Numbers and Punctuation",plane:1},{interval:{start:74880,end:75087},description:"Early Dynastic Cuneiform",plane:1},{interval:{start:77712,end:77823},description:"Cypro-Minoan",plane:1},{interval:{start:77824,end:78895},description:"Egyptian Hieroglyphs",plane:1},{interval:{start:78896,end:78943},description:"Egyptian Hieroglyph Format Controls",plane:1},{interval:{start:82944,end:83583},description:"Anatolian Hieroglyphs",plane:1},{interval:{start:92160,end:92735},description:"Bamum Supplement",plane:1},{interval:{start:92736,end:92783},description:"Mro",plane:1},{interval:{start:92784,end:92879},description:"Tangsa",plane:1},{interval:{start:92880,end:92927},description:"Bassa Vah",plane:1},{interval:{start:92928,end:93071},description:"Pahawh Hmong",plane:1},{interval:{start:93760,end:93855},description:"Medefaidrin",plane:1},{interval:{start:93952,end:94111},description:"Miao",plane:1},{interval:{start:94176,end:94207},description:"Ideographic Symbols and Punctuation",plane:1},{interval:{start:94208,end:100351},description:"Tangut",plane:1},{interval:{start:100352,end:101119},description:"Tangut Components",plane:1},{interval:{start:101120,end:101631},description:"Khitan Small Script",plane:1},{interval:{start:101632,end:101759},description:"Tangut Supplement",plane:1},{interval:{start:110576,end:110591},description:"Kana Extended-B",plane:1},{interval:{start:110592,end:110847},description:"Kana Supplement",plane:1},{interval:{start:110848,end:110895},description:"Kana Extended-A",plane:1},{interval:{start:110896,end:110959},description:"Small Kana Extension",plane:1},{interval:{start:110960,end:111359},description:"Nushu",plane:1},{interval:{start:113664,end:113823},description:"Duployan",plane:1},{interval:{start:113824,end:113839},description:"Shorthand Format Controls",plane:1},{interval:{start:118528,end:118735},description:"Znamenny Musical Notation",plane:1},{interval:{start:118784,end:119039},description:"Byzantine Musical Symbols",plane:1},{interval:{start:119040,end:119295},description:"Musical Symbols",plane:1},{interval:{start:119296,end:119375},description:"Ancient Greek Musical Notation",plane:1},{interval:{start:119488,end:119519},description:"Kaktovik Numerals",plane:1},{interval:{start:119520,end:119551},description:"Mayan Numerals",plane:1},{interval:{start:119552,end:119647},description:"Tai Xuan Jing Symbols",plane:1},{interval:{start:119648,end:119679},description:"Counting Rod Numerals",plane:1},{interval:{start:119808,end:120831},description:"Mathematical Alphanumeric Symbols",plane:1},{interval:{start:120832,end:121519},description:"Sutton SignWriting",plane:1},{interval:{start:122624,end:122879},description:"Latin Extended-G",plane:1},{interval:{start:122880,end:122927},description:"Glagolitic Supplement",plane:1},{interval:{start:122928,end:123023},description:"Cyrillic Extended-D",plane:1},{interval:{start:123136,end:123215},description:"Nyiakeng Puachue Hmong",plane:1},{interval:{start:123536,end:123583},description:"Toto",plane:1},{interval:{start:123584,end:123647},description:"Wancho",plane:1},{interval:{start:124112,end:124159},description:"Nag Mundari",plane:1},{interval:{start:124896,end:124927},description:"Ethiopic Extended-B",plane:1},{interval:{start:124928,end:125151},description:"Mende Kikakui",plane:1},{interval:{start:125184,end:125279},description:"Adlam",plane:1},{interval:{start:126064,end:126143},description:"Indic Siyaq Numbers",plane:1},{interval:{start:126208,end:126287},description:"Ottoman Siyaq Numbers",plane:1},{interval:{start:126464,end:126719},description:"Arabic Mathematical Alphabetic Symbols",plane:1},{interval:{start:126976,end:127023},description:"Mahjong Tiles",plane:1},{interval:{start:127024,end:127135},description:"Domino Tiles",plane:1},{interval:{start:127136,end:127231},description:"Playing Cards",plane:1},{interval:{start:127232,end:127487},description:"Enclosed Alphanumeric Supplement",plane:1},{interval:{start:127488,end:127743},description:"Enclosed Ideographic Supplement",plane:1},{interval:{start:127744,end:128511},description:"Miscellaneous Symbols and Pictographs",plane:1},{interval:{start:128512,end:128591},description:"Emoticons",plane:1},{interval:{start:128592,end:128639},description:"Ornamental Dingbats",plane:1},{interval:{start:128640,end:128767},description:"Transport and Map Symbols",plane:1},{interval:{start:128768,end:128895},description:"Alchemical Symbols",plane:1},{interval:{start:128896,end:129023},description:"Geometric Shapes Extended",plane:1},{interval:{start:129024,end:129279},description:"Supplemental Arrows-C",plane:1},{interval:{start:129280,end:129535},description:"Supplemental Symbols and Pictographs",plane:1},{interval:{start:129536,end:129647},description:"Chess Symbols",plane:1},{interval:{start:129648,end:129791},description:"Symbols and Pictographs Extended-A",plane:1},{interval:{start:129792,end:130047},description:"Symbols for Legacy Computing",plane:1}]},Xt={planeNumber:2,description:"Supplementary Ideographic Plane",abbreviation:"SIP",interval:{start:131072,end:196607},blocks:[{interval:{start:131072,end:173791},description:"CJK Unified Ideographs Extension B",plane:2},{interval:{start:173824,end:177983},description:"CJK Unified Ideographs Extension C",plane:2},{interval:{start:177984,end:178207},description:"CJK Unified Ideographs Extension D",plane:2},{interval:{start:178208,end:183983},description:"CJK Unified Ideographs Extension E",plane:2},{interval:{start:183984,end:191471},description:"CJK Unified Ideographs Extension F",plane:2},{interval:{start:191472,end:192095},description:"CJK Unified Ideographs Extension I",plane:2},{interval:{start:194560,end:195103},description:"CJK Compatibility Ideographs Supplement",plane:2}]},ea={planeNumber:3,description:"Tertiary Ideographic Plane",abbreviation:"TIP",interval:{start:196608,end:262143},blocks:[{interval:{start:196608,end:201551},description:"CJK Unified Ideographs Extension G",plane:3},{interval:{start:201552,end:205743},description:"CJK Unified Ideographs Extension H",plane:3}]},ta={planeNumber:14,description:"Supplementary Special-purpose Plane",abbreviation:"SSP",interval:{start:917504,end:983039},blocks:[{interval:{start:917504,end:917631},description:"Tags",plane:14},{interval:{start:917760,end:917999},description:"Variation Selectors Supplement",plane:14}]},aa={planeNumber:15,description:"Supplementary Private Use Area-A",abbreviation:"SPUA-A",interval:{start:983040,end:1048575},blocks:[{interval:{start:983040,end:1048575},description:"Supplementary Private Use Area-A",plane:15}]},ra={planeNumber:16,description:"Supplementary Private Use Area-B",abbreviation:"SPUA-B",interval:{start:1048576,end:1114111},blocks:[{interval:{start:1048576,end:1114111},description:"Supplementary Private Use Area-B",plane:16}]},Ue=[Zt,Yt,Xt,ea,ta,aa,ra];var we=[{abbreviation:"L",name:"Letter",categories:[{abbreviation:"Lu",name:"Uppercase Letter",description:"an uppercase letter"},{abbreviation:"Ll",name:"Lowercase Letter",description:"a lowercase letter"},{abbreviation:"Lt",name:"Titlecase Letter",description:"a digraph encoded as a single character, with first part uppercase"},{abbreviation:"Lm",name:"Modifier Letter",description:"a modifier letter"},{abbreviation:"Lo",name:"Other Letter",description:"other letters, including syllables and ideographs"}]},{abbreviation:"M",name:"Mark",categories:[{abbreviation:"Mn",name:"Nonspacing Mark",description:"a nonspacing combining mark (zero advance width)"},{abbreviation:"Mc",name:"Spacing Mark",description:"a spacing combining mark (positive advance width)"},{abbreviation:"Me",name:"Enclosing Mark",description:"an enclosing combining mark"}]},{abbreviation:"N",name:"Number",categories:[{abbreviation:"Nd",name:"Decimal Number",description:"a decimal digit"},{abbreviation:"Nl",name:"Letter Number",description:"a letterlike numeric character"},{abbreviation:"No",name:"Other Number",description:"a numeric character of other type"}]},{abbreviation:"P",name:"Punctuation",categories:[{abbreviation:"Pc",name:"Connector Punctuation",description:"a connecting punctuation mark, like a tie"},{abbreviation:"Pd",name:"Dash Punctuation",description:"a dash or hyphen punctuation mark"},{abbreviation:"Ps",name:"Open Punctuation",description:"an opening punctuation mark (of a pair)"},{abbreviation:"Pe",name:"Close Punctuation",description:"a closing punctuation mark (of a pair)"},{abbreviation:"Pi",name:"Initial Punctuation",description:"an initial quotation mark"},{abbreviation:"Pf",name:"Final Punctuation",description:"a final quotation mark"},{abbreviation:"Po",name:"Other Punctuation",description:"a punctuation mark of other type"}]},{abbreviation:"S",name:"Symbol",categories:[{abbreviation:"Sm",name:"Math Symbol",description:"a symbol of mathematical use"},{abbreviation:"Sc",name:"Currency Symbol",description:"a currency sign"},{abbreviation:"Sk",name:"Modifier Symbol",description:"a non-letterlike modifier symbol"},{abbreviation:"So",name:"Other Symbol",description:"a symbol of other type"}]},{abbreviation:"Z",name:"Separator",categories:[{abbreviation:"Zs",name:"Space Separator",description:"a space character (of various non-zero widths)"},{abbreviation:"Zl",name:"Line Separator",description:"U+2028 LINE SEPARATOR only"},{abbreviation:"Zp",name:"Paragraph Separator",description:"U+2029 PARAGRAPH SEPARATOR only"}]},{abbreviation:"C",name:"Other",categories:[{abbreviation:"Cc",name:"Control",description:"a C0 or C1 control code"},{abbreviation:"Cf",name:"Format",description:"a format control character"},{abbreviation:"Cs",name:"Surrogate",description:"a surrogate code point"},{abbreviation:"Co",name:"Private Use",description:"a private-use character"},{abbreviation:"Cn",name:"Unassigned",description:"a reserved unassigned code point or a noncharacter"}]}];var ct={planes:[0],categories:["L","N","P","S"]};function ge(){return{initialized:!1,version:ue,settings:{initialized:!1,modified:!1,filter:{planes:Ue.map(t=>w(F({},t.interval),{blocks:t.blocks.map(e=>w(F({},e.interval),{included:ct.planes.includes(t.planeNumber)}))})),categoryGroups:we.map(t=>({abbreviation:t.abbreviation,categories:t.categories.map(e=>({abbreviation:e.abbreviation,included:ct.categories.includes(t.abbreviation)}))}))}},usage:{initialized:!1,codepoints:[]},unicode:{initialized:!1,codepoints:[]}}}function pt(t){var e,a,i;return t!=null&&"initialized"in t&&"version"in t&&"settings"in t&&na((e=t.settings)!=null?e:{})&&"usage"in t&&oa((a=t.usage)!=null?a:{})&&"unicode"in t&&ia((i=t.unicode)!=null?i:{})}function na(t){return"initialized"in t}function ia(t){return"initialized"in t}function oa(t){return"initialized"in t}function ut(t){return c(this,null,function*(){let e=yield t.loadData();return pt(e)?e:F({},ge())})}var Pe=class{constructor(e){this.dataLoader=e;this.storedData=new Ae(()=>ut(e),a=>e.saveData(a))}isInitialized(){return c(this,null,function*(){let e=yield this.storedData.get();return e.initialized&&e.version===ue&&e.settings.initialized&&!e.settings.modified&&e.unicode.initialized&&e.usage.initialized})}setInitialized(e){return c(this,null,function*(){yield this.mergeData({initialized:e})})}isCurrentVersion(){return c(this,null,function*(){return(yield this.storedData.get()).version===ue})}getUnicode(){return c(this,null,function*(){return(yield this.storedData.get()).unicode})}overwriteUnicode(e){return c(this,null,function*(){return(yield this.mergeData({unicode:e})).unicode})}setInitializedUnicode(e){return c(this,null,function*(){let a=yield this.getUnicode(),i=w(F({},a),{initialized:e});yield this.overwriteUnicode(i)})}getSettings(){return c(this,null,function*(){return(yield this.storedData.get()).settings})}overwriteSettings(e){return c(this,null,function*(){return(yield this.mergeData({settings:e})).settings})}setInitializedSettings(e){return c(this,null,function*(){let a=yield this.getSettings(),i=w(F({},a),{initialized:e});yield this.overwriteSettings(i)})}setFilterSatisfied(e){return c(this,null,function*(){let a=yield this.getSettings(),i=w(F({},a),{modified:!e});yield this.overwriteSettings(i)})}getUsage(){return c(this,null,function*(){return(yield this.storedData.get()).usage})}overwriteUsage(e){return c(this,null,function*(){return(yield this.mergeData({usage:e})).usage})}setInitializedUsage(e){return c(this,null,function*(){let a=yield this.getUsage(),i=w(F({},a),{initialized:e});yield this.overwriteUsage(i)})}mergeData(e){return c(this,null,function*(){let a=yield this.storedData.get(),i=w(F(F({},a),e),{version:e.initialized?ue:a.version});return this.storedData.set(i),yield this.storedData.persist()})}};var _e=class{constructor(e){this.store=e}getCodepoints(){return c(this,null,function*(){return(yield this.store.getUnicode()).codepoints})}initializeCodepoints(e){return c(this,null,function*(){yield this.store.overwriteUnicode({initialized:!0,codepoints:e})})}};function $e(t,e){return t.start===e.start&&t.end===e.end}function mt(t,e){return t.start<=e.start&&t.end>=e.end}var Ie=class{constructor(e){this.store=e}getFilter(){return c(this,null,function*(){return(yield this.store.getSettings()).filter})}getCharacterBlock(e){return c(this,null,function*(){return(yield this.getBlockFilters()).some(a=>$e(a,e)&&a.included)})}setCharacterBlock(e,a){return c(this,null,function*(){let i=yield this.store.getSettings(),o=i.filter.planes.findIndex(s=>mt(s,e));if(o<0)throw new q(`Block doesn't belong to any codepoint plane. ${e}`);let d=i.filter.planes[o].blocks.findIndex(s=>$e(s,e));if(d<0)throw new q(`Block doesn't exist within a plane. ${e}`);i.filter.planes[o].blocks[d].included=a,i.modified=!0,yield this.store.overwriteSettings(i)})}getCharacterCategory(e){return c(this,null,function*(){return(yield this.getCategoryFilters()).some(a=>a.abbreviation===e&&a.included)})}setCharacterCategory(e,a){return c(this,null,function*(){let i=yield this.store.getSettings(),o=i.filter.categoryGroups.findIndex(s=>s.abbreviation===e[0]);if(o<0)throw new q(`Codepoint category group doesn't exist. ${e}: ${e[0]}`);let d=i.filter.categoryGroups[o].categories.findIndex(s=>s.abbreviation===e);if(d<0)throw new q(`Block doesn't exist within a plane. ${e}`);i.filter.categoryGroups[o].categories[d].included=a,i.modified=!0,yield this.store.overwriteSettings(i)})}getBlockFilters(){return c(this,null,function*(){return(yield this.getFilter()).planes.flatMap(e=>e.blocks)})}getCategoryFilters(){return c(this,null,function*(){return(yield this.getFilter()).categoryGroups.flatMap(e=>e.categories)})}};var X=require("obsidian");function ve(t){return t.toString(16).padStart(4,"0")}var ke=class t extends X.PluginSettingTab{constructor(a,i,o,d,s){super(a,i);this.characterService=o;this.settingsStore=d;this.initializer=s;this.rendered=!1;this.containerEl.addClass("plugin","unicode-search","setting-tab")}display(){return c(this,null,function*(){if(this.rendered)return;let a=this.containerEl.createDiv({cls:"filter-settings"});new X.Setting(a).setHeading().setName("Unicode Character Filters").setDesc("Here you can set which characters would you like to be included or excluded from the plugins search results. Toggle the headings to display the options."),yield this.displayFilterSettings(a),this.rendered=!0})}hide(){return this.initializer.initializeData()}displayFilterSettings(a){return c(this,null,function*(){new X.Setting(a).setHeading().setName("General Categories").setDesc("Include or exclude any Unicode general character categories.").addToggle(d=>d.setValue(!1).onChange(s=>i.toggleClass("hidden",!s)));let i=a.createDiv({cls:["group-container","hidden"]});for(let d of we)yield this.addCharacterCategoryFilter(i,d);new X.Setting(a).setHeading().setName("Planes and Blocks").setDesc("Include or exclude of any Unicode blocks.").addToggle(d=>d.setValue(!1).onChange(s=>o.toggleClass("hidden",!s)));let o=a.createDiv({cls:["group-container","hidden"]});for(let d of Ue)yield this.addCharacterPlaneFilters(o,d)})}addCharacterCategoryFilter(a,i){return c(this,null,function*(){let o=a.createDiv({cls:"item-container"});new X.Setting(o).setHeading().setName(i.name);let d=o.createDiv({cls:"items-list"});for(let s of i.categories)yield t.addCharacterCategoryFilterToggle(d,this.settingsStore,s)})}addCharacterPlaneFilters(a,i){return c(this,null,function*(){let o=a.createDiv({cls:"item-container"});new X.Setting(o).setHeading().setName(createFragment(s=>{s.createSpan().appendText(i.description),t.codepointFragment(s,i.interval)}));let d=o.createDiv({cls:"blocks-list"});for(let s of i.blocks)yield t.addCharacterBlockFilterToggle(d,this.settingsStore,s)})}static addCharacterBlockFilterToggle(a,i,o){return c(this,null,function*(){let d=yield i.getCharacterBlock(o.interval);new X.Setting(a).setName(o.description).setDesc(createFragment(s=>t.codepointFragment(s,o.interval))).addToggle(s=>s.setValue(d).onChange(D=>i.setCharacterBlock(o.interval,D)))})}static addCharacterCategoryFilterToggle(a,i,o){return c(this,null,function*(){let d=yield i.getCharacterCategory(o.abbreviation);new X.Setting(a).setName(o.name).setDesc(o.description).addToggle(s=>s.setValue(d).onChange(D=>i.setCharacterCategory(o.abbreviation,D)))})}static codepointFragment(a,i){return a.createSpan({cls:["character-codepoint","monospace"]}).setText(`${ve(i.start)}\uFF0D${ve(i.end)}`),a}};var Me=class{constructor(e,a){this.codepointStore=e;this.usageStore=a}getOne(e){return c(this,null,function*(){let i=(yield this.getAllCharacters()).find(o=>o.codepoint===e);if(i==null)throw new q(`No character '${e}' exists.`);return i})}getAllCharacters(){return this.codepointStore.getCodepoints()}getUsed(){return c(this,null,function*(){let e=yield this.getAllCharacters(),a=yield this.usageStore.getUsed(),i=a.map(o=>o.codepoint);return e.filter(o=>i.contains(o.codepoint)).map(o=>F(F({},a.find(d=>d.codepoint===o.codepoint)),o))})}getAll(){return c(this,null,function*(){let e=yield this.getAllCharacters(),a=yield this.usageStore.getUsed();return e.map(i=>F(F({},a.find(o=>o.codepoint===i.codepoint)),i))})}recordUsage(e){let a=new Date;return this.usageStore.updateCharacter(e,i=>{var o,d;return w(F({},i),{firstUsed:(o=i==null?void 0:i.firstUsed)!=null?o:a,lastUsed:a,useCount:((d=i==null?void 0:i.useCount)!=null?d:0)+1})})}};function je(t){return w(F({},t),{lastUsed:new Date(t.lastUsed),firstUsed:new Date(t.firstUsed)})}function ht(t){return w(F({},t),{lastUsed:t.lastUsed.toJSON(),firstUsed:t.firstUsed.toJSON()})}var Te=class{constructor(e){this.store=e}updateCharacter(e,a){return c(this,null,function*(){let i=yield this.getUsed(),o=i.findIndex(C=>C.codepoint===e),d=o>=0,s=d?o:0,D=w(F({},a(d?F({},i[s]):void 0)),{codepoint:e});return d?i[o]=D:i.unshift(D),yield this.overwriteUsageData(i),i[s]})}getUsed(){return c(this,null,function*(){return(yield this.store.getUsage()).codepoints.map(je)})}overwriteUsageData(e){return c(this,null,function*(){return(yield this.mergeUsage({codepoints:e.map(ht)})).codepoints.map(je)})}mergeUsage(e){return c(this,null,function*(){let a=yield this.store.getUsage(),i=F(F({},a),e);return yield this.store.overwriteUsage(i)})}};var ye=require("obsidian");var xt={command:"\u2B81",purpose:"to navigate"},ft={command:"\u21B5",purpose:"to insert selected character"},gt={command:"esc",purpose:"to dismiss"},vt={cls:"icon inline-description recent",text:"\u21A9",title:"used recently"},Ft={cls:"icon inline-description frequent",text:"\u21BA",title:"used frequently"};function Be(t){return ve(t.codepoint.codePointAt(0))}function Ct(t){if(t.length<1)throw new q("Cannot get a random item from an empty array");return t[Math.floor(Math.random()*t.length)]}var Qe={score:0,matches:[]};function Fe(t){var e,a;return{name:(e=t.name)!=null?e:Qe,codepoint:(a=t.codepoint)!=null?a:Qe}}function yt(t){return w(F({},t),{match:Fe(t.match)})}function St(t,e){let a=e.codepoint.score-t.codepoint.score,i=e.name.score-t.name.score,o=a+i;return o/Math.abs(o)}function he(t,e,a){return t==null&&e==null?0:t!=null&&e!=null?a(t,e):t==null?1:-1}function bt(t,e){let a=t.codepoint==null&&t.name==null,i=e.codepoint==null&&e.name==null;return he(a?null:Fe(t),i?null:Fe(e),(o,d)=>St(o,d))}function Ce(t){switch(t){case-1:return 1;case 1:return-1;default:return 0}}function Ne(t,e){return t===e?0:t<e?-1:1}function Re(t,e){return t<e?-1:t>e?1:0}function Et(t,e,a){let i=he(t.lastUsed<a?null:t.lastUsed,e.lastUsed<a?null:e.lastUsed,(o,d)=>Ce(Re(o,d)));return i!==0?i:Ce(Ne(t.useCount,e.useCount))}function Dt(t){return t!=null&&"useCount"in t&&"firstUsed"in t&&"lastUsed"in t}function At(t){return Dt(t)?t:null}function Ut(t,e,a){let i=he(At(t),At(e),(o,d)=>Et(o,d,a));return i!==0?i:Ne(t.codepoint.codePointAt(0),e.codepoint.codePointAt(0))}function wt(t,e,a){let i=bt(t.match,e.match);return i===0?Ut(t.item,e.item,a):i}var Oe=class{constructor(e,a){this.getCallback=e;this.value=a}getValue(){return c(this,null,function*(){return this.value==null&&(this.value=yield this.getCallback()),this.value})}setValue(e){this.value=e}};function Pt(t){return t.slice().map(e=>e.lastUsed).sort((e,a)=>Ce(Re(e,a)))}function _t(t){let e=t.reduce((o,d)=>({totalUses:o.totalUses+d.useCount,itemCount:o.itemCount+1}),{totalUses:0,itemCount:0}),{totalUses:a,itemCount:i}=e;return i===0?0:a/i}function It(t){return{item:t,match:{codepoint:null,name:null}}}var Le=require("obsidian");function kt(t){let a=t.length<=4&&!t.contains(" ")?(0,Le.prepareSimpleSearch)(t):o=>null,i=(0,Le.prepareFuzzySearch)(t);return o=>({item:o,match:{codepoint:a(Be(o)),name:i(o.name)}})}function Mt(t){return t.match.name!=null||t.match.codepoint!=null}var ze=class t extends ye.SuggestModal{constructor(a,i,o){super(a);this.editor=i;this.characterService=o;super.setInstructions([xt,ft,gt]),this.setRandomPlaceholder().then(),this.usageStatistics=new Oe(()=>c(this,null,function*(){var s;let d=yield o.getUsed();return{topThirdRecentlyUsed:(s=Pt(d).slice(0,3).last())!=null?s:new Date(0),averageUseCount:_t(d)}}))}getSuggestions(a){return c(this,null,function*(){let i=yield this.characterService.getAll(),d=a==null||a.length<1?i.map(It):i.map(kt(a)).filter(Mt),s=(yield this.usageStatistics.getValue()).topThirdRecentlyUsed;return d.sort((D,C)=>wt(D,C,s)).map(yt)})}renderSuggestion(a,i){return c(this,null,function*(){let o=a.item;i.addClass("plugin","unicode-search","result-item"),i.createDiv({cls:"character-preview"}).createSpan({text:o.codepoint});let d=i.createDiv({cls:"character-match"}),s=d.createDiv({cls:"character-name"});if((0,ye.renderMatches)(s,o.name,a.match.name.matches),a.match.codepoint.matches.length>0){let Se=d.createDiv({cls:"character-codepoint"});(0,ye.renderMatches)(Se,Be(o),a.match.codepoint.matches)}let D=i.createDiv({cls:"detail"}),C=yield this.usageStatistics.getValue(),V=o,ce=V.lastUsed!=null&&V.lastUsed>=C.topThirdRecentlyUsed,oe=V.useCount!=null&&V.useCount>=C.averageUseCount,se=D.createDiv({cls:"attributes"});ce&&se.createDiv(vt),oe&&se.createDiv(Ft)})}onChooseSuggestion(a,i){return c(this,null,function*(){this.editor.replaceSelection(a.item.codepoint);try{yield this.characterService.recordUsage(a.item.codepoint)}catch(o){}})}onNoSuggestion(){return c(this,null,function*(){yield this.setRandomPlaceholder()})}setRandomPlaceholder(){return c(this,null,function*(){let a=Ct(yield this.characterService.getAllCharacters()).name;Ee(t.prototype,this,"setPlaceholder").call(this,`Unicode search: ${a}`)})}};var He=class{constructor(e,a,i){this.dataStore=e;this.characterDataStore=a;this.ucdService=i}initializeData(){return c(this,null,function*(){yield this.initializeAll()})}initializeAll(){return c(this,null,function*(){(yield this.dataStore.isInitialized())||((yield this.dataStore.isCurrentVersion())||(yield this.dataStore.setInitialized(!1),yield this.dataStore.setInitializedSettings(!1),yield this.dataStore.setInitializedUnicode(!1),yield this.dataStore.setInitializedUsage(!1)),yield this.initializeSettings(),yield this.initializeUnicode(),yield this.initializeUsage(),yield this.dataStore.setInitialized(!0))})}initializeUsage(){return c(this,null,function*(){(yield this.dataStore.getUsage()).initialized||(yield this.dataStore.overwriteUsage(w(F({},ge().usage),{initialized:!0})))})}initializeUnicode(){return c(this,null,function*(){let e=(yield this.dataStore.getUnicode()).initialized,a=(yield this.dataStore.getSettings()).modified;if(e&&!a)return;let i=yield this.ucdService.download();yield this.characterDataStore.initializeCodepoints(i),yield this.dataStore.setFilterSatisfied(!0)})}initializeSettings(){return c(this,null,function*(){(yield this.dataStore.getSettings()).initialized||(yield this.dataStore.overwriteSettings(w(F({},ge().settings),{initialized:!0})))})}};var Ke=class t extends Tt.Plugin{constructor(e,a){super(e,a)}onload(){return c(this,null,function*(){let e=new Pe(this),a=new _e(e),i=new Te(e),o=new Me(a,i),d=new Ie(e),s=new De(d),D=new He(e,a,s);yield D.initializeData(),Ee(t.prototype,this,"addCommand").call(this,{id:"search-unicode-chars",name:"Search Unicode characters",editorCallback:C=>(new ze(app,C,o).open(),!0)}),this.addSettingTab(new ke(this.app,this,o,d,D))})}};
/*! Bundled license information:

papaparse/papaparse.min.js:
  (* @license
  Papa Parse
  v5.4.1
  https://github.com/mholt/PapaParse
  License: MIT
  *)
*/
